diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3b50ab5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# Vendored third-party JavaScript under docs/assets/javascripts/ is treated +# as binary so PR diffs stay readable. See CONTRIBUTING.md for the convention. +docs/assets/javascripts/** binary diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index db594c9..de812c8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,6 +28,9 @@ jobs: - name: Install dependencies run: pip install zensical + - name: Verify vendored Mermaid + run: python3 scripts/vendor_mermaid.py --check + - name: Build documentation run: zensical build --clean diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0adb85b..d5f5dc3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,6 +22,53 @@ zensical serve zensical build --clean ``` +## Vendored dependencies + +The file `docs/assets/javascripts/mermaid.tiny.js` is a pinned copy of the +`@mermaid-js/tiny` UMD build. We self-host it because the Content Security +Policy on `docs.aws.amazon.com` blocks Zensical's default CDN load of Mermaid +from `unpkg.com`. + +Mermaid's tiny build supports flowcharts and sequence, state, class, and +entity-relationship diagrams. It does not support mindmap or architecture +diagrams, or KaTeX math rendering. + +Upgrade procedure: + +```bash +# 1. Show the pinned version and the latest on npm +python3 scripts/vendor_mermaid.py --latest + +# 2. Edit scripts/vendor_mermaid.toml. Bump `version`. Run the script. +# It will fail and print the new SHA-256. Paste that value into `sha256` +# in the TOML, then run the script again. +python3 scripts/vendor_mermaid.py + +# 3. Preview locally and spot-check pages with diagrams. +zensical serve + +# 4. Commit scripts/vendor_mermaid.toml and docs/assets/javascripts/mermaid.tiny.js +# together in the same commit. +``` + +CI verifies the committed file matches the pinned SHA-256. If you hand-edit the +vendored file or forget to update the SHA on upgrade, the build fails. + +### Directory convention + +JavaScript under `docs/` is split by ownership: + +- `docs/assets/javascripts/` holds vendored third-party bundles. Treat these + as read-only outputs of the vendoring scripts under `scripts/`. Do not + hand-edit them. Upgrade by bumping the version pin in the corresponding + script and re-running it. Files in this directory are marked `binary` in + `.gitattributes` so PR diffs do not try to render minified code. +- `docs/javascripts/` holds first-party scripts we author and maintain, such + as `mermaid-init.js`, which initializes the vendored Mermaid build. + +Both directories are served from the same origin and register through +`extra_javascript` in `zensical.toml`. + ## Formatting Run `mdformat` to auto-format Markdown files before committing: diff --git a/docs/assets/javascripts/mermaid.tiny.js b/docs/assets/javascripts/mermaid.tiny.js new file mode 100644 index 0000000..ec869d2 --- /dev/null +++ b/docs/assets/javascripts/mermaid.tiny.js @@ -0,0 +1,2572 @@ +"use strict";var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var uxt=Object.create;var Wy=Object.defineProperty;var hxt=Object.getOwnPropertyDescriptor;var dxt=Object.getOwnPropertyNames;var fxt=Object.getPrototypeOf,pxt=Object.prototype.hasOwnProperty;var s=(e,t)=>Wy(e,"name",{value:t,configurable:!0});var b=(e,t)=>()=>(e&&(t=e(e=0)),t);var Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Fe=(e,t)=>{for(var r in t)Wy(e,r,{get:t[r],enumerable:!0})},x2=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of dxt(t))!pxt.call(e,n)&&n!==r&&Wy(e,n,{get:()=>t[n],enumerable:!(i=hxt(t,n))||i.enumerable});return e},xr=(e,t,r)=>(x2(e,t,"default"),r&&x2(r,t,"default")),fs=(e,t,r)=>(r=e!=null?uxt(fxt(e)):{},x2(t||!e||!e.__esModule?Wy(r,"default",{value:e,enumerable:!0}):r,e)),b2=e=>x2(Wy({},"__esModule",{value:!0}),e);var mxt,hp,n3,S$,k2=b(()=>{"use strict";mxt=Object.freeze({left:0,top:0,width:16,height:16}),hp=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),n3=Object.freeze({...mxt,...hp}),S$=Object.freeze({...n3,body:"",hidden:!1})});var gxt,w$,_$=b(()=>{"use strict";k2();gxt=Object.freeze({width:null,height:null}),w$=Object.freeze({...gxt,...hp})});var s3,T2,E$=b(()=>{"use strict";s3=s((e,t,r,i="")=>{let n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){let l=n.pop(),u=n.pop(),h={provider:n.length>0?n[0]:i,prefix:u,name:l};return t&&!T2(h)?null:h}let a=n[0],o=a.split("-");if(o.length>1){let l={provider:i,prefix:o.shift(),name:o.join("-")};return t&&!T2(l)?null:l}if(r&&i===""){let l={provider:i,prefix:"",name:a};return t&&!T2(l,r)?null:l}return null},"stringToIcon"),T2=s((e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,"validateIconName")});function v$(e,t){let r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);let i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}var A$=b(()=>{"use strict";s(v$,"mergeIconTransformations")});function a3(e,t){let r=v$(e,t);for(let i in S$)i in hp?i in e&&!(i in r)&&(r[i]=hp[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}var R$=b(()=>{"use strict";k2();A$();s(a3,"mergeIconData")});function L$(e,t){let r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;let l=i[o]&&i[o].parent,u=l&&a(l);u&&(n[o]=[l].concat(u))}return n[o]}return s(a,"resolve"),(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}var D$=b(()=>{"use strict";s(L$,"getIconsTree")});function I$(e,t,r){let i=e.icons,n=e.aliases||Object.create(null),a={};function o(l){a=a3(i[l]||n[l],a)}return s(o,"parse"),o(t),r.forEach(o),a3(e,a)}function o3(e,t){if(e.icons[t])return I$(e,t,[]);let r=L$(e,[t])[t];return r?I$(e,t,r):null}var N$=b(()=>{"use strict";R$();D$();s(I$,"internalGetIconData");s(o3,"getIconData")});function l3(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;let i=e.split(yxt);if(i===null||!i.length)return e;let n=[],a=i.shift(),o=xxt.test(a);for(;;){if(o){let l=parseFloat(a);isNaN(l)?n.push(a):n.push(Math.ceil(l*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}var yxt,xxt,O$=b(()=>{"use strict";yxt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xxt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;s(l3,"calculateSize")});function bxt(e,t="defs"){let r="",i=e.indexOf("<"+t);for(;i>=0;){let n=e.indexOf(">",i),a=e.indexOf("",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function kxt(e,t){return e?""+e+""+t:t}function M$(e,t,r){let i=bxt(e);return kxt(i.defs,t+i.content+r)}var B$=b(()=>{"use strict";s(bxt,"splitSVGDefs");s(kxt,"mergeDefsAndContent");s(M$,"wrapSVGContent")});function c3(e,t){let r={...n3,...e},i={...w$,...t},n={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,i].forEach(y=>{let x=[],k=y.hFlip,T=y.vFlip,C=y.rotate;k?T?C+=2:(x.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),x.push("scale(-1 1)"),n.top=n.left=0):T&&(x.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),x.push("scale(1 -1)"),n.top=n.left=0);let _;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:_=n.height/2+n.top,x.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:x.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:_=n.width/2+n.left,x.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}C%2===1&&(n.left!==n.top&&(_=n.left,n.left=n.top,n.top=_),n.width!==n.height&&(_=n.width,n.width=n.height,n.height=_)),x.length&&(a=M$(a,'',""))});let o=i.width,l=i.height,u=n.width,h=n.height,d,f;o===null?(f=l===null?"1em":l==="auto"?h:l,d=l3(f,u/h)):(d=o==="auto"?u:o,f=l===null?l3(d,h/u):l==="auto"?h:l);let p={},m=s((y,x)=>{Txt(x)||(p[y]=x.toString())},"setAttr");m("width",d),m("height",f);let g=[n.left,n.top,u,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:a}}var Txt,P$=b(()=>{"use strict";k2();_$();O$();B$();Txt=s(e=>e==="unset"||e==="undefined"||e==="none","isUnsetKeyword");s(c3,"iconToSVG")});function u3(e,t=Sxt){let r=[],i;for(;i=Cxt.exec(e);)r.push(i[1]);if(!r.length)return e;let n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let o=typeof t=="function"?t(a):t+(wxt++).toString(),l=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}var Cxt,Sxt,wxt,$$=b(()=>{"use strict";Cxt=/\sid="(\S+)"/g,Sxt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),wxt=0;s(u3,"replaceIDs")});function h3(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}var F$=b(()=>{"use strict";s(h3,"iconToHTML")});var V$=b(()=>{"use strict";E$();N$();P$();$$();F$()});var d3,Ti,dp=b(()=>{"use strict";d3=s((e,t,{depth:r=2,clobber:i=!1}={})=>{let n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>d3(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=d3(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ti=d3});var C2=Be((f3,p3)=>{"use strict";(function(e,t){typeof f3=="object"&&typeof p3<"u"?p3.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(f3,(function(){"use strict";var e=1e3,t=6e4,r=36e5,i="millisecond",n="second",a="minute",o="hour",l="day",u="week",h="month",d="quarter",f="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,x={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:s(function(F){var B=["th","st","nd","rd"],O=F%100;return"["+F+(B[(O-20)%10]||B[O]||B[0])+"]"},"ordinal")},k=s(function(F,B,O){var R=String(F);return!R||R.length>=B?F:""+Array(B+1-R.length).join(O)+F},"m"),T={s:k,z:s(function(F){var B=-F.utcOffset(),O=Math.abs(B),R=Math.floor(O/60),N=O%60;return(B<=0?"+":"-")+k(R,2,"0")+":"+k(N,2,"0")},"z"),m:s(function F(B,O){if(B.date()1)return F(E[0])}else{var D=B.name;_[D]=B,N=D}return!R&&N&&(C=N),N||!R&&C},"t"),v=s(function(F,B){if(w(F))return F.clone();var O=typeof B=="object"?B:{};return O.date=F,O.args=arguments,new $(O)},"O"),M=T;M.l=A,M.i=w,M.w=function(F,B){return v(F,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var $=(function(){function F(O){this.$L=A(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[S]=!0}s(F,"M");var B=F.prototype;return B.parse=function(O){this.$d=(function(R){var N=R.date,P=R.utc;if(N===null)return new Date(NaN);if(M.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var E=N.match(g);if(E){var D=E[2]-1||0,V=(E[7]||"0").substring(0,3);return P?new Date(Date.UTC(E[1],D,E[3]||1,E[4]||0,E[5]||0,E[6]||0,V)):new Date(E[1],D,E[3]||1,E[4]||0,E[5]||0,E[6]||0,V)}}return new Date(N)})(O),this.init()},B.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},B.$utils=function(){return M},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(O,R){var N=v(O);return this.startOf(R)<=N&&N<=this.endOf(R)},B.isAfter=function(O,R){return v(O){"use strict";z$=fs(C2(),1),sc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:s((...e)=>{},"trace"),debug:s((...e)=>{},"debug"),info:s((...e)=>{},"info"),warn:s((...e)=>{},"warn"),error:s((...e)=>{},"error"),fatal:s((...e)=>{},"fatal")},qy=s(function(e="fatal"){let t=sc.fatal;typeof e=="string"?e.toLowerCase()in sc&&(t=sc[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=sc.fatal&&(z.fatal=console.error?console.error.bind(console,Ba("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ba("FATAL"))),t<=sc.error&&(z.error=console.error?console.error.bind(console,Ba("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ba("ERROR"))),t<=sc.warn&&(z.warn=console.warn?console.warn.bind(console,Ba("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ba("WARN"))),t<=sc.info&&(z.info=console.info?console.info.bind(console,Ba("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ba("INFO"))),t<=sc.debug&&(z.debug=console.debug?console.debug.bind(console,Ba("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ba("DEBUG"))),t<=sc.trace&&(z.trace=console.debug?console.debug.bind(console,Ba("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ba("TRACE")))},"setLogLevel"),Ba=s(e=>`%c${(0,z$.default)().format("ss.SSS")} : ${e} : `,"format")});var S2,G$,W$=b(()=>{"use strict";S2={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:s(e=>e>=255?255:e<0?0:e,"r"),g:s(e=>e>=255?255:e<0?0:e,"g"),b:s(e=>e>=255?255:e<0?0:e,"b"),h:s(e=>e%360,"h"),s:s(e=>e>=100?100:e<0?0:e,"s"),l:s(e=>e>=100?100:e<0?0:e,"l"),a:s(e=>e>=1?1:e<0?0:e,"a")},toLinear:s(e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:s((e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?e+(t-e)*6*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),"hue2rgb"),hsl2rgb:s(({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;let n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return S2.hue2rgb(a,n,e+.3333333333333333)*255;case"g":return S2.hue2rgb(a,n,e)*255;case"b":return S2.hue2rgb(a,n,e-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:s(({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;let n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;let l=n-a,u=o>.5?l/(2-n-a):l/(n+a);if(i==="s")return u*100;switch(n){case e:return((t-r)/l+(t{"use strict";_xt={clamp:s((e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:s(e=>Math.round(e*1e10)/1e10,"round")},q$=_xt});var Ext,U$,H$=b(()=>{"use strict";Ext={dec2hex:s(e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`},"dec2hex")},U$=Ext});var vxt,Ae,nl=b(()=>{"use strict";W$();j$();H$();vxt={channel:G$,lang:q$,unit:U$},Ae=vxt});var ac,cn,jy=b(()=>{"use strict";nl();ac={};for(let e=0;e<=255;e++)ac[e]=Ae.unit.dec2hex(e);cn={ALL:0,RGB:1,HSL:2}});var m3,Y$,X$=b(()=>{"use strict";jy();m3=class{static{s(this,"Type")}constructor(){this.type=cn.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=cn.ALL}is(t){return this.type===t}},Y$=m3});var g3,K$,Q$=b(()=>{"use strict";nl();X$();jy();g3=class{static{s(this,"Channels")}constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Y$}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=cn.ALL,this}_ensureHSL(){let t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=Ae.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Ae.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=Ae.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=Ae.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Ae.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=Ae.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,r=t.r;return!this.type.is(cn.HSL)&&r!==void 0?r:(this._ensureHSL(),Ae.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,r=t.g;return!this.type.is(cn.HSL)&&r!==void 0?r:(this._ensureHSL(),Ae.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,r=t.b;return!this.type.is(cn.HSL)&&r!==void 0?r:(this._ensureHSL(),Ae.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,r=t.h;return!this.type.is(cn.RGB)&&r!==void 0?r:(this._ensureRGB(),Ae.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,r=t.s;return!this.type.is(cn.RGB)&&r!==void 0?r:(this._ensureRGB(),Ae.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,r=t.l;return!this.type.is(cn.RGB)&&r!==void 0?r:(this._ensureRGB(),Ae.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(cn.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(cn.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(cn.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(cn.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(cn.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(cn.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},K$=g3});var Axt,lu,Uy=b(()=>{"use strict";Q$();Axt=new K$({r:0,g:0,b:0,a:0},"transparent"),lu=Axt});var Z$,Yh,y3=b(()=>{"use strict";Uy();jy();Z$={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:s(e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(Z$.re);if(!t)return;let r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,l=o?1:17,u=o?8:4,h=a?0:-1,d=o?255:15;return lu.set({r:(i>>u*(h+3)&d)*l,g:(i>>u*(h+2)&d)*l,b:(i>>u*(h+1)&d)*l,a:a?(i&d)*l/255:1},e)},"parse"),stringify:s(e=>{let{r:t,g:r,b:i,a:n}=e;return n<1?`#${ac[Math.round(t)]}${ac[Math.round(r)]}${ac[Math.round(i)]}${ac[Math.round(n*255)]}`:`#${ac[Math.round(t)]}${ac[Math.round(r)]}${ac[Math.round(i)]}`},"stringify")},Yh=Z$});var w2,Hy,J$=b(()=>{"use strict";nl();Uy();w2={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:s(e=>{let t=e.match(w2.hueRe);if(t){let[,r,i]=t;switch(i){case"grad":return Ae.channel.clamp.h(parseFloat(r)*.9);case"rad":return Ae.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Ae.channel.clamp.h(parseFloat(r)*360)}}return Ae.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:s(e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let r=e.match(w2.re);if(!r)return;let[,i,n,a,o,l]=r;return lu.set({h:w2._hue2deg(i),s:Ae.channel.clamp.s(parseFloat(n)),l:Ae.channel.clamp.l(parseFloat(a)),a:o?Ae.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},e)},"parse"),stringify:s(e=>{let{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${Ae.lang.round(t)}, ${Ae.lang.round(r)}%, ${Ae.lang.round(i)}%, ${n})`:`hsl(${Ae.lang.round(t)}, ${Ae.lang.round(r)}%, ${Ae.lang.round(i)}%)`},"stringify")},Hy=w2});var _2,x3,t9=b(()=>{"use strict";y3();_2={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:s(e=>{e=e.toLowerCase();let t=_2.colors[e];if(t)return Yh.parse(t)},"parse"),stringify:s(e=>{let t=Yh.stringify(e);for(let r in _2.colors)if(_2.colors[r]===t)return r},"stringify")},x3=_2});var e9,Yy,r9=b(()=>{"use strict";nl();Uy();e9={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:s(e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let r=e.match(e9.re);if(!r)return;let[,i,n,a,o,l,u,h,d]=r;return lu.set({r:Ae.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:Ae.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Ae.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?Ae.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},e)},"parse"),stringify:s(e=>{let{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${Ae.lang.round(t)}, ${Ae.lang.round(r)}, ${Ae.lang.round(i)}, ${Ae.lang.round(n)})`:`rgb(${Ae.lang.round(t)}, ${Ae.lang.round(r)}, ${Ae.lang.round(i)})`},"stringify")},Yy=e9});var Rxt,un,oc=b(()=>{"use strict";y3();J$();t9();r9();jy();Rxt={format:{keyword:x3,hex:Yh,rgb:Yy,rgba:Yy,hsl:Hy,hsla:Hy},parse:s(e=>{if(typeof e!="string")return e;let t=Yh.parse(e)||Yy.parse(e)||Hy.parse(e)||x3.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:s(e=>!e.changed&&e.color?e.color:e.type.is(cn.HSL)||e.data.r===void 0?Hy.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Yy.stringify(e):Yh.stringify(e),"stringify")},un=Rxt});var Lxt,E2,b3=b(()=>{"use strict";nl();oc();Lxt=s((e,t)=>{let r=un.parse(e);for(let i in t)r[i]=Ae.channel.clamp[i](t[i]);return un.stringify(r)},"change"),E2=Lxt});var Dxt,qi,k3=b(()=>{"use strict";nl();Uy();oc();b3();Dxt=s((e,t,r=0,i=1)=>{if(typeof e!="number")return E2(e,{a:t});let n=lu.set({r:Ae.channel.clamp.r(e),g:Ae.channel.clamp.g(t),b:Ae.channel.clamp.b(r),a:Ae.channel.clamp.a(i)});return un.stringify(n)},"rgba"),qi=Dxt});var Ixt,Xh,i9=b(()=>{"use strict";nl();oc();Ixt=s((e,t)=>Ae.lang.round(un.parse(e)[t]),"channel"),Xh=Ixt});var Nxt,n9,s9=b(()=>{"use strict";nl();oc();Nxt=s(e=>{let{r:t,g:r,b:i}=un.parse(e),n=.2126*Ae.channel.toLinear(t)+.7152*Ae.channel.toLinear(r)+.0722*Ae.channel.toLinear(i);return Ae.lang.round(n)},"luminance"),n9=Nxt});var Oxt,a9,o9=b(()=>{"use strict";s9();Oxt=s(e=>n9(e)>=.5,"isLight"),a9=Oxt});var Mxt,Qr,l9=b(()=>{"use strict";o9();Mxt=s(e=>!a9(e),"isDark"),Qr=Mxt});var Bxt,fp,v2=b(()=>{"use strict";nl();oc();Bxt=s((e,t,r)=>{let i=un.parse(e),n=i[t],a=Ae.channel.clamp[t](n+r);return n!==a&&(i[t]=a),un.stringify(i)},"adjustChannel"),fp=Bxt});var Pxt,_t,c9=b(()=>{"use strict";v2();Pxt=s((e,t)=>fp(e,"l",t),"lighten"),_t=Pxt});var $xt,kt,u9=b(()=>{"use strict";v2();$xt=s((e,t)=>fp(e,"l",-t),"darken"),kt=$xt});var Fxt,A2,h9=b(()=>{"use strict";v2();Fxt=s((e,t)=>fp(e,"a",-t),"transparentize"),A2=Fxt});var Vxt,j,d9=b(()=>{"use strict";oc();b3();Vxt=s((e,t)=>{let r=un.parse(e),i={};for(let n in t)t[n]&&(i[n]=r[n]+t[n]);return E2(e,i)},"adjust"),j=Vxt});var zxt,f9,p9=b(()=>{"use strict";oc();k3();zxt=s((e,t,r=50)=>{let{r:i,g:n,b:a,a:o}=un.parse(e),{r:l,g:u,b:h,a:d}=un.parse(t),f=r/100,p=f*2-1,m=o-d,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,x=1-y,k=i*y+l*x,T=n*y+u*x,C=a*y+h*x,_=o*f+d*(1-f);return qi(k,T,C,_)},"mix"),f9=zxt});var Gxt,dt,m9=b(()=>{"use strict";oc();p9();Gxt=s((e,t=100)=>{let r=un.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,f9(r,e,t)},"invert"),dt=Gxt});var g9=b(()=>{"use strict";k3();i9();l9();c9();u9();h9();d9();m9()});var hn=b(()=>{"use strict";g9()});var Ji,tn,bo=b(()=>{"use strict";Ji="#ffffff",tn="#f2f2f2"});var Se,Pa=b(()=>{"use strict";hn();Se=s((e,t)=>t?j(e,{s:-40,l:10}):j(e,{s:-40,l:-10}),"mkBorder")});var C3,y9,x9=b(()=>{"use strict";hn();bo();Pa();C3=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Se(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Se(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||dt(this.tertiaryColor),this.lineColor=this.lineColor||dt(this.background),this.arrowheadColor=this.arrowheadColor||dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||dt(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||_t(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||kt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||kt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||_t(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||_t(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y9=s(e=>{let t=new C3;return t.calculate(e),t},"getThemeVariables")});var S3,b9,k9=b(()=>{"use strict";hn();Pa();S3=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=dt(this.background),this.secondaryBorderColor=Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Se(this.tertiaryColor,this.darkMode),this.primaryTextColor=dt(this.primaryColor),this.secondaryTextColor=dt(this.secondaryColor),this.tertiaryTextColor=dt(this.tertiaryColor),this.lineColor=dt(this.background),this.textColor=dt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(dt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=qi(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=kt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=kt(this.sectionBkgColor,10),this.taskBorderColor=qi(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=qi(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||_t(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||kt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=_t(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=_t(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=_t(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=dt(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330});for(let t=0;t{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b9=s(e=>{let t=new S3;return t.calculate(e),t},"getThemeVariables")});var w3,sl,pp=b(()=>{"use strict";hn();Pa();bo();w3=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=j(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Se(this.tertiaryColor,this.darkMode),this.primaryTextColor=dt(this.primaryColor),this.secondaryTextColor=dt(this.secondaryColor),this.tertiaryTextColor=dt(this.tertiaryColor),this.lineColor=dt(this.background),this.textColor=dt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Se(this.primaryColor,this.darkMode),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.radius=5,this.strokeWidth=1,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.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=qi(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||kt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||kt(this.tertiaryColor,40);for(let t=0;t{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}let r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},sl=s(e=>{let t=new w3;return t.calculate(e),t},"getThemeVariables")});var _3,T9,C9=b(()=>{"use strict";hn();bo();Pa();_3=class{static{s(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=_t("#cde498",10),this.primaryBorderColor=Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Se(this.tertiaryColor,this.darkMode),this.primaryTextColor=dt(this.primaryColor),this.secondaryTextColor=dt(this.secondaryColor),this.tertiaryTextColor=dt(this.primaryColor),this.lineColor=dt(this.background),this.textColor=dt(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=kt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||kt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||kt(this.tertiaryColor,40);for(let t=0;t{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},T9=s(e=>{let t=new _3;return t.calculate(e),t},"getThemeVariables")});var E3,S9,w9=b(()=>{"use strict";hn();Pa();bo();E3=class{static{s(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=_t(this.contrast,55),this.background="#ffffff",this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Se(this.tertiaryColor,this.darkMode),this.primaryTextColor=dt(this.primaryColor),this.secondaryTextColor=dt(this.secondaryColor),this.tertiaryTextColor=dt(this.tertiaryColor),this.lineColor=dt(this.background),this.textColor=dt(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.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||_t(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=_t(this.contrast,55),this.border2=this.contrast,this.actorBorder=_t(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[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},S9=s(e=>{let t=new E3;return t.calculate(e),t},"getThemeVariables")});var v3,_9,E9=b(()=>{"use strict";hn();Pa();bo();v3=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Se(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Se(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Se(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||dt(this.tertiaryColor),this.lineColor=this.lineColor||dt(this.background),this.arrowheadColor=this.arrowheadColor||dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||dt(this.lineColor);let t="#ECECFE",r="#E9E9F1",i=j(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||_t(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||j(t,{h:30}),this.cScale4=this.cScale4||j(t,{h:60}),this.cScale5=this.cScale5||j(t,{h:90}),this.cScale6=this.cScale6||j(t,{h:120}),this.cScale7=this.cScale7||j(t,{h:150}),this.cScale8=this.cScale8||j(t,{h:210,l:150}),this.cScale9=this.cScale9||j(t,{h:270}),this.cScale10=this.cScale10||j(t,{h:300}),this.cScale11=this.cScale11||j(t,{h:330}),this.darkMode)for(let a=0;a{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},_9=s(e=>{let t=new v3;return t.calculate(e),t},"getThemeVariables")});var A3,v9,A9=b(()=>{"use strict";hn();Pa();bo();A3=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=dt(this.background),this.secondaryBorderColor=Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Se(this.tertiaryColor,this.darkMode),this.primaryTextColor=dt(this.primaryColor),this.secondaryTextColor=dt(this.secondaryColor),this.tertiaryTextColor=dt(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(dt("#323D47"),10),this.border1="#ccc",this.border2=qi(255,255,255,.25),this.arrowheadColor=dt(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Se(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Se(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||dt(this.tertiaryColor),this.lineColor=this.lineColor||dt(this.background),this.arrowheadColor=this.arrowheadColor||dt(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.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||dt(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||_t(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},v9=s(e=>{let t=new A3;return t.calculate(e),t},"getThemeVariables")});var R3,R9,L9=b(()=>{"use strict";hn();Pa();bo();R3=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Se("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Se(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Se(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||dt(this.tertiaryColor),this.lineColor=this.lineColor||dt(this.background),this.arrowheadColor=this.arrowheadColor||dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||dt(this.lineColor);let t="#ECECFE",r="#E9E9F1",i=j(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||_t(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let a=0;a{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},R9=s(e=>{let t=new R3;return t.calculate(e),t},"getThemeVariables")});var L3,D9,I9=b(()=>{"use strict";hn();Pa();bo();L3=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=dt(this.background),this.secondaryBorderColor=Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Se(this.tertiaryColor,this.darkMode),this.primaryTextColor=dt(this.primaryColor),this.secondaryTextColor=dt(this.secondaryColor),this.tertiaryTextColor=dt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(dt("#323D47"),10),this.border1="#ccc",this.border2=qi(255,255,255,.25),this.arrowheadColor=dt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Se(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Se(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||dt(this.tertiaryColor),this.lineColor=this.lineColor||dt(this.background),this.arrowheadColor=this.arrowheadColor||dt(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.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||dt(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||_t(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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},D9=s(e=>{let t=new L3;return t.calculate(e),t},"getThemeVariables")});var D3,N9,O9=b(()=>{"use strict";hn();Pa();bo();D3=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Se(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Se(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Se(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||dt(this.tertiaryColor),this.lineColor=this.lineColor||dt(this.background),this.arrowheadColor=this.arrowheadColor||dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||dt(this.lineColor);let t="#ECECFE",r="#E9E9F1",i=j(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||_t(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let a=0;a{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},N9=s(e=>{let t=new D3;return t.calculate(e),t},"getThemeVariables")});var I3,M9,B9=b(()=>{"use strict";hn();Pa();bo();I3=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=dt(this.background),this.secondaryBorderColor=Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Se(this.tertiaryColor,this.darkMode),this.primaryTextColor=dt(this.primaryColor),this.secondaryTextColor=dt(this.secondaryColor),this.tertiaryTextColor=dt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(dt("#323D47"),10),this.border1="#ccc",this.border2=qi(255,255,255,.25),this.arrowheadColor=dt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Se(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Se(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Se(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Se(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||dt(this.tertiaryColor),this.lineColor=this.lineColor||dt(this.background),this.arrowheadColor=this.arrowheadColor||dt(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.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||dt(this.lineColor),this.rootLabelColor="#FFFFFF",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||_t(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let r=0;r{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},M9=s(e=>{let t=new I3;return t.calculate(e),t},"getThemeVariables")});var $a,R2=b(()=>{"use strict";x9();k9();pp();C9();w9();E9();A9();L9();I9();O9();B9();$a={base:{getThemeVariables:y9},dark:{getThemeVariables:b9},default:{getThemeVariables:sl},forest:{getThemeVariables:T9},neutral:{getThemeVariables:S9},neo:{getThemeVariables:_9},"neo-dark":{getThemeVariables:v9},redux:{getThemeVariables:R9},"redux-dark":{getThemeVariables:D9},"redux-color":{getThemeVariables:N9},"redux-dark-color":{getThemeVariables:M9}}});var Bs,P9=b(()=>{"use strict";Bs={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}});var $9,F9,V9,Ue,ps=b(()=>{"use strict";R2();P9();$9={...Bs,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:$a.default.getThemeVariables(),sequence:{...Bs.sequence,messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:s(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:s(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Bs.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Bs.c4,useWidth:void 0,personFont:s(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Bs.flowchart,inheritDir:!1},external_personFont:s(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:s(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:s(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:s(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:s(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:s(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:s(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:s(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:s(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:s(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:s(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:s(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:s(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:s(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:s(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:s(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:s(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:s(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:s(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:s(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Bs.pie,useWidth:984},xyChart:{...Bs.xyChart,useWidth:void 0},requirement:{...Bs.requirement,useWidth:void 0},packet:{...Bs.packet},treeView:{...Bs.treeView,useWidth:void 0},radar:{...Bs.radar},ishikawa:{...Bs.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Bs.venn}},F9=s((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...F9(e[i],"")]:[...r,t+i],[]),"keyify"),V9=new Set(F9($9,"")),Ue=$9});var mp,Wxt,N3=b(()=>{"use strict";ps();Jt();mp=s(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>mp(t));return}for(let t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!V9.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){z.debug("sanitizing object",t),mp(e[t]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=Wxt(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),Wxt=s(e=>{let t=0,r=0;for(let i of e){if(t{"use strict";dp();Jt();R2();ps();N3();cu=Object.freeze(Ue),Kn=s(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ps=Ti({},cu),gp=[],Xy=Ti({},cu),L2=s((e,t)=>{let r=Ti({},e),i={};for(let n of t)j9(n),i=Ti(i,n);if(r=Ti(r,i),i.theme&&i.theme in $a){let n=Ti({},G9),a=Ti(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in $a&&(r.themeVariables=$a[r.theme].getThemeVariables(a))}return Xy=r,Y9(Xy),Xy},"updateCurrentConfig"),O3=s(e=>(Ps=Ti({},cu),Ps=Ti(Ps,e),e.theme&&$a[e.theme]&&(Ps.themeVariables=$a[e.theme].getThemeVariables(e.themeVariables)),L2(Ps,gp),Ps),"setSiteConfig"),W9=s(e=>{G9=Ti({},e)},"saveConfigFromInitialize"),q9=s(e=>(Ps=Ti(Ps,e),L2(Ps,gp),Ps),"updateSiteConfig"),M3=s(()=>Ti({},Ps),"getSiteConfig"),D2=s(e=>(Y9(e),Ti(Xy,e),le()),"setConfig"),le=s(()=>Ti({},Xy),"getConfig"),j9=s(e=>{e&&(["secure",...Ps.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&j9(e[t])}))},"sanitize"),U9=s(e=>{mp(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),gp.push(e),L2(Ps,gp)},"addDirective"),Ky=s((e=Ps)=>{gp=[],L2(e,gp)},"reset"),qxt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},z9={},H9=s(e=>{z9[e]||(z.warn(qxt[e]),z9[e]=!0)},"issueWarning"),Y9=s(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&H9("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ke=s(e=>(e.flowchart?.htmlLabels!=null&&H9("FLOWCHART_HTML_LABELS_DEPRECATED"),Kn(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels")});function ys(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:O2;X9&&X9(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){let a=r(n);a!==n&&(jxt(t)||(t[i]=a),n=a)}e[n]=!0}return e}function Jxt(e){for(let t=0;t0&&arguments[0]!==void 0?arguments[0]:ubt(),t=s(ae=>aF(ae),"DOMPurify");if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==e1.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:u,NodeFilter:h,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:m}=e,g=u.prototype,y=t1(g,"cloneNode"),x=t1(g,"remove"),k=t1(g,"nextSibling"),T=t1(g,"childNodes"),C=t1(g,"parentNode");if(typeof o=="function"){let ae=r.createElement("template");ae.content&&ae.content.ownerDocument&&(r=ae.content.ownerDocument)}let _,S="",{implementation:w,createNodeIterator:A,createDocumentFragment:v,getElementsByTagName:M}=r,{importNode:$}=i,I=rF();t.isSupported=typeof iF=="function"&&typeof C=="function"&&w&&w.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:F,ERB_EXPR:B,TMPLIT_EXPR:O,DATA_ATTR:R,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:E,CUSTOM_ELEMENT:D}=eF,{IS_ALLOWED_URI:V}=eF,L=null,q=br({},[...Q9,...$3,...F3,...V3,...Z9]),H=null,K=br({},[...J9,...z3,...tF,...N2]),U=Object.seal(G3(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}})),st=null,X=null,ut=Object.seal(G3(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ot=!0,mt=!0,ht=!1,it=!0,Ot=!1,St=!0,yt=!1,Et=!1,Ct=!1,Bt=!1,Lt=!1,ee=!1,at=!0,$e=!1,pt="user-content-",Wt=!0,Ht=!1,Dt={},bt=null,Gt=br({},["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"]),G=null,nt=br({},["audio","video","img","source","image","track"]),W=null,Rt=br({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Y="http://www.w3.org/1998/Math/MathML",At="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml",Zt=xt,Nt=!1,wt=null,he=br({},[Y,At,xt],B3),gt=br({},["mi","mo","mn","ms","mtext"]),te=br({},["annotation-xml"]),ne=br({},["title","style","font","a","script"]),It=null,ke=["application/xhtml+xml","text/html"],J="text/html",Xe=null,rt=null,or=r.createElement("form"),Sr=s(function(lt){return lt instanceof RegExp||lt instanceof Function},"isRegexOrFunction"),Dr=s(function(){let lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(rt&&rt===lt)){if((!lt||typeof lt!="object")&&(lt={}),lt=al(lt),It=ke.indexOf(lt.PARSER_MEDIA_TYPE)===-1?J:lt.PARSER_MEDIA_TYPE,Xe=It==="application/xhtml+xml"?B3:O2,L=ko(lt,"ALLOWED_TAGS")?br({},lt.ALLOWED_TAGS,Xe):q,H=ko(lt,"ALLOWED_ATTR")?br({},lt.ALLOWED_ATTR,Xe):K,wt=ko(lt,"ALLOWED_NAMESPACES")?br({},lt.ALLOWED_NAMESPACES,B3):he,W=ko(lt,"ADD_URI_SAFE_ATTR")?br(al(Rt),lt.ADD_URI_SAFE_ATTR,Xe):Rt,G=ko(lt,"ADD_DATA_URI_TAGS")?br(al(nt),lt.ADD_DATA_URI_TAGS,Xe):nt,bt=ko(lt,"FORBID_CONTENTS")?br({},lt.FORBID_CONTENTS,Xe):Gt,st=ko(lt,"FORBID_TAGS")?br({},lt.FORBID_TAGS,Xe):al({}),X=ko(lt,"FORBID_ATTR")?br({},lt.FORBID_ATTR,Xe):al({}),Dt=ko(lt,"USE_PROFILES")?lt.USE_PROFILES:!1,ot=lt.ALLOW_ARIA_ATTR!==!1,mt=lt.ALLOW_DATA_ATTR!==!1,ht=lt.ALLOW_UNKNOWN_PROTOCOLS||!1,it=lt.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ot=lt.SAFE_FOR_TEMPLATES||!1,St=lt.SAFE_FOR_XML!==!1,yt=lt.WHOLE_DOCUMENT||!1,Bt=lt.RETURN_DOM||!1,Lt=lt.RETURN_DOM_FRAGMENT||!1,ee=lt.RETURN_TRUSTED_TYPE||!1,Ct=lt.FORCE_BODY||!1,at=lt.SANITIZE_DOM!==!1,$e=lt.SANITIZE_NAMED_PROPS||!1,Wt=lt.KEEP_CONTENT!==!1,Ht=lt.IN_PLACE||!1,V=lt.ALLOWED_URI_REGEXP||nF,Zt=lt.NAMESPACE||xt,gt=lt.MATHML_TEXT_INTEGRATION_POINTS||gt,te=lt.HTML_INTEGRATION_POINTS||te,U=lt.CUSTOM_ELEMENT_HANDLING||{},lt.CUSTOM_ELEMENT_HANDLING&&Sr(lt.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=lt.CUSTOM_ELEMENT_HANDLING.tagNameCheck),lt.CUSTOM_ELEMENT_HANDLING&&Sr(lt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=lt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),lt.CUSTOM_ELEMENT_HANDLING&&typeof lt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=lt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ot&&(mt=!1),Lt&&(Bt=!0),Dt&&(L=br({},Z9),H=[],Dt.html===!0&&(br(L,Q9),br(H,J9)),Dt.svg===!0&&(br(L,$3),br(H,z3),br(H,N2)),Dt.svgFilters===!0&&(br(L,F3),br(H,z3),br(H,N2)),Dt.mathMl===!0&&(br(L,V3),br(H,tF),br(H,N2))),lt.ADD_TAGS&&(typeof lt.ADD_TAGS=="function"?ut.tagCheck=lt.ADD_TAGS:(L===q&&(L=al(L)),br(L,lt.ADD_TAGS,Xe))),lt.ADD_ATTR&&(typeof lt.ADD_ATTR=="function"?ut.attributeCheck=lt.ADD_ATTR:(H===K&&(H=al(H)),br(H,lt.ADD_ATTR,Xe))),lt.ADD_URI_SAFE_ATTR&&br(W,lt.ADD_URI_SAFE_ATTR,Xe),lt.FORBID_CONTENTS&&(bt===Gt&&(bt=al(bt)),br(bt,lt.FORBID_CONTENTS,Xe)),lt.ADD_FORBID_CONTENTS&&(bt===Gt&&(bt=al(bt)),br(bt,lt.ADD_FORBID_CONTENTS,Xe)),Wt&&(L["#text"]=!0),yt&&br(L,["html","head","body"]),L.table&&(br(L,["tbody"]),delete st.tbody),lt.TRUSTED_TYPES_POLICY){if(typeof lt.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jy('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof lt.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jy('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=lt.TRUSTED_TYPES_POLICY,S=_.createHTML("")}else _===void 0&&(_=hbt(m,n)),_!==null&&typeof S=="string"&&(S=_.createHTML(""));gs&&gs(lt),rt=lt}},"_parseConfig"),Ie=br({},[...$3,...F3,...tbt]),vr=br({},[...V3,...ebt]),ge=s(function(lt){let Xt=C(lt);(!Xt||!Xt.tagName)&&(Xt={namespaceURI:Zt,tagName:"template"});let oe=O2(lt.tagName),Tr=O2(Xt.tagName);return wt[lt.namespaceURI]?lt.namespaceURI===At?Xt.namespaceURI===xt?oe==="svg":Xt.namespaceURI===Y?oe==="svg"&&(Tr==="annotation-xml"||gt[Tr]):!!Ie[oe]:lt.namespaceURI===Y?Xt.namespaceURI===xt?oe==="math":Xt.namespaceURI===At?oe==="math"&&te[Tr]:!!vr[oe]:lt.namespaceURI===xt?Xt.namespaceURI===At&&!te[Tr]||Xt.namespaceURI===Y&&!gt[Tr]?!1:!vr[oe]&&(ne[oe]||!Ie[oe]):!!(It==="application/xhtml+xml"&&wt[lt.namespaceURI]):!1},"_checkValidNamespace"),se=s(function(lt){Qy(t.removed,{element:lt});try{C(lt).removeChild(lt)}catch{x(lt)}},"_forceRemove"),Oe=s(function(lt,Xt){try{Qy(t.removed,{attribute:Xt.getAttributeNode(lt),from:Xt})}catch{Qy(t.removed,{attribute:null,from:Xt})}if(Xt.removeAttribute(lt),lt==="is")if(Bt||Lt)try{se(Xt)}catch{}else try{Xt.setAttribute(lt,"")}catch{}},"_removeAttribute"),ve=s(function(lt){let Xt=null,oe=null;if(Ct)lt=""+lt;else{let ei=P3(lt,/^[\r\n\t ]+/);oe=ei&&ei[0]}It==="application/xhtml+xml"&&Zt===xt&&(lt=''+lt+"");let Tr=_?_.createHTML(lt):lt;if(Zt===xt)try{Xt=new p().parseFromString(Tr,It)}catch{}if(!Xt||!Xt.documentElement){Xt=w.createDocument(Zt,"template",null);try{Xt.documentElement.innerHTML=Nt?S:Tr}catch{}}let Jr=Xt.body||Xt.documentElement;return lt&&oe&&Jr.insertBefore(r.createTextNode(oe),Jr.childNodes[0]||null),Zt===xt?M.call(Xt,yt?"html":"body")[0]:yt?Xt.documentElement:Jr},"_initDocument"),ue=s(function(lt){return A.call(lt.ownerDocument||lt,lt,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Ge=s(function(lt){return lt instanceof f&&(typeof lt.nodeName!="string"||typeof lt.textContent!="string"||typeof lt.removeChild!="function"||!(lt.attributes instanceof d)||typeof lt.removeAttribute!="function"||typeof lt.setAttribute!="function"||typeof lt.namespaceURI!="string"||typeof lt.insertBefore!="function"||typeof lt.hasChildNodes!="function")},"_isClobbered"),yr=s(function(lt){return typeof l=="function"&< instanceof l},"_isNode");function We(ae,lt,Xt){I2(ae,oe=>{oe.call(t,lt,Xt,rt)})}s(We,"_executeHooks");let Br=s(function(lt){let Xt=null;if(We(I.beforeSanitizeElements,lt,null),Ge(lt))return se(lt),!0;let oe=Xe(lt.nodeName);if(We(I.uponSanitizeElement,lt,{tagName:oe,allowedTags:L}),St&<.hasChildNodes()&&!yr(lt.firstElementChild)&&ms(/<[/\w!]/g,lt.innerHTML)&&ms(/<[/\w!]/g,lt.textContent)||lt.nodeType===e1.progressingInstruction||St&<.nodeType===e1.comment&&ms(/<[/\w]/g,lt.data))return se(lt),!0;if(!(ut.tagCheck instanceof Function&&ut.tagCheck(oe))&&(!L[oe]||st[oe])){if(!st[oe]&&kr(oe)&&(U.tagNameCheck instanceof RegExp&&ms(U.tagNameCheck,oe)||U.tagNameCheck instanceof Function&&U.tagNameCheck(oe)))return!1;if(Wt&&!bt[oe]){let Tr=C(lt)||lt.parentNode,Jr=T(lt)||lt.childNodes;if(Jr&&Tr){let ei=Jr.length;for(let dr=ei-1;dr>=0;--dr){let da=y(Jr[dr],!0);da.__removalCount=(lt.__removalCount||0)+1,Tr.insertBefore(da,k(lt))}}}return se(lt),!0}return lt instanceof u&&!ge(lt)||(oe==="noscript"||oe==="noembed"||oe==="noframes")&&ms(/<\/no(script|embed|frames)/i,lt.innerHTML)?(se(lt),!0):(Ot&<.nodeType===e1.text&&(Xt=lt.textContent,I2([F,B,O],Tr=>{Xt=Zy(Xt,Tr," ")}),lt.textContent!==Xt&&(Qy(t.removed,{element:lt.cloneNode()}),lt.textContent=Xt)),We(I.afterSanitizeElements,lt,null),!1)},"_sanitizeElements"),Kr=s(function(lt,Xt,oe){if(at&&(Xt==="id"||Xt==="name")&&(oe in r||oe in or))return!1;if(!(mt&&!X[Xt]&&ms(R,Xt))){if(!(ot&&ms(N,Xt))){if(!(ut.attributeCheck instanceof Function&&ut.attributeCheck(Xt,lt))){if(!H[Xt]||X[Xt]){if(!(kr(lt)&&(U.tagNameCheck instanceof RegExp&&ms(U.tagNameCheck,lt)||U.tagNameCheck instanceof Function&&U.tagNameCheck(lt))&&(U.attributeNameCheck instanceof RegExp&&ms(U.attributeNameCheck,Xt)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(Xt,lt))||Xt==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&ms(U.tagNameCheck,oe)||U.tagNameCheck instanceof Function&&U.tagNameCheck(oe))))return!1}else if(!W[Xt]){if(!ms(V,Zy(oe,E,""))){if(!((Xt==="src"||Xt==="xlink:href"||Xt==="href")&<!=="script"&&Kxt(oe,"data:")===0&&G[lt])){if(!(ht&&!ms(P,Zy(oe,E,"")))){if(oe)return!1}}}}}}}return!0},"_isValidAttribute"),kr=s(function(lt){return lt!=="annotation-xml"&&P3(lt,D)},"_isBasicCustomElement"),Gr=s(function(lt){We(I.beforeSanitizeAttributes,lt,null);let{attributes:Xt}=lt;if(!Xt||Ge(lt))return;let oe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0},Tr=Xt.length;for(;Tr--;){let Jr=Xt[Tr],{name:ei,namespaceURI:dr,value:da}=Jr,ou=Xe(ei),qh=da,oi=ei==="value"?qh:Qxt(qh);if(oe.attrName=ou,oe.attrValue=oi,oe.keepAttr=!0,oe.forceKeepAttr=void 0,We(I.uponSanitizeAttribute,lt,oe),oi=oe.attrValue,$e&&(ou==="id"||ou==="name")&&(Oe(ei,lt),oi=pt+oi),St&&ms(/((--!?|])>)|<\/(style|title|textarea)/i,oi)){Oe(ei,lt);continue}if(ou==="attributename"&&P3(oi,"href")){Oe(ei,lt);continue}if(oe.forceKeepAttr)continue;if(!oe.keepAttr){Oe(ei,lt);continue}if(!it&&ms(/\/>/i,oi)){Oe(ei,lt);continue}Ot&&I2([F,B,O],Ne=>{oi=Zy(oi,Ne," ")});let Ce=Xe(lt.nodeName);if(!Kr(Ce,ou,oi)){Oe(ei,lt);continue}if(_&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!dr)switch(m.getAttributeType(Ce,ou)){case"TrustedHTML":{oi=_.createHTML(oi);break}case"TrustedScriptURL":{oi=_.createScriptURL(oi);break}}if(oi!==qh)try{dr?lt.setAttributeNS(dr,ei,oi):lt.setAttribute(ei,oi),Ge(lt)?se(lt):K9(t.removed)}catch{Oe(ei,lt)}}We(I.afterSanitizeAttributes,lt,null)},"_sanitizeAttributes"),Xn=s(function ae(lt){let Xt=null,oe=ue(lt);for(We(I.beforeSanitizeShadowDOM,lt,null);Xt=oe.nextNode();)We(I.uponSanitizeShadowNode,Xt,null),Br(Xt),Gr(Xt),Xt.content instanceof a&&ae(Xt.content);We(I.afterSanitizeShadowDOM,lt,null)},"_sanitizeShadowDOM");return t.sanitize=function(ae){let lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xt=null,oe=null,Tr=null,Jr=null;if(Nt=!ae,Nt&&(ae=""),typeof ae!="string"&&!yr(ae))if(typeof ae.toString=="function"){if(ae=ae.toString(),typeof ae!="string")throw Jy("dirty is not a string, aborting")}else throw Jy("toString is not a function");if(!t.isSupported)return ae;if(Et||Dr(lt),t.removed=[],typeof ae=="string"&&(Ht=!1),Ht){if(ae.nodeName){let da=Xe(ae.nodeName);if(!L[da]||st[da])throw Jy("root node is forbidden and cannot be sanitized in-place")}}else if(ae instanceof l)Xt=ve(""),oe=Xt.ownerDocument.importNode(ae,!0),oe.nodeType===e1.element&&oe.nodeName==="BODY"||oe.nodeName==="HTML"?Xt=oe:Xt.appendChild(oe);else{if(!Bt&&!Ot&&!yt&&ae.indexOf("<")===-1)return _&&ee?_.createHTML(ae):ae;if(Xt=ve(ae),!Xt)return Bt?null:ee?S:""}Xt&&Ct&&se(Xt.firstChild);let ei=ue(Ht?ae:Xt);for(;Tr=ei.nextNode();)Br(Tr),Gr(Tr),Tr.content instanceof a&&Xn(Tr.content);if(Ht)return ae;if(Bt){if(Lt)for(Jr=v.call(Xt.ownerDocument);Xt.firstChild;)Jr.appendChild(Xt.firstChild);else Jr=Xt;return(H.shadowroot||H.shadowrootmode)&&(Jr=$.call(i,Jr,!0)),Jr}let dr=yt?Xt.outerHTML:Xt.innerHTML;return yt&&L["!doctype"]&&Xt.ownerDocument&&Xt.ownerDocument.doctype&&Xt.ownerDocument.doctype.name&&ms(sF,Xt.ownerDocument.doctype.name)&&(dr=" +`+dr),Ot&&I2([F,B,O],da=>{dr=Zy(dr,da," ")}),_&&ee?_.createHTML(dr):dr},t.setConfig=function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dr(ae),Et=!0},t.clearConfig=function(){rt=null,Et=!1},t.isValidAttribute=function(ae,lt,Xt){rt||Dr({});let oe=Xe(ae),Tr=Xe(lt);return Kr(oe,Tr,Xt)},t.addHook=function(ae,lt){typeof lt=="function"&&Qy(I[ae],lt)},t.removeHook=function(ae,lt){if(lt!==void 0){let Xt=Yxt(I[ae],lt);return Xt===-1?void 0:Xxt(I[ae],Xt,1)[0]}return K9(I[ae])},t.removeHooks=function(ae){I[ae]=[]},t.removeAllHooks=function(){I=rF()},t}var iF,X9,jxt,Uxt,Hxt,gs,Fa,G3,W3,q3,I2,Yxt,K9,Qy,Xxt,O2,B3,P3,Zy,Kxt,Qxt,ko,ms,Jy,Q9,$3,F3,tbt,V3,ebt,Z9,J9,z3,tF,N2,rbt,ibt,nbt,sbt,abt,nF,obt,lbt,sF,cbt,eF,e1,ubt,hbt,rF,Va,r1=b(()=>{"use strict";({entries:iF,setPrototypeOf:X9,isFrozen:jxt,getPrototypeOf:Uxt,getOwnPropertyDescriptor:Hxt}=Object),{freeze:gs,seal:Fa,create:G3}=Object,{apply:W3,construct:q3}=typeof Reflect<"u"&&Reflect;gs||(gs=s(function(t){return t},"freeze"));Fa||(Fa=s(function(t){return t},"seal"));W3||(W3=s(function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a1?r-1:0),n=1;n/gm),nbt=Fa(/\$\{[\w\W]*/gm),sbt=Fa(/^data-[\-\w.\u00B7-\uFFFF]+$/),abt=Fa(/^aria-[\-\w]+$/),nF=Fa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),obt=Fa(/^(?:\w+script|data):/i),lbt=Fa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sF=Fa(/^html$/i),cbt=Fa(/^[a-z][.\w]*(-[.\w]+)+$/i),eF=Object.freeze({__proto__:null,ARIA_ATTR:abt,ATTR_WHITESPACE:lbt,CUSTOM_ELEMENT:cbt,DATA_ATTR:sbt,DOCTYPE_NAME:sF,ERB_EXPR:ibt,IS_ALLOWED_URI:nF,IS_SCRIPT_OR_DATA:obt,MUSTACHE_EXPR:rbt,TMPLIT_EXPR:nbt}),e1={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ubt=s(function(){return typeof window>"u"?null:window},"getGlobal"),hbt=s(function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));let a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},"_createTrustedTypesPolicy"),rF=s(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap");s(aF,"createDOMPurify");Va=aF()});function pbt(){let e="data-temp-href-target";Va.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Va.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}var yp,dbt,fbt,lF,oF,nr,mbt,gbt,ybt,xbt,cF,Kh,bbt,kbt,ol,j3,Tbt,Cbt,Sbt,U3,Ci,Qh,wbt,xp,qt,fr=b(()=>{"use strict";r1();Qe();yp=//gi,dbt=s(e=>e?cF(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),fbt=(()=>{let e=!1;return()=>{e||(pbt(),e=!0)}})();s(pbt,"setupDompurifyHooks");lF=s(e=>(fbt(),Va.sanitize(e)),"removeScript"),oF=s((e,t)=>{if(Ke(t)){let r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=lF(e):r!=="loose"&&(e=cF(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=xbt(e))}return e},"sanitizeMore"),nr=s((e,t)=>e&&(t.dompurifyConfig?e=Va.sanitize(oF(e,t),t.dompurifyConfig).toString():e=Va.sanitize(oF(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),mbt=s((e,t)=>typeof e=="string"?nr(e,t):e.flat().map(r=>nr(r,t)),"sanitizeTextOrArray"),gbt=s(e=>yp.test(e),"hasBreaks"),ybt=s(e=>e.split(yp),"splitBreaks"),xbt=s(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),cF=s(e=>e.replace(yp,"#br#"),"breakToPlaceholder"),Kh=s(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),bbt=s(function(...e){let t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),kbt=s(function(...e){let t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ol=s(function(e){let t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),Tbt=s((e,t)=>{let r=j3(e,"~"),i=j3(t,"~");return r===1&&i===1},"shouldCombineSets"),Cbt=s(e=>{let t=j3(e,"~"),r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let i=[...e],n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Sbt=s(()=>window.MathMLElement!==void 0,"isMathMLSupported"),U3=/\$\$(.*)\$\$/g,Ci=s(e=>(e.match(U3)?.length??0)>0,"hasKatex"),Qh=s(async(e,t)=>{let r=document.createElement("div");r.innerHTML=await xp(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),wbt=s(async(e,t)=>Ci(e)?Sbt()||t.legacyMathML||t.forceLegacyMathML?e.replace(U3,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library."):e.replace(U3,"MathML is unsupported in this environment."):e,"renderKatexUnsanitized"),xp=s(async(e,t)=>nr(await wbt(e,t),t),"renderKatexSanitized"),qt={getRows:dbt,sanitizeText:nr,sanitizeTextOrArray:mbt,hasBreaks:gbt,splitBreaks:ybt,lineBreakRegex:yp,removeScript:lF,getUrl:Kh,evaluate:Kn,getMax:bbt,getMin:kbt}});var _bt,H3,uF,hF,dF,fF,ll,Zh=b(()=>{"use strict";V$();Qe();fr();Jt();_bt={body:'?',height:80,width:80},H3=new Map,uF=new Map,hF=s(e=>{for(let t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(z.debug("Registering icon pack:",t.name),"loader"in t)uF.set(t.name,t.loader);else if("icons"in t)H3.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),dF=s(async(e,t)=>{let r=s3(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);let i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=H3.get(i);if(!n){let o=uF.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},H3.set(i,n)}catch(l){throw z.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=o3(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),fF=s(async e=>{try{return await dF(e),!0}catch{return!1}},"isIconAvailable"),ll=s(async(e,t,r)=>{let i;try{i=await dF(e,t?.fallbackPrefix)}catch(o){z.error(o),i=_bt}let n=c3(i,t),a=h3(u3(n.body),{...n.attributes,...r});return nr(a,le())},"getIconSVG")});function M2(e){for(var t=[],r=1;r{"use strict";s(M2,"dedent")});var B2,Jh,pF,P2=b(()=>{"use strict";B2=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Jh=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,pF=/\s*%%.*\n/gm});var bp,X3=b(()=>{"use strict";bp=class extends Error{static{s(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}});var cc,kp,$2,K3,mF,td=b(()=>{"use strict";Jt();P2();X3();cc={},kp=s(function(e,t){e=e.replace(B2,"").replace(Jh,"").replace(pF,` +`);for(let[r,{detector:i}]of Object.entries(cc))if(i(e,t))return r;throw new bp(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),$2=s((...e)=>{for(let{id:t,detector:r,loader:i}of e)K3(t,r,i)},"registerLazyLoadedDiagrams"),K3=s((e,t,r)=>{cc[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),cc[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),mF=s(e=>cc[e].loader,"getDiagramLoader")});var i1,gF,Q3=b(()=>{"use strict";i1=(function(){var e=s(function(pt,Wt,Ht,Dt){for(Ht=Ht||{},Dt=pt.length;Dt--;Ht[pt[Dt]]=Wt);return Ht},"o"),t=[1,24],r=[1,25],i=[1,26],n=[1,27],a=[1,28],o=[1,63],l=[1,64],u=[1,65],h=[1,66],d=[1,67],f=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],x=[1,32],k=[1,33],T=[1,34],C=[1,35],_=[1,36],S=[1,37],w=[1,38],A=[1,39],v=[1,40],M=[1,41],$=[1,42],I=[1,43],F=[1,44],B=[1,45],O=[1,46],R=[1,47],N=[1,48],P=[1,50],E=[1,51],D=[1,52],V=[1,53],L=[1,54],q=[1,55],H=[1,56],K=[1,57],U=[1,58],st=[1,59],X=[1,60],ut=[14,42],ot=[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],mt=[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],ht=[1,82],it=[1,83],Ot=[1,84],St=[1,85],yt=[12,14,42],Et=[12,14,33,42],Ct=[12,14,33,42,76,77,79,80],Bt=[12,33],Lt=[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],ee={trace:s(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:s(function(Wt,Ht,Dt,bt,Gt,G,nt){var W=G.length-1;switch(Gt){case 3:bt.setDirection("TB");break;case 4:bt.setDirection("BT");break;case 5:bt.setDirection("RL");break;case 6:bt.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:bt.setC4Type(G[W-3]);break;case 19:bt.setTitle(G[W].substring(6)),this.$=G[W].substring(6);break;case 20:bt.setAccDescription(G[W].substring(15)),this.$=G[W].substring(15);break;case 21:this.$=G[W].trim(),bt.setTitle(this.$);break;case 22:case 23:this.$=G[W].trim(),bt.setAccDescription(this.$);break;case 28:G[W].splice(2,0,"ENTERPRISE"),bt.addPersonOrSystemBoundary(...G[W]),this.$=G[W];break;case 29:G[W].splice(2,0,"SYSTEM"),bt.addPersonOrSystemBoundary(...G[W]),this.$=G[W];break;case 30:bt.addPersonOrSystemBoundary(...G[W]),this.$=G[W];break;case 31:G[W].splice(2,0,"CONTAINER"),bt.addContainerBoundary(...G[W]),this.$=G[W];break;case 32:bt.addDeploymentNode("node",...G[W]),this.$=G[W];break;case 33:bt.addDeploymentNode("nodeL",...G[W]),this.$=G[W];break;case 34:bt.addDeploymentNode("nodeR",...G[W]),this.$=G[W];break;case 35:bt.popBoundaryParseStack();break;case 39:bt.addPersonOrSystem("person",...G[W]),this.$=G[W];break;case 40:bt.addPersonOrSystem("external_person",...G[W]),this.$=G[W];break;case 41:bt.addPersonOrSystem("system",...G[W]),this.$=G[W];break;case 42:bt.addPersonOrSystem("system_db",...G[W]),this.$=G[W];break;case 43:bt.addPersonOrSystem("system_queue",...G[W]),this.$=G[W];break;case 44:bt.addPersonOrSystem("external_system",...G[W]),this.$=G[W];break;case 45:bt.addPersonOrSystem("external_system_db",...G[W]),this.$=G[W];break;case 46:bt.addPersonOrSystem("external_system_queue",...G[W]),this.$=G[W];break;case 47:bt.addContainer("container",...G[W]),this.$=G[W];break;case 48:bt.addContainer("container_db",...G[W]),this.$=G[W];break;case 49:bt.addContainer("container_queue",...G[W]),this.$=G[W];break;case 50:bt.addContainer("external_container",...G[W]),this.$=G[W];break;case 51:bt.addContainer("external_container_db",...G[W]),this.$=G[W];break;case 52:bt.addContainer("external_container_queue",...G[W]),this.$=G[W];break;case 53:bt.addComponent("component",...G[W]),this.$=G[W];break;case 54:bt.addComponent("component_db",...G[W]),this.$=G[W];break;case 55:bt.addComponent("component_queue",...G[W]),this.$=G[W];break;case 56:bt.addComponent("external_component",...G[W]),this.$=G[W];break;case 57:bt.addComponent("external_component_db",...G[W]),this.$=G[W];break;case 58:bt.addComponent("external_component_queue",...G[W]),this.$=G[W];break;case 60:bt.addRel("rel",...G[W]),this.$=G[W];break;case 61:bt.addRel("birel",...G[W]),this.$=G[W];break;case 62:bt.addRel("rel_u",...G[W]),this.$=G[W];break;case 63:bt.addRel("rel_d",...G[W]),this.$=G[W];break;case 64:bt.addRel("rel_l",...G[W]),this.$=G[W];break;case 65:bt.addRel("rel_r",...G[W]),this.$=G[W];break;case 66:bt.addRel("rel_b",...G[W]),this.$=G[W];break;case 67:G[W].splice(0,1),bt.addRel("rel",...G[W]),this.$=G[W];break;case 68:bt.updateElStyle("update_el_style",...G[W]),this.$=G[W];break;case 69:bt.updateRelStyle("update_rel_style",...G[W]),this.$=G[W];break;case 70:bt.updateLayoutConfig("update_layout_config",...G[W]),this.$=G[W];break;case 71:this.$=[G[W]];break;case 72:G[W].unshift(G[W-1]),this.$=G[W];break;case 73:case 75:this.$=G[W].trim();break;case 74:let Rt={};Rt[G[W-1].trim()]=G[W].trim(),this.$=Rt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:k,49:T,50:C,51:_,52:S,53:w,54:A,55:v,56:M,57:$,58:I,59:F,60:B,61:O,62:R,63:N,64:P,65:E,66:D,67:V,68:L,69:q,70:H,71:K,72:U,73:st,74:X},{13:70,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:k,49:T,50:C,51:_,52:S,53:w,54:A,55:v,56:M,57:$,58:I,59:F,60:B,61:O,62:R,63:N,64:P,65:E,66:D,67:V,68:L,69:q,70:H,71:K,72:U,73:st,74:X},{13:71,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:k,49:T,50:C,51:_,52:S,53:w,54:A,55:v,56:M,57:$,58:I,59:F,60:B,61:O,62:R,63:N,64:P,65:E,66:D,67:V,68:L,69:q,70:H,71:K,72:U,73:st,74:X},{13:72,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:k,49:T,50:C,51:_,52:S,53:w,54:A,55:v,56:M,57:$,58:I,59:F,60:B,61:O,62:R,63:N,64:P,65:E,66:D,67:V,68:L,69:q,70:H,71:K,72:U,73:st,74:X},{13:73,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:k,49:T,50:C,51:_,52:S,53:w,54:A,55:v,56:M,57:$,58:I,59:F,60:B,61:O,62:R,63:N,64:P,65:E,66:D,67:V,68:L,69:q,70:H,71:K,72:U,73:st,74:X},{14:[1,74]},e(ut,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:u,38:h,39:d,40:f,41:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C,51:_,52:S,53:w,54:A,55:v,56:M,57:$,58:I,59:F,60:B,61:O,62:R,63:N,64:P,65:E,66:D,67:V,68:L,69:q,70:H,71:K,72:U,73:st,74:X}),e(ut,[2,14]),e(ot,[2,16],{12:[1,76]}),e(ut,[2,36],{12:[1,77]}),e(mt,[2,19]),e(mt,[2,20]),{25:[1,78]},{27:[1,79]},e(mt,[2,23]),{35:80,75:81,76:ht,77:it,79:Ot,80:St},{35:86,75:81,76:ht,77:it,79:Ot,80:St},{35:87,75:81,76:ht,77:it,79:Ot,80:St},{35:88,75:81,76:ht,77:it,79:Ot,80:St},{35:89,75:81,76:ht,77:it,79:Ot,80:St},{35:90,75:81,76:ht,77:it,79:Ot,80:St},{35:91,75:81,76:ht,77:it,79:Ot,80:St},{35:92,75:81,76:ht,77:it,79:Ot,80:St},{35:93,75:81,76:ht,77:it,79:Ot,80:St},{35:94,75:81,76:ht,77:it,79:Ot,80:St},{35:95,75:81,76:ht,77:it,79:Ot,80:St},{35:96,75:81,76:ht,77:it,79:Ot,80:St},{35:97,75:81,76:ht,77:it,79:Ot,80:St},{35:98,75:81,76:ht,77:it,79:Ot,80:St},{35:99,75:81,76:ht,77:it,79:Ot,80:St},{35:100,75:81,76:ht,77:it,79:Ot,80:St},{35:101,75:81,76:ht,77:it,79:Ot,80:St},{35:102,75:81,76:ht,77:it,79:Ot,80:St},{35:103,75:81,76:ht,77:it,79:Ot,80:St},{35:104,75:81,76:ht,77:it,79:Ot,80:St},e(yt,[2,59]),{35:105,75:81,76:ht,77:it,79:Ot,80:St},{35:106,75:81,76:ht,77:it,79:Ot,80:St},{35:107,75:81,76:ht,77:it,79:Ot,80:St},{35:108,75:81,76:ht,77:it,79:Ot,80:St},{35:109,75:81,76:ht,77:it,79:Ot,80:St},{35:110,75:81,76:ht,77:it,79:Ot,80:St},{35:111,75:81,76:ht,77:it,79:Ot,80:St},{35:112,75:81,76:ht,77:it,79:Ot,80:St},{35:113,75:81,76:ht,77:it,79:Ot,80:St},{35:114,75:81,76:ht,77:it,79:Ot,80:St},{35:115,75:81,76:ht,77:it,79:Ot,80:St},{20:116,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:k,49:T,50:C,51:_,52:S,53:w,54:A,55:v,56:M,57:$,58:I,59:F,60:B,61:O,62:R,63:N,64:P,65:E,66:D,67:V,68:L,69:q,70:H,71:K,72:U,73:st,74:X},{12:[1,118],33:[1,117]},{35:119,75:81,76:ht,77:it,79:Ot,80:St},{35:120,75:81,76:ht,77:it,79:Ot,80:St},{35:121,75:81,76:ht,77:it,79:Ot,80:St},{35:122,75:81,76:ht,77:it,79:Ot,80:St},{35:123,75:81,76:ht,77:it,79:Ot,80:St},{35:124,75:81,76:ht,77:it,79:Ot,80:St},{35:125,75:81,76:ht,77:it,79:Ot,80:St},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ut,[2,15]),e(ot,[2,17],{21:22,19:130,22:t,23:r,24:i,26:n,28:a}),e(ut,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:i,26:n,28:a,34:o,36:l,37:u,38:h,39:d,40:f,41:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C,51:_,52:S,53:w,54:A,55:v,56:M,57:$,58:I,59:F,60:B,61:O,62:R,63:N,64:P,65:E,66:D,67:V,68:L,69:q,70:H,71:K,72:U,73:st,74:X}),e(mt,[2,21]),e(mt,[2,22]),e(yt,[2,39]),e(Et,[2,71],{75:81,35:132,76:ht,77:it,79:Ot,80:St}),e(Ct,[2,73]),{78:[1,133]},e(Ct,[2,75]),e(Ct,[2,76]),e(yt,[2,40]),e(yt,[2,41]),e(yt,[2,42]),e(yt,[2,43]),e(yt,[2,44]),e(yt,[2,45]),e(yt,[2,46]),e(yt,[2,47]),e(yt,[2,48]),e(yt,[2,49]),e(yt,[2,50]),e(yt,[2,51]),e(yt,[2,52]),e(yt,[2,53]),e(yt,[2,54]),e(yt,[2,55]),e(yt,[2,56]),e(yt,[2,57]),e(yt,[2,58]),e(yt,[2,60]),e(yt,[2,61]),e(yt,[2,62]),e(yt,[2,63]),e(yt,[2,64]),e(yt,[2,65]),e(yt,[2,66]),e(yt,[2,67]),e(yt,[2,68]),e(yt,[2,69]),e(yt,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(Bt,[2,28]),e(Bt,[2,29]),e(Bt,[2,30]),e(Bt,[2,31]),e(Bt,[2,32]),e(Bt,[2,33]),e(Bt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(ot,[2,18]),e(ut,[2,38]),e(Et,[2,72]),e(Ct,[2,74]),e(yt,[2,24]),e(yt,[2,35]),e(Lt,[2,25]),e(Lt,[2,26],{12:[1,138]}),e(Lt,[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:s(function(Wt,Ht){if(Ht.recoverable)this.trace(Wt);else{var Dt=new Error(Wt);throw Dt.hash=Ht,Dt}},"parseError"),parse:s(function(Wt){var Ht=this,Dt=[0],bt=[],Gt=[null],G=[],nt=this.table,W="",Rt=0,Y=0,At=0,xt=2,Zt=1,Nt=G.slice.call(arguments,1),wt=Object.create(this.lexer),he={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(he.yy[gt]=this.yy[gt]);wt.setInput(Wt,he.yy),he.yy.lexer=wt,he.yy.parser=this,typeof wt.yylloc>"u"&&(wt.yylloc={});var te=wt.yylloc;G.push(te);var ne=wt.options&&wt.options.ranges;typeof he.yy.parseError=="function"?this.parseError=he.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function It(ue){Dt.length=Dt.length-2*ue,Gt.length=Gt.length-ue,G.length=G.length-ue}s(It,"popStack");function ke(){var ue;return ue=bt.pop()||wt.lex()||Zt,typeof ue!="number"&&(ue instanceof Array&&(bt=ue,ue=bt.pop()),ue=Ht.symbols_[ue]||ue),ue}s(ke,"lex");for(var J,Xe,rt,or,Sr,Dr,Ie={},vr,ge,se,Oe;;){if(rt=Dt[Dt.length-1],this.defaultActions[rt]?or=this.defaultActions[rt]:((J===null||typeof J>"u")&&(J=ke()),or=nt[rt]&&nt[rt][J]),typeof or>"u"||!or.length||!or[0]){var ve="";Oe=[];for(vr in nt[rt])this.terminals_[vr]&&vr>xt&&Oe.push("'"+this.terminals_[vr]+"'");wt.showPosition?ve="Parse error on line "+(Rt+1)+`: +`+wt.showPosition()+` +Expecting `+Oe.join(", ")+", got '"+(this.terminals_[J]||J)+"'":ve="Parse error on line "+(Rt+1)+": Unexpected "+(J==Zt?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(ve,{text:wt.match,token:this.terminals_[J]||J,line:wt.yylineno,loc:te,expected:Oe})}if(or[0]instanceof Array&&or.length>1)throw new Error("Parse Error: multiple actions possible at state: "+rt+", token: "+J);switch(or[0]){case 1:Dt.push(J),Gt.push(wt.yytext),G.push(wt.yylloc),Dt.push(or[1]),J=null,Xe?(J=Xe,Xe=null):(Y=wt.yyleng,W=wt.yytext,Rt=wt.yylineno,te=wt.yylloc,At>0&&At--);break;case 2:if(ge=this.productions_[or[1]][1],Ie.$=Gt[Gt.length-ge],Ie._$={first_line:G[G.length-(ge||1)].first_line,last_line:G[G.length-1].last_line,first_column:G[G.length-(ge||1)].first_column,last_column:G[G.length-1].last_column},ne&&(Ie._$.range=[G[G.length-(ge||1)].range[0],G[G.length-1].range[1]]),Dr=this.performAction.apply(Ie,[W,Y,Rt,he.yy,or[1],Gt,G].concat(Nt)),typeof Dr<"u")return Dr;ge&&(Dt=Dt.slice(0,-1*ge*2),Gt=Gt.slice(0,-1*ge),G=G.slice(0,-1*ge)),Dt.push(this.productions_[or[1]][0]),Gt.push(Ie.$),G.push(Ie._$),se=nt[Dt[Dt.length-2]][Dt[Dt.length-1]],Dt.push(se);break;case 3:return!0}}return!0},"parse")},at=(function(){var pt={EOF:1,parseError:s(function(Ht,Dt){if(this.yy.parser)this.yy.parser.parseError(Ht,Dt);else throw new Error(Ht)},"parseError"),setInput:s(function(Wt,Ht){return this.yy=Ht||this.yy||{},this._input=Wt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var Wt=this._input[0];this.yytext+=Wt,this.yyleng++,this.offset++,this.match+=Wt,this.matched+=Wt;var Ht=Wt.match(/(?:\r\n?|\n).*/g);return Ht?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Wt},"input"),unput:s(function(Wt){var Ht=Wt.length,Dt=Wt.split(/(?:\r\n?|\n)/g);this._input=Wt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ht),this.offset-=Ht;var bt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Dt.length-1&&(this.yylineno-=Dt.length-1);var Gt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Dt?(Dt.length===bt.length?this.yylloc.first_column:0)+bt[bt.length-Dt.length].length-Dt[0].length:this.yylloc.first_column-Ht},this.options.ranges&&(this.yylloc.range=[Gt[0],Gt[0]+this.yyleng-Ht]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(Wt){this.unput(this.match.slice(Wt))},"less"),pastInput:s(function(){var Wt=this.matched.substr(0,this.matched.length-this.match.length);return(Wt.length>20?"...":"")+Wt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Wt=this.match;return Wt.length<20&&(Wt+=this._input.substr(0,20-Wt.length)),(Wt.substr(0,20)+(Wt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Wt=this.pastInput(),Ht=new Array(Wt.length+1).join("-");return Wt+this.upcomingInput()+` +`+Ht+"^"},"showPosition"),test_match:s(function(Wt,Ht){var Dt,bt,Gt;if(this.options.backtrack_lexer&&(Gt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Gt.yylloc.range=this.yylloc.range.slice(0))),bt=Wt[0].match(/(?:\r\n?|\n).*/g),bt&&(this.yylineno+=bt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:bt?bt[bt.length-1].length-bt[bt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Wt[0].length},this.yytext+=Wt[0],this.match+=Wt[0],this.matches=Wt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Wt[0].length),this.matched+=Wt[0],Dt=this.performAction.call(this,this.yy,this,Ht,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Dt)return Dt;if(this._backtrack){for(var G in Gt)this[G]=Gt[G];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Wt,Ht,Dt,bt;this._more||(this.yytext="",this.match="");for(var Gt=this._currentRules(),G=0;GHt[0].length)){if(Ht=Dt,bt=G,this.options.backtrack_lexer){if(Wt=this.test_match(Dt,Gt[G]),Wt!==!1)return Wt;if(this._backtrack){Ht=!1;continue}else return!1}else if(!this.options.flex)break}return Ht?(Wt=this.test_match(Ht,Gt[bt]),Wt!==!1?Wt:!1):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:s(function(){var Ht=this.next();return Ht||this.lex()},"lex"),begin:s(function(Ht){this.conditionStack.push(Ht)},"begin"),popState:s(function(){var Ht=this.conditionStack.length-1;return Ht>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(Ht){return Ht=this.conditionStack.length-1-Math.abs(Ht||0),Ht>=0?this.conditionStack[Ht]:"INITIAL"},"topState"),pushState:s(function(Ht){this.begin(Ht)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(Ht,Dt,bt,Gt){var G=Gt;switch(bt){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return pt})();ee.lexer=at;function $e(){this.yy={}}return s($e,"Parser"),$e.prototype=ee,ee.Parser=$e,new $e})();i1.parser=i1;gF=i1});var Ebt,vbt,pr,cl,gi=b(()=>{"use strict";Jt();Ebt=s(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),vbt=s(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),pr=s(function(e,t,r,i){let n=vbt(t,r,i);Ebt(e,n)},"configureSvgSize"),cl=s(function(e,t,r,i){let n=t.node().getBBox(),a=n.width,o=n.height;z.info(`SVG bounds: ${a}x${o}`,n);let l=0,u=0;z.info(`Graph bounds: ${l}x${u}`,e),l=a+r*2,u=o+r*2,z.info(`Calculated bounds: ${l}x${u}`),pr(t,u,l,i);let h=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox")});var F2,Abt,yF,xF,Z3=b(()=>{"use strict";Jt();F2={},Abt=s((e,t,r,i)=>{let n="";return e in F2&&F2[e]?n=F2[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: ${r.strokeWidth??1}px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${n} + .node .neo-node { + stroke: ${r.nodeBorder}; + } + + [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + + [data-look="neo"].node path { + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + stroke-width: ${r.strokeWidth??1}px; + } + + [data-look="neo"].node .outer-path { + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${r.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + ${t} +`},"getStyles"),yF=s((e,t)=>{t!==void 0&&(F2[e]=t)},"addStylesForDiagram"),xF=Abt});var n1={};Fe(n1,{clear:()=>He,getAccDescription:()=>tr,getAccTitle:()=>Ze,getDiagramTitle:()=>er,setAccDescription:()=>Je,setAccTitle:()=>Ye,setDiagramTitle:()=>sr});var J3,tA,eA,rA,He,Ye,Ze,Je,tr,sr,er,yi=b(()=>{"use strict";fr();Qe();J3="",tA="",eA="",rA=s(e=>nr(e,le()),"sanitizeText"),He=s(()=>{J3="",eA="",tA=""},"clear"),Ye=s(e=>{J3=rA(e).replace(/^\s+/g,"")},"setAccTitle"),Ze=s(()=>J3,"getAccTitle"),Je=s(e=>{eA=rA(e).replace(/\n\s+/g,` +`)},"setAccDescription"),tr=s(()=>eA,"getAccDescription"),sr=s(e=>{tA=rA(e)},"setDiagramTitle"),er=s(()=>tA,"getDiagramTitle")});var bF,Rbt,Q,s1,z2,a1,nA,Lbt,V2,ed,o1,iA,ye=b(()=>{"use strict";td();Jt();Qe();fr();gi();Z3();yi();bF=z,Rbt=qy,Q=le,s1=D2,z2=cu,a1=s(e=>nr(e,Q()),"sanitizeText"),nA=cl,Lbt=s(()=>n1,"getCommonDb"),V2={},ed=s((e,t,r)=>{V2[e]&&bF.warn(`Diagram with id ${e} already registered. Overwriting.`),V2[e]=t,r&&K3(e,r),yF(e,t.styles),t.injectUtils?.(bF,Rbt,Q,a1,nA,Lbt(),()=>{})},"registerDiagram"),o1=s(e=>{if(e in V2)return V2[e];throw new iA(e)},"getDiagram"),iA=class extends Error{static{s(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}});var Co,uu,xs,To,ul,l1,sA,aA,G2,W2,kF,Dbt,Ibt,Nbt,Obt,Mbt,Bbt,Pbt,$bt,Fbt,Vbt,zbt,Gbt,Wbt,qbt,jbt,Ubt,Hbt,TF,Ybt,Xbt,CF,Kbt,Qbt,Zbt,Jbt,hu,t2t,e2t,r2t,i2t,n2t,c1,oA=b(()=>{"use strict";ye();fr();yi();Co=[],uu=[""],xs="global",To="",ul=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],l1=[],sA="",aA=!1,G2=4,W2=2,Dbt=s(function(){return kF},"getC4Type"),Ibt=s(function(e){kF=nr(e,Q())},"setC4Type"),Nbt=s(function(e,t,r,i,n,a,o,l,u){if(e==null||t===void 0||t===null||r===void 0||r===null||i===void 0||i===null)return;let h={},d=l1.find(f=>f.from===t&&f.to===r);if(d?h=d:l1.push(h),h.type=e,h.from=t,h.to=r,h.label={text:i},n==null)h.techn={text:""};else if(typeof n=="object"){let[f,p]=Object.entries(n)[0];h[f]={text:p}}else h.techn={text:n};if(a==null)h.descr={text:""};else if(typeof a=="object"){let[f,p]=Object.entries(a)[0];h[f]={text:p}}else h.descr={text:a};if(typeof o=="object"){let[f,p]=Object.entries(o)[0];h[f]=p}else h.sprite=o;if(typeof l=="object"){let[f,p]=Object.entries(l)[0];h[f]=p}else h.tags=l;if(typeof u=="object"){let[f,p]=Object.entries(u)[0];h[f]=p}else h.link=u;h.wrap=hu()},"addRel"),Obt=s(function(e,t,r,i,n,a,o){if(t===null||r===null)return;let l={},u=Co.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,Co.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.descr={text:""};else if(typeof i=="object"){let[h,d]=Object.entries(i)[0];l[h]={text:d}}else l.descr={text:i};if(typeof n=="object"){let[h,d]=Object.entries(n)[0];l[h]=d}else l.sprite=n;if(typeof a=="object"){let[h,d]=Object.entries(a)[0];l[h]=d}else l.tags=a;if(typeof o=="object"){let[h,d]=Object.entries(o)[0];l[h]=d}else l.link=o;l.typeC4Shape={text:e},l.parentBoundary=xs,l.wrap=hu()},"addPersonOrSystem"),Mbt=s(function(e,t,r,i,n,a,o,l){if(t===null||r===null)return;let u={},h=Co.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,Co.push(u)),r==null?u.label={text:""}:u.label={text:r},i==null)u.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.techn={text:i};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];u[d]=f}else u.sprite=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];u[d]=f}else u.tags=o;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];u[d]=f}else u.link=l;u.wrap=hu(),u.typeC4Shape={text:e},u.parentBoundary=xs},"addContainer"),Bbt=s(function(e,t,r,i,n,a,o,l){if(t===null||r===null)return;let u={},h=Co.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,Co.push(u)),r==null?u.label={text:""}:u.label={text:r},i==null)u.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.techn={text:i};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];u[d]=f}else u.sprite=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];u[d]=f}else u.tags=o;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];u[d]=f}else u.link=l;u.wrap=hu(),u.typeC4Shape={text:e},u.parentBoundary=xs},"addComponent"),Pbt=s(function(e,t,r,i,n){if(e===null||t===null)return;let a={},o=ul.find(l=>l.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,ul.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.tags=i;if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.link=n;a.parentBoundary=xs,a.wrap=hu(),To=xs,xs=e,uu.push(To)},"addPersonOrSystemBoundary"),$bt=s(function(e,t,r,i,n){if(e===null||t===null)return;let a={},o=ul.find(l=>l.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,ul.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.tags=i;if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.link=n;a.parentBoundary=xs,a.wrap=hu(),To=xs,xs=e,uu.push(To)},"addContainerBoundary"),Fbt=s(function(e,t,r,i,n,a,o,l){if(t===null||r===null)return;let u={},h=ul.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,ul.push(u)),r==null?u.label={text:""}:u.label={text:r},i==null)u.type={text:"node"};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.type={text:i};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.descr={text:n};if(typeof o=="object"){let[d,f]=Object.entries(o)[0];u[d]=f}else u.tags=o;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];u[d]=f}else u.link=l;u.nodeType=e,u.parentBoundary=xs,u.wrap=hu(),To=xs,xs=t,uu.push(To)},"addDeploymentNode"),Vbt=s(function(){xs=To,uu.pop(),To=uu.pop(),uu.push(To)},"popBoundaryParseStack"),zbt=s(function(e,t,r,i,n,a,o,l,u,h,d){let f=Co.find(p=>p.alias===t);if(!(f===void 0&&(f=ul.find(p=>p.alias===t),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];f[p]=m}else f.bgColor=r;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];f[p]=m}else f.fontColor=i;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];f[p]=m}else f.borderColor=n;if(a!=null)if(typeof a=="object"){let[p,m]=Object.entries(a)[0];f[p]=m}else f.shadowing=a;if(o!=null)if(typeof o=="object"){let[p,m]=Object.entries(o)[0];f[p]=m}else f.shape=o;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];f[p]=m}else f.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];f[p]=m}else f.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];f[p]=m}else f.legendText=h;if(d!=null)if(typeof d=="object"){let[p,m]=Object.entries(d)[0];f[p]=m}else f.legendSprite=d}},"updateElStyle"),Gbt=s(function(e,t,r,i,n,a,o){let l=l1.find(u=>u.from===t&&u.to===r);if(l!==void 0){if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.textColor=i;if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.lineColor=n;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(a);if(o!=null)if(typeof o=="object"){let[u,h]=Object.entries(o)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(o)}},"updateRelStyle"),Wbt=s(function(e,t,r){let i=G2,n=W2;if(typeof t=="object"){let a=Object.values(t)[0];i=parseInt(a)}else i=parseInt(t);if(typeof r=="object"){let a=Object.values(r)[0];n=parseInt(a)}else n=parseInt(r);i>=1&&(G2=i),n>=1&&(W2=n)},"updateLayoutConfig"),qbt=s(function(){return G2},"getC4ShapeInRow"),jbt=s(function(){return W2},"getC4BoundaryInRow"),Ubt=s(function(){return xs},"getCurrentBoundaryParse"),Hbt=s(function(){return To},"getParentBoundaryParse"),TF=s(function(e){return e==null?Co:Co.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),Ybt=s(function(e){return Co.find(t=>t.alias===e)},"getC4Shape"),Xbt=s(function(e){return Object.keys(TF(e))},"getC4ShapeKeys"),CF=s(function(e){return e==null?ul:ul.filter(t=>t.parentBoundary===e)},"getBoundaries"),Kbt=CF,Qbt=s(function(){return l1},"getRels"),Zbt=s(function(){return sA},"getTitle"),Jbt=s(function(e){aA=e},"setWrap"),hu=s(function(){return aA},"autoWrap"),t2t=s(function(){Co=[],ul=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],To="",xs="global",uu=[""],l1=[],uu=[""],sA="",aA=!1,G2=4,W2=2},"clear"),e2t={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},r2t={FILLED:0,OPEN:1},i2t={LEFTOF:0,RIGHTOF:1,OVER:2},n2t=s(function(e){sA=nr(e,Q())},"setTitle"),c1={addPersonOrSystem:Obt,addPersonOrSystemBoundary:Pbt,addContainer:Mbt,addContainerBoundary:$bt,addComponent:Bbt,addDeploymentNode:Fbt,popBoundaryParseStack:Vbt,addRel:Nbt,updateElStyle:zbt,updateRelStyle:Gbt,updateLayoutConfig:Wbt,autoWrap:hu,setWrap:Jbt,getC4ShapeArray:TF,getC4Shape:Ybt,getC4ShapeKeys:Xbt,getBoundaries:CF,getBoundarys:Kbt,getCurrentBoundaryParse:Ubt,getParentBoundaryParse:Hbt,getRels:Qbt,getTitle:Zbt,getC4Type:Dbt,getC4ShapeInRow:qbt,getC4BoundaryInRow:jbt,setAccTitle:Ye,getAccTitle:Ze,getAccDescription:tr,setAccDescription:Je,getConfig:s(()=>Q().c4,"getConfig"),clear:t2t,LINETYPE:e2t,ARROWTYPE:r2t,PLACEMENT:i2t,setTitle:n2t,setC4Type:Ibt}});function rd(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}var lA=b(()=>{"use strict";s(rd,"ascending")});function cA(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}var SF=b(()=>{"use strict";s(cA,"descending")});function id(e){let t,r,i;e.length!==2?(t=rd,r=s((l,u)=>rd(e(l),u),"compare2"),i=s((l,u)=>e(l)-u,"delta")):(t=e===rd||e===cA?e:s2t,r=e,i=e);function n(l,u,h=0,d=l.length){if(h>>1;r(l[f],u)<0?h=f+1:d=f}while(h>>1;r(l[f],u)<=0?h=f+1:d=f}while(hh&&i(l[f-1],u)>-i(l[f],u)?f-1:f}return s(o,"center"),{left:n,center:o,right:a}}function s2t(){return 0}var uA=b(()=>{"use strict";lA();SF();s(id,"bisector");s(s2t,"zero")});function hA(e){return e===null?NaN:+e}var wF=b(()=>{"use strict";s(hA,"number")});var _F,EF,a2t,o2t,dA,vF=b(()=>{"use strict";lA();uA();wF();_F=id(rd),EF=_F.right,a2t=_F.left,o2t=id(hA).center,dA=EF});function AF({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):r}function l2t({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function c2t({_intern:e,_key:t},r){let i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function u2t(e){return e!==null&&typeof e=="object"?e.valueOf():e}var Tp,RF=b(()=>{"use strict";Tp=class extends Map{static{s(this,"InternMap")}constructor(t,r=u2t){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[i,n]of t)this.set(i,n)}get(t){return super.get(AF(this,t))}has(t){return super.has(AF(this,t))}set(t,r){return super.set(l2t(this,t),r)}delete(t){return super.delete(c2t(this,t))}};s(AF,"intern_get");s(l2t,"intern_set");s(c2t,"intern_delete");s(u2t,"keyof")});function q2(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),o=a>=h2t?10:a>=d2t?5:a>=f2t?2:1,l,u,h;return n<0?(h=Math.pow(10,-n)/o,l=Math.round(e*h),u=Math.round(t*h),l/ht&&--u,h=-h):(h=Math.pow(10,n)*o,l=Math.round(e/h),u=Math.round(t/h),l*ht&&--u),u0))return[];if(e===t)return[e];let i=t=n))return[];let l=a-n+1,u=new Array(l);if(i)if(o<0)for(let h=0;h{"use strict";h2t=Math.sqrt(50),d2t=Math.sqrt(10),f2t=Math.sqrt(2);s(q2,"tickSpec");s(j2,"ticks");s(u1,"tickIncrement");s(Cp,"tickStep")});function U2(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r=n)&&(r=n)}return r}var DF=b(()=>{"use strict";s(U2,"max")});function H2(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}var IF=b(()=>{"use strict";s(H2,"min")});function Y2(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(n);++i{"use strict";s(Y2,"range")});var du=b(()=>{"use strict";vF();uA();DF();IF();NF();LF();RF()});function fA(e){return e}var OF=b(()=>{"use strict";s(fA,"default")});function p2t(e){return"translate("+e+",0)"}function m2t(e){return"translate(0,"+e+")"}function g2t(e){return t=>+e(t)}function y2t(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function x2t(){return!this.__axis}function BF(e,t){var r=[],i=null,n=null,a=6,o=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=e===K2||e===X2?-1:1,d=e===X2||e===pA?"x":"y",f=e===K2||e===mA?p2t:m2t;function p(m){var g=i??(t.ticks?t.ticks.apply(t,r):t.domain()),y=n??(t.tickFormat?t.tickFormat.apply(t,r):fA),x=Math.max(a,0)+l,k=t.range(),T=+k[0]+u,C=+k[k.length-1]+u,_=(t.bandwidth?y2t:g2t)(t.copy(),u),S=m.selection?m.selection():m,w=S.selectAll(".domain").data([null]),A=S.selectAll(".tick").data(g,t).order(),v=A.exit(),M=A.enter().append("g").attr("class","tick"),$=A.select("line"),I=A.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(M),$=$.merge(M.append("line").attr("stroke","currentColor").attr(d+"2",h*a)),I=I.merge(M.append("text").attr("fill","currentColor").attr(d,h*x).attr("dy",e===K2?"0em":e===mA?"0.71em":"0.32em")),m!==S&&(w=w.transition(m),A=A.transition(m),$=$.transition(m),I=I.transition(m),v=v.transition(m).attr("opacity",MF).attr("transform",function(F){return isFinite(F=_(F))?f(F+u):this.getAttribute("transform")}),M.attr("opacity",MF).attr("transform",function(F){var B=this.parentNode.__axis;return f((B&&isFinite(B=B(F))?B:_(F))+u)})),v.remove(),w.attr("d",e===X2||e===pA?o?"M"+h*o+","+T+"H"+u+"V"+C+"H"+h*o:"M"+u+","+T+"V"+C:o?"M"+T+","+h*o+"V"+u+"H"+C+"V"+h*o:"M"+T+","+u+"H"+C),A.attr("opacity",1).attr("transform",function(F){return f(_(F)+u)}),$.attr(d+"2",h*a),I.attr(d,h*x).text(y),S.filter(x2t).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===pA?"start":e===X2?"end":"middle"),S.each(function(){this.__axis=_})}return s(p,"axis"),p.scale=function(m){return arguments.length?(t=m,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(i=m==null?null:Array.from(m),p):i&&i.slice()},p.tickFormat=function(m){return arguments.length?(n=m,p):n},p.tickSize=function(m){return arguments.length?(a=o=+m,p):a},p.tickSizeInner=function(m){return arguments.length?(a=+m,p):a},p.tickSizeOuter=function(m){return arguments.length?(o=+m,p):o},p.tickPadding=function(m){return arguments.length?(l=+m,p):l},p.offset=function(m){return arguments.length?(u=+m,p):u},p}function gA(e){return BF(K2,e)}function yA(e){return BF(mA,e)}var K2,pA,mA,X2,MF,PF=b(()=>{"use strict";OF();K2=1,pA=2,mA=3,X2=4,MF=1e-6;s(p2t,"translateX");s(m2t,"translateY");s(g2t,"number");s(y2t,"center");s(x2t,"entering");s(BF,"axis");s(gA,"axisTop");s(yA,"axisBottom")});var $F=b(()=>{"use strict";PF()});function VF(){for(var e=0,t=arguments.length,r={},i;e=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}function T2t(e,t){for(var r=0,i=e.length,n;r{"use strict";b2t={value:s(()=>{},"value")};s(VF,"dispatch");s(Q2,"Dispatch");s(k2t,"parseTypenames");Q2.prototype=VF.prototype={constructor:Q2,on:s(function(e,t){var r=this._,i=k2t(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),i=0,n,a;i{"use strict";zF()});var Z2,kA,TA=b(()=>{"use strict";Z2="http://www.w3.org/1999/xhtml",kA={svg:"http://www.w3.org/2000/svg",xhtml:Z2,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function hl(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),kA.hasOwnProperty(t)?{space:kA[t],local:e}:e}var J2=b(()=>{"use strict";TA();s(hl,"default")});function C2t(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Z2&&t.documentElement.namespaceURI===Z2?t.createElement(e):t.createElementNS(r,e)}}function S2t(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function h1(e){var t=hl(e);return(t.local?S2t:C2t)(t)}var CA=b(()=>{"use strict";J2();TA();s(C2t,"creatorInherit");s(S2t,"creatorFixed");s(h1,"default")});function w2t(){}function fu(e){return e==null?w2t:function(){return this.querySelector(e)}}var tk=b(()=>{"use strict";s(w2t,"none");s(fu,"default")});function SA(e){typeof e!="function"&&(e=fu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{"use strict";So();tk();s(SA,"default")});function wA(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var WF=b(()=>{"use strict";s(wA,"array")});function _2t(){return[]}function Sp(e){return e==null?_2t:function(){return this.querySelectorAll(e)}}var _A=b(()=>{"use strict";s(_2t,"empty");s(Sp,"default")});function E2t(e){return function(){return wA(e.apply(this,arguments))}}function EA(e){typeof e=="function"?e=E2t(e):e=Sp(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a{"use strict";So();WF();_A();s(E2t,"arrayAll");s(EA,"default")});function wp(e){return function(){return this.matches(e)}}function ek(e){return function(t){return t.matches(e)}}var d1=b(()=>{"use strict";s(wp,"default");s(ek,"childMatcher")});function A2t(e){return function(){return v2t.call(this.children,e)}}function R2t(){return this.firstElementChild}function vA(e){return this.select(e==null?R2t:A2t(typeof e=="function"?e:ek(e)))}var v2t,jF=b(()=>{"use strict";d1();v2t=Array.prototype.find;s(A2t,"childFind");s(R2t,"childFirst");s(vA,"default")});function D2t(){return Array.from(this.children)}function I2t(e){return function(){return L2t.call(this.children,e)}}function AA(e){return this.selectAll(e==null?D2t:I2t(typeof e=="function"?e:ek(e)))}var L2t,UF=b(()=>{"use strict";d1();L2t=Array.prototype.filter;s(D2t,"children");s(I2t,"childrenFilter");s(AA,"default")});function RA(e){typeof e!="function"&&(e=wp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{"use strict";So();d1();s(RA,"default")});function f1(e){return new Array(e.length)}var LA=b(()=>{"use strict";s(f1,"default")});function DA(){return new $i(this._enter||this._groups.map(f1),this._parents)}function p1(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var IA=b(()=>{"use strict";LA();So();s(DA,"default");s(p1,"EnterNode");p1.prototype={constructor:p1,appendChild:s(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:s(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:s(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:s(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function NA(e){return function(){return e}}var YF=b(()=>{"use strict";s(NA,"default")});function N2t(e,t,r,i,n,a){for(var o=0,l,u=t.length,h=a.length;o=C&&(C=T+1);!(S=x[C])&&++C{"use strict";So();IA();YF();s(N2t,"bindIndex");s(O2t,"bindKey");s(M2t,"datum");s(OA,"default");s(B2t,"arraylike")});function MA(){return new $i(this._exit||this._groups.map(f1),this._parents)}var KF=b(()=>{"use strict";LA();So();s(MA,"default")});function BA(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}var QF=b(()=>{"use strict";s(BA,"default")});function PA(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,o=Math.min(n,a),l=new Array(n),u=0;u{"use strict";So();s(PA,"default")});function $A(){for(var e=this._groups,t=-1,r=e.length;++t=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}var JF=b(()=>{"use strict";s($A,"default")});function FA(e){e||(e=P2t);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}s(t,"compareNode");for(var r=this._groups,i=r.length,n=new Array(i),a=0;at?1:e>=t?0:NaN}var tV=b(()=>{"use strict";So();s(FA,"default");s(P2t,"ascending")});function VA(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var eV=b(()=>{"use strict";s(VA,"default")});function zA(){return Array.from(this)}var rV=b(()=>{"use strict";s(zA,"default")});function GA(){for(var e=this._groups,t=0,r=e.length;t{"use strict";s(GA,"default")});function WA(){let e=0;for(let t of this)++e;return e}var nV=b(()=>{"use strict";s(WA,"default")});function qA(){return!this.node()}var sV=b(()=>{"use strict";s(qA,"default")});function jA(e){for(var t=this._groups,r=0,i=t.length;r{"use strict";s(jA,"default")});function $2t(e){return function(){this.removeAttribute(e)}}function F2t(e){return function(){this.removeAttributeNS(e.space,e.local)}}function V2t(e,t){return function(){this.setAttribute(e,t)}}function z2t(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function G2t(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function W2t(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function UA(e,t){var r=hl(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?F2t:$2t:typeof t=="function"?r.local?W2t:G2t:r.local?z2t:V2t)(r,t))}var oV=b(()=>{"use strict";J2();s($2t,"attrRemove");s(F2t,"attrRemoveNS");s(V2t,"attrConstant");s(z2t,"attrConstantNS");s(G2t,"attrFunction");s(W2t,"attrFunctionNS");s(UA,"default")});function m1(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var HA=b(()=>{"use strict";s(m1,"default")});function q2t(e){return function(){this.style.removeProperty(e)}}function j2t(e,t,r){return function(){this.style.setProperty(e,t,r)}}function U2t(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function YA(e,t,r){return arguments.length>1?this.each((t==null?q2t:typeof t=="function"?U2t:j2t)(e,t,r??"")):pu(this.node(),e)}function pu(e,t){return e.style.getPropertyValue(t)||m1(e).getComputedStyle(e,null).getPropertyValue(t)}var XA=b(()=>{"use strict";HA();s(q2t,"styleRemove");s(j2t,"styleConstant");s(U2t,"styleFunction");s(YA,"default");s(pu,"styleValue")});function H2t(e){return function(){delete this[e]}}function Y2t(e,t){return function(){this[e]=t}}function X2t(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function KA(e,t){return arguments.length>1?this.each((t==null?H2t:typeof t=="function"?X2t:Y2t)(e,t)):this.node()[e]}var lV=b(()=>{"use strict";s(H2t,"propertyRemove");s(Y2t,"propertyConstant");s(X2t,"propertyFunction");s(KA,"default")});function cV(e){return e.trim().split(/^|\s+/)}function QA(e){return e.classList||new uV(e)}function uV(e){this._node=e,this._names=cV(e.getAttribute("class")||"")}function hV(e,t){for(var r=QA(e),i=-1,n=t.length;++i{"use strict";s(cV,"classArray");s(QA,"classList");s(uV,"ClassList");uV.prototype={add:s(function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:s(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:s(function(e){return this._names.indexOf(e)>=0},"contains")};s(hV,"classedAdd");s(dV,"classedRemove");s(K2t,"classedTrue");s(Q2t,"classedFalse");s(Z2t,"classedFunction");s(ZA,"default")});function J2t(){this.textContent=""}function tkt(e){return function(){this.textContent=e}}function ekt(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function JA(e){return arguments.length?this.each(e==null?J2t:(typeof e=="function"?ekt:tkt)(e)):this.node().textContent}var pV=b(()=>{"use strict";s(J2t,"textRemove");s(tkt,"textConstant");s(ekt,"textFunction");s(JA,"default")});function rkt(){this.innerHTML=""}function ikt(e){return function(){this.innerHTML=e}}function nkt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function t4(e){return arguments.length?this.each(e==null?rkt:(typeof e=="function"?nkt:ikt)(e)):this.node().innerHTML}var mV=b(()=>{"use strict";s(rkt,"htmlRemove");s(ikt,"htmlConstant");s(nkt,"htmlFunction");s(t4,"default")});function skt(){this.nextSibling&&this.parentNode.appendChild(this)}function e4(){return this.each(skt)}var gV=b(()=>{"use strict";s(skt,"raise");s(e4,"default")});function akt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function r4(){return this.each(akt)}var yV=b(()=>{"use strict";s(akt,"lower");s(r4,"default")});function i4(e){var t=typeof e=="function"?e:h1(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var xV=b(()=>{"use strict";CA();s(i4,"default")});function okt(){return null}function n4(e,t){var r=typeof e=="function"?e:h1(e),i=t==null?okt:typeof t=="function"?t:fu(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var bV=b(()=>{"use strict";CA();tk();s(okt,"constantNull");s(n4,"default")});function lkt(){var e=this.parentNode;e&&e.removeChild(this)}function s4(){return this.each(lkt)}var kV=b(()=>{"use strict";s(lkt,"remove");s(s4,"default")});function ckt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ukt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function a4(e){return this.select(e?ukt:ckt)}var TV=b(()=>{"use strict";s(ckt,"selection_cloneShallow");s(ukt,"selection_cloneDeep");s(a4,"default")});function o4(e){return arguments.length?this.property("__data__",e):this.node().__data__}var CV=b(()=>{"use strict";s(o4,"default")});function hkt(e){return function(t){e.call(this,t,this.__data__)}}function dkt(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function fkt(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r{"use strict";s(hkt,"contextListener");s(dkt,"parseTypenames");s(fkt,"onRemove");s(pkt,"onAdd");s(l4,"default")});function wV(e,t,r){var i=m1(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function mkt(e,t){return function(){return wV(this,e,t)}}function gkt(e,t){return function(){return wV(this,e,t.apply(this,arguments))}}function c4(e,t){return this.each((typeof t=="function"?gkt:mkt)(e,t))}var _V=b(()=>{"use strict";HA();s(wV,"dispatchEvent");s(mkt,"dispatchConstant");s(gkt,"dispatchFunction");s(c4,"default")});function*u4(){for(var e=this._groups,t=0,r=e.length;t{"use strict";s(u4,"default")});function $i(e,t){this._groups=e,this._parents=t}function vV(){return new $i([[document.documentElement]],h4)}function ykt(){return this}var h4,uc,So=b(()=>{"use strict";GF();qF();jF();UF();HF();XF();IA();KF();QF();ZF();JF();tV();eV();rV();iV();nV();sV();aV();oV();XA();lV();fV();pV();mV();gV();yV();xV();bV();kV();TV();CV();SV();_V();EV();h4=[null];s($i,"Selection");s(vV,"selection");s(ykt,"selection_selection");$i.prototype=vV.prototype={constructor:$i,select:SA,selectAll:EA,selectChild:vA,selectChildren:AA,filter:RA,data:OA,enter:DA,exit:MA,join:BA,merge:PA,selection:ykt,order:$A,sort:FA,call:VA,nodes:zA,node:GA,size:WA,empty:qA,each:jA,attr:UA,style:YA,property:KA,classed:ZA,text:JA,html:t4,raise:e4,lower:r4,append:i4,insert:n4,remove:s4,clone:a4,datum:o4,on:l4,dispatch:c4,[Symbol.iterator]:u4};uc=vV});function vt(e){return typeof e=="string"?new $i([[document.querySelector(e)]],[document.documentElement]):new $i([[e]],h4)}var AV=b(()=>{"use strict";So();s(vt,"default")});var wo=b(()=>{"use strict";d1();J2();AV();So();tk();_A();XA()});var RV=b(()=>{"use strict"});function mu(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function _p(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}var d4=b(()=>{"use strict";s(mu,"default");s(_p,"extend")});function gu(){}function DV(){return this.rgb().formatHex()}function _kt(){return this.rgb().formatHex8()}function Ekt(){return $V(this).formatHsl()}function IV(){return this.rgb().formatRgb()}function Eo(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=xkt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?NV(t):r===3?new Bn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?rk(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?rk(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=bkt.exec(e))?new Bn(t[1],t[2],t[3],1):(t=kkt.exec(e))?new Bn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Tkt.exec(e))?rk(t[1],t[2],t[3],t[4]):(t=Ckt.exec(e))?rk(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Skt.exec(e))?BV(t[1],t[2]/100,t[3]/100,1):(t=wkt.exec(e))?BV(t[1],t[2]/100,t[3]/100,t[4]):LV.hasOwnProperty(e)?NV(LV[e]):e==="transparent"?new Bn(NaN,NaN,NaN,0):null}function NV(e){return new Bn(e>>16&255,e>>8&255,e&255,1)}function rk(e,t,r,i){return i<=0&&(e=t=r=NaN),new Bn(e,t,r,i)}function p4(e){return e instanceof gu||(e=Eo(e)),e?(e=e.rgb(),new Bn(e.r,e.g,e.b,e.opacity)):new Bn}function vp(e,t,r,i){return arguments.length===1?p4(e):new Bn(e,t,r,i??1)}function Bn(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function OV(){return`#${nd(this.r)}${nd(this.g)}${nd(this.b)}`}function vkt(){return`#${nd(this.r)}${nd(this.g)}${nd(this.b)}${nd((isNaN(this.opacity)?1:this.opacity)*255)}`}function MV(){let e=sk(this.opacity);return`${e===1?"rgb(":"rgba("}${sd(this.r)}, ${sd(this.g)}, ${sd(this.b)}${e===1?")":`, ${e})`}`}function sk(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sd(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nd(e){return e=sd(e),(e<16?"0":"")+e.toString(16)}function BV(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _o(e,t,r,i)}function $V(e){if(e instanceof _o)return new _o(e.h,e.s,e.l,e.opacity);if(e instanceof gu||(e=Eo(e)),!e)return new _o;if(e instanceof _o)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,l=a-n,u=(a+n)/2;return l?(t===a?o=(r-i)/l+(r0&&u<1?0:o,new _o(o,l,u,e.opacity)}function FV(e,t,r,i){return arguments.length===1?$V(e):new _o(e,t,r,i??1)}function _o(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function PV(e){return e=(e||0)%360,e<0?e+360:e}function ik(e){return Math.max(0,Math.min(1,e||0))}function f4(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var g1,nk,Ep,y1,dl,xkt,bkt,kkt,Tkt,Ckt,Skt,wkt,LV,m4=b(()=>{"use strict";d4();s(gu,"Color");g1=.7,nk=1/g1,Ep="\\s*([+-]?\\d+)\\s*",y1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xkt=/^#([0-9a-f]{3,8})$/,bkt=new RegExp(`^rgb\\(${Ep},${Ep},${Ep}\\)$`),kkt=new RegExp(`^rgb\\(${dl},${dl},${dl}\\)$`),Tkt=new RegExp(`^rgba\\(${Ep},${Ep},${Ep},${y1}\\)$`),Ckt=new RegExp(`^rgba\\(${dl},${dl},${dl},${y1}\\)$`),Skt=new RegExp(`^hsl\\(${y1},${dl},${dl}\\)$`),wkt=new RegExp(`^hsla\\(${y1},${dl},${dl},${y1}\\)$`),LV={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};mu(gu,Eo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:DV,formatHex:DV,formatHex8:_kt,formatHsl:Ekt,formatRgb:IV,toString:IV});s(DV,"color_formatHex");s(_kt,"color_formatHex8");s(Ekt,"color_formatHsl");s(IV,"color_formatRgb");s(Eo,"color");s(NV,"rgbn");s(rk,"rgba");s(p4,"rgbConvert");s(vp,"rgb");s(Bn,"Rgb");mu(Bn,vp,_p(gu,{brighter(e){return e=e==null?nk:Math.pow(nk,e),new Bn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?g1:Math.pow(g1,e),new Bn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Bn(sd(this.r),sd(this.g),sd(this.b),sk(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:OV,formatHex:OV,formatHex8:vkt,formatRgb:MV,toString:MV}));s(OV,"rgb_formatHex");s(vkt,"rgb_formatHex8");s(MV,"rgb_formatRgb");s(sk,"clampa");s(sd,"clampi");s(nd,"hex");s(BV,"hsla");s($V,"hslConvert");s(FV,"hsl");s(_o,"Hsl");mu(_o,FV,_p(gu,{brighter(e){return e=e==null?nk:Math.pow(nk,e),new _o(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?g1:Math.pow(g1,e),new _o(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Bn(f4(e>=240?e-240:e+120,n,i),f4(e,n,i),f4(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new _o(PV(this.h),ik(this.s),ik(this.l),sk(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(){let e=sk(this.opacity);return`${e===1?"hsl(":"hsla("}${PV(this.h)}, ${ik(this.s)*100}%, ${ik(this.l)*100}%${e===1?")":`, ${e})`}`}}));s(PV,"clamph");s(ik,"clampt");s(f4,"hsl2rgb")});var VV,zV,GV=b(()=>{"use strict";VV=Math.PI/180,zV=180/Math.PI});function YV(e){if(e instanceof fl)return new fl(e.l,e.a,e.b,e.opacity);if(e instanceof hc)return XV(e);e instanceof Bn||(e=p4(e));var t=b4(e.r),r=b4(e.g),i=b4(e.b),n=g4((.2225045*t+.7168786*r+.0606169*i)/qV),a,o;return t===r&&r===i?a=o=n:(a=g4((.4360747*t+.3850649*r+.1430804*i)/WV),o=g4((.0139322*t+.0971045*r+.7141733*i)/jV)),new fl(116*n-16,500*(a-n),200*(n-o),e.opacity)}function k4(e,t,r,i){return arguments.length===1?YV(e):new fl(e,t,r,i??1)}function fl(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function g4(e){return e>Akt?Math.pow(e,1/3):e/HV+UV}function y4(e){return e>Ap?e*e*e:HV*(e-UV)}function x4(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function b4(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Rkt(e){if(e instanceof hc)return new hc(e.h,e.c,e.l,e.opacity);if(e instanceof fl||(e=YV(e)),e.a===0&&e.b===0)return new hc(NaN,0{"use strict";d4();m4();GV();ak=18,WV=.96422,qV=1,jV=.82521,UV=4/29,Ap=6/29,HV=3*Ap*Ap,Akt=Ap*Ap*Ap;s(YV,"labConvert");s(k4,"lab");s(fl,"Lab");mu(fl,k4,_p(gu,{brighter(e){return new fl(this.l+ak*(e??1),this.a,this.b,this.opacity)},darker(e){return new fl(this.l-ak*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=WV*y4(t),e=qV*y4(e),r=jV*y4(r),new Bn(x4(3.1338561*t-1.6168667*e-.4906146*r),x4(-.9787684*t+1.9161415*e+.033454*r),x4(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));s(g4,"xyz2lab");s(y4,"lab2xyz");s(x4,"lrgb2rgb");s(b4,"rgb2lrgb");s(Rkt,"hclConvert");s(x1,"hcl");s(hc,"Hcl");s(XV,"hcl2lab");mu(hc,x1,_p(gu,{brighter(e){return new hc(this.h,this.c,this.l+ak*(e??1),this.opacity)},darker(e){return new hc(this.h,this.c,this.l-ak*(e??1),this.opacity)},rgb(){return XV(this).rgb()}}))});var Rp=b(()=>{"use strict";m4();KV()});function T4(e,t,r,i,n){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*i+o*n)/6}function C4(e){var t=e.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),n=e[i],a=e[i+1],o=i>0?e[i-1]:2*n-a,l=i{"use strict";s(T4,"basis");s(C4,"default")});function w4(e){var t=e.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*t),n=e[(i+t-1)%t],a=e[i%t],o=e[(i+1)%t],l=e[(i+2)%t];return T4((r-i/t)*t,n,a,o,l)}}var QV=b(()=>{"use strict";S4();s(w4,"default")});var Lp,_4=b(()=>{"use strict";Lp=s(e=>()=>e,"default")});function ZV(e,t){return function(r){return e+r*t}}function Lkt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function JV(e,t){var r=t-e;return r?ZV(e,r>180||r<-180?r-360*Math.round(r/360):r):Lp(isNaN(e)?t:e)}function tz(e){return(e=+e)==1?dc:function(t,r){return r-t?Lkt(t,r,e):Lp(isNaN(t)?r:t)}}function dc(e,t){var r=t-e;return r?ZV(e,r):Lp(isNaN(e)?t:e)}var E4=b(()=>{"use strict";_4();s(ZV,"linear");s(Lkt,"exponential");s(JV,"hue");s(tz,"gamma");s(dc,"nogamma")});function ez(e){return function(t){var r=t.length,i=new Array(r),n=new Array(r),a=new Array(r),o,l;for(o=0;o{"use strict";Rp();S4();QV();E4();ad=s((function e(t){var r=tz(t);function i(n,a){var o=r((n=vp(n)).r,(a=vp(a)).r),l=r(n.g,a.g),u=r(n.b,a.b),h=dc(n.opacity,a.opacity);return function(d){return n.r=o(d),n.g=l(d),n.b=u(d),n.opacity=h(d),n+""}}return s(i,"rgb"),i.gamma=e,i}),"rgbGamma")(1);s(ez,"rgbSpline");Dkt=ez(C4),Ikt=ez(w4)});function A4(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(a){for(n=0;n{"use strict";s(A4,"default");s(rz,"isNumberArray")});function nz(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),o;for(o=0;o{"use strict";ok();s(nz,"genericArray")});function R4(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}var az=b(()=>{"use strict";s(R4,"default")});function Tn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var b1=b(()=>{"use strict";s(Tn,"default")});function L4(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=yu(e[n],t[n]):i[n]=t[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var oz=b(()=>{"use strict";ok();s(L4,"default")});function Nkt(e){return function(){return e}}function Okt(e){return function(t){return e(t)+""}}function Dp(e,t){var r=I4.lastIndex=D4.lastIndex=0,i,n,a,o=-1,l=[],u=[];for(e=e+"",t=t+"";(i=I4.exec(e))&&(n=D4.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(n=n[0])?l[o]?l[o]+=n:l[++o]=n:(l[++o]=null,u.push({i:o,x:Tn(i,n)})),r=D4.lastIndex;return r{"use strict";b1();I4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,D4=new RegExp(I4.source,"g");s(Nkt,"zero");s(Okt,"one");s(Dp,"default")});function yu(e,t){var r=typeof t,i;return t==null||r==="boolean"?Lp(t):(r==="number"?Tn:r==="string"?(i=Eo(t))?(t=i,ad):Dp:t instanceof Eo?ad:t instanceof Date?R4:rz(t)?A4:Array.isArray(t)?nz:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?L4:Tn)(e,t)}var ok=b(()=>{"use strict";Rp();v4();sz();az();b1();oz();N4();_4();iz();s(yu,"default")});function lk(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var lz=b(()=>{"use strict";s(lk,"default")});function uk(e,t,r,i,n,a){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*r+t*i)&&(r-=e*u,i-=t*u),(l=Math.sqrt(r*r+i*i))&&(r/=l,i/=l,u/=l),e*i{"use strict";cz=180/Math.PI,ck={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};s(uk,"default")});function hz(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ck:uk(t.a,t.b,t.c,t.d,t.e,t.f)}function dz(e){return e==null?ck:(hk||(hk=document.createElementNS("http://www.w3.org/2000/svg","g")),hk.setAttribute("transform",e),(e=hk.transform.baseVal.consolidate())?(e=e.matrix,uk(e.a,e.b,e.c,e.d,e.e,e.f)):ck)}var hk,fz=b(()=>{"use strict";uz();s(hz,"parseCss");s(dz,"parseSvg")});function pz(e,t,r,i){function n(h){return h.length?h.pop()+" ":""}s(n,"pop");function a(h,d,f,p,m,g){if(h!==f||d!==p){var y=m.push("translate(",null,t,null,r);g.push({i:y-4,x:Tn(h,f)},{i:y-2,x:Tn(d,p)})}else(f||p)&&m.push("translate("+f+t+p+r)}s(a,"translate");function o(h,d,f,p){h!==d?(h-d>180?d+=360:d-h>180&&(h+=360),p.push({i:f.push(n(f)+"rotate(",null,i)-2,x:Tn(h,d)})):d&&f.push(n(f)+"rotate("+d+i)}s(o,"rotate");function l(h,d,f,p){h!==d?p.push({i:f.push(n(f)+"skewX(",null,i)-2,x:Tn(h,d)}):d&&f.push(n(f)+"skewX("+d+i)}s(l,"skewX");function u(h,d,f,p,m,g){if(h!==f||d!==p){var y=m.push(n(m)+"scale(",null,",",null,")");g.push({i:y-4,x:Tn(h,f)},{i:y-2,x:Tn(d,p)})}else(f!==1||p!==1)&&m.push(n(m)+"scale("+f+","+p+")")}return s(u,"scale"),function(h,d){var f=[],p=[];return h=e(h),d=e(d),a(h.translateX,h.translateY,d.translateX,d.translateY,f,p),o(h.rotate,d.rotate,f,p),l(h.skewX,d.skewX,f,p),u(h.scaleX,h.scaleY,d.scaleX,d.scaleY,f,p),h=d=null,function(m){for(var g=-1,y=p.length,x;++g{"use strict";b1();fz();s(pz,"interpolateTransform");O4=pz(hz,"px, ","px)","deg)"),M4=pz(dz,", ",")",")")});function gz(e){return function(t,r){var i=e((t=x1(t)).h,(r=x1(r)).h),n=dc(t.c,r.c),a=dc(t.l,r.l),o=dc(t.opacity,r.opacity);return function(l){return t.h=i(l),t.c=n(l),t.l=a(l),t.opacity=o(l),t+""}}}var B4,Mkt,yz=b(()=>{"use strict";Rp();E4();s(gz,"hcl");B4=gz(JV),Mkt=gz(dc)});var Ip=b(()=>{"use strict";ok();b1();lz();N4();mz();v4();yz()});function _1(){return od||(kz(Bkt),od=S1.now()+pk)}function Bkt(){od=0}function w1(){this._call=this._time=this._next=null}function mk(e,t,r){var i=new w1;return i.restart(e,t,r),i}function Tz(){_1(),++Np;for(var e=dk,t;e;)(t=od-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Np}function xz(){od=(fk=S1.now())+pk,Np=T1=0;try{Tz()}finally{Np=0,$kt(),od=0}}function Pkt(){var e=S1.now(),t=e-fk;t>bz&&(pk-=t,fk=e)}function $kt(){for(var e,t=dk,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:dk=r);C1=e,P4(i)}function P4(e){if(!Np){T1&&(T1=clearTimeout(T1));var t=e-od;t>24?(e<1/0&&(T1=setTimeout(xz,e-S1.now()-pk)),k1&&(k1=clearInterval(k1))):(k1||(fk=S1.now(),k1=setInterval(Pkt,bz)),Np=1,kz(xz))}}var Np,T1,k1,bz,dk,C1,fk,od,pk,S1,kz,$4=b(()=>{"use strict";Np=0,T1=0,k1=0,bz=1e3,fk=0,od=0,pk=0,S1=typeof performance=="object"&&performance.now?performance:Date,kz=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};s(_1,"now");s(Bkt,"clearNow");s(w1,"Timer");w1.prototype=mk.prototype={constructor:w1,restart:s(function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?_1():+r)+(t==null?0:+t),!this._next&&C1!==this&&(C1?C1._next=this:dk=this,C1=this),this._call=e,this._time=r,P4()},"restart"),stop:s(function(){this._call&&(this._call=null,this._time=1/0,P4())},"stop")};s(mk,"timer");s(Tz,"timerFlush");s(xz,"wake");s(Pkt,"poke");s($kt,"nap");s(P4,"sleep")});function E1(e,t,r){var i=new w1;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var Cz=b(()=>{"use strict";$4();s(E1,"default")});var gk=b(()=>{"use strict";$4();Cz()});function fc(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;zkt(e,r,{name:t,index:i,group:n,on:Fkt,tween:Vkt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:_z})}function A1(e,t){var r=dn(e,t);if(r.state>_z)throw new Error("too late; already scheduled");return r}function Pn(e,t){var r=dn(e,t);if(r.state>yk)throw new Error("too late; already running");return r}function dn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function zkt(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=mk(a,0,r.time);function a(h){r.state=Sz,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}s(a,"schedule");function o(h){var d,f,p,m;if(r.state!==Sz)return u();for(d in i)if(m=i[d],m.name===r.name){if(m.state===yk)return E1(o);m.state===wz?(m.state=v1,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[d]):+d{"use strict";bA();gk();Fkt=xA("start","end","cancel","interrupt"),Vkt=[],_z=0,Sz=1,xk=2,yk=3,wz=4,bk=5,v1=6;s(fc,"default");s(A1,"init");s(Pn,"set");s(dn,"get");s(zkt,"create")});function R1(e,t){var r=e.__transition,i,n,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}n=i.state>xk&&i.state{"use strict";$s();s(R1,"default")});function F4(e){return this.each(function(){R1(this,e)})}var vz=b(()=>{"use strict";Ez();s(F4,"default")});function Gkt(e,t){var r,i;return function(){var n=Pn(this,e),a=n.tween;if(a!==r){i=r=a;for(var o=0,l=i.length;o{"use strict";$s();s(Gkt,"tweenRemove");s(Wkt,"tweenFunction");s(V4,"default");s(Op,"tweenValue")});function D1(e,t){var r;return(typeof t=="number"?Tn:t instanceof Eo?ad:(r=Eo(t))?(t=r,ad):Dp)(e,t)}var z4=b(()=>{"use strict";Rp();Ip();s(D1,"default")});function qkt(e){return function(){this.removeAttribute(e)}}function jkt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ukt(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttribute(e);return o===n?null:o===i?a:a=t(i=o,r)}}function Hkt(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?a:a=t(i=o,r)}}function Ykt(e,t,r){var i,n,a;return function(){var o,l=r(this),u;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=l+"",o===u?null:o===i&&u===n?a:(n=u,a=t(i=o,l)))}}function Xkt(e,t,r){var i,n,a;return function(){var o,l=r(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=l+"",o===u?null:o===i&&u===n?a:(n=u,a=t(i=o,l)))}}function G4(e,t){var r=hl(e),i=r==="transform"?M4:D1;return this.attrTween(e,typeof t=="function"?(r.local?Xkt:Ykt)(r,i,Op(this,"attr."+e,t)):t==null?(r.local?jkt:qkt)(r):(r.local?Hkt:Ukt)(r,i,t))}var Az=b(()=>{"use strict";Ip();wo();L1();z4();s(qkt,"attrRemove");s(jkt,"attrRemoveNS");s(Ukt,"attrConstant");s(Hkt,"attrConstantNS");s(Ykt,"attrFunction");s(Xkt,"attrFunctionNS");s(G4,"default")});function Kkt(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Qkt(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Zkt(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Qkt(e,a)),r}return s(n,"tween"),n._value=t,n}function Jkt(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Kkt(e,a)),r}return s(n,"tween"),n._value=t,n}function W4(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=hl(e);return this.tween(r,(i.local?Zkt:Jkt)(i,t))}var Rz=b(()=>{"use strict";wo();s(Kkt,"attrInterpolate");s(Qkt,"attrInterpolateNS");s(Zkt,"attrTweenNS");s(Jkt,"attrTween");s(W4,"default")});function tTt(e,t){return function(){A1(this,e).delay=+t.apply(this,arguments)}}function eTt(e,t){return t=+t,function(){A1(this,e).delay=t}}function q4(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?tTt:eTt)(t,e)):dn(this.node(),t).delay}var Lz=b(()=>{"use strict";$s();s(tTt,"delayFunction");s(eTt,"delayConstant");s(q4,"default")});function rTt(e,t){return function(){Pn(this,e).duration=+t.apply(this,arguments)}}function iTt(e,t){return t=+t,function(){Pn(this,e).duration=t}}function j4(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?rTt:iTt)(t,e)):dn(this.node(),t).duration}var Dz=b(()=>{"use strict";$s();s(rTt,"durationFunction");s(iTt,"durationConstant");s(j4,"default")});function nTt(e,t){if(typeof t!="function")throw new Error;return function(){Pn(this,e).ease=t}}function U4(e){var t=this._id;return arguments.length?this.each(nTt(t,e)):dn(this.node(),t).ease}var Iz=b(()=>{"use strict";$s();s(nTt,"easeConstant");s(U4,"default")});function sTt(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Pn(this,e).ease=r}}function H4(e){if(typeof e!="function")throw new Error;return this.each(sTt(this._id,e))}var Nz=b(()=>{"use strict";$s();s(sTt,"easeVarying");s(H4,"default")});function Y4(e){typeof e!="function"&&(e=wp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{"use strict";wo();ld();s(Y4,"default")});function X4(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),o=new Array(i),l=0;l{"use strict";ld();s(X4,"default")});function aTt(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function oTt(e,t,r){var i,n,a=aTt(t)?A1:Pn;return function(){var o=a(this,e),l=o.on;l!==i&&(n=(i=l).copy()).on(t,r),o.on=n}}function K4(e,t){var r=this._id;return arguments.length<2?dn(this.node(),r).on.on(e):this.each(oTt(r,e,t))}var Bz=b(()=>{"use strict";$s();s(aTt,"start");s(oTt,"onFunction");s(K4,"default")});function lTt(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Q4(){return this.on("end.remove",lTt(this._id))}var Pz=b(()=>{"use strict";s(lTt,"removeFunction");s(Q4,"default")});function Z4(e){var t=this._name,r=this._id;typeof e!="function"&&(e=fu(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o{"use strict";wo();ld();$s();s(Z4,"default")});function J4(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Sp(e));for(var i=this._groups,n=i.length,a=[],o=[],l=0;l{"use strict";wo();ld();$s();s(J4,"default")});function t5(){return new cTt(this._groups,this._parents)}var cTt,Vz=b(()=>{"use strict";wo();cTt=uc.prototype.constructor;s(t5,"default")});function uTt(e,t){var r,i,n;return function(){var a=pu(this,e),o=(this.style.removeProperty(e),pu(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function zz(e){return function(){this.style.removeProperty(e)}}function hTt(e,t,r){var i,n=r+"",a;return function(){var o=pu(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function dTt(e,t,r){var i,n,a;return function(){var o=pu(this,e),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),pu(this,e))),o===u?null:o===i&&u===n?a:(n=u,a=t(i=o,l))}}function fTt(e,t){var r,i,n,a="style."+t,o="end."+a,l;return function(){var u=Pn(this,e),h=u.on,d=u.value[a]==null?l||(l=zz(t)):void 0;(h!==r||n!==d)&&(i=(r=h).copy()).on(o,n=d),u.on=i}}function e5(e,t,r){var i=(e+="")=="transform"?O4:D1;return t==null?this.styleTween(e,uTt(e,i)).on("end.style."+e,zz(e)):typeof t=="function"?this.styleTween(e,dTt(e,i,Op(this,"style."+e,t))).each(fTt(this._id,e)):this.styleTween(e,hTt(e,i,t),r).on("end.style."+e,null)}var Gz=b(()=>{"use strict";Ip();wo();$s();L1();z4();s(uTt,"styleNull");s(zz,"styleRemove");s(hTt,"styleConstant");s(dTt,"styleFunction");s(fTt,"styleMaybeRemove");s(e5,"default")});function pTt(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function mTt(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&pTt(e,o,r)),i}return s(a,"tween"),a._value=t,a}function r5(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,mTt(e,t,r??""))}var Wz=b(()=>{"use strict";s(pTt,"styleInterpolate");s(mTt,"styleTween");s(r5,"default")});function gTt(e){return function(){this.textContent=e}}function yTt(e){return function(){var t=e(this);this.textContent=t??""}}function i5(e){return this.tween("text",typeof e=="function"?yTt(Op(this,"text",e)):gTt(e==null?"":e+""))}var qz=b(()=>{"use strict";L1();s(gTt,"textConstant");s(yTt,"textFunction");s(i5,"default")});function xTt(e){return function(t){this.textContent=e.call(this,t)}}function bTt(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&xTt(n)),t}return s(i,"tween"),i._value=e,i}function n5(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,bTt(e))}var jz=b(()=>{"use strict";s(xTt,"textInterpolate");s(bTt,"textTween");s(n5,"default")});function s5(){for(var e=this._name,t=this._id,r=kk(),i=this._groups,n=i.length,a=0;a{"use strict";ld();$s();s(s5,"default")});function a5(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var l={value:o},u={value:s(function(){--n===0&&a()},"value")};r.each(function(){var h=Pn(this,i),d=h.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),h.on=t}),n===0&&a()})}var Hz=b(()=>{"use strict";$s();s(a5,"default")});function bs(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Yz(e){return uc().transition(e)}function kk(){return++kTt}var kTt,pc,ld=b(()=>{"use strict";wo();Az();Rz();Lz();Dz();Iz();Nz();Oz();Mz();Bz();Pz();$z();Fz();Vz();Gz();Wz();qz();jz();Uz();L1();Hz();kTt=0;s(bs,"Transition");s(Yz,"transition");s(kk,"newId");pc=uc.prototype;bs.prototype=Yz.prototype={constructor:bs,select:Z4,selectAll:J4,selectChild:pc.selectChild,selectChildren:pc.selectChildren,filter:Y4,merge:X4,selection:t5,transition:s5,call:pc.call,nodes:pc.nodes,node:pc.node,size:pc.size,empty:pc.empty,each:pc.each,on:K4,attr:G4,attrTween:W4,style:e5,styleTween:r5,text:i5,textTween:n5,remove:Q4,tween:V4,delay:q4,duration:j4,ease:U4,easeVarying:H4,end:a5,[Symbol.iterator]:pc[Symbol.iterator]}});function Tk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Xz=b(()=>{"use strict";s(Tk,"cubicInOut")});var o5=b(()=>{"use strict";Xz()});function CTt(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function l5(e){var t,r;e instanceof bs?(t=e._id,e=e._name):(t=kk(),(r=TTt).time=_1(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a{"use strict";ld();$s();o5();gk();TTt={time:null,delay:0,duration:250,ease:Tk};s(CTt,"inherit");s(l5,"default")});var Qz=b(()=>{"use strict";wo();vz();Kz();uc.prototype.interrupt=F4;uc.prototype.transition=l5});var Ck=b(()=>{"use strict";Qz()});var Zz=b(()=>{"use strict"});var Jz=b(()=>{"use strict"});var tG=b(()=>{"use strict"});function eG(e){return[+e[0],+e[1]]}function STt(e){return[eG(e[0]),eG(e[1])]}function c5(e){return{type:e}}var Poe,$oe,Foe,Voe,zoe,Goe,rG=b(()=>{"use strict";Ck();Zz();Jz();tG();({abs:Poe,max:$oe,min:Foe}=Math);s(eG,"number1");s(STt,"number2");Voe={name:"x",handles:["w","e"].map(c5),input:s(function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},"input"),output:s(function(e){return e&&[e[0][0],e[1][0]]},"output")},zoe={name:"y",handles:["n","s"].map(c5),input:s(function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},"input"),output:s(function(e){return e&&[e[0][1],e[1][1]]},"output")},Goe={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(c5),input:s(function(e){return e==null?null:STt(e)},"input"),output:s(function(e){return e},"output")};s(c5,"type")});var iG=b(()=>{"use strict";rG()});function nG(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nG;let r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n{"use strict";u5=Math.PI,h5=2*u5,cd=1e-6,wTt=h5-cd;s(nG,"append");s(_Tt,"appendRound");ud=class{static{s(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?nG:_Tt(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=i-t,h=n-r,d=o-t,f=l-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>cd)if(!(Math.abs(f*u-h*d)>cd)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let m=i-o,g=n-l,y=u*u+h*h,x=m*m+g*g,k=Math.sqrt(y),T=Math.sqrt(p),C=a*Math.tan((u5-Math.acos((y+p-x)/(2*k*T)))/2),_=C/T,S=C/k;Math.abs(_-1)>cd&&this._append`L${t+_*d},${r+_*f}`,this._append`A${a},${a},0,0,${+(f*m>d*g)},${this._x1=t+S*u},${this._y1=r+S*h}`}}arc(t,r,i,n,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(n),u=i*Math.sin(n),h=t+l,d=r+u,f=1^o,p=o?n-a:a-n;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>cd||Math.abs(this._y1-d)>cd)&&this._append`L${h},${d}`,i&&(p<0&&(p=p%h5+h5),p>wTt?this._append`A${i},${i},0,1,${f},${t-l},${r-u}A${i},${i},0,1,${f},${this._x1=h},${this._y1=d}`:p>cd&&this._append`A${i},${i},0,${+(p>=u5)},${f},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};s(sG,"path");sG.prototype=ud.prototype});var d5=b(()=>{"use strict";aG()});var oG=b(()=>{"use strict"});var lG=b(()=>{"use strict"});var cG=b(()=>{"use strict"});var uG=b(()=>{"use strict"});var hG=b(()=>{"use strict"});var dG=b(()=>{"use strict"});var fG=b(()=>{"use strict"});function f5(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function hd(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}var I1=b(()=>{"use strict";s(f5,"default");s(hd,"formatDecimalParts")});function vo(e){return e=hd(Math.abs(e)),e?e[1]:NaN}var N1=b(()=>{"use strict";I1();s(vo,"default")});function p5(e,t){return function(r,i){for(var n=r.length,a=[],o=0,l=e[0],u=0;n>0&&l>0&&(u+l+1>i&&(l=Math.max(1,i-u)),a.push(r.substring(n-=l,n+l)),!((u+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}var pG=b(()=>{"use strict";s(p5,"default")});function m5(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var mG=b(()=>{"use strict";s(m5,"default")});function xu(e){if(!(t=ETt.exec(e)))throw new Error("invalid format: "+e);var t;return new Sk({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sk(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var ETt,g5=b(()=>{"use strict";ETt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;s(xu,"formatSpecifier");xu.prototype=Sk.prototype;s(Sk,"FormatSpecifier");Sk.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function y5(e){t:for(var t=e.length,r=1,i=-1,n;r0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var gG=b(()=>{"use strict";s(y5,"default")});function b5(e,t){var r=hd(e,t);if(!r)return e+"";var i=r[0],n=r[1],a=n-(x5=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+hd(e,Math.max(0,t+a-1))[0]}var x5,k5=b(()=>{"use strict";I1();s(b5,"default")});function wk(e,t){var r=hd(e,t);if(!r)return e+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var yG=b(()=>{"use strict";I1();s(wk,"default")});var T5,xG=b(()=>{"use strict";I1();k5();yG();T5={"%":s((e,t)=>(e*100).toFixed(t),"%"),b:s(e=>Math.round(e).toString(2),"b"),c:s(e=>e+"","c"),d:f5,e:s((e,t)=>e.toExponential(t),"e"),f:s((e,t)=>e.toFixed(t),"f"),g:s((e,t)=>e.toPrecision(t),"g"),o:s(e=>Math.round(e).toString(8),"o"),p:s((e,t)=>wk(e*100,t),"p"),r:wk,s:b5,X:s(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:s(e=>Math.round(e).toString(16),"x")}});function _k(e){return e}var bG=b(()=>{"use strict";s(_k,"default")});function C5(e){var t=e.grouping===void 0||e.thousands===void 0?_k:p5(kG.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?_k:m5(kG.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"\u2212":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function h(f){f=xu(f);var p=f.fill,m=f.align,g=f.sign,y=f.symbol,x=f.zero,k=f.width,T=f.comma,C=f.precision,_=f.trim,S=f.type;S==="n"?(T=!0,S="g"):T5[S]||(C===void 0&&(C=12),_=!0,S="g"),(x||p==="0"&&m==="=")&&(x=!0,p="0",m="=");var w=y==="$"?r:y==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",A=y==="$"?i:/[%p]/.test(S)?o:"",v=T5[S],M=/[defgprs%]/.test(S);C=C===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function $(I){var F=w,B=A,O,R,N;if(S==="c")B=v(I)+B,I="";else{I=+I;var P=I<0||1/I<0;if(I=isNaN(I)?u:v(Math.abs(I),C),_&&(I=y5(I)),P&&+I==0&&g!=="+"&&(P=!1),F=(P?g==="("?g:l:g==="-"||g==="("?"":g)+F,B=(S==="s"?TG[8+x5/3]:"")+B+(P&&g==="("?")":""),M){for(O=-1,R=I.length;++ON||N>57){B=(N===46?n+I.slice(O+1):I.slice(O))+B,I=I.slice(0,O);break}}}T&&!x&&(I=t(I,1/0));var E=F.length+I.length+B.length,D=E>1)+F+I+B+D.slice(E);break;default:I=D+F+I+B;break}return a(I)}return s($,"format"),$.toString=function(){return f+""},$}s(h,"newFormat");function d(f,p){var m=h((f=xu(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(vo(p)/3)))*3,y=Math.pow(10,-g),x=TG[8+g/3];return function(k){return m(y*k)+x}}return s(d,"formatPrefix"),{format:h,formatPrefix:d}}var kG,TG,CG=b(()=>{"use strict";N1();pG();mG();g5();gG();xG();k5();bG();kG=Array.prototype.map,TG=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];s(C5,"default")});function S5(e){return Ek=C5(e),pl=Ek.format,vk=Ek.formatPrefix,Ek}var Ek,pl,vk,SG=b(()=>{"use strict";CG();S5({thousands:",",grouping:[3],currency:["$",""]});s(S5,"defaultLocale")});function Ak(e){return Math.max(0,-vo(Math.abs(e)))}var wG=b(()=>{"use strict";N1();s(Ak,"default")});function Rk(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vo(t)/3)))*3-vo(Math.abs(e)))}var _G=b(()=>{"use strict";N1();s(Rk,"default")});function Lk(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vo(t)-vo(e))+1}var EG=b(()=>{"use strict";N1();s(Lk,"default")});var w5=b(()=>{"use strict";SG();g5();wG();_G();EG()});var vG=b(()=>{"use strict"});function vTt(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function _5(){return this.eachAfter(vTt)}var AG=b(()=>{"use strict";s(vTt,"count");s(_5,"default")});function E5(e,t){let r=-1;for(let i of this)e.call(t,i,++r,this);return this}var RG=b(()=>{"use strict";s(E5,"default")});function v5(e,t){for(var r=this,i=[r],n,a,o=-1;r=i.pop();)if(e.call(t,r,++o,this),n=r.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}var LG=b(()=>{"use strict";s(v5,"default")});function A5(e,t){for(var r=this,i=[r],n=[],a,o,l,u=-1;r=i.pop();)if(n.push(r),a=r.children)for(o=0,l=a.length;o{"use strict";s(A5,"default")});function R5(e,t){let r=-1;for(let i of this)if(e.call(t,i,++r,this))return i}var IG=b(()=>{"use strict";s(R5,"default")});function L5(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})}var NG=b(()=>{"use strict";s(L5,"default")});function D5(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var OG=b(()=>{"use strict";s(D5,"default")});function I5(e){for(var t=this,r=ATt(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function ATt(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}var MG=b(()=>{"use strict";s(I5,"default");s(ATt,"leastCommonAncestor")});function N5(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var BG=b(()=>{"use strict";s(N5,"default")});function O5(){return Array.from(this)}var PG=b(()=>{"use strict";s(O5,"default")});function M5(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var $G=b(()=>{"use strict";s(M5,"default")});function B5(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}var FG=b(()=>{"use strict";s(B5,"default")});function*P5(){var e=this,t,r=[e],i,n,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(n=0,a=i.length;n{"use strict";s(P5,"default")});function Mp(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=DTt)):t===void 0&&(t=LTt);for(var r=new O1(e),i,n=[r],a,o,l,u;i=n.pop();)if((o=t(i.data))&&(u=(o=Array.from(o)).length))for(i.children=o,l=u-1;l>=0;--l)n.push(a=o[l]=new O1(o[l])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(NTt)}function RTt(){return Mp(this).eachBefore(ITt)}function LTt(e){return e.children}function DTt(e){return Array.isArray(e)?e[1]:null}function ITt(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function NTt(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function O1(e){this.data=e,this.depth=this.height=0,this.parent=null}var zG=b(()=>{"use strict";AG();RG();LG();DG();IG();NG();OG();MG();BG();PG();$G();FG();VG();s(Mp,"hierarchy");s(RTt,"node_copy");s(LTt,"objectChildren");s(DTt,"mapChildren");s(ITt,"copyData");s(NTt,"computeHeight");s(O1,"Node");O1.prototype=Mp.prototype={constructor:O1,count:_5,each:E5,eachAfter:A5,eachBefore:v5,find:R5,sum:L5,sort:D5,path:I5,ancestors:N5,descendants:O5,leaves:M5,links:B5,copy:RTt,[Symbol.iterator]:P5}});function GG(e){if(typeof e!="function")throw new Error;return e}var WG=b(()=>{"use strict";s(GG,"required")});function Bp(){return 0}function dd(e){return function(){return e}}var qG=b(()=>{"use strict";s(Bp,"constantZero");s(dd,"default")});function $5(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var jG=b(()=>{"use strict";s($5,"default")});function F5(e,t,r,i,n){for(var a=e.children,o,l=-1,u=a.length,h=e.value&&(i-t)/e.value;++l{"use strict";s(F5,"default")});function V5(e,t,r,i,n){for(var a=e.children,o,l=-1,u=a.length,h=e.value&&(n-r)/e.value;++l{"use strict";s(V5,"default")});function MTt(e,t,r,i,n,a){for(var o=[],l=t.children,u,h,d=0,f=0,p=l.length,m,g,y=t.value,x,k,T,C,_,S,w;dT&&(T=h),w=x*x*S,C=Math.max(T/w,w/k),C>_){x-=h;break}_=C}o.push(u={value:x,dice:m{"use strict";UG();HG();OTt=(1+Math.sqrt(5))/2;s(MTt,"squarifyRatio");YG=s((function e(t){function r(i,n,a,o,l){MTt(t,i,n,a,o,l)}return s(r,"squarify"),r.ratio=function(i){return e((i=+i)>1?i:1)},r}),"custom")(OTt)});function Dk(){var e=YG,t=!1,r=1,i=1,n=[0],a=Bp,o=Bp,l=Bp,u=Bp,h=Bp;function d(p){return p.x0=p.y0=0,p.x1=r,p.y1=i,p.eachBefore(f),n=[0],t&&p.eachBefore($5),p}s(d,"treemap");function f(p){var m=n[p.depth],g=p.x0+m,y=p.y0+m,x=p.x1-m,k=p.y1-m;x{"use strict";jG();XG();WG();qG();s(Dk,"default")});var QG=b(()=>{"use strict";zG();KG()});var ZG=b(()=>{"use strict"});var JG=b(()=>{"use strict"});function bu(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var M1=b(()=>{"use strict";s(bu,"initRange")});function pa(){var e=new Tp,t=[],r=[],i=z5;function n(a){let o=e.get(a);if(o===void 0){if(i!==z5)return i;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return s(n,"scale"),n.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Tp;for(let o of a)e.has(o)||e.set(o,t.push(o)-1);return n},n.range=function(a){return arguments.length?(r=Array.from(a),n):r.slice()},n.unknown=function(a){return arguments.length?(i=a,n):i},n.copy=function(){return pa(t,r).unknown(i)},bu.apply(n,arguments),n}var z5,G5=b(()=>{"use strict";du();M1();z5=Symbol("implicit");s(pa,"ordinal")});function Pp(){var e=pa().unknown(void 0),t=e.domain,r=e.range,i=0,n=1,a,o,l=!1,u=0,h=0,d=.5;delete e.unknown;function f(){var p=t().length,m=n{"use strict";du();M1();G5();s(Pp,"band")});function W5(e){return function(){return e}}var eW=b(()=>{"use strict";s(W5,"constants")});function q5(e){return+e}var rW=b(()=>{"use strict";s(q5,"number")});function $p(e){return e}function j5(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:W5(isNaN(t)?NaN:.5)}function BTt(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function PTt(e,t,r){var i=e[0],n=e[1],a=t[0],o=t[1];return n2?$Tt:PTt,u=h=null,f}s(d,"rescale");function f(p){return p==null||isNaN(p=+p)?a:(u||(u=l(e.map(i),t,r)))(i(o(p)))}return s(f,"scale"),f.invert=function(p){return o(n((h||(h=l(t,e.map(i),Tn)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,q5),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),r=lk,d()},f.clamp=function(p){return arguments.length?(o=p?!0:$p,d()):o!==$p},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(a=p,f):a},function(p,m){return i=p,n=m,d()}}function B1(){return FTt()($p,$p)}var iW,U5=b(()=>{"use strict";du();Ip();eW();rW();iW=[0,1];s($p,"identity");s(j5,"normalize");s(BTt,"clamper");s(PTt,"bimap");s($Tt,"polymap");s(Ik,"copy");s(FTt,"transformer");s(B1,"continuous")});function H5(e,t,r,i){var n=Cp(e,t,r),a;switch(i=xu(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(a=Rk(n,o))&&(i.precision=a),vk(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Lk(n,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=Ak(n))&&(i.precision=a-(i.type==="%")*2);break}}return pl(i)}var nW=b(()=>{"use strict";du();w5();s(H5,"tickFormat")});function VTt(e){var t=e.domain;return e.ticks=function(r){var i=t();return j2(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var n=t();return H5(n[0],n[n.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),n=0,a=i.length-1,o=i[n],l=i[a],u,h,d=10;for(l0;){if(h=u1(o,l,r),h===u)return i[n]=o,i[a]=l,t(i);if(h>0)o=Math.floor(o/h)*h,l=Math.ceil(l/h)*h;else if(h<0)o=Math.ceil(o*h)/h,l=Math.floor(l*h)/h;else break;u=h}return e},e}function Ao(){var e=B1();return e.copy=function(){return Ik(e,Ao())},bu.apply(e,arguments),VTt(e)}var sW=b(()=>{"use strict";du();U5();M1();nW();s(VTt,"linearish");s(Ao,"linear")});function Y5(e,t){e=e.slice();var r=0,i=e.length-1,n=e[r],a=e[i],o;return a{"use strict";s(Y5,"nice")});function ri(e,t,r,i){function n(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return s(n,"interval"),n.floor=a=>(e(a=new Date(+a)),a),n.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),n.round=a=>{let o=n(a),l=n.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),n.range=(a,o,l)=>{let u=[];if(a=n.ceil(a),l=l==null?1:Math.floor(l),!(a0))return u;let h;do u.push(h=new Date(+a)),t(a,l),e(a);while(hri(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(n.count=(a,o)=>(X5.setTime(+a),K5.setTime(+o),e(X5),e(K5),Math.floor(r(X5,K5))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(i?o=>i(o)%a===0:o=>n.count(0,o)%a===0):n)),n}var X5,K5,mc=b(()=>{"use strict";X5=new Date,K5=new Date;s(ri,"timeInterval")});var ml,oW,Q5=b(()=>{"use strict";mc();ml=ri(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ml.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ri(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ml);oW=ml.range});var ma,lW,Z5=b(()=>{"use strict";mc();ma=ri(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),lW=ma.range});var gc,zTt,Nk,GTt,J5=b(()=>{"use strict";mc();gc=ri(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),zTt=gc.range,Nk=ri(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),GTt=Nk.range});var yc,WTt,Ok,qTt,tR=b(()=>{"use strict";mc();yc=ri(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),WTt=yc.range,Ok=ri(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),qTt=Ok.range});var za,jTt,$1,UTt,Mk,HTt,eR=b(()=>{"use strict";mc();za=ri(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),jTt=za.range,$1=ri(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),UTt=$1.range,Mk=ri(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),HTt=Mk.range});function md(e){return ri(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}function gd(e){return ri(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var Ro,ku,Bk,Pk,yl,$k,Fk,uW,YTt,XTt,KTt,QTt,ZTt,JTt,yd,Fp,hW,dW,Tu,fW,pW,mW,tCt,eCt,rCt,iCt,nCt,sCt,rR=b(()=>{"use strict";mc();s(md,"timeWeekday");Ro=md(0),ku=md(1),Bk=md(2),Pk=md(3),yl=md(4),$k=md(5),Fk=md(6),uW=Ro.range,YTt=ku.range,XTt=Bk.range,KTt=Pk.range,QTt=yl.range,ZTt=$k.range,JTt=Fk.range;s(gd,"utcWeekday");yd=gd(0),Fp=gd(1),hW=gd(2),dW=gd(3),Tu=gd(4),fW=gd(5),pW=gd(6),mW=yd.range,tCt=Fp.range,eCt=hW.range,rCt=dW.range,iCt=Tu.range,nCt=fW.range,sCt=pW.range});var xc,aCt,Vk,oCt,iR=b(()=>{"use strict";mc();xc=ri(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),aCt=xc.range,Vk=ri(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),oCt=Vk.range});var ga,lCt,Lo,cCt,nR=b(()=>{"use strict";mc();ga=ri(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ga.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ri(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});lCt=ga.range,Lo=ri(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Lo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ri(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});cCt=Lo.range});function yW(e,t,r,i,n,a){let o=[[ma,1,1e3],[ma,5,5*1e3],[ma,15,15*1e3],[ma,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[n,1,36e5],[n,3,3*36e5],[n,6,6*36e5],[n,12,12*36e5],[i,1,864e5],[i,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function l(h,d,f){let p=dx).right(o,p);if(m===o.length)return e.every(Cp(h/31536e6,d/31536e6,f));if(m===0)return ml.every(Math.max(Cp(h,d,f),1));let[g,y]=o[p/o[m-1][2]{"use strict";du();Q5();Z5();J5();tR();eR();rR();iR();nR();s(yW,"ticker");[hCt,dCt]=yW(Lo,Vk,yd,Mk,Ok,Nk),[sR,aR]=yW(ga,xc,Ro,za,yc,gc)});var zk=b(()=>{"use strict";Q5();Z5();J5();tR();eR();rR();iR();nR();xW()});function oR(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function lR(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function F1(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function cR(e){var t=e.dateTime,r=e.date,i=e.time,n=e.periods,a=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,h=V1(n),d=z1(n),f=V1(a),p=z1(a),m=V1(o),g=z1(o),y=V1(l),x=z1(l),k=V1(u),T=z1(u),C={a:P,A:E,b:D,B:V,c:null,d:wW,e:wW,f:MCt,g:jCt,G:HCt,H:ICt,I:NCt,j:OCt,L:RW,m:BCt,M:PCt,p:L,q,Q:vW,s:AW,S:$Ct,u:FCt,U:VCt,V:zCt,w:GCt,W:WCt,x:null,X:null,y:qCt,Y:UCt,Z:YCt,"%":EW},_={a:H,A:K,b:U,B:st,c:null,d:_W,e:_W,f:ZCt,g:lSt,G:uSt,H:XCt,I:KCt,j:QCt,L:DW,m:JCt,M:tSt,p:X,q:ut,Q:vW,s:AW,S:eSt,u:rSt,U:iSt,V:nSt,w:sSt,W:aSt,x:null,X:null,y:oSt,Y:cSt,Z:hSt,"%":EW},S={a:$,A:I,b:F,B,c:O,d:CW,e:CW,f:ACt,g:TW,G:kW,H:SW,I:SW,j:wCt,L:vCt,m:SCt,M:_Ct,p:M,q:CCt,Q:LCt,s:DCt,S:ECt,u:yCt,U:xCt,V:bCt,w:gCt,W:kCt,x:R,X:N,y:TW,Y:kW,Z:TCt,"%":RCt};C.x=w(r,C),C.X=w(i,C),C.c=w(t,C),_.x=w(r,_),_.X=w(i,_),_.c=w(t,_);function w(ot,mt){return function(ht){var it=[],Ot=-1,St=0,yt=ot.length,Et,Ct,Bt;for(ht instanceof Date||(ht=new Date(+ht));++Ot53)return null;"w"in it||(it.w=1),"Z"in it?(St=lR(F1(it.y,0,1)),yt=St.getUTCDay(),St=yt>4||yt===0?Fp.ceil(St):Fp(St),St=$1.offset(St,(it.V-1)*7),it.y=St.getUTCFullYear(),it.m=St.getUTCMonth(),it.d=St.getUTCDate()+(it.w+6)%7):(St=oR(F1(it.y,0,1)),yt=St.getDay(),St=yt>4||yt===0?ku.ceil(St):ku(St),St=za.offset(St,(it.V-1)*7),it.y=St.getFullYear(),it.m=St.getMonth(),it.d=St.getDate()+(it.w+6)%7)}else("W"in it||"U"in it)&&("w"in it||(it.w="u"in it?it.u%7:"W"in it?1:0),yt="Z"in it?lR(F1(it.y,0,1)).getUTCDay():oR(F1(it.y,0,1)).getDay(),it.m=0,it.d="W"in it?(it.w+6)%7+it.W*7-(yt+5)%7:it.w+it.U*7-(yt+6)%7);return"Z"in it?(it.H+=it.Z/100|0,it.M+=it.Z%100,lR(it)):oR(it)}}s(A,"newParse");function v(ot,mt,ht,it){for(var Ot=0,St=mt.length,yt=ht.length,Et,Ct;Ot=yt)return-1;if(Et=mt.charCodeAt(Ot++),Et===37){if(Et=mt.charAt(Ot++),Ct=S[Et in bW?mt.charAt(Ot++):Et],!Ct||(it=Ct(ot,ht,it))<0)return-1}else if(Et!=ht.charCodeAt(it++))return-1}return it}s(v,"parseSpecifier");function M(ot,mt,ht){var it=h.exec(mt.slice(ht));return it?(ot.p=d.get(it[0].toLowerCase()),ht+it[0].length):-1}s(M,"parsePeriod");function $(ot,mt,ht){var it=m.exec(mt.slice(ht));return it?(ot.w=g.get(it[0].toLowerCase()),ht+it[0].length):-1}s($,"parseShortWeekday");function I(ot,mt,ht){var it=f.exec(mt.slice(ht));return it?(ot.w=p.get(it[0].toLowerCase()),ht+it[0].length):-1}s(I,"parseWeekday");function F(ot,mt,ht){var it=k.exec(mt.slice(ht));return it?(ot.m=T.get(it[0].toLowerCase()),ht+it[0].length):-1}s(F,"parseShortMonth");function B(ot,mt,ht){var it=y.exec(mt.slice(ht));return it?(ot.m=x.get(it[0].toLowerCase()),ht+it[0].length):-1}s(B,"parseMonth");function O(ot,mt,ht){return v(ot,t,mt,ht)}s(O,"parseLocaleDateTime");function R(ot,mt,ht){return v(ot,r,mt,ht)}s(R,"parseLocaleDate");function N(ot,mt,ht){return v(ot,i,mt,ht)}s(N,"parseLocaleTime");function P(ot){return o[ot.getDay()]}s(P,"formatShortWeekday");function E(ot){return a[ot.getDay()]}s(E,"formatWeekday");function D(ot){return u[ot.getMonth()]}s(D,"formatShortMonth");function V(ot){return l[ot.getMonth()]}s(V,"formatMonth");function L(ot){return n[+(ot.getHours()>=12)]}s(L,"formatPeriod");function q(ot){return 1+~~(ot.getMonth()/3)}s(q,"formatQuarter");function H(ot){return o[ot.getUTCDay()]}s(H,"formatUTCShortWeekday");function K(ot){return a[ot.getUTCDay()]}s(K,"formatUTCWeekday");function U(ot){return u[ot.getUTCMonth()]}s(U,"formatUTCShortMonth");function st(ot){return l[ot.getUTCMonth()]}s(st,"formatUTCMonth");function X(ot){return n[+(ot.getUTCHours()>=12)]}s(X,"formatUTCPeriod");function ut(ot){return 1+~~(ot.getUTCMonth()/3)}return s(ut,"formatUTCQuarter"),{format:s(function(ot){var mt=w(ot+="",C);return mt.toString=function(){return ot},mt},"format"),parse:s(function(ot){var mt=A(ot+="",!1);return mt.toString=function(){return ot},mt},"parse"),utcFormat:s(function(ot){var mt=w(ot+="",_);return mt.toString=function(){return ot},mt},"utcFormat"),utcParse:s(function(ot){var mt=A(ot+="",!0);return mt.toString=function(){return ot},mt},"utcParse")}}function Ir(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a[t.toLowerCase(),r]))}function gCt(e,t,r){var i=Cn.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function yCt(e,t,r){var i=Cn.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function xCt(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function bCt(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function kCt(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function kW(e,t,r){var i=Cn.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function TW(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function TCt(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function CCt(e,t,r){var i=Cn.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function SCt(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function CW(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function wCt(e,t,r){var i=Cn.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function SW(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function _Ct(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function ECt(e,t,r){var i=Cn.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function vCt(e,t,r){var i=Cn.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function ACt(e,t,r){var i=Cn.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function RCt(e,t,r){var i=fCt.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function LCt(e,t,r){var i=Cn.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function DCt(e,t,r){var i=Cn.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function wW(e,t){return Ir(e.getDate(),t,2)}function ICt(e,t){return Ir(e.getHours(),t,2)}function NCt(e,t){return Ir(e.getHours()%12||12,t,2)}function OCt(e,t){return Ir(1+za.count(ga(e),e),t,3)}function RW(e,t){return Ir(e.getMilliseconds(),t,3)}function MCt(e,t){return RW(e,t)+"000"}function BCt(e,t){return Ir(e.getMonth()+1,t,2)}function PCt(e,t){return Ir(e.getMinutes(),t,2)}function $Ct(e,t){return Ir(e.getSeconds(),t,2)}function FCt(e){var t=e.getDay();return t===0?7:t}function VCt(e,t){return Ir(Ro.count(ga(e)-1,e),t,2)}function LW(e){var t=e.getDay();return t>=4||t===0?yl(e):yl.ceil(e)}function zCt(e,t){return e=LW(e),Ir(yl.count(ga(e),e)+(ga(e).getDay()===4),t,2)}function GCt(e){return e.getDay()}function WCt(e,t){return Ir(ku.count(ga(e)-1,e),t,2)}function qCt(e,t){return Ir(e.getFullYear()%100,t,2)}function jCt(e,t){return e=LW(e),Ir(e.getFullYear()%100,t,2)}function UCt(e,t){return Ir(e.getFullYear()%1e4,t,4)}function HCt(e,t){var r=e.getDay();return e=r>=4||r===0?yl(e):yl.ceil(e),Ir(e.getFullYear()%1e4,t,4)}function YCt(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ir(t/60|0,"0",2)+Ir(t%60,"0",2)}function _W(e,t){return Ir(e.getUTCDate(),t,2)}function XCt(e,t){return Ir(e.getUTCHours(),t,2)}function KCt(e,t){return Ir(e.getUTCHours()%12||12,t,2)}function QCt(e,t){return Ir(1+$1.count(Lo(e),e),t,3)}function DW(e,t){return Ir(e.getUTCMilliseconds(),t,3)}function ZCt(e,t){return DW(e,t)+"000"}function JCt(e,t){return Ir(e.getUTCMonth()+1,t,2)}function tSt(e,t){return Ir(e.getUTCMinutes(),t,2)}function eSt(e,t){return Ir(e.getUTCSeconds(),t,2)}function rSt(e){var t=e.getUTCDay();return t===0?7:t}function iSt(e,t){return Ir(yd.count(Lo(e)-1,e),t,2)}function IW(e){var t=e.getUTCDay();return t>=4||t===0?Tu(e):Tu.ceil(e)}function nSt(e,t){return e=IW(e),Ir(Tu.count(Lo(e),e)+(Lo(e).getUTCDay()===4),t,2)}function sSt(e){return e.getUTCDay()}function aSt(e,t){return Ir(Fp.count(Lo(e)-1,e),t,2)}function oSt(e,t){return Ir(e.getUTCFullYear()%100,t,2)}function lSt(e,t){return e=IW(e),Ir(e.getUTCFullYear()%100,t,2)}function cSt(e,t){return Ir(e.getUTCFullYear()%1e4,t,4)}function uSt(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Tu(e):Tu.ceil(e),Ir(e.getUTCFullYear()%1e4,t,4)}function hSt(){return"+0000"}function EW(){return"%"}function vW(e){return+e}function AW(e){return Math.floor(+e/1e3)}var bW,Cn,fCt,pCt,NW=b(()=>{"use strict";zk();s(oR,"localDate");s(lR,"utcDate");s(F1,"newDate");s(cR,"formatLocale");bW={"-":"",_:" ",0:"0"},Cn=/^\s*\d+/,fCt=/^%/,pCt=/[\\^$*+?|[\]().{}]/g;s(Ir,"pad");s(mCt,"requote");s(V1,"formatRe");s(z1,"formatLookup");s(gCt,"parseWeekdayNumberSunday");s(yCt,"parseWeekdayNumberMonday");s(xCt,"parseWeekNumberSunday");s(bCt,"parseWeekNumberISO");s(kCt,"parseWeekNumberMonday");s(kW,"parseFullYear");s(TW,"parseYear");s(TCt,"parseZone");s(CCt,"parseQuarter");s(SCt,"parseMonthNumber");s(CW,"parseDayOfMonth");s(wCt,"parseDayOfYear");s(SW,"parseHour24");s(_Ct,"parseMinutes");s(ECt,"parseSeconds");s(vCt,"parseMilliseconds");s(ACt,"parseMicroseconds");s(RCt,"parseLiteralPercent");s(LCt,"parseUnixTimestamp");s(DCt,"parseUnixTimestampSeconds");s(wW,"formatDayOfMonth");s(ICt,"formatHour24");s(NCt,"formatHour12");s(OCt,"formatDayOfYear");s(RW,"formatMilliseconds");s(MCt,"formatMicroseconds");s(BCt,"formatMonthNumber");s(PCt,"formatMinutes");s($Ct,"formatSeconds");s(FCt,"formatWeekdayNumberMonday");s(VCt,"formatWeekNumberSunday");s(LW,"dISO");s(zCt,"formatWeekNumberISO");s(GCt,"formatWeekdayNumberSunday");s(WCt,"formatWeekNumberMonday");s(qCt,"formatYear");s(jCt,"formatYearISO");s(UCt,"formatFullYear");s(HCt,"formatFullYearISO");s(YCt,"formatZone");s(_W,"formatUTCDayOfMonth");s(XCt,"formatUTCHour24");s(KCt,"formatUTCHour12");s(QCt,"formatUTCDayOfYear");s(DW,"formatUTCMilliseconds");s(ZCt,"formatUTCMicroseconds");s(JCt,"formatUTCMonthNumber");s(tSt,"formatUTCMinutes");s(eSt,"formatUTCSeconds");s(rSt,"formatUTCWeekdayNumberMonday");s(iSt,"formatUTCWeekNumberSunday");s(IW,"UTCdISO");s(nSt,"formatUTCWeekNumberISO");s(sSt,"formatUTCWeekdayNumberSunday");s(aSt,"formatUTCWeekNumberMonday");s(oSt,"formatUTCYear");s(lSt,"formatUTCYearISO");s(cSt,"formatUTCFullYear");s(uSt,"formatUTCFullYearISO");s(hSt,"formatUTCZone");s(EW,"formatLiteralPercent");s(vW,"formatUnixTimestamp");s(AW,"formatUnixTimestampSeconds")});function uR(e){return Vp=cR(e),xd=Vp.format,OW=Vp.parse,MW=Vp.utcFormat,BW=Vp.utcParse,Vp}var Vp,xd,OW,MW,BW,PW=b(()=>{"use strict";NW();uR({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"]});s(uR,"defaultLocale")});var hR=b(()=>{"use strict";PW()});function dSt(e){return new Date(e)}function fSt(e){return e instanceof Date?+e:+new Date(+e)}function $W(e,t,r,i,n,a,o,l,u,h){var d=B1(),f=d.invert,p=d.domain,m=h(".%L"),g=h(":%S"),y=h("%I:%M"),x=h("%I %p"),k=h("%a %d"),T=h("%b %d"),C=h("%B"),_=h("%Y");function S(w){return(u(w){"use strict";zk();hR();U5();M1();aW();s(dSt,"date");s(fSt,"number");s($W,"calendar");s(Gk,"time")});var VW=b(()=>{"use strict";tW();sW();G5();FW()});function dR(e){for(var t=e.length/6|0,r=new Array(t),i=0;i{"use strict";s(dR,"default")});var fR,GW=b(()=>{"use strict";zW();fR=dR("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var WW=b(()=>{"use strict";GW()});function xi(e){return s(function(){return e},"constant")}var Wk=b(()=>{"use strict";s(xi,"default")});function jW(e){return e>1?0:e<-1?zp:Math.acos(e)}function mR(e){return e>=1?G1:e<=-1?-G1:Math.asin(e)}var pR,$n,Cu,qW,qk,Do,bd,Sn,zp,G1,Gp,jk=b(()=>{"use strict";pR=Math.abs,$n=Math.atan2,Cu=Math.cos,qW=Math.max,qk=Math.min,Do=Math.sin,bd=Math.sqrt,Sn=1e-12,zp=Math.PI,G1=zp/2,Gp=2*zp;s(jW,"acos");s(mR,"asin")});function Uk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new ud(t)}var gR=b(()=>{"use strict";d5();s(Uk,"withPath")});function pSt(e){return e.innerRadius}function mSt(e){return e.outerRadius}function gSt(e){return e.startAngle}function ySt(e){return e.endAngle}function xSt(e){return e&&e.padAngle}function bSt(e,t,r,i,n,a,o,l){var u=r-e,h=i-t,d=o-n,f=l-a,p=f*u-d*h;if(!(p*pO*O+R*R&&(v=$,M=I),{cx:v,cy:M,x01:-d,y01:-f,x11:v*(n/S-1),y11:M*(n/S-1)}}function Io(){var e=pSt,t=mSt,r=xi(0),i=null,n=gSt,a=ySt,o=xSt,l=null,u=Uk(h);function h(){var d,f,p=+e.apply(this,arguments),m=+t.apply(this,arguments),g=n.apply(this,arguments)-G1,y=a.apply(this,arguments)-G1,x=pR(y-g),k=y>g;if(l||(l=d=u()),mSn))l.moveTo(0,0);else if(x>Gp-Sn)l.moveTo(m*Cu(g),m*Do(g)),l.arc(0,0,m,g,y,!k),p>Sn&&(l.moveTo(p*Cu(y),p*Do(y)),l.arc(0,0,p,y,g,k));else{var T=g,C=y,_=g,S=y,w=x,A=x,v=o.apply(this,arguments)/2,M=v>Sn&&(i?+i.apply(this,arguments):bd(p*p+m*m)),$=qk(pR(m-p)/2,+r.apply(this,arguments)),I=$,F=$,B,O;if(M>Sn){var R=mR(M/p*Do(v)),N=mR(M/m*Do(v));(w-=R*2)>Sn?(R*=k?1:-1,_+=R,S-=R):(w=0,_=S=(g+y)/2),(A-=N*2)>Sn?(N*=k?1:-1,T+=N,C-=N):(A=0,T=C=(g+y)/2)}var P=m*Cu(T),E=m*Do(T),D=p*Cu(S),V=p*Do(S);if($>Sn){var L=m*Cu(C),q=m*Do(C),H=p*Cu(_),K=p*Do(_),U;if(xSn?F>Sn?(B=Hk(H,K,P,E,m,F,k),O=Hk(L,q,D,V,m,F,k),l.moveTo(B.cx+B.x01,B.cy+B.y01),F<$?l.arc(B.cx,B.cy,F,$n(B.y01,B.x01),$n(O.y01,O.x01),!k):(l.arc(B.cx,B.cy,F,$n(B.y01,B.x01),$n(B.y11,B.x11),!k),l.arc(0,0,m,$n(B.cy+B.y11,B.cx+B.x11),$n(O.cy+O.y11,O.cx+O.x11),!k),l.arc(O.cx,O.cy,F,$n(O.y11,O.x11),$n(O.y01,O.x01),!k))):(l.moveTo(P,E),l.arc(0,0,m,T,C,!k)):l.moveTo(P,E),!(p>Sn)||!(w>Sn)?l.lineTo(D,V):I>Sn?(B=Hk(D,V,L,q,p,-I,k),O=Hk(P,E,H,K,p,-I,k),l.lineTo(B.cx+B.x01,B.cy+B.y01),I<$?l.arc(B.cx,B.cy,I,$n(B.y01,B.x01),$n(O.y01,O.x01),!k):(l.arc(B.cx,B.cy,I,$n(B.y01,B.x01),$n(B.y11,B.x11),!k),l.arc(0,0,p,$n(B.cy+B.y11,B.cx+B.x11),$n(O.cy+O.y11,O.cx+O.x11),k),l.arc(O.cx,O.cy,I,$n(O.y11,O.x11),$n(O.y01,O.x01),!k))):l.arc(0,0,p,S,_,k)}if(l.closePath(),d)return l=null,d+""||null}return s(h,"arc"),h.centroid=function(){var d=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+n.apply(this,arguments)+ +a.apply(this,arguments))/2-zp/2;return[Cu(f)*d,Do(f)*d]},h.innerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:xi(+d),h):e},h.outerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:xi(+d),h):t},h.cornerRadius=function(d){return arguments.length?(r=typeof d=="function"?d:xi(+d),h):r},h.padRadius=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:xi(+d),h):i},h.startAngle=function(d){return arguments.length?(n=typeof d=="function"?d:xi(+d),h):n},h.endAngle=function(d){return arguments.length?(a=typeof d=="function"?d:xi(+d),h):a},h.padAngle=function(d){return arguments.length?(o=typeof d=="function"?d:xi(+d),h):o},h.context=function(d){return arguments.length?(l=d??null,h):l},h}var UW=b(()=>{"use strict";Wk();jk();gR();s(pSt,"arcInnerRadius");s(mSt,"arcOuterRadius");s(gSt,"arcStartAngle");s(ySt,"arcEndAngle");s(xSt,"arcPadAngle");s(bSt,"intersect");s(Hk,"cornerTangents");s(Io,"default")});function W1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}var Ede,yR=b(()=>{"use strict";Ede=Array.prototype.slice;s(W1,"default")});function HW(e){this._context=e}function xl(e){return new HW(e)}var xR=b(()=>{"use strict";s(HW,"Linear");HW.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}},"point")};s(xl,"default")});function YW(e){return e[0]}function XW(e){return e[1]}var KW=b(()=>{"use strict";s(YW,"x");s(XW,"y")});function No(e,t){var r=xi(!0),i=null,n=xl,a=null,o=Uk(l);e=typeof e=="function"?e:e===void 0?YW:xi(e),t=typeof t=="function"?t:t===void 0?XW:xi(t);function l(u){var h,d=(u=W1(u)).length,f,p=!1,m;for(i==null&&(a=n(m=o())),h=0;h<=d;++h)!(h{"use strict";yR();Wk();xR();gR();KW();s(No,"default")});function bR(e,t){return te?1:t>=e?0:NaN}var ZW=b(()=>{"use strict";s(bR,"default")});function kR(e){return e}var JW=b(()=>{"use strict";s(kR,"default")});function Yk(){var e=kR,t=bR,r=null,i=xi(0),n=xi(Gp),a=xi(0);function o(l){var u,h=(l=W1(l)).length,d,f,p=0,m=new Array(h),g=new Array(h),y=+i.apply(this,arguments),x=Math.min(Gp,Math.max(-Gp,n.apply(this,arguments)-y)),k,T=Math.min(Math.abs(x)/h,a.apply(this,arguments)),C=T*(x<0?-1:1),_;for(u=0;u0&&(p+=_);for(t!=null?m.sort(function(S,w){return t(g[S],g[w])}):r!=null&&m.sort(function(S,w){return r(l[S],l[w])}),u=0,f=p?(x-h*C)/p:0;u0?_*f:0)+C,g[d]={data:l[d],index:u,value:_,startAngle:y,endAngle:k,padAngle:T};return g}return s(o,"pie"),o.value=function(l){return arguments.length?(e=typeof l=="function"?l:xi(+l),o):e},o.sortValues=function(l){return arguments.length?(t=l,r=null,o):t},o.sort=function(l){return arguments.length?(r=l,t=null,o):r},o.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:xi(+l),o):i},o.endAngle=function(l){return arguments.length?(n=typeof l=="function"?l:xi(+l),o):n},o.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:xi(+l),o):a},o}var tq=b(()=>{"use strict";yR();Wk();ZW();JW();jk();s(Yk,"default")});function q1(e){return new Xk(e,!0)}function j1(e){return new Xk(e,!1)}var Xk,eq=b(()=>{"use strict";Xk=class{static{s(this,"Bump")}constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}};s(q1,"bumpX");s(j1,"bumpY")});function ya(){}var U1=b(()=>{"use strict";s(ya,"default")});function Wp(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function H1(e){this._context=e}function Oo(e){return new H1(e)}var Y1=b(()=>{"use strict";s(Wp,"point");s(H1,"Basis");H1.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 3:Wp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Wp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};s(Oo,"default")});function rq(e){this._context=e}function Kk(e){return new rq(e)}var iq=b(()=>{"use strict";U1();Y1();s(rq,"BasisClosed");rq.prototype={areaStart:ya,areaEnd:ya,lineStart:s(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:s(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);break}}},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Wp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};s(Kk,"default")});function nq(e){this._context=e}function Qk(e){return new nq(e)}var sq=b(()=>{"use strict";Y1();s(nq,"BasisOpen");nq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Wp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};s(Qk,"default")});function aq(e,t){this._basis=new H1(e),this._beta=t}var TR,oq=b(()=>{"use strict";Y1();s(aq,"Bundle");aq.prototype={lineStart:s(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:s(function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,o=t[r]-n,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+u*a),this._beta*t[l]+(1-this._beta)*(n+u*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:s(function(e,t){this._x.push(+e),this._y.push(+t)},"point")};TR=s((function e(t){function r(i){return t===1?new H1(i):new aq(i,t)}return s(r,"bundle"),r.beta=function(i){return e(+i)},r}),"custom")(.85)});function qp(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Zk(e,t){this._context=e,this._k=(1-t)/6}var X1,K1=b(()=>{"use strict";s(qp,"point");s(Zk,"Cardinal");Zk.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:qp(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:qp(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};X1=s((function e(t){function r(i){return new Zk(i,t)}return s(r,"cardinal"),r.tension=function(i){return e(+i)},r}),"custom")(0)});function Jk(e,t){this._context=e,this._k=(1-t)/6}var CR,SR=b(()=>{"use strict";U1();K1();s(Jk,"CardinalClosed");Jk.prototype={areaStart:ya,areaEnd:ya,lineStart:s(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:s(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);break}}},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:qp(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};CR=s((function e(t){function r(i){return new Jk(i,t)}return s(r,"cardinal"),r.tension=function(i){return e(+i)},r}),"custom")(0)});function tT(e,t){this._context=e,this._k=(1-t)/6}var wR,_R=b(()=>{"use strict";K1();s(tT,"CardinalOpen");tT.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qp(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};wR=s((function e(t){function r(i){return new tT(i,t)}return s(r,"cardinal"),r.tension=function(i){return e(+i)},r}),"custom")(0)});function Q1(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Sn){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,n=(n*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Sn){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/d,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function lq(e,t){this._context=e,this._alpha=t}var Z1,eT=b(()=>{"use strict";jk();K1();s(Q1,"point");s(lq,"CatmullRom");lq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(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:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Q1(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};Z1=s((function e(t){function r(i){return t?new lq(i,t):new Zk(i,0)}return s(r,"catmullRom"),r.alpha=function(i){return e(+i)},r}),"custom")(.5)});function cq(e,t){this._context=e,this._alpha=t}var ER,uq=b(()=>{"use strict";SR();U1();eT();s(cq,"CatmullRomClosed");cq.prototype={areaStart:ya,areaEnd:ya,lineStart:s(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:s(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);break}}},"lineEnd"),point:s(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Q1(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};ER=s((function e(t){function r(i){return t?new cq(i,t):new Jk(i,0)}return s(r,"catmullRom"),r.alpha=function(i){return e(+i)},r}),"custom")(.5)});function hq(e,t){this._context=e,this._alpha=t}var vR,dq=b(()=>{"use strict";_R();eT();s(hq,"CatmullRomOpen");hq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(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:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(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:Q1(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};vR=s((function e(t){function r(i){return t?new hq(i,t):new tT(i,0)}return s(r,"catmullRom"),r.alpha=function(i){return e(+i)},r}),"custom")(.5)});function fq(e){this._context=e}function rT(e){return new fq(e)}var pq=b(()=>{"use strict";U1();s(fq,"LinearClosed");fq.prototype={areaStart:ya,areaEnd:ya,lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){this._point&&this._context.closePath()},"lineEnd"),point:s(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")};s(rT,"default")});function mq(e){return e<0?-1:1}function gq(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),l=(a*n+o*i)/(i+n);return(mq(a)+mq(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function yq(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function AR(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,n+l*t,a-l,o-l*r,a,o)}function iT(e){this._context=e}function xq(e){this._context=new bq(e)}function bq(e){this._context=e}function J1(e){return new iT(e)}function t0(e){return new xq(e)}var kq=b(()=>{"use strict";s(mq,"sign");s(gq,"slope3");s(yq,"slope2");s(AR,"point");s(iT,"MonotoneX");iT.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:AR(this,this._t0,yq(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,AR(this,yq(this,r=gq(this,e,t)),r);break;default:AR(this,this._t0,r=gq(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")};s(xq,"MonotoneY");(xq.prototype=Object.create(iT.prototype)).point=function(e,t){iT.prototype.point.call(this,t,e)};s(bq,"ReflectContext");bq.prototype={moveTo:s(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:s(function(){this._context.closePath()},"closePath"),lineTo:s(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:s(function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)},"bezierCurveTo")};s(J1,"monotoneX");s(t0,"monotoneY")});function Cq(e){this._context=e}function Tq(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),o=new Array(r);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t{"use strict";s(Cq,"Natural");Cq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:s(function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Tq(e),n=Tq(t),a=0,o=1;o{"use strict";s(nT,"Step");nT.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:s(function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t},"point")};s(Up,"default");s(e0,"stepBefore");s(r0,"stepAfter")});var _q=b(()=>{"use strict";UW();QW();tq();iq();sq();Y1();eq();oq();SR();_R();K1();uq();dq();eT();pq();xR();kq();Sq();wq()});var Eq=b(()=>{"use strict"});var vq=b(()=>{"use strict"});function Su(e,t,r){this.k=e,this.x=t,this.y=r}function LR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return RR;return e.__zoom}var RR,DR=b(()=>{"use strict";s(Su,"Transform");Su.prototype={constructor:Su,scale:s(function(e){return e===1?this:new Su(this.k*e,this.x,this.y)},"scale"),translate:s(function(e,t){return e===0&t===0?this:new Su(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:s(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:s(function(e){return e*this.k+this.x},"applyX"),applyY:s(function(e){return e*this.k+this.y},"applyY"),invert:s(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:s(function(e){return(e-this.x)/this.k},"invertX"),invertY:s(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:s(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:s(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:s(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};RR=new Su(1,0,0);LR.prototype=Su.prototype;s(LR,"transform")});var Aq=b(()=>{"use strict"});var Rq=b(()=>{"use strict";Ck();Eq();vq();DR();Aq()});var Lq=b(()=>{"use strict";Rq();DR()});var lr=b(()=>{"use strict";du();$F();iG();oG();Rp();lG();cG();bA();RV();uG();o5();hG();fG();w5();vG();QG();Ip();d5();ZG();dG();JG();VW();WW();wo();_q();zk();hR();gk();Ck();Lq()});var Dq=Be(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.BLANK_URL=wn.relativeFirstCharacters=wn.whitespaceEscapeCharsRegex=wn.urlSchemeRegex=wn.ctrlCharactersRegex=wn.htmlCtrlEntityRegex=wn.htmlEntitiesRegex=wn.invalidProtocolRegex=void 0;wn.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;wn.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;wn.htmlCtrlEntityRegex=/&(newline|tab);/gi;wn.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;wn.urlSchemeRegex=/^.+(:|:)/gim;wn.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;wn.relativeFirstCharacters=[".","/"];wn.BLANK_URL="about:blank"});var Hp=Be(sT=>{"use strict";Object.defineProperty(sT,"__esModule",{value:!0});sT.sanitizeUrl=void 0;var Qn=Dq();function kSt(e){return Qn.relativeFirstCharacters.indexOf(e[0])>-1}s(kSt,"isRelativeUrlWithoutProtocol");function TSt(e){var t=e.replace(Qn.ctrlCharactersRegex,"");return t.replace(Qn.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}s(TSt,"decodeHtmlCharacters");function CSt(e){return URL.canParse(e)}s(CSt,"isValidUrl");function Iq(e){try{return decodeURIComponent(e)}catch{return e}}s(Iq,"decodeURI");function SSt(e){if(!e)return Qn.BLANK_URL;var t,r=Iq(e.trim());do r=TSt(r).replace(Qn.htmlCtrlEntityRegex,"").replace(Qn.ctrlCharactersRegex,"").replace(Qn.whitespaceEscapeCharsRegex,"").trim(),r=Iq(r),t=r.match(Qn.ctrlCharactersRegex)||r.match(Qn.htmlEntitiesRegex)||r.match(Qn.htmlCtrlEntityRegex)||r.match(Qn.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Qn.BLANK_URL;if(kSt(i))return i;var n=i.trimStart(),a=n.match(Qn.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(Qn.invalidProtocolRegex.test(o))return Qn.BLANK_URL;var l=n.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return l;if(o==="http:"||o==="https:"){if(!CSt(l))return Qn.BLANK_URL;var u=new URL(l);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return l}s(SSt,"sanitizeUrl");sT.sanitizeUrl=SSt});var IR,kd,aT,Nq,oT,lT,Fn,i0,cT,Td=b(()=>{"use strict";IR=fs(Hp(),1);lr();fr();kd=s((e,t)=>{let r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.name&&r.attr("name",t.name),t.rx&&r.attr("rx",t.rx),t.ry&&r.attr("ry",t.ry),t.attrs!==void 0)for(let i in t.attrs)r.attr(i,t.attrs[i]);return t.class&&r.attr("class",t.class),r},"drawRect"),aT=s((e,t)=>{let r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};kd(e,r).lower()},"drawBackgroundRect"),Nq=s((e,t)=>{let r=t.text.replace(yp," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class&&i.attr("class",t.class);let n=i.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),i},"drawText"),oT=s((e,t,r,i)=>{let n=e.append("image");n.attr("x",t),n.attr("y",r);let a=(0,IR.sanitizeUrl)(i);n.attr("xlink:href",a)},"drawImage"),lT=s((e,t,r,i)=>{let n=e.append("use");n.attr("x",t),n.attr("y",r);let a=(0,IR.sanitizeUrl)(i);n.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),Fn=s(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),i0=s(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),cT=s(()=>{let e=vt(".mermaidTooltip");return e.empty()&&(e=vt("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),e},"createTooltip")});var Oq,NR,Mq,wSt,_St,ESt,vSt,ASt,RSt,LSt,DSt,ISt,NSt,OSt,bc,Mo,Bq=b(()=>{"use strict";fr();Td();Oq=fs(Hp(),1),NR=s(function(e,t){return kd(e,t)},"drawRect"),Mq=s(function(e,t,r,i,n,a){let o=e.append("image");o.attr("width",t),o.attr("height",r),o.attr("x",i),o.attr("y",n);let l=a.startsWith("data:image/png;base64")?a:(0,Oq.sanitizeUrl)(a);o.attr("xlink:href",l)},"drawImage"),wSt=s((e,t,r,i)=>{let n=e.append("g"),a=0;for(let o of t){let l=o.textColor?o.textColor:"#444444",u=o.lineColor?o.lineColor:"#444444",h=o.offsetX?parseInt(o.offsetX):0,d=o.offsetY?parseInt(o.offsetY):0,f="";if(a===0){let m=n.append("line");m.attr("x1",o.startPoint.x),m.attr("y1",o.startPoint.y),m.attr("x2",o.endPoint.x),m.attr("y2",o.endPoint.y),m.attr("stroke-width","1"),m.attr("stroke",u),m.style("fill","none"),o.type!=="rel_b"&&m.attr("marker-end","url("+f+"#"+i+"-arrowhead)"),(o.type==="birel"||o.type==="rel_b")&&m.attr("marker-start","url("+f+"#"+i+"-arrowend)"),a=-1}else{let m=n.append("path");m.attr("fill","none").attr("stroke-width","1").attr("stroke",u).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",o.startPoint.x).replaceAll("starty",o.startPoint.y).replaceAll("controlx",o.startPoint.x+(o.endPoint.x-o.startPoint.x)/2-(o.endPoint.x-o.startPoint.x)/4).replaceAll("controly",o.startPoint.y+(o.endPoint.y-o.startPoint.y)/2).replaceAll("stopx",o.endPoint.x).replaceAll("stopy",o.endPoint.y)),o.type!=="rel_b"&&m.attr("marker-end","url("+f+"#"+i+"-arrowhead)"),(o.type==="birel"||o.type==="rel_b")&&m.attr("marker-start","url("+f+"#"+i+"-arrowend)")}let p=r.messageFont();bc(r)(o.label.text,n,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+h,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+d,o.label.width,o.label.height,{fill:l},p),o.techn&&o.techn.text!==""&&(p=r.messageFont(),bc(r)("["+o.techn.text+"]",n,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+h,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+r.messageFontSize+5+d,Math.max(o.label.width,o.techn.width),o.techn.height,{fill:l,"font-style":"italic"},p))}},"drawRels"),_St=s(function(e,t,r){let i=e.append("g"),n=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",o=t.fontColor?t.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(l={"stroke-width":1});let u={x:t.x,y:t.y,fill:n,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:l};NR(i,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=o,bc(r)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},h),t.type&&t.type.text!==""&&(h=r.boundaryFont(),h.fontColor=o,bc(r)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},h)),t.descr&&t.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=o,bc(r)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},h))},"drawBoundary"),ESt=s(function(e,t,r){let i=t.bgColor?t.bgColor:r[t.typeC4Shape.text+"_bg_color"],n=t.borderColor?t.borderColor:r[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.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(t.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=";break}let l=e.append("g");l.attr("class","person-man");let u=Fn();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=t.x,u.y=t.y,u.fill=i,u.width=t.width,u.height=t.height,u.stroke=n,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},NR(l,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let h=OSt(r,t.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":Mq(l,48,48,t.x+t.width/2-24,t.y+t.image.Y,o);break}let d=r[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,bc(r)(t.label.text,l,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=r[t.typeC4Shape.text+"Font"](),d.fontColor=a,t.techn&&t.techn?.text!==""?bc(r)(t.techn.text,l,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},d):t.type&&t.type.text!==""&&bc(r)(t.type.text,l,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=r.personFont(),d.fontColor=a,bc(r)(t.descr.text,l,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},"drawC4Shape"),vSt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),ASt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),RSt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),LSt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),DSt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),ISt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),NSt=s(function(e,t){let i=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);i.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"),i.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"),OSt=s((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),bc=(function(){function e(n,a,o,l,u,h,d){let f=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(n);i(f,d)}s(e,"byText");function t(n,a,o,l,u,h,d,f){let{fontSize:p,fontFamily:m,fontWeight:g}=f,y=n.split(qt.lineBreakRegex);for(let x=0;x{"use strict";MSt=typeof global=="object"&&global&&global.Object===Object&&global,hT=MSt});var BSt,PSt,Fi,Ga=b(()=>{"use strict";OR();BSt=typeof self=="object"&&self&&self.Object===Object&&self,PSt=hT||BSt||Function("return this")(),Fi=PSt});var $St,_n,Cd=b(()=>{"use strict";Ga();$St=Fi.Symbol,_n=$St});function zSt(e){var t=FSt.call(e,n0),r=e[n0];try{e[n0]=void 0;var i=!0}catch{}var n=VSt.call(e);return i&&(t?e[n0]=r:delete e[n0]),n}var Pq,FSt,VSt,n0,$q,Fq=b(()=>{"use strict";Cd();Pq=Object.prototype,FSt=Pq.hasOwnProperty,VSt=Pq.toString,n0=_n?_n.toStringTag:void 0;s(zSt,"getRawTag");$q=zSt});function qSt(e){return WSt.call(e)}var GSt,WSt,Vq,zq=b(()=>{"use strict";GSt=Object.prototype,WSt=GSt.toString;s(qSt,"objectToString");Vq=qSt});function HSt(e){return e==null?e===void 0?USt:jSt:Gq&&Gq in Object(e)?$q(e):Vq(e)}var jSt,USt,Gq,Vn,kc=b(()=>{"use strict";Cd();Fq();zq();jSt="[object Null]",USt="[object Undefined]",Gq=_n?_n.toStringTag:void 0;s(HSt,"baseGetTag");Vn=HSt});function YSt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ii,xa=b(()=>{"use strict";s(YSt,"isObject");ii=YSt});function JSt(e){if(!ii(e))return!1;var t=Vn(e);return t==KSt||t==QSt||t==XSt||t==ZSt}var XSt,KSt,QSt,ZSt,en,s0=b(()=>{"use strict";kc();xa();XSt="[object AsyncFunction]",KSt="[object Function]",QSt="[object GeneratorFunction]",ZSt="[object Proxy]";s(JSt,"isFunction");en=JSt});var twt,dT,Wq=b(()=>{"use strict";Ga();twt=Fi["__core-js_shared__"],dT=twt});function ewt(e){return!!qq&&qq in e}var qq,jq,Uq=b(()=>{"use strict";Wq();qq=(function(){var e=/[^.]+$/.exec(dT&&dT.keys&&dT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();s(ewt,"isMasked");jq=ewt});function nwt(e){if(e!=null){try{return iwt.call(e)}catch{}try{return e+""}catch{}}return""}var rwt,iwt,Tc,MR=b(()=>{"use strict";rwt=Function.prototype,iwt=rwt.toString;s(nwt,"toSource");Tc=nwt});function dwt(e){if(!ii(e)||jq(e))return!1;var t=en(e)?hwt:awt;return t.test(Tc(e))}var swt,awt,owt,lwt,cwt,uwt,hwt,Hq,Yq=b(()=>{"use strict";s0();Uq();xa();MR();swt=/[\\^$.*+?()[\]{}|]/g,awt=/^\[object .+?Constructor\]$/,owt=Function.prototype,lwt=Object.prototype,cwt=owt.toString,uwt=lwt.hasOwnProperty,hwt=RegExp("^"+cwt.call(uwt).replace(swt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s(dwt,"baseIsNative");Hq=dwt});function fwt(e,t){return e?.[t]}var Xq,Kq=b(()=>{"use strict";s(fwt,"getValue");Xq=fwt});function pwt(e,t){var r=Xq(e,t);return Hq(r)?r:void 0}var Fs,wu=b(()=>{"use strict";Yq();Kq();s(pwt,"getNative");Fs=pwt});var mwt,Cc,a0=b(()=>{"use strict";wu();mwt=Fs(Object,"create"),Cc=mwt});function gwt(){this.__data__=Cc?Cc(null):{},this.size=0}var Qq,Zq=b(()=>{"use strict";a0();s(gwt,"hashClear");Qq=gwt});function ywt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Jq,tj=b(()=>{"use strict";s(ywt,"hashDelete");Jq=ywt});function Twt(e){var t=this.__data__;if(Cc){var r=t[e];return r===xwt?void 0:r}return kwt.call(t,e)?t[e]:void 0}var xwt,bwt,kwt,ej,rj=b(()=>{"use strict";a0();xwt="__lodash_hash_undefined__",bwt=Object.prototype,kwt=bwt.hasOwnProperty;s(Twt,"hashGet");ej=Twt});function wwt(e){var t=this.__data__;return Cc?t[e]!==void 0:Swt.call(t,e)}var Cwt,Swt,ij,nj=b(()=>{"use strict";a0();Cwt=Object.prototype,Swt=Cwt.hasOwnProperty;s(wwt,"hashHas");ij=wwt});function Ewt(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Cc&&t===void 0?_wt:t,this}var _wt,sj,aj=b(()=>{"use strict";a0();_wt="__lodash_hash_undefined__";s(Ewt,"hashSet");sj=Ewt});function Yp(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";Zq();tj();rj();nj();aj();s(Yp,"Hash");Yp.prototype.clear=Qq;Yp.prototype.delete=Jq;Yp.prototype.get=ej;Yp.prototype.has=ij;Yp.prototype.set=sj;BR=Yp});function vwt(){this.__data__=[],this.size=0}var lj,cj=b(()=>{"use strict";s(vwt,"listCacheClear");lj=vwt});function Awt(e,t){return e===t||e!==e&&t!==t}var Wa,Sd=b(()=>{"use strict";s(Awt,"eq");Wa=Awt});function Rwt(e,t){for(var r=e.length;r--;)if(Wa(e[r][0],t))return r;return-1}var _u,o0=b(()=>{"use strict";Sd();s(Rwt,"assocIndexOf");_u=Rwt});function Iwt(e){var t=this.__data__,r=_u(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():Dwt.call(t,r,1),--this.size,!0}var Lwt,Dwt,uj,hj=b(()=>{"use strict";o0();Lwt=Array.prototype,Dwt=Lwt.splice;s(Iwt,"listCacheDelete");uj=Iwt});function Nwt(e){var t=this.__data__,r=_u(t,e);return r<0?void 0:t[r][1]}var dj,fj=b(()=>{"use strict";o0();s(Nwt,"listCacheGet");dj=Nwt});function Owt(e){return _u(this.__data__,e)>-1}var pj,mj=b(()=>{"use strict";o0();s(Owt,"listCacheHas");pj=Owt});function Mwt(e,t){var r=this.__data__,i=_u(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var gj,yj=b(()=>{"use strict";o0();s(Mwt,"listCacheSet");gj=Mwt});function Xp(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";cj();hj();fj();mj();yj();s(Xp,"ListCache");Xp.prototype.clear=lj;Xp.prototype.delete=uj;Xp.prototype.get=dj;Xp.prototype.has=pj;Xp.prototype.set=gj;Eu=Xp});var Bwt,vu,fT=b(()=>{"use strict";wu();Ga();Bwt=Fs(Fi,"Map"),vu=Bwt});function Pwt(){this.size=0,this.__data__={hash:new BR,map:new(vu||Eu),string:new BR}}var xj,bj=b(()=>{"use strict";oj();l0();fT();s(Pwt,"mapCacheClear");xj=Pwt});function $wt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var kj,Tj=b(()=>{"use strict";s($wt,"isKeyable");kj=$wt});function Fwt(e,t){var r=e.__data__;return kj(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Au,c0=b(()=>{"use strict";Tj();s(Fwt,"getMapData");Au=Fwt});function Vwt(e){var t=Au(this,e).delete(e);return this.size-=t?1:0,t}var Cj,Sj=b(()=>{"use strict";c0();s(Vwt,"mapCacheDelete");Cj=Vwt});function zwt(e){return Au(this,e).get(e)}var wj,_j=b(()=>{"use strict";c0();s(zwt,"mapCacheGet");wj=zwt});function Gwt(e){return Au(this,e).has(e)}var Ej,vj=b(()=>{"use strict";c0();s(Gwt,"mapCacheHas");Ej=Gwt});function Wwt(e,t){var r=Au(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var Aj,Rj=b(()=>{"use strict";c0();s(Wwt,"mapCacheSet");Aj=Wwt});function Kp(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";bj();Sj();_j();vj();Rj();s(Kp,"MapCache");Kp.prototype.clear=xj;Kp.prototype.delete=Cj;Kp.prototype.get=wj;Kp.prototype.has=Ej;Kp.prototype.set=Aj;wd=Kp});function PR(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(qwt);var r=s(function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=e.apply(this,i);return r.cache=a.set(n,o)||a,o},"memoized");return r.cache=new(PR.Cache||wd),r}var qwt,Qp,$R=b(()=>{"use strict";pT();qwt="Expected a function";s(PR,"memoize");PR.Cache=wd;Qp=PR});function jwt(){this.__data__=new Eu,this.size=0}var Lj,Dj=b(()=>{"use strict";l0();s(jwt,"stackClear");Lj=jwt});function Uwt(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Ij,Nj=b(()=>{"use strict";s(Uwt,"stackDelete");Ij=Uwt});function Hwt(e){return this.__data__.get(e)}var Oj,Mj=b(()=>{"use strict";s(Hwt,"stackGet");Oj=Hwt});function Ywt(e){return this.__data__.has(e)}var Bj,Pj=b(()=>{"use strict";s(Ywt,"stackHas");Bj=Ywt});function Kwt(e,t){var r=this.__data__;if(r instanceof Eu){var i=r.__data__;if(!vu||i.length{"use strict";l0();fT();pT();Xwt=200;s(Kwt,"stackSet");$j=Kwt});function Zp(e){var t=this.__data__=new Eu(e);this.size=t.size}var bl,u0=b(()=>{"use strict";l0();Dj();Nj();Mj();Pj();Fj();s(Zp,"Stack");Zp.prototype.clear=Lj;Zp.prototype.delete=Ij;Zp.prototype.get=Oj;Zp.prototype.has=Bj;Zp.prototype.set=$j;bl=Zp});var Qwt,Jp,FR=b(()=>{"use strict";wu();Qwt=(function(){try{var e=Fs(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Jp=Qwt});function Zwt(e,t,r){t=="__proto__"&&Jp?Jp(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var kl,tm=b(()=>{"use strict";FR();s(Zwt,"baseAssignValue");kl=Zwt});function Jwt(e,t,r){(r!==void 0&&!Wa(e[t],r)||r===void 0&&!(t in e))&&kl(e,t,r)}var h0,VR=b(()=>{"use strict";tm();Sd();s(Jwt,"assignMergeValue");h0=Jwt});function t_t(e){return function(t,r,i){for(var n=-1,a=Object(t),o=i(t),l=o.length;l--;){var u=o[e?l:++n];if(r(a[u],u,a)===!1)break}return t}}var Vj,zj=b(()=>{"use strict";s(t_t,"createBaseFor");Vj=t_t});var e_t,em,mT=b(()=>{"use strict";zj();e_t=Vj(),em=e_t});function i_t(e,t){if(t)return e.slice();var r=e.length,i=qj?qj(r):new e.constructor(r);return e.copy(i),i}var jj,Gj,r_t,Wj,qj,gT,zR=b(()=>{"use strict";Ga();jj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gj=jj&&typeof module=="object"&&module&&!module.nodeType&&module,r_t=Gj&&Gj.exports===jj,Wj=r_t?Fi.Buffer:void 0,qj=Wj?Wj.allocUnsafe:void 0;s(i_t,"cloneBuffer");gT=i_t});var n_t,rm,GR=b(()=>{"use strict";Ga();n_t=Fi.Uint8Array,rm=n_t});function s_t(e){var t=new e.constructor(e.byteLength);return new rm(t).set(new rm(e)),t}var im,yT=b(()=>{"use strict";GR();s(s_t,"cloneArrayBuffer");im=s_t});function a_t(e,t){var r=t?im(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var xT,WR=b(()=>{"use strict";yT();s(a_t,"cloneTypedArray");xT=a_t});function o_t(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r{"use strict";s(o_t,"copyArray");bT=o_t});var Uj,l_t,Hj,Yj=b(()=>{"use strict";xa();Uj=Object.create,l_t=(function(){function e(){}return s(e,"object"),function(t){if(!ii(t))return{};if(Uj)return Uj(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),Hj=l_t});function c_t(e,t){return function(r){return e(t(r))}}var kT,jR=b(()=>{"use strict";s(c_t,"overArg");kT=c_t});var u_t,nm,TT=b(()=>{"use strict";jR();u_t=kT(Object.getPrototypeOf,Object),nm=u_t});function d_t(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||h_t;return e===r}var h_t,Tl,sm=b(()=>{"use strict";h_t=Object.prototype;s(d_t,"isPrototype");Tl=d_t});function f_t(e){return typeof e.constructor=="function"&&!Tl(e)?Hj(nm(e)):{}}var CT,UR=b(()=>{"use strict";Yj();TT();sm();s(f_t,"initCloneObject");CT=f_t});function p_t(e){return e!=null&&typeof e=="object"}var Ni,qa=b(()=>{"use strict";s(p_t,"isObjectLike");Ni=p_t});function g_t(e){return Ni(e)&&Vn(e)==m_t}var m_t,HR,Xj=b(()=>{"use strict";kc();qa();m_t="[object Arguments]";s(g_t,"baseIsArguments");HR=g_t});var Kj,y_t,x_t,b_t,Bo,am=b(()=>{"use strict";Xj();qa();Kj=Object.prototype,y_t=Kj.hasOwnProperty,x_t=Kj.propertyIsEnumerable,b_t=HR((function(){return arguments})())?HR:function(e){return Ni(e)&&y_t.call(e,"callee")&&!x_t.call(e,"callee")},Bo=b_t});var k_t,fe,Si=b(()=>{"use strict";k_t=Array.isArray,fe=k_t});function C_t(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=T_t}var T_t,om,ST=b(()=>{"use strict";T_t=9007199254740991;s(C_t,"isLength");om=C_t});function S_t(e){return e!=null&&om(e.length)&&!en(e)}var Vi,ja=b(()=>{"use strict";s0();ST();s(S_t,"isArrayLike");Vi=S_t});function w_t(e){return Ni(e)&&Vi(e)}var _d,wT=b(()=>{"use strict";ja();qa();s(w_t,"isArrayLikeObject");_d=w_t});function __t(){return!1}var Qj,Zj=b(()=>{"use strict";s(__t,"stubFalse");Qj=__t});var eU,Jj,E_t,tU,v_t,A_t,Po,lm=b(()=>{"use strict";Ga();Zj();eU=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jj=eU&&typeof module=="object"&&module&&!module.nodeType&&module,E_t=Jj&&Jj.exports===eU,tU=E_t?Fi.Buffer:void 0,v_t=tU?tU.isBuffer:void 0,A_t=v_t||Qj,Po=A_t});function O_t(e){if(!Ni(e)||Vn(e)!=R_t)return!1;var t=nm(e);if(t===null)return!0;var r=I_t.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&rU.call(r)==N_t}var R_t,L_t,D_t,rU,I_t,N_t,iU,nU=b(()=>{"use strict";kc();TT();qa();R_t="[object Object]",L_t=Function.prototype,D_t=Object.prototype,rU=L_t.toString,I_t=D_t.hasOwnProperty,N_t=rU.call(Object);s(O_t,"isPlainObject");iU=O_t});function sEt(e){return Ni(e)&&om(e.length)&&!!bi[Vn(e)]}var M_t,B_t,P_t,$_t,F_t,V_t,z_t,G_t,W_t,q_t,j_t,U_t,H_t,Y_t,X_t,K_t,Q_t,Z_t,J_t,tEt,eEt,rEt,iEt,nEt,bi,sU,aU=b(()=>{"use strict";kc();ST();qa();M_t="[object Arguments]",B_t="[object Array]",P_t="[object Boolean]",$_t="[object Date]",F_t="[object Error]",V_t="[object Function]",z_t="[object Map]",G_t="[object Number]",W_t="[object Object]",q_t="[object RegExp]",j_t="[object Set]",U_t="[object String]",H_t="[object WeakMap]",Y_t="[object ArrayBuffer]",X_t="[object DataView]",K_t="[object Float32Array]",Q_t="[object Float64Array]",Z_t="[object Int8Array]",J_t="[object Int16Array]",tEt="[object Int32Array]",eEt="[object Uint8Array]",rEt="[object Uint8ClampedArray]",iEt="[object Uint16Array]",nEt="[object Uint32Array]",bi={};bi[K_t]=bi[Q_t]=bi[Z_t]=bi[J_t]=bi[tEt]=bi[eEt]=bi[rEt]=bi[iEt]=bi[nEt]=!0;bi[M_t]=bi[B_t]=bi[Y_t]=bi[P_t]=bi[X_t]=bi[$_t]=bi[F_t]=bi[V_t]=bi[z_t]=bi[G_t]=bi[W_t]=bi[q_t]=bi[j_t]=bi[U_t]=bi[H_t]=!1;s(sEt,"baseIsTypedArray");sU=sEt});function aEt(e){return function(t){return e(t)}}var Ua,Ed=b(()=>{"use strict";s(aEt,"baseUnary");Ua=aEt});var oU,d0,oEt,YR,lEt,Ha,f0=b(()=>{"use strict";OR();oU=typeof exports=="object"&&exports&&!exports.nodeType&&exports,d0=oU&&typeof module=="object"&&module&&!module.nodeType&&module,oEt=d0&&d0.exports===oU,YR=oEt&&hT.process,lEt=(function(){try{var e=d0&&d0.require&&d0.require("util").types;return e||YR&&YR.binding&&YR.binding("util")}catch{}})(),Ha=lEt});var lU,cEt,Ru,p0=b(()=>{"use strict";aU();Ed();f0();lU=Ha&&Ha.isTypedArray,cEt=lU?Ua(lU):sU,Ru=cEt});function uEt(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var m0,XR=b(()=>{"use strict";s(uEt,"safeGet");m0=uEt});function fEt(e,t,r){var i=e[t];(!(dEt.call(e,t)&&Wa(i,r))||r===void 0&&!(t in e))&&kl(e,t,r)}var hEt,dEt,Cl,cm=b(()=>{"use strict";tm();Sd();hEt=Object.prototype,dEt=hEt.hasOwnProperty;s(fEt,"assignValue");Cl=fEt});function pEt(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a{"use strict";cm();tm();s(pEt,"copyObject");Ya=pEt});function mEt(e,t){for(var r=-1,i=Array(e);++r{"use strict";s(mEt,"baseTimes");cU=mEt});function xEt(e,t){var r=typeof e;return t=t??gEt,!!t&&(r=="number"||r!="symbol"&&yEt.test(e))&&e>-1&&e%1==0&&e{"use strict";gEt=9007199254740991,yEt=/^(?:0|[1-9]\d*)$/;s(xEt,"isIndex");Lu=xEt});function TEt(e,t){var r=fe(e),i=!r&&Bo(e),n=!r&&!i&&Po(e),a=!r&&!i&&!n&&Ru(e),o=r||i||n||a,l=o?cU(e.length,String):[],u=l.length;for(var h in e)(t||kEt.call(e,h))&&!(o&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Lu(h,u)))&&l.push(h);return l}var bEt,kEt,_T,KR=b(()=>{"use strict";uU();am();Si();lm();g0();p0();bEt=Object.prototype,kEt=bEt.hasOwnProperty;s(TEt,"arrayLikeKeys");_T=TEt});function CEt(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var hU,dU=b(()=>{"use strict";s(CEt,"nativeKeysIn");hU=CEt});function _Et(e){if(!ii(e))return hU(e);var t=Tl(e),r=[];for(var i in e)i=="constructor"&&(t||!wEt.call(e,i))||r.push(i);return r}var SEt,wEt,fU,pU=b(()=>{"use strict";xa();sm();dU();SEt=Object.prototype,wEt=SEt.hasOwnProperty;s(_Et,"baseKeysIn");fU=_Et});function EEt(e){return Vi(e)?_T(e,!0):fU(e)}var Vs,Du=b(()=>{"use strict";KR();pU();ja();s(EEt,"keysIn");Vs=EEt});function vEt(e){return Ya(e,Vs(e))}var mU,gU=b(()=>{"use strict";vd();Du();s(vEt,"toPlainObject");mU=vEt});function AEt(e,t,r,i,n,a,o){var l=m0(e,r),u=m0(t,r),h=o.get(u);if(h){h0(e,r,h);return}var d=a?a(l,u,r+"",e,t,o):void 0,f=d===void 0;if(f){var p=fe(u),m=!p&&Po(u),g=!p&&!m&&Ru(u);d=u,p||m||g?fe(l)?d=l:_d(l)?d=bT(l):m?(f=!1,d=gT(u,!0)):g?(f=!1,d=xT(u,!0)):d=[]:iU(u)||Bo(u)?(d=l,Bo(l)?d=mU(l):(!ii(l)||en(l))&&(d=CT(u))):f=!1}f&&(o.set(u,d),n(d,u,i,a,o),o.delete(u)),h0(e,r,d)}var yU,xU=b(()=>{"use strict";VR();zR();WR();qR();UR();am();Si();wT();lm();s0();xa();nU();p0();XR();gU();s(AEt,"baseMergeDeep");yU=AEt});function bU(e,t,r,i,n){e!==t&&em(t,function(a,o){if(n||(n=new bl),ii(a))yU(e,t,o,r,bU,i,n);else{var l=i?i(m0(e,o),a,o+"",e,t,n):void 0;l===void 0&&(l=a),h0(e,o,l)}},Vs)}var kU,TU=b(()=>{"use strict";u0();VR();mT();xU();xa();Du();XR();s(bU,"baseMerge");kU=bU});function REt(e){return e}var En,Sc=b(()=>{"use strict";s(REt,"identity");En=REt});function LEt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var CU,SU=b(()=>{"use strict";s(LEt,"apply");CU=LEt});function DEt(e,t,r){return t=wU(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=wU(i.length-t,0),o=Array(a);++n{"use strict";SU();wU=Math.max;s(DEt,"overRest");ET=DEt});function IEt(e){return function(){return e}}var zs,ZR=b(()=>{"use strict";s(IEt,"constant");zs=IEt});var NEt,_U,EU=b(()=>{"use strict";ZR();FR();Sc();NEt=Jp?function(e,t){return Jp(e,"toString",{configurable:!0,enumerable:!1,value:zs(t),writable:!0})}:En,_U=NEt});function PEt(e){var t=0,r=0;return function(){var i=BEt(),n=MEt-(i-r);if(r=i,n>0){if(++t>=OEt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var OEt,MEt,BEt,vU,AU=b(()=>{"use strict";OEt=800,MEt=16,BEt=Date.now;s(PEt,"shortOut");vU=PEt});var $Et,vT,JR=b(()=>{"use strict";EU();AU();$Et=vU(_U),vT=$Et});function FEt(e,t){return vT(ET(e,t,En),e+"")}var Sl,um=b(()=>{"use strict";Sc();QR();JR();s(FEt,"baseRest");Sl=FEt});function VEt(e,t,r){if(!ii(r))return!1;var i=typeof t;return(i=="number"?Vi(r)&&Lu(t,r.length):i=="string"&&t in r)?Wa(r[t],e):!1}var ba,Ad=b(()=>{"use strict";Sd();ja();g0();xa();s(VEt,"isIterateeCall");ba=VEt});function zEt(e){return Sl(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&ba(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++i{"use strict";um();Ad();s(zEt,"createAssigner");AT=zEt});var GEt,Iu,eL=b(()=>{"use strict";TU();tL();GEt=AT(function(e,t,r){kU(e,t,r)}),Iu=GEt});function nL(e,t){if(!e)return t;let r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return WEt[r]??t}function HEt(e,t){let r=e.trim();if(r)return t.securityLevel!=="loose"?(0,DU.sanitizeUrl)(r):r}function OU(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function XEt(e){let t,r=0;e.forEach(n=>{r+=OU(n,t),t=n});let i=r/2;return sL(e,i)}function KEt(e){return e.length===1?e[0]:XEt(e)}function ZEt(e,t,r){let i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();let n=25+e,a=sL(i,n),o=10+e*.5,l=Math.atan2(i[0].y-a.y,i[0].x-a.x),u={x:0,y:0};return t==="start_left"?(u.x=Math.sin(l+Math.PI)*o+(i[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(u.x=Math.sin(l-Math.PI)*o+(i[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(u.x=Math.sin(l)*o+(i[0].x+a.x)/2-5,u.y=-Math.cos(l)*o+(i[0].y+a.y)/2-5):(u.x=Math.sin(l)*o+(i[0].x+a.x)/2,u.y=-Math.cos(l)*o+(i[0].y+a.y)/2),u}function aL(e){let t="",r="";for(let i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}function JEt(e){let t="",r="0123456789abcdef",i=r.length;for(let n=0;nMath.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}var DU,iL,WEt,qEt,jEt,IU,NU,UEt,YEt,RU,sL,QEt,LU,oL,lL,tvt,evt,cL,rvt,uL,rL,RT,ivt,nvt,Gs,Te,MU,ks,Nu,Re=b(()=>{"use strict";DU=fs(Hp(),1);lr();fr();N3();Jt();td();dp();$R();eL();P2();iL="\u200B",WEt={curveBasis:Oo,curveBasisClosed:Kk,curveBasisOpen:Qk,curveBumpX:q1,curveBumpY:j1,curveBundle:TR,curveCardinalClosed:CR,curveCardinalOpen:wR,curveCardinal:X1,curveCatmullRomClosed:ER,curveCatmullRomOpen:vR,curveCatmullRom:Z1,curveLinear:xl,curveLinearClosed:rT,curveMonotoneX:J1,curveMonotoneY:t0,curveNatural:jp,curveStep:Up,curveStepAfter:r0,curveStepBefore:e0},qEt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,jEt=s(function(e,t){let r=IU(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let o=r.map(l=>l.args);mp(o),i=Ti(i,[...o])}else i=r.args;if(!i)return;let n=kp(e,t),a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),IU=s(function(e,t=null){try{let r=new RegExp(`[%]{2}(?![{]${qEt.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i,n=[];for(;(i=Jh.exec(e))!==null;)if(i.index===Jh.lastIndex&&Jh.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){let a=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:o})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return z.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),NU=s(function(e){return e.replace(Jh,"")},"removeDirectives"),UEt=s(function(e,t){for(let[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");s(nL,"interpolateToCurve");s(HEt,"formatUrl");YEt=s((e,...t)=>{let r=e.split("."),i=r.length-1,n=r[i],a=window;for(let o=0;o{let r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),sL=s((e,t)=>{let r,i=t;for(let n of e){if(r){let a=OU(n,r);if(a===0)return r;if(a=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:RU((1-o)*r.x+o*n.x,5),y:RU((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),QEt=s((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let n=sL(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),l={x:0,y:0};return l.x=Math.sin(o)*a+(t[0].x+n.x)/2,l.y=-Math.cos(o)*a+(t[0].y+n.y)/2,l},"calcCardinalityPosition");s(ZEt,"calcTerminalLabelPosition");s(aL,"getStylesFromArray");LU=0,oL=s(()=>(LU++,"id-"+Math.random().toString(36).substr(2,12)+"-"+LU),"generateId");s(JEt,"makeRandomHex");lL=s(e=>JEt(e.length),"random"),tvt=s(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"),evt=s(function(e,t){let r=t.text.replace(qt.lineBreakRegex," "),[,i]=Gs(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);let a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),cL=Qp((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),qt.lineBreakRegex.test(e)))return e;let i=e.split(" ").filter(Boolean),n=[],a="";return i.forEach((o,l)=>{let u=vn(`${o} `,r),h=vn(a,r);if(u>t){let{hyphenatedStrings:p,remainingWord:m}=rvt(o,t,"-",r);n.push(a,...p),a=m}else h+u>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");l+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),rvt=Qp((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let n=[...e],a=[],o="";return n.forEach((l,u)=>{let h=`${o}${l}`;if(vn(h,i)>=t){let f=u+1,p=n.length===f,m=`${h}${r}`;a.push(p?h:m),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);s(LT,"calculateTextHeight");s(vn,"calculateTextWidth");uL=Qp((e,t)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};let[,a]=Gs(r),o=["sans-serif",i],l=e.split(qt.lineBreakRegex),u=[],h=vt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let d=h.append("svg");for(let p of o){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let x=tvt();x.text=y||iL;let k=evt(d,x).style("font-size",a).style("font-weight",n).style("font-family",p),T=(k._groups||k)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,T.width)),m=Math.round(T.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}d.remove();let f=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[f]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),rL=class{constructor(t=!1,r){this.count=0;this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{s(this,"InitIDGenerator")}},ivt=s(function(e){return RT=RT||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),RT.innerHTML=e,unescape(RT.textContent)},"entityDecode");s(hL,"isDetailedError");nvt=s((e,t,r,i)=>{if(!i)return;let n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Gs=s(e=>{if(typeof e=="number")return[e,e+"px"];let t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");s(Wr,"cleanAndMerge");Te={assignWithDepth:Ti,wrapLabel:cL,calculateTextHeight:LT,calculateTextWidth:vn,calculateTextDimensions:uL,cleanAndMerge:Wr,detectInit:jEt,detectDirective:IU,isSubstringInArray:UEt,interpolateToCurve:nL,calcLabelPosition:KEt,calcCardinalityPosition:QEt,calcTerminalLabelPosition:ZEt,formatUrl:HEt,getStylesFromArray:aL,generateId:oL,random:lL,runFunc:YEt,entityDecode:ivt,insertTitle:nvt,isLabelCoordinateInPath:svt,parseFontSize:Gs,InitIDGenerator:rL},MU=s(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){let i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),ks=s(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Nu=s((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");s(Pr,"handleUndefinedAttr");s(svt,"isLabelCoordinateInPath")});function $o(e,t,r,i,n){if(!t[e].width)if(r)t[e].text=cL(t[e].text,n,i),t[e].textLines=t[e].text.split(qt.lineBreakRegex).length,t[e].width=n,t[e].height=LT(t[e].text,i);else{let a=t[e].text.split(qt.lineBreakRegex);t[e].textLines=a.length;let o=0;t[e].height=0,t[e].width=0;for(let l of a)t[e].width=Math.max(vn(l,i),t[e].width),o=LT(l,i),t[e].height=t[e].height+o}}function VU(e,t,r,i,n){let a=new OT(n);a.data.widthLimit=r.data.widthLimit/Math.min(dL,i.length);for(let[o,l]of i.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&we.wrap,d=DT(we);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",$o("label",l,h,d,a.data.widthLimit),l.label.Y=u+8,u=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let g=DT(we);$o("type",l,h,g,a.data.widthLimit),l.type.Y=u+5,u=l.type.Y+l.type.height}if(l.descr&&l.descr.text!==""){let g=DT(we);g.fontSize=g.fontSize-2,$o("descr",l,h,g,a.data.widthLimit),l.descr.Y=u+20,u=l.descr.Y+l.descr.height}if(o==0||o%dL===0){let g=r.data.startx+we.diagramMarginX,y=r.data.stopy+we.diagramMarginY+u;a.setData(g,g,y,y)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+we.diagramMarginX:a.data.startx,y=a.data.starty;a.setData(g,g,y,y)}a.name=l.alias;let f=n.db.getC4ShapeArray(l.alias),p=n.db.getC4ShapeKeys(l.alias);p.length>0&&FU(a,e,f,p),t=l.alias;let m=n.db.getBoundaries(t);m.length>0&&VU(e,t,a,m,n),l.alias!=="global"&&$U(e,l,a),r.data.stopy=Math.max(a.data.stopy+we.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+we.c4ShapeMargin,r.data.stopx),IT=Math.max(IT,r.data.stopx),NT=Math.max(NT,r.data.stopy)}}var IT,NT,PU,dL,we,OT,fL,y0,DT,avt,$U,FU,Ws,BU,ovt,lvt,cvt,pL,zU=b(()=>{"use strict";lr();Bq();Jt();Q3();fr();oA();ye();dp();Re();gi();IT=0,NT=0,PU=4,dL=2;i1.yy=c1;we={},OT=class{static{s(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,fL(t.db.getConfig())}setData(t,r,i,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=i,this.nextData.stopy=this.data.stopy=n}updateVal(t,r,i,n){t[r]===void 0?t[r]=i:t[r]=n(i,t[r])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+t.margin*2,i=r+t.width,n=this.nextData.starty+t.margin*2,a=n+t.height;(r>=this.data.widthLimit||i>=this.data.widthLimit||this.nextData.cnt>PU)&&(r=this.nextData.startx+t.margin+we.nextLinePaddingX,n=this.nextData.stopy+t.margin*2,this.nextData.stopx=i=r+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=n+t.height,this.nextData.cnt=1),t.x=r,t.y=n,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",i,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",i,Math.max),this.updateVal(this.nextData,"stopy",a,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},fL(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},fL=s(function(e){Ti(we,e),e.fontFamily&&(we.personFontFamily=we.systemFontFamily=we.messageFontFamily=e.fontFamily),e.fontSize&&(we.personFontSize=we.systemFontSize=we.messageFontSize=e.fontSize),e.fontWeight&&(we.personFontWeight=we.systemFontWeight=we.messageFontWeight=e.fontWeight)},"setConf"),y0=s((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),DT=s(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),avt=s(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");s($o,"calcC4ShapeTextWH");$U=s(function(e,t,r){t.x=r.data.startx,t.y=r.data.starty,t.width=r.data.stopx-r.data.startx,t.height=r.data.stopy-r.data.starty,t.label.y=we.c4ShapeMargin-35;let i=t.wrap&&we.wrap,n=DT(we);n.fontSize=n.fontSize+2,n.fontWeight="bold";let a=vn(t.label.text,n);$o("label",t,i,n,a),Mo.drawBoundary(e,t,we)},"drawBoundary"),FU=s(function(e,t,r,i){let n=0;for(let a of i){n=0;let o=r[a],l=y0(we,o.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,o.typeC4Shape.width=vn("\xAB"+o.typeC4Shape.text+"\xBB",l),o.typeC4Shape.height=l.fontSize+2,o.typeC4Shape.Y=we.c4ShapePadding,n=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=n,n=o.image.Y+o.image.height;break}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=n,n=o.image.Y+o.image.height);let u=o.wrap&&we.wrap,h=we.width-we.c4ShapePadding*2,d=y0(we,o.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",$o("label",o,u,d,h),o.label.Y=n+8,n=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=y0(we,o.typeC4Shape.text);$o("type",o,u,m,h),o.type.Y=n+5,n=o.type.Y+o.type.height}else if(o.techn&&o.techn.text!==""){o.techn.text="["+o.techn.text+"]";let m=y0(we,o.techn.text);$o("techn",o,u,m,h),o.techn.Y=n+5,n=o.techn.Y+o.techn.height}let f=n,p=o.label.width;if(o.descr&&o.descr.text!==""){let m=y0(we,o.typeC4Shape.text);$o("descr",o,u,m,h),o.descr.Y=n+20,n=o.descr.Y+o.descr.height,p=Math.max(o.label.width,o.descr.width),f=n-o.descr.textLines*5}p=p+we.c4ShapePadding,o.width=Math.max(o.width||we.width,p,we.width),o.height=Math.max(o.height||we.height,f,we.height),o.margin=o.margin||we.c4ShapeMargin,e.insert(o),Mo.drawC4Shape(t,o,we)}e.bumpLastMargin(we.c4ShapeMargin)},"drawC4ShapeArray"),Ws=class{static{s(this,"Point")}constructor(t,r){this.x=t,this.y=r}},BU=s(function(e,t){let r=e.x,i=e.y,n=t.x,a=t.y,o=r+e.width/2,l=i+e.height/2,u=Math.abs(r-n),h=Math.abs(i-a),d=h/u,f=e.height/e.width,p=null;return i==a&&rn?p=new Ws(r,l):r==n&&ia&&(p=new Ws(o,i)),r>n&&i=d?p=new Ws(r,l+d*e.width/2):p=new Ws(o-u/h*e.height/2,i+e.height):r=d?p=new Ws(r+e.width,l+d*e.width/2):p=new Ws(o+u/h*e.height/2,i+e.height):ra?f>=d?p=new Ws(r+e.width,l-d*e.width/2):p=new Ws(o+e.height/2*u/h,i):r>n&&i>a&&(f>=d?p=new Ws(r,l-e.width/2*d):p=new Ws(o-e.height/2*u/h,i)),p},"getIntersectPoint"),ovt=s(function(e,t){let r={x:0,y:0};r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=BU(e,r);r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=BU(t,r);return{startPoint:i,endPoint:n}},"getIntersectPoints"),lvt=s(function(e,t,r,i,n){let a=0;for(let o of t){a=a+1;let l=o.wrap&&we.wrap,u=avt(we);i.db.getC4Type()==="C4Dynamic"&&(o.label.text=a+": "+o.label.text);let d=vn(o.label.text,u);$o("label",o,l,u,d),o.techn&&o.techn.text!==""&&(d=vn(o.techn.text,u),$o("techn",o,l,u,d)),o.descr&&o.descr.text!==""&&(d=vn(o.descr.text,u),$o("descr",o,l,u,d));let f=r(o.from),p=r(o.to),m=ovt(f,p);o.startPoint=m.startPoint,o.endPoint=m.endPoint}Mo.drawRels(e,t,we,n)},"drawRels");s(VU,"drawInsideBoundary");cvt=s(function(e,t,r,i){we=Q().c4;let n=Q().securityLevel,a;n==="sandbox"&&(a=vt("#i"+t));let o=n==="sandbox"?vt(a.nodes()[0].contentDocument.body):vt("body"),l=i.db;i.db.setWrap(we.wrap),PU=l.getC4ShapeInRow(),dL=l.getC4BoundaryInRow(),z.debug(`C:${JSON.stringify(we,null,2)}`);let u=n==="sandbox"?o.select(`[id="${t}"]`):vt(`[id="${t}"]`);Mo.insertComputerIcon(u,t),Mo.insertDatabaseIcon(u,t),Mo.insertClockIcon(u,t);let h=new OT(i);h.setData(we.diagramMarginX,we.diagramMarginX,we.diagramMarginY,we.diagramMarginY),h.data.widthLimit=screen.availWidth,IT=we.diagramMarginX,NT=we.diagramMarginY;let d=i.db.getTitle(),f=i.db.getBoundaries("");VU(u,"",h,f,i),Mo.insertArrowHead(u,t),Mo.insertArrowEnd(u,t),Mo.insertArrowCrossHead(u,t),Mo.insertArrowFilledHead(u,t),lvt(u,i.db.getRels(),i.db.getC4Shape,i,t),h.data.stopx=IT,h.data.stopy=NT;let p=h.data,g=p.stopy-p.starty+2*we.diagramMarginY,x=p.stopx-p.startx+2*we.diagramMarginX;d&&u.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*we.diagramMarginX).attr("y",p.starty+we.diagramMarginY),pr(u,g,x,we.useMaxWidth);let k=d?60:0;u.attr("viewBox",p.startx-we.diagramMarginX+" -"+(we.diagramMarginY+k)+" "+x+" "+(g+k)),z.debug("models:",p)},"draw"),pL={drawPersonOrSystemArray:FU,drawBoundary:$U,setConf:fL,draw:cvt}});var uvt,GU,WU=b(()=>{"use strict";uvt=s(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),GU=uvt});var qU={};Fe(qU,{diagram:()=>hvt});var hvt,jU=b(()=>{"use strict";Q3();oA();zU();WU();hvt={parser:gF,db:c1,renderer:pL,styles:GU,init:s(({c4:e,wrap:t})=>{pL.setConf(e),c1.setWrap(t)},"init")}});function lH(e){return typeof e>"u"||e===null}function mvt(e){return typeof e=="object"&&e!==null}function gvt(e){return Array.isArray(e)?e:lH(e)?[]:[e]}function yvt(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;rl&&(a=" ... ",t=i-l+a.length),r-i>l&&(o=" ...",r=i+l-o.length),{str:a+e.slice(t,r).replace(/\t/g,"\u2192")+o,pos:i-t+a.length}}function gL(e,t){return fn.repeat(" ",t-e.length)+e}function Evt(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var l="",u,h,d=Math.min(e.line+t.linesAfter,n.length).toString().length,f=t.maxLength-(t.indent+d+3);for(u=1;u<=t.linesBefore&&!(o-u<0);u++)h=mL(e.buffer,i[o-u],n[o-u],e.position-(i[o]-i[o-u]),f),l=fn.repeat(" ",t.indent)+gL((e.line-u+1).toString(),d)+" | "+h.str+` +`+l;for(h=mL(e.buffer,i[o],n[o],e.position,f),l+=fn.repeat(" ",t.indent)+gL((e.line+1).toString(),d)+" | "+h.str+` +`,l+=fn.repeat("-",t.indent+d+3+h.pos)+`^ +`,u=1;u<=t.linesAfter&&!(o+u>=n.length);u++)h=mL(e.buffer,i[o+u],n[o+u],e.position-(i[o]-i[o+u]),f),l+=fn.repeat(" ",t.indent)+gL((e.line+u+1).toString(),d)+" | "+h.str+` +`;return l.replace(/\n$/,"")}function Lvt(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function Dvt(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Avt.indexOf(r)===-1)throw new qs('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Lvt(t.styleAliases||null),Rvt.indexOf(this.kind)===-1)throw new qs('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function HU(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}function Ivt(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(s(i,"collectType"),t=0,r=arguments.length;t=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function i3t(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(fn.isNegativeZero(e))return"-0.0";return r=e.toString(10),r3t.test(r)?r.replace("e",".e"):r}function n3t(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||fn.isNegativeZero(e))}function o3t(e){return e===null?!1:hH.exec(e)!==null||dH.exec(e)!==null}function l3t(e){var t,r,i,n,a,o,l,u=0,h=null,d,f,p;if(t=hH.exec(e),t===null&&(t=dH.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],l=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(d=+t[10],f=+(t[11]||0),h=(d*60+f)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,n,a,o,l,u)),h&&p.setTime(p.getTime()-h),p}function c3t(e){return e.toISOString()}function h3t(e){return e==="<<"||e===null}function f3t(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=SL;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}function p3t(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=SL,o=0,l=[];for(t=0;t>16&255),l.push(o>>8&255),l.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)):r===18?(l.push(o>>10&255),l.push(o>>2&255)):r===12&&l.push(o>>4&255),new Uint8Array(l)}function m3t(e){var t="",r=0,i,n,a=e.length,o=SL;for(i=0;i>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}function g3t(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function k3t(e){if(e===null)return!0;var t=[],r,i,n,a,o,l=e;for(r=0,i=l.length;r>10)+55296,(e-65536&1023)+56320)}function xH(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function F3t(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||fH,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function TH(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=vvt(r),new qs(t,r)}function Le(e,t){throw TH(e,t)}function PT(e,t){e.onWarning&&e.onWarning.call(null,TH(e,t))}function Ou(e,t,r,i){var n,a,o,l;if(t1&&(e.result+=fn.repeat(` +`,t-1))}function V3t(e,t,r){var i,n,a,o,l,u,h,d,f=e.kind,p=e.result,m;if(m=e.input.charCodeAt(e.position),js(m)||dm(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(n=e.input.charCodeAt(e.position+1),js(n)||r&&dm(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,l=!1;m!==0;){if(m===58){if(n=e.input.charCodeAt(e.position+1),js(n)||r&&dm(n))break}else if(m===35){if(i=e.input.charCodeAt(e.position-1),js(i))break}else{if(e.position===e.lineStart&&VT(e)||r&&dm(m))break;if(wl(m))if(u=e.line,h=e.lineStart,d=e.lineIndent,rn(e,!1,-1),e.lineIndent>=t){l=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=u,e.lineStart=h,e.lineIndent=d;break}}l&&(Ou(e,a,o,!1),_L(e,e.line-u),a=o=e.position,l=!1),Ld(m)||(o=e.position+1),m=e.input.charCodeAt(++e.position)}return Ou(e,a,o,!1),e.result?!0:(e.kind=f,e.result=p,!1)}function z3t(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ou(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else wl(r)?(Ou(e,i,n,!0),_L(e,rn(e,!1,t)),i=n=e.position):e.position===e.lineStart&&VT(e)?Le(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Le(e,"unexpected end of the stream within a single quoted scalar")}function G3t(e,t){var r,i,n,a,o,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Ou(e,r,e.position,!0),e.position++,!0;if(l===92){if(Ou(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),wl(l))rn(e,!1,t);else if(l<256&&bH[l])e.result+=kH[l],e.position++;else if((o=B3t(l))>0){for(n=o,a=0;n>0;n--)l=e.input.charCodeAt(++e.position),(o=M3t(l))>=0?a=(a<<4)+o:Le(e,"expected hexadecimal character");e.result+=$3t(a),e.position++}else Le(e,"unknown escape sequence");r=i=e.position}else wl(l)?(Ou(e,r,i,!0),_L(e,rn(e,!1,t)),r=i=e.position):e.position===e.lineStart&&VT(e)?Le(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Le(e,"unexpected end of the stream within a double quoted scalar")}function W3t(e,t){var r=!0,i,n,a,o=e.tag,l,u=e.anchor,h,d,f,p,m,g=Object.create(null),y,x,k,T;if(T=e.input.charCodeAt(e.position),T===91)d=93,m=!1,l=[];else if(T===123)d=125,m=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),T=e.input.charCodeAt(++e.position);T!==0;){if(rn(e,!0,t),T=e.input.charCodeAt(e.position),T===d)return e.position++,e.tag=o,e.anchor=u,e.kind=m?"mapping":"sequence",e.result=l,!0;r?T===44&&Le(e,"expected the node content, but found ','"):Le(e,"missed comma between flow collection entries"),x=y=k=null,f=p=!1,T===63&&(h=e.input.charCodeAt(e.position+1),js(h)&&(f=p=!0,e.position++,rn(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,pm(e,t,MT,!1,!0),x=e.tag,y=e.result,rn(e,!0,t),T=e.input.charCodeAt(e.position),(p||e.line===i)&&T===58&&(f=!0,T=e.input.charCodeAt(++e.position),rn(e,!0,t),pm(e,t,MT,!1,!0),k=e.result),m?fm(e,l,g,x,y,k,i,n,a):f?l.push(fm(e,null,g,x,y,k,i,n,a)):l.push(y),rn(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(r=!0,T=e.input.charCodeAt(++e.position)):r=!1}Le(e,"unexpected end of the stream within a flow collection")}function q3t(e,t){var r,i,n=yL,a=!1,o=!1,l=t,u=0,h=!1,d,f;if(f=e.input.charCodeAt(e.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)yL===n?n=f===43?YU:D3t:Le(e,"repeat of a chomping mode identifier");else if((d=P3t(f))>=0)d===0?Le(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Le(e,"repeat of an indentation width identifier"):(l=t+d-1,o=!0);else break;if(Ld(f)){do f=e.input.charCodeAt(++e.position);while(Ld(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!wl(f)&&f!==0)}for(;f!==0;){for(wL(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!o||e.lineIndentl&&(l=e.lineIndent),wl(f)){u++;continue}if(e.lineIndentt)&&u!==0)Le(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(x&&(o=e.line,l=e.lineStart,u=e.position),pm(e,t,BT,!0,n)&&(x?g=e.result:y=e.result),x||(fm(e,f,p,m,g,y,o,l,u),m=g=y=null),rn(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&T!==0)Le(e,"bad indentation of a mapping entry");else if(e.lineIndentt?u=1:e.lineIndent===t?u=0:e.lineIndentt?u=1:e.lineIndent===t?u=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),f=0,p=e.implicitTypes.length;f"),e.result!==null&&g.kind!==e.kind&&Le(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Le(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function X3t(e){var t=e.position,r,i,n,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(rn(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!js(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Le(e,"directive name must not be less than one character in length");o!==0;){for(;Ld(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!wl(o));break}if(wl(o))break;for(r=e.position;o!==0&&!js(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&wL(e),Mu.call(QU,i)?QU[i](e,i,n):PT(e,'unknown document directive "'+i+'"')}if(rn(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,rn(e,!0,-1)):a&&Le(e,"directives end mark is expected"),pm(e,e.lineIndent-1,BT,!1,!0),rn(e,!0,-1),e.checkLineBreaks&&N3t.test(e.input.slice(t,e.position))&&PT(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&VT(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,rn(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var i=CH(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n=55296&&r<=56319&&t+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function DH(e){var t=/^\n* /;return t.test(e)}function _At(e,t,r,i,n,a,o,l){var u,h=0,d=null,f=!1,p=!1,m=i!==-1,g=-1,y=SAt(x0(e,0))&&wAt(x0(e,e.length-1));if(t||o)for(u=0;u=65536?u+=2:u++){if(h=x0(e,u),!C0(h))return hm;y=y&&rH(h,d,l),d=h}else{for(u=0;u=65536?u+=2:u++){if(h=x0(e,u),h===k0)f=!0,m&&(p=p||u-g-1>i&&e[g+1]!==" ",g=u);else if(!C0(h))return hm;y=y&&rH(h,d,l),d=h}p=p||m&&u-g-1>i&&e[g+1]!==" "}return!f&&!p?y&&!o&&!n(e)?IH:a===T0?hm:TL:r>9&&DH(e)?hm:o?a===T0?hm:TL:p?OH:NH}function EAt(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===T0?'""':"''";if(!e.noCompatMode&&(gAt.indexOf(t)!==-1||yAt.test(t)))return e.quotingType===T0?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),l=i||e.flowLevel>-1&&r>=e.flowLevel;function u(h){return CAt(e,h)}switch(s(u,"testAmbiguity"),_At(t,l,e.indent,o,u,e.quotingType,e.forceQuotes&&!i,n)){case IH:return t;case TL:return"'"+t.replace(/'/g,"''")+"'";case NH:return"|"+iH(t,e.indent)+nH(tH(t,a));case OH:return">"+iH(t,e.indent)+nH(tH(vAt(t,o),a));case hm:return'"'+AAt(t)+'"';default:throw new qs("impossible error: invalid scalar style")}})()}function iH(e,t){var r=DH(e)?String(t):"",i=e[e.length-1]===` +`,n=i&&(e[e.length-2]===` +`||e===` +`),a=n?"+":i?"":"-";return r+a+` +`}function nH(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function vAt(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(` +`);return h=h!==-1?h:e.length,r.lastIndex=h,sH(e.slice(0,h),t)})(),n=e[0]===` +`||e[0]===" ",a,o;o=r.exec(e);){var l=o[1],u=o[2];a=u[0]===" ",i+=l+(!n&&!a&&u!==""?` +`:"")+sH(u,t),n=a}return i}function sH(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,l=0,u="";i=r.exec(e);)l=i.index,l-n>t&&(a=o>n?o:l,u+=` +`+e.slice(n,a),n=a+1),o=l;return u+=` +`,e.length-n>t&&o>n?u+=e.slice(n,o)+` +`+e.slice(o+1):u+=e.slice(n),u.slice(1)}function AAt(e){for(var t="",r=0,i,n=0;n=65536?n+=2:n++)r=x0(e,n),i=Jn[r],!i&&C0(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||bAt(r);return t}function RAt(e,t,r){var i="",n=e.tag,a,o,l;for(a=0,o=r.length;a"u"&&wc(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function aH(e,t,r,i){var n="",a=e.tag,o,l,u;for(o=0,l=r.length;o"u"&&wc(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=kL(e,t)),e.dump&&k0===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}function LAt(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,l,u,h,d;for(o=0,l=a.length;o1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),wc(e,t,h,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}function DAt(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),l,u,h,d,f,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new qs("sortKeys must be a boolean or a function");for(l=0,u=o.length;l1024,f&&(e.dump&&k0===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,f&&(p+=kL(e,t)),wc(e,t+1,d,!0,f)&&(e.dump&&k0===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,n+=p));e.tag=a,e.dump=n||"{}"}function oH(e,t,r){var i,n,a,o,l,u;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a tag resolver accepts not "'+u+'" style');e.dump=i}return!0}return!1}function wc(e,t,r,i,n,a,o){e.tag=null,e.dump=r,oH(e,r,!1)||oH(e,r,!0);var l=wH.call(e.dump),u=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var d=l==="[object Object]"||l==="[object Array]",f,p;if(d&&(f=e.duplicates.indexOf(r),p=f!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(n=!1),p&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l==="[object Object]")i&&Object.keys(e.dump).length!==0?(DAt(e,t,e.dump,n),p&&(e.dump="&ref_"+f+e.dump)):(LAt(e,t,e.dump),p&&(e.dump="&ref_"+f+" "+e.dump));else if(l==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?aH(e,t-1,e.dump,n):aH(e,t,e.dump,n),p&&(e.dump="&ref_"+f+e.dump)):(RAt(e,t,e.dump),p&&(e.dump="&ref_"+f+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&EAt(e,e.dump,t,a,u);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new qs("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}function IAt(e,t){var r=[],i=[],n,a;for(CL(e,r,i),n=0,a=i.length;n{"use strict";s(lH,"isNothing");s(mvt,"isObject");s(gvt,"toArray");s(yvt,"extend");s(xvt,"repeat");s(bvt,"isNegativeZero");kvt=lH,Tvt=mvt,Cvt=gvt,Svt=xvt,wvt=bvt,_vt=yvt,fn={isNothing:kvt,isObject:Tvt,toArray:Cvt,repeat:Svt,isNegativeZero:wvt,extend:_vt};s(cH,"formatError");s(b0,"YAMLException$1");b0.prototype=Object.create(Error.prototype);b0.prototype.constructor=b0;b0.prototype.toString=s(function(t){return this.name+": "+cH(this,t)},"toString");qs=b0;s(mL,"getLine");s(gL,"padStart");s(Evt,"makeSnippet");vvt=Evt,Avt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Rvt=["scalar","sequence","mapping"];s(Lvt,"compileStyleAliases");s(Dvt,"Type$1");Zn=Dvt;s(HU,"compileList");s(Ivt,"compileMap");s(xL,"Schema$1");xL.prototype.extend=s(function(t){var r=[],i=[];if(t instanceof Zn)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new qs("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Zn))throw new qs("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new qs("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new qs("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Zn))throw new qs("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(xL.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=HU(n,"implicit"),n.compiledExplicit=HU(n,"explicit"),n.compiledTypeMap=Ivt(n.compiledImplicit,n.compiledExplicit),n},"extend");Nvt=xL,Ovt=new Zn("tag:yaml.org,2002:str",{kind:"scalar",construct:s(function(e){return e!==null?e:""},"construct")}),Mvt=new Zn("tag:yaml.org,2002:seq",{kind:"sequence",construct:s(function(e){return e!==null?e:[]},"construct")}),Bvt=new Zn("tag:yaml.org,2002:map",{kind:"mapping",construct:s(function(e){return e!==null?e:{}},"construct")}),Pvt=new Nvt({explicit:[Ovt,Mvt,Bvt]});s($vt,"resolveYamlNull");s(Fvt,"constructYamlNull");s(Vvt,"isNull");zvt=new Zn("tag:yaml.org,2002:null",{kind:"scalar",resolve:$vt,construct:Fvt,predicate:Vvt,represent:{canonical:s(function(){return"~"},"canonical"),lowercase:s(function(){return"null"},"lowercase"),uppercase:s(function(){return"NULL"},"uppercase"),camelcase:s(function(){return"Null"},"camelcase"),empty:s(function(){return""},"empty")},defaultStyle:"lowercase"});s(Gvt,"resolveYamlBoolean");s(Wvt,"constructYamlBoolean");s(qvt,"isBoolean");jvt=new Zn("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Gvt,construct:Wvt,predicate:qvt,represent:{lowercase:s(function(e){return e?"true":"false"},"lowercase"),uppercase:s(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:s(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});s(Uvt,"isHexCode");s(Hvt,"isOctCode");s(Yvt,"isDecCode");s(Xvt,"resolveYamlInteger");s(Kvt,"constructYamlInteger");s(Qvt,"isInteger");Zvt=new Zn("tag:yaml.org,2002:int",{kind:"scalar",resolve:Xvt,construct:Kvt,predicate:Qvt,represent:{binary:s(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:s(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:s(function(e){return e.toString(10)},"decimal"),hexadecimal:s(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Jvt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");s(t3t,"resolveYamlFloat");s(e3t,"constructYamlFloat");r3t=/^[-+]?[0-9]+e/;s(i3t,"representYamlFloat");s(n3t,"isFloat");s3t=new Zn("tag:yaml.org,2002:float",{kind:"scalar",resolve:t3t,construct:e3t,predicate:n3t,represent:i3t,defaultStyle:"lowercase"}),uH=Pvt.extend({implicit:[zvt,jvt,Zvt,s3t]}),a3t=uH,hH=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dH=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]))?))?$");s(o3t,"resolveYamlTimestamp");s(l3t,"constructYamlTimestamp");s(c3t,"representYamlTimestamp");u3t=new Zn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o3t,construct:l3t,instanceOf:Date,represent:c3t});s(h3t,"resolveYamlMerge");d3t=new Zn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:h3t}),SL=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;s(f3t,"resolveYamlBinary");s(p3t,"constructYamlBinary");s(m3t,"representYamlBinary");s(g3t,"isBinary");y3t=new Zn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:f3t,construct:p3t,predicate:g3t,represent:m3t}),x3t=Object.prototype.hasOwnProperty,b3t=Object.prototype.toString;s(k3t,"resolveYamlOmap");s(T3t,"constructYamlOmap");C3t=new Zn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:k3t,construct:T3t}),S3t=Object.prototype.toString;s(w3t,"resolveYamlPairs");s(_3t,"constructYamlPairs");E3t=new Zn("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:w3t,construct:_3t}),v3t=Object.prototype.hasOwnProperty;s(A3t,"resolveYamlSet");s(R3t,"constructYamlSet");L3t=new Zn("tag:yaml.org,2002:set",{kind:"mapping",resolve:A3t,construct:R3t}),fH=a3t.extend({implicit:[u3t,d3t],explicit:[y3t,C3t,E3t,L3t]}),Mu=Object.prototype.hasOwnProperty,MT=1,pH=2,mH=3,BT=4,yL=1,D3t=2,YU=3,I3t=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,N3t=/[\x85\u2028\u2029]/,O3t=/[,\[\]\{\}]/,gH=/^(?:!|!!|![a-z\-]+!)$/i,yH=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;s(XU,"_class");s(wl,"is_EOL");s(Ld,"is_WHITE_SPACE");s(js,"is_WS_OR_EOL");s(dm,"is_FLOW_INDICATOR");s(M3t,"fromHexCode");s(B3t,"escapedHexLen");s(P3t,"fromDecimalCode");s(KU,"simpleEscapeSequence");s($3t,"charFromCodepoint");s(xH,"setProperty");bH=new Array(256),kH=new Array(256);for(Rd=0;Rd<256;Rd++)bH[Rd]=KU(Rd)?1:0,kH[Rd]=KU(Rd);s(F3t,"State$1");s(TH,"generateError");s(Le,"throwError");s(PT,"throwWarning");QU={YAML:s(function(t,r,i){var n,a,o;t.version!==null&&Le(t,"duplication of %YAML directive"),i.length!==1&&Le(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Le(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&Le(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&PT(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:s(function(t,r,i){var n,a;i.length!==2&&Le(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],gH.test(n)||Le(t,"ill-formed tag handle (first argument) of the TAG directive"),Mu.call(t.tagMap,n)&&Le(t,'there is a previously declared suffix for "'+n+'" tag handle'),yH.test(a)||Le(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Le(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};s(Ou,"captureSegment");s(ZU,"mergeMappings");s(fm,"storeMappingPair");s(wL,"readLineBreak");s(rn,"skipSeparationSpace");s(VT,"testDocumentSeparator");s(_L,"writeFoldedLines");s(V3t,"readPlainScalar");s(z3t,"readSingleQuotedScalar");s(G3t,"readDoubleQuotedScalar");s(W3t,"readFlowCollection");s(q3t,"readBlockScalar");s(JU,"readBlockSequence");s(j3t,"readBlockMapping");s(U3t,"readTagProperty");s(H3t,"readAnchorProperty");s(Y3t,"readAlias");s(pm,"composeNode");s(X3t,"readDocument");s(CH,"loadDocuments");s(K3t,"loadAll$1");s(Q3t,"load$1");Z3t=K3t,J3t=Q3t,SH={loadAll:Z3t,load:J3t},wH=Object.prototype.toString,_H=Object.prototype.hasOwnProperty,EL=65279,tAt=9,k0=10,eAt=13,rAt=32,iAt=33,nAt=34,bL=35,sAt=37,aAt=38,oAt=39,lAt=42,EH=44,cAt=45,$T=58,uAt=61,hAt=62,dAt=63,fAt=64,vH=91,AH=93,pAt=96,RH=123,mAt=124,LH=125,Jn={};Jn[0]="\\0";Jn[7]="\\a";Jn[8]="\\b";Jn[9]="\\t";Jn[10]="\\n";Jn[11]="\\v";Jn[12]="\\f";Jn[13]="\\r";Jn[27]="\\e";Jn[34]='\\"';Jn[92]="\\\\";Jn[133]="\\N";Jn[160]="\\_";Jn[8232]="\\L";Jn[8233]="\\P";gAt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],yAt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;s(xAt,"compileStyleMap");s(bAt,"encodeHex");kAt=1,T0=2;s(TAt,"State");s(tH,"indentString");s(kL,"generateNextLine");s(CAt,"testImplicitResolving");s(FT,"isWhitespace");s(C0,"isPrintable");s(eH,"isNsCharOrWhitespace");s(rH,"isPlainSafe");s(SAt,"isPlainSafeFirst");s(wAt,"isPlainSafeLast");s(x0,"codePointAt");s(DH,"needIndentIndicator");IH=1,TL=2,NH=3,OH=4,hm=5;s(_At,"chooseScalarStyle");s(EAt,"writeScalar");s(iH,"blockHeader");s(nH,"dropEndingNewline");s(vAt,"foldString");s(sH,"foldLine");s(AAt,"escapeString");s(RAt,"writeFlowSequence");s(aH,"writeBlockSequence");s(LAt,"writeFlowMapping");s(DAt,"writeBlockMapping");s(oH,"detectType");s(wc,"writeNode");s(IAt,"getDuplicateReferences");s(CL,"inspectNode");s(NAt,"dump$1");OAt=NAt,MAt={dump:OAt};s(vL,"renamed");Bu=uH,Pu=SH.load,r2e=SH.loadAll,i2e=MAt.dump,n2e=vL("safeLoad","load"),s2e=vL("safeLoadAll","loadAll"),a2e=vL("safeDump","dump")});function DL(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function VH(e){Id=e}function qr(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:s((n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Ts.caret,"$1"),r=r.replace(n,o),i},"replace"),getRegex:s(()=>new RegExp(r,t),"getRegex")};return i}function _l(e,t){if(t){if(Ts.escapeTest.test(e))return e.replace(Ts.escapeReplace,BH)}else if(Ts.escapeTestNoEncode.test(e))return e.replace(Ts.escapeReplaceNoEncode,BH);return e}function PH(e){try{e=encodeURI(e).replace(Ts.percentDecode,"%")}catch{return null}return e}function $H(e,t){let r=e.replace(Ts.findPipe,(a,o,l)=>{let u=!1,h=o;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),i=r.split(Ts.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length0?-2:-1}function FH(e,t,r,i,n){let a=t.href,o=t.title||null,l=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:l,tokens:i.inlineTokens(l)};return i.state.inLink=!1,u}function g4t(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(` +`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[l]=o;return l.length>=n.length?a.slice(n.length):a}).join(` +`)}function $r(e,t){return Dd.parse(e,t)}var Id,v0,Ts,BAt,PAt,$At,A0,FAt,IL,zH,GH,VAt,NL,zAt,OL,GAt,WAt,UT,ML,qAt,WH,jAt,BL,MH,UAt,HAt,YAt,XAt,qH,KAt,HT,PL,jH,QAt,UH,ZAt,JAt,t4t,HH,e4t,r4t,YH,i4t,n4t,s4t,a4t,o4t,l4t,c4t,WT,u4t,XH,KH,h4t,$L,d4t,AL,f4t,GT,w0,p4t,BH,qT,_c,jT,FL,Ec,E0,y4t,Dd,l2e,c2e,u2e,h2e,d2e,f2e,p2e,QH=b(()=>{"use strict";s(DL,"L");Id=DL();s(VH,"G");v0={exec:s(()=>null,"exec")};s(qr,"h");Ts={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},BAt=/^(?:[ \t]*(?:\n|$))+/,PAt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$At=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,FAt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,IL=/(?:[*+-]|\d{1,9}[.)])/,zH=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,GH=qr(zH).replace(/bull/g,IL).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),VAt=qr(zH).replace(/bull/g,IL).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),NL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,zAt=/^[^\n]+/,OL=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,GAt=qr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",OL).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),WAt=qr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,IL).getRegex(),UT="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",ML=/|$))/,qAt=qr("^ {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",ML).replace("tag",UT).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),WH=qr(NL).replace("hr",A0).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",UT).getRegex(),jAt=qr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",WH).getRegex(),BL={blockquote:jAt,code:PAt,def:GAt,fences:$At,heading:FAt,hr:A0,html:qAt,lheading:GH,list:WAt,newline:BAt,paragraph:WH,table:v0,text:zAt},MH=qr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",UT).getRegex(),UAt={...BL,lheading:VAt,table:MH,paragraph:qr(NL).replace("hr",A0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",MH).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",UT).getRegex()},HAt={...BL,html:qr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ML).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:v0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:qr(NL).replace("hr",A0).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",GH).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},YAt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,XAt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qH=/^( {2,}|\\)\n(?!\s*$)/,KAt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,HH=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,e4t=qr(HH,"u").replace(/punct/g,HT).getRegex(),r4t=qr(HH,"u").replace(/punct/g,UH).getRegex(),YH="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",i4t=qr(YH,"gu").replace(/notPunctSpace/g,jH).replace(/punctSpace/g,PL).replace(/punct/g,HT).getRegex(),n4t=qr(YH,"gu").replace(/notPunctSpace/g,JAt).replace(/punctSpace/g,ZAt).replace(/punct/g,UH).getRegex(),s4t=qr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,jH).replace(/punctSpace/g,PL).replace(/punct/g,HT).getRegex(),a4t=qr(/\\(punct)/,"gu").replace(/punct/g,HT).getRegex(),o4t=qr(/^<(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(),l4t=qr(ML).replace("(?:-->|$)","-->").getRegex(),c4t=qr("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",l4t).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),WT=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,u4t=qr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",WT).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),XH=qr(/^!?\[(label)\]\[(ref)\]/).replace("label",WT).replace("ref",OL).getRegex(),KH=qr(/^!?\[(ref)\](?:\[\])?/).replace("ref",OL).getRegex(),h4t=qr("reflink|nolink(?!\\()","g").replace("reflink",XH).replace("nolink",KH).getRegex(),$L={_backpedal:v0,anyPunctuation:a4t,autolink:o4t,blockSkip:t4t,br:qH,code:XAt,del:v0,emStrongLDelim:e4t,emStrongRDelimAst:i4t,emStrongRDelimUnd:s4t,escape:YAt,link:u4t,nolink:KH,punctuation:QAt,reflink:XH,reflinkSearch:h4t,tag:c4t,text:KAt,url:v0},d4t={...$L,link:qr(/^!?\[(label)\]\((.*?)\)/).replace("label",WT).getRegex(),reflink:qr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",WT).getRegex()},AL={...$L,emStrongRDelimAst:n4t,emStrongLDelim:r4t,url:qr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},BH=s(e=>p4t[e],"ke");s(_l,"w");s(PH,"J");s($H,"V");s(_0,"z");s(m4t,"ge");s(FH,"fe");s(g4t,"Je");qT=class{static{s(this,"y")}options;rules;lexer;constructor(e){this.options=e||Id}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:_0(r,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],i=g4t(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let i=_0(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:_0(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=_0(t[0],` +`).split(` +`),i="",n="",a=[];for(;r.length>0;){let o=!1,l=[],u;for(u=0;u1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;e;){let u=!1,h="",d="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let f=t[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),p=e.split(` +`,1)[0],m=!f.trim(),g=0;if(this.options.pedantic?(g=2,d=f.trimStart()):m?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=f.slice(g),g+=t[1].length),m&&this.rules.other.blankLine.test(p)&&(h+=p+` +`,e=e.substring(p.length+1),u=!0),!u){let k=this.rules.other.nextBulletRegex(g),T=this.rules.other.hrRegex(g),C=this.rules.other.fencesBeginRegex(g),_=this.rules.other.headingBeginRegex(g),S=this.rules.other.htmlBeginRegex(g);for(;e;){let w=e.split(` +`,1)[0],A;if(p=w,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),A=p):A=p.replace(this.rules.other.tabCharGlobal," "),C.test(p)||_.test(p)||S.test(p)||k.test(p)||T.test(p))break;if(A.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=` +`+A.slice(g);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(f)||_.test(f)||T.test(f))break;d+=` +`+p}!m&&!p.trim()&&(m=!0),h+=w+` +`,e=e.substring(w.length+1),f=A.slice(g)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(x=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:d,tokens:[]}),n.raw+=h}let l=n.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let u=0;uf.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=d}if(n.loose)for(let u=0;u({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[u]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=_0(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=m4t(t[2],"()");if(a===-2)return;if(a>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),FH(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return FH(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!r||this.rules.inline.punctuation.exec(r))){let n=[...i[0]].length-1,a,o,l=n,u=0,h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+n);(i=h.exec(t))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(o=[...a].length,i[3]||i[4]){l+=o;continue}else if((i[5]||i[6])&&n%3&&!((n+o)%3)){u+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+u);let d=[...i[0]][0].length,f=e.slice(0,n+i.index+d+o);if(Math.min(n,o)%2){let m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},_c=class RL{static{s(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Id,this.options.tokenizer=this.options.tokenizer||new qT,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ts,block:GT.normal,inline:w0.normal};this.options.pedantic?(r.block=GT.pedantic,r.inline=w0.pedantic):this.options.gfm&&(r.block=GT.gfm,this.options.breaks?r.inline=w0.breaks:r.inline=w0.gfm),this.tokenizer.rules=r}static get rules(){return{block:GT,inline:w0}}static lex(t,r){return new RL(r).lex(t)}static lexInline(t,r){return new RL(r).inlineTokens(t)}lex(t){t=t.replace(Ts.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+n.raw,o.text+=` +`+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+n.raw,o.text+=` +`+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(a=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+n.raw,o.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+n.raw,o.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,o="";for(;t;){a||(o=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(u=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},jT=class{static{s(this,"P")}options;parser;constructor(e){this.options=e||Id}space(e){return""}code({text:e,lang:t,escaped:r}){let i=(t||"").match(Ts.notSpaceStart)?.[0],n=e.replace(Ts.endingNewline,"")+` +`;return i?'
'+(r?n:_l(n,!0))+`
+`:"
"+(r?n:_l(n,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,r=e.start,i="";for(let o=0;o +`+i+" +`}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+_l(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t="",r="";for(let n=0;n${i}`),` + +`+t+` +`+i+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${_l(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){let i=this.parser.parseInline(r),n=PH(e);if(n===null)return i;e=n;let a='
    ",a}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=PH(e);if(n===null)return _l(r);e=n;let a=`${r}{let o=n[a].flat(1/0);r=r.concat(this.walkTokens(o,t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=t.renderers[n.name];a?t.renderers[n.name]=function(...o){let l=n.renderer.apply(this,o);return l===!1&&(l=a.apply(this,o)),l}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[n.level];a?a.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){let n=this.defaults.renderer||new jT(this.defaults);for(let a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,l=r.renderer[o],u=n[o];n[o]=(...h)=>{let d=l.apply(n,h);return d===!1&&(d=u.apply(n,h)),d||""}}i.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new qT(this.defaults);for(let a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,l=r.tokenizer[o],u=n[o];n[o]=(...h)=>{let d=l.apply(n,h);return d===!1&&(d=u.apply(n,h)),d}}i.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new E0;for(let a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,l=r.hooks[o],u=n[o];E0.passThroughHooks.has(a)?n[o]=h=>{if(this.defaults.async&&E0.passThroughHooksRespectAsync.has(a))return Promise.resolve(l.call(n,h)).then(f=>u.call(n,f));let d=l.call(n,h);return u.call(n,d)}:n[o]=(...h)=>{let d=l.apply(n,h);return d===!1&&(d=u.apply(n,h)),d}}i.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let l=[];return l.push(a.call(this,o)),n&&(l=l.concat(n.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _c.lex(e,t??this.defaults)}parser(e,t){return Ec.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let i={...r},n={...this.defaults,...i},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=e);let o=n.hooks?n.hooks.provideLexer():e?_c.lex:_c.lexInline,l=n.hooks?n.hooks.provideParser():e?Ec.parse:Ec.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(t):t).then(u=>o(u,n)).then(u=>n.hooks?n.hooks.processAllTokens(u):u).then(u=>n.walkTokens?Promise.all(this.walkTokens(u,n.walkTokens)).then(()=>u):u).then(u=>l(u,n)).then(u=>n.hooks?n.hooks.postprocess(u):u).catch(a);try{n.hooks&&(t=n.hooks.preprocess(t));let u=o(t,n);n.hooks&&(u=n.hooks.processAllTokens(u)),n.walkTokens&&this.walkTokens(u,n.walkTokens);let h=l(u,n);return n.hooks&&(h=n.hooks.postprocess(h)),h}catch(u){return a(u)}}}onError(e,t){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let i="

    An error occurred:

    "+_l(r.message+"",!0)+"
    ";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},Dd=new y4t;s($r,"d");$r.options=$r.setOptions=function(e){return Dd.setOptions(e),$r.defaults=Dd.defaults,VH($r.defaults),$r};$r.getDefaults=DL;$r.defaults=Id;$r.use=function(...e){return Dd.use(...e),$r.defaults=Dd.defaults,VH($r.defaults),$r};$r.walkTokens=function(e,t){return Dd.walkTokens(e,t)};$r.parseInline=Dd.parseInline;$r.Parser=Ec;$r.parser=Ec.parse;$r.Renderer=jT;$r.TextRenderer=FL;$r.Lexer=_c;$r.lexer=_c.lex;$r.Tokenizer=qT;$r.Hooks=E0;$r.parse=$r;l2e=$r.options,c2e=$r.setOptions,u2e=$r.use,h2e=$r.walkTokens,d2e=$r.parseInline,f2e=Ec.parse,p2e=_c.lex});function x4t(e,{markdownAutoWrap:t}){let i=e.replace(//g,` +`).replace(/\n{2,}/g,` +`);return M2(i)}function ZH(e){return e.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}function JH(e,t={}){let r=x4t(e,t),i=$r.lexer(r),n=[[]],a=0;function o(l,u="normal"){l.type==="text"?l.text.split(` +`).forEach((d,f)=>{f!==0&&(a++,n.push([])),d.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&n[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&n[a].push({content:l.text,type:"normal"})}return s(o,"processNode"),i.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{o(u)}):l.type==="html"?n[a].push({content:l.text,type:"normal"}):n[a].push({content:l.raw,type:"normal"})}),n}function tY(e){return e?`

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

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

    ${n.tokens?.map(i).join("")}

    `:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(z.warn(`Unsupported markdown: ${n.type}`),n.raw)}return s(i,"output"),r.map(i).join("")}var rY=b(()=>{"use strict";QH();Y3();Jt();s(x4t,"preprocessMarkdown");s(ZH,"nonMarkdownToLines");s(JH,"markdownToLines");s(tY,"nonMarkdownToHTML");s(eY,"markdownToHTML")});function b4t(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function k4t(e,t){let r=b4t(t.content);return iY(e,[],r,t.type)}function iY(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];let[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?iY(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function nY(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return VL(e,t)}function VL(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());let a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return VL(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){let[l,u]=k4t(t,a);r.push([l]),u.content&&e.unshift(u)}return VL(e,t,r)}var sY=b(()=>{"use strict";s(b4t,"splitTextToChars");s(k4t,"splitWordToFitWidth");s(iY,"splitWordToFitWidthRecursion");s(nY,"splitLineToFitWidth");s(VL,"splitLineToFitWidthRecursion")});function aY(e,t){t&&e.attr("style",t)}async function T4t(e,t,r,i,n=!1,a=le()){let o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,oY)}px`),o.attr("height",`${Math.min(10*r,oY)}px`);let l=o.append("xhtml:div"),u=Ci(t.label)?await xp(t.label.replace(qt.lineBreakRegex,` +`),a):nr(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(u),aY(d,t.labelStyle),d.attr("class",`${h} ${i}`),aY(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&l.attr("class","labelBkg");let f=l.node().getBoundingClientRect();return f.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),f=l.node().getBoundingClientRect()),o.node()}function zL(e,t,r,i=!1){let n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}function C4t(e,t,r){let i=e.append("text"),n=zL(i,1,t);GL(n,r);let a=n.node().getComputedTextLength();return i.remove(),a}function cY(e,t,r){let i=e.append("text"),n=zL(i,1,t);GL(n,[{content:r,type:"normal"}]);let a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function S4t(e,t,r,i=!1,n=!1){let o=t.append("g"),l=o.insert("rect").attr("class","background").attr("style","stroke: none"),u=o.append("text").attr("y","-10.1");n&&u.attr("text-anchor","middle");let h=0;for(let d of r){let f=s(m=>C4t(o,1.1,m)<=e,"checkWidth"),p=f(d)?[d]:nY(d,f);for(let m of p){let g=zL(u,h,1.1,n);GL(g,m),h++}}if(i){let d=u.node().getBBox(),f=2;return l.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),o.node()}else return u.node()}function lY(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function GL(e,t){e.text(""),t.forEach((r,i)=>{let n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(lY(r.content)):n.text(" "+lY(r.content))})}async function w4t(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,o)=>(r.push((async()=>{let l=`${a}:${o}`;return await fF(l)?await ll(l,void 0,{class:"label-icon"}):``})()),n));let i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}var oY,zi,Xa=b(()=>{"use strict";lr();fr();Jt();rY();Re();Zh();sY();Qe();s(aY,"applyStyle");oY=16384;s(T4t,"addHtmlSpan");s(zL,"createTspan");s(C4t,"computeWidthOfText");s(cY,"computeDimensionOfText");s(S4t,"createFormattedText");s(lY,"decodeHTMLEntities");s(GL,"updateTextContentAndStyles");s(w4t,"replaceIconSubstring");zi=s(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:o=!0,isNode:l=!0,width:u=200,addSvgBackground:h=!1}={},d)=>{if(z.debug("XYZ createText",t,r,i,n,a,l,"addSvgBackground: ",h),a){let f=o?eY(t,d):tY(t),p=await w4t(ks(f),d),m=t.replace(/\\\\/g,"\\"),g={isNode:l,label:Ci(t)?m:p,labelStyle:r.replace("fill:","color:")};return await T4t(e,g,u,n,h,d)}else{let f=ks(t.replace(//g,"
    ")),p=o?JH(f.replace("
    ","
    "),d):ZH(f),m=S4t(u,e,p,t?h:!1,!l);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");vt(m).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");vt(m).select("rect").attr("style",g.replace(/background:/g,"fill:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");vt(m).select("text").attr("style",y)}return i?vt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):vt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText")});async function YT(e,t){let r=e.getElementsByTagName("img");if(!r||r.length===0)return;let i=t.replace(/]*>/g,"").trim()==="";await Promise.all([...r].map(n=>new Promise(a=>{function o(){if(n.style.display="flex",n.style.flexDirection="column",i){let l=Q().fontSize?Q().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[h=Ue.fontSize]=Gs(l),d=h*u+"px";n.style.minWidth=d,n.style.maxWidth=d}else n.style.width="100%";a(n)}s(o,"setupImage"),setTimeout(()=>{n.complete&&o()}),n.addEventListener("error",o),n.addEventListener("load",o)})))}var WL=b(()=>{"use strict";ye();ps();Re();s(YT,"configureLabelImages")});function _e(e){let t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Ka(e,t,r,i,n,a){let o=[],u=r-e,h=i-t,d=u/a,f=2*Math.PI/d,p=t+h/2;for(let m=0;m<=50;m++){let g=m/50,y=e+g*u,x=p+n*Math.sin(f*(y-e));o.push({x:y,y:x})}return o}function Nd(e,t,r,i,n,a){let o=[],l=n*Math.PI/180,d=(a*Math.PI/180-l)/(i-1);for(let f=0;fu.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",i);let n=t.find(u=>u.getAttribute("fill")!=="none"),a=t.find(u=>u.getAttribute("stroke")!=="none"),o=s((u,h)=>u?.getAttribute(h)??void 0,"getAttr");if(n){let u={fill:o(n,"fill"),"fill-opacity":o(n,"fill-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}if(a){let u={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}let l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}var Qt,XT,Vt,Kt,de=b(()=>{"use strict";Xa();ye();Qe();lr();fr();Re();WL();Qt=s(async(e,t,r)=>{let i,n=t.useHtmlLabels||Kn(Q()?.htmlLabels);r?i=r:i="node default";let a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Pr(t.labelStyle)),l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];let u=!!t.icon||!!t.img,h=t.labelType==="markdown",d=await zi(o,nr(ks(l),Q()),{useHtmlLabels:n,width:t.width||Q().flowchart?.wrappingWidth,classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:u,markdown:h},Q()),f=d.getBBox(),p=(t?.padding??0)/2;if(n){let m=d.children[0],g=vt(d);await YT(m,l),f=m.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return n?o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):o.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:f,halfPadding:p,label:o}},"labelHelper"),XT=s(async(e,t,r)=>{let i=r.useHtmlLabels??Ke(Q()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await zi(n,nr(ks(t),Q()),{useHtmlLabels:i,width:r.width||Q()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=a.getBBox(),l=r.padding/2;if(Ke(Q())){let u=a.children[0],h=vt(a);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:l,label:n}},"insertLabel"),Vt=s((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Kt=s((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");s(_e,"createPathFromPoints");s(Ka,"generateFullSineWavePoints");s(Nd,"generateCirclePoints");s(qL,"mergePaths")});function _4t(e,t){return e.intersect(t)}var uY,hY=b(()=>{"use strict";s(_4t,"intersectNode");uY=_4t});function E4t(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,l=a-i.y,u=Math.sqrt(t*t*l*l+r*r*o*o),h=Math.abs(t*r*o/u);i.x{"use strict";s(E4t,"intersectEllipse");KT=E4t});function v4t(e,t,r){return KT(e,t,t,r)}var dY,fY=b(()=>{"use strict";jL();s(v4t,"intersectCircle");dY=v4t});function A4t(e,t,r,i){{let n=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,l=n*r.x+a*r.y+o,u=n*i.x+a*i.y+o,h=1e-6;if(l!==0&&u!==0&&pY(l,u))return;let d=i.y-r.y,f=r.x-i.x,p=i.x*r.y-r.x*i.y,m=d*e.x+f*e.y+p,g=d*t.x+f*t.y+p;if(Math.abs(m)0}var mY,gY=b(()=>{"use strict";s(A4t,"intersectLine");s(pY,"sameSign");mY=A4t});function R4t(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){o=Math.min(o,d.x),l=Math.min(l,d.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));let u=i-e.width/2-o,h=n-e.height/2-l;for(let d=0;d1&&a.sort(function(d,f){let p=d.x-r.x,m=d.y-r.y,g=Math.sqrt(p*p+m*m),y=f.x-r.x,x=f.y-r.y,k=Math.sqrt(y*y+x*x);return g{"use strict";gY();s(R4t,"intersectPolygon");yY=R4t});var L4t,$u,UL=b(()=>{"use strict";L4t=s((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,l=e.height/2,u,h;return Math.abs(a)*o>Math.abs(n)*l?(a<0&&(l=-l),u=a===0?0:l*n/a,h=l):(n<0&&(o=-o),u=o,h=n===0?0:o*a/n),{x:r+u,y:i+h}},"intersectRect"),$u=L4t});var Mt,be=b(()=>{"use strict";hY();fY();jL();xY();UL();Mt={node:uY,circle:dY,ellipse:KT,polygon:yY,rect:$u}});var bY,El,D4t,R0,Pt,zt,I4t,me=b(()=>{"use strict";ye();bY=s(e=>{let{handDrawnSeed:t}=Q();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),El=s(e=>{let t=D4t([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),D4t=s(e=>{let t=new Map;return e.forEach(r=>{let[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),R0=s(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Pt=s(e=>{let{stylesArray:t}=El(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{let l=o[0];R0(l)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),l.includes("stroke")&&n.push(o.join(":")+" !important"),l==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),zt=s((e,t)=>{let{themeVariables:r,handDrawnSeed:i}=Q(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=El(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:I4t(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),I4t=s(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let n=isNaN(t[0])?0:t[0];return[n,n]}let r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray")});function HL(e,t,r){if(e&&e.length){let[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),l=Math.sin(a);for(let u of e){let[h,d]=u;u[0]=(h-i)*o-(d-n)*l+i,u[1]=(h-i)*l+(d-n)*o+n}}}function N4t(e,t){return e[0]===t[0]&&e[1]===t[1]}function O4t(e,t,r,i=1){let n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,l=[0,0];if(n)for(let h of o)HL(h,l,n);let u=(function(h,d,f){let p=[];for(let T of h){let C=[...T];N4t(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&p.push(C)}let m=[];d=Math.max(d,.1);let g=[];for(let T of p)for(let C=0;CT.yminC.ymin?1:T.xC.x?1:T.ymax===C.ymax?0:(T.ymax-C.ymax)/Math.abs(T.ymax-C.ymax))),!g.length)return m;let y=[],x=g[0].ymin,k=0;for(;y.length||g.length;){if(g.length){let T=-1;for(let C=0;Cx);C++)T=C;g.splice(0,T+1).forEach((C=>{y.push({s:x,edge:C})}))}if(y=y.filter((T=>!(T.edge.ymax<=x))),y.sort(((T,C)=>T.edge.x===C.edge.x?0:(T.edge.x-C.edge.x)/Math.abs(T.edge.x-C.edge.x))),(f!==1||k%d==0)&&y.length>1)for(let T=0;T=y.length)break;let _=y[T].edge,S=y[C].edge;m.push([[Math.round(_.x),x],[Math.round(S.x),x]])}x+=f,y.forEach((T=>{T.edge.x=T.edge.x+f*T.edge.islope})),k++}return m})(o,a,i);if(n){for(let h of o)HL(h,l,-n);(function(h,d,f){let p=[];h.forEach((m=>p.push(...m))),HL(p,d,f)})(u,l,-n)}return u}function N0(e,t){var r;let i=t.hachureAngle+90,n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),O4t(e,n,i,a||1)}function sC(e){let t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function XL(e,t){return e.type===t}function cD(e){let t=[],r=(function(o){let l=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:M4t,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:YL,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return l[l.length]={type:kY,text:""},l})(e),i="BOD",n=0,a=r[n];for(;!XL(a,kY);){let o=0,l=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return cD("M0,0"+e);n++,o=QT[a.text],i=a.text}else XL(a,YL)?o=QT[i]:(n++,o=QT[a.text],i=a.text);if(!(n+od%2?h+r:h+t));a.push({key:"C",data:u}),t=u[4],r=u[5];break}case"Q":a.push({key:"Q",data:[...l]}),t=l[2],r=l[3];break;case"q":{let u=l.map(((h,d)=>d%2?h+r:h+t));a.push({key:"Q",data:u}),t=u[2],r=u[3];break}case"A":a.push({key:"A",data:[...l]}),t=l[5],r=l[6];break;case"a":t+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,r]});break;case"H":a.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),t=l[2],r=l[3];break;case"s":{let u=l.map(((h,d)=>d%2?h+r:h+t));a.push({key:"S",data:u}),t=u[2],r=u[3];break}case"T":a.push({key:"T",data:[...l]}),t=l[0],r=l[1];break;case"t":t+=l[0],r+=l[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function RY(e){let t=[],r="",i=0,n=0,a=0,o=0,l=0,u=0;for(let{key:h,data:d}of e){switch(h){case"M":t.push({key:"M",data:[...d]}),[i,n]=d,[a,o]=d;break;case"C":t.push({key:"C",data:[...d]}),i=d[4],n=d[5],l=d[2],u=d[3];break;case"L":t.push({key:"L",data:[...d]}),[i,n]=d;break;case"H":i=d[0],t.push({key:"L",data:[i,n]});break;case"V":n=d[0],t.push({key:"L",data:[i,n]});break;case"S":{let f=0,p=0;r==="C"||r==="S"?(f=i+(i-l),p=n+(n-u)):(f=i,p=n),t.push({key:"C",data:[f,p,...d]}),l=d[0],u=d[1],i=d[2],n=d[3];break}case"T":{let[f,p]=d,m=0,g=0;r==="Q"||r==="T"?(m=i+(i-l),g=n+(n-u)):(m=i,g=n);let y=i+2*(m-i)/3,x=n+2*(g-n)/3,k=f+2*(m-f)/3,T=p+2*(g-p)/3;t.push({key:"C",data:[y,x,k,T,f,p]}),l=m,u=g,i=f,n=p;break}case"Q":{let[f,p,m,g]=d,y=i+2*(f-i)/3,x=n+2*(p-n)/3,k=m+2*(f-m)/3,T=g+2*(p-g)/3;t.push({key:"C",data:[y,x,k,T,m,g]}),l=f,u=p,i=m,n=g;break}case"A":{let f=Math.abs(d[0]),p=Math.abs(d[1]),m=d[2],g=d[3],y=d[4],x=d[5],k=d[6];f===0||p===0?(t.push({key:"C",data:[i,n,x,k,x,k]}),i=x,n=k):(i!==x||n!==k)&&(LY(i,n,x,k,f,p,m,g,y).forEach((function(T){t.push({key:"C",data:T})})),i=x,n=k);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=h}return t}function L0(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function LY(e,t,r,i,n,a,o,l,u,h){let d=(f=o,Math.PI*f/180);var f;let p=[],m=0,g=0,y=0,x=0;if(h)[m,g,y,x]=h;else{[e,t]=L0(e,t,-d),[r,i]=L0(r,i,-d);let B=(e-r)/2,O=(t-i)/2,R=B*B/(n*n)+O*O/(a*a);R>1&&(R=Math.sqrt(R),n*=R,a*=R);let N=n*n,P=a*a,E=N*P-N*O*O-P*B*B,D=N*O*O+P*B*B,V=(l===u?-1:1)*Math.sqrt(Math.abs(E/D));y=V*n*O/a+(e+r)/2,x=V*-a*B/n+(t+i)/2,m=Math.asin(parseFloat(((t-x)/a).toFixed(9))),g=Math.asin(parseFloat(((i-x)/a).toFixed(9))),eg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let k=g-m;if(Math.abs(k)>120*Math.PI/180){let B=g,O=r,R=i;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=LY(r=y+n*Math.cos(g),i=x+a*Math.sin(g),O,R,n,a,o,0,u,[g,B,y,x])}k=g-m;let T=Math.cos(m),C=Math.sin(m),_=Math.cos(g),S=Math.sin(g),w=Math.tan(k/4),A=4/3*n*w,v=4/3*a*w,M=[e,t],$=[e+A*C,t-v*T],I=[r+A*S,i-v*_],F=[r,i];if($[0]=2*M[0]-$[0],$[1]=2*M[1]-$[1],h)return[$,I,F].concat(p);{p=[$,I,F].concat(p);let B=[];for(let O=0;O2){let n=[];for(let a=0;a2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,x=Math.min(y/2,(g-m)/2),k=EY(x,h,d,f,p,m,g,1,u);if(!u.disableMultiStroke){let T=EY(x,h,d,f,p,m,g,1.5,u);k.push(...T)}return o&&(l?k.push(...Fu(h,d,h+f*Math.cos(m),d+p*Math.sin(m),u),...Fu(h,d,h+f*Math.cos(g),d+p*Math.sin(g),u)):k.push({op:"lineTo",data:[h,d]},{op:"lineTo",data:[h+f*Math.cos(m),d+p*Math.sin(m)]})),{type:"path",ops:k}}function SY(e,t){let r=RY(AY(cD(e))),i=[],n=[0,0],a=[0,0];for(let{key:o,data:l}of r)switch(o){case"M":a=[l[0],l[1]],n=[l[0],l[1]];break;case"L":i.push(...Fu(a[0],a[1],l[0],l[1],t)),a=[l[0],l[1]];break;case"C":{let[u,h,d,f,p,m]=l;i.push(...$4t(u,h,d,f,p,m,a,t)),a=[p,m];break}case"Z":i.push(...Fu(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function KL(e,t){let r=[];for(let i of e)if(i.length){let n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Pe(n,t),i[0][1]+Pe(n,t)]});for(let o=1;o500?.4:-.0016668*u+1.233334;let d=n.maxRandomnessOffset||0;d*d*100>l&&(d=u/10);let f=d/2,p=.2+.2*NY(n),m=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;m=Pe(m,n,h),g=Pe(g,n,h);let y=[],x=s(()=>Pe(f,n,h),"M"),k=s(()=>Pe(d,n,h),"k"),T=n.preserveVertices;return a&&(o?y.push({op:"move",data:[e+(T?0:x()),t+(T?0:x())]}):y.push({op:"move",data:[e+(T?0:Pe(d,n,h)),t+(T?0:Pe(d,n,h))]})),o?y.push({op:"bcurveTo",data:[m+e+(r-e)*p+x(),g+t+(i-t)*p+x(),m+e+2*(r-e)*p+x(),g+t+2*(i-t)*p+x(),r+(T?0:x()),i+(T?0:x())]}):y.push({op:"bcurveTo",data:[m+e+(r-e)*p+k(),g+t+(i-t)*p+k(),m+e+2*(r-e)*p+k(),g+t+2*(i-t)*p+k(),r+(T?0:k()),i+(T?0:k())]}),y}function ZT(e,t,r){if(!e.length)return[];let i=[];i.push([e[0][0]+Pe(t,r),e[0][1]+Pe(t,r)]),i.push([e[0][0]+Pe(t,r),e[0][1]+Pe(t,r)]);for(let n=1;n3){let a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let l=1;l+21&&n.push(l)):n.push(l),n.push(e[t+3])}else{let u=e[t+0],h=e[t+1],d=e[t+2],f=e[t+3],p=Od(u,h,.5),m=Od(h,d,.5),g=Od(d,f,.5),y=Od(p,m,.5),x=Od(m,g,.5),k=Od(y,x,.5);aD([u,p,y,k],0,r,n),aD([k,x,g,f],0,r,n)}var a,o;return n}function V4t(e,t){return nC(e,0,e.length,t)}function nC(e,t,r,i,n){let a=n||[],o=e[t],l=e[r-1],u=0,h=1;for(let d=t+1;du&&(u=f,h=d)}return Math.sqrt(u)>i?(nC(e,t,h+1,i,a),nC(e,h,r,i,a)):(a.length||a.push(o),a.push(l)),a}function QL(e,t=.15,r){let i=[],n=(e.length-1)/3;for(let a=0;a0?nC(i,0,i.length,r):i}var I0,ZL,JL,tD,eD,rD,Us,iD,M4t,YL,kY,QT,B4t,ka,gm,oD,JT,lD,$t,xe=b(()=>{"use strict";s(HL,"t");s(N4t,"e");s(O4t,"s");s(N0,"n");I0=class{static{s(this,"o")}constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){let i=N0(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){let i=[];for(let n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}};s(sC,"a");ZL=class extends I0{static{s(this,"h")}fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let n=N0(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],l=.5*i*Math.cos(a),u=.5*i*Math.sin(a);for(let[h,d]of n)sC([h,d])&&o.push([[h[0]-l,h[1]+u],[...d]],[[h[0]+l,h[1]-u],[...d]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},JL=class extends I0{static{s(this,"r")}fillPolygons(t,r){let i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}},tD=class{static{s(this,"i")}constructor(t){this.helper=t}fillPolygons(t,r){let i=N0(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){let i=[],n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let o=n/4;for(let l of t){let u=sC(l),h=u/n,d=Math.ceil(h)-1,f=u-d*n,p=(l[0][0]+l[1][0])/2-n/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g{let l=sC(o),u=Math.floor(l/(i+n)),h=(l+n-u*(i+n))/2,d=o[0],f=o[1];d[0]>f[0]&&(d=o[1],f=o[0]);let p=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let m=0;m{let o=sC(a),l=Math.round(o/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f2*Math.PI&&(A=0,v=2*Math.PI);let M=(v-A)/T.curveStepCount,$=[];for(let I=A;I<=v;I+=M)$.push([C+S*Math.cos(I),_+w*Math.sin(I)]);return $.push([C+S*Math.cos(v),_+w*Math.sin(v)]),$.push([C,_]),mm([$],T)})(t,r,i,n,a,o,h));return h.stroke!==ka&&d.push(f),this._d("arc",d,h)}curve(t,r){let i=this._o(r),n=[],a=TY(t,i);if(i.fill&&i.fill!==ka)if(i.fillStyle==="solid"){let o=TY(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{let o=[],l=t;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?o.push(...h):h.length===3?o.push(...QL(vY([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...QL(vY(h),10,(1+i.roughness)/2))}o.length&&n.push(mm([o],i))}return i.stroke!==ka&&n.push(a),this._d("curve",n,i)}polygon(t,r){let i=this._o(r),n=[],a=tC(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(KL([t],i)):n.push(mm([t],i))),i.stroke!==ka&&n.push(a),this._d("polygon",n,i)}path(t,r){let i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=i.fill&&i.fill!=="transparent"&&i.fill!==ka,o=i.stroke!==ka,l=!!(i.simplification&&i.simplification<1),u=(function(d,f,p){let m=RY(AY(cD(d))),g=[],y=[],x=[0,0],k=[],T=s(()=>{k.length>=4&&y.push(...QL(k,f)),k=[]},"i"),C=s(()=>{T(),y.length&&(g.push(y),y=[])},"c");for(let{key:S,data:w}of m)switch(S){case"M":C(),x=[w[0],w[1]],y.push(x);break;case"L":T(),y.push([w[0],w[1]]);break;case"C":if(!k.length){let A=y.length?y[y.length-1]:x;k.push([A[0],A[1]])}k.push([w[0],w[1]]),k.push([w[2],w[3]]),k.push([w[4],w[5]]);break;case"Z":T(),y.push([x[0],x[1]])}if(C(),!p)return g;let _=[];for(let S of g){let w=V4t(S,p);w.length&&_.push(w)}return _})(t,1,l?4-4*(i.simplification||1):(1+i.roughness)/2),h=SY(t,i);if(a)if(i.fillStyle==="solid")if(u.length===1){let d=SY(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else n.push(KL(u,i));else n.push(mm(u,i));return o&&(l?u.forEach((d=>{n.push(tC(d,!1,i))})):n.push(h)),this._d("path",n,i)}opsToPath(t,r){let i="";for(let n of t.ops){let a=typeof r=="number"&&r>=0?n.data.map((o=>+o.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){let r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(let a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ka};break;case"fillPath":o={d:this.opsToPath(a),stroke:ka,strokeWidth:0,fill:i.fill||ka};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ka,strokeWidth:i,fill:ka}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}},oD=class{static{s(this,"st")}constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new gm(r)}draw(t){let r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(let o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";let l=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,l),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(let a of r.ops){let o=typeof i=="number"&&i>=0?a.data.map((l=>+l.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){let o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){let o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){let o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){let a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){let i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){let i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,l=!1,u){let h=this.gen.arc(t,r,i,n,a,o,l,u);return this.draw(h),h}curve(t,r){let i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){let i=this.gen.path(t,r);return this.draw(i),i}},JT="http://www.w3.org/2000/svg",lD=class{static{s(this,"ot")}constructor(t,r){this.svg=t,this.gen=new gm(r)}draw(t){let r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(JT,"g"),o=t.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=n.createElementNS(JT,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke",i.stroke),u.setAttribute("stroke-width",i.strokeWidth+""),u.setAttribute("fill","none"),i.strokeLineDash&&u.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":u=n.createElementNS(JT,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(n,l,i)}u&&a.appendChild(u)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);let a=t.createElementNS(JT,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){let o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){let o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){let o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){let a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){let i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){let i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,l=!1,u){let h=this.gen.arc(t,r,i,n,a,o,l,u);return this.draw(h)}curve(t,r){let i=this.gen.curve(t,r);return this.draw(i)}path(t,r){let i=this.gen.path(t,r);return this.draw(i)}},$t={canvas:s((e,t)=>new oD(e,t),"canvas"),svg:s((e,t)=>new lD(e,t),"svg"),generator:s(e=>new gm(e),"generator"),newSeed:s(()=>gm.newSeed(),"newSeed")}});function OY(e,t){let{labelStyles:r}=Pt(t);t.labelStyle=r;let i=Kt(t),n=i;i||(n="anchor");let a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:l}=t,u=$t.svg(a),h=zt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);let d=u.circle(0,0,o*2,h),f=a.insert(()=>d,":first-child");return f.attr("class","anchor").attr("style",Pr(l)),Vt(t,f),t.intersect=function(p){return z.info("Circle intersect",t,o,p),Mt.circle(t,o,p)},a}var MY=b(()=>{"use strict";Jt();de();be();me();xe();Re();s(OY,"anchor")});function BY(e,t,r,i,n,a,o){let u=(e+r)/2,h=(t+i)/2,d=Math.atan2(i-t,r-e),f=(r-e)/2,p=(i-t)/2,m=f/n,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let x=Math.sqrt(1-y**2),k=u+x*a*Math.sin(d)*(o?-1:1),T=h-x*n*Math.cos(d)*(o?-1:1),C=Math.atan2((t-T)/a,(e-k)/n),S=Math.atan2((i-T)/a,(r-k)/n)-C;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);let w=[];for(let A=0;A<20;A++){let v=A/19,M=C+v*S,$=k+n*Math.cos(M),I=T+a*Math.sin(M);w.push({x:$,y:I})}return w}function z4t(e,t,r){let[i,n]=[t,r].sort((a,o)=>o-a);return n*(1-Math.sqrt(1-(e/i/2)**2))}async function PY(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=s(M=>M+o,"calcTotalHeight"),u=s(M=>{let $=M/2;return[$/(2.5+M/50),$]},"calcEllipseRadius"),{shapeSvg:h,bbox:d}=await Qt(e,t,Kt(t)),f=l(t?.height?t?.height:d.height),[p,m]=u(f),g=z4t(f,p,m),x=(t?.width?t?.width:d.width)+a*2+g-g,k=f,{cssStyles:T}=t,C=[{x:x/2,y:-k/2},{x:-x/2,y:-k/2},...BY(-x/2,-k/2,-x/2,k/2,p,m,!1),{x:x/2,y:k/2},...BY(x/2,k/2,x/2,-k/2,p,m,!0)],_=$t.svg(h),S=zt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let w=_e(C),A=_.path(w,S),v=h.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",T),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),Vt(t,v),t.intersect=function(M){return Mt.polygon(t,C,M)},h}var $Y=b(()=>{"use strict";de();be();me();xe();s(BY,"generateArcPoints");s(z4t,"calculateArcSagitta");s(PY,"bowTieRect")});function ts(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var vc=b(()=>{"use strict";s(ts,"insertPolygonShape")});async function FY(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?28:n,o=t.look==="neo"?24:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.width??u.width)+(t.look==="neo"?a*2:a+aC),d=(t?.height??u.height)+(t.look==="neo"?o*2:o),f=0,p=h,m=-d,g=0,y=[{x:f+aC,y:m},{x:p,y:m},{x:p,y:g},{x:f,y:g},{x:f,y:m+aC},{x:f+aC,y:m}],x,{cssStyles:k}=t;if(t.look==="handDrawn"){let T=$t.svg(l),C=zt(t,{}),_=_e(y),S=T.path(_,C);x=l.insert(()=>S,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),k&&x.attr("style",k)}else x=ts(l,h,d,y);return i&&x.attr("style",i),Vt(t,x),t.intersect=function(T){return Mt.polygon(t,y,T)},l}var aC,VY=b(()=>{"use strict";de();be();me();xe();vc();de();aC=12;s(FY,"card")});function zY(e,t){let{nodeStyles:r}=Pt(t);t.label="";let i=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=$t.svg(i),u=zt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=_e(o),d=l.path(h,u),f=i.insert(()=>d,":first-child");return n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return Mt.polygon(t,o,p)},i}var GY=b(()=>{"use strict";be();xe();me();de();s(zY,"choice")});async function oC(e,t,r){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{shapeSvg:a,bbox:o,halfPadding:l}=await Qt(e,t,Kt(t)),u=16,h=r?.padding??l,d=t.look==="neo"?o.width/2+u*2:o.width/2+h,f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=$t.svg(a),g=zt(t,{}),y=m.circle(0,0,d*2,g);f=a.insert(()=>y,":first-child"),f.attr("class","basic label-container").attr("style",Pr(p))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0);return Vt(t,f),t.calcIntersect=function(m,g){let y=m.width/2;return Mt.circle(m,y,g)},t.intersect=function(m){return z.info("Circle intersect",t,d,m),Mt.circle(t,d,m)},a}var uD=b(()=>{"use strict";xe();Jt();Re();be();me();de();s(oC,"circle")});function G4t(e){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},l={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${l.x},${l.y} + M ${n.x},${n.y} L ${o.x},${o.y}`}function WY(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,l=$t.svg(n),u=zt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),d=G4t(a),f=l.path(d,u),p=n.insert(()=>h,":first-child");return p.insert(()=>f),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Vt(t,p),t.intersect=function(m){return z.info("crossedCircle intersect",t,{radius:a,point:m}),Mt.circle(t,a,m)},n}var qY=b(()=>{"use strict";Jt();de();me();xe();be();s(G4t,"createLine");s(WY,"crossedCircle")});function Vu(e,t,r,i=100,n=0,a=180){let o=[],l=n*Math.PI/180,d=(a*Math.PI/180-l)/(i-1);for(let f=0;fS,":first-child").attr("stroke-opacity",0),w.insert(()=>C,":first-child"),w.attr("class","text"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${f}, 0)`),o.attr("transform",`translate(${-h/2+f-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,w),t.intersect=function(A){return Mt.polygon(t,g,A)},n}var UY=b(()=>{"use strict";de();be();me();xe();s(Vu,"generateCirclePoints");s(jY,"curlyBraceLeft")});function zu(e,t,r,i=100,n=0,a=180){let o=[],l=n*Math.PI/180,d=(a*Math.PI/180-l)/(i-1);for(let f=0;fS,":first-child").attr("stroke-opacity",0),w.insert(()=>C,":first-child"),w.attr("class","text"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-f}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,w),t.intersect=function(A){return Mt.polygon(t,g,A)},n}var YY=b(()=>{"use strict";de();be();me();xe();s(zu,"generateCirclePoints");s(HY,"curlyBraceRight")});function es(e,t,r,i=100,n=0,a=180){let o=[],l=n*Math.PI/180,d=(a*Math.PI/180-l)/(i-1);for(let f=0;fM,":first-child").attr("stroke-opacity",0),$.insert(()=>_,":first-child"),$.insert(()=>A,":first-child"),$.attr("class","text"),p&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(${f-f/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,$),t.intersect=function(I){return Mt.polygon(t,y,I)},n}var KY=b(()=>{"use strict";de();be();me();xe();s(es,"generateCirclePoints");s(XY,"curlyBraces")});async function QY(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=20,u=5,{shapeSvg:h,bbox:d}=await Qt(e,t,Kt(t)),f=Math.max(l,(d.width+a*2)*1.25,t?.width??0),p=Math.max(u,d.height+o*2,t?.height??0),m=p/2,{cssStyles:g}=t,y=$t.svg(h),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=f,T=p,C=k-m,_=T/4,S=[{x:C,y:0},{x:_,y:0},{x:0,y:T/2},{x:_,y:T},{x:C,y:T},...Nd(-C,-T/2,m,50,270,90)],w=_e(S),A=y.path(w,x),v=h.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-f/2}, ${-p/2})`),Vt(t,v),t.intersect=function(M){return Mt.polygon(t,S,M)},h}var ZY=b(()=>{"use strict";de();be();me();xe();s(QY,"curvedTrapezoid")});async function eX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?24:n,o=t.look==="neo"?24:n;if(t.width||t.height){let x=t.width??0;t.width=(t.width??0)-o,t.widthS,":first-child"),g=l.insert(()=>_,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{let x=W4t(0,0,d,m,f,p);g=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Pr(y)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-d/2}, ${-(m/2+p)})`),Vt(t,g),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(x){let k=Mt.rect(t,x),T=k.x-(t.x??0);if(f!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-p)){let C=p*p*(1-T*T/(f*f));C>0&&(C=Math.sqrt(C)),C=p-C,x.y-(t.y??0)>0&&(C=-C),k.y+=C}return k},l}var W4t,q4t,j4t,JY,tX,rX=b(()=>{"use strict";de();be();me();xe();Re();W4t=s((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),q4t=s((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),j4t=s((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),JY=8,tX=8;s(eX,"cylinder")});async function iX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:l,label:u}=await Qt(e,t,Kt(t)),h=l.width+n,d=l.height+a,f=d*.2,p=-h/2,m=-d/2-f/2,{cssStyles:g}=t,y=$t.svg(o),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=[{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}],T=y.polygon(k.map(_=>[_.x,_.y]),x),C=o.insert(()=>T,":first-child");return C.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),u.attr("transform",`translate(${p+(t.padding??0)/2-(l.x-(l.left??0))}, ${m+f+(t.padding??0)/2-(l.y-(l.top??0))})`),Vt(t,C),t.intersect=function(_){return Mt.rect(t,_)},o}var nX=b(()=>{"use strict";de();be();me();xe();s(iX,"dividedRectangle")});async function sX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t),n=t.look==="neo"?12:5;t.labelStyle=r;let a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.width?t?.width/2:u.width/2)+(o??0),d=h-n,f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=$t.svg(l),g=zt(t,{roughness:.2,strokeWidth:2.5}),y=zt(t,{roughness:.2,strokeWidth:1.5}),x=m.circle(0,0,h*2,g),k=m.circle(0,0,d*2,y);f=l.insert("g",":first-child"),f.attr("class",Pr(t.cssClasses)).attr("style",Pr(p)),f.node()?.appendChild(x),f.node()?.appendChild(k)}else{f=l.insert("g",":first-child");let m=f.insert("circle",":first-child"),g=f.insert("circle");f.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0)}return Vt(t,f),t.intersect=function(m){return z.info("DoubleCircle intersect",t,h,m),Mt.circle(t,h,m)},l}var aX=b(()=>{"use strict";Jt();de();be();me();xe();Re();s(sX,"doublecircle")});function oX(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:l}=t,u=$t.svg(a),{nodeBorder:h}=r,d=zt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);let f=u.circle(0,0,o*2,d),p=a.insert(()=>f,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",l),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Vt(t,p),t.intersect=function(m){return z.info("filledCircle intersect",t,{radius:o,point:m}),Mt.circle(t,o,m)},a}var lX=b(()=>{"use strict";xe();Jt();be();me();de();s(oX,"filledCircle")});async function hX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.height=t?.height??0,t.heightk,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),t.width=h,t.height=d,Vt(t,T),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-d/2+(t.padding??0)/2+(l.y-(l.top??0))})`),t.intersect=function(C){return z.info("Triangle intersect",t,p,C),Mt.polygon(t,p,C)},o}var cX,uX,dX=b(()=>{"use strict";Jt();de();be();me();xe();de();cX=10,uX=10;s(hX,"flippedTriangle")});function fX(e,t,{dir:r,config:{state:i,themeVariables:n}}){let{nodeStyles:a}=Pt(t);t.label="";let o=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,u=Math.max(70,t?.width??0),h=Math.max(10,t?.height??0);r==="LR"&&(u=Math.max(10,t?.width??0),h=Math.max(70,t?.height??0));let d=-1*u/2,f=-1*h/2,p=$t.svg(o),m=zt(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(d,f,u,h,m),y=o.insert(()=>g,":first-child");l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Vt(t,y);let x=i?.padding??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(k){return Mt.rect(t,k)},o}var pX=b(()=>{"use strict";xe();be();me();de();s(fX,"forkJoin")});async function mX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=15,a=10,o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-l*2,t.heightT,":first-child");return C.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),Vt(t,C),t.intersect=function(_){return z.info("Pill intersect",t,{radius:p,point:_}),Mt.polygon(t,x,_)},u}var gX=b(()=>{"use strict";Jt();de();be();me();xe();s(mX,"halfRoundedRectangle")});async function yX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t),n=t.look==="neo"?3.5:4;t.labelStyle=r;let a=t.padding??0,o=70,l=32,u=t.look==="neo"?o:a,h=t.look==="neo"?l:a;if(t.width||t.height){let C=(t.height??0)/n;t.width=(t?.width??0)-2*C-h,t.height=(t.height??0)-u}let{shapeSvg:d,bbox:f}=await Qt(e,t,Kt(t)),p=(t?.height?t?.height:f.height)+u,m=p/n,g=(t?.width?t?.width:f.width)+2*m+h,y=[{x:m,y:0},{x:g-m,y:0},{x:g,y:-p/2},{x:g-m,y:-p},{x:m,y:-p},{x:0,y:-p/2}],x,{cssStyles:k}=t;if(t.look==="handDrawn"){let T=$t.svg(d),C=zt(t,{}),_=U4t(0,0,g,p,m),S=T.path(_,C);x=d.insert(()=>S,":first-child").attr("transform",`translate(${-g/2}, ${p/2})`),k&&x.attr("style",k)}else x=ts(d,g,p,y);return i&&x.attr("style",i),t.width=g,t.height=p,Vt(t,x),t.intersect=function(T){return Mt.polygon(t,y,T)},d}var U4t,xX=b(()=>{"use strict";de();be();me();xe();vc();U4t=s((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");s(yX,"hexagon")});async function bX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.label="",t.labelStyle=r;let{shapeSvg:n}=await Qt(e,t,Kt(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:l}=t,u=$t.svg(n),h=zt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let d=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],f=_e(d),p=u.path(f,h),m=n.insert(()=>p,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-a/2}, ${-o/2})`),Vt(t,m),t.intersect=function(g){return z.info("Pill intersect",t,{points:d}),Mt.polygon(t,d,g)},n}var kX=b(()=>{"use strict";Jt();de();be();me();xe();s(bX,"hourglass")});async function TX(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=i?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,label:f}=await Qt(e,t,"icon-shape default"),p=t.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:x}=El(t),k=-g/2,T=-m/2,C=t.label?8:0,_=$t.svg(h),S=zt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let w=_.rectangle(k,T,g,m,S),A=Math.max(g,d.width),v=m+d.height+C,M=_.rectangle(-A/2,-v/2,A,v,{...S,fill:"transparent",stroke:"none"}),$=h.insert(()=>w,":first-child"),I=h.insert(()=>M);if(t.icon){let F=h.append("g");F.html(`${await ll(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let B=F.node().getBBox(),O=B.width,R=B.height,N=B.x,P=B.y;F.attr("transform",`translate(${-O/2-N},${p?d.height/2+C/2-R/2-P:-d.height/2-C/2-R/2-P})`),F.attr("style",`color: ${x.get("stroke")??y};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${p?-v/2:v/2-d.height})`),$.attr("transform",`translate(0,${p?d.height/2+C/2:-d.height/2-C/2})`),Vt(t,I),t.intersect=function(F){if(z.info("iconSquare intersect",t,F),!t.label)return Mt.rect(t,F);let B=t.x??0,O=t.y??0,R=t.height??0,N=[];return p?N=[{x:B-d.width/2,y:O-R/2},{x:B+d.width/2,y:O-R/2},{x:B+d.width/2,y:O-R/2+d.height+C},{x:B+g/2,y:O-R/2+d.height+C},{x:B+g/2,y:O+R/2},{x:B-g/2,y:O+R/2},{x:B-g/2,y:O-R/2+d.height+C},{x:B-d.width/2,y:O-R/2+d.height+C}]:N=[{x:B-g/2,y:O-R/2},{x:B+g/2,y:O-R/2},{x:B+g/2,y:O-R/2+m},{x:B+d.width/2,y:O-R/2+m},{x:B+d.width/2/2,y:O+R/2},{x:B-d.width/2,y:O+R/2},{x:B-d.width/2,y:O-R/2+m},{x:B-g/2,y:O-R/2+m}],Mt.polygon(t,N,F)},h}var CX=b(()=>{"use strict";xe();Jt();Zh();be();me();de();s(TX,"icon")});async function SX(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=i?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,label:f}=await Qt(e,t,"icon-shape default"),p=20,m=t.label?8:0,g=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:k}=El(t),T=$t.svg(h),C=zt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let _=k.get("fill");C.stroke=_??x;let S=h.append("g");t.icon&&S.html(`${await ll(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let w=S.node().getBBox(),A=w.width,v=w.height,M=w.x,$=w.y,I=Math.max(A,v)*Math.SQRT2+p*2,F=T.circle(0,0,I,C),B=Math.max(I,d.width),O=I+d.height+m,R=T.rectangle(-B/2,-O/2,B,O,{...C,fill:"transparent",stroke:"none"}),N=h.insert(()=>F,":first-child"),P=h.insert(()=>R);return S.attr("transform",`translate(${-A/2-M},${g?d.height/2+m/2-v/2-$:-d.height/2-m/2-v/2-$})`),S.attr("style",`color: ${k.get("stroke")??y};`),f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-O/2:O/2-d.height})`),N.attr("transform",`translate(0,${g?d.height/2+m/2:-d.height/2-m/2})`),Vt(t,P),t.intersect=function(E){return z.info("iconSquare intersect",t,E),Mt.rect(t,E)},h}var wX=b(()=>{"use strict";xe();Jt();Zh();be();me();de();s(SX,"iconCircle")});var Hs,Md=b(()=>{"use strict";Hs=s((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD")});async function _X(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=i?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,halfPadding:f,label:p}=await Qt(e,t,"icon-shape default"),m=t.pos==="t",g=l+f*2,y=l+f*2,{nodeBorder:x,mainBkg:k}=r,{stylesMap:T}=El(t),C=-y/2,_=-g/2,S=t.label?8:0,w=$t.svg(h),A=zt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let v=T.get("fill");A.stroke=v??k;let M=w.path(Hs(C,_,y,g,5),A),$=Math.max(y,d.width),I=g+d.height+S,F=w.rectangle(-$/2,-I/2,$,I,{...A,fill:"transparent",stroke:"none"}),B=h.insert(()=>M,":first-child").attr("class","icon-shape2"),O=h.insert(()=>F);if(t.icon){let R=h.append("g");R.html(`${await ll(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let N=R.node().getBBox(),P=N.width,E=N.height,D=N.x,V=N.y;R.attr("transform",`translate(${-P/2-D},${m?d.height/2+S/2-E/2-V:-d.height/2-S/2-E/2-V})`),R.attr("style",`color: ${T.get("stroke")??x};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),B.attr("transform",`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),Vt(t,O),t.intersect=function(R){if(z.info("iconSquare intersect",t,R),!t.label)return Mt.rect(t,R);let N=t.x??0,P=t.y??0,E=t.height??0,D=[];return m?D=[{x:N-d.width/2,y:P-E/2},{x:N+d.width/2,y:P-E/2},{x:N+d.width/2,y:P-E/2+d.height+S},{x:N+y/2,y:P-E/2+d.height+S},{x:N+y/2,y:P+E/2},{x:N-y/2,y:P+E/2},{x:N-y/2,y:P-E/2+d.height+S},{x:N-d.width/2,y:P-E/2+d.height+S}]:D=[{x:N-y/2,y:P-E/2},{x:N+y/2,y:P-E/2},{x:N+y/2,y:P-E/2+g},{x:N+d.width/2,y:P-E/2+g},{x:N+d.width/2/2,y:P+E/2},{x:N-d.width/2,y:P+E/2},{x:N-d.width/2,y:P-E/2+g},{x:N-y/2,y:P-E/2+g}],Mt.polygon(t,D,R)},h}var EX=b(()=>{"use strict";xe();Jt();Zh();be();me();Md();de();s(_X,"iconRounded")});async function vX(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=i?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,halfPadding:f,label:p}=await Qt(e,t,"icon-shape default"),m=t.pos==="t",g=l+f*2,y=l+f*2,{nodeBorder:x,mainBkg:k}=r,{stylesMap:T}=El(t),C=-y/2,_=-g/2,S=t.label?8:0,w=$t.svg(h),A=zt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let v=T.get("fill");A.stroke=v??k;let M=w.path(Hs(C,_,y,g,.1),A),$=Math.max(y,d.width),I=g+d.height+S,F=w.rectangle(-$/2,-I/2,$,I,{...A,fill:"transparent",stroke:"none"}),B=h.insert(()=>M,":first-child"),O=h.insert(()=>F);if(t.icon){let R=h.append("g");R.html(`${await ll(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let N=R.node().getBBox(),P=N.width,E=N.height,D=N.x,V=N.y;R.attr("transform",`translate(${-P/2-D},${m?d.height/2+S/2-E/2-V:-d.height/2-S/2-E/2-V})`),R.attr("style",`color: ${T.get("stroke")??x};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),B.attr("transform",`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),Vt(t,O),t.intersect=function(R){if(z.info("iconSquare intersect",t,R),!t.label)return Mt.rect(t,R);let N=t.x??0,P=t.y??0,E=t.height??0,D=[];return m?D=[{x:N-d.width/2,y:P-E/2},{x:N+d.width/2,y:P-E/2},{x:N+d.width/2,y:P-E/2+d.height+S},{x:N+y/2,y:P-E/2+d.height+S},{x:N+y/2,y:P+E/2},{x:N-y/2,y:P+E/2},{x:N-y/2,y:P-E/2+d.height+S},{x:N-d.width/2,y:P-E/2+d.height+S}]:D=[{x:N-y/2,y:P-E/2},{x:N+y/2,y:P-E/2},{x:N+y/2,y:P-E/2+g},{x:N+d.width/2,y:P-E/2+g},{x:N+d.width/2/2,y:P+E/2},{x:N-d.width/2,y:P+E/2},{x:N-d.width/2,y:P-E/2+g},{x:N-y/2,y:P-E/2+g}],Mt.polygon(t,D,R)},h}var AX=b(()=>{"use strict";xe();Jt();Zh();be();Md();me();de();s(vX,"iconSquare")});async function RX(e,t,{config:{flowchart:r}}){let i=new Image;i.src=t?.img??"",await i.decode();let n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;let{labelStyles:o}=Pt(t);t.labelStyle=o;let l=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let u=Math.max(t.label?l??0:0,t?.assetWidth??n),h=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:u,d=t.constraint==="on"?h/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(h,l??0);let{shapeSvg:f,bbox:p,label:m}=await Qt(e,t,"image-shape default"),g=t.pos==="t",y=-h/2,x=-d/2,k=t.label?8:0,T=$t.svg(f),C=zt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let _=T.rectangle(y,x,h,d,C),S=Math.max(h,p.width),w=d+p.height+k,A=T.rectangle(-S/2,-w/2,S,w,{...C,fill:"none",stroke:"none"}),v=f.insert(()=>_,":first-child"),M=f.insert(()=>A);if(t.img){let $=f.append("image");$.attr("href",t.img),$.attr("width",h),$.attr("height",d),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-h/2},${g?w/2-d:-w/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-d/2-p.height/2-k/2:d/2-p.height/2+k/2})`),v.attr("transform",`translate(0,${g?p.height/2+k/2:-p.height/2-k/2})`),Vt(t,M),t.intersect=function($){if(z.info("iconSquare intersect",t,$),!t.label)return Mt.rect(t,$);let I=t.x??0,F=t.y??0,B=t.height??0,O=[];return g?O=[{x:I-p.width/2,y:F-B/2},{x:I+p.width/2,y:F-B/2},{x:I+p.width/2,y:F-B/2+p.height+k},{x:I+h/2,y:F-B/2+p.height+k},{x:I+h/2,y:F+B/2},{x:I-h/2,y:F+B/2},{x:I-h/2,y:F-B/2+p.height+k},{x:I-p.width/2,y:F-B/2+p.height+k}]:O=[{x:I-h/2,y:F-B/2},{x:I+h/2,y:F-B/2},{x:I+h/2,y:F-B/2+d},{x:I+p.width/2,y:F-B/2+d},{x:I+p.width/2/2,y:F+B/2},{x:I-p.width/2,y:F+B/2},{x:I-p.width/2,y:F-B/2+d},{x:I-h/2,y:F-B/2+d}],Mt.polygon(t,O,$)},f}var LX=b(()=>{"use strict";xe();Jt();be();me();de();s(RX,"imageSquare")});async function DX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,o=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=Math.max(u.width+(o??0)*2,t?.width??0),d=Math.max(u.height+(a??0)*2,t?.height??0),f=[{x:0,y:0},{x:h,y:0},{x:h+3*d/6,y:-d},{x:-3*d/6,y:-d}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=$t.svg(l),y=zt(t,{}),x=_e(f),k=g.path(x,y);p=l.insert(()=>k,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),m&&p.attr("style",m)}else p=ts(l,h,d,f);return i&&p.attr("style",i),t.width=h,t.height=d,Vt(t,p),t.intersect=function(g){return Mt.polygon(t,f,g)},l}var IX=b(()=>{"use strict";de();be();me();xe();vc();s(DX,"inv_trapezoid")});async function Ac(e,t,r){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{shapeSvg:a,bbox:o}=await Qt(e,t,Kt(t)),l=Math.max(o.width+r.labelPaddingX*2,t?.width||0),u=Math.max(o.height+r.labelPaddingY*2,t?.height||0),h=-l/2,d=-u/2,f,{rx:p,ry:m}=t,{cssStyles:g}=t;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),t.look==="handDrawn"){let y=$t.svg(a),x=zt(t,{}),k=p||m?y.path(Hs(h,d,l,u,p||0),x):y.rectangle(h,d,l,u,x);f=a.insert(()=>k,":first-child"),f.attr("class","basic label-container").attr("style",Pr(g))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",n).attr("rx",Pr(p)).attr("ry",Pr(m)).attr("x",h).attr("y",d).attr("width",l).attr("height",u);return Vt(t,f),t.calcIntersect=function(y,x){return Mt.rect(y,x)},t.intersect=function(y){return Mt.rect(t,y)},a}var ym=b(()=>{"use strict";de();be();Md();me();xe();Re();s(Ac,"drawRect")});async function NX(e,t){let{shapeSvg:r,bbox:i,label:n}=await Qt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Vt(t,a),t.intersect=function(u){return Mt.rect(t,u)},r}var OX=b(()=>{"use strict";ym();de();be();s(NX,"labelRect")});async function MX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,o=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.height??u.height)+a,d=(t?.width??u.width)+o,f=[{x:0,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:-(3*h)/6,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=$t.svg(l),y=zt(t,{}),x=_e(f),k=g.path(x,y);p=l.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=ts(l,d,h,f);return i&&p.attr("style",i),t.width=d,t.height=h,Vt(t,p),t.intersect=function(g){return Mt.polygon(t,f,g)},l}var BX=b(()=>{"use strict";de();be();me();xe();vc();s(MX,"lean_left")});async function PX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,o=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.height??u.height)+a,d=(t?.width??u.width)+o,f=[{x:-3*h/6,y:0},{x:d,y:0},{x:d+3*h/6,y:-h},{x:0,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=$t.svg(l),y=zt(t,{}),x=_e(f),k=g.path(x,y);p=l.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=ts(l,d,h,f);return i&&p.attr("style",i),t.width=d,t.height=h,Vt(t,p),t.intersect=function(g){return Mt.polygon(t,f,g)},l}var $X=b(()=>{"use strict";de();be();me();xe();vc();s(PX,"lean_right")});function FX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",Kt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),l=Math.max(35,t?.height??0),u=7,h=[{x:o,y:0},{x:0,y:l+u/2},{x:o-2*u,y:l+u/2},{x:0,y:2*l},{x:o,y:l-u/2},{x:2*u,y:l-u/2}],d=$t.svg(n),f=zt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let p=_e(h),m=d.path(p,f),g=n.insert(()=>m,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-l})`),Vt(t,g),t.intersect=function(y){return z.info("lightningBolt intersect",t,y),Mt.polygon(t,h,y)},n}var VX=b(()=>{"use strict";Jt();de();me();xe();be();de();s(FX,"lightningBolt")});async function WX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?24:n;if(t.width||t.height){let k=t.width??0;t.width=(t.width??0)-a,t.widthw,":first-child").attr("class","line"),y=l.insert(()=>S,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{let k=H4t(0,0,d,m,f,p,g);y=l.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",Pr(x)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-d/2}, ${-(m/2+p)})`),Vt(t,y),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+p-(u.y-(u.top??0))})`),t.intersect=function(k){let T=Mt.rect(t,k),C=T.x-(t.x??0);if(f!=0&&(Math.abs(C)<(t.width??0)/2||Math.abs(C)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-p)){let _=p*p*(1-C*C/(f*f));_>0&&(_=Math.sqrt(_)),_=p-_,k.y-(t.y??0)>0&&(_=-_),T.y+=_}return T},l}var H4t,Y4t,X4t,zX,GX,qX=b(()=>{"use strict";de();be();me();xe();Re();H4t=s((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Y4t=s((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),X4t=s((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),zX=10,GX=10;s(WX,"linedCylinder")});async function jX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n;if(t.width||t.height){let _=t.width;t.width=(_??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10)}let{shapeSvg:l,bbox:u,label:h}=await Qt(e,t,Kt(t)),d=(t?.width?t?.width:u.width)+(a??0)*2,f=(t?.height?t?.height:u.height)+(o??0)*2,p=t.look==="neo"?f/4:f/8,m=f+p,{cssStyles:g}=t,y=$t.svg(l),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=[{x:-d/2-d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:m/2},...Ka(-d/2-d/2*.1,m/2,d/2+d/2*.1,m/2,p,.8),{x:d/2+d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:-m/2},{x:-d/2,y:-m/2},{x:-d/2,y:m/2*1.1},{x:-d/2,y:-m/2}],T=y.polygon(k.map(_=>[_.x,_.y]),x),C=l.insert(()=>T,":first-child");return C.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)+d/2*.1/2-(u.x-(u.left??0))},${-f/2+(t.padding??0)-p/2-(u.y-(u.top??0))})`),Vt(t,C),t.intersect=function(_){return Mt.polygon(t,k,_)},l}var UX=b(()=>{"use strict";de();be();xe();me();s(jX,"linedWaveEdgedRect")});async function HX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*l,10),t.height=Math.max((t?.height??0)-o*2-2*l,10));let{shapeSvg:u,bbox:h,label:d}=await Qt(e,t,Kt(t)),f=(t?.width?t?.width:h.width)+a*2+2*l,p=(t?.height?t?.height:h.height)+o*2+2*l,m=f-2*l,g=p-2*l,y=-m/2,x=-g/2,{cssStyles:k}=t,T=$t.svg(u),C=zt(t,{}),_=[{x:y-l,y:x+l},{x:y-l,y:x+g+l},{x:y+m-l,y:x+g+l},{x:y+m-l,y:x+g},{x:y+m,y:x+g},{x:y+m,y:x+g-l},{x:y+m+l,y:x+g-l},{x:y+m+l,y:x-l},{x:y+l,y:x-l},{x:y+l,y:x},{x:y,y:x},{x:y,y:x+l}],S=[{x:y,y:x+l},{x:y+m-l,y:x+l},{x:y+m-l,y:x+g},{x:y+m,y:x+g},{x:y+m,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let w=_e(_),A=T.path(w,C),v=_e(S),M=T.path(v,C);t.look!=="handDrawn"&&(A=qL(A),M=qL(M));let $=u.insert("g",":first-child");return $.insert(()=>A),$.insert(()=>M),$.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),d.attr("transform",`translate(${-(h.width/2)-l-(h.x-(h.left??0))}, ${-(h.height/2)+l-(h.y-(h.top??0))})`),Vt(t,$),t.intersect=function(I){return Mt.polygon(t,_,I)},u}var YX=b(()=>{"use strict";de();me();xe();be();s(HX,"multiRect")});async function XX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:o}=await Qt(e,t,Kt(t)),l=t.padding??0,u=t.look==="neo"?16:l,h=t.look==="neo"?12:l,d=!0;(t.width||t.height)&&(d=!1,t.width=(t?.width??0)-u*2,t.height=(t?.height??0)-h*3);let f=Math.max(a.width,t?.width??0)+u*2,p=Math.max(a.height,t?.height??0)+h*3,m=t.look==="neo"?p/4:p/8,g=p+(d?m/2:-m/2),y=-f/2,x=-g/2,k=10,{cssStyles:T}=t,C=Ka(y-k,x+g+k,y+f-k,x+g+k,m,.8),_=C?.[C.length-1],S=[{x:y-k,y:x+k},{x:y-k,y:x+g+k},...C,{x:y+f-k,y:_.y-k},{x:y+f,y:_.y-k},{x:y+f,y:_.y-2*k},{x:y+f+k,y:_.y-2*k},{x:y+f+k,y:x-k},{x:y+k,y:x-k},{x:y+k,y:x},{x:y,y:x},{x:y,y:x+k}],w=[{x:y,y:x+k},{x:y+f-k,y:x+k},{x:y+f-k,y:_.y-k},{x:y+f,y:_.y-k},{x:y+f,y:x},{x:y,y:x}],A=$t.svg(n),v=zt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let M=_e(S),$=A.path(M,v),I=_e(w),F=A.path(I,v),B=n.insert(()=>$,":first-child");return B.insert(()=>F),B.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",T),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-m/2})`),o.attr("transform",`translate(${-(a.width/2)-k-(a.x-(a.left??0))}, ${-(a.height/2)+k-m/2-(a.y-(a.top??0))})`),Vt(t,B),t.intersect=function(O){return Mt.polygon(t,S,O)},n}var KX=b(()=>{"use strict";de();be();xe();me();s(XX,"multiWaveEdgedRectangle")});async function QX(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i,t.useHtmlLabels||Ke(le())||(t.centerLabel=!0);let{shapeSvg:o,bbox:l,label:u}=await Qt(e,t,Kt(t)),h=Math.max(l.width+(t.padding??0)*2,t?.width??0),d=Math.max(l.height+(t.padding??0)*2,t?.height??0),f=-h/2,p=-d/2,{cssStyles:m}=t,g=$t.svg(o),y=zt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=g.rectangle(f,p,h,d,y),k=o.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,k),t.intersect=function(T){return Mt.rect(t,T)},o}var ZX=b(()=>{"use strict";xe();be();me();de();Qe();Qe();s(QX,"note")});async function JX(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await Qt(e,t,Kt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),u=o+l,h=.5,d=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=$t.svg(n),g=zt(t,{}),y=K4t(0,0,u),x=m.path(y,g);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&f.attr("style",p)}else f=ts(n,u,u,d),f.attr("transform",`translate(${-u/2+h}, ${u/2})`);return i&&f.attr("style",i),Vt(t,f),t.calcIntersect=function(m,g){let y=m.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],k=Mt.polygon(m,x,g);return{x:k.x-.5,y:k.y-.5}},t.intersect=function(m){return this.calcIntersect(t,m)},n}var K4t,tK=b(()=>{"use strict";de();be();me();xe();vc();K4t=s((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");s(JX,"question")});async function eK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?21:n??0,o=t.look==="neo"?12:n??0,{shapeSvg:l,bbox:u,label:h}=await Qt(e,t,Kt(t)),d=(t?.width??u.width)+(t.look==="neo"?a*2:a),f=(t?.height??u.height)+(t.look==="neo"?o*2:o),p=-d/2,m=-f/2,g=m/2,y=[{x:p+g,y:m},{x:p,y:0},{x:p+g,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:x}=t,k=$t.svg(l),T=zt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=_e(y),_=k.path(C,T),S=l.insert(()=>_,":first-child");return S.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-g/2},0)`),h.attr("transform",`translate(${-g/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),Vt(t,S),t.intersect=function(w){return Mt.polygon(t,y,w)},l}var rK=b(()=>{"use strict";de();be();me();xe();s(eK,"rect_left_inv_arrow")});var Q4t,Fo,lC=b(()=>{"use strict";Qe();ye();Xa();Q4t=s(async(e,t,r,i=!1,n=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let o=Q(),l=Ke(o);return await zi(e,a,{style:r,isTitle:i,useHtmlLabels:l,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Fo=Q4t});async function iK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";let a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",i),u=t.description,h=t.label,d=await Fo(l,h,t.labelStyle,!0,!0),f={width:0,height:0};if(Ke(Q())){let v=d.children[0],M=vt(d);f=v.getBoundingClientRect(),M.attr("width",f.width),M.attr("height",f.height)}z.info("Text 2",u);let p=u||[],m=d.getBBox(),g=await Fo(l,Array.isArray(p)?p.join("
    "):p,t.labelStyle,!0,!0),y=g.children[0],x=vt(g);f=y.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height);let k=(t.padding||0)/2;vt(g).attr("transform","translate( "+(f.width>m.width?0:(m.width-f.width)/2)+", "+(m.height+k+5)+")"),vt(d).attr("transform","translate( "+(f.width(z.debug("Rough node insert CXC",$),I),":first-child"),w=a.insert(()=>(z.debug("Rough node insert CXC",$),$),":first-child")}else w=o.insert("rect",":first-child"),A=o.insert("line"),w.attr("class","outer title-state").attr("style",i).attr("x",-f.width/2-k).attr("y",-f.height/2-k).attr("width",f.width+(t.padding||0)).attr("height",f.height+(t.padding||0)),A.attr("class","divider").attr("x1",-f.width/2-k).attr("x2",f.width/2+k).attr("y1",-f.height/2-k+m.height+k).attr("y2",-f.height/2-k+m.height+k);return Vt(t,w),t.intersect=function(v){return Mt.rect(t,v)},a}var nK=b(()=>{"use strict";lr();de();lC();be();me();xe();ye();Md();Jt();Qe();s(iK,"rectWithTitle")});async function sK(e,t,{config:{themeVariables:r}}){let i=r?.radius??5,n={rx:i,ry:i,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Ac(e,t,n)}var aK=b(()=>{"use strict";ym();s(sK,"roundedRect")});async function oK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:l,label:u}=await Qt(e,t,Kt(t)),h=(t?.width??l.width)+n*2+(t.look==="neo"?Bd:Bd*2),d=(t?.height??l.height)+a*2,f=h-Bd,p=d,m=Bd-h/2,g=-d/2,{cssStyles:y}=t,x=$t.svg(o),k=zt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let T=[{x:m,y:g},{x:m+f,y:g},{x:m+f,y:g+p},{x:m-Bd,y:g+p},{x:m-Bd,y:g},{x:m,y:g},{x:m,y:g+p}],C=x.polygon(T.map(S=>[S.x,S.y]),k),_=o.insert(()=>C,":first-child");return _.attr("class","basic label-container outer-path").attr("style",Pr(y)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),u.attr("transform",`translate(${Bd/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,_),t.intersect=function(S){return Mt.rect(t,S)},o}var Bd,lK=b(()=>{"use strict";de();be();me();xe();Re();Bd=8;s(oK,"shadedProcess")});async function cK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:l,bbox:u,label:h}=await Qt(e,t,Kt(t)),d=(t?.width?t?.width:u.width)+a*2,f=((t?.height?t?.height:u.height)+o*2)*1.5,p=d,m=f/1.5,g=-p/2,y=-m/2,{cssStyles:x}=t,k=$t.svg(l),T=zt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=[{x:g,y},{x:g,y:y+m},{x:g+p,y:y+m},{x:g+p,y:y-m/2}],_=_e(C),S=k.path(_,T),w=l.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(0, ${m/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(u.x-(u.left??0))}, ${-m/4+(t.padding??0)-(u.y-(u.top??0))})`),Vt(t,w),t.intersect=function(A){return Mt.polygon(t,C,A)},l}var uK=b(()=>{"use strict";de();be();me();xe();s(cK,"slopedRect")});async function hK(e,t){let r=t.padding??0,i=t.look==="neo"?16:r*2,n=t.look==="neo"?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??i,labelPaddingY:n};return Ac(e,t,a)}var dK=b(()=>{"use strict";ym();s(hK,"squareRect")});async function fK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?20:n,o=t.look==="neo"?12:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=u.height+(t.look==="neo"?o*2:o),d=u.width+h/4+(t.look==="neo"?a*2:a),f=h/2,{cssStyles:p}=t,m=$t.svg(l),g=zt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:-d/2+f,y:-h/2},{x:d/2-f,y:-h/2},...Nd(-d/2+f,0,f,50,90,270),{x:d/2-f,y:h/2},...Nd(d/2-f,0,f,50,270,450)],x=_e(y),k=m.path(x,g),T=l.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Vt(t,T),t.intersect=function(C){return Mt.polygon(t,y,C)},l}var pK=b(()=>{"use strict";de();be();me();xe();s(fK,"stadium")});async function mK(e,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return Ac(e,t,r)}var gK=b(()=>{"use strict";ym();s(mK,"state")});function yK(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{cssStyles:a}=t,{lineColor:o,stateBorder:l,nodeBorder:u,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let d=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),f=$t.svg(d),p=zt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=f.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),g=l??u,y=(t.width??0)*5/14,x=f.circle(0,0,y,{...p,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),k=d.insert(()=>m,":first-child");if(k.insert(()=>x),t.look!=="handDrawn"&&k.attr("class","outer-path"),a&&k.selectAll("path").attr("style",a),n&&k.selectAll("path").attr("style",n),t.width<25&&h&&t.look!=="handDrawn"){let T=e.node()?.ownerSVGElement?.id??"",C=T?`${T}-drop-shadow-small`:"drop-shadow-small";k.attr("style",`filter:url(#${C})`)}return Vt(t,k),t.intersect=function(T){return Mt.circle(t,(t.width??0)/2,T)},d}var xK=b(()=>{"use strict";xe();be();me();de();s(yK,"stateEnd")});function bK(e,t,{config:{themeVariables:r}}){let{lineColor:i,nodeShadow:n}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),o;if(t.look==="handDrawn"){let u=$t.svg(a).circle(0,0,t.width,bY(i));o=a.insert(()=>u),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&n&&t.look!=="handDrawn"){let l=e.node()?.ownerSVGElement?.id??"",u=l?`${l}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${u})`)}return Vt(t,o),t.intersect=function(l){return Mt.circle(t,(t.width??7)/2,l)},a}var kK=b(()=>{"use strict";xe();be();me();de();s(bK,"stateStart")});async function TK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t?.padding??8,a=t.look==="neo"?28:n,o=t.look==="neo"?12:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.width??u.width)+2*xm+a,d=(t?.height??u.height)+o,f=h-2*xm,p=d,m=-h/2,g=-d/2,y=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){let x=$t.svg(l),k=zt(t,{}),T=x.rectangle(m,g,f+16,p,k),C=x.line(m+xm,g,m+xm,g+p,k),_=x.line(m+xm+f,g,m+xm+f,g+p,k);l.insert(()=>C,":first-child"),l.insert(()=>_,":first-child");let S=l.insert(()=>T,":first-child"),{cssStyles:w}=t;S.attr("class","basic label-container").attr("style",Pr(w)),Vt(t,S)}else{let x=ts(l,f,p,y);i&&x.attr("style",i),Vt(t,x)}return t.intersect=function(x){return Mt.polygon(t,y,x)},l}var xm,CK=b(()=>{"use strict";de();be();me();xe();vc();Re();xm=8;s(TK,"subroutine")});async function SK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-hD*(t.height+o*2),10));let{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.height?t?.height:u.height)+o*2,d=hD*h,f=hD*h,m=(t?.width?t?.width:u.width)+a*2+d-d,g=h,y=-m/2,x=-g/2,{cssStyles:k}=t,T=$t.svg(l),C=zt(t,{}),_=[{x:y-d/2,y:x},{x:y+m+d/2,y:x},{x:y+m+d/2,y:x+g},{x:y-d/2,y:x+g}],S=[{x:y+m-d/2,y:x+g},{x:y+m+d/2,y:x+g},{x:y+m+d/2,y:x+g-f}];t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let w=_e(_),A=T.path(w,C),v=_e(S),M=T.path(v,{...C,fillStyle:"solid"}),$=l.insert(()=>M,":first-child");return $.insert(()=>A,":first-child"),$.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),Vt(t,$),t.intersect=function(I){return Mt.polygon(t,_,I)},l}var hD,wK=b(()=>{"use strict";de();me();xe();be();hD=.2;s(SK,"taggedRect")});async function _K(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:o}=await Qt(e,t,Kt(t)),l=Math.max(a.width+(t.padding??0)*2,t?.width??0),u=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=u/8,d=.2*l,f=.2*u,p=u+h,{cssStyles:m}=t,g=$t.svg(n),y=zt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{x:-l/2-l/2*.1,y:p/2},...Ka(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],k=-l/2+l/2*.1,T=-p/2-f*.4,C=[{x:k+l-d,y:(T+u)*1.3},{x:k+l,y:T+u-f},{x:k+l,y:(T+u)*.9},...Ka(k+l,(T+u)*1.25,k+l-d,(T+u)*1.3,-u*.02,.5)],_=_e(x),S=g.path(_,y),w=_e(C),A=g.path(w,{...y,fillStyle:"solid"}),v=n.insert(()=>A,":first-child");return v.insert(()=>S,":first-child"),v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-l/2+(t.padding??0)-(a.x-(a.left??0))},${-u/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),Vt(t,v),t.intersect=function(M){return Mt.polygon(t,x,M)},n}var EK=b(()=>{"use strict";de();be();xe();me();s(_K,"taggedWaveEdgedRectangle")});async function vK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await Qt(e,t,Kt(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),l=Math.max(a.height+(t.padding??0),t?.height||0),u=-o/2,h=-l/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",o).attr("height",l),Vt(t,d),t.intersect=function(f){return Mt.rect(t,f)},n}var AK=b(()=>{"use strict";de();be();me();s(vK,"text")});async function DK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?12:n/2;if(t.width||t.height){let y=t.height??0;t.height=(t.height??0)-a,t.heightC,":first-child"),g=o.insert(()=>T,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{let y=Z4t(0,0,p,h,f,d);g=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",Pr(m)).attr("style",i),g.attr("class","basic label-container outer-path"),m&&g.selectAll("path").attr("style",m),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",f),g.attr("transform",`translate(${-p/2}, ${h/2} )`),u.attr("transform",`translate(${-(l.width/2)-f-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,g),t.intersect=function(y){let x=Mt.rect(t,y),k=x.y-(t.y??0);if(d!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-f)){let T=f*f*(1-k*k/(d*d));T!=0&&(T=Math.sqrt(Math.abs(T))),T=f-T,y.x-(t.x??0)>0&&(T=-T),x.x+=T}return x},o}var Z4t,J4t,t5t,RK,LK,IK=b(()=>{"use strict";de();me();xe();be();Re();Z4t=s((e,t,r,i,n,a)=>`M${e},${t} + a${n},${a} 0,0,1 0,${-i} + l${r},0 + a${n},${a} 0,0,1 0,${i} + M${r},${-i} + a${n},${a} 0,0,0 0,${i} + l${-r},0`,"createCylinderPathD"),J4t=s((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),t5t=s((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),RK=5,LK=10;s(DK,"tiltedCylinder")});async function NK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=(t.look==="neo",n),o=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.height??u.height)+a,d=(t?.width??u.width)+o,f=[{x:-3*h/6,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:0,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=$t.svg(l),y=zt(t,{}),x=_e(f),k=g.path(x,y);p=l.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=ts(l,d,h,f);return i&&p.attr("style",i),t.width=d,t.height=h,Vt(t,p),t.intersect=function(g){return Mt.polygon(t,f,g)},l}var OK=b(()=>{"use strict";de();be();me();xe();vc();s(NK,"trapezoid")});async function MK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=15,u=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.heightT,":first-child");return C.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),Vt(t,C),t.intersect=function(_){return Mt.polygon(t,x,_)},h}var BK=b(()=>{"use strict";de();be();me();xe();s(MK,"trapezoidalPentagon")});async function FK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<$K&&(t.width=$K),t.height=t?.height??0,t.heightT,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),t.width=d,t.height=f,Vt(t,C),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${f/2-(l.height+(t.padding??0)/(h?2:1)-(l.y-(l.top??0)))})`),t.intersect=function(_){return z.info("Triangle intersect",t,m,_),Mt.polygon(t,m,_)},o}var PK,$K,VK=b(()=>{"use strict";Jt();de();be();me();xe();de();fr();ye();PK=10,$K=10;s(FK,"triangle")});async function zK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?12:n,l=!0;(t.width||t.height)&&(l=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:u,bbox:h,label:d}=await Qt(e,t,Kt(t)),f=(t?.width?t?.width:h.width)+(a??0)*2,p=(t?.height?t?.height:h.height)+(o??0)*2,m=t.look==="neo"?p/4:p/8,g=p+(l?m:-m),{cssStyles:y}=t,k=14-f,T=k>0?k/2:0,C=$t.svg(u),_=zt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let S=[{x:-f/2-T,y:g/2},...Ka(-f/2-T,g/2,f/2+T,g/2,m,.8),{x:f/2+T,y:-g/2},{x:-f/2-T,y:-g/2}],w=_e(S),A=C.path(w,_),v=u.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-m/2})`),d.attr("transform",`translate(${-f/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-m-(h.y-(h.top??0))})`),Vt(t,v),t.intersect=function(M){return Mt.polygon(t,S,M)},u}var GK=b(()=>{"use strict";de();be();xe();me();s(zK,"waveEdgedRectangle")});async function WK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,o=t.look==="neo"?20:n;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-_*(20/9)),t.width=t.width-a*2}let{shapeSvg:l,bbox:u}=await Qt(e,t,Kt(t)),h=(t?.width?t?.width:u.width)+a*2,d=(t?.height?t?.height:u.height)+o,f=d/8,p=d+f*2,{cssStyles:m}=t,g=$t.svg(l),y=zt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{x:-h/2,y:p/2},...Ka(-h/2,p/2,h/2,p/2,f,1),{x:h/2,y:-p/2},...Ka(h/2,-p/2,-h/2,-p/2,f,-1)],k=_e(x),T=g.path(k,y),C=l.insert(()=>T,":first-child");return C.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),Vt(t,C),t.intersect=function(_){return Mt.polygon(t,x,_)},l}var qK=b(()=>{"use strict";de();be();me();xe();s(WK,"waveRectangle")});async function jK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-n*2-Gi,10),t.height=Math.max((t?.height??0)-a*2-Gi,10));let{shapeSvg:o,bbox:l,label:u}=await Qt(e,t,Kt(t)),h=(t?.width?t?.width:l.width)+n*2+Gi,d=(t?.height?t?.height:l.height)+a*2+Gi,f=h-Gi,p=d-Gi,m=-f/2,g=-p/2,{cssStyles:y}=t,x=$t.svg(o),k=zt(t,{}),T=[{x:m-Gi,y:g-Gi},{x:m-Gi,y:g+p},{x:m+f,y:g+p},{x:m+f,y:g-Gi}],C=`M${m-Gi},${g-Gi} L${m+f},${g-Gi} L${m+f},${g+p} L${m-Gi},${g+p} L${m-Gi},${g-Gi} + M${m-Gi},${g} L${m+f},${g} + M${m},${g-Gi} L${m},${g+p}`;t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=x.path(C,k),S=o.insert(()=>_,":first-child");return S.attr("transform",`translate(${Gi/2}, ${Gi/2})`),S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),u.attr("transform",`translate(${-(l.width/2)+Gi/2-(l.x-(l.left??0))}, ${-(l.height/2)+Gi/2-(l.y-(l.top??0))})`),Vt(t,S),t.intersect=function(w){return Mt.polygon(t,T,w)},o}var Gi,UK=b(()=>{"use strict";de();me();xe();be();Gi=10;s(jK,"windowPane")});async function dD(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:i,themeVariables:n}=le(),{rowEven:a,rowOdd:o,nodeBorder:l,borderColorArray:u}=n;if(t.look==="handDrawn"){let{themeVariables:st}=le(),{background:X}=st,ut={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${X}`]};await dD(e,ut)}let h=le();t.useHtmlLabels=h.htmlLabels;let d=h.er?.diagramPadding??10,f=h.er?.entityPadding??6,{cssStyles:p}=t,{labelStyles:m,nodeStyles:g}=Pt(t);if(r.attributes.length===0&&t.label){let st={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5,classes:""};vn(t.label,h)+st.labelPaddingX*20){let st=k.width+d*2-(S+w+A+v);S+=st/I,w+=st/I,A>0&&(A+=st/I),v>0&&(v+=st/I)}let B=S+w+A+v,O=$t.svg(x),R=zt(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let N=0;_.length>0&&(N=_.reduce((st,X)=>st+(X?.rowHeight??0),0));let P=Math.max(F.width+d*2,t?.width||0,B),E=Math.max((N??0)+k.height,t?.height||0),D=-P/2,V=-E/2;if(x.selectAll("g:not(:first-child)").each((st,X,ut)=>{let ot=vt(ut[X]),mt=ot.attr("transform"),ht=0,it=0;if(mt){let St=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(mt);St&&(ht=parseFloat(St[1]),it=parseFloat(St[2]),ot.attr("class").includes("attribute-name")?ht+=S:ot.attr("class").includes("attribute-keys")?ht+=S+w:ot.attr("class").includes("attribute-comment")&&(ht+=S+w+A))}ot.attr("transform",`translate(${D+d/2+ht}, ${it+V+k.height+f/2})`)}),x.select(".name").attr("transform","translate("+-k.width/2+", "+(V+f/2)+")"),i!=null&&HK.has(i)){let st=r.colorIndex??0;x.attr("data-color-id",`color-${st%u.length}`)}let L=O.rectangle(D,V,P,E,R),q=x.insert(()=>L,":first-child").attr("class","outer-path").attr("style",p.join(""));C.push(0);for(let[st,X]of _.entries()){let ot=(st+1)%2===0&&X.yOffset!==0,mt=O.rectangle(D,k.height+V+X?.yOffset,P,X?.rowHeight,{...R,fill:ot?a:o,stroke:l});x.insert(()=>mt,"g.label").attr("style",p.join("")).attr("class",`row-rect-${ot?"even":"odd"}`)}let H=1e-4,K=M0(D,k.height+V,P+D,k.height+V,H),U=O.polygon(K.map(st=>[st.x,st.y]),R);if(x.insert(()=>U).attr("class","divider"),K=M0(S+D,k.height+V,S+D,E+V,H),U=O.polygon(K.map(st=>[st.x,st.y]),R),x.insert(()=>U).attr("class","divider"),M){let st=S+w+D;K=M0(st,k.height+V,st,E+V,H),U=O.polygon(K.map(X=>[X.x,X.y]),R),x.insert(()=>U).attr("class","divider")}if($){let st=S+w+A+D;K=M0(st,k.height+V,st,E+V,H),U=O.polygon(K.map(X=>[X.x,X.y]),R),x.insert(()=>U).attr("class","divider")}for(let st of C){let X=k.height+V+st;K=M0(D,X,P+D,X,H),U=O.polygon(K.map(ut=>[ut.x,ut.y]),R),x.insert(()=>U).attr("class","divider")}if(Vt(t,q),g&&t.look!=="handDrawn")if(i!=null&&e5t.has(i))x.selectAll("path").attr("style",g);else{let X=g.split(";")?.filter(ut=>ut.includes("stroke"))?.map(ut=>`${ut}`).join("; ");x.selectAll("path").attr("style",X??""),x.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(st){return Mt.rect(t,st)},x}async function O0(e,t,r,i=0,n=0,a=[],o=""){let l=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==ol(t)&&(t=ol(t),t=t.replaceAll("<","<").replaceAll(">",">"));let u=l.node().appendChild(await zi(l,t,{width:vn(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let d=u.children[0];for(d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">")}let h=u.getBBox();if(Kn(r.htmlLabels)){let d=u.children[0];d.style.textAlign="start";let f=vt(u);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}return h}function M0(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}var HK,e5t,YK=b(()=>{"use strict";de();be();me();xe();ym();Qe();Xa();fr();lr();Re();HK=new Set(["redux-color","redux-dark-color"]),e5t=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);s(dD,"erBox");s(O0,"addText");s(M0,"lineToPolygon")});async function XK(e,t,r,i,n=r.class.padding??12){let a=i?0:3,o=e.insert("g").attr("class",Kt(t)).attr("id",t.domId||t.id),l=null,u=null,h=null,d=null,f=0,p=0,m=0;if(l=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let T=t.annotations[0];await cC(l,{text:`\xAB${T}\xBB`},0),f=l.node().getBBox().height}u=o.insert("g").attr("class","label-group text"),await cC(u,t,0,["font-weight: bolder"]);let g=u.node().getBBox();p=g.height,h=o.insert("g").attr("class","members-group text");let y=0;for(let T of t.members){let C=await cC(h,T,y,[T.parseClassifier()]);y+=C+a}m=h.node().getBBox().height,m<=0&&(m=n/2),d=o.insert("g").attr("class","methods-group text");let x=0;for(let T of t.methods){let C=await cC(d,T,x,[T.parseClassifier()]);x+=C+a}let k=o.node().getBBox();if(l!==null){let T=l.node().getBBox();l.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-g.width/2}, ${f})`),k=o.node().getBBox(),h.attr("transform",`translate(0, ${f+p+n*2})`),k=o.node().getBBox(),d.attr("transform",`translate(0, ${f+p+(m?m+n*4:n*2)})`),k=o.node().getBBox(),{shapeSvg:o,bbox:k}}async function cC(e,t,r,i=[]){let n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=le(),o="useHtmlLabels"in t?t.useHtmlLabels:Kn(a.htmlLabels)??!0,l="";"text"in t?l=t.text:l=t.label,!o&&l.startsWith("\\")&&(l=l.substring(1)),Ci(l)&&(o=!0);let u=await zi(n,a1(ks(l)),{width:vn(l,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a),h,d=1;if(o){let f=u.children[0],p=vt(u);d=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(d+=f.innerHTML.split("").length-1);let m=f.getElementsByTagName("img");if(m){let g=l.replace(/]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(x=>{function k(){if(y.style.display="flex",y.style.flexDirection="column",g){let T=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,_=parseInt(T,10)*5+"px";y.style.minWidth=_,y.style.maxWidth=_}else y.style.width="100%";x(y)}s(k,"setupImage"),setTimeout(()=>{y.complete&&k()}),y.addEventListener("error",k),y.addEventListener("load",k)})))}h=f.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&vt(u).selectAll("tspan").attr("font-weight",""),d=u.children.length;let f=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(f.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),h=u.getBBox()}return n.attr("transform","translate(0,"+(-h.height/(2*d)+r)+")"),h.height}var KK=b(()=>{"use strict";lr();Qe();de();Re();ye();Xa();fr();s(XK,"textHelper");s(cC,"addText")});async function QK(e,t){let r=Q(),{themeVariables:i}=r,{useGradient:n}=i,a=r.class.padding??12,o=a,l=t.useHtmlLabels??Kn(r.htmlLabels)??!0,u=t;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:h,bbox:d}=await XK(e,t,r,l,o),{labelStyles:f,nodeStyles:p}=Pt(t);t.labelStyle=f,t.cssStyles=u.styles||"";let m=u.styles?.join(";")||p||"";t.cssStyles||(t.cssStyles=m.replaceAll("!important","").split(";"));let g=u.members.length===0&&u.methods.length===0&&!r.class?.hideEmptyMembersBox,y=$t.svg(h),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=Math.max(t.width??0,d.width),T=Math.max(t.height??0,d.height),C=(t.height??0)>d.height;u.members.length===0&&u.methods.length===0?T+=o:u.members.length>0&&u.methods.length===0&&(T+=o*2);let _=-k/2,S=-T/2,w=g?a*2:u.members.length===0&&u.methods.length===0?-a:0;C&&(w=a*2);let A=y.rectangle(_-a,S-a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0),k+2*a,T+2*a+w,x),v=h.insert(()=>A,":first-child");v.attr("class","basic label-container outer-path");let M=v.node().getBBox(),$=h.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,I=h.select(".label-group").node().getBBox().height-(g?a/2:0)||0,F=h.select(".members-group").node().getBBox().height-(g?a/2:0)||0,B=($+I+S+a-(S-a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((O,R,N)=>{let P=vt(N[R]),E=P.attr("transform"),D=0;if(E){let H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);H&&(D=parseFloat(H[2]))}let V=D+S+a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0);if(P.attr("class").includes("methods-group")){let q=Math.max(F,o/2);C?V=Math.max(B,$+I+q+S+o*2+a)+o*2:V=$+I+q+S+o*4+a}u.members.length===0&&u.methods.length===0&&r.class?.hideEmptyMembersBox&&(u.annotations.length>0?V=D-o:V=D),l||(V-=4);let L=_;(P.attr("class").includes("label-group")||P.attr("class").includes("annotation-group"))&&(L=-P.node()?.getBBox().width/2||0,h.selectAll("text").each(function(q,H,K){window.getComputedStyle(K[H]).textAnchor==="middle"&&(L=0)})),P.attr("transform",`translate(${L}, ${V})`)}),u.members.length>0||u.methods.length>0||g){let O=$+I+S+a,R=y.line(M.x,O,M.x+M.width,O+.001,x);h.insert(()=>R).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",m)}if(g||u.members.length>0||u.methods.length>0){let O=$+I+F+S+o*2+a,R=y.line(M.x,C?Math.max(B,O):O,M.x+M.width,(C?Math.max(B,O):O)+.001,x);h.insert(()=>R).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",m)}if(u.look!=="handDrawn"&&h.selectAll("path").attr("style",m),v.select(":nth-child(2)").attr("style",m),h.selectAll(".divider").select("path").attr("style",m),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",m),!l){let O=RegExp(/color\s*:\s*([^;]*)/),R=O.exec(m);if(R){let N=R[0].replace("color","fill");h.selectAll("tspan").attr("style",N)}else if(f){let N=O.exec(f);if(N){let P=N[0].replace("color","fill");h.selectAll("tspan").attr("style",P)}}}return Vt(t,v),t.intersect=function(O){return Mt.rect(t,O)},h}var ZK=b(()=>{"use strict";de();ye();lr();xe();me();be();KK();fr();s(QK,"classBox")});async function JK(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t,a=t,o=20,l=20,u="verifyMethod"in t,h=Kt(t),{themeVariables:d}=Q(),{borderColorArray:f,requirementEdgeLabelBackground:p}=d,m=e.insert("g").attr("class",h).attr("id",t.domId??t.id),g;u?g=await Rc(m,`<<${n.type}>>`,0,t.labelStyle):g=await Rc(m,"<<Element>>",0,t.labelStyle);let y=g,x=await Rc(m,n.name,y,t.labelStyle+"; font-weight: bold;");if(y+=x+l,u){let M=await Rc(m,`${n.requirementId?`ID: ${n.requirementId}`:""}`,y,t.labelStyle);y+=M;let $=await Rc(m,`${n.text?`Text: ${n.text}`:""}`,y,t.labelStyle);y+=$;let I=await Rc(m,`${n.risk?`Risk: ${n.risk}`:""}`,y,t.labelStyle);y+=I,await Rc(m,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,y,t.labelStyle)}else{let M=await Rc(m,`${a.type?`Type: ${a.type}`:""}`,y,t.labelStyle);y+=M,await Rc(m,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,y,t.labelStyle)}let k=(m.node()?.getBBox().width??200)+o,T=(m.node()?.getBBox().height??200)+o,C=-k/2,_=-T/2,S=$t.svg(m),w=zt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let A=S.rectangle(C,_,k,T,w),v=m.insert(()=>A,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),f?.length){let M=t.colorIndex??0;m.attr("data-color-id",`color-${M%f.length}`)}if(m.selectAll(".label").each((M,$,I)=>{let F=vt(I[$]),B=F.attr("transform"),O=0,R=0;if(B){let D=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(B);D&&(O=parseFloat(D[1]),R=parseFloat(D[2]))}let N=R-T/2,P=C+o/2;($===0||$===1)&&(P=O),F.attr("transform",`translate(${P}, ${N+o})`)}),y>g+x+l){let M=_+g+x+l,$;if(t.look==="neo"){let B=[[C,M],[C+k,M],[C+k,M+.001],[C,M+.001]];$=S.polygon(B,w)}else $=S.line(C,M,C+k,M,w);m.insert(()=>$).attr("class","divider")}return Vt(t,v),t.intersect=function(M){return Mt.rect(t,M)},i&&t.look!=="handDrawn"&&(p||f?.length)&&m.selectAll("path").attr("style",i),m}async function Rc(e,t,r,i=""){if(t==="")return 0;let n=e.insert("g").attr("class","label").attr("style",i),a=Q(),o=a.htmlLabels??!0,l=await zi(n,a1(ks(t)),{width:vn(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a),u;if(o){let h=l.children[0],d=vt(l);u=h.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{let h=l.children[0];for(let d of h.children)i&&d.setAttribute("style",i);u=l.getBBox(),u.height+=6}return n.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}var tQ=b(()=>{"use strict";de();be();me();xe();Re();ye();Xa();lr();s(JK,"requirementBox");s(Rc,"addText")});async function eQ(e,t,{config:r}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i||"";let a=10,o=t.width;t.width=(t.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await Qt(e,t,Kt(t)),d=t.padding||10,f="",p;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let m={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await XT(p,"ticket"in t&&t.ticket||"",m):{label:g,bbox:y}=await XT(l,"ticket"in t&&t.ticket||"",m);let{label:x,bbox:k}=await XT(l,"assigned"in t&&t.assigned||"",m);t.width=o;let T=10,C=t?.width||0,_=Math.max(y.height,k.height)/2,S=Math.max(u.height+T*2,t?.height||0)+_,w=-C/2,A=-S/2;h.attr("transform","translate("+(d-C/2)+", "+(-_-u.height/2)+")"),g.attr("transform","translate("+(d-C/2)+", "+(-_+u.height/2)+")"),x.attr("transform","translate("+(d+C/2-k.width-2*a)+", "+(-_+u.height/2)+")");let v,{rx:M,ry:$}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){let F=$t.svg(l),B=zt(t,{}),O=M||$?F.path(Hs(w,A,C,S,M||0),B):F.rectangle(w,A,C,S,B);v=l.insert(()=>O,":first-child"),v.attr("class","basic label-container").attr("style",I||null)}else{v=l.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",n).attr("rx",M??5).attr("ry",$??5).attr("x",w).attr("y",A).attr("width",C).attr("height",S);let F="priority"in t&&t.priority;if(F){let B=l.append("line"),O=w+2,R=A+Math.floor((M??0)/2),N=A+S-Math.floor((M??0)/2);B.attr("x1",O).attr("y1",R).attr("x2",O).attr("y2",N).attr("stroke-width","4").attr("stroke",r5t(F))}}return Vt(t,v),t.height=S,t.intersect=function(F){return Mt.rect(t,F)},l}var r5t,rQ=b(()=>{"use strict";de();be();Md();me();xe();r5t=s(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");s(eQ,"kanbanItem")});async function iQ(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:o,label:l}=await Qt(e,t,Kt(t)),u=a.width+10*o,h=a.height+8*o,d=.15*u,{cssStyles:f}=t,p=a.width+20,m=a.height+20,g=Math.max(u,p),y=Math.max(h,m);l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x,k=`M0 0 + a${d},${d} 1 0,0 ${g*.25},${-1*y*.1} + a${d},${d} 1 0,0 ${g*.25},0 + a${d},${d} 1 0,0 ${g*.25},0 + a${d},${d} 1 0,0 ${g*.25},${y*.1} + + a${d},${d} 1 0,0 ${g*.15},${y*.33} + a${d*.8},${d*.8} 1 0,0 0,${y*.34} + a${d},${d} 1 0,0 ${-1*g*.15},${y*.33} + + a${d},${d} 1 0,0 ${-1*g*.25},${y*.15} + a${d},${d} 1 0,0 ${-1*g*.25},0 + a${d},${d} 1 0,0 ${-1*g*.25},0 + a${d},${d} 1 0,0 ${-1*g*.25},${-1*y*.15} + + a${d},${d} 1 0,0 ${-1*g*.1},${-1*y*.33} + a${d*.8},${d*.8} 1 0,0 0,${-1*y*.34} + a${d},${d} 1 0,0 ${g*.1},${-1*y*.33} + H0 V0 Z`;if(t.look==="handDrawn"){let T=$t.svg(n),C=zt(t,{}),_=T.path(k,C);x=n.insert(()=>_,":first-child"),x.attr("class","basic label-container").attr("style",Pr(f))}else x=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",k);return x.attr("transform",`translate(${-g/2}, ${-y/2})`),Vt(t,x),t.calcIntersect=function(T,C){return Mt.rect(T,C)},t.intersect=function(T){return z.info("Bang intersect",t,T),Mt.rect(t,T)},n}var nQ=b(()=>{"use strict";Jt();de();be();me();xe();Re();s(iQ,"bang")});async function sQ(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:o,label:l}=await Qt(e,t,Kt(t)),u=a.width+2*o,h=a.height+2*o,d=.15*u,f=.25*u,p=.35*u,m=.2*u,{cssStyles:g}=t,y,x=`M0 0 + a${d},${d} 0 0,1 ${u*.25},${-1*u*.1} + a${p},${p} 1 0,1 ${u*.4},${-1*u*.1} + a${f},${f} 1 0,1 ${u*.35},${u*.2} + + a${d},${d} 1 0,1 ${u*.15},${h*.35} + a${m},${m} 1 0,1 ${-1*u*.15},${h*.65} + + a${f},${d} 1 0,1 ${-1*u*.25},${u*.15} + a${p},${p} 1 0,1 ${-1*u*.5},0 + a${d},${d} 1 0,1 ${-1*u*.25},${-1*u*.15} + + a${d},${d} 1 0,1 ${-1*u*.1},${-1*h*.35} + a${m},${m} 1 0,1 ${u*.1},${-1*h*.65} + H0 V0 Z`;if(t.look==="handDrawn"){let k=$t.svg(n),T=zt(t,{}),C=k.path(x,T);y=n.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",Pr(g))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),Vt(t,y),t.calcIntersect=function(k,T){return Mt.rect(k,T)},t.intersect=function(k){return z.info("Cloud intersect",t,k),Mt.rect(t,k)},n}var aQ=b(()=>{"use strict";xe();Jt();Re();be();me();de();s(sQ,"cloud")});async function oQ(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:o,label:l}=await Qt(e,t,Kt(t)),u=a.width+8*o,h=a.height+2*o,d=5,f=t.look==="neo"?` + M${-u/2} ${h/2-d} + v${-h+2*d} + q0,-${d} ${d},-${d} + h${u-2*d} + q${d},0 ${d},${d} + v${h-d} + H${-u/2} + Z + `:` + M${-u/2} ${h/2-d} + v${-h+2*d} + q0,-${d} ${d},-${d} + h${u-2*d} + q${d},0 ${d},${d} + v${h-2*d} + q0,${d} ${-d},${d} + h${-(u-2*d)} + q${-d},0 ${-d},${-d} + Z + `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let p=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",f);return n.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>l.node()),Vt(t,p),t.calcIntersect=function(m,g){return Mt.rect(m,g)},t.intersect=function(m){return Mt.rect(t,m)},n}var lQ=b(()=>{"use strict";be();me();de();s(oQ,"defaultMindmapNode")});async function cQ(e,t){let r={padding:t.padding??0};return oC(e,t,r)}var uQ=b(()=>{"use strict";uD();s(cQ,"mindmapCircle")});function hQ(e){return e in fD}var i5t,n5t,fD,pD=b(()=>{"use strict";MY();$Y();VY();GY();uD();qY();UY();YY();KY();ZY();rX();nX();aX();lX();dX();pX();gX();xX();kX();CX();wX();EX();AX();LX();IX();OX();BX();$X();VX();qX();UX();YX();KX();ZX();tK();rK();nK();aK();lK();uK();dK();pK();gK();xK();kK();CK();wK();EK();AK();IK();OK();BK();VK();GK();qK();UK();YK();ZK();tQ();rQ();nQ();aQ();lQ();uQ();i5t=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:hK},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:sK},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:fK},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:TK},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:eX},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:oC},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:iQ},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:sQ},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:JX},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:yX},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:PX},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:MX},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:NK},{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:DX},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sX},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:vK},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:FY},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:oK},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:bK},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:yK},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:fX},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:bX},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:jY},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:HY},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:XY},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:FX},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:zK},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:mX},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:DK},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:WX},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:QY},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:iX},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:FK},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:jK},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:oX},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:MK},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:hX},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:cK},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:XX},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:HX},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:PY},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:WY},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:_K},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:SK},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:WK},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:eK},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:jX}],n5t=s(()=>{let t=[...Object.entries({state:mK,choice:zY,note:QX,rectWithTitle:iK,labelRect:NX,iconSquare:vX,iconCircle:SX,icon:TX,iconRounded:_X,imageSquare:RX,anchor:OY,kanbanItem:eQ,mindmapCircle:cQ,defaultMindmapNode:oQ,classBox:QK,erBox:dD,requirementBox:JK}),...i5t.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),fD=n5t();s(hQ,"isValidShape")});var s5t,uC,dQ=b(()=>{"use strict";lr();S0();ye();Jt();pD();Re();fr();yi();Td();r1();s5t="flowchart-",uC=class{constructor(){this.vertexCounter=0;this.config=Q();this.diagramId="";this.vertices=new Map;this.edges=[];this.classes=new Map;this.subGraphs=[];this.subGraphLookup=new Map;this.tooltips=new Map;this.subCount=0;this.firstGraphFlag=!0;this.secCount=-1;this.posCrossRef=[];this.funs=[];this.setAccTitle=Ye;this.setAccDescription=Je;this.setDiagramTitle=sr;this.getAccTitle=Ze;this.getAccDescription=tr;this.getDiagramTitle=er;this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{s(this,"FlowDB")}sanitizeText(t){return qt.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let r of this.vertices.values())if(r.id===t)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,r,i,n,a,o,l={},u){if(!t||t.trim().length===0)return;let h;if(u!==void 0){let m;u.includes(` +`)?m=u+` +`:m=`{ +`+u+` +}`,h=Pu(m,{schema:Bu})}let d=this.edges.find(m=>m.id===t);if(d){let m=h;m?.animate!==void 0&&(d.animate=m.animate),m?.animation!==void 0&&(d.animation=m.animation),m?.curve!==void 0&&(d.interpolate=m.curve);return}let f,p=this.vertices.get(t);if(p===void 0&&(r===void 0&&i===void 0&&n!==void 0&&n!==null&&z.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),p={id:t,labelType:"text",domId:s5t+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,p)),this.vertexCounter++,r!==void 0?(this.config=Q(),f=this.sanitizeText(r.text.trim()),p.labelType=r.type,f.startsWith('"')&&f.endsWith('"')&&(f=f.substring(1,f.length-1)),p.text=f):p.text===void 0&&(p.text=t),i!==void 0&&(p.type=i),n?.forEach(m=>{p.styles.push(m)}),a?.forEach(m=>{p.classes.push(m)}),o!==void 0&&(p.dir=o),p.props===void 0?p.props=l:l!==void 0&&Object.assign(p.props,l),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!hQ(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=h?.shape}h?.label&&(p.text=h?.label,p.labelType=this.sanitizeNodeLabelType(h?.labelType)),h?.icon&&(p.icon=h?.icon,!h.label?.trim()&&p.text===t&&(p.text="")),h?.form&&(p.form=h?.form),h?.pos&&(p.pos=h?.pos),h?.img&&(p.img=h?.img,!h.label?.trim()&&p.text===t&&(p.text="")),h?.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h))}}addSingleLink(t,r,i,n){let l={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};z.info("abc78 Got edge...",l);let u=i.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=this.sanitizeNodeLabelType(u.type)),i!==void 0&&(l.type=i.type,l.stroke=i.stroke,l.length=i.length>10?10:i.length),n&&!this.edges.some(h=>h.id===n))l.id=n,l.isUserDefinedId=!0;else{let h=this.edges.filter(d=>d.start===l.start&&d.end===l.end);h.length===0?l.id=Nu(l.start,l.end,{counter:0,prefix:"L"}):l.id=Nu(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))z.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t=="object"&&"id"in t&&typeof t.id=="string"}addLink(t,r,i){let n=this.isLinkData(i)?i.id.replace("@",""):void 0;z.info("addLink",t,r,n);for(let a of t)for(let o of r){let l=a===t[t.length-1],u=o===r[0];l&&u?this.addSingleLink(a,o,i,n):this.addSingleLink(a,o,i,void 0)}}updateLinkInterpolate(t,r){t.forEach(i=>{i==="default"?this.edges.defaultInterpolate=r:this.edges[i].interpolate=r})}updateLink(t,r){t.forEach(i=>{if(typeof i=="number"&&i>=this.edges.length)throw new Error(`The index ${i} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);i==="default"?this.edges.defaultStyle=r:(this.edges[i].style=r,(this.edges[i]?.style?.length??0)>0&&!this.edges[i]?.style?.some(n=>n?.startsWith("fill"))&&this.edges[i]?.style?.push("fill:none"))})}addClass(t,r){let i=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(n=>{let a=this.classes.get(n);a===void 0&&(a={id:n,styles:[],textStyles:[]},this.classes.set(n,a)),i?.forEach(o=>{if(/color/.exec(o)){let l=o.replace("fill","bgFill");a.textStyles.push(l)}a.styles.push(o)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(t,r){for(let i of t.split(",")){let n=this.vertices.get(i);n&&n.classes.push(r);let a=this.edges.find(l=>l.id===i);a&&a.classes.push(r);let o=this.subGraphLookup.get(i);o&&o.classes.push(r)}}setTooltip(t,r){if(r!==void 0){r=this.sanitizeText(r);for(let i of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(i):i,r)}}setClickFun(t,r,i){if(Q().securityLevel!=="loose"||r===void 0)return;let n=[];if(typeof i=="string"){n=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o{let o=this.lookUpDomId(t),l=document.querySelector(`[id="${o}"]`);l!==null&&l.addEventListener("click",()=>{Te.runFunc(r,...n)},!1)}))}setLink(t,r,i){t.split(",").forEach(n=>{let a=this.vertices.get(n);a!==void 0&&(a.link=Te.formatUrl(r,this.config),a.linkTarget=i)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,i){t.split(",").forEach(n=>{this.setClickFun(n,r,i)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=cT();vt(t).select("svg").selectAll("g.node").on("mouseover",a=>{let o=vt(a.currentTarget),l=o.attr("title");if(l===null)return;let u=a.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Va.sanitize(l)),o.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),vt(a.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=Q(),He()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,i){let n=t.text.trim(),a=i.text;t===i&&/\s/.exec(i.text)&&(n=void 0);let l=s(p=>{let m={boolean:{},number:{},string:{}},g=[],y;return{nodeList:p.filter(function(k){let T=typeof k;return k.stmt&&k.stmt==="dir"?(y=k.value,!1):k.trim()===""?!1:T in m?m[T].hasOwnProperty(k)?!1:m[T][k]=!0:g.includes(k)?!1:g.push(k)}),dir:y}},"uniq")(r.flat()),u=l.nodeList,h=l.dir,d=Q().flowchart??{};if(h=h??(d.inheritDir?this.getDirection()??Q().direction??void 0:void 0),this.version==="gen-1")for(let p=0;p2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let n=0,a=1;for(;n=0){let l=this.indexNodes2(t,o);if(l.result)return{result:!0,count:a+l.count};a=a+l.count}n=n+1}return{result:!1,count:a}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(t){let r=t.trim(),i="arrow_open";switch(r[0]){case"<":i="arrow_point",r=r.slice(1);break;case"x":i="arrow_cross",r=r.slice(1);break;case"o":i="arrow_circle",r=r.slice(1);break}let n="normal";return r.includes("=")&&(n="thick"),r.includes(".")&&(n="dotted"),{type:i,stroke:n}}countChar(t,r){let i=r.length,n=0;for(let a=0;a":n="arrow_point",r.startsWith("<")&&(n="double_"+n,i=i.slice(1));break;case"o":n="arrow_circle",r.startsWith("o")&&(n="double_"+n,i=i.slice(1));break}let a="normal",o=i.length-1;i.startsWith("=")&&(a="thick"),i.startsWith("~")&&(a="invisible");let l=this.countChar(".",i);return l&&(a="dotted",o=l),{type:n,stroke:a,length:o}}destructLink(t,r){let i=this.destructEndLink(t),n;if(r){if(n=this.destructStartLink(r),n.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=i.type;else{if(n.type!==i.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=i.length,n}return i}exists(t,r){for(let i of t)if(i.nodes.includes(r))return!0;return!1}makeUniq(t,r){let i=[];return t.nodes.forEach((n,a)=>{this.exists(r,n)||i.push(t.nodes[a])}),{nodes:i}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,r){return t.find(i=>i.id===r)}destructEdgeType(t){let r="none",i="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":i=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),i=r;break}return{arrowTypeStart:r,arrowTypeEnd:i}}addNodeFromVertex(t,r,i,n,a,o){let l=i.get(t.id),u=n.get(t.id)??!1,h=this.findNode(r,t.id);if(h)h.cssStyles=t.styles,h.cssCompiledStyles=this.getCompiledStyles(t.classes),h.cssClasses=t.classes.join(" ");else{let d={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:l,padding:a.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:o,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?r.push({...d,isGroup:!0,shape:"rect"}):r.push({...d,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let r=[];for(let i of t){let n=this.classes.get(i);n?.styles&&(r=[...r,...n.styles??[]].map(a=>a.trim())),n?.textStyles&&(r=[...r,...n.textStyles??[]].map(a=>a.trim()))}return r}getData(){let t=Q(),r=[],i=[],n=this.getSubGraphs(),a=new Map,o=new Map;for(let h=n.length-1;h>=0;h--){let d=n[h];d.nodes.length>0&&o.set(d.id,!0);for(let f of d.nodes)a.set(f,d.id)}for(let h=n.length-1;h>=0;h--){let d=n[h];r.push({id:d.id,label:d.title,labelStyle:"",labelType:d.labelType,parentId:a.get(d.id),padding:8,cssCompiledStyles:this.getCompiledStyles(d.classes),cssClasses:d.classes.join(" "),shape:"rect",dir:d.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(h=>{this.addNodeFromVertex(h,r,a,o,t,t.look||"classic")});let u=this.getEdges();return u.forEach((h,d)=>{let{arrowTypeStart:f,arrowTypeEnd:p}=this.destructEdgeType(h.type),m=[...u.defaultStyle??[]];h.style&&m.push(...h.style);let g={id:Nu(h.start,h.end,{counter:d,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:h.start,end:h.end,type:h.type??"normal",label:h.text,labelType:h.labelType,labelpos:"c",thickness:h.stroke,minlen:h.length,classes:h?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":f,arrowTypeEnd:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":p,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:m,style:m,pattern:h.stroke,look:t.look,animate:h.animate,animation:h.animation,curve:h.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};i.push(g)}),{nodes:r,edges:i,other:{},config:t}}defaultConfig(){return z2.flowchart}}});var vl,bm=b(()=>{"use strict";lr();vl=s((e,t)=>{let r;return t==="sandbox"&&(r=vt("#i"+e)),(t==="sandbox"?vt(r.nodes()[0].contentDocument.body):vt("body")).select(`[id="${e}"]`)},"getDiagramElement")});var Lc,B0=b(()=>{"use strict";Lc=s(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins")});var fQ,a5t,o5t,l5t,c5t,u5t,h5t,pQ,km,mQ,hC=b(()=>{"use strict";ye();Qe();Jt();B0();lr();xe();Xa();UL();lC();Md();me();fQ=s(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);let r=Q(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Pt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Ke(r),m=f.insert("g").attr("class","cluster-label "),g;t.labelType==="markdown"?g=await zi(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):g=await Fo(m,t.label,t.labelStyle||"",!1,!0);let y=g.getBBox();if(Ke(r)){let A=g.children[0],v=vt(g);y=A.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}let x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let k=t.height,T=t.x-x/2,C=t.y-k/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){let A=$t.svg(f),v=zt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),M=A.path(Hs(T,C,x,k,0),v);_=f.insert(()=>(z.debug("Rough node insert CXC",M),M),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",d.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",C).attr("width",x).attr("height",k);let{subGraphTitleTopMargin:S}=Lc(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+S})`),l){let A=m.select("span");A&&A.attr("style",l)}let w=_.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return $u(t,A)},{cluster:f,labelBBox:y}},"rect"),a5t=s((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");let o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(l){return $u(t,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),o5t=s(async(e,t)=>{let r=Q(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),d=h.insert("g",":first-child"),f=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=await Fo(f,t.label,t.labelStyle,void 0,!0),g=m.getBBox();if(Ke(r)){let M=m.children[0],$=vt(m);g=M.getBoundingClientRect(),$.attr("width",g.width),$.attr("height",g.height)}let y=0*t.padding,x=y/2,k=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+y;t.width<=g.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;let T=t.height+y,C=t.height+y-g.height-6,_=t.x-k/2,S=t.y-T/2;t.width=k;let w=t.y-t.height/2-x+g.height+2,A;if(t.look==="handDrawn"){let M=t.cssClasses.includes("statediagram-cluster-alt"),$=$t.svg(h),I=t.rx||t.ry?$.path(Hs(_,S,k,T,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:n}):$.rectangle(_,S,k,T,{seed:n});A=h.insert(()=>I,":first-child");let F=$.rectangle(_,w,k,C,{fill:M?a:o,fillStyle:M?"hachure":"solid",stroke:u,seed:n});A=h.insert(()=>I,":first-child"),p=h.insert(()=>F)}else A=d.insert("rect",":first-child"),A.attr("class","outer").attr("x",_).attr("y",S).attr("width",k).attr("height",T).attr("data-look",t.look),p.attr("class","inner").attr("x",_).attr("y",w).attr("width",k).attr("height",C);f.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(Ke(r)?0:3)})`);let v=A.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(M){return $u(t,M)},{cluster:h,labelBBox:g}},"roundedWithTitle"),l5t=s(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);let r=Q(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Pt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Ke(r),m=f.insert("g").attr("class","cluster-label "),g=await zi(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),y=g.getBBox();if(Ke(r)){let A=g.children[0],v=vt(g);y=A.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}let x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let k=t.height,T=t.x-x/2,C=t.y-k/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){let A=$t.svg(f),v=zt(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),M=A.path(Hs(T,C,x,k,t.rx),v);_=f.insert(()=>(z.debug("Rough node insert CXC",M),M),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",d.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",C).attr("width",x).attr("height",k);let{subGraphTitleTopMargin:S}=Lc(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+S})`),l){let A=m.select("span");A&&A.attr("style",l)}let w=_.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return $u(t,A)},{cluster:f,labelBBox:y}},"kanbanSection"),c5t=s((e,t)=>{let r=Q(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),l=o.insert("g",":first-child"),u=0*t.padding,h=t.width+u;t.diff=-t.padding;let d=t.height+u,f=t.x-h/2,p=t.y-d/2;t.width=h;let m;if(t.look==="handDrawn"){let x=$t.svg(o).rectangle(f,p,h,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});m=o.insert(()=>x,":first-child")}else{m=l.insert("rect",":first-child");let y="outer";t.look,y="divider",m.attr("class",y).attr("x",f).attr("y",p).attr("width",h).attr("height",d).attr("data-look",t.look)}let g=m.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return $u(t,y)},{cluster:o,labelBBox:{}}},"divider"),u5t=fQ,h5t={rect:fQ,squareRect:u5t,roundedWithTitle:o5t,noteGroup:a5t,divider:c5t,kanbanSection:l5t},pQ=new Map,km=s(async(e,t)=>{let r=t.shape||"rect",i=await h5t[r](e,t);return pQ.set(t.id,i),i},"insertCluster"),mQ=s(()=>{pQ=new Map},"clear")});var Qa,mD=b(()=>{"use strict";Qa=s((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";let r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform")});function dC(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=wi(e),t=wi(t);let[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,l=a-i;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}var zn,gD,wi,fC,yD=b(()=>{"use strict";zn={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},gD={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};s(dC,"calculateDeltaAndAngle");wi=s(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),fC=s(e=>({x:s(function(t,r,i){let n=0,a=wi(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(zn,e.arrowTypeEnd)){let{angle:m,deltaX:g}=dC(i[i.length-1],i[i.length-2]);n=zn[e.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}let o=Math.abs(wi(t).x-wi(i[i.length-1]).x),l=Math.abs(wi(t).y-wi(i[i.length-1]).y),u=Math.abs(wi(t).x-wi(i[0]).x),h=Math.abs(wi(t).y-wi(i[0]).y),d=zn[e.arrowTypeStart],f=zn[e.arrowTypeEnd],p=1;if(o0&&l0&&h=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(zn,e.arrowTypeEnd)){let{angle:m,deltaY:g}=dC(i[i.length-1],i[i.length-2]);n=zn[e.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}let o=Math.abs(wi(t).y-wi(i[i.length-1]).y),l=Math.abs(wi(t).x-wi(i[i.length-1]).x),u=Math.abs(wi(t).y-wi(i[0]).y),h=Math.abs(wi(t).x-wi(i[0]).x),d=zn[e.arrowTypeStart],f=zn[e.arrowTypeEnd],p=1;if(o0&&l0&&h{"use strict";Jt();yQ=s((e,t,r,i,n,a=!1,o)=>{t.arrowTypeStart&&gQ(e,"start",t.arrowTypeStart,r,i,n,a,o),t.arrowTypeEnd&&gQ(e,"end",t.arrowTypeEnd,r,i,n,a,o)},"addEdgeMarkers"),d5t={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},f5t=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],gQ=s((e,t,r,i,n,a,o=!1,l)=>{let u=d5t[r],h=u&&f5t.includes(u.type);if(!u){z.warn(`Unknown arrow type: ${r}`);return}let d=u.type,m=`${n}_${a}-${d}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(l&&l.trim()!==""){let g=l.replace(/[^\dA-Za-z]/g,"_"),y=`${m}_${g}`;if(!document.getElementById(y)){let x=document.getElementById(m);if(x){let k=x.cloneNode(!0);k.id=y,k.querySelectorAll("path, circle, line").forEach(C=>{C.setAttribute("stroke",l),u.fill&&C.setAttribute("fill",l)}),x.parentNode?.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${m})`)},"addEdgeMarker")});function pC(e,t){Ke(Q())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}function y5t(e){let t=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}function k5t(e,t){if(e.length<2)return"";let r="",i=e.length,n=1e-5;for(let a=0;a({...n}));if(e.length>=2&&zn[t.arrowTypeStart]){let n=zn[t.arrowTypeStart],a=e[0],o=e[1],{angle:l}=TQ(a,o),u=n*Math.cos(l),h=n*Math.sin(l);r[0].x=a.x+u,r[0].y=a.y+h}let i=e.length;if(i>=2&&zn[t.arrowTypeEnd]){let n=zn[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:l}=TQ(o,a),u=n*Math.cos(l),h=n*Math.sin(l);r[i-1].x=a.x-u,r[i-1].y=a.y-h}return r}var p5t,mC,Gn,CQ,P0,gC,yC,m5t,g5t,bQ,kQ,x5t,b5t,xC,xD=b(()=>{"use strict";ye();Qe();Jt();Xa();mD();Re();yD();B0();lr();xe();lC();xQ();me();p5t=s(e=>typeof e=="string"?e:Q()?.flowchart?.curve,"resolveEdgeCurveType"),mC=new Map,Gn=new Map,CQ=s(()=>{mC.clear(),Gn.clear()},"clear"),P0=s(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),gC=s(async(e,t)=>{let r=Q(),i=Ke(r),{labelStyles:n}=Pt(t);t.labelStyle=n;let a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),l=t.labelType==="markdown",h=await zi(e,t.label,{style:P0(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:l,width:l?void 0:void 0},r);o.node().appendChild(h),z.info("abc82",t,t.labelType);let d=h.getBBox(),f=d;if(i){let m=h.children[0],g=vt(h);d=m.getBoundingClientRect(),f=d,g.attr("width",d.width),g.attr("height",d.height)}else{let m=vt(h).select("text").node();m&&typeof m.getBBox=="function"&&(f=m.getBBox())}o.attr("transform",Qa(f,i)),mC.set(t.id,a),t.width=d.width,t.height=d.height;let p;if(t.startLabelLeft){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Fo(g,t.startLabelLeft,P0(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){let k=y.children[0],T=vt(y);x=k.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Qa(x,i)),Gn.get(t.id)||Gn.set(t.id,{}),Gn.get(t.id).startLeft=m,pC(p,t.startLabelLeft)}if(t.startLabelRight){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Fo(g,t.startLabelRight,P0(t.labelStyle)||"",!1,!1);p=y,g.node().appendChild(y);let x=y.getBBox();if(i){let k=y.children[0],T=vt(y);x=k.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Qa(x,i)),Gn.get(t.id)||Gn.set(t.id,{}),Gn.get(t.id).startRight=m,pC(p,t.startLabelRight)}if(t.endLabelLeft){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Fo(g,t.endLabelLeft,P0(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){let k=y.children[0],T=vt(y);x=k.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Qa(x,i)),m.node().appendChild(y),Gn.get(t.id)||Gn.set(t.id,{}),Gn.get(t.id).endLeft=m,pC(p,t.endLabelLeft)}if(t.endLabelRight){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Fo(g,t.endLabelRight,P0(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){let k=y.children[0],T=vt(y);x=k.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Qa(x,i)),m.node().appendChild(y),Gn.get(t.id)||Gn.set(t.id,{}),Gn.get(t.id).endRight=m,pC(p,t.endLabelRight)}return h},"insertEdgeLabel");s(pC,"setTerminalWidth");yC=s((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,mC.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath,i=Q(),{subGraphTitleTotalMargin:n}=Lc(i);if(e.label){let a=mC.get(e.id),o=e.x,l=e.y;if(r){let u=Te.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+n/2})`)}if(e.startLabelLeft){let a=Gn.get(e.id).startLeft,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let a=Gn.get(e.id).startRight,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let a=Gn.get(e.id).endLeft,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let a=Gn.get(e.id).endRight,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),m5t=s((e,t)=>{let r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,l=e.height/2;return n>=o||a>=l},"outsideNode"),g5t=s((e,t,r)=>{z.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2,l=r.xMath.abs(i-t.x)*u){let f=r.y{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(z.info("abc88 checking point",a,t),!m5t(t,a)&&!n){let o=g5t(t,i,a);z.debug("abc88 inside",a,i,o),z.debug("abc88 intersection",o,t);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?z.warn("abc88 no intersect",o,r):r.push(o),n=!0}else z.warn("abc88 outside",a,i),i=a,n||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");s(y5t,"extractCornerPoints");kQ=s(function(e,t,r){let i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),x5t=s(function(e){let{cornerPointPositions:t}=y5t(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+f:l.x+m-f,y:d<0?l.y-f:l.y+f}:p={x:h<0?l.x-f:l.x+f,y:d<0?l.y-m+f:l.y+m-f}}else z.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(p,u)}else r.push(e[i]);return r},"fixCorners"),b5t=s((e,t,r)=>{let i=e-t-r,n=2,a=2,o=n+a,l=Math.floor(i/o),u=Array(l).fill(`${n} ${a}`).join(" ");return`0 ${t} ${u} ${r}`},"generateDashArray"),xC=s(function(e,t,r,i,n,a,o,l=!1){if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u}=Q(),h=t.points,d=!1,f=n;var p=a;let m=[];for(let P in t.cssCompiledStyles)R0(P)||m.push(t.cssCompiledStyles[P]);z.debug("UIO intersect check",t.points,p.x,f.x),p.intersect&&f.intersect&&!l&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),z.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));let g=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=bQ(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=bQ(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=h.filter(P=>!Number.isNaN(P.y)),x=p5t(t.curve);x!=="rounded"&&(y=x5t(y));let k=xl;switch(x){case"linear":k=xl;break;case"basis":k=Oo;break;case"cardinal":k=X1;break;case"bumpX":k=q1;break;case"bumpY":k=j1;break;case"catmullRom":k=Z1;break;case"monotoneX":k=J1;break;case"monotoneY":k=t0;break;case"natural":k=jp;break;case"step":k=Up;break;case"stepAfter":k=r0;break;case"stepBefore":k=e0;break;case"rounded":k=xl;break;default:k=Oo}let{x:T,y:C}=fC(t),_=No().x(T).y(C).curve(k),S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let w,A=x==="rounded"?k5t(T5t(y,t),5):_(y),v=Array.isArray(t.style)?t.style:[t.style],M=v.find(P=>P?.startsWith("stroke:")),$="";t.animate&&($="edge-animation-fast"),t.animation&&($="edge-animation-"+t.animation);let I=!1;if(t.look==="handDrawn"){let P=$t.svg(e);Object.assign([],y);let E=P.path(A,{roughness:.3,seed:u});S+=" transition",w=vt(E).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",v?v.reduce((V,L)=>V+";"+L,""):"");let D=w.attr("d");w.attr("d",D),e.node().appendChild(w.node())}else{let P=m.join(";"),E=v?v.reduce((K,U)=>K+U+";",""):"",D=(P?P+";"+E+";":E)+";"+(v?v.reduce((K,U)=>K+";"+U,""):"");w=e.append("path").attr("d",A).attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",D),M=D.match(/stroke:([^;]+)/)?.[1],I=t.animate===!0||!!t.animation||P.includes("animation");let V=w.node(),L=typeof V.getTotalLength=="function"?V.getTotalLength():0,q=gD[t.arrowTypeStart]||0,H=gD[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){let U=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?b5t(L,q,H):`0 ${q} ${L-q-H} ${H}`}; stroke-dashoffset: 0;`;w.attr("style",U+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),w.attr("data-look",Pr(t.look)),t.showPoints&&y.forEach(P=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",P.x).attr("cy",P.y)});let F="";(Q().flowchart.arrowMarkerAbsolute||Q().state.arrowMarkerAbsolute)&&(F=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,F=F.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);let B=!I&&t?.look==="neo";yQ(w,t,F,o,i,B,M);let O=Math.floor(h.length/2),R=h[O];Te.isLabelCoordinateInPath(R,w.attr("d"))||(d=!0);let N={};return d&&(N.updatedPath=h),N.originalPath=t.points,N},"insertEdge");s(k5t,"generateRoundedPath");s(TQ,"calculateDeltaAndAngle");s(T5t,"applyMarkerOffsetsToPoints")});var C5t,S5t,w5t,_5t,E5t,v5t,A5t,R5t,L5t,D5t,I5t,N5t,O5t,M5t,B5t,P5t,$5t,F5t,V5t,z5t,G5t,W5t,q5t,j5t,bC,bD=b(()=>{"use strict";Jt();Qe();C5t=s((e,t,r,i)=>{t.forEach(n=>{j5t[n](e,r,i)})},"insertMarkers"),S5t=s((e,t,r)=>{z.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),w5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),_5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),E5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),v5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),A5t=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),R5t=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),L5t=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),D5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),I5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{transitionColor:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),N5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),O5t=s((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),M5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),B5t=s((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),P5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),$5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a,mainBkg:o}=n,l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let u=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),F5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),V5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a,mainBkg:o}=n,l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let u=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),z5t=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`)},"requirement_arrow"),G5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),W5t=s((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),q5t=s((e,t,r)=>{let i=le(),{themeVariables:n}=i,{strokeWidth:a}=n,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),j5t={extension:S5t,composition:w5t,aggregation:_5t,dependency:E5t,lollipop:v5t,point:A5t,circle:R5t,cross:L5t,barb:D5t,barbNeo:I5t,only_one:N5t,zero_or_one:O5t,one_or_more:M5t,zero_or_more:B5t,only_one_neo:P5t,zero_or_one_neo:$5t,one_or_more_neo:F5t,zero_or_more_neo:V5t,requirement_arrow:z5t,requirement_contains:W5t,requirement_arrow_neo:G5t,requirement_contains_neo:q5t},bC=C5t});async function Tm(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?fD[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return i.attr("data-look",Pr(t.look)),t.tooltip&&n.attr("title",t.tooltip),kC.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var kC,SQ,wQ,$0,TC=b(()=>{"use strict";Jt();pD();Re();kC=new Map;s(Tm,"insertNode");SQ=s((e,t)=>{kC.set(t.id,e)},"setNodeElem"),wQ=s(()=>{kC.clear()},"clear"),$0=s(e=>{let t=kC.get(e.id);z.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode")});var _Q,EQ=b(()=>{"use strict";Qe();fr();Jt();hC();xD();bD();TC();de();Re();_Q={common:qt,getConfig:le,insertCluster:km,insertEdge:xC,insertEdgeLabel:gC,insertMarkers:bC,insertNode:Tm,interpolateToCurve:nL,labelHelper:Qt,log:z,positionEdgeLabel:yC}});function H5t(e){return typeof e=="symbol"||Ni(e)&&Vn(e)==U5t}var U5t,Ta,Pd=b(()=>{"use strict";kc();qa();U5t="[object Symbol]";s(H5t,"isSymbol");Ta=H5t});function Y5t(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r{"use strict";s(Y5t,"arrayMap");Ys=Y5t});function RQ(e){if(typeof e=="string")return e;if(fe(e))return Ys(e,RQ)+"";if(Ta(e))return AQ?AQ.call(e):"";var t=e+"";return t=="0"&&1/e==-X5t?"-0":t}var X5t,vQ,AQ,LQ,DQ=b(()=>{"use strict";Cd();$d();Si();Pd();X5t=1/0,vQ=_n?_n.prototype:void 0,AQ=vQ?vQ.toString:void 0;s(RQ,"baseToString");LQ=RQ});function Q5t(e){for(var t=e.length;t--&&K5t.test(e.charAt(t)););return t}var K5t,IQ,NQ=b(()=>{"use strict";K5t=/\s/;s(Q5t,"trimmedEndIndex");IQ=Q5t});function J5t(e){return e&&e.slice(0,IQ(e)+1).replace(Z5t,"")}var Z5t,OQ,MQ=b(()=>{"use strict";NQ();Z5t=/^\s+/;s(J5t,"baseTrim");OQ=J5t});function nRt(e){if(typeof e=="number")return e;if(Ta(e))return BQ;if(ii(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ii(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=OQ(e);var r=eRt.test(e);return r||rRt.test(e)?iRt(e.slice(2),r?2:8):tRt.test(e)?BQ:+e}var BQ,tRt,eRt,rRt,iRt,PQ,$Q=b(()=>{"use strict";MQ();xa();Pd();BQ=NaN,tRt=/^[-+]0x[0-9a-f]+$/i,eRt=/^0b[01]+$/i,rRt=/^0o[0-7]+$/i,iRt=parseInt;s(nRt,"toNumber");PQ=nRt});function aRt(e){if(!e)return e===0?e:0;if(e=PQ(e),e===FQ||e===-FQ){var t=e<0?-1:1;return t*sRt}return e===e?e:0}var FQ,sRt,Cm,kD=b(()=>{"use strict";$Q();FQ=1/0,sRt=17976931348623157e292;s(aRt,"toFinite");Cm=aRt});function oRt(e){var t=Cm(e),r=t%1;return t===t?r?t-r:t:0}var Al,Sm=b(()=>{"use strict";kD();s(oRt,"toInteger");Al=oRt});var lRt,CC,VQ=b(()=>{"use strict";wu();Ga();lRt=Fs(Fi,"WeakMap"),CC=lRt});function cRt(){}var Oi,TD=b(()=>{"use strict";s(cRt,"noop");Oi=cRt});function uRt(e,t){for(var r=-1,i=e==null?0:e.length;++r{"use strict";s(uRt,"arrayEach");SC=uRt});function hRt(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a{"use strict";s(hRt,"baseFindIndex");wC=hRt});function dRt(e){return e!==e}var zQ,GQ=b(()=>{"use strict";s(dRt,"baseIsNaN");zQ=dRt});function fRt(e,t,r){for(var i=r-1,n=e.length;++i{"use strict";s(fRt,"strictIndexOf");WQ=fRt});function pRt(e,t,r){return t===t?WQ(e,t,r):wC(e,zQ,r)}var wm,_C=b(()=>{"use strict";SD();GQ();qQ();s(pRt,"baseIndexOf");wm=pRt});function mRt(e,t){var r=e==null?0:e.length;return!!r&&wm(e,t,0)>-1}var EC,wD=b(()=>{"use strict";_C();s(mRt,"arrayIncludes");EC=mRt});var gRt,jQ,UQ=b(()=>{"use strict";jR();gRt=kT(Object.keys,Object),jQ=gRt});function bRt(e){if(!Tl(e))return jQ(e);var t=[];for(var r in Object(e))xRt.call(e,r)&&r!="constructor"&&t.push(r);return t}var yRt,xRt,_m,vC=b(()=>{"use strict";sm();UQ();yRt=Object.prototype,xRt=yRt.hasOwnProperty;s(bRt,"baseKeys");_m=bRt});function kRt(e){return Vi(e)?_T(e):_m(e)}var Ar,Rl=b(()=>{"use strict";KR();vC();ja();s(kRt,"keys");Ar=kRt});var TRt,CRt,SRt,Wn,HQ=b(()=>{"use strict";cm();vd();tL();ja();sm();Rl();TRt=Object.prototype,CRt=TRt.hasOwnProperty,SRt=AT(function(e,t){if(Tl(t)||Vi(t)){Ya(t,Ar(t),e);return}for(var r in t)CRt.call(t,r)&&Cl(e,r,t[r])}),Wn=SRt});function ERt(e,t){if(fe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ta(e)?!0:_Rt.test(e)||!wRt.test(e)||t!=null&&e in Object(t)}var wRt,_Rt,Em,AC=b(()=>{"use strict";Si();Pd();wRt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_Rt=/^\w*$/;s(ERt,"isKey");Em=ERt});function ARt(e){var t=Qp(e,function(i){return r.size===vRt&&r.clear(),i}),r=t.cache;return t}var vRt,YQ,XQ=b(()=>{"use strict";$R();vRt=500;s(ARt,"memoizeCapped");YQ=ARt});var RRt,LRt,DRt,KQ,QQ=b(()=>{"use strict";XQ();RRt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LRt=/\\(\\)?/g,DRt=YQ(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(RRt,function(r,i,n,a){t.push(n?a.replace(LRt,"$1"):i||r)}),t}),KQ=DRt});function IRt(e){return e==null?"":LQ(e)}var RC,_D=b(()=>{"use strict";DQ();s(IRt,"toString");RC=IRt});function NRt(e,t){return fe(e)?e:Em(e,t)?[e]:KQ(RC(e))}var Gu,F0=b(()=>{"use strict";Si();AC();QQ();_D();s(NRt,"castPath");Gu=NRt});function MRt(e){if(typeof e=="string"||Ta(e))return e;var t=e+"";return t=="0"&&1/e==-ORt?"-0":t}var ORt,Ll,vm=b(()=>{"use strict";Pd();ORt=1/0;s(MRt,"toKey");Ll=MRt});function BRt(e,t){t=Gu(t,e);for(var r=0,i=t.length;e!=null&&r{"use strict";F0();vm();s(BRt,"baseGet");Wu=BRt});function PRt(e,t,r){var i=e==null?void 0:Wu(e,t);return i===void 0?r:i}var ZQ,JQ=b(()=>{"use strict";V0();s(PRt,"get");ZQ=PRt});function $Rt(e,t){for(var r=-1,i=t.length,n=e.length;++r{"use strict";s($Rt,"arrayPush");Am=$Rt});function FRt(e){return fe(e)||Bo(e)||!!(tZ&&e&&e[tZ])}var tZ,eZ,rZ=b(()=>{"use strict";Cd();am();Si();tZ=_n?_n.isConcatSpreadable:void 0;s(FRt,"isFlattenable");eZ=FRt});function iZ(e,t,r,i,n){var a=-1,o=e.length;for(r||(r=eZ),n||(n=[]);++a0&&r(l)?t>1?iZ(l,t-1,r,i,n):Am(n,l):i||(n[n.length]=l)}return n}var Dl,Rm=b(()=>{"use strict";LC();rZ();s(iZ,"baseFlatten");Dl=iZ});function VRt(e){var t=e==null?0:e.length;return t?Dl(e,1):[]}var Nr,DC=b(()=>{"use strict";Rm();s(VRt,"flatten");Nr=VRt});function zRt(e){return vT(ET(e,void 0,Nr),e+"")}var nZ,sZ=b(()=>{"use strict";DC();QR();JR();s(zRt,"flatRest");nZ=zRt});function GRt(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),r=r>n?n:r,r<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(n);++i{"use strict";s(GRt,"baseSlice");IC=GRt});function QRt(e){return KRt.test(e)}var WRt,qRt,jRt,URt,HRt,YRt,XRt,KRt,aZ,oZ=b(()=>{"use strict";WRt="\\ud800-\\udfff",qRt="\\u0300-\\u036f",jRt="\\ufe20-\\ufe2f",URt="\\u20d0-\\u20ff",HRt=qRt+jRt+URt,YRt="\\ufe0e\\ufe0f",XRt="\\u200d",KRt=RegExp("["+XRt+WRt+HRt+YRt+"]");s(QRt,"hasUnicode");aZ=QRt});function ZRt(e,t,r,i){var n=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++n]);++n{"use strict";s(ZRt,"arrayReduce");lZ=ZRt});function JRt(e,t){return e&&Ya(t,Ar(t),e)}var uZ,hZ=b(()=>{"use strict";vd();Rl();s(JRt,"baseAssign");uZ=JRt});function tLt(e,t){return e&&Ya(t,Vs(t),e)}var dZ,fZ=b(()=>{"use strict";vd();Du();s(tLt,"baseAssignIn");dZ=tLt});function eLt(e,t){for(var r=-1,i=e==null?0:e.length,n=0,a=[];++r{"use strict";s(eLt,"arrayFilter");Lm=eLt});function rLt(){return[]}var OC,vD=b(()=>{"use strict";s(rLt,"stubArray");OC=rLt});var iLt,nLt,pZ,sLt,Dm,MC=b(()=>{"use strict";NC();vD();iLt=Object.prototype,nLt=iLt.propertyIsEnumerable,pZ=Object.getOwnPropertySymbols,sLt=pZ?function(e){return e==null?[]:(e=Object(e),Lm(pZ(e),function(t){return nLt.call(e,t)}))}:OC,Dm=sLt});function aLt(e,t){return Ya(e,Dm(e),t)}var mZ,gZ=b(()=>{"use strict";vd();MC();s(aLt,"copySymbols");mZ=aLt});var oLt,lLt,BC,AD=b(()=>{"use strict";LC();TT();MC();vD();oLt=Object.getOwnPropertySymbols,lLt=oLt?function(e){for(var t=[];e;)Am(t,Dm(e)),e=nm(e);return t}:OC,BC=lLt});function cLt(e,t){return Ya(e,BC(e),t)}var yZ,xZ=b(()=>{"use strict";vd();AD();s(cLt,"copySymbolsIn");yZ=cLt});function uLt(e,t,r){var i=t(e);return fe(e)?i:Am(i,r(e))}var PC,RD=b(()=>{"use strict";LC();Si();s(uLt,"baseGetAllKeys");PC=uLt});function hLt(e){return PC(e,Ar,Dm)}var z0,LD=b(()=>{"use strict";RD();MC();Rl();s(hLt,"getAllKeys");z0=hLt});function dLt(e){return PC(e,Vs,BC)}var $C,DD=b(()=>{"use strict";RD();AD();Du();s(dLt,"getAllKeysIn");$C=dLt});var fLt,FC,bZ=b(()=>{"use strict";wu();Ga();fLt=Fs(Fi,"DataView"),FC=fLt});var pLt,VC,kZ=b(()=>{"use strict";wu();Ga();pLt=Fs(Fi,"Promise"),VC=pLt});var mLt,qu,ID=b(()=>{"use strict";wu();Ga();mLt=Fs(Fi,"Set"),qu=mLt});var TZ,gLt,CZ,SZ,wZ,_Z,yLt,xLt,bLt,kLt,TLt,Fd,Ca,Vd=b(()=>{"use strict";bZ();fT();kZ();ID();VQ();kc();MR();TZ="[object Map]",gLt="[object Object]",CZ="[object Promise]",SZ="[object Set]",wZ="[object WeakMap]",_Z="[object DataView]",yLt=Tc(FC),xLt=Tc(vu),bLt=Tc(VC),kLt=Tc(qu),TLt=Tc(CC),Fd=Vn;(FC&&Fd(new FC(new ArrayBuffer(1)))!=_Z||vu&&Fd(new vu)!=TZ||VC&&Fd(VC.resolve())!=CZ||qu&&Fd(new qu)!=SZ||CC&&Fd(new CC)!=wZ)&&(Fd=s(function(e){var t=Vn(e),r=t==gLt?e.constructor:void 0,i=r?Tc(r):"";if(i)switch(i){case yLt:return _Z;case xLt:return TZ;case bLt:return CZ;case kLt:return SZ;case TLt:return wZ}return t},"getTag"));Ca=Fd});function wLt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&SLt.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var CLt,SLt,EZ,vZ=b(()=>{"use strict";CLt=Object.prototype,SLt=CLt.hasOwnProperty;s(wLt,"initCloneArray");EZ=wLt});function _Lt(e,t){var r=t?im(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var AZ,RZ=b(()=>{"use strict";yT();s(_Lt,"cloneDataView");AZ=_Lt});function vLt(e){var t=new e.constructor(e.source,ELt.exec(e));return t.lastIndex=e.lastIndex,t}var ELt,LZ,DZ=b(()=>{"use strict";ELt=/\w*$/;s(vLt,"cloneRegExp");LZ=vLt});function ALt(e){return NZ?Object(NZ.call(e)):{}}var IZ,NZ,OZ,MZ=b(()=>{"use strict";Cd();IZ=_n?_n.prototype:void 0,NZ=IZ?IZ.valueOf:void 0;s(ALt,"cloneSymbol");OZ=ALt});function YLt(e,t,r){var i=e.constructor;switch(t){case PLt:return im(e);case RLt:case LLt:return new i(+e);case $Lt:return AZ(e,r);case FLt:case VLt:case zLt:case GLt:case WLt:case qLt:case jLt:case ULt:case HLt:return xT(e,r);case DLt:return new i;case ILt:case MLt:return new i(e);case NLt:return LZ(e);case OLt:return new i;case BLt:return OZ(e)}}var RLt,LLt,DLt,ILt,NLt,OLt,MLt,BLt,PLt,$Lt,FLt,VLt,zLt,GLt,WLt,qLt,jLt,ULt,HLt,BZ,PZ=b(()=>{"use strict";yT();RZ();DZ();MZ();WR();RLt="[object Boolean]",LLt="[object Date]",DLt="[object Map]",ILt="[object Number]",NLt="[object RegExp]",OLt="[object Set]",MLt="[object String]",BLt="[object Symbol]",PLt="[object ArrayBuffer]",$Lt="[object DataView]",FLt="[object Float32Array]",VLt="[object Float64Array]",zLt="[object Int8Array]",GLt="[object Int16Array]",WLt="[object Int32Array]",qLt="[object Uint8Array]",jLt="[object Uint8ClampedArray]",ULt="[object Uint16Array]",HLt="[object Uint32Array]";s(YLt,"initCloneByTag");BZ=YLt});function KLt(e){return Ni(e)&&Ca(e)==XLt}var XLt,$Z,FZ=b(()=>{"use strict";Vd();qa();XLt="[object Map]";s(KLt,"baseIsMap");$Z=KLt});var VZ,QLt,zZ,GZ=b(()=>{"use strict";FZ();Ed();f0();VZ=Ha&&Ha.isMap,QLt=VZ?Ua(VZ):$Z,zZ=QLt});function JLt(e){return Ni(e)&&Ca(e)==ZLt}var ZLt,WZ,qZ=b(()=>{"use strict";Vd();qa();ZLt="[object Set]";s(JLt,"baseIsSet");WZ=JLt});var jZ,tDt,UZ,HZ=b(()=>{"use strict";qZ();Ed();f0();jZ=Ha&&Ha.isSet,tDt=jZ?Ua(jZ):WZ,UZ=tDt});function zC(e,t,r,i,n,a){var o,l=t&eDt,u=t&rDt,h=t&iDt;if(r&&(o=n?r(e,i,n,a):r(e)),o!==void 0)return o;if(!ii(e))return e;var d=fe(e);if(d){if(o=EZ(e),!l)return bT(e,o)}else{var f=Ca(e),p=f==XZ||f==lDt;if(Po(e))return gT(e,l);if(f==KZ||f==YZ||p&&!n){if(o=u||p?{}:CT(e),!l)return u?yZ(e,dZ(o,e)):mZ(e,uZ(o,e))}else{if(!ci[f])return n?e:{};o=BZ(e,f,l)}}a||(a=new bl);var m=a.get(e);if(m)return m;a.set(e,o),UZ(e)?e.forEach(function(x){o.add(zC(x,t,r,x,e,a))}):zZ(e)&&e.forEach(function(x,k){o.set(k,zC(x,t,r,k,e,a))});var g=h?u?$C:z0:u?Vs:Ar,y=d?void 0:g(e);return SC(y||e,function(x,k){y&&(k=x,x=e[k]),Cl(o,k,zC(x,t,r,k,e,a))}),o}var eDt,rDt,iDt,YZ,nDt,sDt,aDt,oDt,XZ,lDt,cDt,uDt,KZ,hDt,dDt,fDt,pDt,mDt,gDt,yDt,xDt,bDt,kDt,TDt,CDt,SDt,wDt,_Dt,EDt,ci,GC,ND=b(()=>{"use strict";u0();CD();cm();hZ();fZ();zR();qR();gZ();xZ();LD();DD();Vd();vZ();PZ();UR();Si();lm();GZ();xa();HZ();Rl();Du();eDt=1,rDt=2,iDt=4,YZ="[object Arguments]",nDt="[object Array]",sDt="[object Boolean]",aDt="[object Date]",oDt="[object Error]",XZ="[object Function]",lDt="[object GeneratorFunction]",cDt="[object Map]",uDt="[object Number]",KZ="[object Object]",hDt="[object RegExp]",dDt="[object Set]",fDt="[object String]",pDt="[object Symbol]",mDt="[object WeakMap]",gDt="[object ArrayBuffer]",yDt="[object DataView]",xDt="[object Float32Array]",bDt="[object Float64Array]",kDt="[object Int8Array]",TDt="[object Int16Array]",CDt="[object Int32Array]",SDt="[object Uint8Array]",wDt="[object Uint8ClampedArray]",_Dt="[object Uint16Array]",EDt="[object Uint32Array]",ci={};ci[YZ]=ci[nDt]=ci[gDt]=ci[yDt]=ci[sDt]=ci[aDt]=ci[xDt]=ci[bDt]=ci[kDt]=ci[TDt]=ci[CDt]=ci[cDt]=ci[uDt]=ci[KZ]=ci[hDt]=ci[dDt]=ci[fDt]=ci[pDt]=ci[SDt]=ci[wDt]=ci[_Dt]=ci[EDt]=!0;ci[oDt]=ci[XZ]=ci[mDt]=!1;s(zC,"baseClone");GC=zC});function ADt(e){return GC(e,vDt)}var vDt,jr,OD=b(()=>{"use strict";ND();vDt=4;s(ADt,"clone");jr=ADt});function DDt(e){return GC(e,RDt|LDt)}var RDt,LDt,MD,QZ=b(()=>{"use strict";ND();RDt=1,LDt=4;s(DDt,"cloneDeep");MD=DDt});function IDt(e){for(var t=-1,r=e==null?0:e.length,i=0,n=[];++t{"use strict";s(IDt,"compact");Il=IDt});function ODt(e){return this.__data__.set(e,NDt),this}var NDt,JZ,tJ=b(()=>{"use strict";NDt="__lodash_hash_undefined__";s(ODt,"setCacheAdd");JZ=ODt});function MDt(e){return this.__data__.has(e)}var eJ,rJ=b(()=>{"use strict";s(MDt,"setCacheHas");eJ=MDt});function WC(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new wd;++t{"use strict";pT();tJ();rJ();s(WC,"SetCache");WC.prototype.add=WC.prototype.push=JZ;WC.prototype.has=eJ;Im=WC});function BDt(e,t){for(var r=-1,i=e==null?0:e.length;++r{"use strict";s(BDt,"arraySome");jC=BDt});function PDt(e,t){return e.has(t)}var Nm,UC=b(()=>{"use strict";s(PDt,"cacheHas");Nm=PDt});function VDt(e,t,r,i,n,a){var o=r&$Dt,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var f=-1,p=!0,m=r&FDt?new Im:void 0;for(a.set(e,t),a.set(t,e);++f{"use strict";qC();BD();UC();$Dt=1,FDt=2;s(VDt,"equalArrays");HC=VDt});function zDt(e){var t=-1,r=Array(e.size);return e.forEach(function(i,n){r[++t]=[n,i]}),r}var iJ,nJ=b(()=>{"use strict";s(zDt,"mapToArray");iJ=zDt});function GDt(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var Om,YC=b(()=>{"use strict";s(GDt,"setToArray");Om=GDt});function r6t(e,t,r,i,n,a,o){switch(r){case e6t:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case t6t:return!(e.byteLength!=t.byteLength||!a(new rm(e),new rm(t)));case jDt:case UDt:case XDt:return Wa(+e,+t);case HDt:return e.name==t.name&&e.message==t.message;case KDt:case ZDt:return e==t+"";case YDt:var l=iJ;case QDt:var u=i&WDt;if(l||(l=Om),e.size!=t.size&&!u)return!1;var h=o.get(e);if(h)return h==t;i|=qDt,o.set(e,t);var d=HC(l(e),l(t),i,n,a,o);return o.delete(e),d;case JDt:if($D)return $D.call(e)==$D.call(t)}return!1}var WDt,qDt,jDt,UDt,HDt,YDt,XDt,KDt,QDt,ZDt,JDt,t6t,e6t,sJ,$D,aJ,oJ=b(()=>{"use strict";Cd();GR();Sd();PD();nJ();YC();WDt=1,qDt=2,jDt="[object Boolean]",UDt="[object Date]",HDt="[object Error]",YDt="[object Map]",XDt="[object Number]",KDt="[object RegExp]",QDt="[object Set]",ZDt="[object String]",JDt="[object Symbol]",t6t="[object ArrayBuffer]",e6t="[object DataView]",sJ=_n?_n.prototype:void 0,$D=sJ?sJ.valueOf:void 0;s(r6t,"equalByTag");aJ=r6t});function a6t(e,t,r,i,n,a){var o=r&i6t,l=z0(e),u=l.length,h=z0(t),d=h.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in t:s6t.call(t,p)))return!1}var m=a.get(e),g=a.get(t);if(m&&g)return m==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var x=o;++f{"use strict";LD();i6t=1,n6t=Object.prototype,s6t=n6t.hasOwnProperty;s(a6t,"equalObjects");lJ=a6t});function c6t(e,t,r,i,n,a){var o=fe(e),l=fe(t),u=o?hJ:Ca(e),h=l?hJ:Ca(t);u=u==uJ?XC:u,h=h==uJ?XC:h;var d=u==XC,f=h==XC,p=u==h;if(p&&Po(e)){if(!Po(t))return!1;o=!0,d=!1}if(p&&!d)return a||(a=new bl),o||Ru(e)?HC(e,t,r,i,n,a):aJ(e,t,u,r,i,n,a);if(!(r&o6t)){var m=d&&dJ.call(e,"__wrapped__"),g=f&&dJ.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,x=g?t.value():t;return a||(a=new bl),n(y,x,r,i,a)}}return p?(a||(a=new bl),lJ(e,t,r,i,n,a)):!1}var o6t,uJ,hJ,XC,l6t,dJ,fJ,pJ=b(()=>{"use strict";u0();PD();oJ();cJ();Vd();Si();lm();p0();o6t=1,uJ="[object Arguments]",hJ="[object Array]",XC="[object Object]",l6t=Object.prototype,dJ=l6t.hasOwnProperty;s(c6t,"baseIsEqualDeep");fJ=c6t});function mJ(e,t,r,i,n){return e===t?!0:e==null||t==null||!Ni(e)&&!Ni(t)?e!==e&&t!==t:fJ(e,t,r,i,mJ,n)}var KC,FD=b(()=>{"use strict";pJ();qa();s(mJ,"baseIsEqual");KC=mJ});function d6t(e,t,r,i){var n=r.length,a=n,o=!i;if(e==null)return!a;for(e=Object(e);n--;){var l=r[n];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++n{"use strict";u0();FD();u6t=1,h6t=2;s(d6t,"baseIsMatch");gJ=d6t});function f6t(e){return e===e&&!ii(e)}var QC,VD=b(()=>{"use strict";xa();s(f6t,"isStrictComparable");QC=f6t});function p6t(e){for(var t=Ar(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,QC(n)]}return t}var xJ,bJ=b(()=>{"use strict";VD();Rl();s(p6t,"getMatchData");xJ=p6t});function m6t(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var ZC,zD=b(()=>{"use strict";s(m6t,"matchesStrictComparable");ZC=m6t});function g6t(e){var t=xJ(e);return t.length==1&&t[0][2]?ZC(t[0][0],t[0][1]):function(r){return r===e||gJ(r,e,t)}}var kJ,TJ=b(()=>{"use strict";yJ();bJ();zD();s(g6t,"baseMatches");kJ=g6t});function y6t(e,t){return e!=null&&t in Object(e)}var CJ,SJ=b(()=>{"use strict";s(y6t,"baseHasIn");CJ=y6t});function x6t(e,t,r){t=Gu(t,e);for(var i=-1,n=t.length,a=!1;++i{"use strict";F0();am();Si();g0();ST();vm();s(x6t,"hasPath");JC=x6t});function b6t(e,t){return e!=null&&JC(e,t,CJ)}var tS,WD=b(()=>{"use strict";SJ();GD();s(b6t,"hasIn");tS=b6t});function C6t(e,t){return Em(e)&&QC(t)?ZC(Ll(e),t):function(r){var i=ZQ(r,e);return i===void 0&&i===t?tS(r,e):KC(t,i,k6t|T6t)}}var k6t,T6t,wJ,_J=b(()=>{"use strict";FD();JQ();WD();AC();VD();zD();vm();k6t=1,T6t=2;s(C6t,"baseMatchesProperty");wJ=C6t});function S6t(e){return function(t){return t?.[e]}}var eS,qD=b(()=>{"use strict";s(S6t,"baseProperty");eS=S6t});function w6t(e){return function(t){return Wu(t,e)}}var EJ,vJ=b(()=>{"use strict";V0();s(w6t,"basePropertyDeep");EJ=w6t});function _6t(e){return Em(e)?eS(Ll(e)):EJ(e)}var AJ,RJ=b(()=>{"use strict";qD();vJ();AC();vm();s(_6t,"property");AJ=_6t});function E6t(e){return typeof e=="function"?e:e==null?En:typeof e=="object"?fe(e)?wJ(e[0],e[1]):kJ(e):AJ(e)}var ti,Cs=b(()=>{"use strict";TJ();_J();Sc();Si();RJ();s(E6t,"baseIteratee");ti=E6t});function v6t(e,t,r,i){for(var n=-1,a=e==null?0:e.length;++n{"use strict";s(v6t,"arrayAggregator");LJ=v6t});function A6t(e,t){return e&&em(e,t,Ar)}var Mm,rS=b(()=>{"use strict";mT();Rl();s(A6t,"baseForOwn");Mm=A6t});function R6t(e,t){return function(r,i){if(r==null)return r;if(!Vi(r))return e(r,i);for(var n=r.length,a=t?n:-1,o=Object(r);(t?a--:++a{"use strict";ja();s(R6t,"createBaseEach");IJ=R6t});var L6t,Xs,ju=b(()=>{"use strict";rS();NJ();L6t=IJ(Mm),Xs=L6t});function D6t(e,t,r,i){return Xs(e,function(n,a,o){t(i,n,r(n),o)}),i}var OJ,MJ=b(()=>{"use strict";ju();s(D6t,"baseAggregator");OJ=D6t});function I6t(e,t){return function(r,i){var n=fe(r)?LJ:OJ,a=t?t():{};return n(r,e,ti(i,2),a)}}var BJ,PJ=b(()=>{"use strict";DJ();MJ();Cs();Si();s(I6t,"createAggregator");BJ=I6t});var N6t,iS,$J=b(()=>{"use strict";Ga();N6t=s(function(){return Fi.Date.now()},"now"),iS=N6t});var FJ,O6t,M6t,Uu,VJ=b(()=>{"use strict";um();Sd();Ad();Du();FJ=Object.prototype,O6t=FJ.hasOwnProperty,M6t=Sl(function(e,t){e=Object(e);var r=-1,i=t.length,n=i>2?t[2]:void 0;for(n&&ba(t[0],t[1],n)&&(i=1);++r{"use strict";s(B6t,"arrayIncludesWith");nS=B6t});function $6t(e,t,r,i){var n=-1,a=EC,o=!0,l=e.length,u=[],h=t.length;if(!l)return u;r&&(t=Ys(t,Ua(r))),i?(a=nS,o=!1):t.length>=P6t&&(a=Nm,o=!1,t=new Im(t));t:for(;++n{"use strict";qC();wD();jD();$d();Ed();UC();P6t=200;s($6t,"baseDifference");zJ=$6t});var F6t,Hu,WJ=b(()=>{"use strict";GJ();Rm();um();wT();F6t=Sl(function(e,t){return _d(e)?zJ(e,Dl(t,1,_d,!0)):[]}),Hu=F6t});function V6t(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var An,qJ=b(()=>{"use strict";s(V6t,"last");An=V6t});function z6t(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===void 0?1:Al(t),IC(e,t<0?0:t,i)):[]}var ji,jJ=b(()=>{"use strict";ED();Sm();s(z6t,"drop");ji=z6t});function G6t(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===void 0?1:Al(t),t=i-t,IC(e,0,t<0?0:t)):[]}var Dc,UJ=b(()=>{"use strict";ED();Sm();s(G6t,"dropRight");Dc=G6t});function W6t(e){return typeof e=="function"?e:En}var Bm,sS=b(()=>{"use strict";Sc();s(W6t,"castFunction");Bm=W6t});function q6t(e,t){var r=fe(e)?SC:Xs;return r(e,Bm(t))}var ct,aS=b(()=>{"use strict";CD();ju();sS();Si();s(q6t,"forEach");ct=q6t});var HJ=b(()=>{"use strict";aS()});function j6t(e,t){for(var r=-1,i=e==null?0:e.length;++r{"use strict";s(j6t,"arrayEvery");YJ=j6t});function U6t(e,t){var r=!0;return Xs(e,function(i,n,a){return r=!!t(i,n,a),r}),r}var KJ,QJ=b(()=>{"use strict";ju();s(U6t,"baseEvery");KJ=U6t});function H6t(e,t,r){var i=fe(e)?YJ:KJ;return r&&ba(e,t,r)&&(t=void 0),i(e,ti(t,3))}var rs,ZJ=b(()=>{"use strict";XJ();QJ();Cs();Si();Ad();s(H6t,"every");rs=H6t});function Y6t(e,t){var r=[];return Xs(e,function(i,n,a){t(i,n,a)&&r.push(i)}),r}var oS,UD=b(()=>{"use strict";ju();s(Y6t,"baseFilter");oS=Y6t});function X6t(e,t){var r=fe(e)?Lm:oS;return r(e,ti(t,3))}var Or,HD=b(()=>{"use strict";NC();UD();Cs();Si();s(X6t,"filter");Or=X6t});function K6t(e){return function(t,r,i){var n=Object(t);if(!Vi(t)){var a=ti(r,3);t=Ar(t),r=s(function(l){return a(n[l],l,n)},"predicate")}var o=e(t,r,i);return o>-1?n[a?t[o]:o]:void 0}}var JJ,ttt=b(()=>{"use strict";Cs();ja();Rl();s(K6t,"createFind");JJ=K6t});function Z6t(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:Al(r);return n<0&&(n=Q6t(i+n,0)),wC(e,ti(t,3),n)}var Q6t,ett,rtt=b(()=>{"use strict";SD();Cs();Sm();Q6t=Math.max;s(Z6t,"findIndex");ett=Z6t});var J6t,Ss,itt=b(()=>{"use strict";ttt();rtt();J6t=JJ(ett),Ss=J6t});function tIt(e){return e&&e.length?e[0]:void 0}var Rn,ntt=b(()=>{"use strict";s(tIt,"head");Rn=tIt});var stt=b(()=>{"use strict";ntt()});function eIt(e,t){var r=-1,i=Vi(e)?Array(e.length):[];return Xs(e,function(n,a,o){i[++r]=t(n,a,o)}),i}var lS,YD=b(()=>{"use strict";ju();ja();s(eIt,"baseMap");lS=eIt});function rIt(e,t){var r=fe(e)?Ys:lS;return r(e,ti(t,3))}var jt,Pm=b(()=>{"use strict";$d();Cs();YD();Si();s(rIt,"map");jt=rIt});function iIt(e,t){return Dl(jt(e,t),1)}var qn,XD=b(()=>{"use strict";Rm();Pm();s(iIt,"flatMap");qn=iIt});function nIt(e,t){return e==null?e:em(e,Bm(t),Vs)}var KD,att=b(()=>{"use strict";mT();sS();Du();s(nIt,"forIn");KD=nIt});function sIt(e,t){return e&&Mm(e,Bm(t))}var QD,ott=b(()=>{"use strict";rS();sS();s(sIt,"forOwn");QD=sIt});var aIt,oIt,lIt,ZD,ltt=b(()=>{"use strict";tm();PJ();aIt=Object.prototype,oIt=aIt.hasOwnProperty,lIt=BJ(function(e,t,r){oIt.call(e,r)?e[r].push(t):kl(e,r,[t])}),ZD=lIt});function cIt(e,t){return e>t}var ctt,utt=b(()=>{"use strict";s(cIt,"baseGt");ctt=cIt});function dIt(e,t){return e!=null&&hIt.call(e,t)}var uIt,hIt,htt,dtt=b(()=>{"use strict";uIt=Object.prototype,hIt=uIt.hasOwnProperty;s(dIt,"baseHas");htt=dIt});function fIt(e,t){return e!=null&&JC(e,t,htt)}var pe,ftt=b(()=>{"use strict";dtt();GD();s(fIt,"has");pe=fIt});function mIt(e){return typeof e=="string"||!fe(e)&&Ni(e)&&Vn(e)==pIt}var pIt,Ui,cS=b(()=>{"use strict";kc();Si();qa();pIt="[object String]";s(mIt,"isString");Ui=mIt});function gIt(e,t){return Ys(t,function(r){return e[r]})}var ptt,mtt=b(()=>{"use strict";$d();s(gIt,"baseValues");ptt=gIt});function yIt(e){return e==null?[]:ptt(e,Ar(e))}var cr,JD=b(()=>{"use strict";mtt();Rl();s(yIt,"values");cr=yIt});function bIt(e,t,r,i){e=Vi(e)?e:cr(e),r=r&&!i?Al(r):0;var n=e.length;return r<0&&(r=xIt(n+r,0)),Ui(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&wm(e,t,r)>-1}var xIt,_i,gtt=b(()=>{"use strict";_C();ja();cS();Sm();JD();xIt=Math.max;s(bIt,"includes");_i=bIt});function TIt(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:Al(r);return n<0&&(n=kIt(i+n,0)),wm(e,t,n)}var kIt,uS,ytt=b(()=>{"use strict";_C();Sm();kIt=Math.max;s(TIt,"indexOf");uS=TIt});function EIt(e){if(e==null)return!0;if(Vi(e)&&(fe(e)||typeof e=="string"||typeof e.splice=="function"||Po(e)||Ru(e)||Bo(e)))return!e.length;var t=Ca(e);if(t==CIt||t==SIt)return!e.size;if(Tl(e))return!_m(e).length;for(var r in e)if(_It.call(e,r))return!1;return!0}var CIt,SIt,wIt,_It,qe,hS=b(()=>{"use strict";vC();Vd();am();Si();ja();lm();sm();p0();CIt="[object Map]",SIt="[object Set]",wIt=Object.prototype,_It=wIt.hasOwnProperty;s(EIt,"isEmpty");qe=EIt});function AIt(e){return Ni(e)&&Vn(e)==vIt}var vIt,xtt,btt=b(()=>{"use strict";kc();qa();vIt="[object RegExp]";s(AIt,"baseIsRegExp");xtt=AIt});var ktt,RIt,Za,Ttt=b(()=>{"use strict";btt();Ed();f0();ktt=Ha&&Ha.isRegExp,RIt=ktt?Ua(ktt):xtt,Za=RIt});function LIt(e){return e===void 0}var rr,Ctt=b(()=>{"use strict";s(LIt,"isUndefined");rr=LIt});function DIt(e,t){return e{"use strict";s(DIt,"baseLt");dS=DIt});function IIt(e,t){var r={};return t=ti(t,3),Mm(e,function(i,n,a){kl(r,n,t(i,n,a))}),r}var zd,Stt=b(()=>{"use strict";tm();rS();Cs();s(IIt,"mapValues");zd=IIt});function NIt(e,t,r){for(var i=-1,n=e.length;++i{"use strict";Pd();s(NIt,"baseExtremum");$m=NIt});function OIt(e){return e&&e.length?$m(e,En,ctt):void 0}var Ks,wtt=b(()=>{"use strict";fS();utt();Sc();s(OIt,"max");Ks=OIt});function MIt(e){return e&&e.length?$m(e,En,dS):void 0}var Vo,e6=b(()=>{"use strict";fS();t6();Sc();s(MIt,"min");Vo=MIt});function BIt(e,t){return e&&e.length?$m(e,ti(t,2),dS):void 0}var Gd,_tt=b(()=>{"use strict";fS();Cs();t6();s(BIt,"minBy");Gd=BIt});function $It(e){if(typeof e!="function")throw new TypeError(PIt);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 PIt,Ett,vtt=b(()=>{"use strict";PIt="Expected a function";s($It,"negate");Ett=$It});function FIt(e,t,r,i){if(!ii(e))return e;t=Gu(t,e);for(var n=-1,a=t.length,o=a-1,l=e;l!=null&&++n{"use strict";cm();F0();g0();xa();vm();s(FIt,"baseSet");Att=FIt});function VIt(e,t,r){for(var i=-1,n=t.length,a={};++i{"use strict";V0();Rtt();F0();s(VIt,"basePickBy");pS=VIt});function zIt(e,t){if(e==null)return{};var r=Ys($C(e),function(i){return[i]});return t=ti(t),pS(e,r,function(i,n){return t(i,n[0])})}var Qs,Ltt=b(()=>{"use strict";$d();Cs();r6();DD();s(zIt,"pickBy");Qs=zIt});function GIt(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Dtt,Itt=b(()=>{"use strict";s(GIt,"baseSortBy");Dtt=GIt});function WIt(e,t){if(e!==t){var r=e!==void 0,i=e===null,n=e===e,a=Ta(e),o=t!==void 0,l=t===null,u=t===t,h=Ta(t);if(!l&&!h&&!a&&e>t||a&&o&&u&&!l&&!h||i&&o&&u||!r&&u||!n)return 1;if(!i&&!a&&!h&&e{"use strict";Pd();s(WIt,"compareAscending");Ntt=WIt});function qIt(e,t,r){for(var i=-1,n=e.criteria,a=t.criteria,o=n.length,l=r.length;++i=l)return u;var h=r[i];return u*(h=="desc"?-1:1)}}return e.index-t.index}var Mtt,Btt=b(()=>{"use strict";Ott();s(qIt,"compareMultiple");Mtt=qIt});function jIt(e,t,r){t.length?t=Ys(t,function(a){return fe(a)?function(o){return Wu(o,a.length===1?a[0]:a)}:a}):t=[En];var i=-1;t=Ys(t,Ua(ti));var n=lS(e,function(a,o,l){var u=Ys(t,function(h){return h(a)});return{criteria:u,index:++i,value:a}});return Dtt(n,function(a,o){return Mtt(a,o,r)})}var Ptt,$tt=b(()=>{"use strict";$d();V0();Cs();YD();Itt();Ed();Btt();Sc();Si();s(jIt,"baseOrderBy");Ptt=jIt});var UIt,Ftt,Vtt=b(()=>{"use strict";qD();UIt=eS("length"),Ftt=UIt});function nNt(e){for(var t=ztt.lastIndex=0;ztt.test(e);)++t;return t}var Gtt,HIt,YIt,XIt,KIt,QIt,ZIt,i6,n6,JIt,Wtt,qtt,jtt,tNt,Utt,Htt,eNt,rNt,iNt,ztt,Ytt,Xtt=b(()=>{"use strict";Gtt="\\ud800-\\udfff",HIt="\\u0300-\\u036f",YIt="\\ufe20-\\ufe2f",XIt="\\u20d0-\\u20ff",KIt=HIt+YIt+XIt,QIt="\\ufe0e\\ufe0f",ZIt="["+Gtt+"]",i6="["+KIt+"]",n6="\\ud83c[\\udffb-\\udfff]",JIt="(?:"+i6+"|"+n6+")",Wtt="[^"+Gtt+"]",qtt="(?:\\ud83c[\\udde6-\\uddff]){2}",jtt="[\\ud800-\\udbff][\\udc00-\\udfff]",tNt="\\u200d",Utt=JIt+"?",Htt="["+QIt+"]?",eNt="(?:"+tNt+"(?:"+[Wtt,qtt,jtt].join("|")+")"+Htt+Utt+")*",rNt=Htt+Utt+eNt,iNt="(?:"+[Wtt+i6+"?",i6,qtt,jtt,ZIt].join("|")+")",ztt=RegExp(n6+"(?="+n6+")|"+iNt+rNt,"g");s(nNt,"unicodeSize");Ytt=nNt});function sNt(e){return aZ(e)?Ytt(e):Ftt(e)}var Ktt,Qtt=b(()=>{"use strict";Vtt();oZ();Xtt();s(sNt,"stringSize");Ktt=sNt});function aNt(e,t){return pS(e,t,function(r,i){return tS(e,i)})}var Ztt,Jtt=b(()=>{"use strict";r6();WD();s(aNt,"basePick");Ztt=aNt});var oNt,Wd,tet=b(()=>{"use strict";Jtt();sZ();oNt=nZ(function(e,t){return e==null?{}:Ztt(e,t)}),Wd=oNt});function uNt(e,t,r,i){for(var n=-1,a=cNt(lNt((t-e)/(r||1)),0),o=Array(a);a--;)o[i?a:++n]=e,e+=r;return o}var lNt,cNt,eet,ret=b(()=>{"use strict";lNt=Math.ceil,cNt=Math.max;s(uNt,"baseRange");eet=uNt});function hNt(e){return function(t,r,i){return i&&typeof i!="number"&&ba(t,r,i)&&(r=i=void 0),t=Cm(t),r===void 0?(r=t,t=0):r=Cm(r),i=i===void 0?t{"use strict";ret();Ad();kD();s(hNt,"createRange");iet=hNt});var dNt,Ja,set=b(()=>{"use strict";net();dNt=iet(),Ja=dNt});function fNt(e,t,r,i,n){return n(e,function(a,o,l){r=i?(i=!1,a):t(r,a,o,l)}),r}var aet,oet=b(()=>{"use strict";s(fNt,"baseReduce");aet=fNt});function pNt(e,t,r){var i=fe(e)?lZ:aet,n=arguments.length<3;return i(e,ti(t,4),r,n,Xs)}var Mr,s6=b(()=>{"use strict";cZ();ju();Cs();oet();Si();s(pNt,"reduce");Mr=pNt});function mNt(e,t){var r=fe(e)?Lm:oS;return r(e,Ett(ti(t,3)))}var Yu,cet=b(()=>{"use strict";NC();UD();Cs();Si();vtt();s(mNt,"reject");Yu=mNt});function xNt(e){if(e==null)return 0;if(Vi(e))return Ui(e)?Ktt(e):e.length;var t=Ca(e);return t==gNt||t==yNt?e.size:_m(e).length}var gNt,yNt,a6,uet=b(()=>{"use strict";vC();Vd();ja();cS();Qtt();gNt="[object Map]",yNt="[object Set]";s(xNt,"size");a6=xNt});function bNt(e,t){var r;return Xs(e,function(i,n,a){return r=t(i,n,a),!r}),!!r}var het,det=b(()=>{"use strict";ju();s(bNt,"baseSome");het=bNt});function kNt(e,t,r){var i=fe(e)?jC:het;return r&&ba(e,t,r)&&(t=void 0),i(e,ti(t,3))}var G0,fet=b(()=>{"use strict";BD();Cs();det();Si();Ad();s(kNt,"some");G0=kNt});var TNt,Nl,pet=b(()=>{"use strict";Rm();$tt();um();Ad();TNt=Sl(function(e,t){if(e==null)return[];var r=t.length;return r>1&&ba(e,t[0],t[1])?t=[]:r>2&&ba(t[0],t[1],t[2])&&(t=[t[0]]),Ptt(e,Dl(t,1),[])}),Nl=TNt});var CNt,SNt,met,get=b(()=>{"use strict";ID();TD();YC();CNt=1/0,SNt=qu&&1/Om(new qu([,-0]))[1]==CNt?function(e){return new qu(e)}:Oi,met=SNt});function _Nt(e,t,r){var i=-1,n=EC,a=e.length,o=!0,l=[],u=l;if(r)o=!1,n=nS;else if(a>=wNt){var h=t?null:met(e);if(h)return Om(h);o=!1,n=Nm,u=new Im}else u=t?[]:l;t:for(;++i{"use strict";qC();wD();jD();UC();get();YC();wNt=200;s(_Nt,"baseUniq");Fm=_Nt});var ENt,o6,yet=b(()=>{"use strict";Rm();um();mS();wT();ENt=Sl(function(e){return Fm(Dl(e,1,_d,!0))}),o6=ENt});function vNt(e){return e&&e.length?Fm(e):[]}var Vm,xet=b(()=>{"use strict";mS();s(vNt,"uniq");Vm=vNt});function ANt(e,t){return e&&e.length?Fm(e,ti(t,2)):[]}var bet,ket=b(()=>{"use strict";Cs();mS();s(ANt,"uniqBy");bet=ANt});function LNt(e){var t=++RNt;return RC(e)+t}var RNt,qd,Tet=b(()=>{"use strict";_D();RNt=0;s(LNt,"uniqueId");qd=LNt});function DNt(e,t,r){for(var i=-1,n=e.length,a=t.length,o={};++i{"use strict";s(DNt,"baseZipObject");Cet=DNt});function INt(e,t){return Cet(e||[],t||[],Cl)}var gS,_et=b(()=>{"use strict";cm();wet();s(INt,"zipObject");gS=INt});var Ee=b(()=>{"use strict";HQ();OD();QZ();ZZ();ZR();VJ();WJ();jJ();UJ();HJ();ZJ();HD();itt();stt();XD();DC();aS();att();ott();ltt();ftt();Sc();gtt();ytt();Si();hS();s0();xa();Ttt();cS();Ctt();Rl();qJ();Pm();Stt();wtt();eL();e6();_tt();TD();$J();tet();Ltt();set();s6();cet();uet();fet();pet();yet();xet();Tet();JD();_et();});function vet(e,t){e[t]?e[t]++:e[t]=1}function Aet(e,t){--e[t]||delete e[t]}function W0(e,t,r,i){var n=""+t,a=""+r;if(!e&&n>a){var o=n;n=a,a=o}return n+Eet+a+Eet+(rr(i)?NNt:i)}function ONt(e,t,r,i){var n=""+t,a=""+r;if(!e&&n>a){var o=n;n=a,a=o}var l={v:n,w:a};return i&&(l.name=i),l}function l6(e,t){return W0(e,t.v,t.w,t.name)}var NNt,jd,Eet,Ur,yS=b(()=>{"use strict";Ee();NNt="\0",jd="\0",Eet="",Ur=class{static{s(this,"Graph")}constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=zs(void 0),this._defaultEdgeLabelFn=zs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[jd]={}),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 en(t)||(t=zs(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Ar(this._nodes)}sources(){var t=this;return Or(this.nodes(),function(r){return qe(t._in[r])})}sinks(){var t=this;return Or(this.nodes(),function(r){return qe(t._out[r])})}setNodes(t,r){var i=arguments,n=this;return ct(t,function(a){i.length>1?n.setNode(a,r):n.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=jd,this._children[t]={},this._children[jd][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=s(i=>this.removeEdge(this._edgeObjs[i]),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ct(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),ct(Ar(this._in[t]),r),delete this._in[t],delete this._preds[t],ct(Ar(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(rr(r))r=jd;else{r+="";for(var i=r;!rr(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==jd)return r}}children(t){if(rr(t)&&(t=jd),this._isCompound){var r=this._children[t];if(r)return Ar(r)}else{if(t===jd)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Ar(r)}successors(t){var r=this._sucs[t];if(r)return Ar(r)}neighbors(t){var r=this.predecessors(t);if(r)return o6(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;ct(this._nodes,function(o,l){t(l)&&r.setNode(l,o)}),ct(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,i.edge(o))});var n={};function a(o){var l=i.parent(o);return l===void 0||r.hasNode(l)?(n[o]=l,l):l in n?n[l]:a(l)}return s(a,"findParent"),this._isCompound&&ct(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return en(t)||(t=zs(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return cr(this._edgeObjs)}setPath(t,r){var i=this,n=arguments;return Mr(t,function(a,o){return n.length>1?i.setEdge(a,o,r):i.setEdge(a,o),o}),this}setEdge(){var t,r,i,n,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,i=o.name,arguments.length===2&&(n=arguments[1],a=!0)):(t=o,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],a=!0)),t=""+t,r=""+r,rr(i)||(i=""+i);var l=W0(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,l))return a&&(this._edgeLabels[l]=n),this;if(!rr(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[l]=a?n:this._defaultEdgeLabelFn(t,r,i);var u=ONt(this._isDirected,t,r,i);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,vet(this._preds[r],t),vet(this._sucs[t],r),this._in[r][l]=u,this._out[t][l]=u,this._edgeCount++,this}edge(t,r,i){var n=arguments.length===1?l6(this._isDirected,arguments[0]):W0(this._isDirected,t,r,i);return this._edgeLabels[n]}hasEdge(t,r,i){var n=arguments.length===1?l6(this._isDirected,arguments[0]):W0(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(t,r,i){var n=arguments.length===1?l6(this._isDirected,arguments[0]):W0(this._isDirected,t,r,i),a=this._edgeObjs[n];return a&&(t=a.v,r=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Aet(this._preds[r],t),Aet(this._sucs[t],r),delete this._in[r][n],delete this._out[t][n],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var n=cr(i);return r?Or(n,function(a){return a.v===r}):n}}outEdges(t,r){var i=this._out[t];if(i){var n=cr(i);return r?Or(n,function(a){return a.w===r}):n}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}};Ur.prototype._nodeCount=0;Ur.prototype._edgeCount=0;s(vet,"incrementOrInitEntry");s(Aet,"decrementOrRemoveEntry");s(W0,"edgeArgsToId");s(ONt,"edgeArgsToObj");s(l6,"edgeObjToId")});var to=b(()=>{"use strict";yS()});function Ret(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function MNt(e,t){if(e!=="_next"&&e!=="_prev")return t}var bS,Let=b(()=>{"use strict";bS=class{static{s(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return Ret(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&Ret(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,i=r._prev;i!==r;)t.push(JSON.stringify(i,MNt)),i=i._prev;return"["+t.join(", ")+"]"}};s(Ret,"unlink");s(MNt,"filterOutLinks")});function Det(e,t){if(e.nodeCount()<=1)return[];var r=$Nt(e,t||BNt),i=PNt(r.graph,r.buckets,r.zeroIdx);return Nr(jt(i,function(n){return e.outEdges(n.v,n.w)}))}function PNt(e,t,r){for(var i=[],n=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)c6(e,t,r,o);for(;o=n.dequeue();)c6(e,t,r,o);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(o=t[l].dequeue(),o){i=i.concat(c6(e,t,r,o,!0));break}}}return i}function c6(e,t,r,i,n){var a=n?[]:void 0;return ct(e.inEdges(i.v),function(o){var l=e.edge(o),u=e.node(o.v);n&&a.push({v:o.v,w:o.w}),u.out-=l,u6(t,r,u)}),ct(e.outEdges(i.v),function(o){var l=e.edge(o),u=o.w,h=e.node(u);h.in-=l,u6(t,r,h)}),e.removeNode(i.v),a}function $Nt(e,t){var r=new Ur,i=0,n=0;ct(e.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),ct(e.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=t(l),d=u+h;r.setEdge(l.v,l.w,d),n=Math.max(n,r.node(l.v).out+=h),i=Math.max(i,r.node(l.w).in+=h)});var a=Ja(n+i+3).map(function(){return new bS}),o=i+1;return ct(r.nodes(),function(l){u6(a,o,r.node(l))}),{graph:r,buckets:a,zeroIdx:o}}function u6(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var BNt,Iet=b(()=>{"use strict";Ee();to();Let();BNt=zs(1);s(Det,"greedyFAS");s(PNt,"doGreedyFAS");s(c6,"removeNode");s($Nt,"buildState");s(u6,"assignBucket")});function Net(e){var t=e.graph().acyclicer==="greedy"?Det(e,r(e)):FNt(e);ct(t,function(i){var n=e.edge(i);e.removeEdge(i),n.forwardName=i.name,n.reversed=!0,e.setEdge(i.w,i.v,n,qd("rev"))});function r(i){return function(n){return i.edge(n).weight}}s(r,"weightFn")}function FNt(e){var t=[],r={},i={};function n(a){Object.prototype.hasOwnProperty.call(i,a)||(i[a]=!0,r[a]=!0,ct(e.outEdges(a),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?t.push(o):n(o.w)}),delete r[a])}return s(n,"dfs"),ct(e.nodes(),n),t}function Oet(e){ct(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var i=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,i)}})}var h6=b(()=>{"use strict";Ee();Iet();s(Net,"run");s(FNt,"dfsFAS");s(Oet,"undo")});function Ol(e,t,r,i){var n;do n=qd(i);while(e.hasNode(n));return r.dummy=t,e.setNode(n,r),n}function Bet(e){var t=new Ur().setGraph(e.graph());return ct(e.nodes(),function(r){t.setNode(r,e.node(r))}),ct(e.edges(),function(r){var i=t.edge(r.v,r.w)||{weight:0,minlen:1},n=e.edge(r);t.setEdge(r.v,r.w,{weight:i.weight+n.weight,minlen:Math.max(i.minlen,n.minlen)})}),t}function kS(e){var t=new Ur({multigraph:e.isMultigraph()}).setGraph(e.graph());return ct(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),ct(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function d6(e,t){var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,l=e.height/2;if(!n&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*o>Math.abs(n)*l?(a<0&&(l=-l),u=l*n/a,h=l):(n<0&&(o=-o),u=o,h=o*a/n),{x:r+u,y:i+h}}function Xu(e){var t=jt(Ja(p6(e)+1),function(){return[]});return ct(e.nodes(),function(r){var i=e.node(r),n=i.rank;rr(n)||(t[n][i.order]=r)}),t}function Pet(e){var t=Vo(jt(e.nodes(),function(r){return e.node(r).rank}));ct(e.nodes(),function(r){var i=e.node(r);pe(i,"rank")&&(i.rank-=t)})}function $et(e){var t=Vo(jt(e.nodes(),function(a){return e.node(a).rank})),r=[];ct(e.nodes(),function(a){var o=e.node(a).rank-t;r[o]||(r[o]=[]),r[o].push(a)});var i=0,n=e.graph().nodeRankFactor;ct(r,function(a,o){rr(a)&&o%n!==0?--i:i&&ct(a,function(l){e.node(l).rank+=i})})}function f6(e,t,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),Ol(e,"border",n,t)}function p6(e){return Ks(jt(e.nodes(),function(t){var r=e.node(t).rank;if(!rr(r))return r}))}function Fet(e,t){var r={lhs:[],rhs:[]};return ct(e,function(i){t(i)?r.lhs.push(i):r.rhs.push(i)}),r}function Vet(e,t){var r=iS();try{return t()}finally{console.log(e+" time: "+(iS()-r)+"ms")}}function zet(e,t){return t()}var Ml=b(()=>{"use strict";Ee();to();s(Ol,"addDummyNode");s(Bet,"simplify");s(kS,"asNonCompoundGraph");s(d6,"intersectRect");s(Xu,"buildLayerMatrix");s(Pet,"normalizeRanks");s($et,"removeEmptyRanks");s(f6,"addBorderNode");s(p6,"maxRank");s(Fet,"partition");s(Vet,"time");s(zet,"notime")});function Wet(e){function t(r){var i=e.children(r),n=e.node(r);if(i.length&&ct(i,t),Object.prototype.hasOwnProperty.call(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var a=n.minRank,o=n.maxRank+1;a{"use strict";Ee();Ml();s(Wet,"addBorderSegments");s(Get,"addBorderNode")});function Uet(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Yet(e)}function Het(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&VNt(e),(t==="lr"||t==="rl")&&(zNt(e),Yet(e))}function Yet(e){ct(e.nodes(),function(t){jet(e.node(t))}),ct(e.edges(),function(t){jet(e.edge(t))})}function jet(e){var t=e.width;e.width=e.height,e.height=t}function VNt(e){ct(e.nodes(),function(t){m6(e.node(t))}),ct(e.edges(),function(t){var r=e.edge(t);ct(r.points,m6),Object.prototype.hasOwnProperty.call(r,"y")&&m6(r)})}function m6(e){e.y=-e.y}function zNt(e){ct(e.nodes(),function(t){g6(e.node(t))}),ct(e.edges(),function(t){var r=e.edge(t);ct(r.points,g6),Object.prototype.hasOwnProperty.call(r,"x")&&g6(r)})}function g6(e){var t=e.x;e.x=e.y,e.y=t}var Xet=b(()=>{"use strict";Ee();s(Uet,"adjust");s(Het,"undo");s(Yet,"swapWidthHeight");s(jet,"swapWidthHeightOne");s(VNt,"reverseY");s(m6,"reverseYOne");s(zNt,"swapXY");s(g6,"swapXYOne")});function Ket(e){e.graph().dummyChains=[],ct(e.edges(),function(t){WNt(e,t)})}function WNt(e,t){var r=t.v,i=e.node(r).rank,n=t.w,a=e.node(n).rank,o=t.name,l=e.edge(t),u=l.labelRank;if(a!==i+1){e.removeEdge(t);var h=void 0,d,f;for(f=0,++i;i{"use strict";Ee();Ml();s(Ket,"run");s(WNt,"normalizeEdge");s(Qet,"undo")});function q0(e){var t={};function r(i){var n=e.node(i);if(Object.prototype.hasOwnProperty.call(t,i))return n.rank;t[i]=!0;var a=Vo(jt(e.outEdges(i),function(o){return r(o.w)-e.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),n.rank=a}s(r,"dfs"),ct(e.sources(),r)}function Ud(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var TS=b(()=>{"use strict";Ee();s(q0,"longestPath");s(Ud,"slack")});function CS(e){var t=new Ur({directed:!1}),r=e.nodes()[0],i=e.nodeCount();t.setNode(r,{});for(var n,a;qNt(t,e){"use strict";Ee();to();TS();s(CS,"feasibleTree");s(qNt,"tightTree");s(jNt,"findMinSlackEdge");s(UNt,"shiftRanks")});var Jet=b(()=>{"use strict"});var b6=b(()=>{"use strict"});var H9e,k6=b(()=>{"use strict";Ee();b6();H9e=zs(1)});var trt=b(()=>{"use strict";k6()});var T6=b(()=>{"use strict"});var ert=b(()=>{"use strict";T6()});var nFe,rrt=b(()=>{"use strict";Ee();nFe=zs(1)});function C6(e){var t={},r={},i=[];function n(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new j0;Object.prototype.hasOwnProperty.call(t,a)||(r[a]=!0,t[a]=!0,ct(e.predecessors(a),n),delete r[a],i.push(a))}if(s(n,"visit"),ct(e.sinks(),n),a6(t)!==e.nodeCount())throw new j0;return i}function j0(){}var S6=b(()=>{"use strict";Ee();C6.CycleException=j0;s(C6,"topsort");s(j0,"CycleException");j0.prototype=new Error});var irt=b(()=>{"use strict";S6()});function SS(e,t,r){fe(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),n=[],a={};return ct(t,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);nrt(e,o,r==="post",a,i,n)}),n}function nrt(e,t,r,i,n,a){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,r||a.push(t),ct(n(t),function(o){nrt(e,o,r,i,n,a)}),r&&a.push(t))}var w6=b(()=>{"use strict";Ee();s(SS,"dfs");s(nrt,"doDfs")});function _6(e,t){return SS(e,t,"post")}var srt=b(()=>{"use strict";w6();s(_6,"postorder")});function E6(e,t){return SS(e,t,"pre")}var art=b(()=>{"use strict";w6();s(E6,"preorder")});var ort=b(()=>{"use strict";b6();yS()});var lrt=b(()=>{"use strict";Jet();k6();trt();ert();rrt();irt();srt();art();ort();T6();S6()});function Qu(e){e=Bet(e),q0(e);var t=CS(e);A6(t),v6(t,e);for(var r,i;r=drt(t);)i=frt(t,e,r),prt(t,e,r,i)}function v6(e,t){var r=_6(e,e.nodes());r=r.slice(0,r.length-1),ct(r,function(i){QNt(e,t,i)})}function QNt(e,t,r){var i=e.node(r),n=i.parent;e.edge(r,n).cutvalue=urt(e,t,r)}function urt(e,t,r){var i=e.node(r),n=i.parent,a=!0,o=t.edge(r,n),l=0;return o||(a=!1,o=t.edge(n,r)),l=o.weight,ct(t.nodeEdges(r),function(u){var h=u.v===r,d=h?u.w:u.v;if(d!==n){var f=h===a,p=t.edge(u).weight;if(l+=f?p:-p,JNt(e,r,d)){var m=e.edge(r,d).cutvalue;l+=f?-m:m}}}),l}function A6(e,t){arguments.length<2&&(t=e.nodes()[0]),hrt(e,{},1,t)}function hrt(e,t,r,i,n){var a=r,o=e.node(i);return t[i]=!0,ct(e.neighbors(i),function(l){Object.prototype.hasOwnProperty.call(t,l)||(r=hrt(e,t,r,l,i))}),o.low=a,o.lim=r++,n?o.parent=n:delete o.parent,r}function drt(e){return Ss(e.edges(),function(t){return e.edge(t).cutvalue<0})}function frt(e,t,r){var i=r.v,n=r.w;t.hasEdge(i,n)||(i=r.w,n=r.v);var a=e.node(i),o=e.node(n),l=a,u=!1;a.lim>o.lim&&(l=o,u=!0);var h=Or(t.edges(),function(d){return u===crt(e,e.node(d.v),l)&&u!==crt(e,e.node(d.w),l)});return Gd(h,function(d){return Ud(t,d)})}function prt(e,t,r,i){var n=r.v,a=r.w;e.removeEdge(n,a),e.setEdge(i.v,i.w,{}),A6(e),v6(e,t),ZNt(e,t)}function ZNt(e,t){var r=Ss(e.nodes(),function(n){return!t.node(n).parent}),i=E6(e,r);i=i.slice(1),ct(i,function(n){var a=e.node(n).parent,o=t.edge(n,a),l=!1;o||(o=t.edge(a,n),l=!0),t.node(n).rank=t.node(a).rank+(l?o.minlen:-o.minlen)})}function JNt(e,t,r){return e.hasEdge(t,r)}function crt(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var mrt=b(()=>{"use strict";Ee();lrt();Ml();x6();TS();Qu.initLowLimValues=A6;Qu.initCutValues=v6;Qu.calcCutValue=urt;Qu.leaveEdge=drt;Qu.enterEdge=frt;Qu.exchangeEdges=prt;s(Qu,"networkSimplex");s(v6,"initCutValues");s(QNt,"assignCutValue");s(urt,"calcCutValue");s(A6,"initLowLimValues");s(hrt,"dfsAssignLowLim");s(drt,"leaveEdge");s(frt,"enterEdge");s(prt,"exchangeEdges");s(ZNt,"updateRanks");s(JNt,"isTreeEdge");s(crt,"isDescendant")});function R6(e){switch(e.graph().ranker){case"network-simplex":grt(e);break;case"tight-tree":eOt(e);break;case"longest-path":tOt(e);break;default:grt(e)}}function eOt(e){q0(e),CS(e)}function grt(e){Qu(e)}var tOt,L6=b(()=>{"use strict";x6();mrt();TS();s(R6,"rank");tOt=q0;s(eOt,"tightTreeRanker");s(grt,"networkSimplexRanker")});function yrt(e){var t=Ol(e,"root",{},"_root"),r=rOt(e),i=Ks(cr(r))-1,n=2*i+1;e.graph().nestingRoot=t,ct(e.edges(),function(o){e.edge(o).minlen*=n});var a=iOt(e)+1;ct(e.children(),function(o){xrt(e,t,n,a,i,r,o)}),e.graph().nodeRankFactor=n}function xrt(e,t,r,i,n,a,o){var l=e.children(o);if(!l.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:r});return}var u=f6(e,"_bt"),h=f6(e,"_bb"),d=e.node(o);e.setParent(u,o),d.borderTop=u,e.setParent(h,o),d.borderBottom=h,ct(l,function(f){xrt(e,t,r,i,n,a,f);var p=e.node(f),m=p.borderTop?p.borderTop:f,g=p.borderBottom?p.borderBottom:f,y=p.borderTop?i:2*i,x=m!==g?1:n-a[o]+1;e.setEdge(u,m,{weight:y,minlen:x,nestingEdge:!0}),e.setEdge(g,h,{weight:y,minlen:x,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,u,{weight:0,minlen:n+a[o]})}function rOt(e){var t={};function r(i,n){var a=e.children(i);a&&a.length&&ct(a,function(o){r(o,n+1)}),t[i]=n}return s(r,"dfs"),ct(e.children(),function(i){r(i,1)}),t}function iOt(e){return Mr(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function brt(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,ct(e.edges(),function(r){var i=e.edge(r);i.nestingEdge&&e.removeEdge(r)})}var krt=b(()=>{"use strict";Ee();Ml();s(yrt,"run");s(xrt,"dfs");s(rOt,"treeDepths");s(iOt,"sumWeights");s(brt,"cleanup")});function Trt(e,t,r){var i={},n;ct(r,function(a){for(var o=e.parent(a),l,u;o;){if(l=e.parent(o),l?(u=i[l],i[l]=o):(u=n,n=o),u&&u!==o){t.setEdge(u,o);return}o=l}})}var Crt=b(()=>{"use strict";Ee();s(Trt,"addSubgraphConstraints")});function Srt(e,t,r){var i=sOt(e),n=new Ur({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(a){return e.node(a)});return ct(e.nodes(),function(a){var o=e.node(a),l=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(n.setNode(a),n.setParent(a,l||i),ct(e[r](a),function(u){var h=u.v===a?u.w:u.v,d=n.edge(h,a),f=rr(d)?0:d.weight;n.setEdge(h,a,{weight:e.edge(u).weight+f})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&n.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),n}function sOt(e){for(var t;e.hasNode(t=qd("_root")););return t}var wrt=b(()=>{"use strict";Ee();to();s(Srt,"buildLayerGraph");s(sOt,"createRootNode")});function _rt(e,t){for(var r=0,i=1;i0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=h.weight;u+=h.weight*f})),u}var Ert=b(()=>{"use strict";Ee();s(_rt,"crossCount");s(aOt,"twoLayerCrossCount")});function vrt(e){var t={},r=Or(e.nodes(),function(l){return!e.children(l).length}),i=Ks(jt(r,function(l){return e.node(l).rank})),n=jt(Ja(i+1),function(){return[]});function a(l){if(!pe(t,l)){t[l]=!0;var u=e.node(l);n[u.rank].push(l),ct(e.successors(l),a)}}s(a,"dfs");var o=Nl(r,function(l){return e.node(l).rank});return ct(o,a),n}var Art=b(()=>{"use strict";Ee();s(vrt,"initOrder")});function Rrt(e,t){return jt(t,function(r){var i=e.inEdges(r);if(i.length){var n=Mr(i,function(a,o){var l=e.edge(o),u=e.node(o.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:r}})}var Lrt=b(()=>{"use strict";Ee();s(Rrt,"barycenter")});function Drt(e,t){var r={};ct(e,function(n,a){var o=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:a};rr(n.barycenter)||(o.barycenter=n.barycenter,o.weight=n.weight)}),ct(t.edges(),function(n){var a=r[n.v],o=r[n.w];!rr(a)&&!rr(o)&&(o.indegree++,a.out.push(r[n.w]))});var i=Or(r,function(n){return!n.indegree});return oOt(i)}function oOt(e){var t=[];function r(a){return function(o){o.merged||(rr(o.barycenter)||rr(a.barycenter)||o.barycenter>=a.barycenter)&&lOt(a,o)}}s(r,"handleIn");function i(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(s(i,"handleOut");e.length;){var n=e.pop();t.push(n),ct(n.in.reverse(),r(n)),ct(n.out,i(n))}return jt(Or(t,function(a){return!a.merged}),function(a){return Wd(a,["vs","i","barycenter","weight"])})}function lOt(e,t){var r=0,i=0;e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}var Irt=b(()=>{"use strict";Ee();s(Drt,"resolveConflicts");s(oOt,"doResolveConflicts");s(lOt,"mergeEntries")});function Ort(e,t){var r=Fet(e,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),i=r.lhs,n=Nl(r.rhs,function(d){return-d.i}),a=[],o=0,l=0,u=0;i.sort(cOt(!!t)),u=Nrt(a,n,u),ct(i,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,l+=d.weight,u=Nrt(a,n,u)});var h={vs:Nr(a)};return l&&(h.barycenter=o/l,h.weight=l),h}function Nrt(e,t,r){for(var i;t.length&&(i=An(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function cOt(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var Mrt=b(()=>{"use strict";Ee();Ml();s(Ort,"sort");s(Nrt,"consumeUnsortable");s(cOt,"compareWithBias")});function D6(e,t,r,i){var n=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};o&&(n=Or(n,function(g){return g!==o&&g!==l}));var h=Rrt(e,n);ct(h,function(g){if(e.children(g.v).length){var y=D6(e,g.v,r,i);u[g.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&hOt(g,y)}});var d=Drt(h,r);uOt(d,u);var f=Ort(d,i);if(o&&(f.vs=Nr([o,f.vs,l]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function uOt(e,t){ct(e,function(r){r.vs=Nr(r.vs.map(function(i){return t[i]?t[i].vs:i}))})}function hOt(e,t){rr(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Brt=b(()=>{"use strict";Ee();Lrt();Irt();Mrt();s(D6,"sortSubgraph");s(uOt,"expandSubgraphs");s(hOt,"mergeBarycenters")});function Frt(e){var t=p6(e),r=Prt(e,Ja(1,t+1),"inEdges"),i=Prt(e,Ja(t-1,-1,-1),"outEdges"),n=vrt(e);$rt(e,n);for(var a=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){dOt(l%2?r:i,l%4>=2),n=Xu(e);var h=_rt(e,n);h{"use strict";Ee();to();Ml();Crt();wrt();Ert();Art();Brt();s(Frt,"order");s(Prt,"buildLayerGraphs");s(dOt,"sweepLayerGraphs");s($rt,"assignOrder")});function zrt(e){var t=pOt(e);ct(e.graph().dummyChains,function(r){for(var i=e.node(r),n=i.edgeObj,a=fOt(e,t,n.v,n.w),o=a.path,l=a.lca,u=0,h=o[u],d=!0;r!==n.w;){if(i=e.node(r),d){for(;(h=o[u])!==l&&e.node(h).maxRanko||l>t[u].lim));for(h=u,u=i;(u=e.parent(u))!==h;)a.push(u);return{path:n.concat(a.reverse()),lca:h}}function pOt(e){var t={},r=0;function i(n){var a=r;ct(e.children(n),i),t[n]={low:a,lim:r++}}return s(i,"dfs"),ct(e.children(),i),t}var Grt=b(()=>{"use strict";Ee();s(zrt,"parentDummyChains");s(fOt,"findPath");s(pOt,"postorder")});function mOt(e,t){var r={};function i(n,a){var o=0,l=0,u=n.length,h=An(a);return ct(a,function(d,f){var p=yOt(e,d),m=p?e.node(p).order:u;(p||d===h)&&(ct(a.slice(l,f+1),function(g){ct(e.predecessors(g),function(y){var x=e.node(y),k=x.order;(kh)&&Wrt(r,p,d)})})}s(i,"scan");function n(a,o){var l=-1,u,h=0;return ct(o,function(d,f){if(e.node(d).dummy==="border"){var p=e.predecessors(d);p.length&&(u=e.node(p[0]).order,i(o,h,f,l,u),h=f,l=u)}i(o,h,o.length,u,a.length)}),o}return s(n,"visitLayer"),Mr(t,n),r}function yOt(e,t){if(e.node(t).dummy)return Ss(e.predecessors(t),function(r){return e.node(r).dummy})}function Wrt(e,t,r){if(t>r){var i=t;t=r,r=i}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var n=e[t];Object.defineProperty(n,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function xOt(e,t,r){if(t>r){var i=t;t=r,r=i}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function bOt(e,t,r,i){var n={},a={},o={};return ct(t,function(l){ct(l,function(u,h){n[u]=u,a[u]=u,o[u]=h})}),ct(t,function(l){var u=-1;ct(l,function(h){var d=i(h);if(d.length){d=Nl(d,function(y){return o[y]});for(var f=(d.length-1)/2,p=Math.floor(f),m=Math.ceil(f);p<=m;++p){var g=d[p];a[h]===h&&u{"use strict";Ee();to();Ml();s(mOt,"findType1Conflicts");s(gOt,"findType2Conflicts");s(yOt,"findOtherInnerSegmentNode");s(Wrt,"addConflict");s(xOt,"hasConflict");s(bOt,"verticalAlignment");s(kOt,"horizontalCompaction");s(TOt,"buildBlockGraph");s(COt,"findSmallestWidthAlignment");s(SOt,"alignCoordinates");s(wOt,"balance");s(qrt,"positionX");s(_Ot,"sep");s(EOt,"width")});function Urt(e){e=kS(e),vOt(e),QD(qrt(e),function(t,r){e.node(r).x=t})}function vOt(e){var t=Xu(e),r=e.graph().ranksep,i=0;ct(t,function(n){var a=Ks(jt(n,function(o){return e.node(o).height}));ct(n,function(o){e.node(o).y=i+a/2}),i+=a+r})}var Hrt=b(()=>{"use strict";Ee();Ml();jrt();s(Urt,"position");s(vOt,"positionY")});function U0(e,t){var r=t&&t.debugTiming?Vet:zet;r("layout",()=>{var i=r(" buildLayoutGraph",()=>$Ot(e));r(" runLayout",()=>AOt(i,r)),r(" updateInputGraph",()=>ROt(e,i))})}function AOt(e,t){t(" makeSpaceForEdgeLabels",()=>FOt(e)),t(" removeSelfEdges",()=>YOt(e)),t(" acyclic",()=>Net(e)),t(" nestingGraph.run",()=>yrt(e)),t(" rank",()=>R6(kS(e))),t(" injectEdgeLabelProxies",()=>VOt(e)),t(" removeEmptyRanks",()=>$et(e)),t(" nestingGraph.cleanup",()=>brt(e)),t(" normalizeRanks",()=>Pet(e)),t(" assignRankMinMax",()=>zOt(e)),t(" removeEdgeLabelProxies",()=>GOt(e)),t(" normalize.run",()=>Ket(e)),t(" parentDummyChains",()=>zrt(e)),t(" addBorderSegments",()=>Wet(e)),t(" order",()=>Frt(e)),t(" insertSelfEdges",()=>XOt(e)),t(" adjustCoordinateSystem",()=>Uet(e)),t(" position",()=>Urt(e)),t(" positionSelfEdges",()=>KOt(e)),t(" removeBorderNodes",()=>HOt(e)),t(" normalize.undo",()=>Qet(e)),t(" fixupEdgeLabelCoords",()=>jOt(e)),t(" undoCoordinateSystem",()=>Het(e)),t(" translateGraph",()=>WOt(e)),t(" assignNodeIntersects",()=>qOt(e)),t(" reversePoints",()=>UOt(e)),t(" acyclic.undo",()=>Oet(e))}function ROt(e,t){ct(e.nodes(),function(r){var i=e.node(r),n=t.node(r);i&&(i.x=n.x,i.y=n.y,t.children(r).length&&(i.width=n.width,i.height=n.height))}),ct(e.edges(),function(r){var i=e.edge(r),n=t.edge(r);i.points=n.points,Object.prototype.hasOwnProperty.call(n,"x")&&(i.x=n.x,i.y=n.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function $Ot(e){var t=new Ur({multigraph:!0,compound:!0}),r=N6(e.graph());return t.setGraph(Iu({},DOt,I6(r,LOt),Wd(r,IOt))),ct(e.nodes(),function(i){var n=N6(e.node(i));t.setNode(i,Uu(I6(n,NOt),OOt)),t.setParent(i,e.parent(i))}),ct(e.edges(),function(i){var n=N6(e.edge(i));t.setEdge(i,Iu({},BOt,I6(n,MOt),Wd(n,POt)))}),t}function FOt(e){var t=e.graph();t.ranksep/=2,ct(e.edges(),function(r){var i=e.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function VOt(e){ct(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var i=e.node(t.v),n=e.node(t.w),a={rank:(n.rank-i.rank)/2+i.rank,e:t};Ol(e,"edge-proxy",a,"_ep")}})}function zOt(e){var t=0;ct(e.nodes(),function(r){var i=e.node(r);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=Ks(t,i.maxRank))}),e.graph().maxRank=t}function GOt(e){ct(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function WOt(e){var t=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,n=0,a=e.graph(),o=a.marginx||0,l=a.marginy||0;function u(h){var d=h.x,f=h.y,p=h.width,m=h.height;t=Math.min(t,d-p/2),r=Math.max(r,d+p/2),i=Math.min(i,f-m/2),n=Math.max(n,f+m/2)}s(u,"getExtremes"),ct(e.nodes(),function(h){u(e.node(h))}),ct(e.edges(),function(h){var d=e.edge(h);Object.prototype.hasOwnProperty.call(d,"x")&&u(d)}),t-=o,i-=l,ct(e.nodes(),function(h){var d=e.node(h);d.x-=t,d.y-=i}),ct(e.edges(),function(h){var d=e.edge(h);ct(d.points,function(f){f.x-=t,f.y-=i}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=t),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=i)}),a.width=r-t+o,a.height=n-i+l}function qOt(e){ct(e.edges(),function(t){var r=e.edge(t),i=e.node(t.v),n=e.node(t.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=n,o=i),r.points.unshift(d6(i,a)),r.points.push(d6(n,o))})}function jOt(e){ct(e.edges(),function(t){var r=e.edge(t);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function UOt(e){ct(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function HOt(e){ct(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),n=e.node(r.borderBottom),a=e.node(An(r.borderLeft)),o=e.node(An(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(n.y-i.y),r.x=a.x+r.width/2,r.y=i.y+r.height/2}}),ct(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function YOt(e){ct(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function XOt(e){var t=Xu(e);ct(t,function(r){var i=0;ct(r,function(n,a){var o=e.node(n);o.order=a+i,ct(o.selfEdges,function(l){Ol(e,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:a+ ++i,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function KOt(e){ct(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var i=e.node(r.e.v),n=i.x+i.width/2,a=i.y,o=r.x-n,l=i.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:n+2*o/3,y:a-l},{x:n+5*o/6,y:a-l},{x:n+o,y:a},{x:n+5*o/6,y:a+l},{x:n+2*o/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function I6(e,t){return zd(Wd(e,t),Number)}function N6(e){var t={};return ct(e,function(r,i){t[i.toLowerCase()]=r}),t}var LOt,DOt,IOt,NOt,OOt,MOt,BOt,POt,Yrt=b(()=>{"use strict";Ee();to();qet();Xet();h6();y6();L6();krt();Vrt();Grt();Hrt();Ml();s(U0,"layout");s(AOt,"runLayout");s(ROt,"updateInputGraph");LOt=["nodesep","edgesep","ranksep","marginx","marginy"],DOt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},IOt=["acyclicer","ranker","rankdir","align"],NOt=["width","height"],OOt={width:0,height:0},MOt=["minlen","weight","width","height","labeloffset"],BOt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},POt=["labelpos"];s($Ot,"buildLayoutGraph");s(FOt,"makeSpaceForEdgeLabels");s(VOt,"injectEdgeLabelProxies");s(zOt,"assignRankMinMax");s(GOt,"removeEdgeLabelProxies");s(WOt,"translateGraph");s(qOt,"assignNodeIntersects");s(jOt,"fixupEdgeLabelCoords");s(UOt,"reversePointsForReversedEdges");s(HOt,"removeBorderNodes");s(YOt,"removeSelfEdges");s(XOt,"insertSelfEdges");s(KOt,"positionSelfEdges");s(I6,"selectNumberAttrs");s(N6,"canonicalize")});var O6=b(()=>{"use strict";h6();Yrt();y6();L6()});function eo(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:QOt(e),edges:ZOt(e)};return rr(e.graph())||(t.value=jr(e.graph())),t}function QOt(e){return jt(e.nodes(),function(t){var r=e.node(t),i=e.parent(t),n={v:t};return rr(r)||(n.value=r),rr(i)||(n.parent=i),n})}function ZOt(e){return jt(e.edges(),function(t){var r=e.edge(t),i={v:t.v,w:t.w};return rr(t.name)||(i.name=t.name),rr(r)||(i.value=r),i})}var M6=b(()=>{"use strict";Ee();yS();s(eo,"write");s(QOt,"writeNodes");s(ZOt,"writeEdges")});var ur,Hd,Qrt,Zrt,wS,JOt,Jrt,tit,tMt,zm,Krt,eit,rit,iit,nit,sit=b(()=>{"use strict";Jt();to();M6();ur=new Map,Hd=new Map,Qrt=new Map,Zrt=s(()=>{Hd.clear(),Qrt.clear(),ur.clear()},"clear"),wS=s((e,t)=>{let r=Hd.get(t)||[];return z.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),JOt=s((e,t)=>{let r=Hd.get(t)||[];return z.info("Descendants of ",t," is ",r),z.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||wS(e.v,t)||wS(e.w,t)||r.includes(e.w):(z.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Jrt=s((e,t,r,i)=>{z.warn("Copying children of ",e,"root",i,"data",t.node(e),i);let n=t.children(e)||[];e!==i&&n.push(e),z.warn("Copying (nodes) clusterId",e,"nodes",n),n.forEach(a=>{if(t.children(a).length>0)Jrt(a,t,r,i);else{let o=t.node(a);z.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==t.parent(a)&&(z.warn("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(z.debug("Setting parent",a,e),r.setParent(a,e)):(z.info("In copy ",e,"root",i,"data",t.node(e),i),z.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));let l=t.edges(a);z.debug("Copying Edges",l),l.forEach(u=>{z.info("Edge",u);let h=t.edge(u.v,u.w,u.name);z.info("Edge data",h,i);try{JOt(u,i)?(z.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),z.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):z.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",i," clusterId:",e)}catch(d){z.error(d)}})}z.debug("Removing node",a),t.removeNode(a)})},"copy"),tit=s((e,t)=>{let r=t.children(e),i=[...r];for(let n of r)Qrt.set(n,e),i=[...i,...tit(n,t)];return i},"extractDescendants"),tMt=s((e,t,r)=>{let i=e.edges().filter(u=>u.v===t||u.w===t),n=e.edges().filter(u=>u.v===r||u.w===r),a=i.map(u=>({v:u.v===t?r:u.v,w:u.w===t?t:u.w})),o=n.map(u=>({v:u.v,w:u.w}));return a.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),zm=s((e,t,r)=>{let i=t.children(e);if(z.trace("Searching children of id ",e,i),i.length<1)return e;let n;for(let a of i){let o=zm(a,t,r),l=tMt(t,r,o);if(o)if(l.length>0)n=o;else return o}return n},"findNonClusterChild"),Krt=s(e=>!ur.has(e)||!ur.get(e).externalConnections?e:ur.has(e)?ur.get(e).id:e,"getAnchorId"),eit=s((e,t)=>{if(!e||t>10){z.debug("Opting out, no graph ");return}else z.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(z.warn("Cluster identified",r," Replacement id in edges: ",zm(r,e,r)),Hd.set(r,tit(r,e)),ur.set(r,{id:zm(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let i=e.children(r),n=e.edges();i.length>0?(z.debug("Cluster identified",r,Hd),n.forEach(a=>{let o=wS(a.v,r),l=wS(a.w,r);o^l&&(z.warn("Edge: ",a," leaves cluster ",r),z.warn("Descendants of XXX ",r,": ",Hd.get(r)),ur.get(r).externalConnections=!0)})):z.debug("Not a cluster ",r,Hd)});for(let r of ur.keys()){let i=ur.get(r).id,n=e.parent(i);n!==r&&ur.has(n)&&!ur.get(n).externalConnections&&(ur.get(r).id=n)}e.edges().forEach(function(r){let i=e.edge(r);z.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),z.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let n=r.v,a=r.w;if(z.warn("Fix XXX",ur,"ids:",r.v,r.w,"Translating: ",ur.get(r.v)," --- ",ur.get(r.w)),ur.get(r.v)||ur.get(r.w)){if(z.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),n=Krt(r.v),a=Krt(r.w),e.removeEdge(r.v,r.w,r.name),n!==r.v){let o=e.parent(n);ur.get(o).externalConnections=!0,i.fromCluster=r.v}if(a!==r.w){let o=e.parent(a);ur.get(o).externalConnections=!0,i.toCluster=r.w}z.warn("Fix Replacing with XXX",n,a,r.name),e.setEdge(n,a,i,r.name)}}),z.warn("Adjusted Graph",eo(e)),rit(e,0),z.trace(ur)},"adjustClustersAndEdges"),rit=s((e,t)=>{if(z.warn("extractor - ",t,eo(e),e.children("D")),t>10){z.error("Bailing out");return}let r=e.nodes(),i=!1;for(let n of r){let a=e.children(n);i=i||a.length>0}if(!i){z.debug("Done, no node has children",e.nodes());return}z.debug("Nodes = ",r,t);for(let n of r)if(z.debug("Extracting node",n,ur,ur.has(n)&&!ur.get(n).externalConnections,!e.parent(n),e.node(n),e.children("D")," Depth ",t),!ur.has(n))z.debug("Not a cluster",n,t);else if(!ur.get(n).externalConnections&&e.children(n)&&e.children(n).length>0){z.warn("Cluster without external connections, without a parent and with children",n,t);let o=e.graph().rankdir==="TB"?"LR":"TB";ur.get(n)?.clusterData?.dir&&(o=ur.get(n).clusterData.dir,z.warn("Fixing dir",ur.get(n).clusterData.dir,o));let l=new Ur({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});z.warn("Old graph before copy",eo(e)),Jrt(n,e,l,n),e.setNode(n,{clusterNode:!0,id:n,clusterData:ur.get(n).clusterData,label:ur.get(n).label,graph:l}),z.warn("New graph after copy node: (",n,")",eo(l)),z.debug("Old graph after copy",eo(e))}else z.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!ur.get(n).externalConnections," no parent: ",!e.parent(n)," children ",e.children(n)&&e.children(n).length>0,e.children("D"),t),z.debug(ur);r=e.nodes(),z.warn("New list of nodes",r);for(let n of r){let a=e.node(n);z.warn(" Now next level",n,a),a?.clusterNode&&rit(a.graph,t+1)}},"extractor"),iit=s((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{let n=e.children(i),a=iit(e,n);r=[...r,...a]}),r},"sorter"),nit=s(e=>iit(e,e.children()),"sortNodesByHierarchy")});var oit={};Fe(oit,{render:()=>eMt});var ait,eMt,lit=b(()=>{"use strict";O6();M6();to();bD();de();sit();TC();hC();xD();Jt();B0();ye();ait=s(async(e,t,r,i,n,a)=>{z.warn("Graph in recursive render:XAX",eo(t),n);let o=t.graph().rankdir;z.trace("Dir in recursive render - dir:",o);let l=e.insert("g").attr("class","root");t.nodes()?z.info("Recursive render XXX",t.nodes()):z.info("No nodes found for",t),t.edges().length>0&&z.info("Recursive edges",t.edge(t.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),d=l.insert("g").attr("class","edgeLabels"),f=l.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(y){let x=t.node(y);if(n!==void 0){let k=JSON.parse(JSON.stringify(n.clusterData));z.trace(`Setting data for parent cluster XXX + Node.id = `,y,` + data=`,k.height,` +Parent cluster`,n.height),t.setNode(n.id,k),t.parent(y)||(z.trace("Setting parent",y,n.id),t.setParent(y,n.id,k))}if(z.info("(Insert) Node XXX"+y+": "+JSON.stringify(t.node(y))),x?.clusterNode){z.info("Cluster identified XBX",y,x.width,t.node(y));let{ranksep:k,nodesep:T}=t.graph();x.graph.setGraph({...x.graph.graph(),ranksep:k+25,nodesep:T});let C=await ait(f,x.graph,r,i,t.node(y),a),_=C.elem;Vt(x,_),x.diff=C.diff||0,z.info("New compound node after recursive render XAX",y,"width",x.width,"height",x.height),SQ(_,x)}else t.children(y).length>0?(z.trace("Cluster - the non recursive path XBX",y,x.id,x,x.width,"Graph:",t),z.trace(zm(x.id,t)),ur.set(x.id,{id:zm(x.id,t),node:x})):(z.trace("Node - the non recursive path XAX",y,f,t.node(y),o),await Tm(f,t.node(y),{config:a,dir:o}))})),await s(async()=>{let y=t.edges().map(async function(x){let k=t.edge(x.v,x.w,x.name);z.info("Edge "+x.v+" -> "+x.w+": "+JSON.stringify(x)),z.info("Edge "+x.v+" -> "+x.w+": ",x," ",JSON.stringify(t.edge(x))),z.info("Fix",ur,"ids:",x.v,x.w,"Translating: ",ur.get(x.v),ur.get(x.w)),await gC(d,k)});await Promise.all(y)},"processEdges")(),z.info("Graph before layout:",JSON.stringify(eo(t))),z.info("############################################# XXX"),z.info("### Layout ### XXX"),z.info("############################################# XXX"),U0(t),z.info("Graph after layout:",JSON.stringify(eo(t)));let m=0,{subGraphTitleTotalMargin:g}=Lc(a);return await Promise.all(nit(t).map(async function(y){let x=t.node(y);if(z.info("Position XBX => "+y+": ("+x.x,","+x.y,") width: ",x.width," height: ",x.height),x?.clusterNode)x.y+=g,z.info("A tainted cluster node XBX1",y,x.id,x.width,x.height,x.x,x.y,t.parent(y)),ur.get(x.id).node=x,$0(x);else if(t.children(y).length>0){z.info("A pure cluster node XBX1",y,x.id,x.x,x.y,x.width,x.height,t.parent(y)),x.height+=g,t.node(x.parentId);let k=x?.padding/2||0,T=x?.labelBBox?.height||0,C=T-k||0;z.debug("OffsetY",C,"labelHeight",T,"halfPadding",k),await km(u,x),ur.get(x.id).node=x}else{let k=t.node(x.parentId);x.y+=g/2,z.info("A regular node XBX1 - using the padding",x.id,"parent",x.parentId,x.width,x.height,x.x,x.y,"offsetY",x.offsetY,"parent",k,k?.offsetY,x),$0(x)}})),t.edges().forEach(function(y){let x=t.edge(y);z.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(x),x),x.points.forEach(_=>_.y+=g/2);let k=t.node(y.v);var T=t.node(y.w);let C=xC(h,x,ur,r,k,T,i);yC(x,C)}),t.nodes().forEach(function(y){let x=t.node(y);z.info(y,x.type,x.diff),x.isGroup&&(m=x.diff)}),z.warn("Returning from recursive render XAX",l,m),{elem:l,diff:m}},"recursiveRender"),eMt=s(async(e,t)=>{let r=new Ur({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),i=t.select("g");bC(i,e.markers,e.type,e.diagramId),wQ(),CQ(),mQ(),Zrt(),e.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),z.debug("Edges:",e.edges),e.edges.forEach(a=>{if(a.start===a.end){let o=a.start,l=o+"---"+o+"---1",u=o+"---"+o+"---2",h=r.node(o);r.setNode(l,{domId:l,id:l,parentId:h.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(l,h.parentId),r.setNode(u,{domId:u,id:u,parentId:h.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(u,h.parentId);let d=structuredClone(a),f=structuredClone(a),p=structuredClone(a);d.label="",d.arrowTypeEnd="none",d.id=o+"-cyclic-special-1",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=o+"-cyclic-special-mid",p.label="",h.isGroup&&(d.fromCluster=o,p.toCluster=o),p.id=o+"-cyclic-special-2",p.arrowTypeStart="none",r.setEdge(o,l,d,o+"-cyclic-special-0"),r.setEdge(l,u,f,o+"-cyclic-special-1"),r.setEdge(u,o,p,o+"-cyc{"use strict";EQ();Jt();H0={},B6=s(e=>{for(let t of e)H0[t.name]=t},"registerLayoutLoaders"),rMt=s(()=>{B6([{name:"dagre",loader:s(async()=>await Promise.resolve().then(()=>(lit(),oit)),"loader")}])},"registerDefaultLayoutLoaders");rMt();Bl=s(async(e,t)=>{if(!(e.layoutAlgorithm in H0))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let d of e.nodes){let f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}let r=H0[e.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:a}=e.config,{useGradient:o,gradientStart:l,gradientStop:u}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),o){let d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return i.render(e,t,_Q,{algorithm:r.algorithm})},"render"),Zu=s((e="",{fallback:t="dagre"}={})=>{if(e in H0)return e;if(t in H0)return z.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm")});var ro,iMt,nMt,Xd=b(()=>{"use strict";gi();Jt();ro=s((e,t,r,i)=>{e.attr("class",r);let{width:n,height:a,x:o,y:l}=iMt(e,t);pr(e,a,n,i);let u=nMt(o,l,n,a,t);e.attr("viewBox",u),z.debug(`viewBox configured: ${u} with padding: ${t}`)},"setupViewPortForSVG"),iMt=s((e,t)=>{let r=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),nMt=s((e,t,r,i,n)=>`${e-n} ${t-n} ${r} ${i}`,"createViewBox")});var sMt,aMt,cit,uit=b(()=>{"use strict";ye();Jt();bm();Yd();Xd();Re();sMt=s(function(e,t){return t.db.getClasses()},"getClasses"),aMt=s(async function(e,t,r,i){z.info("REF0:"),z.info("Drawing state diagram (v2)",t);let{securityLevel:n,flowchart:a,layout:o}=Q();i.db.setDiagramId(t),z.debug("Before getData: ");let l=i.db.getData();z.debug("Data: ",l);let u=vl(t,n),h=i.db.getDirection();l.type=i.type,l.layoutAlgorithm=Zu(o),l.layoutAlgorithm==="dagre"&&o==="elk"&&z.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."),l.direction=h,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["point","circle","cross"],l.diagramId=t,z.debug("REF1:",l),await Bl(l,u);let d=l.config.flowchart?.diagramPadding??8;Te.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),ro(u,d,"flowchart",a?.useMaxWidth||!1)},"draw"),cit={getClasses:sMt,draw:aMt}});var P6,$6,hit=b(()=>{"use strict";P6=(function(){var e=s(function(oi,Ce,Ne,je){for(Ne=Ne||{},je=oi.length;je--;Ne[oi[je]]=Ce);return Ne},"o"),t=[1,4],r=[1,3],i=[1,5],n=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],o=[1,13],l=[1,14],u=[1,15],h=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],g=[1,50],y=[1,49],x=[1,29],k=[1,30],T=[1,31],C=[1,32],_=[1,33],S=[1,45],w=[1,47],A=[1,43],v=[1,48],M=[1,44],$=[1,51],I=[1,46],F=[1,52],B=[1,53],O=[1,34],R=[1,35],N=[1,36],P=[1,37],E=[1,38],D=[1,58],V=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],L=[1,62],q=[1,61],H=[1,63],K=[8,9,11,75,77,78],U=[1,79],st=[1,92],X=[1,97],ut=[1,96],ot=[1,93],mt=[1,89],ht=[1,95],it=[1,91],Ot=[1,98],St=[1,94],yt=[1,99],Et=[1,90],Ct=[8,9,10,11,40,75,77,78],Bt=[8,9,10,11,40,46,75,77,78],Lt=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],ee=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],at=[44,60,89,102,105,106,109,111,114,115,116],$e=[1,122],pt=[1,123],Wt=[1,125],Ht=[1,124],Dt=[44,60,62,74,89,102,105,106,109,111,114,115,116],bt=[1,134],Gt=[1,148],G=[1,149],nt=[1,150],W=[1,151],Rt=[1,136],Y=[1,138],At=[1,142],xt=[1,143],Zt=[1,144],Nt=[1,145],wt=[1,146],he=[1,147],gt=[1,152],te=[1,153],ne=[1,132],It=[1,133],ke=[1,140],J=[1,135],Xe=[1,139],rt=[1,137],or=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Sr=[1,155],Dr=[1,157],Ie=[8,9,11],vr=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],ge=[1,177],se=[1,173],Oe=[1,174],ve=[1,178],ue=[1,175],Ge=[1,176],yr=[77,116,119],We=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Br=[10,106],Kr=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],kr=[1,248],Gr=[1,246],Xn=[1,250],ae=[1,244],lt=[1,245],Xt=[1,247],oe=[1,249],Tr=[1,251],Jr=[1,269],ei=[8,9,11,106],dr=[8,9,10,11,60,84,105,106,109,110,111,112],da={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:s(function(Ce,Ne,je,ie,li,Z,jh){var tt=Z.length-1;switch(li){case 2:this.$=[];break;case 3:(!Array.isArray(Z[tt])||Z[tt].length>0)&&Z[tt-1].push(Z[tt]),this.$=Z[tt-1];break;case 4:case 183:this.$=Z[tt];break;case 11:ie.setDirection("TB"),this.$="TB";break;case 12:ie.setDirection(Z[tt-1]),this.$=Z[tt-1];break;case 27:this.$=Z[tt-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=ie.addSubGraph(Z[tt-6],Z[tt-1],Z[tt-4]);break;case 34:this.$=ie.addSubGraph(Z[tt-3],Z[tt-1],Z[tt-3]);break;case 35:this.$=ie.addSubGraph(void 0,Z[tt-1],void 0);break;case 37:this.$=Z[tt].trim(),ie.setAccTitle(this.$);break;case 38:case 39:this.$=Z[tt].trim(),ie.setAccDescription(this.$);break;case 43:this.$=Z[tt-1]+Z[tt];break;case 44:this.$=Z[tt];break;case 45:ie.addVertex(Z[tt-1][Z[tt-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Z[tt]),ie.addLink(Z[tt-3].stmt,Z[tt-1],Z[tt-2]),this.$={stmt:Z[tt-1],nodes:Z[tt-1].concat(Z[tt-3].nodes)};break;case 46:ie.addLink(Z[tt-2].stmt,Z[tt],Z[tt-1]),this.$={stmt:Z[tt],nodes:Z[tt].concat(Z[tt-2].nodes)};break;case 47:ie.addLink(Z[tt-3].stmt,Z[tt-1],Z[tt-2]),this.$={stmt:Z[tt-1],nodes:Z[tt-1].concat(Z[tt-3].nodes)};break;case 48:this.$={stmt:Z[tt-1],nodes:Z[tt-1]};break;case 49:ie.addVertex(Z[tt-1][Z[tt-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Z[tt]),this.$={stmt:Z[tt-1],nodes:Z[tt-1],shapeData:Z[tt]};break;case 50:this.$={stmt:Z[tt],nodes:Z[tt]};break;case 51:this.$=[Z[tt]];break;case 52:ie.addVertex(Z[tt-5][Z[tt-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Z[tt-4]),this.$=Z[tt-5].concat(Z[tt]);break;case 53:this.$=Z[tt-4].concat(Z[tt]);break;case 54:this.$=Z[tt];break;case 55:this.$=Z[tt-2],ie.setClass(Z[tt-2],Z[tt]);break;case 56:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"square");break;case 57:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"doublecircle");break;case 58:this.$=Z[tt-5],ie.addVertex(Z[tt-5],Z[tt-2],"circle");break;case 59:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"ellipse");break;case 60:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"stadium");break;case 61:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"subroutine");break;case 62:this.$=Z[tt-7],ie.addVertex(Z[tt-7],Z[tt-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Z[tt-5],Z[tt-3]]]));break;case 63:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"cylinder");break;case 64:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"round");break;case 65:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"diamond");break;case 66:this.$=Z[tt-5],ie.addVertex(Z[tt-5],Z[tt-2],"hexagon");break;case 67:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"odd");break;case 68:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"trapezoid");break;case 69:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"inv_trapezoid");break;case 70:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"lean_right");break;case 71:this.$=Z[tt-3],ie.addVertex(Z[tt-3],Z[tt-1],"lean_left");break;case 72:this.$=Z[tt],ie.addVertex(Z[tt]);break;case 73:Z[tt-1].text=Z[tt],this.$=Z[tt-1];break;case 74:case 75:Z[tt-2].text=Z[tt-1],this.$=Z[tt-2];break;case 76:this.$=Z[tt];break;case 77:var Zi=ie.destructLink(Z[tt],Z[tt-2]);this.$={type:Zi.type,stroke:Zi.stroke,length:Zi.length,text:Z[tt-1]};break;case 78:var Zi=ie.destructLink(Z[tt],Z[tt-2]);this.$={type:Zi.type,stroke:Zi.stroke,length:Zi.length,text:Z[tt-1],id:Z[tt-3]};break;case 79:this.$={text:Z[tt],type:"text"};break;case 80:this.$={text:Z[tt-1].text+""+Z[tt],type:Z[tt-1].type};break;case 81:this.$={text:Z[tt],type:"string"};break;case 82:this.$={text:Z[tt],type:"markdown"};break;case 83:var Zi=ie.destructLink(Z[tt]);this.$={type:Zi.type,stroke:Zi.stroke,length:Zi.length};break;case 84:var Zi=ie.destructLink(Z[tt]);this.$={type:Zi.type,stroke:Zi.stroke,length:Zi.length,id:Z[tt-1]};break;case 85:this.$=Z[tt-1];break;case 86:this.$={text:Z[tt],type:"text"};break;case 87:this.$={text:Z[tt-1].text+""+Z[tt],type:Z[tt-1].type};break;case 88:this.$={text:Z[tt],type:"string"};break;case 89:case 104:this.$={text:Z[tt],type:"markdown"};break;case 101:this.$={text:Z[tt],type:"text"};break;case 102:this.$={text:Z[tt-1].text+""+Z[tt],type:Z[tt-1].type};break;case 103:this.$={text:Z[tt],type:"text"};break;case 105:this.$=Z[tt-4],ie.addClass(Z[tt-2],Z[tt]);break;case 106:this.$=Z[tt-4],ie.setClass(Z[tt-2],Z[tt]);break;case 107:case 115:this.$=Z[tt-1],ie.setClickEvent(Z[tt-1],Z[tt]);break;case 108:case 116:this.$=Z[tt-3],ie.setClickEvent(Z[tt-3],Z[tt-2]),ie.setTooltip(Z[tt-3],Z[tt]);break;case 109:this.$=Z[tt-2],ie.setClickEvent(Z[tt-2],Z[tt-1],Z[tt]);break;case 110:this.$=Z[tt-4],ie.setClickEvent(Z[tt-4],Z[tt-3],Z[tt-2]),ie.setTooltip(Z[tt-4],Z[tt]);break;case 111:this.$=Z[tt-2],ie.setLink(Z[tt-2],Z[tt]);break;case 112:this.$=Z[tt-4],ie.setLink(Z[tt-4],Z[tt-2]),ie.setTooltip(Z[tt-4],Z[tt]);break;case 113:this.$=Z[tt-4],ie.setLink(Z[tt-4],Z[tt-2],Z[tt]);break;case 114:this.$=Z[tt-6],ie.setLink(Z[tt-6],Z[tt-4],Z[tt]),ie.setTooltip(Z[tt-6],Z[tt-2]);break;case 117:this.$=Z[tt-1],ie.setLink(Z[tt-1],Z[tt]);break;case 118:this.$=Z[tt-3],ie.setLink(Z[tt-3],Z[tt-2]),ie.setTooltip(Z[tt-3],Z[tt]);break;case 119:this.$=Z[tt-3],ie.setLink(Z[tt-3],Z[tt-2],Z[tt]);break;case 120:this.$=Z[tt-5],ie.setLink(Z[tt-5],Z[tt-4],Z[tt]),ie.setTooltip(Z[tt-5],Z[tt-2]);break;case 121:this.$=Z[tt-4],ie.addVertex(Z[tt-2],void 0,void 0,Z[tt]);break;case 122:this.$=Z[tt-4],ie.updateLink([Z[tt-2]],Z[tt]);break;case 123:this.$=Z[tt-4],ie.updateLink(Z[tt-2],Z[tt]);break;case 124:this.$=Z[tt-8],ie.updateLinkInterpolate([Z[tt-6]],Z[tt-2]),ie.updateLink([Z[tt-6]],Z[tt]);break;case 125:this.$=Z[tt-8],ie.updateLinkInterpolate(Z[tt-6],Z[tt-2]),ie.updateLink(Z[tt-6],Z[tt]);break;case 126:this.$=Z[tt-6],ie.updateLinkInterpolate([Z[tt-4]],Z[tt]);break;case 127:this.$=Z[tt-6],ie.updateLinkInterpolate(Z[tt-4],Z[tt]);break;case 128:case 130:this.$=[Z[tt]];break;case 129:case 131:Z[tt-2].push(Z[tt]),this.$=Z[tt-2];break;case 133:this.$=Z[tt-1]+Z[tt];break;case 181:this.$=Z[tt];break;case 182:this.$=Z[tt-1]+""+Z[tt];break;case 184:this.$=Z[tt-1]+""+Z[tt];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:t,10:r,12:i},{1:[3]},e(n,a,{5:6}),{4:7,9:t,10:r,12:i},{4:8,9:t,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:k,86:T,87:C,88:_,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B,121:O,122:R,123:N,124:P,125:E},e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),{8:[1,55],9:[1,56],10:D,15:54,18:57},e(V,[2,3]),e(V,[2,4]),e(V,[2,5]),e(V,[2,6]),e(V,[2,7]),e(V,[2,8]),{8:L,9:q,11:H,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:L,9:q,11:H,21:68},{8:L,9:q,11:H,21:69},{8:L,9:q,11:H,21:70},{8:L,9:q,11:H,21:71},{8:L,9:q,11:H,21:72},{8:L,9:q,10:[1,73],11:H,21:74},e(V,[2,36]),{35:[1,75]},{37:[1,76]},e(V,[2,39]),e(K,[2,50],{18:77,39:78,10:D,40:U}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:st,44:X,60:ut,80:[1,87],89:ot,95:[1,84],97:[1,85],101:86,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et,120:88},e(V,[2,185]),e(V,[2,186]),e(V,[2,187]),e(V,[2,188]),e(V,[2,189]),e(Ct,[2,51]),e(Ct,[2,54],{46:[1,100]}),e(Bt,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:S,102:w,105:A,106:v,109:M,111:$,114:I,115:F,116:B}),e(Lt,[2,181]),e(Lt,[2,142]),e(Lt,[2,143]),e(Lt,[2,144]),e(Lt,[2,145]),e(Lt,[2,146]),e(Lt,[2,147]),e(Lt,[2,148]),e(Lt,[2,149]),e(Lt,[2,150]),e(Lt,[2,151]),e(Lt,[2,152]),e(n,[2,12]),e(n,[2,18]),e(n,[2,19]),{9:[1,114]},e(ee,[2,26],{18:115,10:D}),e(V,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},e(V,[2,40]),e(V,[2,41]),e(V,[2,42]),e(at,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:$e,81:pt,116:Wt,119:Ht},{75:[1,126],77:[1,127]},e(Dt,[2,83]),e(V,[2,28]),e(V,[2,29]),e(V,[2,30]),e(V,[2,31]),e(V,[2,32]),{10:bt,12:Gt,14:G,27:nt,28:128,32:W,44:Rt,60:Y,75:At,80:[1,130],81:[1,131],83:141,84:xt,85:Zt,86:Nt,87:wt,88:he,89:gt,90:te,91:129,105:ne,109:It,111:ke,114:J,115:Xe,116:rt},e(or,a,{5:154}),e(V,[2,37]),e(V,[2,38]),e(K,[2,48],{44:Sr}),e(K,[2,49],{18:156,10:D,40:Dr}),e(Ct,[2,44]),{44:g,47:158,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},{44:g,47:163,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},e(Ie,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(Ie,[2,115],{120:168,10:[1,167],14:st,44:X,60:ut,89:ot,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et}),e(Ie,[2,117],{10:[1,169]}),e(vr,[2,183]),e(vr,[2,170]),e(vr,[2,171]),e(vr,[2,172]),e(vr,[2,173]),e(vr,[2,174]),e(vr,[2,175]),e(vr,[2,176]),e(vr,[2,177]),e(vr,[2,178]),e(vr,[2,179]),e(vr,[2,180]),{44:g,47:170,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},{30:171,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:179,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:181,50:[1,180],67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:182,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:183,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:184,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{109:[1,185]},{30:186,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:187,65:[1,188],67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:189,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:190,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{30:191,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},e(Lt,[2,182]),e(n,[2,20]),e(ee,[2,25]),e(K,[2,46],{39:192,18:193,10:D,40:U}),e(at,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{77:[1,197],79:198,116:Wt,119:Ht},e(yr,[2,79]),e(yr,[2,81]),e(yr,[2,82]),e(yr,[2,168]),e(yr,[2,169]),{76:199,79:121,80:$e,81:pt,116:Wt,119:Ht},e(Dt,[2,84]),{8:L,9:q,10:bt,11:H,12:Gt,14:G,21:201,27:nt,29:[1,200],32:W,44:Rt,60:Y,75:At,83:141,84:xt,85:Zt,86:Nt,87:wt,88:he,89:gt,90:te,91:202,105:ne,109:It,111:ke,114:J,115:Xe,116:rt},e(We,[2,101]),e(We,[2,103]),e(We,[2,104]),e(We,[2,157]),e(We,[2,158]),e(We,[2,159]),e(We,[2,160]),e(We,[2,161]),e(We,[2,162]),e(We,[2,163]),e(We,[2,164]),e(We,[2,165]),e(We,[2,166]),e(We,[2,167]),e(We,[2,90]),e(We,[2,91]),e(We,[2,92]),e(We,[2,93]),e(We,[2,94]),e(We,[2,95]),e(We,[2,96]),e(We,[2,97]),e(We,[2,98]),e(We,[2,99]),e(We,[2,100]),{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:k,86:T,87:C,88:_,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B,121:O,122:R,123:N,124:P,125:E},{10:D,18:204},{44:[1,205]},e(Ct,[2,43]),{10:[1,206],44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:113,114:I,115:F,116:B},{10:[1,207]},{10:[1,208],106:[1,209]},e(Br,[2,128]),{10:[1,210],44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:113,114:I,115:F,116:B},{10:[1,211],44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:113,114:I,115:F,116:B},{80:[1,212]},e(Ie,[2,109],{10:[1,213]}),e(Ie,[2,111],{10:[1,214]}),{80:[1,215]},e(vr,[2,184]),{80:[1,216],98:[1,217]},e(Ct,[2,55],{113:113,44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,114:I,115:F,116:B}),{31:[1,218],67:ge,82:219,116:ve,117:ue,118:Ge},e(Kr,[2,86]),e(Kr,[2,88]),e(Kr,[2,89]),e(Kr,[2,153]),e(Kr,[2,154]),e(Kr,[2,155]),e(Kr,[2,156]),{49:[1,220],67:ge,82:219,116:ve,117:ue,118:Ge},{30:221,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{51:[1,222],67:ge,82:219,116:ve,117:ue,118:Ge},{53:[1,223],67:ge,82:219,116:ve,117:ue,118:Ge},{55:[1,224],67:ge,82:219,116:ve,117:ue,118:Ge},{57:[1,225],67:ge,82:219,116:ve,117:ue,118:Ge},{60:[1,226]},{64:[1,227],67:ge,82:219,116:ve,117:ue,118:Ge},{66:[1,228],67:ge,82:219,116:ve,117:ue,118:Ge},{30:229,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},{31:[1,230],67:ge,82:219,116:ve,117:ue,118:Ge},{67:ge,69:[1,231],71:[1,232],82:219,116:ve,117:ue,118:Ge},{67:ge,69:[1,234],71:[1,233],82:219,116:ve,117:ue,118:Ge},e(K,[2,45],{18:156,10:D,40:Dr}),e(K,[2,47],{44:Sr}),e(at,[2,75]),e(at,[2,74]),{62:[1,235],67:ge,82:219,116:ve,117:ue,118:Ge},e(at,[2,77]),e(yr,[2,80]),{77:[1,236],79:198,116:Wt,119:Ht},{30:237,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},e(or,a,{5:238}),e(We,[2,102]),e(V,[2,35]),{43:239,44:g,45:40,47:41,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},{10:D,18:240},{10:kr,60:Gr,84:Xn,92:241,105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{10:kr,60:Gr,84:Xn,92:252,104:[1,253],105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{10:kr,60:Gr,84:Xn,92:254,104:[1,255],105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{105:[1,256]},{10:kr,60:Gr,84:Xn,92:257,105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{44:g,47:258,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},e(Ie,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(Ie,[2,116]),e(Ie,[2,118],{10:[1,262]}),e(Ie,[2,119]),e(Bt,[2,56]),e(Kr,[2,87]),e(Bt,[2,57]),{51:[1,263],67:ge,82:219,116:ve,117:ue,118:Ge},e(Bt,[2,64]),e(Bt,[2,59]),e(Bt,[2,60]),e(Bt,[2,61]),{109:[1,264]},e(Bt,[2,63]),e(Bt,[2,65]),{66:[1,265],67:ge,82:219,116:ve,117:ue,118:Ge},e(Bt,[2,67]),e(Bt,[2,68]),e(Bt,[2,70]),e(Bt,[2,69]),e(Bt,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(at,[2,78]),{31:[1,266],67:ge,82:219,116:ve,117:ue,118:Ge},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:k,86:T,87:C,88:_,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B,121:O,122:R,123:N,124:P,125:E},e(Ct,[2,53]),{43:268,44:g,45:40,47:41,60:y,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B},e(Ie,[2,121],{106:Jr}),e(ei,[2,130],{108:270,10:kr,60:Gr,84:Xn,105:ae,109:lt,110:Xt,111:oe,112:Tr}),e(dr,[2,132]),e(dr,[2,134]),e(dr,[2,135]),e(dr,[2,136]),e(dr,[2,137]),e(dr,[2,138]),e(dr,[2,139]),e(dr,[2,140]),e(dr,[2,141]),e(Ie,[2,122],{106:Jr}),{10:[1,271]},e(Ie,[2,123],{106:Jr}),{10:[1,272]},e(Br,[2,129]),e(Ie,[2,105],{106:Jr}),e(Ie,[2,106],{113:113,44:g,60:y,89:S,102:w,105:A,106:v,109:M,111:$,114:I,115:F,116:B}),e(Ie,[2,110]),e(Ie,[2,112],{10:[1,273]}),e(Ie,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:L,9:q,11:H,21:278},e(V,[2,34]),e(Ct,[2,52]),{10:kr,60:Gr,84:Xn,105:ae,107:279,108:243,109:lt,110:Xt,111:oe,112:Tr},e(dr,[2,133]),{14:st,44:X,60:ut,89:ot,101:280,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et,120:88},{14:st,44:X,60:ut,89:ot,101:281,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et,120:88},{98:[1,282]},e(Ie,[2,120]),e(Bt,[2,58]),{30:283,67:ge,80:se,81:Oe,82:172,116:ve,117:ue,118:Ge},e(Bt,[2,66]),e(or,a,{5:284}),e(ei,[2,131],{108:270,10:kr,60:Gr,84:Xn,105:ae,109:lt,110:Xt,111:oe,112:Tr}),e(Ie,[2,126],{120:168,10:[1,285],14:st,44:X,60:ut,89:ot,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et}),e(Ie,[2,127],{120:168,10:[1,286],14:st,44:X,60:ut,89:ot,105:mt,106:ht,109:it,111:Ot,114:St,115:yt,116:Et}),e(Ie,[2,114]),{31:[1,287],67:ge,82:219,116:ve,117:ue,118:Ge},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:k,86:T,87:C,88:_,89:S,102:w,105:A,106:v,109:M,111:$,113:42,114:I,115:F,116:B,121:O,122:R,123:N,124:P,125:E},{10:kr,60:Gr,84:Xn,92:289,105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},{10:kr,60:Gr,84:Xn,92:290,105:ae,107:242,108:243,109:lt,110:Xt,111:oe,112:Tr},e(Bt,[2,62]),e(V,[2,33]),e(Ie,[2,124],{106:Jr}),e(Ie,[2,125],{106:Jr})],defaultActions:{},parseError:s(function(Ce,Ne){if(Ne.recoverable)this.trace(Ce);else{var je=new Error(Ce);throw je.hash=Ne,je}},"parseError"),parse:s(function(Ce){var Ne=this,je=[0],ie=[],li=[null],Z=[],jh=this.table,tt="",Zi=0,b$=0,k$=0,axt=2,T$=1,oxt=Z.slice.call(arguments,1),kn=Object.create(this.lexer),Uh={yy:{}};for(var Jv in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jv)&&(Uh.yy[Jv]=this.yy[Jv]);kn.setInput(Ce,Uh.yy),Uh.yy.lexer=kn,Uh.yy.parser=this,typeof kn.yylloc>"u"&&(kn.yylloc={});var t3=kn.yylloc;Z.push(t3);var lxt=kn.options&&kn.options.ranges;typeof Uh.yy.parseError=="function"?this.parseError=Uh.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wYt(fa){je.length=je.length-2*fa,li.length=li.length-fa,Z.length=Z.length-fa}s(wYt,"popStack");function cxt(){var fa;return fa=ie.pop()||kn.lex()||T$,typeof fa!="number"&&(fa instanceof Array&&(ie=fa,fa=ie.pop()),fa=Ne.symbols_[fa]||fa),fa}s(cxt,"lex");for(var ds,e3,Hh,Ma,_Yt,r3,up={},g2,nc,C$,y2;;){if(Hh=je[je.length-1],this.defaultActions[Hh]?Ma=this.defaultActions[Hh]:((ds===null||typeof ds>"u")&&(ds=cxt()),Ma=jh[Hh]&&jh[Hh][ds]),typeof Ma>"u"||!Ma.length||!Ma[0]){var i3="";y2=[];for(g2 in jh[Hh])this.terminals_[g2]&&g2>axt&&y2.push("'"+this.terminals_[g2]+"'");kn.showPosition?i3="Parse error on line "+(Zi+1)+`: +`+kn.showPosition()+` +Expecting `+y2.join(", ")+", got '"+(this.terminals_[ds]||ds)+"'":i3="Parse error on line "+(Zi+1)+": Unexpected "+(ds==T$?"end of input":"'"+(this.terminals_[ds]||ds)+"'"),this.parseError(i3,{text:kn.match,token:this.terminals_[ds]||ds,line:kn.yylineno,loc:t3,expected:y2})}if(Ma[0]instanceof Array&&Ma.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Hh+", token: "+ds);switch(Ma[0]){case 1:je.push(ds),li.push(kn.yytext),Z.push(kn.yylloc),je.push(Ma[1]),ds=null,e3?(ds=e3,e3=null):(b$=kn.yyleng,tt=kn.yytext,Zi=kn.yylineno,t3=kn.yylloc,k$>0&&k$--);break;case 2:if(nc=this.productions_[Ma[1]][1],up.$=li[li.length-nc],up._$={first_line:Z[Z.length-(nc||1)].first_line,last_line:Z[Z.length-1].last_line,first_column:Z[Z.length-(nc||1)].first_column,last_column:Z[Z.length-1].last_column},lxt&&(up._$.range=[Z[Z.length-(nc||1)].range[0],Z[Z.length-1].range[1]]),r3=this.performAction.apply(up,[tt,b$,Zi,Uh.yy,Ma[1],li,Z].concat(oxt)),typeof r3<"u")return r3;nc&&(je=je.slice(0,-1*nc*2),li=li.slice(0,-1*nc),Z=Z.slice(0,-1*nc)),je.push(this.productions_[Ma[1]][0]),li.push(up.$),Z.push(up._$),C$=jh[je[je.length-2]][je[je.length-1]],je.push(C$);break;case 3:return!0}}return!0},"parse")},ou=(function(){var oi={EOF:1,parseError:s(function(Ne,je){if(this.yy.parser)this.yy.parser.parseError(Ne,je);else throw new Error(Ne)},"parseError"),setInput:s(function(Ce,Ne){return this.yy=Ne||this.yy||{},this._input=Ce,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var Ce=this._input[0];this.yytext+=Ce,this.yyleng++,this.offset++,this.match+=Ce,this.matched+=Ce;var Ne=Ce.match(/(?:\r\n?|\n).*/g);return Ne?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ce},"input"),unput:s(function(Ce){var Ne=Ce.length,je=Ce.split(/(?:\r\n?|\n)/g);this._input=Ce+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ne),this.offset-=Ne;var ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),je.length-1&&(this.yylineno-=je.length-1);var li=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:je?(je.length===ie.length?this.yylloc.first_column:0)+ie[ie.length-je.length].length-je[0].length:this.yylloc.first_column-Ne},this.options.ranges&&(this.yylloc.range=[li[0],li[0]+this.yyleng-Ne]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(Ce){this.unput(this.match.slice(Ce))},"less"),pastInput:s(function(){var Ce=this.matched.substr(0,this.matched.length-this.match.length);return(Ce.length>20?"...":"")+Ce.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Ce=this.match;return Ce.length<20&&(Ce+=this._input.substr(0,20-Ce.length)),(Ce.substr(0,20)+(Ce.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Ce=this.pastInput(),Ne=new Array(Ce.length+1).join("-");return Ce+this.upcomingInput()+` +`+Ne+"^"},"showPosition"),test_match:s(function(Ce,Ne){var je,ie,li;if(this.options.backtrack_lexer&&(li={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(li.yylloc.range=this.yylloc.range.slice(0))),ie=Ce[0].match(/(?:\r\n?|\n).*/g),ie&&(this.yylineno+=ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ie?ie[ie.length-1].length-ie[ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ce[0].length},this.yytext+=Ce[0],this.match+=Ce[0],this.matches=Ce,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ce[0].length),this.matched+=Ce[0],je=this.performAction.call(this,this.yy,this,Ne,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),je)return je;if(this._backtrack){for(var Z in li)this[Z]=li[Z];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ce,Ne,je,ie;this._more||(this.yytext="",this.match="");for(var li=this._currentRules(),Z=0;ZNe[0].length)){if(Ne=je,ie=Z,this.options.backtrack_lexer){if(Ce=this.test_match(je,li[Z]),Ce!==!1)return Ce;if(this._backtrack){Ne=!1;continue}else return!1}else if(!this.options.flex)break}return Ne?(Ce=this.test_match(Ne,li[ie]),Ce!==!1?Ce:!1):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:s(function(){var Ne=this.next();return Ne||this.lex()},"lex"),begin:s(function(Ne){this.conditionStack.push(Ne)},"begin"),popState:s(function(){var Ne=this.conditionStack.length-1;return Ne>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(Ne){return Ne=this.conditionStack.length-1-Math.abs(Ne||0),Ne>=0?this.conditionStack[Ne]:"INITIAL"},"topState"),pushState:s(function(Ne){this.begin(Ne)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(Ne,je,ie,li){var Z=li;switch(ie){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),je.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let jh=/\n\s*/g;return je.yytext=je.yytext.replace(jh,"
    "),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return Ne.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return Ne.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return Ne.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;break;case 70:return this.pushState("edgeText"),75;break;case 71:return 119;case 72:return this.popState(),77;break;case 73:return this.pushState("thickEdgeText"),75;break;case 74:return 119;case 75:return this.popState(),77;break;case 76:return this.pushState("dottedEdgeText"),75;break;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;break;case 80:return"TEXT";case 81:return this.pushState("ellipseText"),52;break;case 82:return this.popState(),55;break;case 83:return this.pushState("text"),54;break;case 84:return this.popState(),57;break;case 85:return this.pushState("text"),56;break;case 86:return 58;case 87:return this.pushState("text"),67;break;case 88:return this.popState(),64;break;case 89:return this.pushState("text"),63;break;case 90:return this.popState(),49;break;case 91:return this.pushState("text"),48;break;case 92:return this.popState(),69;break;case 93:return this.popState(),71;break;case 94:return 117;case 95:return this.pushState("trapText"),68;break;case 96:return this.pushState("trapText"),70;break;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;break;case 109:return this.pushState("text"),62;break;case 110:return this.popState(),51;break;case 111:return this.pushState("text"),50;break;case 112:return this.popState(),31;break;case 113:return this.pushState("text"),29;break;case 114:return this.popState(),66;break;case 115:return this.pushState("text"),65;break;case 116:return"TEXT";case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}};return oi})();da.lexer=ou;function qh(){this.yy={}}return s(qh,"Parser"),qh.prototype=da,da.Parser=qh,new qh})();P6.parser=P6;$6=P6});var dit,fit,pit=b(()=>{"use strict";hit();dit=Object.assign({},$6);dit.parse=e=>{let t=e.replace(/}\s*\n/g,`} +`);return $6.parse(t)};fit=dit});var Pl,Gm=b(()=>{"use strict";Pl=s(()=>` + /* Font Awesome icon styling - consolidated */ + .label-icon { + display: inline-block; + height: 1em; + overflow: visible; + vertical-align: -0.125em; + } + + .node .label-icon path { + fill: currentColor; + stroke: revert; + stroke-width: revert; + } +`,"getIconStyles")});var oMt,lMt,mit,git=b(()=>{"use strict";hn();Gm();oMt=s((e,t)=>{let r=Xh,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return qi(i,n,a,t)},"fade"),lMt=s(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth??2}px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${oMt(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + .label rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + ${Pl()} +`,"getStyles"),mit=lMt});var F6={};Fe(F6,{diagram:()=>cMt});var cMt,V6=b(()=>{"use strict";ye();dQ();uit();pit();git();cMt={parser:fit,get db(){return new uC},renderer:cit,styles:mit,init:s(e=>{e.flowchart||(e.flowchart={}),e.layout&&s1({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,s1({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}});var z6,Tit,Cit=b(()=>{"use strict";z6=(function(){var e=s(function(yt,Et,Ct,Bt){for(Ct=Ct||{},Bt=yt.length;Bt--;Ct[yt[Bt]]=Et);return Ct},"o"),t=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],n=[1,12],a=[1,13],o=[1,23],l=[1,24],u=[1,25],h=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],g=[1,20],y=[1,18],x=[1,21],k=[1,22],T=[1,36],C=[1,37],_=[1,38],S=[1,39],w=[1,40],A=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],v=[1,45],M=[1,46],$=[1,55],I=[40,48,50,51,52,70,71],F=[1,66],B=[1,64],O=[1,61],R=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],E=[65,66,67,68,69],D=[1,84],V=[1,83],L=[1,81],q=[1,82],H=[6,10,42,47],K=[6,10,13,41,42,47,48,49],U=[1,92],st=[1,91],X=[1,90],ut=[19,58],ot=[1,101],mt=[1,100],ht=[19,58,60,62],it={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:s(function(Et,Ct,Bt,Lt,ee,at,$e){var pt=at.length-1;switch(ee){case 1:break;case 2:this.$=[];break;case 3:at[pt-1].push(at[pt]),this.$=at[pt-1];break;case 4:case 5:this.$=at[pt];break;case 6:case 7:this.$=[];break;case 8:Lt.addEntity(at[pt-4]),Lt.addEntity(at[pt-2]),Lt.addRelationship(at[pt-4],at[pt],at[pt-2],at[pt-3]);break;case 9:Lt.addEntity(at[pt-8]),Lt.addEntity(at[pt-4]),Lt.addRelationship(at[pt-8],at[pt],at[pt-4],at[pt-5]),Lt.setClass([at[pt-8]],at[pt-6]),Lt.setClass([at[pt-4]],at[pt-2]);break;case 10:Lt.addEntity(at[pt-6]),Lt.addEntity(at[pt-2]),Lt.addRelationship(at[pt-6],at[pt],at[pt-2],at[pt-3]),Lt.setClass([at[pt-6]],at[pt-4]);break;case 11:Lt.addEntity(at[pt-6]),Lt.addEntity(at[pt-4]),Lt.addRelationship(at[pt-6],at[pt],at[pt-4],at[pt-5]),Lt.setClass([at[pt-4]],at[pt-2]);break;case 12:Lt.addEntity(at[pt-3]),Lt.addAttributes(at[pt-3],at[pt-1]);break;case 13:Lt.addEntity(at[pt-5]),Lt.addAttributes(at[pt-5],at[pt-1]),Lt.setClass([at[pt-5]],at[pt-3]);break;case 14:Lt.addEntity(at[pt-2]);break;case 15:Lt.addEntity(at[pt-4]),Lt.setClass([at[pt-4]],at[pt-2]);break;case 16:Lt.addEntity(at[pt]);break;case 17:Lt.addEntity(at[pt-2]),Lt.setClass([at[pt-2]],at[pt]);break;case 18:Lt.addEntity(at[pt-6],at[pt-4]),Lt.addAttributes(at[pt-6],at[pt-1]);break;case 19:Lt.addEntity(at[pt-8],at[pt-6]),Lt.addAttributes(at[pt-8],at[pt-1]),Lt.setClass([at[pt-8]],at[pt-3]);break;case 20:Lt.addEntity(at[pt-5],at[pt-3]);break;case 21:Lt.addEntity(at[pt-7],at[pt-5]),Lt.setClass([at[pt-7]],at[pt-2]);break;case 22:Lt.addEntity(at[pt-3],at[pt-1]);break;case 23:Lt.addEntity(at[pt-5],at[pt-3]),Lt.setClass([at[pt-5]],at[pt]);break;case 24:case 25:this.$=at[pt].trim(),Lt.setAccTitle(this.$);break;case 26:case 27:this.$=at[pt].trim(),Lt.setAccDescription(this.$);break;case 32:Lt.setDirection("TB");break;case 33:Lt.setDirection("BT");break;case 34:Lt.setDirection("RL");break;case 35:Lt.setDirection("LR");break;case 36:this.$=at[pt-3],Lt.addClass(at[pt-2],at[pt-1]);break;case 37:case 38:case 59:case 67:this.$=[at[pt]];break;case 39:case 40:this.$=at[pt-2].concat([at[pt]]);break;case 41:this.$=at[pt-2],Lt.setClass(at[pt-1],at[pt]);break;case 42:this.$=at[pt-3],Lt.addCssStyles(at[pt-2],at[pt-1]);break;case 43:this.$=[at[pt]];break;case 44:at[pt-2].push(at[pt]),this.$=at[pt-2];break;case 46:this.$=at[pt-1]+at[pt];break;case 54:case 79:case 80:this.$=at[pt].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=at[pt];break;case 60:at[pt].push(at[pt-1]),this.$=at[pt];break;case 61:this.$={type:at[pt-1],name:at[pt]};break;case 62:this.$={type:at[pt-2],name:at[pt-1],keys:at[pt]};break;case 63:this.$={type:at[pt-2],name:at[pt-1],comment:at[pt]};break;case 64:this.$={type:at[pt-3],name:at[pt-2],keys:at[pt-1],comment:at[pt]};break;case 65:case 66:case 69:this.$=at[pt];break;case 68:at[pt-2].push(at[pt]),this.$=at[pt-2];break;case 70:this.$=at[pt].replace(/"/g,"");break;case 71:this.$={cardA:at[pt],relType:at[pt-1],cardB:at[pt-2]};break;case 72:this.$=Lt.Cardinality.ZERO_OR_ONE;break;case 73:this.$=Lt.Cardinality.ZERO_OR_MORE;break;case 74:this.$=Lt.Cardinality.ONE_OR_MORE;break;case 75:this.$=Lt.Cardinality.ONLY_ONE;break;case 76:this.$=Lt.Cardinality.MD_PARENT;break;case 77:this.$=Lt.Identification.NON_IDENTIFYING;break;case 78:this.$=Lt.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:n,28:a,29:14,30:15,31:16,32:17,33:o,34:l,35:u,36:h,37:d,40:f,43:p,44:m,48:g,50:y,51:x,52:k},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:30,11:9,22:r,24:i,26:n,28:a,29:14,30:15,31:16,32:17,33:o,34:l,35:u,36:h,37:d,40:f,43:p,44:m,48:g,50:y,51:x,52:k},e(t,[2,5]),e(t,[2,6]),e(t,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:T,66:C,67:_,68:S,69:w}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(t,[2,27]),e(t,[2,28]),e(t,[2,29]),e(t,[2,30]),e(t,[2,31]),e(A,[2,54]),e(A,[2,55]),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(t,[2,32]),e(t,[2,33]),e(t,[2,34]),e(t,[2,35]),{16:44,40:v,41:M},{16:47,40:v,41:M},{16:48,40:v,41:M},e(t,[2,4]),{11:49,40:f,48:g,50:y,51:x,52:k},{16:50,40:v,41:M},{18:51,19:[1,52],53:53,54:54,58:$},{11:56,40:f,48:g,50:y,51:x,52:k},{64:57,70:[1,58],71:[1,59]},e(I,[2,72]),e(I,[2,73]),e(I,[2,74]),e(I,[2,75]),e(I,[2,76]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),{13:F,38:60,41:B,42:O,45:62,46:63,48:R,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:v,41:M,42:O},{13:F,38:69,41:B,42:O,45:62,46:63,48:R,49:N},{13:[1,70],15:[1,71]},e(t,[2,17],{63:35,12:72,17:[1,73],42:O,65:T,66:C,67:_,68:S,69:w}),{19:[1,74]},e(t,[2,14]),{18:75,19:[2,59],53:53,54:54,58:$},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:T,66:C,67:_,68:S,69:w},e(E,[2,77]),e(E,[2,78]),{6:D,10:V,39:80,42:L,47:q},{40:[1,85],41:[1,86]},e(H,[2,43],{46:87,13:F,41:B,48:R,49:N}),e(K,[2,45]),e(K,[2,50]),e(K,[2,51]),e(K,[2,52]),e(K,[2,53]),e(t,[2,41],{42:O}),{6:D,10:V,39:88,42:L,47:q},{14:89,40:U,50:st,72:X},{16:93,40:v,41:M},{11:94,40:f,48:g,50:y,51:x,52:k},{18:95,19:[1,96],53:53,54:54,58:$},e(t,[2,12]),{19:[2,60]},e(ut,[2,61],{56:97,57:98,59:99,61:ot,62:mt}),e([19,58,61,62],[2,66]),e(t,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(t,[2,36]),{13:F,41:B,45:104,46:63,48:R,49:N},e(t,[2,47]),e(t,[2,48]),e(t,[2,49]),e(P,[2,39]),e(P,[2,40]),e(K,[2,46]),e(t,[2,42]),e(t,[2,8]),e(t,[2,79]),e(t,[2,80]),e(t,[2,81]),{13:[1,105],42:O},{13:[1,107],15:[1,106]},{19:[1,108]},e(t,[2,15]),e(ut,[2,62],{57:109,60:[1,110],62:mt}),e(ut,[2,63]),e(ht,[2,67]),e(ut,[2,70]),e(ht,[2,69]),{18:111,19:[1,112],53:53,54:54,58:$},{16:113,40:v,41:M},e(H,[2,44],{46:87,13:F,41:B,48:R,49:N}),{14:114,40:U,50:st,72:X},{16:115,40:v,41:M},{14:116,40:U,50:st,72:X},e(t,[2,13]),e(ut,[2,64]),{59:117,61:ot},{19:[1,118]},e(t,[2,20]),e(t,[2,23],{17:[1,119],42:O}),e(t,[2,11]),{13:[1,120],42:O},e(t,[2,10]),e(ht,[2,68]),e(t,[2,18]),{18:121,19:[1,122],53:53,54:54,58:$},{14:123,40:U,50:st,72:X},{19:[1,124]},e(t,[2,21]),e(t,[2,9]),e(t,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:s(function(Et,Ct){if(Ct.recoverable)this.trace(Et);else{var Bt=new Error(Et);throw Bt.hash=Ct,Bt}},"parseError"),parse:s(function(Et){var Ct=this,Bt=[0],Lt=[],ee=[null],at=[],$e=this.table,pt="",Wt=0,Ht=0,Dt=0,bt=2,Gt=1,G=at.slice.call(arguments,1),nt=Object.create(this.lexer),W={yy:{}};for(var Rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Rt)&&(W.yy[Rt]=this.yy[Rt]);nt.setInput(Et,W.yy),W.yy.lexer=nt,W.yy.parser=this,typeof nt.yylloc>"u"&&(nt.yylloc={});var Y=nt.yylloc;at.push(Y);var At=nt.options&&nt.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xt(Sr){Bt.length=Bt.length-2*Sr,ee.length=ee.length-Sr,at.length=at.length-Sr}s(xt,"popStack");function Zt(){var Sr;return Sr=Lt.pop()||nt.lex()||Gt,typeof Sr!="number"&&(Sr instanceof Array&&(Lt=Sr,Sr=Lt.pop()),Sr=Ct.symbols_[Sr]||Sr),Sr}s(Zt,"lex");for(var Nt,wt,he,gt,te,ne,It={},ke,J,Xe,rt;;){if(he=Bt[Bt.length-1],this.defaultActions[he]?gt=this.defaultActions[he]:((Nt===null||typeof Nt>"u")&&(Nt=Zt()),gt=$e[he]&&$e[he][Nt]),typeof gt>"u"||!gt.length||!gt[0]){var or="";rt=[];for(ke in $e[he])this.terminals_[ke]&&ke>bt&&rt.push("'"+this.terminals_[ke]+"'");nt.showPosition?or="Parse error on line "+(Wt+1)+`: +`+nt.showPosition()+` +Expecting `+rt.join(", ")+", got '"+(this.terminals_[Nt]||Nt)+"'":or="Parse error on line "+(Wt+1)+": Unexpected "+(Nt==Gt?"end of input":"'"+(this.terminals_[Nt]||Nt)+"'"),this.parseError(or,{text:nt.match,token:this.terminals_[Nt]||Nt,line:nt.yylineno,loc:Y,expected:rt})}if(gt[0]instanceof Array&>.length>1)throw new Error("Parse Error: multiple actions possible at state: "+he+", token: "+Nt);switch(gt[0]){case 1:Bt.push(Nt),ee.push(nt.yytext),at.push(nt.yylloc),Bt.push(gt[1]),Nt=null,wt?(Nt=wt,wt=null):(Ht=nt.yyleng,pt=nt.yytext,Wt=nt.yylineno,Y=nt.yylloc,Dt>0&&Dt--);break;case 2:if(J=this.productions_[gt[1]][1],It.$=ee[ee.length-J],It._$={first_line:at[at.length-(J||1)].first_line,last_line:at[at.length-1].last_line,first_column:at[at.length-(J||1)].first_column,last_column:at[at.length-1].last_column},At&&(It._$.range=[at[at.length-(J||1)].range[0],at[at.length-1].range[1]]),ne=this.performAction.apply(It,[pt,Ht,Wt,W.yy,gt[1],ee,at].concat(G)),typeof ne<"u")return ne;J&&(Bt=Bt.slice(0,-1*J*2),ee=ee.slice(0,-1*J),at=at.slice(0,-1*J)),Bt.push(this.productions_[gt[1]][0]),ee.push(It.$),at.push(It._$),Xe=$e[Bt[Bt.length-2]][Bt[Bt.length-1]],Bt.push(Xe);break;case 3:return!0}}return!0},"parse")},Ot=(function(){var yt={EOF:1,parseError:s(function(Ct,Bt){if(this.yy.parser)this.yy.parser.parseError(Ct,Bt);else throw new Error(Ct)},"parseError"),setInput:s(function(Et,Ct){return this.yy=Ct||this.yy||{},this._input=Et,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var Et=this._input[0];this.yytext+=Et,this.yyleng++,this.offset++,this.match+=Et,this.matched+=Et;var Ct=Et.match(/(?:\r\n?|\n).*/g);return Ct?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Et},"input"),unput:s(function(Et){var Ct=Et.length,Bt=Et.split(/(?:\r\n?|\n)/g);this._input=Et+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ct),this.offset-=Ct;var Lt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Bt.length-1&&(this.yylineno-=Bt.length-1);var ee=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Bt?(Bt.length===Lt.length?this.yylloc.first_column:0)+Lt[Lt.length-Bt.length].length-Bt[0].length:this.yylloc.first_column-Ct},this.options.ranges&&(this.yylloc.range=[ee[0],ee[0]+this.yyleng-Ct]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(Et){this.unput(this.match.slice(Et))},"less"),pastInput:s(function(){var Et=this.matched.substr(0,this.matched.length-this.match.length);return(Et.length>20?"...":"")+Et.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Et=this.match;return Et.length<20&&(Et+=this._input.substr(0,20-Et.length)),(Et.substr(0,20)+(Et.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Et=this.pastInput(),Ct=new Array(Et.length+1).join("-");return Et+this.upcomingInput()+` +`+Ct+"^"},"showPosition"),test_match:s(function(Et,Ct){var Bt,Lt,ee;if(this.options.backtrack_lexer&&(ee={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ee.yylloc.range=this.yylloc.range.slice(0))),Lt=Et[0].match(/(?:\r\n?|\n).*/g),Lt&&(this.yylineno+=Lt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Lt?Lt[Lt.length-1].length-Lt[Lt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Et[0].length},this.yytext+=Et[0],this.match+=Et[0],this.matches=Et,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Et[0].length),this.matched+=Et[0],Bt=this.performAction.call(this,this.yy,this,Ct,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Bt)return Bt;if(this._backtrack){for(var at in ee)this[at]=ee[at];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Et,Ct,Bt,Lt;this._more||(this.yytext="",this.match="");for(var ee=this._currentRules(),at=0;atCt[0].length)){if(Ct=Bt,Lt=at,this.options.backtrack_lexer){if(Et=this.test_match(Bt,ee[at]),Et!==!1)return Et;if(this._backtrack){Ct=!1;continue}else return!1}else if(!this.options.flex)break}return Ct?(Et=this.test_match(Ct,ee[Lt]),Et!==!1?Et:!1):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:s(function(){var Ct=this.next();return Ct||this.lex()},"lex"),begin:s(function(Ct){this.conditionStack.push(Ct)},"begin"),popState:s(function(){var Ct=this.conditionStack.length-1;return Ct>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(Ct){return Ct=this.conditionStack.length-1-Math.abs(Ct||0),Ct>=0?this.conditionStack[Ct]:"INITIAL"},"topState"),pushState:s(function(Ct){this.begin(Ct)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(Ct,Bt,Lt,ee){var at=ee;switch(Lt){case 0:return this.begin("acc_title"),24;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),26;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;break;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 61;case 25:return 58;case 26:return 58;case 27:return 62;case 28:break;case 29:return this.popState(),19;break;case 30:return Bt.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;break;case 34:return this.popState(),10;break;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;break;case 40:return 43;case 41:return 65;case 42:return 67;case 43:return 67;case 44:return 67;case 45:return 65;case 46:return 65;case 47:return 66;case 48:return 66;case 49:return 66;case 50:return 66;case 51:return 66;case 52:return 67;case 53:return 66;case 54:return 67;case 55:return 68;case 56:return 68;case 57:return 51;case 58:return 68;case 59:return 68;case 60:return 68;case 61:return 52;case 62:return 48;case 63:return 68;case 64:return 65;case 65:return 66;case 66:return 67;case 67:return 69;case 68:return 70;case 69:return 71;case 70:return 71;case 71:return 70;case 72:return 70;case 73:return 70;case 74:return 41;case 75:return 47;case 76:return 40;case 77:return Bt.yytext[0];case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78],inclusive:!0}}};return yt})();it.lexer=Ot;function St(){this.yy={}}return s(St,"Parser"),St.prototype=it,it.Parser=St,new St})();z6.parser=z6;Tit=z6});var _S,Sit=b(()=>{"use strict";Jt();ye();yi();Re();_S=class{constructor(){this.entities=new Map;this.relationships=[];this.classes=new Map;this.direction="TB";this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"};this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"};this.setAccTitle=Ye;this.getAccTitle=Ze;this.setAccDescription=Je;this.getAccDescription=tr;this.setDiagramTitle=sr;this.getDiagramTitle=er;this.getConfig=s(()=>Q().er,"getConfig");this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{s(this,"ErDB")}addEntity(t,r=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&r&&(this.entities.get(t).alias=r,z.info(`Add alias '${r}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:r,shape:"erBox",look:Q().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),z.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,r){let i=this.addEntity(t),n;for(n=r.length-1;n>=0;n--)r[n].keys||(r[n].keys=[]),r[n].comment||(r[n].comment=""),i.attributes.push(r[n]),z.debug("Added attribute ",r[n].name)}addRelationship(t,r,i,n){let a=this.entities.get(t),o=this.entities.get(i);if(!a||!o)return;let l={entityA:a.id,roleA:r,entityB:o.id,relSpec:n};this.relationships.push(l),z.debug("Added new relationship :",l)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let r=[];for(let i of t){let n=this.classes.get(i);n?.styles&&(r=[...r,...n.styles??[]].map(a=>a.trim())),n?.textStyles&&(r=[...r,...n.textStyles??[]].map(a=>a.trim()))}return r}addCssStyles(t,r){for(let i of t){let n=this.entities.get(i);if(!r||!n)return;for(let a of r)n.cssStyles.push(a)}}addClass(t,r){t.forEach(i=>{let n=this.classes.get(i);n===void 0&&(n={id:i,styles:[],textStyles:[]},this.classes.set(i,n)),r&&r.forEach(function(a){if(/color/.exec(a)){let o=a.replace("fill","bgFill");n.textStyles.push(o)}n.styles.push(a)})})}setClass(t,r){for(let i of t){let n=this.entities.get(i);if(n)for(let a of r)n.cssClasses+=" "+a}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],He()}getData(){let t=[],r=[],i=Q(),n=0;for(let o of this.entities.keys()){let l=this.entities.get(o);l&&(l.cssCompiledStyles=this.getCompiledStyles(l.cssClasses.split(" ")),l.colorIndex=n++,t.push(l))}let a=0;for(let o of this.relationships){let l={id:Nu(o.entityA,o.entityB,{prefix:"id",counter:a++}),type:"normal",curve:"basis",start:o.entityA,end:o.entityB,label:o.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:o.relSpec.cardB.toLowerCase(),arrowTypeEnd:o.relSpec.cardA.toLowerCase(),pattern:o.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:i.look,labelType:"markdown"};r.push(l)}return{nodes:t,edges:r,other:{},config:i,direction:"TB"}}}});var G6={};Fe(G6,{draw:()=>gMt});var gMt,wit=b(()=>{"use strict";ye();Jt();bm();Yd();Xd();Re();lr();gMt=s(async function(e,t,r,i){z.info("REF0:"),z.info("Drawing er diagram (unified)",t);let{securityLevel:n,er:a,layout:o}=Q(),l=i.db.getData(),u=vl(t,n);l.type=i.type,l.layoutAlgorithm=Zu(o),l.config.flowchart.nodeSpacing=a?.nodeSpacing||140,l.config.flowchart.rankSpacing=a?.rankSpacing||80,l.direction=i.db.getDirection();let{config:h}=l,{look:d}=h;d==="neo"?l.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:l.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],l.diagramId=t,await Bl(l,u),l.layoutAlgorithm==="elk"&&u.select(".edges").lower();let f=u.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){let m=vt(this),y=m.attr("id").replace("-background",""),x=u.select(`#${CSS.escape(y)}`);if(!x.empty()){let k=x.attr("transform");m.attr("transform",k)}});let p=8;Te.insertTitle(u,"erDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),ro(u,p,"erDiagram",a?.useMaxWidth??!0)},"draw")});var _it,ES,yMt,xMt,Eit,vit=b(()=>{"use strict";hn();_it=s((e,t)=>{let r=Xh,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return qi(i,n,a,t)},"fade"),ES=new Set(["redux-color","redux-dark-color"]),yMt=s(e=>{let{theme:t,look:r,bkgColorArray:i,borderColorArray:n}=e;if(!ES.has(t))return"";let a=i?.length>0,o="";for(let l=0;l{let{look:t,theme:r,erEdgeLabelBackground:i,strokeWidth:n}=e;return` + ${yMt(e)} + .entityBox { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${e.tertiaryColor}; + opacity: 0.7; + background-color: ${e.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .labelBkg { + background-color: ${ES.has(r)&&i?i:_it(e.tertiaryColor,.5)}; + } + + .edgeLabel { + background-color: ${ES.has(r)&&i?i:e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${ES.has(r)&&i?i:e.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${e.textColor}; + } + + .edgeLabel .label { + fill: ${e.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${t==="neo"?n:"1px"}; + } + + .relationshipLine { + stroke: ${e.lineColor}; + stroke-width: ${t==="neo"?n:"1px"}; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; + } + [data-look=neo].labelBkg { + background-color: ${_it(e.tertiaryColor,.5)}; + } +`},"getStyles"),Eit=xMt});var Ait={};Fe(Ait,{diagram:()=>bMt});var bMt,Rit=b(()=>{"use strict";Cit();Sit();wit();vit();bMt={parser:Tit,get db(){return new _S},renderer:G6,styles:Eit}});function Mi(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}function pn(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}function Sa(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}function W6(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}function Qd(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}function zo(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}function Ju(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}function Y0(e){return zo(e)&&typeof e.fullText=="string"}var Kd,Go=b(()=>{"use strict";s(Mi,"isAstNode");s(pn,"isReference");s(Sa,"isMultiReference");s(W6,"isAstNodeDescription");s(Qd,"isLinkingError");Kd=class{static{s(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(t){let r=this.types[t.container.$type];if(!r)throw new Error(`Type ${t.container.$type||"undefined"} not found.`);let i=r.properties[t.property]?.referenceType;if(!i)throw new Error(`Property ${t.property||"undefined"} of type ${t.container.$type} is not a reference.`);return i}getTypeMetaData(t){let r=this.types[t];return r||{name:t,properties:{},superTypes:[]}}isInstance(t,r){return Mi(t)&&this.isSubtype(t.$type,r)}isSubtype(t,r){if(t===r)return!0;let i=this.subtypes[t];i||(i=this.subtypes[t]={});let n=i[r];if(n!==void 0)return n;{let a=this.types[t],o=a?a.superTypes.some(l=>this.isSubtype(l,r)):!1;return i[r]=o,o}}getAllSubTypes(t){let r=this.allSubtypes[t];if(r)return r;{let i=this.getAllTypes(),n=[];for(let a of i)this.isSubtype(a,t)&&n.push(a);return this.allSubtypes[t]=n,n}}};s(zo,"isCompositeCstNode");s(Ju,"isLeafCstNode");s(Y0,"isRootCstNode")});function wMt(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}function vS(e){return!!e&&typeof e[Symbol.iterator]=="function"}function mr(...e){if(e.length===1){let t=e[0];if(t instanceof wa)return t;if(vS(t))return new wa(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new wa(()=>({index:0}),r=>r.index1?new wa(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let r=t.iterator.next();if(!r.done)return r;t.iterator=void 0}if(t.array){if(t.arrIndex{"use strict";wa=class e{static{s(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:s(()=>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(),r=0,i=t.next();for(;!i.done;)r++,i=t.next();return r}toArray(){let t=[],r=this.iterator(),i;do i=r.next(),i.value!==void 0&&t.push(i.value);while(!i.done);return t}toSet(){return new Set(this)}toMap(t,r){let i=this.map(n=>[t?t(n):n,r?r(n):n]);return new Map(i)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),r=>{let i;if(!r.firstDone){do if(i=this.nextFn(r.first),!i.done)return i;while(!i.done);r.firstDone=!0}do if(i=r.iterator.next(),!i.done)return i;while(!i.done);return is})}join(t=","){let r=this.iterator(),i="",n,a=!1;do n=r.next(),n.done||(a&&(i+=t),i+=wMt(n.value)),a=!0;while(!n.done);return i}indexOf(t,r=0){let i=this.iterator(),n=0,a=i.next();for(;!a.done;){if(n>=r&&a.value===t)return n;a=i.next(),n++}return-1}every(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(!t(i.value))return!1;i=r.next()}return!0}some(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(t(i.value))return!0;i=r.next()}return!1}forEach(t){let r=this.iterator(),i=0,n=r.next();for(;!n.done;)t(n.value,i),n=r.next(),i++}map(t){return new e(this.startFn,r=>{let{done:i,value:n}=this.nextFn(r);return i?is:{done:!1,value:t(n)}})}filter(t){return new e(this.startFn,r=>{let i;do if(i=this.nextFn(r),!i.done&&t(i.value))return i;while(!i.done);return is})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let i=this.iterator(),n=r,a=i.next();for(;!a.done;)n===void 0?n=a.value:n=t(n,a.value),a=i.next();return n}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,i){let n=t.next();if(n.done)return i;let a=this.recursiveReduce(t,r,i);return a===void 0?n.value:r(a,n.value)}find(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(t(i.value))return i.value;i=r.next()}}findIndex(t){let r=this.iterator(),i=0,n=r.next();for(;!n.done;){if(t(n.value))return i;n=r.next(),i++}return-1}includes(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(i.value===t)return!0;i=r.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:i,value:n}=this.nextFn(r.this);if(!i){let a=t(n);if(vS(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return is})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new e(()=>({this:r.startFn()}),i=>{do{if(i.iterator){let o=i.iterator.next();if(o.done)i.iterator=void 0;else return o}let{done:n,value:a}=r.nextFn(i.this);if(!n)if(vS(a))i.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(i.iterator);return is})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new e(()=>{let r=this.startFn();for(let i=0;i({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?is:this.nextFn(r.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),r=>{let i;do if(i=this.nextFn(r.internalState),!i.done){let n=t?t(i.value):i.value;if(!r.set.has(n))return r.set.add(n),i}while(!i.done);return is})}exclude(t,r){let i=new Set;for(let n of t){let a=r?r(n):n;i.add(a)}return this.filter(n=>{let a=r?r(n):n;return!i.has(a)})}};s(wMt,"toString");s(vS,"isIterable");th=new wa(()=>{},()=>is),is=Object.freeze({done:!0,value:void 0});s(mr,"stream");$l=class extends wa{static{s(this,"TreeStreamImpl")}constructor(t,r,i){super(()=>({iterators:i?.includeRoot?[[t][Symbol.iterator]()]:[r(t)[Symbol.iterator]()],pruned:!1}),n=>{for(n.pruned&&(n.iterators.pop(),n.pruned=!1);n.iterators.length>0;){let o=n.iterators[n.iterators.length-1].next();if(o.done)n.iterators.pop();else return n.iterators.push(r(o.value)[Symbol.iterator]()),o}return is})}iterator(){let t={state:this.startFn(),next:s(()=>this.nextFn(t.state),"next"),prune:s(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}};(function(e){function t(a){return a.reduce((o,l)=>o+l,0)}s(t,"sum"),e.sum=t;function r(a){return a.reduce((o,l)=>o*l,0)}s(r,"product"),e.product=r;function i(a){return a.reduce((o,l)=>Math.min(o,l))}s(i,"min"),e.min=i;function n(a){return a.reduce((o,l)=>Math.max(o,l))}s(n,"max"),e.max=n})(Wm||(Wm={}))});var RS={};Fe(RS,{assignMandatoryProperties:()=>U6,copyAstNode:()=>j6,findRootNode:()=>jm,getContainerOfType:()=>Ic,getDocument:()=>ns,getReferenceNodes:()=>AS,hasContainerOfType:()=>_Mt,linkContentToContainer:()=>qm,streamAllContents:()=>Wo,streamAst:()=>_s,streamContents:()=>X0,streamReferences:()=>eh});function qm(e,t={}){for(let[r,i]of Object.entries(e))r.startsWith("$")||(Array.isArray(i)?i.forEach((n,a)=>{Mi(n)&&(n.$container=e,n.$containerProperty=r,n.$containerIndex=a,t.deep&&qm(n,t))}):Mi(i)&&(i.$container=e,i.$containerProperty=r,t.deep&&qm(i,t)))}function Ic(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function _Mt(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function ns(e){let r=jm(e).$document;if(!r)throw new Error("AST node has no document.");return r}function jm(e){for(;e.$container;)e=e.$container;return e}function AS(e){return pn(e)?e.ref?[e.ref]:[]:Sa(e)?e.items.map(t=>t.ref):[]}function X0(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new wa(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),i=>{for(;i.keyIndexX0(r,t))}function _s(e,t){if(e){if(t?.range&&!q6(e,t.range))return new $l(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new $l(e,r=>X0(r,t),{includeRoot:!0})}function q6(e,t){if(!t)return!0;let r=e.$cstNode?.range;return r?H6(r,t):!1}function eh(e){return new wa(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{"use strict";Go();ws();qo();s(qm,"linkContentToContainer");s(Ic,"getContainerOfType");s(_Mt,"hasContainerOfType");s(ns,"getDocument");s(jm,"findRootNode");s(AS,"getReferenceNodes");s(X0,"streamContents");s(Wo,"streamAllContents");s(_s,"streamAst");s(q6,"isAstNodeInRange");s(eh,"streamReferences");s(U6,"assignMandatoryProperties");s(Dit,"copyDefaultValue");s(j6,"copyAstNode")});var ax={};Fe(ax,{AbstractElement:()=>Zs,AbstractParserRule:()=>K0,AbstractRule:()=>Um,AbstractType:()=>_a,Action:()=>rh,Alternatives:()=>Q0,ArrayLiteral:()=>LS,ArrayType:()=>DS,Assignment:()=>ih,BooleanLiteral:()=>IS,CharacterRange:()=>nh,Condition:()=>sh,Conjunction:()=>Z0,CrossReference:()=>ah,Disjunction:()=>J0,EndOfFile:()=>NS,Grammar:()=>Nc,GrammarImport:()=>OS,Group:()=>Zd,InferredType:()=>MS,InfixRule:()=>Fl,InfixRuleOperatorList:()=>tx,InfixRuleOperators:()=>BS,Interface:()=>Hm,Keyword:()=>Ym,LangiumGrammarAstReflection:()=>Jm,LangiumGrammarTerminals:()=>EMt,NamedArgument:()=>Xm,NegatedToken:()=>Jd,Negation:()=>PS,NumberLiteral:()=>$S,Parameter:()=>Km,ParameterReference:()=>FS,ParserRule:()=>jo,ReferenceType:()=>ex,RegexToken:()=>tf,ReturnType:()=>VS,RuleCall:()=>ef,SimpleType:()=>Qm,StringLiteral:()=>zS,TerminalAlternatives:()=>rf,TerminalElement:()=>Js,TerminalGroup:()=>nf,TerminalRule:()=>Oc,TerminalRuleCall:()=>sf,Type:()=>rx,TypeAttribute:()=>af,TypeDefinition:()=>of,UnionType:()=>GS,UnorderedGroup:()=>ix,UntilToken:()=>lf,ValueLiteral:()=>cf,Wildcard:()=>Zm,isAbstractElement:()=>nx,isAbstractParserRule:()=>Mc,isAbstractRule:()=>vMt,isAbstractType:()=>AMt,isAction:()=>Bc,isAlternatives:()=>WS,isArrayLiteral:()=>RMt,isArrayType:()=>Y6,isAssignment:()=>Uo,isBooleanLiteral:()=>X6,isCharacterRange:()=>K6,isCondition:()=>LMt,isConjunction:()=>Q6,isCrossReference:()=>Ho,isDisjunction:()=>Z6,isEndOfFile:()=>J6,isGrammar:()=>DMt,isGrammarImport:()=>IMt,isGroup:()=>oh,isInferredType:()=>sx,isInfixRule:()=>lh,isInfixRuleOperatorList:()=>NMt,isInfixRuleOperators:()=>OMt,isInterface:()=>tI,isKeyword:()=>io,isNamedArgument:()=>MMt,isNegatedToken:()=>eI,isNegation:()=>rI,isNumberLiteral:()=>BMt,isParameter:()=>PMt,isParameterReference:()=>iI,isParserRule:()=>Ln,isReferenceType:()=>nI,isRegexToken:()=>sI,isReturnType:()=>aI,isRuleCall:()=>Yo,isSimpleType:()=>qS,isStringLiteral:()=>$Mt,isTerminalAlternatives:()=>oI,isTerminalElement:()=>FMt,isTerminalGroup:()=>lI,isTerminalRule:()=>Es,isTerminalRuleCall:()=>jS,isType:()=>US,isTypeAttribute:()=>VMt,isTypeDefinition:()=>zMt,isUnionType:()=>cI,isUnorderedGroup:()=>HS,isUntilToken:()=>uI,isValueLiteral:()=>GMt,isWildcard:()=>hI,reflection:()=>Me});function nx(e){return Me.isInstance(e,Zs.$type)}function Mc(e){return Me.isInstance(e,K0.$type)}function vMt(e){return Me.isInstance(e,Um.$type)}function AMt(e){return Me.isInstance(e,_a.$type)}function Bc(e){return Me.isInstance(e,rh.$type)}function WS(e){return Me.isInstance(e,Q0.$type)}function RMt(e){return Me.isInstance(e,LS.$type)}function Y6(e){return Me.isInstance(e,DS.$type)}function Uo(e){return Me.isInstance(e,ih.$type)}function X6(e){return Me.isInstance(e,IS.$type)}function K6(e){return Me.isInstance(e,nh.$type)}function LMt(e){return Me.isInstance(e,sh.$type)}function Q6(e){return Me.isInstance(e,Z0.$type)}function Ho(e){return Me.isInstance(e,ah.$type)}function Z6(e){return Me.isInstance(e,J0.$type)}function J6(e){return Me.isInstance(e,NS.$type)}function DMt(e){return Me.isInstance(e,Nc.$type)}function IMt(e){return Me.isInstance(e,OS.$type)}function oh(e){return Me.isInstance(e,Zd.$type)}function sx(e){return Me.isInstance(e,MS.$type)}function lh(e){return Me.isInstance(e,Fl.$type)}function NMt(e){return Me.isInstance(e,tx.$type)}function OMt(e){return Me.isInstance(e,BS.$type)}function tI(e){return Me.isInstance(e,Hm.$type)}function io(e){return Me.isInstance(e,Ym.$type)}function MMt(e){return Me.isInstance(e,Xm.$type)}function eI(e){return Me.isInstance(e,Jd.$type)}function rI(e){return Me.isInstance(e,PS.$type)}function BMt(e){return Me.isInstance(e,$S.$type)}function PMt(e){return Me.isInstance(e,Km.$type)}function iI(e){return Me.isInstance(e,FS.$type)}function Ln(e){return Me.isInstance(e,jo.$type)}function nI(e){return Me.isInstance(e,ex.$type)}function sI(e){return Me.isInstance(e,tf.$type)}function aI(e){return Me.isInstance(e,VS.$type)}function Yo(e){return Me.isInstance(e,ef.$type)}function qS(e){return Me.isInstance(e,Qm.$type)}function $Mt(e){return Me.isInstance(e,zS.$type)}function oI(e){return Me.isInstance(e,rf.$type)}function FMt(e){return Me.isInstance(e,Js.$type)}function lI(e){return Me.isInstance(e,nf.$type)}function Es(e){return Me.isInstance(e,Oc.$type)}function jS(e){return Me.isInstance(e,sf.$type)}function US(e){return Me.isInstance(e,rx.$type)}function VMt(e){return Me.isInstance(e,af.$type)}function zMt(e){return Me.isInstance(e,of.$type)}function cI(e){return Me.isInstance(e,GS.$type)}function HS(e){return Me.isInstance(e,ix.$type)}function uI(e){return Me.isInstance(e,lf.$type)}function GMt(e){return Me.isInstance(e,cf.$type)}function hI(e){return Me.isInstance(e,Zm.$type)}var EMt,Zs,K0,Um,_a,rh,Q0,LS,DS,ih,IS,nh,sh,Z0,ah,J0,NS,Nc,OS,Zd,MS,Fl,tx,BS,Hm,Ym,Xm,Jd,PS,$S,Km,FS,jo,ex,tf,VS,ef,Qm,zS,rf,Js,nf,Oc,sf,rx,af,of,GS,ix,lf,cf,Zm,Jm,Me,Ea=b(()=>{"use strict";Go();EMt={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]*/},Zs={$type:"AbstractElement",cardinality:"cardinality"};s(nx,"isAbstractElement");K0={$type:"AbstractParserRule"};s(Mc,"isAbstractParserRule");Um={$type:"AbstractRule"};s(vMt,"isAbstractRule");_a={$type:"AbstractType"};s(AMt,"isAbstractType");rh={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};s(Bc,"isAction");Q0={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};s(WS,"isAlternatives");LS={$type:"ArrayLiteral",elements:"elements"};s(RMt,"isArrayLiteral");DS={$type:"ArrayType",elementType:"elementType"};s(Y6,"isArrayType");ih={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};s(Uo,"isAssignment");IS={$type:"BooleanLiteral",true:"true"};s(X6,"isBooleanLiteral");nh={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};s(K6,"isCharacterRange");sh={$type:"Condition"};s(LMt,"isCondition");Z0={$type:"Conjunction",left:"left",right:"right"};s(Q6,"isConjunction");ah={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};s(Ho,"isCrossReference");J0={$type:"Disjunction",left:"left",right:"right"};s(Z6,"isDisjunction");NS={$type:"EndOfFile",cardinality:"cardinality"};s(J6,"isEndOfFile");Nc={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};s(DMt,"isGrammar");OS={$type:"GrammarImport",path:"path"};s(IMt,"isGrammarImport");Zd={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};s(oh,"isGroup");MS={$type:"InferredType",name:"name"};s(sx,"isInferredType");Fl={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};s(lh,"isInfixRule");tx={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};s(NMt,"isInfixRuleOperatorList");BS={$type:"InfixRuleOperators",precedences:"precedences"};s(OMt,"isInfixRuleOperators");Hm={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};s(tI,"isInterface");Ym={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};s(io,"isKeyword");Xm={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};s(MMt,"isNamedArgument");Jd={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};s(eI,"isNegatedToken");PS={$type:"Negation",value:"value"};s(rI,"isNegation");$S={$type:"NumberLiteral",value:"value"};s(BMt,"isNumberLiteral");Km={$type:"Parameter",name:"name"};s(PMt,"isParameter");FS={$type:"ParameterReference",parameter:"parameter"};s(iI,"isParameterReference");jo={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};s(Ln,"isParserRule");ex={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};s(nI,"isReferenceType");tf={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};s(sI,"isRegexToken");VS={$type:"ReturnType",name:"name"};s(aI,"isReturnType");ef={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};s(Yo,"isRuleCall");Qm={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};s(qS,"isSimpleType");zS={$type:"StringLiteral",value:"value"};s($Mt,"isStringLiteral");rf={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};s(oI,"isTerminalAlternatives");Js={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};s(FMt,"isTerminalElement");nf={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};s(lI,"isTerminalGroup");Oc={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};s(Es,"isTerminalRule");sf={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};s(jS,"isTerminalRuleCall");rx={$type:"Type",name:"name",type:"type"};s(US,"isType");af={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};s(VMt,"isTypeAttribute");of={$type:"TypeDefinition"};s(zMt,"isTypeDefinition");GS={$type:"UnionType",types:"types"};s(cI,"isUnionType");ix={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};s(HS,"isUnorderedGroup");lf={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};s(uI,"isUntilToken");cf={$type:"ValueLiteral"};s(GMt,"isValueLiteral");Zm={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};s(hI,"isWildcard");Jm=class extends Kd{static{s(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:Zs.$type,properties:{cardinality:{name:Zs.cardinality}},superTypes:[]},AbstractParserRule:{name:K0.$type,properties:{},superTypes:[Um.$type,_a.$type]},AbstractRule:{name:Um.$type,properties:{},superTypes:[]},AbstractType:{name:_a.$type,properties:{},superTypes:[]},Action:{name:rh.$type,properties:{cardinality:{name:rh.cardinality},feature:{name:rh.feature},inferredType:{name:rh.inferredType},operator:{name:rh.operator},type:{name:rh.type,referenceType:_a.$type}},superTypes:[Zs.$type]},Alternatives:{name:Q0.$type,properties:{cardinality:{name:Q0.cardinality},elements:{name:Q0.elements,defaultValue:[]}},superTypes:[Zs.$type]},ArrayLiteral:{name:LS.$type,properties:{elements:{name:LS.elements,defaultValue:[]}},superTypes:[cf.$type]},ArrayType:{name:DS.$type,properties:{elementType:{name:DS.elementType}},superTypes:[of.$type]},Assignment:{name:ih.$type,properties:{cardinality:{name:ih.cardinality},feature:{name:ih.feature},operator:{name:ih.operator},predicate:{name:ih.predicate},terminal:{name:ih.terminal}},superTypes:[Zs.$type]},BooleanLiteral:{name:IS.$type,properties:{true:{name:IS.true,defaultValue:!1}},superTypes:[sh.$type,cf.$type]},CharacterRange:{name:nh.$type,properties:{cardinality:{name:nh.cardinality},left:{name:nh.left},lookahead:{name:nh.lookahead},parenthesized:{name:nh.parenthesized,defaultValue:!1},right:{name:nh.right}},superTypes:[Js.$type]},Condition:{name:sh.$type,properties:{},superTypes:[]},Conjunction:{name:Z0.$type,properties:{left:{name:Z0.left},right:{name:Z0.right}},superTypes:[sh.$type]},CrossReference:{name:ah.$type,properties:{cardinality:{name:ah.cardinality},deprecatedSyntax:{name:ah.deprecatedSyntax,defaultValue:!1},isMulti:{name:ah.isMulti,defaultValue:!1},terminal:{name:ah.terminal},type:{name:ah.type,referenceType:_a.$type}},superTypes:[Zs.$type]},Disjunction:{name:J0.$type,properties:{left:{name:J0.left},right:{name:J0.right}},superTypes:[sh.$type]},EndOfFile:{name:NS.$type,properties:{cardinality:{name:NS.cardinality}},superTypes:[Zs.$type]},Grammar:{name:Nc.$type,properties:{imports:{name:Nc.imports,defaultValue:[]},interfaces:{name:Nc.interfaces,defaultValue:[]},isDeclared:{name:Nc.isDeclared,defaultValue:!1},name:{name:Nc.name},rules:{name:Nc.rules,defaultValue:[]},types:{name:Nc.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:OS.$type,properties:{path:{name:OS.path}},superTypes:[]},Group:{name:Zd.$type,properties:{cardinality:{name:Zd.cardinality},elements:{name:Zd.elements,defaultValue:[]},guardCondition:{name:Zd.guardCondition},predicate:{name:Zd.predicate}},superTypes:[Zs.$type]},InferredType:{name:MS.$type,properties:{name:{name:MS.name}},superTypes:[_a.$type]},InfixRule:{name:Fl.$type,properties:{call:{name:Fl.call},dataType:{name:Fl.dataType},inferredType:{name:Fl.inferredType},name:{name:Fl.name},operators:{name:Fl.operators},parameters:{name:Fl.parameters,defaultValue:[]},returnType:{name:Fl.returnType,referenceType:_a.$type}},superTypes:[K0.$type]},InfixRuleOperatorList:{name:tx.$type,properties:{associativity:{name:tx.associativity},operators:{name:tx.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:BS.$type,properties:{precedences:{name:BS.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Hm.$type,properties:{attributes:{name:Hm.attributes,defaultValue:[]},name:{name:Hm.name},superTypes:{name:Hm.superTypes,defaultValue:[],referenceType:_a.$type}},superTypes:[_a.$type]},Keyword:{name:Ym.$type,properties:{cardinality:{name:Ym.cardinality},predicate:{name:Ym.predicate},value:{name:Ym.value}},superTypes:[Zs.$type]},NamedArgument:{name:Xm.$type,properties:{calledByName:{name:Xm.calledByName,defaultValue:!1},parameter:{name:Xm.parameter,referenceType:Km.$type},value:{name:Xm.value}},superTypes:[]},NegatedToken:{name:Jd.$type,properties:{cardinality:{name:Jd.cardinality},lookahead:{name:Jd.lookahead},parenthesized:{name:Jd.parenthesized,defaultValue:!1},terminal:{name:Jd.terminal}},superTypes:[Js.$type]},Negation:{name:PS.$type,properties:{value:{name:PS.value}},superTypes:[sh.$type]},NumberLiteral:{name:$S.$type,properties:{value:{name:$S.value}},superTypes:[cf.$type]},Parameter:{name:Km.$type,properties:{name:{name:Km.name}},superTypes:[]},ParameterReference:{name:FS.$type,properties:{parameter:{name:FS.parameter,referenceType:Km.$type}},superTypes:[sh.$type]},ParserRule:{name:jo.$type,properties:{dataType:{name:jo.dataType},definition:{name:jo.definition},entry:{name:jo.entry,defaultValue:!1},fragment:{name:jo.fragment,defaultValue:!1},inferredType:{name:jo.inferredType},name:{name:jo.name},parameters:{name:jo.parameters,defaultValue:[]},returnType:{name:jo.returnType,referenceType:_a.$type}},superTypes:[K0.$type]},ReferenceType:{name:ex.$type,properties:{isMulti:{name:ex.isMulti,defaultValue:!1},referenceType:{name:ex.referenceType}},superTypes:[of.$type]},RegexToken:{name:tf.$type,properties:{cardinality:{name:tf.cardinality},lookahead:{name:tf.lookahead},parenthesized:{name:tf.parenthesized,defaultValue:!1},regex:{name:tf.regex}},superTypes:[Js.$type]},ReturnType:{name:VS.$type,properties:{name:{name:VS.name}},superTypes:[]},RuleCall:{name:ef.$type,properties:{arguments:{name:ef.arguments,defaultValue:[]},cardinality:{name:ef.cardinality},predicate:{name:ef.predicate},rule:{name:ef.rule,referenceType:Um.$type}},superTypes:[Zs.$type]},SimpleType:{name:Qm.$type,properties:{primitiveType:{name:Qm.primitiveType},stringType:{name:Qm.stringType},typeRef:{name:Qm.typeRef,referenceType:_a.$type}},superTypes:[of.$type]},StringLiteral:{name:zS.$type,properties:{value:{name:zS.value}},superTypes:[cf.$type]},TerminalAlternatives:{name:rf.$type,properties:{cardinality:{name:rf.cardinality},elements:{name:rf.elements,defaultValue:[]},lookahead:{name:rf.lookahead},parenthesized:{name:rf.parenthesized,defaultValue:!1}},superTypes:[Js.$type]},TerminalElement:{name:Js.$type,properties:{cardinality:{name:Js.cardinality},lookahead:{name:Js.lookahead},parenthesized:{name:Js.parenthesized,defaultValue:!1}},superTypes:[Zs.$type]},TerminalGroup:{name:nf.$type,properties:{cardinality:{name:nf.cardinality},elements:{name:nf.elements,defaultValue:[]},lookahead:{name:nf.lookahead},parenthesized:{name:nf.parenthesized,defaultValue:!1}},superTypes:[Js.$type]},TerminalRule:{name:Oc.$type,properties:{definition:{name:Oc.definition},fragment:{name:Oc.fragment,defaultValue:!1},hidden:{name:Oc.hidden,defaultValue:!1},name:{name:Oc.name},type:{name:Oc.type}},superTypes:[Um.$type]},TerminalRuleCall:{name:sf.$type,properties:{cardinality:{name:sf.cardinality},lookahead:{name:sf.lookahead},parenthesized:{name:sf.parenthesized,defaultValue:!1},rule:{name:sf.rule,referenceType:Oc.$type}},superTypes:[Js.$type]},Type:{name:rx.$type,properties:{name:{name:rx.name},type:{name:rx.type}},superTypes:[_a.$type]},TypeAttribute:{name:af.$type,properties:{defaultValue:{name:af.defaultValue},isOptional:{name:af.isOptional,defaultValue:!1},name:{name:af.name},type:{name:af.type}},superTypes:[]},TypeDefinition:{name:of.$type,properties:{},superTypes:[]},UnionType:{name:GS.$type,properties:{types:{name:GS.types,defaultValue:[]}},superTypes:[of.$type]},UnorderedGroup:{name:ix.$type,properties:{cardinality:{name:ix.cardinality},elements:{name:ix.elements,defaultValue:[]}},superTypes:[Zs.$type]},UntilToken:{name:lf.$type,properties:{cardinality:{name:lf.cardinality},lookahead:{name:lf.lookahead},parenthesized:{name:lf.parenthesized,defaultValue:!1},terminal:{name:lf.terminal}},superTypes:[Js.$type]},ValueLiteral:{name:cf.$type,properties:{},superTypes:[]},Wildcard:{name:Zm.$type,properties:{cardinality:{name:Zm.cardinality},lookahead:{name:Zm.lookahead},parenthesized:{name:Zm.parenthesized,defaultValue:!1}},superTypes:[Js.$type]}}}},Me=new Jm});var XS={};Fe(XS,{DefaultNameRegexp:()=>YS,RangeComparison:()=>Vl,compareRange:()=>Nit,findCommentNode:()=>pI,findDeclarationNodeAtOffset:()=>jMt,findLeafNodeAtOffset:()=>mI,findLeafNodeBeforeOffset:()=>Oit,flattenCst:()=>qMt,getDatatypeNode:()=>WMt,getInteriorNodes:()=>YMt,getNextNode:()=>UMt,getPreviousNode:()=>Bit,getStartlineNode:()=>HMt,inRange:()=>H6,isChildNode:()=>fI,isCommentNode:()=>dI,streamCst:()=>uf,toDocumentSegment:()=>hf,tokenToRange:()=>tg});function WMt(e){let t=e,r=!1;for(;t;){let i=Ic(t.grammarSource,Ln);if(i&&i.dataType)t=t.container,r=!0;else return r?t:void 0}}function uf(e){return new $l(e,t=>zo(t)?t.content:[],{includeRoot:!0})}function qMt(e){return uf(e).filter(Ju)}function fI(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function tg(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function hf(e){if(!e)return;let{offset:t,end:r,range:i}=e;return{range:i,offset:t,end:r,length:r-t}}function Nit(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Vl.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,i=e.end.lineVl.After}function jMt(e,t,r=YS){if(e){if(t>0){let i=t-e.offset,n=e.text.charAt(i);r.test(n)||t--}return mI(e,t)}}function pI(e,t){if(e){let r=Bit(e,!0);if(r&&dI(r,t))return r;if(Y0(e)){let i=e.content.findIndex(n=>!n.hidden);for(let n=i-1;n>=0;n--){let a=e.content[n];if(dI(a,t))return a}}}}function dI(e,t){return Ju(e)&&t.includes(e.tokenType.name)}function mI(e,t){if(Ju(e))return e;if(zo(e)){let r=Mit(e,t,!1);if(r)return mI(r,t)}}function Oit(e,t){if(Ju(e))return e;if(zo(e)){let r=Mit(e,t,!0);if(r)return Oit(r,t)}}function Mit(e,t,r){let i=0,n=e.content.length-1,a;for(;i<=n;){let o=Math.floor((i+n)/2),l=e.content[o];if(l.offset<=t&&l.end>t)return l;l.end<=t?(a=r?l:void 0,i=o+1):n=o-1}return a}function Bit(e,t=!0){for(;e.container;){let r=e.container,i=r.content.indexOf(e);for(;i>0;){i--;let n=r.content[i];if(t||!n.hidden)return n}e=r}}function UMt(e,t=!0){for(;e.container;){let r=e.container,i=r.content.indexOf(e),n=r.content.length-1;for(;i{"use strict";Go();ws();ss();Ea();s(WMt,"getDatatypeNode");s(uf,"streamCst");s(qMt,"flattenCst");s(fI,"isChildNode");s(tg,"tokenToRange");s(hf,"toDocumentSegment");(function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"})(Vl||(Vl={}));s(Nit,"compareRange");s(H6,"inRange");YS=/^[\w\p{L}]$/u;s(jMt,"findDeclarationNodeAtOffset");s(pI,"findCommentNode");s(dI,"isCommentNode");s(mI,"findLeafNodeAtOffset");s(Oit,"findLeafNodeBeforeOffset");s(Mit,"binarySearch");s(Bit,"getPreviousNode");s(UMt,"getNextNode");s(HMt,"getStartlineNode");s(YMt,"getInteriorNodes");s(XMt,"getCommonParent");s(Iit,"getParentChain")});function zl(e,t="Error: Got unexpected value."){throw new Error(t)}function Pit(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}var df,KS=b(()=>{"use strict";df=class extends Error{static{s(this,"ErrorWithLocation")}constructor(t,r){super(t?`${r} at ${t.range.start.line}:${t.range.start.character}`:r)}};s(zl,"assertUnreachable");s(Pit,"assertCondition")});function Ve(e){return e.charCodeAt(0)}function QS(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function eg(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function ff(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function ox(){throw Error("Internal Error - Should never get here!")}function gI(e){return e.type==="Character"}var yI=b(()=>{"use strict";s(Ve,"cc");s(QS,"insertToSet");s(eg,"addFlag");s(ff,"ASSERT_EXISTS");s(ox,"ASSERT_NEVER_REACH_HERE");s(gI,"isCharacter")});var lx,cx,xI,$it=b(()=>{"use strict";yI();lx=[];for(let e=Ve("0");e<=Ve("9");e++)lx.push(e);cx=[Ve("_")].concat(lx);for(let e=Ve("a");e<=Ve("z");e++)cx.push(e);for(let e=Ve("A");e<=Ve("Z");e++)cx.push(e);xI=[Ve(" "),Ve("\f"),Ve(` +`),Ve("\r"),Ve(" "),Ve("\v"),Ve(" "),Ve("\xA0"),Ve("\u1680"),Ve("\u2000"),Ve("\u2001"),Ve("\u2002"),Ve("\u2003"),Ve("\u2004"),Ve("\u2005"),Ve("\u2006"),Ve("\u2007"),Ve("\u2008"),Ve("\u2009"),Ve("\u200A"),Ve("\u2028"),Ve("\u2029"),Ve("\u202F"),Ve("\u205F"),Ve("\u3000"),Ve("\uFEFF")]});var KMt,ZS,QMt,pf,Fit=b(()=>{"use strict";yI();$it();KMt=/[0-9a-fA-F]/,ZS=/[0-9]/,QMt=/[1-9]/,pf=class{static{s(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("/");let r=this.disjunction();this.consumeChar("/");let i={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":eg(i,"global");break;case"i":eg(i,"ignoreCase");break;case"m":eg(i,"multiLine");break;case"u":eg(i,"unicode");break;case"y":eg(i,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:i,value:r,loc:this.loc(0)}}disjunction(){let t=[],r=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(r)}}alternative(){let t=[],r=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}ff(r);let i=this.disjunction();return this.consumeChar(")"),{type:r,value:i,loc:this.loc(t)}}return ox()}quantifier(t=!1){let r,i=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let n=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:n,atMost:n};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:n,atMost:a}):r={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(t===!0&&r===void 0)return;ff(r);break}if(!(t===!0&&r===void 0)&&ff(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(i),r}atom(){let t,r=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}return t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),ff(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):ox()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Ve(` +`),Ve("\r"),Ve("\u2028"),Ve("\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,r=!1;switch(this.popChar()){case"d":t=lx;break;case"D":t=lx,r=!0;break;case"s":t=xI;break;case"S":t=xI,r=!0;break;case"w":t=cx;break;case"W":t=cx,r=!0;break}return ff(t)?{type:"Set",value:t,complement:r}:ox()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=Ve("\f");break;case"n":t=Ve(` +`);break;case"r":t=Ve("\r");break;case"t":t=Ve(" ");break;case"v":t=Ve("\v");break}return ff(t)?{type:"Character",value:t}:ox()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Ve("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:Ve(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:Ve(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let i=this.classAtom(),n=i.type==="Character";if(gI(i)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),o=a.type==="Character";if(gI(a)){if(a.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}});var Gl,Vit=b(()=>{"use strict";Gl=class{static{s(this,"BaseRegExpVisitor")}visitChildren(t){for(let r in t){let i=t[r];t.hasOwnProperty(r)&&(i.type!==void 0?this.visit(i):Array.isArray(i)&&i.forEach(n=>{this.visit(n)},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"Lookbehind":this.visitLookbehind(t);break;case"NegativeLookbehind":this.visitNegativeLookbehind(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);break}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitLookbehind(t){}visitNegativeLookbehind(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}});var ux=b(()=>{"use strict";Fit();Vit()});var JS={};Fe(JS,{NEWLINE_REGEXP:()=>kI,escapeRegExp:()=>ch,getTerminalParts:()=>ZMt,isMultilineComment:()=>TI,isWhitespace:()=>hx,partialMatches:()=>CI,partialRegExp:()=>Wit,whitespaceCharacters:()=>Git});function ZMt(e){try{typeof e!="string"&&(e=e.source),e=`/${e}/`;let t=zit.pattern(e),r=[];for(let i of t.value.value)mf.reset(e),mf.visit(i),r.push({start:mf.startRegexp,end:mf.endRegex});return r}catch{return[]}}function TI(e){try{return typeof e=="string"&&(e=new RegExp(e)),e=e.toString(),mf.reset(e),mf.visit(zit.pattern(e)),mf.multiline}catch{return!1}}function hx(e){let t=typeof e=="string"?new RegExp(e):e;return Git.some(r=>t.test(r))}function ch(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function CI(e,t){let r=Wit(e),i=t.match(r);return!!i&&i[0].length>0}function Wit(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,i=0;function n(){let a="",o;function l(h){a+=r.substr(i,h),i+=h}s(l,"appendRaw");function u(h){a+="(?:"+r.substr(i,h)+"|$)",i+=h}for(s(u,"appendOptional");i",i)-i+1);break;default:u(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=i,o=o.exec(r)||[],u(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=i,o=o.exec(r),o?l(o[0].length):u(1);break;case"(":if(r[i+1]==="?")switch(r[i+2]){case":":a+="(?:",i+=3,a+=n()+"|$)";break;case"=":a+="(?=",i+=3,a+=n()+")";break;case"!":o=i,i+=3,n(),a+=r.substr(o,i-o);break;case"<":switch(r[i+3]){case"=":case"!":o=i,i+=4,n(),a+=r.substr(o,i-o);break;default:l(r.indexOf(">",i)-i+1),a+=n()+"|$)";break}break}else l(1),a+=n()+"|$)";break;case")":return++i,a;default:u(1);break}return a}return s(n,"process"),new RegExp(n(),e.flags)}var kI,zit,bI,mf,Git,rg=b(()=>{"use strict";ux();kI=/\r?\n/gm,zit=new pf,bI=class extends Gl{static{s(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){let r=String.fromCharCode(t.value);if(!this.multiline&&r===` +`&&(this.multiline=!0),t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let i=ch(r);this.endRegexpStack.push(i),this.isStarting&&(this.startRegexp+=i)}}visitSet(t){if(!this.multiline){let r=this.regex.substring(t.loc.begin,t.loc.end),i=new RegExp(r);this.multiline=!!` +`.match(i)}if(t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(t.loc.begin,t.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(t){t.type==="Group"&&t.quantifier||super.visitChildren(t)}},mf=new bI;s(ZMt,"getTerminalParts");s(TI,"isMultilineComment");Git=`\f +\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");s(hx,"isWhitespace");s(ch,"escapeRegExp");s(CI,"partialMatches");s(Wit,"partialRegExp")});var rw={};Fe(rw,{findAssignment:()=>DI,findNameAssignment:()=>tw,findNodeForKeyword:()=>RI,findNodeForProperty:()=>fx,findNodesForKeyword:()=>tBt,findNodesForKeywordInternal:()=>LI,findNodesForProperty:()=>vI,getActionAtElement:()=>Yit,getActionType:()=>Kit,getAllReachableRules:()=>dx,getAllRulesUsedForCrossReferences:()=>JMt,getCrossReferenceTerminal:()=>_I,getEntryRule:()=>qit,getExplicitRuleType:()=>ew,getHiddenRules:()=>jit,getRuleType:()=>II,getRuleTypeName:()=>sBt,getTypeName:()=>uh,isArrayCardinality:()=>rBt,isArrayOperator:()=>iBt,isCommentTerminal:()=>EI,isDataType:()=>nBt,isDataTypeRule:()=>px,isOptionalCardinality:()=>eBt,terminalRegex:()=>ig});function qit(e){return e.rules.find(t=>Ln(t)&&t.entry)}function jit(e){return e.rules.filter(t=>Es(t)&&t.hidden)}function dx(e,t){let r=new Set,i=qit(e);if(!i)return new Set(e.rules);let n=[i].concat(jit(e));for(let o of n)Uit(o,r,t);let a=new Set;for(let o of e.rules)(r.has(o.name)||Es(o)&&o.hidden)&&a.add(o);return a}function Uit(e,t,r){t.add(e.name),Wo(e).forEach(i=>{if(Yo(i)||r&&jS(i)){let n=i.rule.ref;n&&!t.has(n.name)&&Uit(n,t,r)}})}function JMt(e){let t=new Set;return Wo(e).forEach(r=>{Ho(r)&&(Ln(r.type.ref)&&t.add(r.type.ref),sx(r.type.ref)&&Ln(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}function _I(e){if(e.terminal)return e.terminal;if(e.type.ref)return tw(e.type.ref)?.terminal}function EI(e){return e.hidden&&!hx(ig(e))}function vI(e,t){return!e||!t?[]:AI(e,t,e.astNode,!0)}function fx(e,t,r){if(!e||!t)return;let i=AI(e,t,e.astNode,!0);if(i.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,i.length-1)):r=0,i[r]}function AI(e,t,r,i){if(!i){let n=Ic(e.grammarSource,Uo);if(n&&n.feature===t)return[e]}return zo(e)&&e.astNode===r?e.content.flatMap(n=>AI(n,t,r,!1)):[]}function tBt(e,t){return e?LI(e,t,e?.astNode):[]}function RI(e,t,r){if(!e)return;let i=LI(e,t,e?.astNode);if(i.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,i.length-1)):r=0,i[r]}function LI(e,t,r){if(e.astNode!==r)return[];if(io(e.grammarSource)&&e.grammarSource.value===t)return[e];let i=uf(e).iterator(),n,a=[];do if(n=i.next(),!n.done){let o=n.value;o.astNode===r?io(o.grammarSource)&&o.grammarSource.value===t&&a.push(o):i.prune()}while(!n.done);return a}function DI(e){let t=e.astNode;for(;t===e.container?.astNode;){let r=Ic(e.grammarSource,Uo);if(r)return r;e=e.container}}function tw(e){let t=e;return sx(t)&&(Bc(t.$container)?t=t.$container.$container:Mc(t.$container)?t=t.$container:zl(t.$container)),Hit(e,t,new Map)}function Hit(e,t,r){function i(n,a){let o;return Ic(n,Uo)||(o=Hit(a,a,r)),r.set(e,o),o}if(s(i,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let n of Wo(t)){if(Uo(n)&&n.feature.toLowerCase()==="name")return r.set(e,n),n;if(Yo(n)&&Ln(n.rule.ref))return i(n,n.rule.ref);if(qS(n)&&n.typeRef?.ref)return i(n,n.typeRef.ref)}}function Yit(e){let t=e.$container;if(oh(t)){let r=t.elements,i=r.indexOf(e);for(let n=i-1;n>=0;n--){let a=r[n];if(Bc(a))return a;{let o=Wo(r[n]).find(Bc);if(o)return o}}}if(nx(t))return Yit(t)}function eBt(e,t){return e==="?"||e==="*"||oh(t)&&!!t.guardCondition}function rBt(e){return e==="*"||e==="+"}function iBt(e){return e==="+="}function px(e){return Xit(e,new Set)}function Xit(e,t){if(t.has(e))return!0;t.add(e);for(let r of Wo(e))if(Yo(r)){if(!r.rule.ref||Ln(r.rule.ref)&&!Xit(r.rule.ref,t)||lh(r.rule.ref))return!1}else{if(Uo(r))return!1;if(Bc(r))return!1}return!!e.definition}function nBt(e){return wI(e.type,new Set)}function wI(e,t){if(t.has(e))return!0;if(t.add(e),Y6(e))return!1;if(nI(e))return!1;if(cI(e))return e.types.every(r=>wI(r,t));if(qS(e)){if(e.primitiveType!==void 0)return!0;if(e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let r=e.typeRef.ref;return US(r)?wI(r.type,t):!1}else return!1}else return!1}function ew(e){if(!Es(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}function uh(e){if(Mc(e))return Ln(e)&&px(e)?e.name:ew(e)??e.name;if(tI(e)||US(e)||aI(e))return e.name;if(Bc(e)){let t=Kit(e);if(t)return t}else if(sx(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function Kit(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return uh(e.type.ref)}function sBt(e){return Es(e)?e.type?.name??"string":Ln(e)&&px(e)?e.name:ew(e)??e.name}function II(e){return Es(e)?e.type?.name??"string":ew(e)??e.name}function ig(e){let t={s:!1,i:!1,u:!1},r=ng(e.definition,t),i=Object.entries(t).filter(([,n])=>n).map(([n])=>n).join("");return new RegExp(r,i)}function ng(e,t){if(oI(e))return aBt(e);if(lI(e))return oBt(e);if(K6(e))return uBt(e);if(jS(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return Pc(ng(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(eI(e))return cBt(e);if(uI(e))return lBt(e);if(sI(e)){let r=e.regex.lastIndexOf("/"),i=e.regex.substring(1,r),n=e.regex.substring(r+1);return t&&(t.i=n.includes("i"),t.s=n.includes("s"),t.u=n.includes("u")),Pc(i,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(hI(e))return Pc(NI,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}function aBt(e){return Pc(e.elements.map(t=>ng(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function oBt(e){return Pc(e.elements.map(t=>ng(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function lBt(e){return Pc(`${NI}*?${ng(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function cBt(e){return Pc(`(?!${ng(e.terminal)})${NI}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function uBt(e){return e.right?Pc(`[${SI(e.left)}-${SI(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Pc(SI(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function SI(e){return ch(e.value)}function Pc(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}var NI,Xo=b(()=>{"use strict";KS();Ea();Go();ss();qo();rg();s(qit,"getEntryRule");s(jit,"getHiddenRules");s(dx,"getAllReachableRules");s(Uit,"ruleDfs");s(JMt,"getAllRulesUsedForCrossReferences");s(_I,"getCrossReferenceTerminal");s(EI,"isCommentTerminal");s(vI,"findNodesForProperty");s(fx,"findNodeForProperty");s(AI,"findNodesForPropertyInternal");s(tBt,"findNodesForKeyword");s(RI,"findNodeForKeyword");s(LI,"findNodesForKeywordInternal");s(DI,"findAssignment");s(tw,"findNameAssignment");s(Hit,"findNameAssignmentInternal");s(Yit,"getActionAtElement");s(eBt,"isOptionalCardinality");s(rBt,"isArrayCardinality");s(iBt,"isArrayOperator");s(px,"isDataTypeRule");s(Xit,"isDataTypeRuleInternal");s(nBt,"isDataType");s(wI,"isDataTypeInternal");s(ew,"getExplicitRuleType");s(uh,"getTypeName");s(Kit,"getActionType");s(sBt,"getRuleTypeName");s(II,"getRuleType");s(ig,"terminalRegex");NI=/[\s\S]/.source;s(ng,"abstractElementToRegex");s(aBt,"terminalAlternativesToRegex");s(oBt,"terminalGroupToRegex");s(lBt,"untilTokenToRegex");s(cBt,"negateTokenToRegex");s(uBt,"characterRangeToRegex");s(SI,"keywordToRegex");s(Pc,"withCardinality")});function OI(e){let t=[],r=e.Grammar;for(let i of r.rules)Es(i)&&EI(i)&&TI(ig(i))&&t.push(i.name);return{multilineCommentRules:t,nameRegexp:YS}}var MI=b(()=>{"use strict";qo();Xo();rg();Ea();s(OI,"createGrammarConfig")});var BI=b(()=>{"use strict"});function sg(e){console&&console.error&&console.error(`Error: ${e}`)}function mx(e){console&&console.warn&&console.warn(`Warning: ${e}`)}var Qit=b(()=>{"use strict";s(sg,"PRINT_ERROR");s(mx,"PRINT_WARNING")});function gx(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}var Zit=b(()=>{"use strict";s(gx,"timer")});function yx(e){function t(){}s(t,"FakeConstructor"),t.prototype=e;let r=new t;function i(){return typeof r.bar}return s(i,"fakeAccess"),i(),i(),e;(0,eval)(e)}var Jit=b(()=>{"use strict";s(yx,"toFastProperties")});var ag=b(()=>{"use strict";Qit();Zit();Jit()});function hBt(e){return dBt(e)?e.LABEL:e.name}function dBt(e){return Ui(e.LABEL)&&e.LABEL!==""}function iw(e){return jt(e,og)}function og(e){function t(r){return jt(r,og)}if(s(t,"convertDefinition"),e instanceof Hr){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return Ui(e.label)&&(r.label=e.label),r}else{if(e instanceof ui)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Yr)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof hi)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof di)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:og(new gr({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ni)return{type:"RepetitionWithSeparator",idx:e.idx,separator:og(new gr({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Er)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof si)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof gr){let r={type:"Terminal",name:e.terminalType.name,label:hBt(e.terminalType),idx:e.idx};Ui(e.label)&&(r.terminalLabel=e.label);let i=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=Za(i)?i.source:i),r}else{if(e instanceof vs)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var va,Hr,vs,ui,Yr,hi,di,Er,ni,si,gr,nw=b(()=>{"use strict";Ee();s(hBt,"tokenLabel");s(dBt,"hasTokenLabel");va=class{static{s(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),ct(this.definition,r=>{r.accept(t)})}},Hr=class extends va{static{s(this,"NonTerminal")}constructor(t){super([]),this.idx=1,Wn(this,Qs(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},vs=class extends va{static{s(this,"Rule")}constructor(t){super(t.definition),this.orgText="",Wn(this,Qs(t,r=>r!==void 0))}},ui=class extends va{static{s(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,Wn(this,Qs(t,r=>r!==void 0))}},Yr=class extends va{static{s(this,"Option")}constructor(t){super(t.definition),this.idx=1,Wn(this,Qs(t,r=>r!==void 0))}},hi=class extends va{static{s(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,Wn(this,Qs(t,r=>r!==void 0))}},di=class extends va{static{s(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,Wn(this,Qs(t,r=>r!==void 0))}},Er=class extends va{static{s(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,Wn(this,Qs(t,r=>r!==void 0))}},ni=class extends va{static{s(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,Wn(this,Qs(t,r=>r!==void 0))}},si=class extends va{static{s(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,Wn(this,Qs(t,r=>r!==void 0))}},gr=class{static{s(this,"Terminal")}constructor(t){this.idx=1,Wn(this,Qs(t,r=>r!==void 0))}accept(t){t.visit(this)}};s(iw,"serializeGrammar");s(og,"serializeProduction")});var As,tnt=b(()=>{"use strict";nw();As=class{static{s(this,"GAstVisitor")}visit(t){let r=t;switch(r.constructor){case Hr:return this.visitNonTerminal(r);case ui:return this.visitAlternative(r);case Yr:return this.visitOption(r);case hi:return this.visitRepetitionMandatory(r);case di:return this.visitRepetitionMandatoryWithSeparator(r);case ni:return this.visitRepetitionWithSeparator(r);case Er:return this.visitRepetition(r);case si:return this.visitAlternation(r);case gr:return this.visitTerminal(r);case vs:return this.visitRule(r);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 PI(e){return e instanceof ui||e instanceof Yr||e instanceof Er||e instanceof hi||e instanceof di||e instanceof ni||e instanceof gr||e instanceof vs}function gf(e,t=[]){return e instanceof Yr||e instanceof Er||e instanceof ni?!0:e instanceof si?G0(e.definition,i=>gf(i,t)):e instanceof Hr&&_i(t,e)?!1:e instanceof va?(e instanceof Hr&&t.push(e),rs(e.definition,i=>gf(i,t))):!1}function $I(e){return e instanceof si}function ta(e){if(e instanceof Hr)return"SUBRULE";if(e instanceof Yr)return"OPTION";if(e instanceof si)return"OR";if(e instanceof hi)return"AT_LEAST_ONE";if(e instanceof di)return"AT_LEAST_ONE_SEP";if(e instanceof ni)return"MANY_SEP";if(e instanceof Er)return"MANY";if(e instanceof gr)return"CONSUME";throw Error("non exhaustive match")}var ent=b(()=>{"use strict";Ee();nw();s(PI,"isSequenceProd");s(gf,"isOptionalProd");s($I,"isBranchingProd");s(ta,"getProductionDslName")});var Rs=b(()=>{"use strict";nw();tnt();ent()});function rnt(e,t,r){return[new Yr({definition:[new gr({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var $c,sw=b(()=>{"use strict";Ee();Rs();$c=class{static{s(this,"RestWalker")}walk(t,r=[]){ct(t.definition,(i,n)=>{let a=ji(t.definition,n+1);if(i instanceof Hr)this.walkProdRef(i,a,r);else if(i instanceof gr)this.walkTerminal(i,a,r);else if(i instanceof ui)this.walkFlat(i,a,r);else if(i instanceof Yr)this.walkOption(i,a,r);else if(i instanceof hi)this.walkAtLeastOne(i,a,r);else if(i instanceof di)this.walkAtLeastOneSep(i,a,r);else if(i instanceof ni)this.walkManySep(i,a,r);else if(i instanceof Er)this.walkMany(i,a,r);else if(i instanceof si)this.walkOr(i,a,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,i){}walkProdRef(t,r,i){}walkFlat(t,r,i){let n=r.concat(i);this.walk(t,n)}walkOption(t,r,i){let n=r.concat(i);this.walk(t,n)}walkAtLeastOne(t,r,i){let n=[new Yr({definition:t.definition})].concat(r,i);this.walk(t,n)}walkAtLeastOneSep(t,r,i){let n=rnt(t,r,i);this.walk(t,n)}walkMany(t,r,i){let n=[new Yr({definition:t.definition})].concat(r,i);this.walk(t,n)}walkManySep(t,r,i){let n=rnt(t,r,i);this.walk(t,n)}walkOr(t,r,i){let n=r.concat(i);ct(t.definition,a=>{let o=new ui({definition:[a]});this.walk(o,n)})}};s(rnt,"restForRepetitionWithSeparator")});function yf(e){if(e instanceof Hr)return yf(e.referencedRule);if(e instanceof gr)return mBt(e);if(PI(e))return fBt(e);if($I(e))return pBt(e);throw Error("non exhaustive match")}function fBt(e){let t=[],r=e.definition,i=0,n=r.length>i,a,o=!0;for(;n&&o;)a=r[i],o=gf(a),t=t.concat(yf(a)),i=i+1,n=r.length>i;return Vm(t)}function pBt(e){let t=jt(e.definition,r=>yf(r));return Vm(Nr(t))}function mBt(e){return[e.terminalType]}var FI=b(()=>{"use strict";Ee();Rs();s(yf,"first");s(fBt,"firstForSequence");s(pBt,"firstForBranching");s(mBt,"firstForTerminal")});var aw,VI=b(()=>{"use strict";aw="_~IN~_"});function int(e){let t={};return ct(e,r=>{let i=new zI(r).startWalking();Wn(t,i)}),t}function gBt(e,t){return e.name+t+aw}var zI,nnt=b(()=>{"use strict";sw();FI();Ee();VI();Rs();zI=class extends $c{static{s(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,i){}walkProdRef(t,r,i){let n=gBt(t.referencedRule,t.idx)+this.topProd.name,a=r.concat(i),o=new ui({definition:a}),l=yf(o);this.follows[n]=l}};s(int,"computeAllProdsFollows");s(gBt,"buildBetweenProdsFollowPrefix")});function lg(e){let t=e.toString();if(ow.hasOwnProperty(t))return ow[t];{let r=yBt.pattern(t);return ow[t]=r,r}}function snt(){ow={}}var ow,yBt,lw=b(()=>{"use strict";ux();ow={},yBt=new pf;s(lg,"getRegExpAst");s(snt,"clearRegExpParserCache")});function lnt(e,t=!1){try{let r=lg(e);return GI(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===ont)t&&mx(`${xx} Unable to optimize: < ${e.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let i="";t&&(i=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),sg(`${xx} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+i)}}return[]}function GI(e,t,r){switch(e.type){case"Disjunction":for(let n=0;n{if(typeof u=="number")cw(u,t,r);else{let h=u;if(r===!0)for(let d=h.from;d<=h.to;d++)cw(d,t,r);else{for(let d=h.from;d<=h.to&&d=cg){let d=h.from>=cg?h.from:cg,f=h.to,p=Wl(d),m=Wl(f);for(let g=p;g<=m;g++)t[g]=g}}}});break;case"Group":GI(o.value,t,r);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&WI(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return cr(t)}function cw(e,t,r){let i=Wl(e);t[i]=i,r===!0&&xBt(e,t)}function xBt(e,t){let r=String.fromCharCode(e),i=r.toUpperCase();if(i!==r){let n=Wl(i.charCodeAt(0));t[n]=n}else{let n=r.toLowerCase();if(n!==r){let a=Wl(n.charCodeAt(0));t[a]=a}}}function ant(e,t){return Ss(e.value,r=>{if(typeof r=="number")return _i(t,r);{let i=r;return Ss(t,n=>i.from<=n&&n<=i.to)!==void 0}})}function WI(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?fe(e.value)?rs(e.value,WI):WI(e.value):!1}function uw(e,t){if(t instanceof RegExp){let r=lg(t),i=new qI(e);return i.visit(r),i.found}else return Ss(t,r=>_i(e,r.charCodeAt(0)))!==void 0}var ont,xx,qI,cnt=b(()=>{"use strict";ux();Ee();ag();lw();jI();ont="Complement Sets are not supported for first char optimization",xx=`Unable to use "first char" lexer optimizations: +`;s(lnt,"getOptimizedStartCodesIndices");s(GI,"firstCharOptimizedIndices");s(cw,"addOptimizedIdxToResult");s(xBt,"handleIgnoreCase");s(ant,"findCode");s(WI,"isWholeOptional");qI=class extends Gl{static{s(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return;case"Lookbehind":this.visitLookbehind(t);return;case"NegativeLookbehind":this.visitNegativeLookbehind(t);return}super.visitChildren(t)}}visitCharacter(t){_i(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?ant(t,this.targetCharCodes)===void 0&&(this.found=!0):ant(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};s(uw,"canMatchCharCode")});function dnt(e,t){t=Uu(t,{useSticky:HI,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:s((T,C)=>C(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{PBt()});let i;r("Reject Lexer.NA",()=>{i=Yu(e,T=>T[xf]===Ai.NA)});let n=!1,a;r("Transform Patterns",()=>{n=!1,a=jt(i,T=>{let C=T[xf];if(Za(C)){let _=C.source;return _.length===1&&_!=="^"&&_!=="$"&&_!=="."&&!C.ignoreCase?_:_.length===2&&_[0]==="\\"&&!_i(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],_[1])?_[1]:t.useSticky?hnt(C):unt(C)}else{if(en(C))return n=!0,{exec:C};if(typeof C=="object")return n=!0,C;if(typeof C=="string"){if(C.length===1)return C;{let _=C.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),S=new RegExp(_);return t.useSticky?hnt(S):unt(S)}}else throw Error("non exhaustive match")}})});let o,l,u,h,d;r("misc mapping",()=>{o=jt(i,T=>T.tokenTypeIdx),l=jt(i,T=>{let C=T.GROUP;if(C!==Ai.SKIPPED){if(Ui(C))return C;if(rr(C))return!1;throw Error("non exhaustive match")}}),u=jt(i,T=>{let C=T.LONGER_ALT;if(C)return fe(C)?jt(C,S=>uS(i,S)):[uS(i,C)]}),h=jt(i,T=>T.PUSH_MODE),d=jt(i,T=>pe(T,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let T=knt(t.lineTerminatorCharacters);f=jt(i,C=>!1),t.positionTracking!=="onlyOffset"&&(f=jt(i,C=>pe(C,"LINE_BREAKS")?!!C.LINE_BREAKS:bnt(C,T)===!1&&uw(T,C.PATTERN)))});let p,m,g,y;r("Misc Mapping #2",()=>{p=jt(i,ynt),m=jt(a,MBt),g=Mr(i,(T,C)=>{let _=C.GROUP;return Ui(_)&&_!==Ai.SKIPPED&&(T[_]=[]),T},{}),y=jt(a,(T,C)=>({pattern:a[C],longerAlt:u[C],canLineTerminator:f[C],isCustom:p[C],short:m[C],group:l[C],push:h[C],pop:d[C],tokenTypeIdx:o[C],tokenType:i[C]}))});let x=!0,k=[];return t.safeMode||r("First Char Optimization",()=>{k=Mr(i,(T,C,_)=>{if(typeof C.PATTERN=="string"){let S=C.PATTERN.charCodeAt(0),w=Wl(S);UI(T,w,y[_])}else if(fe(C.START_CHARS_HINT)){let S;ct(C.START_CHARS_HINT,w=>{let A=typeof w=="string"?w.charCodeAt(0):w,v=Wl(A);S!==v&&(S=v,UI(T,v,y[_]))})}else if(Za(C.PATTERN))if(C.PATTERN.unicode)x=!1,t.ensureOptimizations&&sg(`${xx} Unable to analyze < ${C.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`);else{let S=lnt(C.PATTERN,t.ensureOptimizations);qe(S)&&(x=!1),ct(S,w=>{UI(T,w,y[_])})}else t.ensureOptimizations&&sg(`${xx} TokenType: <${C.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`),x=!1;return T},[])}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:k,hasCustom:n,canBeOptimized:x}}function fnt(e,t){let r=[],i=kBt(e);r=r.concat(i.errors);let n=TBt(i.valid),a=n.valid;return r=r.concat(n.errors),r=r.concat(bBt(a)),r=r.concat(RBt(a)),r=r.concat(LBt(a,t)),r=r.concat(DBt(a)),r}function bBt(e){let t=[],r=Or(e,i=>Za(i[xf]));return t=t.concat(SBt(r)),t=t.concat(EBt(r)),t=t.concat(vBt(r)),t=t.concat(ABt(r)),t=t.concat(wBt(r)),t}function kBt(e){let t=Or(e,n=>!pe(n,xf)),r=jt(t,n=>({message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:Ei.MISSING_PATTERN,tokenTypes:[n]})),i=Hu(e,t);return{errors:r,valid:i}}function TBt(e){let t=Or(e,n=>{let a=n[xf];return!Za(a)&&!en(a)&&!pe(a,"exec")&&!Ui(a)}),r=jt(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Ei.INVALID_PATTERN,tokenTypes:[n]})),i=Hu(e,t);return{errors:r,valid:i}}function SBt(e){class t extends Gl{static{s(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=Or(e,n=>{let a=n.PATTERN;try{let o=lg(a),l=new t;return l.visit(o),l.found}catch{return CBt.test(a.source)}});return jt(r,n=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ei.EOI_ANCHOR_FOUND,tokenTypes:[n]}))}function wBt(e){let t=Or(e,i=>i.PATTERN.test(""));return jt(t,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:Ei.EMPTY_MATCH_PATTERN,tokenTypes:[i]}))}function EBt(e){class t extends Gl{static{s(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=Or(e,n=>{let a=n.PATTERN;try{let o=lg(a),l=new t;return l.visit(o),l.found}catch{return _Bt.test(a.source)}});return jt(r,n=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ei.SOI_ANCHOR_FOUND,tokenTypes:[n]}))}function vBt(e){let t=Or(e,i=>{let n=i[xf];return n instanceof RegExp&&(n.multiline||n.global)});return jt(t,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ei.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}))}function ABt(e){let t=[],r=jt(e,a=>Mr(e,(o,l)=>(a.PATTERN.source===l.PATTERN.source&&!_i(t,l)&&l.PATTERN!==Ai.NA&&(t.push(l),o.push(l)),o),[]));r=Il(r);let i=Or(r,a=>a.length>1);return jt(i,a=>{let o=jt(a,u=>u.name);return{message:`The same RegExp pattern ->${Rn(a).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Ei.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function RBt(e){let t=Or(e,i=>{if(!pe(i,"GROUP"))return!1;let n=i.GROUP;return n!==Ai.SKIPPED&&n!==Ai.NA&&!Ui(n)});return jt(t,i=>({message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ei.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}))}function LBt(e,t){let r=Or(e,n=>n.PUSH_MODE!==void 0&&!_i(t,n.PUSH_MODE));return jt(r,n=>({message:`Token Type: ->${n.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${n.PUSH_MODE}<-which does not exist`,type:Ei.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}))}function DBt(e){let t=[],r=Mr(e,(i,n,a)=>{let o=n.PATTERN;return o===Ai.NA||(Ui(o)?i.push({str:o,idx:a,tokenType:n}):Za(o)&&NBt(o)&&i.push({str:o.source,idx:a,tokenType:n})),i},[]);return ct(e,(i,n)=>{ct(r,({str:a,idx:o,tokenType:l})=>{if(n${l.name}<- can never be matched. +Because it appears AFTER the Token Type ->${i.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:Ei.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),t}function IBt(e,t){if(Za(t)){if(OBt(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(en(t))return t(e,0,[],{});if(pe(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function NBt(e){return Ss([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function OBt(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:Ei.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),pe(e,hw)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+hw+`> property in its definition +`,type:Ei.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),pe(e,hw)&&pe(e,ug)&&!pe(e.modes,e.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${ug}: <${e.defaultMode}>which does not exist +`,type:Ei.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),pe(e,hw)&&ct(e.modes,(n,a)=>{ct(n,(o,l)=>{if(rr(o))i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${l}> +`,type:Ei.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(pe(o,"LONGER_ALT")){let u=fe(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];ct(u,h=>{!rr(h)&&!_i(n,h)&&i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${o.name}> outside of mode <${a}> +`,type:Ei.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),i}function mnt(e,t,r){let i=[],n=!1,a=Il(Nr(cr(e.modes))),o=Yu(a,u=>u[xf]===Ai.NA),l=knt(r);return t&&ct(o,u=>{let h=bnt(u,l);if(h!==!1){let f={message:BBt(u,h),type:h.issue,tokenType:u};i.push(f)}else pe(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(n=!0):uw(l,u.PATTERN)&&(n=!0)}),t&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:Ei.NO_LINE_BREAKS_FLAGS}),i}function gnt(e){let t={},r=Ar(e);return ct(r,i=>{let n=e[i];if(fe(n))t[i]=[];else throw Error("non exhaustive match")}),t}function ynt(e){let t=e.PATTERN;if(Za(t))return!1;if(en(t))return!0;if(pe(t,"exec"))return!0;if(Ui(t))return!1;throw Error("non exhaustive match")}function MBt(e){return Ui(e)&&e.length===1?e.charCodeAt(0):!1}function bnt(e,t){if(pe(e,"LINE_BREAKS"))return!1;if(Za(e.PATTERN)){try{uw(t,e.PATTERN)}catch(r){return{issue:Ei.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Ui(e.PATTERN))return!1;if(ynt(e))return{issue:Ei.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function BBt(e,t){if(t.issue===Ei.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + The problem is in the <${e.name}> Token Type + Root cause: ${t.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Ei.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${e.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function knt(e){return jt(e,r=>Ui(r)?r.charCodeAt(0):r)}function UI(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function Wl(e){return e255?255+~~(e/255):e}}var xf,ug,hw,HI,CBt,_Bt,xnt,cg,dw,jI=b(()=>{"use strict";ux();bx();Ee();ag();cnt();lw();xf="PATTERN",ug="defaultMode",hw="modes",HI=typeof new RegExp("(?:)").sticky=="boolean";s(dnt,"analyzeTokenTypes");s(fnt,"validatePatterns");s(bBt,"validateRegExpPattern");s(kBt,"findMissingPatterns");s(TBt,"findInvalidPatterns");CBt=/[^\\][$]/;s(SBt,"findEndOfInputAnchor");s(wBt,"findEmptyMatchRegExps");_Bt=/[^\\[][\^]|^\^/;s(EBt,"findStartOfInputAnchor");s(vBt,"findUnsupportedFlags");s(ABt,"findDuplicatePatterns");s(RBt,"findInvalidGroupType");s(LBt,"findModesThatDoNotExist");s(DBt,"findUnreachablePatterns");s(IBt,"tryToMatchStrToPattern");s(NBt,"noMetaChar");s(OBt,"usesLookAheadOrBehind");s(unt,"addStartOfInput");s(hnt,"addStickyFlag");s(pnt,"performRuntimeChecks");s(mnt,"performWarningRuntimeChecks");s(gnt,"cloneEmptyGroups");s(ynt,"isCustomPattern");s(MBt,"isShortPattern");xnt={test:s(function(e){let t=e.length;for(let r=this.lastIndex;r{r.isParent=r.categoryMatches.length>0})}function $Bt(e){let t=jr(e),r=e,i=!0;for(;i;){r=Il(Nr(jt(r,a=>a.CATEGORIES)));let n=Hu(r,t);t=t.concat(n),qe(n)?i=!1:r=n}return t}function FBt(e){ct(e,t=>{YI(t)||(Snt[Tnt]=t,t.tokenTypeIdx=Tnt++),Cnt(t)&&!fe(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Cnt(t)||(t.CATEGORIES=[]),GBt(t)||(t.categoryMatches=[]),WBt(t)||(t.categoryMatchesMap={})})}function VBt(e){ct(e,t=>{t.categoryMatches=[],ct(t.categoryMatchesMap,(r,i)=>{t.categoryMatches.push(Snt[i].tokenTypeIdx)})})}function zBt(e){ct(e,t=>{wnt([],t)})}function wnt(e,t){ct(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),ct(t.CATEGORIES,r=>{let i=e.concat(t);_i(i,r)||wnt(i,r)})}function YI(e){return pe(e,"tokenTypeIdx")}function Cnt(e){return pe(e,"CATEGORIES")}function GBt(e){return pe(e,"categoryMatches")}function WBt(e){return pe(e,"categoryMatchesMap")}function _nt(e){return pe(e,"tokenTypeIdx")}var Tnt,Snt,bf=b(()=>{"use strict";Ee();s(Fc,"tokenStructuredMatcher");s(hg,"tokenStructuredMatcherNoCategories");Tnt=1,Snt={};s(Vc,"augmentTokenTypes");s($Bt,"expandCategories");s(FBt,"assignTokenDefaultProps");s(VBt,"assignCategoriesTokensProp");s(zBt,"assignCategoriesMapProp");s(wnt,"singleAssignCategoriesToksMap");s(YI,"hasShortKeyProperty");s(Cnt,"hasCategoriesProperty");s(GBt,"hasExtendingTokensTypesProperty");s(WBt,"hasExtendingTokensTypesMapProperty");s(_nt,"isTokenType")});var dg,XI=b(()=>{"use strict";dg={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,i,n,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}}});var Ei,kx,Ai,bx=b(()=>{"use strict";jI();Ee();ag();bf();XI();lw();(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Ei||(Ei={}));kx={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:dg,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(kx);Ai=class{static{s(this,"Lexer")}constructor(t,r=kx){if(this.lexerDefinition=t,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=(n,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${n}>`);let{time:l,value:u}=gx(a),h=l>10?console.warn:console.log;return this.traceInitIndent time: ${l}ms`),this.traceInitIndent--,u}else return a()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=Wn({},kx,r);let i=this.config.traceInitPerf;i===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof i=="number"&&(this.traceInitMaxIdent=i,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===kx.lineTerminatorsPattern)this.config.lineTerminatorsPattern=xnt;else if(this.config.lineTerminatorCharacters===kx.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(r.safeMode&&r.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),fe(t)?n={modes:{defaultMode:jr(t)},defaultMode:ug}:(a=!1,n=jr(t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(pnt(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(mnt(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},ct(n.modes,(l,u)=>{n.modes[u]=Yu(l,h=>rr(h))});let o=Ar(n.modes);if(ct(n.modes,(l,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(fnt(l,o))}),qe(this.lexerDefinitionErrors)){Vc(l);let h;this.TRACE_INIT("analyzeTokenTypes",()=>{h=dnt(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=h.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=h.charCodeToPatternIdxToConfig,this.emptyGroups=Wn({},this.emptyGroups,h.emptyGroups),this.hasCustom=h.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=h.canBeOptimized}})}),this.defaultMode=n.defaultMode,!qe(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=jt(this.lexerDefinitionErrors,h=>h.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+u)}ct(this.lexerDefinitionWarning,l=>{mx(l.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(HI?(this.chopInput=En,this.match=this.matchWithTest):(this.updateLastIndex=Oi,this.match=this.matchWithExec),a&&(this.handleModes=Oi),this.trackStartLines===!1&&(this.computeNewColumn=En),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Oi),/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))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let l=Mr(this.canModeBeOptimized,(u,h,d)=>(h===!1&&u.push(d),u),[]);if(r.ensureOptimizations&&!qe(l))throw Error(`Lexer Modes: < ${l.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",()=>{snt()}),this.TRACE_INIT("toFastProperties",()=>{yx(this)})})}tokenize(t,r=this.defaultMode){if(!qe(this.lexerDefinitionErrors)){let n=jt(this.lexerDefinitionErrors,a=>a.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+n)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let i,n,a,o,l,u,h,d,f,p,m,g,y,x,k,T,C=t,_=C.length,S=0,w=0,A=this.hasCustom?0:Math.floor(t.length/10),v=new Array(A),M=[],$=this.trackStartLines?1:void 0,I=this.trackStartLines?1:void 0,F=gnt(this.emptyGroups),B=this.trackStartLines,O=this.config.lineTerminatorsPattern,R=0,N=[],P=[],E=[],D=[];Object.freeze(D);let V;function L(){return N}s(L,"getPossiblePatternsSlow");function q(X){let ut=Wl(X),ot=P[ut];return ot===void 0?D:ot}s(q,"getPossiblePatternsOptimized");let H=s(X=>{if(E.length===1&&X.tokenType.PUSH_MODE===void 0){let ut=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(X);M.push({offset:X.startOffset,line:X.startLine,column:X.startColumn,length:X.image.length,message:ut})}else{E.pop();let ut=An(E);N=this.patternIdxToConfig[ut],P=this.charCodeToPatternIdxToConfig[ut],R=N.length;let ot=this.canModeBeOptimized[ut]&&this.config.safeMode===!1;P&&ot?V=q:V=L}},"pop_mode");function K(X){E.push(X),P=this.charCodeToPatternIdxToConfig[X],N=this.patternIdxToConfig[X],R=N.length,R=N.length;let ut=this.canModeBeOptimized[X]&&this.config.safeMode===!1;P&&ut?V=q:V=L}s(K,"push_mode"),K.call(this,r);let U,st=this.config.recoveryEnabled;for(;S<_;){u=null;let X=C.charCodeAt(S),ut=V(X),ot=ut.length;for(i=0;iu.length){u=o,h=d,U=Ot;break}}}break}}if(u!==null){if(f=u.length,p=U.group,p!==void 0&&(m=U.tokenTypeIdx,g=this.createTokenInstance(u,S,m,U.tokenType,$,I,f),this.handlePayload(g,h),p===!1?w=this.addToken(v,w,g):F[p].push(g)),t=this.chopInput(t,f),S=S+f,I=this.computeNewColumn(I,f),B===!0&&U.canLineTerminator===!0){let mt=0,ht,it;O.lastIndex=0;do ht=O.test(u),ht===!0&&(it=O.lastIndex-1,mt++);while(ht===!0);mt!==0&&($=$+mt,I=f-it,this.updateTokenEndLineColumnLocation(g,p,it,mt,$,I,f))}this.handleModes(U,H,K,g)}else{let mt=S,ht=$,it=I,Ot=st===!1;for(;Ot===!1&&S<_;)for(t=this.chopInput(t,1),S++,n=0;n{"use strict";Ee();bx();bf();s(zc,"tokenLabel");s(KI,"hasTokenLabel");qBt="parent",Ent="categories",vnt="label",Ant="group",Rnt="push_mode",Lnt="pop_mode",Dnt="longer_alt",Int="line_breaks",Nnt="start_chars_hint";s(hh,"createToken");s(jBt,"createTokenInternal");Aa=hh({name:"EOF",pattern:Ai.NA});Vc([Aa]);s(Gc,"createTokenInstance");s(Tx,"tokenMatcher")});var Wc,Ont,Ko,fg=b(()=>{"use strict";kf();Ee();Rs();Wc={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:i}){return`Expecting ${KI(e)?`--> ${zc(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:i,ruleName:n}){let a="Expecting: ",l=` +but found: '`+Rn(t).image+"'";if(i)return a+i+l;{let u=Mr(e,(p,m)=>p.concat(m),[]),h=jt(u,p=>`[${jt(p,m=>zc(m)).join(", ")}]`),f=`one of these possible Token sequences: +${jt(h,(p,m)=>` ${m+1}. ${p}`).join(` +`)}`;return a+f+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:i}){let n="Expecting: ",o=` +but found: '`+Rn(t).image+"'";if(r)return n+r+o;{let u=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${jt(e,h=>`[${jt(h,d=>zc(d)).join(",")}]`).join(" ,")}>`;return n+u+o}}};Object.freeze(Wc);Ont={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},Ko={buildDuplicateFoundError(e,t){function r(d){return d instanceof gr?d.terminalType.name:d instanceof Hr?d.nonTerminalName:""}s(r,"getExtraProductionArgument");let i=e.name,n=Rn(t),a=n.idx,o=ta(n),l=r(n),u=a>0,h=`->${o}${u?a:""}<- ${l?`with argument: ->${l}<-`:""} + appears more than once (${t.length} times) in the top level rule: ->${i}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,` +`),h},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=jt(e.prefixPath,n=>zc(n)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(e){let t=jt(e.prefixPath,n=>zc(n)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,i=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +`;return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i},buildEmptyRepetitionError(e){let t=ta(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: + inside <${e.topLevelRule.name}> Rule. + has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=jt(e.leftRecursionPath,a=>a.name),i=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar. +rule: <${t}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${i} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof vs?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function Mnt(e,t){let r=new QI(e,t);return r.resolveRefs(),r.errors}var QI,Bnt=b(()=>{"use strict";ea();Ee();Rs();s(Mnt,"resolveGrammar");QI=class extends As{static{s(this,"GastRefResolverVisitor")}constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){ct(cr(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let i=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:i,type:mn.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}}});function gw(e,t,r=[]){r=jr(r);let i=[],n=0;function a(l){return l.concat(ji(e,n+1))}s(a,"remainingPathWith");function o(l){let u=gw(a(l),t,r);return i.concat(u)}for(s(o,"getAlternativesForProd");r.length{qe(u.definition)===!1&&(i=o(u.definition))}),i;if(l instanceof gr)r.push(l.terminalType);else throw Error("non exhaustive match")}n++}return i.push({partialPath:r,suffixDef:ji(e,n)}),i}function yw(e,t,r,i){let n="EXIT_NONE_TERMINAL",a=[n],o="EXIT_ALTERNATIVE",l=!1,u=t.length,h=u-i-1,d=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!qe(f);){let p=f.pop();if(p===o){l&&An(f).idx<=h&&f.pop();continue}let m=p.def,g=p.idx,y=p.ruleStack,x=p.occurrenceStack;if(qe(m))continue;let k=m[0];if(k===n){let T={idx:g,def:ji(m),ruleStack:Dc(y),occurrenceStack:Dc(x)};f.push(T)}else if(k instanceof gr)if(g=0;T--){let C=k.definition[T],_={idx:g,def:C.definition.concat(ji(m)),ruleStack:y,occurrenceStack:x};f.push(_),f.push(o)}else if(k instanceof ui)f.push({idx:g,def:k.definition.concat(ji(m)),ruleStack:y,occurrenceStack:x});else if(k instanceof vs)f.push(UBt(k,g,y,x));else throw Error("non exhaustive match")}return d}function UBt(e,t,r,i){let n=jr(r);n.push(e.name);let a=jr(i);return a.push(1),{idx:t,def:e.definition,ruleStack:n,occurrenceStack:a}}var ZI,fw,pg,pw,Cx,mw,Sx,wx=b(()=>{"use strict";Ee();FI();sw();Rs();ZI=class extends $c{static{s(this,"AbstractNextPossibleTokensWalker")}constructor(t,r){super(),this.topProd=t,this.path=r,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=jr(this.path.ruleStack).reverse(),this.occurrenceStack=jr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,i){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let n=r.concat(i);this.updateExpectedNext(),this.walk(t.referencedRule,n)}}updateExpectedNext(){qe(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},fw=class extends ZI{static{s(this,"NextAfterTokenWalker")}constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,i){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let n=r.concat(i),a=new ui({definition:n});this.possibleTokTypes=yf(a),this.found=!0}}},pg=class extends $c{static{s(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},pw=class extends pg{static{s(this,"NextTerminalAfterManyWalker")}walkMany(t,r,i){if(t.idx===this.occurrence){let n=Rn(r.concat(i));this.result.isEndOfRule=n===void 0,n instanceof gr&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkMany(t,r,i)}},Cx=class extends pg{static{s(this,"NextTerminalAfterManySepWalker")}walkManySep(t,r,i){if(t.idx===this.occurrence){let n=Rn(r.concat(i));this.result.isEndOfRule=n===void 0,n instanceof gr&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkManySep(t,r,i)}},mw=class extends pg{static{s(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,r,i){if(t.idx===this.occurrence){let n=Rn(r.concat(i));this.result.isEndOfRule=n===void 0,n instanceof gr&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOne(t,r,i)}},Sx=class extends pg{static{s(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,r,i){if(t.idx===this.occurrence){let n=Rn(r.concat(i));this.result.isEndOfRule=n===void 0,n instanceof gr&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOneSep(t,r,i)}};s(gw,"possiblePathsFrom");s(yw,"nextPossibleTokensAfter");s(UBt,"expandTopLevelRule")});function _x(e){if(e instanceof Yr||e==="Option")return Ri.OPTION;if(e instanceof Er||e==="Repetition")return Ri.REPETITION;if(e instanceof hi||e==="RepetitionMandatory")return Ri.REPETITION_MANDATORY;if(e instanceof di||e==="RepetitionMandatoryWithSeparator")return Ri.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof ni||e==="RepetitionWithSeparator")return Ri.REPETITION_WITH_SEPARATOR;if(e instanceof si||e==="Alternation")return Ri.ALTERNATION;throw Error("non exhaustive match")}function bw(e){let{occurrence:t,rule:r,prodType:i,maxLookahead:n}=e,a=_x(i);return a===Ri.ALTERNATION?mg(t,r,n):gg(t,r,a,n)}function $nt(e,t,r,i,n,a){let o=mg(e,t,r),l=qnt(o)?hg:Fc;return a(o,i,l,n)}function Fnt(e,t,r,i,n,a){let o=gg(e,t,n,r),l=qnt(o)?hg:Fc;return a(o[0],l,i)}function Vnt(e,t,r,i){let n=e.length,a=rs(e,o=>rs(o,l=>l.length===1));if(t)return function(o){let l=jt(o,u=>u.GATE);for(let u=0;uNr(u)),l=Mr(o,(u,h,d)=>(ct(h,f=>{pe(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=d),ct(f.categoryMatches,p=>{pe(u,p)||(u[p]=d)})}),u),{});return function(){let u=this.LA(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;oa.length===1),n=e.length;if(i&&!r){let a=Nr(e);if(a.length===1&&qe(a[0].categoryMatches)){let l=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}else{let o=Mr(a,(l,u,h)=>(l[u.tokenTypeIdx]=!0,ct(u.categoryMatches,d=>{l[d]=!0}),l),[]);return function(){let l=this.LA(1);return o[l.tokenTypeIdx]===!0}}}else return function(){t:for(let a=0;agw([o],1)),i=Pnt(r.length),n=jt(r,o=>{let l={};return ct(o,u=>{let h=JI(u.partialPath);ct(h,d=>{l[d]=!0})}),l}),a=r;for(let o=1;o<=t;o++){let l=a;a=Pnt(l.length);for(let u=0;u{let k=JI(x.partialPath);ct(k,T=>{n[u][T]=!0})})}}}}return i}function mg(e,t,r,i){let n=new xw(e,Ri.ALTERNATION,i);return t.accept(n),Gnt(n.result,r)}function gg(e,t,r,i){let n=new xw(e,r);t.accept(n);let a=n.result,l=new tN(t,e,r).startWalking(),u=new ui({definition:a}),h=new ui({definition:l});return Gnt([u,h],i)}function kw(e,t){t:for(let r=0;r{let n=t[i];return r===n||n.categoryMatchesMap[r.tokenTypeIdx]})}function qnt(e){return rs(e,t=>rs(t,r=>rs(r,i=>qe(i.categoryMatches))))}var Ri,tN,xw,yg=b(()=>{"use strict";Ee();wx();sw();bf();Rs();(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Ri||(Ri={}));s(_x,"getProdType");s(bw,"getLookaheadPaths");s($nt,"buildLookaheadFuncForOr");s(Fnt,"buildLookaheadFuncForOptionalProd");s(Vnt,"buildAlternativesLookAheadFunc");s(znt,"buildSingleAlternativeLookaheadFunction");tN=class extends $c{static{s(this,"RestDefinitionFinderWalker")}constructor(t,r,i){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=i}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,i,n){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=i.concat(n),!0):!1}walkOption(t,r,i){this.checkIsTarget(t,Ri.OPTION,r,i)||super.walkOption(t,r,i)}walkAtLeastOne(t,r,i){this.checkIsTarget(t,Ri.REPETITION_MANDATORY,r,i)||super.walkOption(t,r,i)}walkAtLeastOneSep(t,r,i){this.checkIsTarget(t,Ri.REPETITION_MANDATORY_WITH_SEPARATOR,r,i)||super.walkOption(t,r,i)}walkMany(t,r,i){this.checkIsTarget(t,Ri.REPETITION,r,i)||super.walkOption(t,r,i)}walkManySep(t,r,i){this.checkIsTarget(t,Ri.REPETITION_WITH_SEPARATOR,r,i)||super.walkOption(t,r,i)}},xw=class extends As{static{s(this,"InsideDefinitionFinderVisitor")}constructor(t,r,i){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=i,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Ri.OPTION)}visitRepetition(t){this.checkIsTarget(t,Ri.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Ri.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Ri.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Ri.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Ri.ALTERNATION)}};s(Pnt,"initializeArrayOfArrays");s(JI,"pathToHashKeys");s(HBt,"isUniquePrefixHash");s(Gnt,"lookAheadSequenceFromAlternatives");s(mg,"getLookaheadPathsForOr");s(gg,"getLookaheadPathsForOptionalProd");s(kw,"containsPath");s(Wnt,"isStrictPrefixOfPath");s(qnt,"areTokenCategoriesNotUsed")});function jnt(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return jt(t,r=>Object.assign({type:mn.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Unt(e,t,r,i){let n=qn(e,u=>YBt(u,r)),a=tPt(e,t,r),o=qn(e,u=>QBt(u,r)),l=qn(e,u=>KBt(u,e,i,r));return n.concat(a,o,l)}function YBt(e,t){let r=new eN;e.accept(r);let i=r.allProductions,n=ZD(i,XBt),a=Qs(n,l=>l.length>1);return jt(cr(a),l=>{let u=Rn(l),h=t.buildDuplicateFoundError(e,l),d=ta(u),f={message:h,type:mn.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:d,occurrence:u.idx},p=Hnt(u);return p&&(f.parameter=p),f})}function XBt(e){return`${ta(e)}_#_${e.idx}_#_${Hnt(e)}`}function Hnt(e){return e instanceof gr?e.terminalType.name:e instanceof Hr?e.nonTerminalName:""}function KBt(e,t,r,i){let n=[];if(Mr(t,(o,l)=>l.name===e.name?o+1:o,0)>1){let o=i.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});n.push({message:o,type:mn.DUPLICATE_RULE_NAME,ruleName:e.name})}return n}function Ynt(e,t,r){let i=[],n;return _i(t,e)||(n=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,i.push({message:n,type:mn.INVALID_RULE_OVERRIDE,ruleName:e})),i}function iN(e,t,r,i=[]){let n=[],a=Tw(t.definition);if(qe(a))return[];{let o=e.name;_i(a,e)&&n.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:i}),type:mn.LEFT_RECURSION,ruleName:o});let u=Hu(a,i.concat([e])),h=qn(u,d=>{let f=jr(i);return f.push(d),iN(e,d,r,f)});return n.concat(h)}}function Tw(e){let t=[];if(qe(e))return t;let r=Rn(e);if(r instanceof Hr)t.push(r.referencedRule);else if(r instanceof ui||r instanceof Yr||r instanceof hi||r instanceof di||r instanceof ni||r instanceof Er)t=t.concat(Tw(r.definition));else if(r instanceof si)t=Nr(jt(r.definition,a=>Tw(a.definition)));else if(!(r instanceof gr))throw Error("non exhaustive match");let i=gf(r),n=e.length>1;if(i&&n){let a=ji(e);return t.concat(Tw(a))}else return t}function Xnt(e,t){let r=new Ex;e.accept(r);let i=r.alternations;return qn(i,a=>{let o=Dc(a.definition);return qn(o,(l,u)=>{let h=yw([l],[],Fc,1);return qe(h)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:u}),type:mn.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:u+1}]:[]})})}function Knt(e,t,r){let i=new Ex;e.accept(i);let n=i.alternations;return n=Yu(n,o=>o.ignoreAmbiguities===!0),qn(n,o=>{let l=o.idx,u=o.maxLookahead||t,h=mg(l,e,u,o),d=ZBt(h,o,e,r),f=JBt(h,o,e,r);return d.concat(f)})}function QBt(e,t){let r=new Ex;e.accept(r);let i=r.alternations;return qn(i,a=>a.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:a}),type:mn.TOO_MANY_ALTS,ruleName:e.name,occurrence:a.idx}]:[])}function Qnt(e,t,r){let i=[];return ct(e,n=>{let a=new rN;n.accept(a);let o=a.allProductions;ct(o,l=>{let u=_x(l),h=l.maxLookahead||t,d=l.idx,p=gg(d,n,u,h)[0];if(qe(Nr(p))){let m=r.buildEmptyRepetitionError({topLevelRule:n,repetition:l});i.push({message:m,type:mn.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}function ZBt(e,t,r,i){let n=[],a=Mr(e,(l,u,h)=>(t.definition[h].ignoreAmbiguities===!0||ct(u,d=>{let f=[h];ct(e,(p,m)=>{h!==m&&kw(p,d)&&t.definition[m].ignoreAmbiguities!==!0&&f.push(m)}),f.length>1&&!kw(n,d)&&(n.push(d),l.push({alts:f,path:d}))}),l),[]);return jt(a,l=>{let u=jt(l.alts,d=>d+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:l.path}),type:mn.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}function JBt(e,t,r,i){let n=Mr(e,(o,l,u)=>{let h=jt(l,d=>({idx:u,path:d}));return o.concat(h)},[]);return Il(qn(n,o=>{if(t.definition[o.idx].ignoreAmbiguities===!0)return[];let u=o.idx,h=o.path,d=Or(n,p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx{let m=[p.idx+1,u+1],g=t.idx===0?"":t.idx;return{message:i.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:mn.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})}))}function tPt(e,t,r){let i=[],n=jt(t,a=>a.name);return ct(e,a=>{let o=a.name;if(_i(n,o)){let l=r.buildNamespaceConflictError(a);i.push({message:l,type:mn.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),i}var eN,Ex,rN,vx=b(()=>{"use strict";Ee();ea();Rs();yg();wx();bf();s(jnt,"validateLookahead");s(Unt,"validateGrammar");s(YBt,"validateDuplicateProductions");s(XBt,"identifyProductionForDuplicates");s(Hnt,"getExtraProductionArgument");eN=class extends As{static{s(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)}};s(KBt,"validateRuleDoesNotAlreadyExist");s(Ynt,"validateRuleIsOverridden");s(iN,"validateNoLeftRecursion");s(Tw,"getFirstNoneTerminal");Ex=class extends As{static{s(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};s(Xnt,"validateEmptyOrAlternative");s(Knt,"validateAmbiguousAlternationAlternatives");rN=class extends As{static{s(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)}};s(QBt,"validateTooManyAlts");s(Qnt,"validateSomeNonEmptyLookaheadPath");s(ZBt,"checkAlternativesAmbiguities");s(JBt,"checkPrefixAlternativesAmbiguities");s(tPt,"checkTerminalAndNoneTerminalsNameSpace")});function Znt(e){let t=Uu(e,{errMsgProvider:Ont}),r={};return ct(e.rules,i=>{r[i.name]=i}),Mnt(r,t.errMsgProvider)}function Jnt(e){return e=Uu(e,{errMsgProvider:Ko}),Unt(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var tst=b(()=>{"use strict";Ee();Bnt();vx();fg();s(Znt,"resolveGrammar");s(Jnt,"validateGrammar")});function dh(e){return _i(sst,e.name)}var est,rst,ist,nst,sst,xg,Tf,Ax,Rx,Lx,bg=b(()=>{"use strict";Ee();est="MismatchedTokenException",rst="NoViableAltException",ist="EarlyExitException",nst="NotAllInputParsedException",sst=[est,rst,ist,nst];Object.freeze(sst);s(dh,"isRecognitionException");xg=class extends Error{static{s(this,"RecognitionException")}constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Tf=class extends xg{static{s(this,"MismatchedTokenException")}constructor(t,r,i){super(t,r),this.previousToken=i,this.name=est}},Ax=class extends xg{static{s(this,"NoViableAltException")}constructor(t,r,i){super(t,r),this.previousToken=i,this.name=rst}},Rx=class extends xg{static{s(this,"NotAllInputParsedException")}constructor(t,r){super(t,r),this.name=nst}},Lx=class extends xg{static{s(this,"EarlyExitException")}constructor(t,r,i){super(t,r),this.previousToken=i,this.name=ist}}});function ePt(e,t,r,i,n,a,o){let l=this.getKeyForAutomaticLookahead(i,n),u=this.firstAfterRepMap[l];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new a(m,n).startWalking(),this.firstAfterRepMap[l]=u}let h=u.token,d=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&h===void 0&&(h=Aa,d=1),!(h===void 0||d===void 0)&&this.shouldInRepetitionRecoveryBeTried(h,d,o)&&this.tryInRepetitionRecovery(e,t,r,h)}var nN,aN,sN,Cw,oN=b(()=>{"use strict";kf();Ee();bg();VI();ea();nN={},aN="InRuleRecoveryException",sN=class extends Error{static{s(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=aN}},Cw=class{static{s(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=pe(t,"recoveryEnabled")?t.recoveryEnabled:Ls.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=ePt)}getTokenToInsert(t){let r=Gc(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,i,n){let a=this.findReSyncTokenType(),o=this.exportLexerState(),l=[],u=!1,h=this.LA(1),d=this.LA(1),f=s(()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:h,previous:p,ruleName:this.getCurrRuleFullName()}),g=new Tf(m,h,this.LA(0));g.resyncedTokens=Dc(l),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(d,n)){f();return}else if(i.call(this)){f(),t.apply(this,r);return}else this.tokenMatcher(d,a)?u=!0:(d=this.SKIP_TOKEN(),this.addToResyncTokens(d,l));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(t,r,i){return!(i===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let i=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(i)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let i=this.SKIP_TOKEN();return this.consumeToken(),i}throw new sN("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||qe(r))return!1;let i=this.LA(1);return Ss(r,a=>this.tokenMatcher(i,a))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(r);return _i(i,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),i=2;for(;;){let n=Ss(t,a=>Tx(r,a));if(n!==void 0)return n;r=this.LA(i),i++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return nN;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(i)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return jt(t,(i,n)=>n===0?nN:{ruleName:this.shortRuleNameToFullName(i),idxInCallingRule:r[n],inRule:this.shortRuleNameToFullName(t[n-1])})}flattenFollowSet(){let t=jt(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return Nr(t)}getFollowSetFromFollowKey(t){if(t===nN)return[Aa];let r=t.ruleName+t.idxInCallingRule+aw+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,Aa)||r.push(t),r}reSyncTo(t){let r=[],i=this.LA(1);for(;this.tokenMatcher(i,t)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,r);return Dc(r)}attemptInRepetitionRecovery(t,r,i,n,a,o,l){}getCurrentGrammarPath(t,r){let i=this.getHumanReadableRuleStack(),n=jr(this.RULE_OCCURRENCE_STACK);return{ruleStack:i,occurrenceStack:n,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return jt(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};s(ePt,"attemptInRepetitionRecovery")});function Sw(e,t,r){return r|t|e}var ww=b(()=>{"use strict";s(Sw,"getKeyForAutomaticLookahead")});var qc,lN=b(()=>{"use strict";Ee();fg();ea();vx();yg();qc=class{static{s(this,"LLkLookaheadStrategy")}constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:Ls.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(qe(r)){let i=this.validateEmptyOrAlternatives(t.rules),n=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...i,...n,...a]}return r}validateNoLeftRecursion(t){return qn(t,r=>iN(r,r,Ko))}validateEmptyOrAlternatives(t){return qn(t,r=>Xnt(r,Ko))}validateAmbiguousAlternationAlternatives(t,r){return qn(t,i=>Knt(i,r,Ko))}validateSomeNonEmptyLookaheadPath(t,r){return Qnt(t,r,Ko)}buildLookaheadForAlternation(t){return $nt(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Vnt)}buildLookaheadForOptional(t){return Fnt(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,_x(t.prodType),znt)}}});function rPt(e){_w.reset(),e.accept(_w);let t=_w.dslMethods;return _w.reset(),t}var Ew,cN,_w,ast=b(()=>{"use strict";Ee();ea();ww();Rs();lN();Ew=class{static{s(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=pe(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Ls.dynamicTokensEnabled,this.maxLookahead=pe(t,"maxLookahead")?t.maxLookahead:Ls.maxLookahead,this.lookaheadStrategy=pe(t,"lookaheadStrategy")?t.lookaheadStrategy:new qc({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){ct(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:i,repetition:n,option:a,repetitionMandatory:o,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:u}=rPt(r);ct(i,h=>{let d=h.idx===0?"":h.idx;this.TRACE_INIT(`${ta(h)}${d}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:h.idx,rule:r,maxLookahead:h.maxLookahead||this.maxLookahead,hasPredicates:h.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=Sw(this.fullRuleNameToShort[r.name],256,h.idx);this.setLaFuncCache(p,f)})}),ct(n,h=>{this.computeLookaheadFunc(r,h.idx,768,"Repetition",h.maxLookahead,ta(h))}),ct(a,h=>{this.computeLookaheadFunc(r,h.idx,512,"Option",h.maxLookahead,ta(h))}),ct(o,h=>{this.computeLookaheadFunc(r,h.idx,1024,"RepetitionMandatory",h.maxLookahead,ta(h))}),ct(l,h=>{this.computeLookaheadFunc(r,h.idx,1536,"RepetitionMandatoryWithSeparator",h.maxLookahead,ta(h))}),ct(u,h=>{this.computeLookaheadFunc(r,h.idx,1280,"RepetitionWithSeparator",h.maxLookahead,ta(h))})})})}computeLookaheadFunc(t,r,i,n,a,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),u=Sw(this.fullRuleNameToShort[t.name],i,r);this.setLaFuncCache(u,l)})}getKeyForAutomaticLookahead(t,r){let i=this.getLastExplicitRuleShortName();return Sw(i,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},cN=class extends As{static{s(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)}},_w=new cN;s(rPt,"collectMethods")});function dN(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset{"use strict";s(dN,"setNodeLocationOnlyOffset");s(fN,"setNodeLocationFull");s(ost,"addTerminalToCst");s(lst,"addNoneTerminalToCst")});function pN(e,t){Object.defineProperty(e,iPt,{enumerable:!1,configurable:!0,writable:!1,value:t})}var iPt,ust=b(()=>{"use strict";iPt="name";s(pN,"defineNameProp")});function nPt(e,t){let r=Ar(e),i=r.length;for(let n=0;no.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${a.join(` + +`).replace(/\n/g,` + `)}`)}},"validateVisitor")};return r.prototype=i,r.prototype.constructor=r,r._RULE_NAMES=t,r}function dst(e,t,r){let i=s(function(){},"derivedConstructor");pN(i,e+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return ct(t,a=>{n[a]=nPt}),i.prototype=n,i.prototype.constructor=i,i}function sPt(e,t){return aPt(e,t)}function aPt(e,t){let r=Or(t,n=>en(e[n])===!1),i=jt(r,n=>({msg:`Missing visitor method: <${n}> on ${e.constructor.name} CST Visitor.`,type:mN.MISSING_METHOD,methodName:n}));return Il(i)}var mN,fst=b(()=>{"use strict";Ee();ust();s(nPt,"defaultVisit");s(hst,"createBaseSemanticVisitorConstructor");s(dst,"createBaseVisitorConstructorWithDefaults");(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(mN||(mN={}));s(sPt,"validateVisitor");s(aPt,"validateMissingCstMethods")});var Lw,pst=b(()=>{"use strict";cst();Ee();fst();ea();Lw=class{static{s(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=pe(t,"nodeLocationTracking")?t.nodeLocationTracking:Ls.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Oi,this.cstFinallyStateUpdate=Oi,this.cstPostTerminal=Oi,this.cstPostNonTerminal=Oi,this.cstPostRule=Oi;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=fN,this.setNodeLocationFromNode=fN,this.cstPostRule=Oi,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Oi,this.setNodeLocationFromNode=Oi,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=dN,this.setNodeLocationFromNode=dN,this.cstPostRule=Oi,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Oi,this.setNodeLocationFromNode=Oi,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Oi,this.setNodeLocationFromNode=Oi,this.cstPostRule=Oi,this.setInitialNodeLocation=Oi;else throw Error(`Invalid config option: "${t.nodeLocationTracking}"`)}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){let r=this.LA(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){let r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){let r=this.LA(0),i=t.location;i.startOffset<=r.startOffset?(i.endOffset=r.endOffset,i.endLine=r.endLine,i.endColumn=r.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)}cstPostRuleOnlyOffset(t){let r=this.LA(0),i=t.location;i.startOffset<=r.startOffset?i.endOffset=r.endOffset:i.startOffset=NaN}cstPostTerminal(t,r){let i=this.CST_STACK[this.CST_STACK.length-1];ost(i,r,t),this.setNodeLocationFromToken(i.location,r)}cstPostNonTerminal(t,r){let i=this.CST_STACK[this.CST_STACK.length-1];lst(i,r,t),this.setNodeLocationFromNode(i.location,t.location)}getBaseCstVisitorConstructor(){if(rr(this.baseCstVisitorConstructor)){let t=hst(this.className,Ar(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(rr(this.baseCstVisitorWithDefaultsConstructor)){let t=dst(this.className,Ar(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){let t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}}});var Dw,mst=b(()=>{"use strict";ea();Dw=class{static{s(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(this.selfAnalysisDone!==!0)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)):kg}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?kg:this.tokVector[r]}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()}}});var Iw,gst=b(()=>{"use strict";Ee();bg();ea();fg();vx();Rs();Iw=class{static{s(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,r,i){return this.consumeInternal(r,t,i)}subrule(t,r,i){return this.subruleInternal(r,t,i)}option(t,r){return this.optionInternal(r,t)}or(t,r){return this.orInternal(r,t)}many(t,r){return this.manyInternal(t,r)}atLeastOne(t,r){return this.atLeastOneInternal(t,r)}CONSUME(t,r){return this.consumeInternal(t,0,r)}CONSUME1(t,r){return this.consumeInternal(t,1,r)}CONSUME2(t,r){return this.consumeInternal(t,2,r)}CONSUME3(t,r){return this.consumeInternal(t,3,r)}CONSUME4(t,r){return this.consumeInternal(t,4,r)}CONSUME5(t,r){return this.consumeInternal(t,5,r)}CONSUME6(t,r){return this.consumeInternal(t,6,r)}CONSUME7(t,r){return this.consumeInternal(t,7,r)}CONSUME8(t,r){return this.consumeInternal(t,8,r)}CONSUME9(t,r){return this.consumeInternal(t,9,r)}SUBRULE(t,r){return this.subruleInternal(t,0,r)}SUBRULE1(t,r){return this.subruleInternal(t,1,r)}SUBRULE2(t,r){return this.subruleInternal(t,2,r)}SUBRULE3(t,r){return this.subruleInternal(t,3,r)}SUBRULE4(t,r){return this.subruleInternal(t,4,r)}SUBRULE5(t,r){return this.subruleInternal(t,5,r)}SUBRULE6(t,r){return this.subruleInternal(t,6,r)}SUBRULE7(t,r){return this.subruleInternal(t,7,r)}SUBRULE8(t,r){return this.subruleInternal(t,8,r)}SUBRULE9(t,r){return this.subruleInternal(t,9,r)}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,r,i=Tg){if(_i(this.definedRulesNames,t)){let o={message:Ko.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:mn.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(o)}this.definedRulesNames.push(t);let n=this.defineRule(t,r,i);return this[t]=n,n}OVERRIDE_RULE(t,r,i=Tg){let n=Ynt(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);let a=this.defineRule(t,r,i);return this[t]=a,a}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);let i=this.saveRecogState();try{return t.apply(this,r),!0}catch(n){if(dh(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return iw(cr(this.gastProductionsCache))}}});var Nw,yst=b(()=>{"use strict";Ee();ww();bg();yg();wx();ea();oN();kf();bf();Nw=class{static{s(this,"RecognizerEngine")}initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=hg,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},pe(r,"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(fe(t)){if(qe(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(typeof t[0].startOffset=="number")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(fe(t))this.tokensMap=Mr(t,(a,o)=>(a[o.name]=o,a),{});else if(pe(t,"modes")&&rs(Nr(cr(t.modes)),_nt)){let a=Nr(cr(t.modes)),o=Vm(a);this.tokensMap=Mr(o,(l,u)=>(l[u.name]=u,l),{})}else if(ii(t))this.tokensMap=jr(t);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Aa;let i=pe(t,"modes")?Nr(cr(t.modes)):cr(t),n=rs(i,a=>qe(a.categoryMatches));this.tokenMatcher=n?hg:Fc,Vc(cr(this.tokensMap))}defineRule(t,r,i){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=pe(i,"resyncEnabled")?i.resyncEnabled:Tg.resyncEnabled,a=pe(i,"recoveryValueFunc")?i.recoveryValueFunc:Tg.recoveryValueFunc,o=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=t,this.fullRuleNameToShort[t]=o;let l;return this.outputCst===!0?l=s(function(...d){try{this.ruleInvocationStateUpdate(o,t,this.subruleIdx),r.apply(this,d);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):l=s(function(...d){try{return this.ruleInvocationStateUpdate(o,t,this.subruleIdx),r.apply(this,d)}catch(f){return this.invokeRuleCatch(f,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(l,{ruleName:t,originalGrammarAction:r})}invokeRuleCatch(t,r,i){let n=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(dh(t)){let o=t;if(a){let l=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(l))if(o.resyncedTokens=this.reSyncTo(l),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return i(t);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,o.partialCstResult=u}throw o}}else{if(n)return this.moveToTerminatedState(),i(t);throw o}}else throw t}optionInternal(t,r){let i=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(t,r,i)}optionInternalLogic(t,r,i){let n=this.getLaFuncFromCache(i),a;if(typeof t!="function"){a=t.DEF;let o=t.GATE;if(o!==void 0){let l=n;n=s(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else a=t;if(n.call(this)===!0)return a.call(this)}atLeastOneInternal(t,r){let i=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,r,i)}atLeastOneInternalLogic(t,r,i){let n=this.getLaFuncFromCache(i),a;if(typeof r!="function"){a=r.DEF;let o=r.GATE;if(o!==void 0){let l=n;n=s(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else a=r;if(n.call(this)===!0){let o=this.doSingleRepetition(a);for(;n.call(this)===!0&&o===!0;)o=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(t,Ri.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],n,1024,t,mw)}atLeastOneSepFirstInternal(t,r){let i=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,r,i)}atLeastOneSepFirstInternalLogic(t,r,i){let n=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(i).call(this)===!0){n.call(this);let l=s(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,a,l,n,Sx],l,1536,t,Sx)}else throw this.raiseEarlyExitException(t,Ri.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let i=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,r,i)}manyInternalLogic(t,r,i){let n=this.getLaFuncFromCache(i),a;if(typeof r!="function"){a=r.DEF;let l=r.GATE;if(l!==void 0){let u=n;n=s(()=>l.call(this)&&u.call(this),"lookaheadFunction")}}else a=r;let o=!0;for(;n.call(this)===!0&&o===!0;)o=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],n,768,t,pw,o)}manySepFirstInternal(t,r){let i=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,r,i)}manySepFirstInternalLogic(t,r,i){let n=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(i).call(this)===!0){n.call(this);let l=s(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,a,l,n,Cx],l,1280,t,Cx)}}repetitionSepSecondInternal(t,r,i,n,a){for(;i();)this.CONSUME(r),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,i,n,a],i,1536,t,a)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let i=this.getKeyForAutomaticLookahead(256,r),n=fe(t)?t:t.DEF,o=this.getLaFuncFromCache(i).call(this,n);if(o!==void 0)return n[o].ALT.call(this);this.raiseNoAltException(r,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let t=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Rx(r,t))}}subruleInternal(t,r,i){let n;try{let a=i!==void 0?i.ARGS:void 0;return this.subruleIdx=r,n=t.apply(this,a),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:t.ruleName),n}catch(a){throw this.subruleInternalError(a,i,t.ruleName)}}subruleInternalError(t,r,i){throw dh(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:i),delete t.partialCstResult),t}consumeInternal(t,r,i){let n;try{let a=this.LA(1);this.tokenMatcher(a,t)===!0?(this.consumeToken(),n=a):this.consumeInternalError(t,a,i)}catch(a){n=this.consumeInternalRecovery(t,r,a)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:t.name,n),n}consumeInternalError(t,r,i){let n,a=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Tf(n,r,a))}consumeInternalRecovery(t,r,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){let n=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,n)}catch(a){throw a.name===aN?i:a}}else throw i}saveRecogState(){let t=this.errors,r=jr(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,r,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Aa)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var Ow,xst=b(()=>{"use strict";bg();Ee();yg();ea();Ow=class{static{s(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=pe(t,"errorMessageProvider")?t.errorMessageProvider:Ls.errorMessageProvider}SAVE_ERROR(t){if(dh(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:jr(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return jr(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,r,i){let n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],l=gg(t,a,r,this.maxLookahead)[0],u=[];for(let d=1;d<=this.maxLookahead;d++)u.push(this.LA(d));let h=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:u,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new Lx(h,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],a=mg(t,n,this.maxLookahead),o=[];for(let h=1;h<=this.maxLookahead;h++)o.push(this.LA(h));let l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:o,previous:l,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Ax(u,this.LA(1),l))}}});var Mw,bst=b(()=>{"use strict";wx();Ee();Mw=class{static{s(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,r){let i=this.gastProductionsCache[t];if(rr(i))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return yw([i],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){let r=Rn(t.ruleStack),n=this.getGAstProductions()[r];return new fw(n,t).startWalking()}}});function Ix(e,t,r,i=!1){Pw(r);let n=An(this.recordingProdStack),a=en(t)?t:t.DEF,o=new e({definition:[],idx:r});return i&&(o.separator=t.SEP),pe(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),n.definition.push(o),this.recordingProdStack.pop(),$w}function cPt(e,t){Pw(t);let r=An(this.recordingProdStack),i=fe(e)===!1,n=i===!1?e:e.DEF,a=new si({definition:[],idx:t,ignoreAmbiguities:i&&e.IGNORE_AMBIGUITIES===!0});pe(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);let o=G0(n,l=>en(l.GATE));return a.hasPredicates=o,r.definition.push(a),ct(n,l=>{let u=new ui({definition:[]});a.definition.push(u),pe(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:pe(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),$w}function Cst(e){return e===0?"":`${e}`}function Pw(e){if(e<0||e>Tst){let t=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${Tst+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var $w,kst,Tst,Sst,wst,lPt,Bw,_st=b(()=>{"use strict";Ee();Rs();bx();bf();kf();ea();ww();$w={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze($w);kst=!0,Tst=Math.pow(2,8)-1,Sst=hh({name:"RECORDING_PHASE_TOKEN",pattern:Ai.NA});Vc([Sst]);wst=Gc(Sst,`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(wst);lPt={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Bw=class{static{s(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){let r=t>0?t:"";this[`CONSUME${r}`]=function(i,n){return this.consumeInternalRecord(i,t,n)},this[`SUBRULE${r}`]=function(i,n){return this.subruleInternalRecord(i,t,n)},this[`OPTION${r}`]=function(i){return this.optionInternalRecord(i,t)},this[`OR${r}`]=function(i){return this.orInternalRecord(i,t)},this[`MANY${r}`]=function(i){this.manyInternalRecord(t,i)},this[`MANY_SEP${r}`]=function(i){this.manySepFirstInternalRecord(t,i)},this[`AT_LEAST_ONE${r}`]=function(i){this.atLeastOneInternalRecord(t,i)},this[`AT_LEAST_ONE_SEP${r}`]=function(i){this.atLeastOneSepFirstInternalRecord(t,i)}}this.consume=function(t,r,i){return this.consumeInternalRecord(r,t,i)},this.subrule=function(t,r,i){return this.subruleInternalRecord(r,t,i)},this.option=function(t,r){return this.optionInternalRecord(r,t)},this.or=function(t,r){return this.orInternalRecord(r,t)},this.many=function(t,r){this.manyInternalRecord(t,r)},this.atLeastOne=function(t,r){this.atLeastOneInternalRecord(t,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let t=this;for(let r=0;r<10;r++){let i=r>0?r:"";delete t[`CONSUME${i}`],delete t[`SUBRULE${i}`],delete t[`OPTION${i}`],delete t[`OR${i}`],delete t[`MANY${i}`],delete t[`MANY_SEP${i}`],delete t[`AT_LEAST_ONE${i}`],delete t[`AT_LEAST_ONE_SEP${i}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,r){return()=>!0}LA_RECORD(t){return kg}topLevelRuleRecord(t,r){try{let i=new vs({definition:[],name:t});return i.name=t,this.recordingProdStack.push(i),r.call(this),this.recordingProdStack.pop(),i}catch(i){if(i.KNOWN_RECORDER_ERROR!==!0)try{i.message=i.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 i}throw i}}optionInternalRecord(t,r){return Ix.call(this,Yr,t,r)}atLeastOneInternalRecord(t,r){Ix.call(this,hi,r,t)}atLeastOneSepFirstInternalRecord(t,r){Ix.call(this,di,r,t,kst)}manyInternalRecord(t,r){Ix.call(this,Er,r,t)}manySepFirstInternalRecord(t,r){Ix.call(this,ni,r,t,kst)}orInternalRecord(t,r){return cPt.call(this,t,r)}subruleInternalRecord(t,r,i){if(Pw(r),!t||pe(t,"ruleName")===!1){let l=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l}let n=An(this.recordingProdStack),a=t.ruleName,o=new Hr({idx:r,nonTerminalName:a,label:i?.LABEL,referencedRule:void 0});return n.definition.push(o),this.outputCst?lPt:$w}consumeInternalRecord(t,r,i){if(Pw(r),!YI(t)){let o=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let n=An(this.recordingProdStack),a=new gr({idx:r,terminalType:t,label:i?.LABEL});return n.definition.push(a),wst}};s(Ix,"recordProd");s(cPt,"recordOrProd");s(Cst,"getIdxSuffix");s(Pw,"assertMethodIdxIsValid")});var Fw,Est=b(()=>{"use strict";Ee();ag();ea();Fw=class{static{s(this,"PerformanceTracer")}initPerformanceTracer(t){if(pe(t,"traceInitPerf")){let r=t.traceInitPerf,i=typeof r=="number";this.traceInitMaxIdent=i?r:1/0,this.traceInitPerf=i?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=Ls.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${t}>`);let{time:n,value:a}=gx(r),o=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,a}else return r()}}});function vst(e,t){t.forEach(r=>{let i=r.prototype;Object.getOwnPropertyNames(i).forEach(n=>{if(n==="constructor")return;let a=Object.getOwnPropertyDescriptor(i,n);a&&(a.get||a.set)?Object.defineProperty(e.prototype,n,a):e.prototype[n]=r.prototype[n]})})}var Ast=b(()=>{"use strict";s(vst,"applyMixins")});function Vw(e=void 0){return function(){return e}}var kg,Ls,Tg,mn,Nx,Ox,ea=b(()=>{"use strict";Ee();ag();nnt();kf();fg();tst();oN();ast();pst();mst();gst();yst();xst();bst();_st();Est();Ast();vx();kg=Gc(Aa,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(kg);Ls=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Wc,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Tg=Object.freeze({recoveryValueFunc:s(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(mn||(mn={}));s(Vw,"EMPTY_ALT");Nx=class e{static{s(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{yx(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),ct(this.definedRulesNames,n=>{let o=this[n].originalGrammarAction,l;this.TRACE_INIT(`${n} Rule`,()=>{l=this.topLevelRuleRecord(n,o)}),this.gastProductionsCache[n]=l})}finally{this.disableRecording()}});let i=[];if(this.TRACE_INIT("Grammar Resolving",()=>{i=Znt({rules:cr(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{if(qe(i)&&this.skipValidations===!1){let n=Jnt({rules:cr(this.gastProductionsCache),tokenTypes:cr(this.tokensMap),errMsgProvider:Ko,grammarName:r}),a=jnt({lookaheadStrategy:this.lookaheadStrategy,rules:cr(this.gastProductionsCache),tokenTypes:cr(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(n,a)}}),qe(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let n=int(cr(this.gastProductionsCache));this.resyncFollows=n}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var n,a;(a=(n=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(n,{rules:cr(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(cr(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!qe(this.definitionErrors))throw t=jt(this.definitionErrors,n=>n.message),new Error(`Parser Definition Errors detected: + ${t.join(` +------------------------------- +`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let i=this;if(i.initErrorHandler(r),i.initLexerAdapter(),i.initLooksAhead(r),i.initRecognizerEngine(t,r),i.initRecoverable(r),i.initTreeBuilder(r),i.initContentAssist(),i.initGastRecorder(r),i.initPerformanceTracer(r),pe(r,"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=pe(r,"skipValidations")?r.skipValidations:Ls.skipValidations}};Nx.DEFER_DEFINITION_ERRORS_HANDLING=!1;vst(Nx,[Cw,Ew,Lw,Dw,Nw,Iw,Ow,Mw,Bw,Fw]);Ox=class extends Nx{static{s(this,"EmbeddedActionsParser")}constructor(t,r=Ls){let i=jr(r);i.outputCst=!1,super(t,i)}}});var Rst=b(()=>{"use strict";Rs()});var Lst=b(()=>{"use strict"});var Dst=b(()=>{"use strict";Rst();Lst()});var Ist=b(()=>{"use strict";BI()});var fh=b(()=>{"use strict";BI();ea();bx();kf();yg();lN();fg();bg();XI();Rs();Rs();Dst();Ist()});function Cf(e,t,r){return`${e.name}_${t}_${r}`}function Bst(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};gPt(t,e);let r=e.length;for(let i=0;iPst(e,t,o));return _g(e,t,i,r,...n)}function CPt(e,t,r){let i=Dn(e,t,r,{type:ph});mh(e,i);let n=_g(e,t,i,r,Sf(e,t,r));return SPt(e,t,r,n)}function Sf(e,t,r){let i=Or(jt(r.definition,n=>Pst(e,t,n)),n=>n!==void 0);return i.length===1?i[0]:i.length===0?void 0:_Pt(e,i)}function $st(e,t,r,i,n){let a=i.left,o=i.right,l=Dn(e,t,r,{type:mPt});mh(e,l);let u=Dn(e,t,r,{type:Mst});return a.loopback=l,u.loopback=l,e.decisionMap[Cf(t,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,nn(o,l),n===void 0?(nn(l,a),nn(l,u)):(nn(l,u),nn(l,n.left),nn(n.right,a)),{left:a,right:u}}function Fst(e,t,r,i,n){let a=i.left,o=i.right,l=Dn(e,t,r,{type:pPt});mh(e,l);let u=Dn(e,t,r,{type:Mst}),h=Dn(e,t,r,{type:fPt});return l.loopback=h,u.loopback=h,nn(l,a),nn(l,u),nn(o,h),n!==void 0?(nn(h,u),nn(h,n.left),nn(n.right,a)):nn(h,l),e.decisionMap[Cf(t,n?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u}}function SPt(e,t,r,i){let n=i.left,a=i.right;return nn(n,a),e.decisionMap[Cf(t,"Option",r.idx)]=n,i}function mh(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function _g(e,t,r,i,...n){let a=Dn(e,t,i,{type:dPt,start:r});r.end=a;for(let l of n)l!==void 0?(nn(r,l.left),nn(l.right,a)):nn(r,a);let o={left:r,right:a};return e.decisionMap[Cf(t,wPt(i),i.idx)]=r,o}function wPt(e){if(e instanceof si)return"Alternation";if(e instanceof Yr)return"Option";if(e instanceof Er)return"Repetition";if(e instanceof ni)return"RepetitionWithSeparator";if(e instanceof hi)return"RepetitionMandatory";if(e instanceof di)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function _Pt(e,t){let r=t.length;for(let a=0;a{"use strict";Pm();HD();fh();s(Cf,"buildATNKey");ph=1,hPt=2,Nst=4,Ost=5,wg=7,dPt=8,fPt=9,pPt=10,mPt=11,Mst=12,Mx=class{static{s(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},Cg=class extends Mx{static{s(this,"AtomTransition")}constructor(t,r){super(t),this.tokenType=r}},Bx=class extends Mx{static{s(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},Sg=class extends Mx{static{s(this,"RuleTransition")}constructor(t,r,i){super(t),this.rule=r,this.followState=i}isEpsilon(){return!0}};s(Bst,"createATN");s(gPt,"createRuleStartAndStopATNStates");s(Pst,"atom");s(yPt,"repetition");s(xPt,"repetitionSep");s(bPt,"repetitionMandatory");s(kPt,"repetitionMandatorySep");s(TPt,"alternation");s(CPt,"option");s(Sf,"block");s($st,"plus");s(Fst,"star");s(SPt,"optional");s(mh,"defineDecisionState");s(_g,"makeAlts");s(wPt,"getProdType");s(_Pt,"makeBlock");s(yN,"tokenRef");s(EPt,"ruleRef");s(vPt,"buildRuleHandle");s(nn,"epsilon");s(Dn,"newState");s(xN,"addTransition");s(APt,"removeState")});function bN(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}var Px,Eg,zst=b(()=>{"use strict";Pm();Px={},Eg=class{static{s(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){let r=bN(t);r in this.map||(this.map[r]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return jt(this.configs,t=>t.alt)}get key(){let t="";for(let r in this.map)t+=r+":";return t}};s(bN,"getATNConfigKey")});function RPt(e,t){let r={};return i=>{let n=i.toString(),a=r[n];return a!==void 0||(a={atnStartState:e,decision:t,states:{}},r[n]=a),a}}function Wst(e,t=!0){let r=new Set;for(let i of e){let n=new Set;for(let a of i){if(a===void 0){if(t)break;return!1}let o=[a.tokenTypeIdx].concat(a.categoryMatches);for(let l of o)if(r.has(l)){if(!n.has(l))return!1}else r.add(l),n.add(l)}}return!0}function LPt(e){let t=e.decisionStates.length,r=Array(t);for(let i=0;izc(n)).join(", "),r=e.production.idx===0?"":e.production.idx,i=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${MPt(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +`;return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i}function MPt(e){if(e instanceof Hr)return"SUBRULE";if(e instanceof Yr)return"OPTION";if(e instanceof si)return"OR";if(e instanceof hi)return"AT_LEAST_ONE";if(e instanceof di)return"AT_LEAST_ONE_SEP";if(e instanceof ni)return"MANY_SEP";if(e instanceof Er)return"MANY";if(e instanceof gr)return"CONSUME";throw Error("non exhaustive match")}function BPt(e,t,r){let i=qn(t.configs.elements,a=>a.state.transitions),n=bet(i.filter(a=>a instanceof Cg).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:n,tokenPath:e}}function PPt(e,t){return e.edges[t.tokenTypeIdx]}function $Pt(e,t,r){let i=new Eg,n=[];for(let o of e.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===wg){n.push(o);continue}let l=o.state.transitions.length;for(let u=0;u0&&!WPt(a))for(let o of n)a.add(o);return a}function FPt(e,t){if(e instanceof Cg&&Tx(t,e.tokenType))return e.target}function VPt(e,t){let r;for(let i of e.elements)if(t.is(i.alt)===!0){if(r===void 0)r=i.alt;else if(r!==i.alt)return}return r}function jst(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function qst(e,t,r,i){return i=Ust(e,i),t.edges[r.tokenTypeIdx]=i,i}function Ust(e,t){if(t===Px)return t;let r=t.configs.key,i=e.states[r];return i!==void 0?i:(t.configs.finalize(),e.states[r]=t,t)}function zPt(e){let t=new Eg,r=e.transitions.length;for(let i=0;i0){let n=[...e.stack],o={state:n.pop(),alt:e.alt,stack:n};Gw(o,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let i=r.transitions.length;for(let n=0;n1)return!0;return!1}function YPt(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}var zw,Gst,$x,Hst=b(()=>{"use strict";fh();Vst();zst();e6();XD();ket();Pm();DC();aS();hS();s6();s(RPt,"createDFACache");zw=class{static{s(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,r){this.predicates[t]=r}toString(){let t="",r=this.predicates.length;for(let i=0;iconsole.log(i))}initialize(t){this.atn=Bst(t.rules),this.dfas=LPt(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:r,rule:i,hasPredicates:n,dynamicTokensEnabled:a}=t,o=this.dfas,l=this.logging,u=Cf(i,"Alternation",r),d=this.atn.decisionMap[u].decision,f=jt(bw({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:i}),p=>jt(p,m=>m[0]));if(Wst(f,!1)&&!a){let p=Mr(f,(m,g,y)=>(ct(g,x=>{x&&(m[x.tokenTypeIdx]=y,ct(x.categoryMatches,k=>{m[k]=y}))}),m),{});return n?function(m){var g;let y=this.LA(1),x=p[y.tokenTypeIdx];if(m!==void 0&&x!==void 0){let k=(g=m[x])===null||g===void 0?void 0:g.GATE;if(k!==void 0&&k.call(this)===!1)return}return x}:function(){let m=this.LA(1);return p[m.tokenTypeIdx]}}else return n?function(p){let m=new zw,g=p===void 0?0:p.length;for(let x=0;xjt(p,m=>m[0]));if(Wst(f)&&f[0][0]&&!a){let p=f[0],m=Nr(p);if(m.length===1&&qe(m[0].categoryMatches)){let y=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===y}}else{let g=Mr(m,(y,x)=>(x!==void 0&&(y[x.tokenTypeIdx]=!0,ct(x.categoryMatches,k=>{y[k]=!0})),y),{});return function(){let y=this.LA(1);return g[y.tokenTypeIdx]===!0}}}return function(){let p=kN.call(this,o,d,Gst,l);return typeof p=="object"?!1:p===0}}};s(Wst,"isLL1Sequence");s(LPt,"initATNSimulator");s(kN,"adaptivePredict");s(DPt,"performLookahead");s(IPt,"computeLookaheadTarget");s(NPt,"reportLookaheadAmbiguity");s(OPt,"buildAmbiguityError");s(MPt,"getProductionDslName");s(BPt,"buildAdaptivePredictError");s(PPt,"getExistingTargetState");s($Pt,"computeReachSet");s(FPt,"getReachableTarget");s(VPt,"getUniqueAlt");s(jst,"newDFAState");s(qst,"addDFAEdge");s(Ust,"addDFAState");s(zPt,"computeStartState");s(Gw,"closure");s(GPt,"getEpsilonTarget");s(WPt,"hasConfigInRuleStopState");s(qPt,"allConfigsInRuleStopStates");s(jPt,"hasConflictTerminatingPrediction");s(UPt,"getConflictingAltSets");s(HPt,"hasConflictingAltSet");s(YPt,"hasStateAssociatedWithOneAlt")});var Yst=b(()=>{"use strict";Hst()});var Qw={};Fe(Qw,{AnnotatedTextEdit:()=>jc,ChangeAnnotation:()=>wf,ChangeAnnotationIdentifier:()=>jn,CodeAction:()=>eO,CodeActionContext:()=>tO,CodeActionKind:()=>JN,CodeActionTriggerKind:()=>jx,CodeDescription:()=>LN,CodeLens:()=>rO,Color:()=>qw,ColorInformation:()=>wN,ColorPresentation:()=>_N,Command:()=>_f,CompletionItem:()=>zN,CompletionItemKind:()=>MN,CompletionItemLabelDetails:()=>VN,CompletionItemTag:()=>PN,CompletionList:()=>GN,CreateFile:()=>Ag,DeleteFile:()=>Lg,Diagnostic:()=>zx,DiagnosticRelatedInformation:()=>jw,DiagnosticSeverity:()=>AN,DiagnosticTag:()=>RN,DocumentHighlight:()=>HN,DocumentHighlightKind:()=>UN,DocumentLink:()=>nO,DocumentSymbol:()=>ZN,DocumentUri:()=>TN,EOL:()=>XPt,FoldingRange:()=>vN,FoldingRangeKind:()=>EN,FormattingOptions:()=>iO,Hover:()=>WN,InlayHint:()=>fO,InlayHintKind:()=>Xw,InlayHintLabelPart:()=>Kw,InlineCompletionContext:()=>bO,InlineCompletionItem:()=>mO,InlineCompletionList:()=>gO,InlineCompletionTriggerKind:()=>yO,InlineValueContext:()=>dO,InlineValueEvaluatableExpression:()=>hO,InlineValueText:()=>cO,InlineValueVariableLookup:()=>uO,InsertReplaceEdit:()=>$N,InsertTextFormat:()=>BN,InsertTextMode:()=>FN,Location:()=>Vx,LocationLink:()=>SN,MarkedString:()=>qx,MarkupContent:()=>Dg,MarkupKind:()=>Yw,OptionalVersionedTextDocumentIdentifier:()=>Wx,ParameterInformation:()=>qN,Position:()=>Rr,Range:()=>wr,RenameFile:()=>Rg,SelectedCompletionInfo:()=>xO,SelectionRange:()=>sO,SemanticTokenModifiers:()=>oO,SemanticTokenTypes:()=>aO,SemanticTokens:()=>lO,SignatureInformation:()=>jN,StringValue:()=>pO,SymbolInformation:()=>KN,SymbolKind:()=>YN,SymbolTag:()=>XN,TextDocument:()=>TO,TextDocumentEdit:()=>Gx,TextDocumentIdentifier:()=>IN,TextDocumentItem:()=>ON,TextEdit:()=>ql,URI:()=>Ww,VersionedTextDocumentIdentifier:()=>NN,WorkspaceChange:()=>DN,WorkspaceEdit:()=>Uw,WorkspaceFolder:()=>kO,WorkspaceSymbol:()=>QN,integer:()=>CN,uinteger:()=>Fx});var TN,Ww,CN,Fx,Rr,wr,Vx,SN,qw,wN,_N,EN,vN,jw,AN,RN,LN,zx,_f,ql,wf,jn,jc,Gx,Ag,Rg,Lg,Uw,vg,Hw,DN,IN,NN,Wx,ON,Yw,Dg,MN,BN,PN,$N,FN,VN,zN,GN,qx,WN,qN,jN,UN,HN,YN,XN,KN,QN,ZN,JN,jx,tO,eO,rO,iO,nO,sO,aO,oO,lO,cO,uO,hO,dO,Xw,Kw,fO,pO,mO,gO,yO,xO,bO,kO,XPt,TO,CO,Tt,Ig=b(()=>{"use strict";(function(e){function t(r){return typeof r=="string"}s(t,"is"),e.is=t})(TN||(TN={}));(function(e){function t(r){return typeof r=="string"}s(t,"is"),e.is=t})(Ww||(Ww={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}s(t,"is"),e.is=t})(CN||(CN={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}s(t,"is"),e.is=t})(Fx||(Fx={}));(function(e){function t(i,n){return i===Number.MAX_VALUE&&(i=Fx.MAX_VALUE),n===Number.MAX_VALUE&&(n=Fx.MAX_VALUE),{line:i,character:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&Tt.uinteger(n.line)&&Tt.uinteger(n.character)}s(r,"is"),e.is=r})(Rr||(Rr={}));(function(e){function t(i,n,a,o){if(Tt.uinteger(i)&&Tt.uinteger(n)&&Tt.uinteger(a)&&Tt.uinteger(o))return{start:Rr.create(i,n),end:Rr.create(a,o)};if(Rr.is(i)&&Rr.is(n))return{start:i,end:n};throw new Error(`Range#create called with invalid arguments[${i}, ${n}, ${a}, ${o}]`)}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&Rr.is(n.start)&&Rr.is(n.end)}s(r,"is"),e.is=r})(wr||(wr={}));(function(e){function t(i,n){return{uri:i,range:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&wr.is(n.range)&&(Tt.string(n.uri)||Tt.undefined(n.uri))}s(r,"is"),e.is=r})(Vx||(Vx={}));(function(e){function t(i,n,a,o){return{targetUri:i,targetRange:n,targetSelectionRange:a,originSelectionRange:o}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&wr.is(n.targetRange)&&Tt.string(n.targetUri)&&wr.is(n.targetSelectionRange)&&(wr.is(n.originSelectionRange)||Tt.undefined(n.originSelectionRange))}s(r,"is"),e.is=r})(SN||(SN={}));(function(e){function t(i,n,a,o){return{red:i,green:n,blue:a,alpha:o}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&Tt.numberRange(n.red,0,1)&&Tt.numberRange(n.green,0,1)&&Tt.numberRange(n.blue,0,1)&&Tt.numberRange(n.alpha,0,1)}s(r,"is"),e.is=r})(qw||(qw={}));(function(e){function t(i,n){return{range:i,color:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&wr.is(n.range)&&qw.is(n.color)}s(r,"is"),e.is=r})(wN||(wN={}));(function(e){function t(i,n,a){return{label:i,textEdit:n,additionalTextEdits:a}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&Tt.string(n.label)&&(Tt.undefined(n.textEdit)||ql.is(n))&&(Tt.undefined(n.additionalTextEdits)||Tt.typedArray(n.additionalTextEdits,ql.is))}s(r,"is"),e.is=r})(_N||(_N={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(EN||(EN={}));(function(e){function t(i,n,a,o,l,u){let h={startLine:i,endLine:n};return Tt.defined(a)&&(h.startCharacter=a),Tt.defined(o)&&(h.endCharacter=o),Tt.defined(l)&&(h.kind=l),Tt.defined(u)&&(h.collapsedText=u),h}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&Tt.uinteger(n.startLine)&&Tt.uinteger(n.startLine)&&(Tt.undefined(n.startCharacter)||Tt.uinteger(n.startCharacter))&&(Tt.undefined(n.endCharacter)||Tt.uinteger(n.endCharacter))&&(Tt.undefined(n.kind)||Tt.string(n.kind))}s(r,"is"),e.is=r})(vN||(vN={}));(function(e){function t(i,n){return{location:i,message:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Vx.is(n.location)&&Tt.string(n.message)}s(r,"is"),e.is=r})(jw||(jw={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(AN||(AN={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(RN||(RN={}));(function(e){function t(r){let i=r;return Tt.objectLiteral(i)&&Tt.string(i.href)}s(t,"is"),e.is=t})(LN||(LN={}));(function(e){function t(i,n,a,o,l,u){let h={range:i,message:n};return Tt.defined(a)&&(h.severity=a),Tt.defined(o)&&(h.code=o),Tt.defined(l)&&(h.source=l),Tt.defined(u)&&(h.relatedInformation=u),h}s(t,"create"),e.create=t;function r(i){var n;let a=i;return Tt.defined(a)&&wr.is(a.range)&&Tt.string(a.message)&&(Tt.number(a.severity)||Tt.undefined(a.severity))&&(Tt.integer(a.code)||Tt.string(a.code)||Tt.undefined(a.code))&&(Tt.undefined(a.codeDescription)||Tt.string((n=a.codeDescription)===null||n===void 0?void 0:n.href))&&(Tt.string(a.source)||Tt.undefined(a.source))&&(Tt.undefined(a.relatedInformation)||Tt.typedArray(a.relatedInformation,jw.is))}s(r,"is"),e.is=r})(zx||(zx={}));(function(e){function t(i,n,...a){let o={title:i,command:n};return Tt.defined(a)&&a.length>0&&(o.arguments=a),o}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Tt.string(n.title)&&Tt.string(n.command)}s(r,"is"),e.is=r})(_f||(_f={}));(function(e){function t(a,o){return{range:a,newText:o}}s(t,"replace"),e.replace=t;function r(a,o){return{range:{start:a,end:a},newText:o}}s(r,"insert"),e.insert=r;function i(a){return{range:a,newText:""}}s(i,"del"),e.del=i;function n(a){let o=a;return Tt.objectLiteral(o)&&Tt.string(o.newText)&&wr.is(o.range)}s(n,"is"),e.is=n})(ql||(ql={}));(function(e){function t(i,n,a){let o={label:i};return n!==void 0&&(o.needsConfirmation=n),a!==void 0&&(o.description=a),o}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&Tt.string(n.label)&&(Tt.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(Tt.string(n.description)||n.description===void 0)}s(r,"is"),e.is=r})(wf||(wf={}));(function(e){function t(r){let i=r;return Tt.string(i)}s(t,"is"),e.is=t})(jn||(jn={}));(function(e){function t(a,o,l){return{range:a,newText:o,annotationId:l}}s(t,"replace"),e.replace=t;function r(a,o,l){return{range:{start:a,end:a},newText:o,annotationId:l}}s(r,"insert"),e.insert=r;function i(a,o){return{range:a,newText:"",annotationId:o}}s(i,"del"),e.del=i;function n(a){let o=a;return ql.is(o)&&(wf.is(o.annotationId)||jn.is(o.annotationId))}s(n,"is"),e.is=n})(jc||(jc={}));(function(e){function t(i,n){return{textDocument:i,edits:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Wx.is(n.textDocument)&&Array.isArray(n.edits)}s(r,"is"),e.is=r})(Gx||(Gx={}));(function(e){function t(i,n,a){let o={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),a!==void 0&&(o.annotationId=a),o}s(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="create"&&Tt.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||Tt.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||Tt.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||jn.is(n.annotationId))}s(r,"is"),e.is=r})(Ag||(Ag={}));(function(e){function t(i,n,a,o){let l={kind:"rename",oldUri:i,newUri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(l.options=a),o!==void 0&&(l.annotationId=o),l}s(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="rename"&&Tt.string(n.oldUri)&&Tt.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||Tt.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||Tt.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||jn.is(n.annotationId))}s(r,"is"),e.is=r})(Rg||(Rg={}));(function(e){function t(i,n,a){let o={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),a!==void 0&&(o.annotationId=a),o}s(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="delete"&&Tt.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||Tt.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||Tt.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||jn.is(n.annotationId))}s(r,"is"),e.is=r})(Lg||(Lg={}));(function(e){function t(r){let i=r;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(n=>Tt.string(n.kind)?Ag.is(n)||Rg.is(n)||Lg.is(n):Gx.is(n)))}s(t,"is"),e.is=t})(Uw||(Uw={}));vg=class{static{s(this,"TextEditChangeImpl")}constructor(t,r){this.edits=t,this.changeAnnotations=r}insert(t,r,i){let n,a;if(i===void 0?n=ql.insert(t,r):jn.is(i)?(a=i,n=jc.insert(t,r,i)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(i),n=jc.insert(t,r,a)),this.edits.push(n),a!==void 0)return a}replace(t,r,i){let n,a;if(i===void 0?n=ql.replace(t,r):jn.is(i)?(a=i,n=jc.replace(t,r,i)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(i),n=jc.replace(t,r,a)),this.edits.push(n),a!==void 0)return a}delete(t,r){let i,n;if(r===void 0?i=ql.del(t):jn.is(r)?(n=r,i=jc.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),i=jc.del(t,n)),this.edits.push(i),n!==void 0)return n}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Hw=class{static{s(this,"ChangeAnnotations")}constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,r){let i;if(jn.is(t)?i=t:(i=this.nextId(),r=t),this._annotations[i]!==void 0)throw new Error(`Id ${i} is already in use.`);if(r===void 0)throw new Error(`No annotation provided for id ${i}`);return this._annotations[i]=r,this._size++,i}nextId(){return this._counter++,this._counter.toString()}},DN=class{static{s(this,"WorkspaceChange")}constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new Hw(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(r=>{if(Gx.is(r)){let i=new vg(r.edits,this._changeAnnotations);this._textEditChanges[r.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(r=>{let i=new vg(t.changes[r]);this._textEditChanges[r]=i})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Wx.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let r={uri:t.uri,version:t.version},i=this._textEditChanges[r.uri];if(!i){let n=[],a={textDocument:r,edits:n};this._workspaceEdit.documentChanges.push(a),i=new vg(n,this._changeAnnotations),this._textEditChanges[r.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let r=this._textEditChanges[t];if(!r){let i=[];this._workspaceEdit.changes[t]=i,r=new vg(i),this._textEditChanges[t]=r}return r}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Hw,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;wf.is(r)||jn.is(r)?n=r:i=r;let a,o;if(n===void 0?a=Ag.create(t,i):(o=jn.is(n)?n:this._changeAnnotations.manage(n),a=Ag.create(t,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}renameFile(t,r,i,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;wf.is(i)||jn.is(i)?a=i:n=i;let o,l;if(a===void 0?o=Rg.create(t,r,n):(l=jn.is(a)?a:this._changeAnnotations.manage(a),o=Rg.create(t,r,n,l)),this._workspaceEdit.documentChanges.push(o),l!==void 0)return l}deleteFile(t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;wf.is(r)||jn.is(r)?n=r:i=r;let a,o;if(n===void 0?a=Lg.create(t,i):(o=jn.is(n)?n:this._changeAnnotations.manage(n),a=Lg.create(t,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}};(function(e){function t(i){return{uri:i}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Tt.string(n.uri)}s(r,"is"),e.is=r})(IN||(IN={}));(function(e){function t(i,n){return{uri:i,version:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Tt.string(n.uri)&&Tt.integer(n.version)}s(r,"is"),e.is=r})(NN||(NN={}));(function(e){function t(i,n){return{uri:i,version:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Tt.string(n.uri)&&(n.version===null||Tt.integer(n.version))}s(r,"is"),e.is=r})(Wx||(Wx={}));(function(e){function t(i,n,a,o){return{uri:i,languageId:n,version:a,text:o}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Tt.string(n.uri)&&Tt.string(n.languageId)&&Tt.integer(n.version)&&Tt.string(n.text)}s(r,"is"),e.is=r})(ON||(ON={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let i=r;return i===e.PlainText||i===e.Markdown}s(t,"is"),e.is=t})(Yw||(Yw={}));(function(e){function t(r){let i=r;return Tt.objectLiteral(r)&&Yw.is(i.kind)&&Tt.string(i.value)}s(t,"is"),e.is=t})(Dg||(Dg={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(MN||(MN={}));(function(e){e.PlainText=1,e.Snippet=2})(BN||(BN={}));(function(e){e.Deprecated=1})(PN||(PN={}));(function(e){function t(i,n,a){return{newText:i,insert:n,replace:a}}s(t,"create"),e.create=t;function r(i){let n=i;return n&&Tt.string(n.newText)&&wr.is(n.insert)&&wr.is(n.replace)}s(r,"is"),e.is=r})($N||($N={}));(function(e){e.asIs=1,e.adjustIndentation=2})(FN||(FN={}));(function(e){function t(r){let i=r;return i&&(Tt.string(i.detail)||i.detail===void 0)&&(Tt.string(i.description)||i.description===void 0)}s(t,"is"),e.is=t})(VN||(VN={}));(function(e){function t(r){return{label:r}}s(t,"create"),e.create=t})(zN||(zN={}));(function(e){function t(r,i){return{items:r||[],isIncomplete:!!i}}s(t,"create"),e.create=t})(GN||(GN={}));(function(e){function t(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(t,"fromPlainText"),e.fromPlainText=t;function r(i){let n=i;return Tt.string(n)||Tt.objectLiteral(n)&&Tt.string(n.language)&&Tt.string(n.value)}s(r,"is"),e.is=r})(qx||(qx={}));(function(e){function t(r){let i=r;return!!i&&Tt.objectLiteral(i)&&(Dg.is(i.contents)||qx.is(i.contents)||Tt.typedArray(i.contents,qx.is))&&(r.range===void 0||wr.is(r.range))}s(t,"is"),e.is=t})(WN||(WN={}));(function(e){function t(r,i){return i?{label:r,documentation:i}:{label:r}}s(t,"create"),e.create=t})(qN||(qN={}));(function(e){function t(r,i,...n){let a={label:r};return Tt.defined(i)&&(a.documentation=i),Tt.defined(n)?a.parameters=n:a.parameters=[],a}s(t,"create"),e.create=t})(jN||(jN={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(UN||(UN={}));(function(e){function t(r,i){let n={range:r};return Tt.number(i)&&(n.kind=i),n}s(t,"create"),e.create=t})(HN||(HN={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(YN||(YN={}));(function(e){e.Deprecated=1})(XN||(XN={}));(function(e){function t(r,i,n,a,o){let l={name:r,kind:i,location:{uri:a,range:n}};return o&&(l.containerName=o),l}s(t,"create"),e.create=t})(KN||(KN={}));(function(e){function t(r,i,n,a){return a!==void 0?{name:r,kind:i,location:{uri:n,range:a}}:{name:r,kind:i,location:{uri:n}}}s(t,"create"),e.create=t})(QN||(QN={}));(function(e){function t(i,n,a,o,l,u){let h={name:i,detail:n,kind:a,range:o,selectionRange:l};return u!==void 0&&(h.children=u),h}s(t,"create"),e.create=t;function r(i){let n=i;return n&&Tt.string(n.name)&&Tt.number(n.kind)&&wr.is(n.range)&&wr.is(n.selectionRange)&&(n.detail===void 0||Tt.string(n.detail))&&(n.deprecated===void 0||Tt.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}s(r,"is"),e.is=r})(ZN||(ZN={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(JN||(JN={}));(function(e){e.Invoked=1,e.Automatic=2})(jx||(jx={}));(function(e){function t(i,n,a){let o={diagnostics:i};return n!=null&&(o.only=n),a!=null&&(o.triggerKind=a),o}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Tt.typedArray(n.diagnostics,zx.is)&&(n.only===void 0||Tt.typedArray(n.only,Tt.string))&&(n.triggerKind===void 0||n.triggerKind===jx.Invoked||n.triggerKind===jx.Automatic)}s(r,"is"),e.is=r})(tO||(tO={}));(function(e){function t(i,n,a){let o={title:i},l=!0;return typeof n=="string"?(l=!1,o.kind=n):_f.is(n)?o.command=n:o.edit=n,l&&a!==void 0&&(o.kind=a),o}s(t,"create"),e.create=t;function r(i){let n=i;return n&&Tt.string(n.title)&&(n.diagnostics===void 0||Tt.typedArray(n.diagnostics,zx.is))&&(n.kind===void 0||Tt.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||_f.is(n.command))&&(n.isPreferred===void 0||Tt.boolean(n.isPreferred))&&(n.edit===void 0||Uw.is(n.edit))}s(r,"is"),e.is=r})(eO||(eO={}));(function(e){function t(i,n){let a={range:i};return Tt.defined(n)&&(a.data=n),a}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&wr.is(n.range)&&(Tt.undefined(n.command)||_f.is(n.command))}s(r,"is"),e.is=r})(rO||(rO={}));(function(e){function t(i,n){return{tabSize:i,insertSpaces:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&Tt.uinteger(n.tabSize)&&Tt.boolean(n.insertSpaces)}s(r,"is"),e.is=r})(iO||(iO={}));(function(e){function t(i,n,a){return{range:i,target:n,data:a}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&wr.is(n.range)&&(Tt.undefined(n.target)||Tt.string(n.target))}s(r,"is"),e.is=r})(nO||(nO={}));(function(e){function t(i,n){return{range:i,parent:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&wr.is(n.range)&&(n.parent===void 0||e.is(n.parent))}s(r,"is"),e.is=r})(sO||(sO={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(aO||(aO={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(oO||(oO={}));(function(e){function t(r){let i=r;return Tt.objectLiteral(i)&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}s(t,"is"),e.is=t})(lO||(lO={}));(function(e){function t(i,n){return{range:i,text:n}}s(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&wr.is(n.range)&&Tt.string(n.text)}s(r,"is"),e.is=r})(cO||(cO={}));(function(e){function t(i,n,a){return{range:i,variableName:n,caseSensitiveLookup:a}}s(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&wr.is(n.range)&&Tt.boolean(n.caseSensitiveLookup)&&(Tt.string(n.variableName)||n.variableName===void 0)}s(r,"is"),e.is=r})(uO||(uO={}));(function(e){function t(i,n){return{range:i,expression:n}}s(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&wr.is(n.range)&&(Tt.string(n.expression)||n.expression===void 0)}s(r,"is"),e.is=r})(hO||(hO={}));(function(e){function t(i,n){return{frameId:i,stoppedLocation:n}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.defined(n)&&wr.is(i.stoppedLocation)}s(r,"is"),e.is=r})(dO||(dO={}));(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}s(t,"is"),e.is=t})(Xw||(Xw={}));(function(e){function t(i){return{value:i}}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&(n.tooltip===void 0||Tt.string(n.tooltip)||Dg.is(n.tooltip))&&(n.location===void 0||Vx.is(n.location))&&(n.command===void 0||_f.is(n.command))}s(r,"is"),e.is=r})(Kw||(Kw={}));(function(e){function t(i,n,a){let o={position:i,label:n};return a!==void 0&&(o.kind=a),o}s(t,"create"),e.create=t;function r(i){let n=i;return Tt.objectLiteral(n)&&Rr.is(n.position)&&(Tt.string(n.label)||Tt.typedArray(n.label,Kw.is))&&(n.kind===void 0||Xw.is(n.kind))&&n.textEdits===void 0||Tt.typedArray(n.textEdits,ql.is)&&(n.tooltip===void 0||Tt.string(n.tooltip)||Dg.is(n.tooltip))&&(n.paddingLeft===void 0||Tt.boolean(n.paddingLeft))&&(n.paddingRight===void 0||Tt.boolean(n.paddingRight))}s(r,"is"),e.is=r})(fO||(fO={}));(function(e){function t(r){return{kind:"snippet",value:r}}s(t,"createSnippet"),e.createSnippet=t})(pO||(pO={}));(function(e){function t(r,i,n,a){return{insertText:r,filterText:i,range:n,command:a}}s(t,"create"),e.create=t})(mO||(mO={}));(function(e){function t(r){return{items:r}}s(t,"create"),e.create=t})(gO||(gO={}));(function(e){e.Invoked=0,e.Automatic=1})(yO||(yO={}));(function(e){function t(r,i){return{range:r,text:i}}s(t,"create"),e.create=t})(xO||(xO={}));(function(e){function t(r,i){return{triggerKind:r,selectedCompletionInfo:i}}s(t,"create"),e.create=t})(bO||(bO={}));(function(e){function t(r){let i=r;return Tt.objectLiteral(i)&&Ww.is(i.uri)&&Tt.string(i.name)}s(t,"is"),e.is=t})(kO||(kO={}));XPt=[` +`,`\r +`,"\r"];(function(e){function t(a,o,l,u){return new CO(a,o,l,u)}s(t,"create"),e.create=t;function r(a){let o=a;return!!(Tt.defined(o)&&Tt.string(o.uri)&&(Tt.undefined(o.languageId)||Tt.string(o.languageId))&&Tt.uinteger(o.lineCount)&&Tt.func(o.getText)&&Tt.func(o.positionAt)&&Tt.func(o.offsetAt))}s(r,"is"),e.is=r;function i(a,o){let l=a.getText(),u=n(o,(d,f)=>{let p=d.range.start.line-f.range.start.line;return p===0?d.range.start.character-f.range.start.character:p}),h=l.length;for(let d=u.length-1;d>=0;d--){let f=u[d],p=a.offsetAt(f.range.start),m=a.offsetAt(f.range.end);if(m<=h)l=l.substring(0,p)+f.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");h=p}return l}s(i,"applyEdits"),e.applyEdits=i;function n(a,o){if(a.length<=1)return a;let l=a.length/2|0,u=a.slice(0,l),h=a.slice(l);n(u,o),n(h,o);let d=0,f=0,p=0;for(;d0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return Rr.create(0,t);for(;it?n=o:i=o+1}let a=i-1;return Rr.create(a,t-r[a])}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let i=r[t.line],n=t.line+1"u"}s(i,"undefined"),e.undefined=i;function n(m){return m===!0||m===!1}s(n,"boolean"),e.boolean=n;function a(m){return t.call(m)==="[object String]"}s(a,"string"),e.string=a;function o(m){return t.call(m)==="[object Number]"}s(o,"number"),e.number=o;function l(m,g,y){return t.call(m)==="[object Number]"&&g<=m&&m<=y}s(l,"numberRange"),e.numberRange=l;function u(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}s(u,"integer"),e.integer=u;function h(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}s(h,"uinteger"),e.uinteger=h;function d(m){return t.call(m)==="[object Function]"}s(d,"func"),e.func=d;function f(m){return m!==null&&typeof m=="object"}s(f,"objectLiteral"),e.objectLiteral=f;function p(m,g){return Array.isArray(m)&&m.every(g)}s(p,"typedArray"),e.typedArray=p})(Tt||(Tt={}))});var Ux,Hx,Ef,vf,SO,Ng,Zw=b(()=>{"use strict";Ig();qo();Ux=class{static{s(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(t){return this.rootNode=new Ng(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){let r=new vf;return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(t,r){let i=new Ef(t.startOffset,t.image.length,tg(t),t.tokenType,!r);return i.grammarSource=r,i.root=this.rootNode,this.current.content.push(i),i}removeNode(t){let r=t.container;if(r){let i=r.content.indexOf(t);i>=0&&r.content.splice(i,1)}}addHiddenNodes(t){let r=[];for(let a of t){let o=new Ef(a.startOffset,a.image.length,tg(a),a.tokenType,!0);o.root=this.rootNode,r.push(o)}let i=this.current,n=!1;if(i.content.length>0){i.content.push(...r);return}for(;i.container;){let a=i.container.content.indexOf(i);if(a>0){i.container.content.splice(a,0,...r),n=!0;break}i=i.container}n||this.rootNode.content.unshift(...r)}construct(t){let r=this.current;typeof t.$type=="string"&&!t.$infix&&(this.current.astNode=t),t.$cstNode=r;let i=this.nodeStack.pop();i?.content.length===0&&this.removeNode(i)}},Hx=class{static{s(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){let t=typeof this._astNode?.$type=="string"?this._astNode:this.container?.astNode;if(!t)throw new Error("This node has no associated AST element");return t}set astNode(t){this._astNode=t}get text(){return this.root.fullText.substring(this.offset,this.end)}},Ef=class extends Hx{static{s(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,r,i,n,a=!1){super(),this._hidden=a,this._offset=t,this._tokenType=n,this._length=r,this._range=i}},vf=class extends Hx{static{s(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new SO(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let t=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(t&&r){if(this._rangeCache===void 0){let{range:i}=t,{range:n}=r;this._rangeCache={start:i.start,end:n.end.line=0;t--){let r=this.content[t];if(!r.hidden)return r}return this.content[this.content.length-1]}},SO=class e extends Array{static{s(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,r,...i){return this.addParents(i),super.splice(t,r,...i)}addParents(t){for(let r of t)r.container=this.parent}},Ng=class extends vf{static{s(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text="",this._text=t??""}}});function wO(e){return e.$type===Jw}var Jw,Xst,Kst,Yx,Xx,t_,Og,Kx,KPt,e_,_O,Qx=b(()=>{"use strict";Ea();fh();Yst();Ea();Xo();ss();Zw();Jw=Symbol("Datatype");s(wO,"isDataTypeNode");Xst="\u200B",Kst=s(e=>e.endsWith(Xst)?e:e+Xst,"withRuleSuffix"),Yx=class{static{s(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;let r=this.lexer.definition,i=t.LanguageMetaData.mode==="production";t.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new _O(r,{...t.parser.ParserConfig,skipValidations:i,errorMessageProvider:t.parser.ParserErrorMessageProvider},t.shared.profilers.LangiumProfiler.createTask("parsing",t.LanguageMetaData.languageId)):this.wrapper=new e_(r,{...t.parser.ParserConfig,skipValidations:i,errorMessageProvider:t.parser.ParserErrorMessageProvider})}alternatives(t,r){this.wrapper.wrapOr(t,r)}optional(t,r){this.wrapper.wrapOption(t,r)}many(t,r){this.wrapper.wrapMany(t,r)}atLeastOne(t,r){this.wrapper.wrapAtLeastOne(t,r)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Xx=class extends Yx{static{s(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new Ux,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,r){let i=this.computeRuleType(t),n;lh(t)&&(n=t.name,this.registerPrecedenceMap(t));let a=this.wrapper.DEFINE_RULE(Kst(t.name),this.startImplementation(i,n,r).bind(this));return this.allRules.set(t.name,a),Ln(t)&&t.entry&&(this.mainRule=a),a}registerPrecedenceMap(t){let r=t.name,i=new Map;for(let n=0;n0&&(r=this.construct()),r===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return r}startImplementation(t,r,i){return n=>{let a=!this.isRecording()&&t!==void 0;if(a){let o={$type:t};this.stack.push(o),t===Jw?o.value="":r!==void 0&&(o.$infixName=r)}return i(n),a?this.construct():void 0}}extractHiddenTokens(t){let r=this.lexerResult.hidden;if(!r.length)return[];let i=t.startOffset;for(let n=0;ni)return r.splice(0,n);return r.splice(0,r.length)}consume(t,r,i){let n=this.wrapper.wrapConsume(t,r);if(!this.isRecording()&&this.isValidToken(n)){let a=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(a);let o=this.nodeBuilder.buildLeafNode(n,i),{assignment:l,crossRef:u}=this.getAssignment(i),h=this.current;if(l){let d=io(i)?n.image:this.converter.convert(n.image,o);this.assign(l.operator,l.feature,d,o,u)}else if(wO(h)){let d=n.image;io(i)||(d=this.converter.convert(d,o).toString()),h.value+=d}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&typeof t.endOffset=="number"&&!isNaN(t.endOffset)}subrule(t,r,i,n,a){let o;!this.isRecording()&&!i&&(o=this.nodeBuilder.buildCompositeNode(n));let l;try{l=this.wrapper.wrapSubrule(t,r,a)}finally{this.isRecording()||(l===void 0&&!i&&(l=this.construct()),l!==void 0&&o&&o.length>0&&this.performSubruleAssignment(l,n,o))}}performSubruleAssignment(t,r,i){let{assignment:n,crossRef:a}=this.getAssignment(r);if(n)this.assign(n.operator,n.feature,t,i,a);else if(!n){let o=this.current;if(wO(o))o.value+=t.toString();else if(typeof t=="object"&&t){let u=this.assignWithoutOverride(t,o);this.stack.pop(),this.stack.push(u)}}}action(t,r){if(!this.isRecording()){let i=this.current;if(r.feature&&r.operator){i=this.construct(),this.nodeBuilder.removeNode(i.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(i.$cstNode);let a={$type:t};this.stack.push(a),this.assign(r.operator,r.feature,i,i.$cstNode)}else i.$type=t}}construct(){if(this.isRecording())return;let t=this.stack.pop();return this.nodeBuilder.construct(t),"$infixName"in t?this.constructInfix(t,this.operatorPrecedence.get(t.$infixName)):wO(t)?this.converter.convert(t.value,t.$cstNode):(U6(this.astReflection,t),t)}constructInfix(t,r){let i=t.parts;if(!Array.isArray(i)||i.length===0)return;let n=t.operators;if(!Array.isArray(n)||i.length<2)return i[0];let a=0,o=-1;for(let y=0;yo?(o=k.precedence,a=y):k.precedence===o&&(k.rightAssoc||(a=y))}let l=n.slice(0,a),u=n.slice(a+1),h=i.slice(0,a+1),d=i.slice(a+1),f={$infixName:t.$infixName,$type:t.$type,$cstNode:t.$cstNode,parts:h,operators:l},p={$infixName:t.$infixName,$type:t.$type,$cstNode:t.$cstNode,parts:d,operators:u},m=this.constructInfix(f,r),g=this.constructInfix(p,r);return{$type:t.$type,$cstNode:t.$cstNode,left:m,operator:n[a],right:g}}getAssignment(t){if(!this.assignmentMap.has(t)){let r=Ic(t,Uo);this.assignmentMap.set(t,{assignment:r,crossRef:r&&Ho(r.terminal)?r.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(t)}assign(t,r,i,n,a){let o=this.current,l;switch(a==="single"&&typeof i=="string"?l=this.linker.buildReference(o,r,n,i):a==="multi"&&typeof i=="string"?l=this.linker.buildMultiReference(o,r,n,i):l=i,t){case"=":{o[r]=l;break}case"?=":{o[r]=!0;break}case"+=":Array.isArray(o[r])||(o[r]=[]),o[r].push(l)}}assignWithoutOverride(t,r){for(let[n,a]of Object.entries(r)){let o=t[n];o===void 0?t[n]=a:Array.isArray(o)&&Array.isArray(a)&&(a.push(...o),t[n]=a)}let i=t.$cstNode;return i&&(i.astNode=void 0,t.$cstNode=void 0),t}get definitionErrors(){return this.wrapper.definitionErrors}},t_=class{static{s(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(t){return Wc.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return Wc.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return Wc.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return Wc.buildEarlyExitMessage(t)}},Og=class extends t_{static{s(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:t,actual:r}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(":KW")?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}},Kx=class extends Yx{static{s(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){this.resetState();let r=this.lexer.tokenize(t,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,r){let i=this.wrapper.DEFINE_RULE(Kst(t.name),this.startImplementation(r).bind(this));return this.allRules.set(t.name,i),t.entry&&(this.mainRule=i),i}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(t){return r=>{let i=this.keepStackSize();try{t(r)}finally{this.resetStackSize(i)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let t=this.elementStack.length;return this.stackSize=t,t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,r,i){this.wrapper.wrapConsume(t,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,i],this.nextTokenIndex=this.currIdx+1)}subrule(t,r,i,n,a){this.before(n),this.wrapper.wrapSubrule(t,r,a),this.after(n)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(t);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},KPt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Og},e_=class extends Ox{static{s(this,"ChevrotainWrapper")}constructor(t,r){let i=r&&"maxLookahead"in r;super(t,{...KPt,lookaheadStrategy:i?new qc({maxLookahead:r.maxLookahead}):new $x({logging:r.skipValidations?()=>{}:void 0}),...r})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,r,i){return this.RULE(t,r,i)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,r){return this.consume(t,r,void 0)}wrapSubrule(t,r,i){return this.subrule(t,r,{ARGS:[i]})}wrapOr(t,r){this.or(t,r)}wrapOption(t,r){this.option(t,r)}wrapMany(t,r){this.many(t,r)}wrapAtLeastOne(t,r){this.atLeastOne(t,r)}rule(t){return t.call(this,{})}},_O=class extends e_{static{s(this,"ProfilerWrapper")}constructor(t,r,i){super(t,r),this.task=i}rule(t){this.task.start(),this.task.startSubTask(this.ruleName(t));try{return super.rule(t)}finally{this.task.stopSubTask(this.ruleName(t)),this.task.stop()}}ruleName(t){return t.ruleName}subrule(t,r,i){this.task.startSubTask(this.ruleName(r));try{return super.subrule(t,r,i)}finally{this.task.stopSubTask(this.ruleName(r))}}}});function Zx(e,t,r){return QPt({parser:t,tokens:r,ruleNames:new Map},e),t}function QPt(e,t){let r=dx(t,!1),i=mr(t.rules).filter(Ln).filter(a=>r.has(a));for(let a of i){let o={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(a,Af(o,a.definition))}let n=mr(t.rules).filter(lh).filter(a=>r.has(a));for(let a of n)e.parser.rule(a,ZPt(e,a))}function ZPt(e,t){let r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Es(r))throw new Error("Cannot use terminal rule in infix expression");let i=t.operators.precedences.flatMap(m=>m.operators),n={$type:"Group",elements:[]},a={$container:n,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},o={$container:n,$type:"Group",elements:[],cardinality:"*"};n.elements.push(a,o);let u={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:i}},h={...a,$container:o};o.elements.push(u,h);let f=i.map(m=>e.tokens[m.value]).map((m,g)=>({ALT:s(()=>e.parser.consume(g,m,u),"ALT")})),p;return m=>{p??(p=vO(e,r)),e.parser.subrule(0,p,!1,a,m),e.parser.many(0,{DEF:s(()=>{e.parser.alternatives(0,f),e.parser.subrule(1,p,!1,h,m)},"DEF")})}}function Af(e,t,r=!1){let i;if(io(t))i=s8t(e,t);else if(Bc(t))i=JPt(e,t);else if(Uo(t))i=Af(e,t.terminal);else if(Ho(t))i=Qst(e,t);else if(Yo(t))i=t8t(e,t);else if(WS(t))i=r8t(e,t);else if(HS(t))i=i8t(e,t);else if(oh(t))i=n8t(e,t);else if(J6(t)){let n=e.consume++;i=s(()=>e.parser.consume(n,Aa,t),"method")}else throw new df(t.$cstNode,`Unexpected element type: ${t.$type}`);return Zst(e,r?void 0:r_(t),i,t.cardinality)}function JPt(e,t){let r=uh(t);return()=>e.parser.action(r,t)}function t8t(e,t){let r=t.rule.ref;if(Mc(r)){let i=e.subrule++,n=Ln(r)&&r.fragment,a=t.arguments.length>0?e8t(r,t.arguments):()=>({}),o;return l=>{o??(o=vO(e,r)),e.parser.subrule(i,o,n,t,a(l))}}else if(Es(r)){let i=e.consume++,n=EO(e,r.name);return()=>e.parser.consume(i,n,t)}else if(r)zl(r);else throw new df(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function e8t(e,t){if(t.some(i=>i.calledByName)){let i=t.map(n=>({parameterName:n.parameter?.ref?.name,predicate:jl(n.value)}));return n=>{let a={};for(let{parameterName:o,predicate:l}of i)o&&(a[o]=l(n));return a}}else{let i=t.map(n=>jl(n.value));return n=>{let a={};for(let o=0;ot(i)||r(i)}else if(Q6(e)){let t=jl(e.left),r=jl(e.right);return i=>t(i)&&r(i)}else if(rI(e)){let t=jl(e.value);return r=>!t(r)}else if(iI(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(X6(e)){let t=!!e.true;return()=>t}zl(e)}function r8t(e,t){if(t.elements.length===1)return Af(e,t.elements[0]);{let r=[];for(let n of t.elements){let a={ALT:Af(e,n,!0)},o=r_(n);o&&(a.GATE=jl(o)),r.push(a)}let i=e.or++;return n=>e.parser.alternatives(i,r.map(a=>{let o={ALT:s(()=>a.ALT(n),"ALT")},l=a.GATE;return l&&(o.GATE=()=>l(n)),o}))}}function i8t(e,t){if(t.elements.length===1)return Af(e,t.elements[0]);let r=[];for(let l of t.elements){let u={ALT:Af(e,l,!0)},h=r_(l);h&&(u.GATE=jl(h)),r.push(u)}let i=e.or++,n=s((l,u)=>{let h=u.getRuleStack().join("-");return`uGroup_${l}_${h}`},"idFunc"),a=s(l=>e.parser.alternatives(i,r.map((u,h)=>{let d={ALT:s(()=>!0,"ALT")},f=e.parser;d.ALT=()=>{if(u.ALT(l),!f.isRecording()){let m=n(i,f);f.unorderedGroups.get(m)||f.unorderedGroups.set(m,[]);let g=f.unorderedGroups.get(m);typeof g?.[h]>"u"&&(g[h]=!0)}};let p=u.GATE;return p?d.GATE=()=>p(l):d.GATE=()=>!f.unorderedGroups.get(n(i,f))?.[h],d})),"alternatives"),o=Zst(e,r_(t),a,"*");return l=>{o(l),e.parser.isRecording()||e.parser.unorderedGroups.delete(n(i,e.parser))}}function n8t(e,t){let r=t.elements.map(i=>Af(e,i));return i=>r.forEach(n=>n(i))}function r_(e){if(oh(e))return e.guardCondition}function Qst(e,t,r=t.terminal){if(r)if(Yo(r)&&Ln(r.rule.ref)){let i=r.rule.ref,n=e.subrule++,a;return o=>{a??(a=vO(e,i)),e.parser.subrule(n,a,!1,t,o)}}else if(Yo(r)&&Es(r.rule.ref)){let i=e.consume++,n=EO(e,r.rule.ref.name);return()=>e.parser.consume(i,n,t)}else if(io(r)){let i=e.consume++,n=EO(e,r.value);return()=>e.parser.consume(i,n,t)}else throw new Error("Could not build cross reference parser");else{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);let n=tw(t.type.ref)?.terminal;if(!n)throw new Error("Could not find name assignment for type: "+uh(t.type.ref));return Qst(e,t,n)}}function s8t(e,t){let r=e.consume++,i=e.tokens[t.value];if(!i)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,i,t)}function Zst(e,t,r,i){let n=t&&jl(t);if(!i)if(n){let a=e.or++;return o=>e.parser.alternatives(a,[{ALT:s(()=>r(o),"ALT"),GATE:s(()=>n(o),"GATE")},{ALT:Vw(),GATE:s(()=>!n(o),"GATE")}])}else return r;if(i==="*"){let a=e.many++;return o=>e.parser.many(a,{DEF:s(()=>r(o),"DEF"),GATE:n?()=>n(o):void 0})}else if(i==="+"){let a=e.many++;if(n){let o=e.or++;return l=>e.parser.alternatives(o,[{ALT:s(()=>e.parser.atLeastOne(a,{DEF:s(()=>r(l),"DEF")}),"ALT"),GATE:s(()=>n(l),"GATE")},{ALT:Vw(),GATE:s(()=>!n(l),"GATE")}])}else return o=>e.parser.atLeastOne(a,{DEF:s(()=>r(o),"DEF")})}else if(i==="?"){let a=e.optional++;return o=>e.parser.optional(a,{DEF:s(()=>r(o),"DEF"),GATE:n?()=>n(o):void 0})}else zl(i)}function vO(e,t){let r=a8t(e,t),i=e.parser.getRule(r);if(!i)throw new Error(`Rule "${r}" not found."`);return i}function a8t(e,t){if(Mc(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,i=r.$container,n=t.$type;for(;!Ln(i);)(oh(i)||WS(i)||HS(i))&&(n=i.elements.indexOf(r).toString()+":"+n),r=i,i=i.$container;return n=i.name+":"+n,e.ruleNames.set(t,n),n}}function EO(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}var i_=b(()=>{"use strict";fh();Ea();KS();ws();Xo();s(Zx,"createParser");s(QPt,"buildRules");s(ZPt,"buildInfixRule");s(Af,"buildElement");s(JPt,"buildAction");s(t8t,"buildRuleCall");s(e8t,"buildRuleCallPredicate");s(jl,"buildPredicate");s(r8t,"buildAlternatives");s(i8t,"buildUnorderedGroup");s(n8t,"buildGroup");s(r_,"getGuardCondition");s(Qst,"buildCrossReference");s(s8t,"buildKeyword");s(Zst,"wrap");s(vO,"getRule");s(a8t,"getRuleName");s(EO,"getToken")});function AO(e){let t=e.Grammar,r=e.parser.Lexer,i=new Kx(e);return Zx(t,i,r.definition),i.finalize(),i}var RO=b(()=>{"use strict";Qx();i_();s(AO,"createCompletionParser")});function LO(e){let t=Jst(e);return t.finalize(),t}function Jst(e){let t=e.Grammar,r=e.parser.Lexer,i=new Xx(e);return Zx(t,i,r.definition)}var DO=b(()=>{"use strict";Qx();i_();s(LO,"createLangiumParser");s(Jst,"prepareLangiumParser")});var Uc,n_=b(()=>{"use strict";fh();Ea();ss();Xo();rg();ws();Uc=class{static{s(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(t,r){let i=mr(dx(t,!1)),n=this.buildTerminalTokens(i),a=this.buildKeywordTokens(i,n,r);return a.push(...n),a}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(Es).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(t){let r=ig(t),i=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,n={name:t.name,PATTERN:i};return typeof i=="function"&&(n.LINE_BREAKS=!0),t.hidden&&(n.GROUP=hx(r)?Ai.SKIPPED:"hidden"),n}requiresCustomPattern(t){return!!(t.flags.includes("u")||t.flags.includes("s"))}regexPatternFunction(t){let r=new RegExp(t,t.flags+"y");return(i,n)=>(r.lastIndex=n,r.exec(i))}buildKeywordTokens(t,r,i){return t.filter(Mc).flatMap(n=>Wo(n).filter(io)).distinct(n=>n.value).toArray().sort((n,a)=>a.value.length-n.value.length).map(n=>this.buildKeywordToken(n,r,!!i?.caseInsensitive))}buildKeywordToken(t,r,i){let n=this.buildKeywordPattern(t,i),a={name:t.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(t,r)};return typeof n=="function"&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(t,r){return r?new RegExp(ch(t.value),"i"):t.value}findLongerAlt(t,r){return r.reduce((i,n)=>{let a=n?.PATTERN;return a?.source&&CI("^"+a.source+"$",t.value)&&i.push(n),i},[])}}});var Rf,Ul,IO=b(()=>{"use strict";Ea();Xo();Rf=class{static{s(this,"DefaultValueConverter")}convert(t,r){let i=r.grammarSource;if(Ho(i)&&(i=_I(i)),Yo(i)){let n=i.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,t,r)}return t}runConverter(t,r,i){switch(t.name.toUpperCase()){case"INT":return Ul.convertInt(r);case"STRING":return Ul.convertString(r);case"ID":return Ul.convertID(r)}switch(II(t)?.toLowerCase()){case"number":return Ul.convertNumber(r);case"boolean":return Ul.convertBoolean(r);case"bigint":return Ul.convertBigint(r);case"date":return Ul.convertDate(r);default:return r}}};(function(e){function t(h){let d="";for(let f=1;f{"use strict";Object.defineProperty(MO,"__esModule",{value:!0});var NO;function OO(){if(NO===void 0)throw new Error("No runtime abstraction layer installed");return NO}s(OO,"RAL");(function(e){function t(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");NO=r}s(t,"install"),e.install=t})(OO||(OO={}));MO.default=OO});var Mg=Be(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.stringArray=as.array=as.func=as.error=as.number=as.string=as.boolean=void 0;function o8t(e){return e===!0||e===!1}s(o8t,"boolean");as.boolean=o8t;function tat(e){return typeof e=="string"||e instanceof String}s(tat,"string");as.string=tat;function l8t(e){return typeof e=="number"||e instanceof Number}s(l8t,"number");as.number=l8t;function c8t(e){return e instanceof Error}s(c8t,"error");as.error=c8t;function u8t(e){return typeof e=="function"}s(u8t,"func");as.func=u8t;function eat(e){return Array.isArray(e)}s(eat,"array");as.array=eat;function h8t(e){return eat(e)&&e.every(t=>tat(t))}s(h8t,"stringArray");as.stringArray=h8t});var Lf=Be(Bg=>{"use strict";Object.defineProperty(Bg,"__esModule",{value:!0});Bg.Emitter=Bg.Event=void 0;var d8t=gh(),rat;(function(e){let t={dispose(){}};e.None=function(){return t}})(rat||(Bg.Event=rat={}));var BO=class{static{s(this,"CallbackList")}add(t,r=null,i){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(r),Array.isArray(i)&&i.push({dispose:s(()=>this.remove(t,r),"dispose")})}remove(t,r=null){if(!this._callbacks)return;let i=!1;for(let n=0,a=this._callbacks.length;n{this._callbacks||(this._callbacks=new BO),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,r);let n={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(t,r),n.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(i)&&i.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)}};Bg.Emitter=s_;s_._noop=function(){}});var Jx=Be(Pg=>{"use strict";Object.defineProperty(Pg,"__esModule",{value:!0});Pg.CancellationTokenSource=Pg.CancellationToken=void 0;var f8t=gh(),p8t=Mg(),PO=Lf(),a_;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:PO.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:PO.Event.None});function t(r){let i=r;return i&&(i===e.None||i===e.Cancelled||p8t.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}s(t,"is"),e.is=t})(a_||(Pg.CancellationToken=a_={}));var m8t=Object.freeze(function(e,t){let r=(0,f8t.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),o_=class{static{s(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?m8t:(this._emitter||(this._emitter=new PO.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},$O=class{static{s(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new o_),this._token}cancel(){this._token?this._token.cancel():this._token=a_.Cancelled}dispose(){this._token?this._token instanceof o_&&this._token.dispose():this._token=a_.None}};Pg.CancellationTokenSource=$O});var ar={};var no=b(()=>{"use strict";xr(ar,fs(Jx(),1))});function FO(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}function c_(){return l_=performance.now(),new ar.CancellationTokenSource}function nat(e){iat=e}function Hl(e){return e===so}async function Bi(e){if(e===ar.CancellationToken.None)return;let t=performance.now();if(t-l_>=iat&&(l_=t,await FO(),l_=performance.now()),e.isCancellationRequested)throw so}var l_,iat,so,Ds,ao=b(()=>{"use strict";no();s(FO,"delayNextTick");l_=0,iat=10;s(c_,"startCancelableOperation");s(nat,"setInterruptionPeriod");so=Symbol("OperationCancelled");s(Hl,"isOperationCancelled");s(Bi,"interruptAndCheck");Ds=class{static{s(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=i=>(t(i),this),this.reject=i=>(r(i),this)})}}});function VO(e,t){if(e.length<=1)return e;let r=e.length/2|0,i=e.slice(0,r),n=e.slice(r);VO(i,t),VO(n,t);let a=0,o=0,l=0;for(;ar.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function g8t(e){let t=oat(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var u_,$g,lat=b(()=>{"use strict";u_=class e{static{s(this,"FullTextDocument")}constructor(t,r,i,n){this._uri=t,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),i=this.offsetAt(t.end);return this._content.substring(r,i)}return this._content}update(t,r){for(let i of t)if(e.isIncremental(i)){let n=oat(i.range),a=this.offsetAt(n.start),o=this.offsetAt(n.end);this._content=this._content.substring(0,a)+i.text+this._content.substring(o,this._content.length);let l=Math.max(n.start.line,0),u=Math.max(n.end.line,0),h=this._lineOffsets,d=sat(i.text,!1,a);if(u-l===d.length)for(let p=0,m=d.length;pt?n=o:i=o+1}let a=i-1;return t=this.ensureBeforeEOL(t,r[a]),{line:a,character:t-r[a]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let i=r[t.line];if(t.character<=0)return i;let n=t.line+1r&&aat(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(e){function t(n,a,o,l){return new u_(n,a,o,l)}s(t,"create"),e.create=t;function r(n,a,o){if(n instanceof u_)return n.update(a,o),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}s(r,"update"),e.update=r;function i(n,a){let o=n.getText(),l=VO(a.map(g8t),(d,f)=>{let p=d.range.start.line-f.range.start.line;return p===0?d.range.start.character-f.range.start.character:p}),u=0,h=[];for(let d of l){let f=n.offsetAt(d.range.start);if(fu&&h.push(o.substring(u,f)),d.newText.length&&h.push(d.newText),u=n.offsetAt(d.range.end)}return h.push(o.substr(u)),h.join("")}s(i,"applyEdits"),e.applyEdits=i})($g||($g={}));s(VO,"mergeSort");s(sat,"computeLineOffsets");s(aat,"isEOL");s(oat,"getWellformedRange");s(g8t,"getWellformedEdit")});var cat,gn,Fg,zO=b(()=>{"use strict";(()=>{"use strict";var e={975:I=>{function F(R){if(typeof R!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(R))}s(F,"e");function B(R,N){for(var P,E="",D=0,V=-1,L=0,q=0;q<=R.length;++q){if(q2){var H=E.lastIndexOf("/");if(H!==E.length-1){H===-1?(E="",D=0):D=(E=E.slice(0,H)).length-1-E.lastIndexOf("/"),V=q,L=0;continue}}else if(E.length===2||E.length===1){E="",D=0,V=q,L=0;continue}}N&&(E.length>0?E+="/..":E="..",D=2)}else E.length>0?E+="/"+R.slice(V+1,q):E=R.slice(V+1,q),D=q-V-1;V=q,L=0}else P===46&&L!==-1?++L:L=-1}return E}s(B,"r");var O={resolve:s(function(){for(var R,N="",P=!1,E=arguments.length-1;E>=-1&&!P;E--){var D;E>=0?D=arguments[E]:(R===void 0&&(R=process.cwd()),D=R),F(D),D.length!==0&&(N=D+"/"+N,P=D.charCodeAt(0)===47)}return N=B(N,!P),P?N.length>0?"/"+N:"/":N.length>0?N:"."},"resolve"),normalize:s(function(R){if(F(R),R.length===0)return".";var N=R.charCodeAt(0)===47,P=R.charCodeAt(R.length-1)===47;return(R=B(R,!N)).length!==0||N||(R="."),R.length>0&&P&&(R+="/"),N?"/"+R:R},"normalize"),isAbsolute:s(function(R){return F(R),R.length>0&&R.charCodeAt(0)===47},"isAbsolute"),join:s(function(){if(arguments.length===0)return".";for(var R,N=0;N0&&(R===void 0?R=P:R+="/"+P)}return R===void 0?".":O.normalize(R)},"join"),relative:s(function(R,N){if(F(R),F(N),R===N||(R=O.resolve(R))===(N=O.resolve(N)))return"";for(var P=1;Pq){if(N.charCodeAt(V+K)===47)return N.slice(V+K+1);if(K===0)return N.slice(V+K)}else D>q&&(R.charCodeAt(P+K)===47?H=K:K===0&&(H=0));break}var U=R.charCodeAt(P+K);if(U!==N.charCodeAt(V+K))break;U===47&&(H=K)}var st="";for(K=P+H+1;K<=E;++K)K!==E&&R.charCodeAt(K)!==47||(st.length===0?st+="..":st+="/..");return st.length>0?st+N.slice(V+H):(V+=H,N.charCodeAt(V)===47&&++V,N.slice(V))},"relative"),_makeLong:s(function(R){return R},"_makeLong"),dirname:s(function(R){if(F(R),R.length===0)return".";for(var N=R.charCodeAt(0),P=N===47,E=-1,D=!0,V=R.length-1;V>=1;--V)if((N=R.charCodeAt(V))===47){if(!D){E=V;break}}else D=!1;return E===-1?P?"/":".":P&&E===1?"//":R.slice(0,E)},"dirname"),basename:s(function(R,N){if(N!==void 0&&typeof N!="string")throw new TypeError('"ext" argument must be a string');F(R);var P,E=0,D=-1,V=!0;if(N!==void 0&&N.length>0&&N.length<=R.length){if(N.length===R.length&&N===R)return"";var L=N.length-1,q=-1;for(P=R.length-1;P>=0;--P){var H=R.charCodeAt(P);if(H===47){if(!V){E=P+1;break}}else q===-1&&(V=!1,q=P+1),L>=0&&(H===N.charCodeAt(L)?--L==-1&&(D=P):(L=-1,D=q))}return E===D?D=q:D===-1&&(D=R.length),R.slice(E,D)}for(P=R.length-1;P>=0;--P)if(R.charCodeAt(P)===47){if(!V){E=P+1;break}}else D===-1&&(V=!1,D=P+1);return D===-1?"":R.slice(E,D)},"basename"),extname:s(function(R){F(R);for(var N=-1,P=0,E=-1,D=!0,V=0,L=R.length-1;L>=0;--L){var q=R.charCodeAt(L);if(q!==47)E===-1&&(D=!1,E=L+1),q===46?N===-1?N=L:V!==1&&(V=1):N!==-1&&(V=-1);else if(!D){P=L+1;break}}return N===-1||E===-1||V===0||V===1&&N===E-1&&N===P+1?"":R.slice(N,E)},"extname"),format:s(function(R){if(R===null||typeof R!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof R);return(function(N,P){var E=P.dir||P.root,D=P.base||(P.name||"")+(P.ext||"");return E?E===P.root?E+D:E+"/"+D:D})(0,R)},"format"),parse:s(function(R){F(R);var N={root:"",dir:"",base:"",ext:"",name:""};if(R.length===0)return N;var P,E=R.charCodeAt(0),D=E===47;D?(N.root="/",P=1):P=0;for(var V=-1,L=0,q=-1,H=!0,K=R.length-1,U=0;K>=P;--K)if((E=R.charCodeAt(K))!==47)q===-1&&(H=!1,q=K+1),E===46?V===-1?V=K:U!==1&&(U=1):V!==-1&&(U=-1);else if(!H){L=K+1;break}return V===-1||q===-1||U===0||U===1&&V===q-1&&V===L+1?q!==-1&&(N.base=N.name=L===0&&D?R.slice(1,q):R.slice(L,q)):(L===0&&D?(N.name=R.slice(1,V),N.base=R.slice(1,q)):(N.name=R.slice(L,V),N.base=R.slice(L,q)),N.ext=R.slice(V,q)),L>0?N.dir=R.slice(0,L-1):D&&(N.dir="/"),N},"parse"),sep:"/",delimiter:":",win32:null,posix:null};O.posix=O,I.exports=O}},t={};function r(I){var F=t[I];if(F!==void 0)return F.exports;var B=t[I]={exports:{}};return e[I](B,B.exports,r),B.exports}s(r,"r"),r.d=(I,F)=>{for(var B in F)r.o(F,B)&&!r.o(I,B)&&Object.defineProperty(I,B,{enumerable:!0,get:F[B]})},r.o=(I,F)=>Object.prototype.hasOwnProperty.call(I,F),r.r=I=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(I,"__esModule",{value:!0})};var i={};let n;r.r(i),r.d(i,{URI:s(()=>p,"URI"),Utils:s(()=>$,"Utils")}),typeof process=="object"?n=process.platform==="win32":typeof navigator=="object"&&(n=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function u(I,F){if(!I.scheme&&F)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${I.authority}", path: "${I.path}", query: "${I.query}", fragment: "${I.fragment}"}`);if(I.scheme&&!a.test(I.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(I.path){if(I.authority){if(!o.test(I.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(l.test(I.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(u,"a");let h="",d="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static{s(this,"l")}static isUri(F){return F instanceof p||!!F&&typeof F.authority=="string"&&typeof F.fragment=="string"&&typeof F.path=="string"&&typeof F.query=="string"&&typeof F.scheme=="string"&&typeof F.fsPath=="string"&&typeof F.with=="function"&&typeof F.toString=="function"}scheme;authority;path;query;fragment;constructor(F,B,O,R,N,P=!1){typeof F=="object"?(this.scheme=F.scheme||h,this.authority=F.authority||h,this.path=F.path||h,this.query=F.query||h,this.fragment=F.fragment||h):(this.scheme=(function(E,D){return E||D?E:"file"})(F,P),this.authority=B||h,this.path=(function(E,D){switch(E){case"https":case"http":case"file":D?D[0]!==d&&(D=d+D):D=d}return D})(this.scheme,O||h),this.query=R||h,this.fragment=N||h,u(this,P))}get fsPath(){return T(this,!1)}with(F){if(!F)return this;let{scheme:B,authority:O,path:R,query:N,fragment:P}=F;return B===void 0?B=this.scheme:B===null&&(B=h),O===void 0?O=this.authority:O===null&&(O=h),R===void 0?R=this.path:R===null&&(R=h),N===void 0?N=this.query:N===null&&(N=h),P===void 0?P=this.fragment:P===null&&(P=h),B===this.scheme&&O===this.authority&&R===this.path&&N===this.query&&P===this.fragment?this:new g(B,O,R,N,P)}static parse(F,B=!1){let O=f.exec(F);return O?new g(O[2]||h,w(O[4]||h),w(O[5]||h),w(O[7]||h),w(O[9]||h),B):new g(h,h,h,h,h)}static file(F){let B=h;if(n&&(F=F.replace(/\\/g,d)),F[0]===d&&F[1]===d){let O=F.indexOf(d,2);O===-1?(B=F.substring(2),F=d):(B=F.substring(2,O),F=F.substring(O)||d)}return new g("file",B,F,h,h)}static from(F){let B=new g(F.scheme,F.authority,F.path,F.query,F.fragment);return u(B,!0),B}toString(F=!1){return C(this,F)}toJSON(){return this}static revive(F){if(F){if(F instanceof p)return F;{let B=new g(F);return B._formatted=F.external,B._fsPath=F._sep===m?F.fsPath:null,B}}return F}}let m=n?1:void 0;class g extends p{static{s(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath}toString(F=!1){return F?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){let F={$mid:1};return this._fsPath&&(F.fsPath=this._fsPath,F._sep=m),this._formatted&&(F.external=this._formatted),this.path&&(F.path=this.path),this.scheme&&(F.scheme=this.scheme),this.authority&&(F.authority=this.authority),this.query&&(F.query=this.query),this.fragment&&(F.fragment=this.fragment),F}}let y={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 x(I,F,B){let O,R=-1;for(let N=0;N=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===45||P===46||P===95||P===126||F&&P===47||B&&P===91||B&&P===93||B&&P===58)R!==-1&&(O+=encodeURIComponent(I.substring(R,N)),R=-1),O!==void 0&&(O+=I.charAt(N));else{O===void 0&&(O=I.substr(0,N));let E=y[P];E!==void 0?(R!==-1&&(O+=encodeURIComponent(I.substring(R,N)),R=-1),O+=E):R===-1&&(R=N)}}return R!==-1&&(O+=encodeURIComponent(I.substring(R))),O!==void 0?O:I}s(x,"m");function k(I){let F;for(let B=0;B1&&I.scheme==="file"?`//${I.authority}${I.path}`:I.path.charCodeAt(0)===47&&(I.path.charCodeAt(1)>=65&&I.path.charCodeAt(1)<=90||I.path.charCodeAt(1)>=97&&I.path.charCodeAt(1)<=122)&&I.path.charCodeAt(2)===58?F?I.path.substr(1):I.path[1].toLowerCase()+I.path.substr(2):I.path,n&&(B=B.replace(/\//g,"\\")),B}s(T,"v");function C(I,F){let B=F?k:x,O="",{scheme:R,authority:N,path:P,query:E,fragment:D}=I;if(R&&(O+=R,O+=":"),(N||R==="file")&&(O+=d,O+=d),N){let V=N.indexOf("@");if(V!==-1){let L=N.substr(0,V);N=N.substr(V+1),V=L.lastIndexOf(":"),V===-1?O+=B(L,!1,!1):(O+=B(L.substr(0,V),!1,!1),O+=":",O+=B(L.substr(V+1),!1,!0)),O+="@"}N=N.toLowerCase(),V=N.lastIndexOf(":"),V===-1?O+=B(N,!1,!0):(O+=B(N.substr(0,V),!1,!0),O+=N.substr(V))}if(P){if(P.length>=3&&P.charCodeAt(0)===47&&P.charCodeAt(2)===58){let V=P.charCodeAt(1);V>=65&&V<=90&&(P=`/${String.fromCharCode(V+32)}:${P.substr(3)}`)}else if(P.length>=2&&P.charCodeAt(1)===58){let V=P.charCodeAt(0);V>=65&&V<=90&&(P=`${String.fromCharCode(V+32)}:${P.substr(2)}`)}O+=B(P,!0,!1)}return E&&(O+="?",O+=B(E,!1,!1)),D&&(O+="#",O+=F?D:x(D,!1,!1)),O}s(C,"b");function _(I){try{return decodeURIComponent(I)}catch{return I.length>3?I.substr(0,3)+_(I.substr(3)):I}}s(_,"C");let S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(I){return I.match(S)?I.replace(S,(F=>_(F))):I}s(w,"w");var A=r(975);let v=A.posix||A,M="/";var $;(function(I){I.joinPath=function(F,...B){return F.with({path:v.join(F.path,...B)})},I.resolvePath=function(F,...B){let O=F.path,R=!1;O[0]!==M&&(O=M+O,R=!0);let N=v.resolve(O,...B);return R&&N[0]===M&&!F.authority&&(N=N.substring(1)),F.with({path:N})},I.dirname=function(F){if(F.path.length===0||F.path===M)return F;let B=v.dirname(F.path);return B.length===1&&B.charCodeAt(0)===46&&(B=""),F.with({path:B})},I.basename=function(F){return v.basename(F.path)},I.extname=function(F){return v.extname(F.path)}})($||($={})),cat=i})();({URI:gn,Utils:Fg}=cat)});var Hi,Vg,Qo=b(()=>{"use strict";zO();(function(e){e.basename=Fg.basename,e.dirname=Fg.dirname,e.extname=Fg.extname,e.joinPath=Fg.joinPath,e.resolvePath=Fg.resolvePath;let t=typeof process=="object"&&process?.platform==="win32";function r(o,l){return o?.toString()===l?.toString()}s(r,"equals"),e.equals=r;function i(o,l){let u=typeof o=="string"?gn.parse(o).path:o.path,h=typeof l=="string"?gn.parse(l).path:l.path,d=u.split("/").filter(y=>y.length>0),f=h.split("/").filter(y=>y.length>0);if(t){let y=/^[A-Z]:$/;if(d[0]&&y.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]&&y.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]!==f[0])return h.substring(1)}let p=0;for(;p({name:n.name,uri:Hi.joinPath(gn.parse(r),n.name).toString(),element:n.element})):[]}all(){return this.collectValues(this.root)}findAll(t){let r=this.getNode(Hi.normalize(t),!1);return r?this.collectValues(r):[]}getNode(t,r){let i=t.split("/");t.charAt(t.length-1)==="/"&&i.pop();let n=this.root;for(let a of i){let o=n.children.get(a);if(!o)if(r)o={name:a,children:new Map,parent:n},n.children.set(a,o);else return;n=o}return n}collectValues(t){let r=[];t.element&&r.push(t.element);for(let i of t.children.values())r.push(...this.collectValues(i));return r}}});var hr,tb,eb,zg=b(()=>{"use strict";lat();zg();no();ws();Qo();(function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"})(hr||(hr={}));tb=class{static{s(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,r=ar.CancellationToken.None){let i=await this.fileSystemProvider.readFile(t);return this.createAsync(t,i,r)}fromTextDocument(t,r,i){return r=r??gn.parse(t.uri),ar.CancellationToken.is(i)?this.createAsync(r,t,i):this.create(r,t,i)}fromString(t,r,i){return ar.CancellationToken.is(i)?this.createAsync(r,t,i):this.create(r,t,i)}fromModel(t,r){return this.create(r,{$model:t})}create(t,r,i){if(typeof r=="string"){let n=this.parse(t,r,i);return this.createLangiumDocument(n,t,void 0,r)}else if("$model"in r){let n={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,t)}else{let n=this.parse(t,r.getText(),i);return this.createLangiumDocument(n,t,r)}}async createAsync(t,r,i){if(typeof r=="string"){let n=await this.parseAsync(t,r,i);return this.createLangiumDocument(n,t,void 0,r)}else{let n=await this.parseAsync(t,r.getText(),i);return this.createLangiumDocument(n,t,r)}}createLangiumDocument(t,r,i,n){let a;if(i)a={parseResult:t,uri:r,state:hr.Parsed,references:[],textDocument:i};else{let o=this.createTextDocumentGetter(r,n);a={parseResult:t,uri:r,state:hr.Parsed,references:[],get textDocument(){return o()}}}return t.value.$document=a,a}async update(t,r){let i=t.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(t.uri.toString()),a=n?n.getText():await this.fileSystemProvider.readFile(t.uri);if(n)Object.defineProperty(t,"textDocument",{value:n});else{let o=this.createTextDocumentGetter(t.uri,a);Object.defineProperty(t,"textDocument",{get:o})}return i!==a&&(t.parseResult=await this.parseAsync(t.uri,a,r),t.parseResult.value.$document=t),t.state=hr.Parsed,t}parse(t,r,i){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(r,i)}parseAsync(t,r,i){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(r,i)}createTextDocumentGetter(t,r){let i=this.serviceRegistry,n;return()=>n??(n=$g.create(t.toString(),i.getServices(t).LanguageMetaData.languageId,0,r??""))}},eb=class{static{s(this,"DefaultLangiumDocuments")}constructor(t){this.documentTrie=new Vg,this.services=t,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.documentBuilder=()=>t.workspace.DocumentBuilder}get all(){return mr(this.documentTrie.all())}addDocument(t){let r=t.uri.toString();if(this.documentTrie.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentTrie.insert(r,t)}getDocument(t){let r=t.toString();return this.documentTrie.find(r)}getDocuments(t){let r=t.toString();return this.documentTrie.findAll(r)}async getOrCreateDocument(t,r){let i=this.getDocument(t);return i||(i=await this.langiumDocumentFactory.fromUri(t,r),this.addDocument(i),i)}createDocument(t,r,i){if(i)return this.langiumDocumentFactory.fromString(r,t,i).then(n=>(this.addDocument(n),n));{let n=this.langiumDocumentFactory.fromString(r,t);return this.addDocument(n),n}}hasDocument(t){return this.documentTrie.has(t.toString())}invalidateDocument(t){let r=t.toString(),i=this.documentTrie.find(r);return i&&this.documentBuilder().resetToState(i,hr.Changed),i}deleteDocument(t){let r=t.toString(),i=this.documentTrie.find(r);return i&&(i.state=hr.Changed,this.documentTrie.delete(r)),i}deleteDocuments(t){let r=t.toString(),i=this.documentTrie.findAll(r);for(let n of i)n.state=hr.Changed;return this.documentTrie.delete(r),i}}});var Df,rb,GO=b(()=>{"use strict";no();Go();ss();ao();zg();Df=Symbol("RefResolving"),rb=class{static{s(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,this.profiler=t.shared.profilers.LangiumProfiler,this.languageId=t.LanguageMetaData.languageId}async link(t,r=ar.CancellationToken.None){if(this.profiler?.isActive("linking")){let i=this.profiler.createTask("linking",this.languageId);i.start();try{for(let n of _s(t.parseResult.value))await Bi(r),eh(n).forEach(a=>{let o=`${n.$type}:${a.property}`;i.startSubTask(o);try{this.doLink(a,t)}finally{i.stopSubTask(o)}})}finally{i.stop()}}else for(let i of _s(t.parseResult.value))await Bi(r),eh(i).forEach(n=>this.doLink(n,t))}doLink(t,r){let i=t.reference;if("_ref"in i&&i._ref===void 0){i._ref=Df;try{let n=this.getCandidate(t);if(Qd(n))i._ref=n;else{i._nodeDescription=n;let a=this.loadAstNode(n);i._ref=a??this.createLinkingError(t,n)}}catch(n){console.error(`An error occurred while resolving reference to '${i.$refText}':`,n);let a=n.message??String(n);i._ref={info:t,message:`An error occurred while resolving reference to '${i.$refText}': ${a}`}}r.references.push(i)}else if("_items"in i&&i._items===void 0){i._items=Df;try{let n=this.getCandidates(t),a=[];if(Qd(n))i._linkingError=n;else for(let o of n){let l=this.loadAstNode(o);l&&a.push({ref:l,$nodeDescription:o})}i._items=a}catch(n){i._linkingError={info:t,message:`An error occurred while resolving reference to '${i.$refText}': ${n}`},i._items=[]}r.references.push(i)}}unlink(t){for(let r of t.references)"_ref"in r?(r._ref=void 0,delete r._nodeDescription):"_items"in r&&(r._items=void 0,delete r._linkingError);t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}getCandidates(t){let i=this.scopeProvider.getScope(t).getElements(t.reference.$refText).distinct(n=>`${n.documentUri}#${n.path}`).toArray();return i.length>0?i:this.createLinkingError(t)}buildReference(t,r,i,n){let a=this,o={$refNode:i,$refText:n,_ref:void 0,get ref(){if(Mi(this._ref))return this._ref;if(W6(this._nodeDescription)){let l=a.loadAstNode(this._nodeDescription);this._ref=l??a.createLinkingError({reference:o,container:t,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=Df;let l=jm(t).$document,u=a.getLinkedNode({reference:o,container:t,property:r});if(u.error&&l&&l.state0))return this._linkingError=a.createLinkingError({reference:o,container:t,property:r})}};return o}throwCyclicReferenceError(t,r,i){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(t)}/${r} (symbol '${i}')`)}getLinkedNode(t){try{let r=this.getCandidate(t);if(Qd(r))return{error:r};let i=this.loadAstNode(r);return i?{node:i,descr:r}:{descr:r,error:this.createLinkingError(t,r)}}catch(r){console.error(`An error occurred while resolving reference to '${t.reference.$refText}':`,r);let i=r.message??String(r);return{error:{info:t,message:`An error occurred while resolving reference to '${t.reference.$refText}': ${i}`}}}}loadAstNode(t){if(t.node)return t.node;let r=this.langiumDocuments().getDocument(t.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,t.path)}createLinkingError(t,r){let i=jm(t.container).$document;i&&i.state{"use strict";Xo();s(uat,"isNamed");ib=class{static{s(this,"DefaultNameProvider")}getName(t){if(uat(t))return t.name}getNameNode(t){return fx(t.$cstNode,"name")}}});var nb,qO=b(()=>{"use strict";Xo();Go();ss();qo();ws();Qo();Ea();nb=class{static{s(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator,this.documents=t.shared.workspace.LangiumDocuments,this.hasMultiReference=_s(t.Grammar).some(r=>Ho(r)&&r.isMulti)}findDeclarations(t){if(t){let r=DI(t),i=t.astNode;if(r&&i){let n=i[r.feature];if(pn(n)||Sa(n))return AS(n);if(Array.isArray(n)){for(let a of n)if((pn(a)||Sa(a))&&a.$refNode&&a.$refNode.offset<=t.offset&&a.$refNode.end>=t.end)return AS(a)}}if(i){let n=this.nameProvider.getNameNode(i);if(n&&(n===t||fI(t,n)))return this.getSelfNodes(i)}}return[]}getSelfNodes(t){if(this.hasMultiReference){let r=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t)),i=this.getNodeFromReferenceDescription(r.head());if(i){for(let n of eh(i))if(Sa(n.reference)&&n.reference.items.some(a=>a.ref===t))return n.reference.items.map(a=>a.ref)}return[t]}else return[t]}getNodeFromReferenceDescription(t){if(!t)return;let r=this.documents.getDocument(t.sourceUri);if(r)return this.nodeLocator.getAstNode(r.parseResult.value,t.sourcePath)}findDeclarationNodes(t){let r=this.findDeclarations(t),i=[];for(let n of r){let a=this.nameProvider.getNameNode(n)??n.$cstNode;a&&i.push(a)}return i}findReferences(t,r){let i=[];r.includeDeclaration&&i.push(...this.getSelfReferences(t));let n=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return r.documentUri&&(n=n.filter(a=>Hi.equals(a.sourceUri,r.documentUri))),i.push(...n),mr(i)}getSelfReferences(t){let r=this.getSelfNodes(t),i=[];for(let n of r){let a=this.nameProvider.getNameNode(n);if(a){let o=ns(n),l=this.nodeLocator.getAstNodePath(n);i.push({sourceUri:o.uri,sourcePath:l,targetUri:o.uri,targetPath:l,segment:hf(a),local:!0})}}return i}}});var os,If,yh=b(()=>{"use strict";ws();os=class{static{s(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(let[r,i]of t)this.add(r,i)}get size(){return Wm.sum(mr(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,r){if(r===void 0)return this.map.delete(t);{let i=this.map.get(t);if(i){let n=i.indexOf(r);if(n>=0)return i.length===1?this.map.delete(t):i.splice(n,1),!0}return!1}}get(t){return this.map.get(t)??[]}getStream(t){let r=this.map.get(t);return r?mr(r):th}has(t,r){if(r===void 0)return this.map.has(t);{let i=this.map.get(t);return i?i.indexOf(r)>=0:!1}}add(t,r){return this.map.has(t)?this.map.get(t).push(r):this.map.set(t,[r]),this}addAll(t,r){return this.map.has(t)?this.map.get(t).push(...r):this.map.set(t,Array.from(r)),this}forEach(t){this.map.forEach((r,i)=>r.forEach(n=>t(n,i,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return mr(this.map.entries()).flatMap(([t,r])=>r.map(i=>[t,i]))}keys(){return mr(this.map.keys())}values(){return mr(this.map.values()).flat()}entriesGroupedByKey(){return mr(this.map.entries())}},If=class{static{s(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(let[r,i]of t)this.set(r,i)}clear(){this.map.clear(),this.inverse.clear()}set(t,r){return this.map.set(t,r),this.inverse.set(r,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){let r=this.map.get(t);return r!==void 0?(this.map.delete(t),this.inverse.delete(r),!0):!1}}});var sb,jO=b(()=>{"use strict";ss();no();yh();ao();sb=class{static{s(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(t,r=ar.CancellationToken.None){return this.collectExportedSymbolsForNode(t.parseResult.value,t,void 0,r)}async collectExportedSymbolsForNode(t,r,i=X0,n=ar.CancellationToken.None){let a=[];this.addExportedSymbol(t,a,r);for(let o of i(t))await Bi(n),this.addExportedSymbol(o,a,r);return a}addExportedSymbol(t,r,i){let n=this.nameProvider.getName(t);n&&r.push(this.descriptions.createDescription(t,n,i))}async collectLocalSymbols(t,r=ar.CancellationToken.None){let i=t.parseResult.value,n=new os;for(let a of Wo(i))await Bi(r),this.addLocalSymbol(a,t,n);return n}addLocalSymbol(t,r,i){let n=t.$container;if(n){let a=this.nameProvider.getName(t);a&&i.add(n,this.descriptions.createDescription(t,a,r))}}}});var Gg,UO,ab,y8t,HO=b(()=>{"use strict";yh();ws();Gg=class{static{s(this,"StreamScope")}constructor(t,r,i){this.elements=t,this.outerScope=r,this.caseInsensitive=i?.caseInsensitive??!1,this.concatOuterScope=i?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){let r=this.caseInsensitive?t.toLowerCase():t,i=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===r):this.elements.find(n=>n.name===t);if(i)return i;if(this.outerScope)return this.outerScope.getElement(t)}getElements(t){let r=this.caseInsensitive?t.toLowerCase():t,i=this.caseInsensitive?this.elements.filter(n=>n.name.toLowerCase()===r):this.elements.filter(n=>n.name===t);return(this.concatOuterScope||i.isEmpty())&&this.outerScope?i.concat(this.outerScope.getElements(t)):i}},UO=class{static{s(this,"MapScope")}constructor(t,r,i){this.elements=new Map,this.caseInsensitive=i?.caseInsensitive??!1,this.concatOuterScope=i?.concatOuterScope??!0;for(let n of t){let a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(a,n)}this.outerScope=r}getElement(t){let r=this.caseInsensitive?t.toLowerCase():t,i=this.elements.get(r);if(i)return i;if(this.outerScope)return this.outerScope.getElement(t)}getElements(t){let r=this.caseInsensitive?t.toLowerCase():t,i=this.elements.get(r),n=i?[i]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?mr(n).concat(this.outerScope.getElements(t)):mr(n)}getAllElements(){let t=mr(this.elements.values());return this.outerScope&&(t=t.concat(this.outerScope.getAllElements())),t}},ab=class{static{s(this,"MultiMapScope")}constructor(t,r,i){this.elements=new os,this.caseInsensitive=i?.caseInsensitive??!1,this.concatOuterScope=i?.concatOuterScope??!0;for(let n of t){let a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(a,n)}this.outerScope=r}getElement(t){let r=this.caseInsensitive?t.toLowerCase():t,i=this.elements.get(r)[0];if(i)return i;if(this.outerScope)return this.outerScope.getElement(t)}getElements(t){let r=this.caseInsensitive?t.toLowerCase():t,i=this.elements.get(r);return(this.concatOuterScope||i.length===0)&&this.outerScope?mr(i).concat(this.outerScope.getElements(t)):mr(i)}getAllElements(){let t=mr(this.elements.values());return this.outerScope&&(t=t.concat(this.outerScope.getAllElements())),t}},y8t={getElement(){},getElements(){return th},getAllElements(){return th}}});var Wg,ob,Nf,h_,qg,d_=b(()=>{"use strict";Wg=class{static{s(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")}},ob=class extends Wg{static{s(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,r){this.throwIfDisposed(),this.cache.set(t,r)}get(t,r){if(this.throwIfDisposed(),this.cache.has(t))return this.cache.get(t);if(r){let i=r();return this.cache.set(t,i),i}else return}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},Nf=class extends Wg{static{s(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(r=>r)}has(t,r){return this.throwIfDisposed(),this.cacheForContext(t).has(r)}set(t,r,i){this.throwIfDisposed(),this.cacheForContext(t).set(r,i)}get(t,r,i){this.throwIfDisposed();let n=this.cacheForContext(t);if(n.has(r))return n.get(r);if(i){let a=i();return n.set(r,a),a}else return}delete(t,r){return this.throwIfDisposed(),this.cacheForContext(t).delete(r)}clear(t){if(this.throwIfDisposed(),t){let r=this.converter(t);this.cache.delete(r)}else this.cache.clear()}cacheForContext(t){let r=this.converter(t),i=this.cache.get(r);return i||(i=new Map,this.cache.set(r,i)),i}},h_=class extends Nf{static{s(this,"DocumentCache")}constructor(t,r){super(i=>i.toString()),r?(this.toDispose.push(t.workspace.DocumentBuilder.onDocumentPhase(r,i=>{this.clear(i.uri.toString())})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((i,n)=>{for(let a of n)this.clear(a)}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((i,n)=>{let a=i.concat(n);for(let o of a)this.clear(o)}))}},qg=class extends ob{static{s(this,"WorkspaceCache")}constructor(t,r){super(),r?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((i,n)=>{n.length>0&&this.clear()}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var lb,YO=b(()=>{"use strict";HO();ss();ws();d_();lb=class{static{s(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 qg(t.shared)}getScope(t){let r=[],i=this.reflection.getReferenceType(t),n=ns(t.container).localSymbols;if(n){let o=t.container;do n.has(o)&&r.push(n.getStream(o).filter(l=>this.reflection.isSubtype(l.type,i))),o=o.$container;while(o)}let a=this.getGlobalScope(i,t);for(let o=r.length-1;o>=0;o--)a=this.createScope(r[o],a);return a}createScope(t,r,i){return new Gg(mr(t),r,i)}createScopeForNodes(t,r,i){let n=mr(t).map(a=>{let o=this.nameProvider.getName(a);if(o)return this.descriptions.createDescription(a,o)}).nonNullable();return new Gg(n,r,i)}getGlobalScope(t,r){return this.globalScopeCache.get(t,()=>new ab(this.indexManager.allElements(t)))}}});function XO(e){return typeof e.$comment=="string"}function hat(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}var cb,f_=b(()=>{"use strict";zO();Go();ss();Xo();s(XO,"isAstNodeWithComment");s(hat,"isIntermediateReference");cb=class{static{s(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 i=r??{},n=r?.replacer,a=s((l,u)=>this.replacer(l,u,i),"defaultReplacer"),o=n?(l,u)=>n(l,u,a):a;try{return this.currentDocument=ns(t),JSON.stringify(t,o,r?.space)}finally{this.currentDocument=void 0}}deserialize(t,r){let i=r??{},n=JSON.parse(t);return this.linkNode(n,n,i),n}replacer(t,r,{refText:i,sourceText:n,textRegions:a,comments:o,uriConverter:l}){if(!this.ignoreProperties.has(t))if(pn(r)){let u=r.ref,h=i?r.$refText:void 0;if(u){let d=ns(u),f="";this.currentDocument&&this.currentDocument!==d&&(l?f=l(d.uri,u):f=d.uri.toString());let p=this.astNodeLocator.getAstNodePath(u);return{$ref:`${f}#${p}`,$refText:h}}else return{$error:r.error?.message??"Could not resolve reference",$refText:h}}else if(Sa(r)){let u=i?r.$refText:void 0,h=[];for(let d of r.items){let f=d.ref,p=ns(d.ref),m="";this.currentDocument&&this.currentDocument!==p&&(l?m=l(p.uri,f):m=p.uri.toString());let g=this.astNodeLocator.getAstNodePath(f);h.push(`${m}#${g}`)}return{$refs:h,$refText:u}}else if(Mi(r)){let u;if(a&&(u=this.addAstNodeRegionWithAssignmentsTo({...r}),(!t||r.$document)&&u?.$textRegion&&(u.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!t&&(u??(u={...r}),u.$sourceText=r.$cstNode?.text),o){u??(u={...r});let h=this.commentProvider.getComment(r);h&&(u.$comment=h.replace(/\r/g,""))}return u??r}else return r}addAstNodeRegionWithAssignmentsTo(t){let r=s(i=>({offset:i.offset,end:i.end,length:i.length,range:i.range}),"createDocumentSegment");if(t.$cstNode){let i=t.$textRegion=r(t.$cstNode),n=i.assignments={};return Object.keys(t).filter(a=>!a.startsWith("$")).forEach(a=>{let o=vI(t.$cstNode,a).map(r);o.length!==0&&(n[a]=o)}),t}}linkNode(t,r,i,n,a,o){for(let[u,h]of Object.entries(t))if(Array.isArray(h))for(let d=0;d{"use strict";Qo();ub=class{static{s(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){let r=t.LanguageMetaData;for(let i of r.fileExtensions)this.fileExtensionMap.has(i)&&console.warn(`The file extension ${i} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(i,t);if(r.fileNames)for(let i of r.fileNames)this.fileNameMap.has(i)&&console.warn(`The file name ${i} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileNameMap.set(i,t);this.languageIdMap.set(r.languageId,t)}getServices(t){if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let r=this.textDocuments?.get(t)?.languageId;if(r!==void 0){let o=this.languageIdMap.get(r);if(o)return o}let i=Hi.extname(t),n=Hi.basename(t),a=this.fileNameMap.get(n)??this.fileExtensionMap.get(i);if(!a)throw r?new Error(`The service registry contains no services for the extension '${i}' for language '${r}'.`):new Error(`The service registry contains no services for the extension '${i}'.`);return a}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Of(e){return{code:e}}var p_,hb,m_=b(()=>{"use strict";Is();yh();ao();ws();s(Of,"diagnosticData");(function(e){e.defaults=["fast","slow","built-in"],e.all=e.defaults})(p_||(p_={}));hb=class{static{s(this,"ValidationRegistry")}constructor(t){this.entries=new os,this.knownCategories=new Set(p_.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,r=this,i="fast"){if(i==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(i);for(let[n,a]of Object.entries(t)){let o=a;if(Array.isArray(o))for(let l of o){let u={check:this.wrapValidationException(l,r),category:i};this.addEntry(n,u)}else if(typeof o=="function"){let l={check:this.wrapValidationException(o,r),category:i};this.addEntry(n,l)}else zl(o)}}wrapValidationException(t,r){return async(i,n,a)=>{await this.handleException(()=>t.call(r,i,n,a),"An error occurred during validation",n,i)}}async handleException(t,r,i,n){try{await t()}catch(a){if(Hl(a))throw a;console.error(`${r}:`,a),a instanceof Error&&a.stack&&console.error(a.stack);let o=a instanceof Error?a.message:String(a);i("error",`${r}: ${o}`,{node:n})}}addEntry(t,r){if(t==="AstNode"){this.entries.add("AstNode",r);return}for(let i of this.reflection.getAllSubTypes(t))this.entries.add(i,r)}getChecks(t,r){let i=mr(this.entries.get(t)).concat(this.entries.get("AstNode"));return r&&(i=i.filter(n=>r.includes(n.category))),i.map(n=>n.check)}registerBeforeDocument(t,r=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",r))}registerAfterDocument(t,r=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",r))}wrapPreparationException(t,r,i){return async(n,a,o,l)=>{await this.handleException(()=>t.call(i,n,a,o,l),r,a,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(t){return this.knownCategories}}});function fat(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=fx(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=RI(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function g_(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function pat(e){switch(e){case"error":return Of(oo.LexingError);case"warning":return Of(oo.LexingWarning);case"info":return Of(oo.LexingInfo);case"hint":return Of(oo.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var dat,db,oo,QO=b(()=>{"use strict";no();Xo();ss();qo();ao();m_();dat=Object.freeze({validateNode:!0,validateChildren:!0}),db=class{static{s(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData,this.profiler=t.shared.profilers.LangiumProfiler,this.languageId=t.LanguageMetaData.languageId}async validateDocument(t,r={},i=ar.CancellationToken.None){let n=t.parseResult,a=[];if(await Bi(i),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(n,a,r),r.stopAfterLexingErrors&&a.some(o=>o.data?.code===oo.LexingError)||(this.processParsingErrors(n,a,r),r.stopAfterParsingErrors&&a.some(o=>o.data?.code===oo.ParsingError))||(this.processLinkingErrors(t,a,r),r.stopAfterLinkingErrors&&a.some(o=>o.data?.code===oo.LinkingError))))return a;try{a.push(...await this.validateAst(n.value,r,i))}catch(o){if(Hl(o))throw o;console.error("An error occurred during validation:",o)}return await Bi(i),a}processLexingErrors(t,r,i){let n=[...t.lexerErrors,...t.lexerReport?.diagnostics??[]];for(let a of n){let o=a.severity??"error",l={severity:g_(o),range:{start:{line:a.line-1,character:a.column-1},end:{line:a.line-1,character:a.column+a.length-1}},message:a.message,data:pat(o),source:this.getSource()};r.push(l)}}processParsingErrors(t,r,i){for(let n of t.parserErrors){let a;if(isNaN(n.token.startOffset)){if("previousToken"in n){let o=n.previousToken;if(isNaN(o.startOffset)){let l={line:0,character:0};a={start:l,end:l}}else{let l={line:o.endLine-1,character:o.endColumn};a={start:l,end:l}}}}else a=tg(n.token);if(a){let o={severity:g_("error"),range:a,message:n.message,data:Of(oo.ParsingError),source:this.getSource()};r.push(o)}}}processLinkingErrors(t,r,i){for(let n of t.references){let a=n.error;if(a){let o={node:a.info.container,range:n.$refNode?.range,property:a.info.property,index:a.info.index,data:{code:oo.LinkingError,containerType:a.info.container.$type,property:a.info.property,refText:a.info.reference.$refText}};r.push(this.toDiagnostic("error",a.message,o))}}}async validateAst(t,r,i=ar.CancellationToken.None){let n=[],a=s((o,l,u)=>{n.push(this.toDiagnostic(o,l,u))},"acceptor");return await this.validateAstBefore(t,r,a,i),await this.validateAstNodes(t,r,a,i),await this.validateAstAfter(t,r,a,i),n}async validateAstBefore(t,r,i,n=ar.CancellationToken.None){let a=this.validationRegistry.checksBefore;for(let o of a)await Bi(n),await o(t,i,r.categories??[],n)}async validateAstNodes(t,r,i,n=ar.CancellationToken.None){if(this.profiler?.isActive("validating")){let a=this.profiler.createTask("validating",this.languageId);a.start();try{let o=_s(t).iterator();for(let l of o){a.startSubTask(l.$type);let u=this.validateSingleNodeOptions(l,r);if(u.validateNode)try{let h=this.validationRegistry.getChecks(l.$type,r.categories);for(let d of h)await d(l,i,n)}finally{a.stopSubTask(l.$type)}u.validateChildren||o.prune()}}finally{a.stop()}}else{let a=_s(t).iterator();for(let o of a){await Bi(n);let l=this.validateSingleNodeOptions(o,r);if(l.validateNode){let u=this.validationRegistry.getChecks(o.$type,r.categories);for(let h of u)await h(o,i,n)}l.validateChildren||a.prune()}}}validateSingleNodeOptions(t,r){return dat}async validateAstAfter(t,r,i,n=ar.CancellationToken.None){let a=this.validationRegistry.checksAfter;for(let o of a)await Bi(n),await o(t,i,r.categories??[],n)}toDiagnostic(t,r,i){return{message:r,range:fat(i),severity:g_(t),code:i.code,codeDescription:i.codeDescription,tags:i.tags,relatedInformation:i.relatedInformation,data:i.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};s(fat,"getDiagnosticRange");s(g_,"toDiagnosticSeverity");s(pat,"toDiagnosticData");(function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"})(oo||(oo={}))});var fb,pb,ZO=b(()=>{"use strict";no();Go();ss();qo();ao();Qo();fb=class{static{s(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(t,r,i){let n=i??ns(t);r??(r=this.nameProvider.getName(t));let a=this.astNodeLocator.getAstNodePath(t);if(!r)throw new Error(`Node at path ${a} has no name.`);let o,l=s(()=>o??(o=hf(this.nameProvider.getNameNode(t)??t.$cstNode)),"nameSegmentGetter");return{node:t,name:r,get nameSegment(){return l()},selectionSegment:hf(t.$cstNode),type:t.$type,documentUri:n.uri,path:a}}},pb=class{static{s(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,r=ar.CancellationToken.None){let i=[],n=t.parseResult.value;for(let a of _s(n))await Bi(r),eh(a).forEach(o=>{o.reference.error||i.push(...this.createInfoDescriptions(o))});return i}createInfoDescriptions(t){let r=t.reference;if(r.error||!r.$refNode)return[];let i=[];pn(r)&&r.$nodeDescription?i=[r.$nodeDescription]:Sa(r)&&(i=r.items.map(u=>u.$nodeDescription).filter(u=>u!==void 0));let n=ns(t.container).uri,a=this.nodeLocator.getAstNodePath(t.container),o=[],l=hf(r.$refNode);for(let u of i)o.push({sourceUri:n,sourcePath:a,targetUri:u.documentUri,targetPath:u.path,segment:l,local:Hi.equals(u.documentUri,n)});return o}}});var mb,JO=b(()=>{"use strict";mb=class{static{s(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){if(t.$container){let r=this.getAstNodePath(t.$container),i=this.getPathSegment(t);return r+this.segmentSeparator+i}return""}getPathSegment({$containerProperty:t,$containerIndex:r}){if(!t)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?t+this.indexSeparator+r:t}getAstNode(t,r){return r.split(this.segmentSeparator).reduce((n,a)=>{if(!n||a.length===0)return n;let o=a.indexOf(this.indexSeparator);if(o>0){let l=a.substring(0,o),u=parseInt(a.substring(o+1));return n[l]?.[u]}return n[a]},t)}}});var Li={};var y_=b(()=>{"use strict";xr(Li,fs(Lf(),1))});var gb,tM=b(()=>{"use strict";y_();ao();gb=class{static{s(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new Ds,this.onConfigurationSectionUpdateEmitter=new Li.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=t.capabilities.workspace?.configuration??!1}async initialized(t){if(this.workspaceConfig){if(t.register){let r=this.serviceRegistry.all;t.register({section:r.map(i=>this.toSectionName(i.LanguageMetaData.languageId))})}if(t.fetchConfiguration){let r=this.serviceRegistry.all.map(n=>({section:this.toSectionName(n.LanguageMetaData.languageId)})),i=await t.fetchConfiguration(r);r.forEach((n,a)=>{this.updateSectionConfiguration(n.section,i[a])})}}this._ready.resolve()}updateConfiguration(t){typeof t.settings!="object"||t.settings===null||Object.entries(t.settings).forEach(([r,i])=>{this.updateSectionConfiguration(r,i),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:i})})}updateSectionConfiguration(t,r){this.settings[t]=r}async getConfiguration(t,r){await this.ready;let i=this.toSectionName(t);if(this.settings[i])return this.settings[i][r]}toSectionName(t){return`${t}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}});var _M=Be(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.Message=De.NotificationType9=De.NotificationType8=De.NotificationType7=De.NotificationType6=De.NotificationType5=De.NotificationType4=De.NotificationType3=De.NotificationType2=De.NotificationType1=De.NotificationType0=De.NotificationType=De.RequestType9=De.RequestType8=De.RequestType7=De.RequestType6=De.RequestType5=De.RequestType4=De.RequestType3=De.RequestType2=De.RequestType1=De.RequestType=De.RequestType0=De.AbstractMessageSignature=De.ParameterStructures=De.ResponseError=De.ErrorCodes=void 0;var Mf=Mg(),eM;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(eM||(De.ErrorCodes=eM={}));var rM=class e extends Error{static{s(this,"ResponseError")}constructor(t,r,i){super(r),this.code=Mf.number(t)?t:eM.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,e.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};De.ResponseError=rM;var ra=class e{static{s(this,"ParameterStructures")}constructor(t){this.kind=t}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};De.ParameterStructures=ra;ra.auto=new ra("auto");ra.byPosition=new ra("byPosition");ra.byName=new ra("byName");var ki=class{static{s(this,"AbstractMessageSignature")}constructor(t,r){this.method=t,this.numberOfParams=r}get parameterStructures(){return ra.auto}};De.AbstractMessageSignature=ki;var iM=class extends ki{static{s(this,"RequestType0")}constructor(t){super(t,0)}};De.RequestType0=iM;var nM=class extends ki{static{s(this,"RequestType")}constructor(t,r=ra.auto){super(t,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};De.RequestType=nM;var sM=class extends ki{static{s(this,"RequestType1")}constructor(t,r=ra.auto){super(t,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};De.RequestType1=sM;var aM=class extends ki{static{s(this,"RequestType2")}constructor(t){super(t,2)}};De.RequestType2=aM;var oM=class extends ki{static{s(this,"RequestType3")}constructor(t){super(t,3)}};De.RequestType3=oM;var lM=class extends ki{static{s(this,"RequestType4")}constructor(t){super(t,4)}};De.RequestType4=lM;var cM=class extends ki{static{s(this,"RequestType5")}constructor(t){super(t,5)}};De.RequestType5=cM;var uM=class extends ki{static{s(this,"RequestType6")}constructor(t){super(t,6)}};De.RequestType6=uM;var hM=class extends ki{static{s(this,"RequestType7")}constructor(t){super(t,7)}};De.RequestType7=hM;var dM=class extends ki{static{s(this,"RequestType8")}constructor(t){super(t,8)}};De.RequestType8=dM;var fM=class extends ki{static{s(this,"RequestType9")}constructor(t){super(t,9)}};De.RequestType9=fM;var pM=class extends ki{static{s(this,"NotificationType")}constructor(t,r=ra.auto){super(t,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};De.NotificationType=pM;var mM=class extends ki{static{s(this,"NotificationType0")}constructor(t){super(t,0)}};De.NotificationType0=mM;var gM=class extends ki{static{s(this,"NotificationType1")}constructor(t,r=ra.auto){super(t,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};De.NotificationType1=gM;var yM=class extends ki{static{s(this,"NotificationType2")}constructor(t){super(t,2)}};De.NotificationType2=yM;var xM=class extends ki{static{s(this,"NotificationType3")}constructor(t){super(t,3)}};De.NotificationType3=xM;var bM=class extends ki{static{s(this,"NotificationType4")}constructor(t){super(t,4)}};De.NotificationType4=bM;var kM=class extends ki{static{s(this,"NotificationType5")}constructor(t){super(t,5)}};De.NotificationType5=kM;var TM=class extends ki{static{s(this,"NotificationType6")}constructor(t){super(t,6)}};De.NotificationType6=TM;var CM=class extends ki{static{s(this,"NotificationType7")}constructor(t){super(t,7)}};De.NotificationType7=CM;var SM=class extends ki{static{s(this,"NotificationType8")}constructor(t){super(t,8)}};De.NotificationType8=SM;var wM=class extends ki{static{s(this,"NotificationType9")}constructor(t){super(t,9)}};De.NotificationType9=wM;var mat;(function(e){function t(n){let a=n;return a&&Mf.string(a.method)&&(Mf.string(a.id)||Mf.number(a.id))}s(t,"isRequest"),e.isRequest=t;function r(n){let a=n;return a&&Mf.string(a.method)&&n.id===void 0}s(r,"isNotification"),e.isNotification=r;function i(n){let a=n;return a&&(a.result!==void 0||!!a.error)&&(Mf.string(a.id)||Mf.number(a.id)||a.id===null)}s(i,"isResponse"),e.isResponse=i})(mat||(De.Message=mat={}))});var vM=Be(xh=>{"use strict";var gat;Object.defineProperty(xh,"__esModule",{value:!0});xh.LRUCache=xh.LinkedMap=xh.Touch=void 0;var ls;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ls||(xh.Touch=ls={}));var x_=class{static{s(this,"LinkedMap")}constructor(){this[gat]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,r=ls.None){let i=this._map.get(t);if(i)return r!==ls.None&&this.touch(i,r),i.value}set(t,r,i=ls.None){let n=this._map.get(t);if(n)n.value=r,i!==ls.None&&this.touch(n,i);else{switch(n={key:t,value:r,next:void 0,previous:void 0},i){case ls.None:this.addItemLast(n);break;case ls.First:this.addItemFirst(n);break;case ls.Last:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(t,n),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let r=this._map.get(t);if(r)return this._map.delete(t),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,r){let i=this._state,n=this._head;for(;n;){if(r?t.bind(r)(n.value,n.key,this):t(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){let t=this._state,r=this._head,i={[Symbol.iterator]:()=>i,next:s(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){let n={value:r.key,done:!1};return r=r.next,n}else return{value:void 0,done:!0}},"next")};return i}values(){let t=this._state,r=this._head,i={[Symbol.iterator]:()=>i,next:s(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){let n={value:r.value,done:!1};return r=r.next,n}else return{value:void 0,done:!0}},"next")};return i}entries(){let t=this._state,r=this._head,i={[Symbol.iterator]:()=>i,next:s(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){let n={value:[r.key,r.value],done:!1};return r=r.next,n}else return{value:void 0,done:!0}},"next")};return i}[(gat=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let r=this._head,i=this.size;for(;r&&i>t;)this._map.delete(r.key),r=r.next,i--;this._head=r,this._size=i,r&&(r.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let r=t.next,i=t.previous;if(!r||!i)throw new Error("Invalid list");r.previous=i,i.next=r}t.next=void 0,t.previous=void 0,this._state++}touch(t,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==ls.First&&r!==ls.Last)){if(r===ls.First){if(t===this._head)return;let i=t.next,n=t.previous;t===this._tail?(n.next=void 0,this._tail=n):(i.previous=n,n.next=i),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(r===ls.Last){if(t===this._tail)return;let i=t.next,n=t.previous;t===this._head?(i.previous=void 0,this._head=i):(i.previous=n,n.next=i),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((r,i)=>{t.push([i,r])}),t}fromJSON(t){this.clear();for(let[r,i]of t)this.set(r,i)}};xh.LinkedMap=x_;var EM=class extends x_{static{s(this,"LRUCache")}constructor(t,r=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,r=ls.AsNew){return super.get(t,r)}peek(t){return super.get(t,ls.None)}set(t,r){return super.set(t,r,ls.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};xh.LRUCache=EM});var xat=Be(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});b_.Disposable=void 0;var yat;(function(e){function t(r){return{dispose:r}}s(t,"create"),e.create=t})(yat||(b_.Disposable=yat={}))});var bat=Be(jg=>{"use strict";Object.defineProperty(jg,"__esModule",{value:!0});jg.SharedArrayReceiverStrategy=jg.SharedArraySenderStrategy=void 0;var x8t=Jx(),yb;(function(e){e.Continue=0,e.Cancelled=1})(yb||(yb={}));var AM=class{static{s(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let r=new SharedArrayBuffer(4),i=new Int32Array(r,0,1);i[0]=yb.Continue,this.buffers.set(t.id,r),t.$cancellationData=r}async sendCancellation(t,r){let i=this.buffers.get(r);if(i===void 0)return;let n=new Int32Array(i,0,1);Atomics.store(n,0,yb.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};jg.SharedArraySenderStrategy=AM;var RM=class{static{s(this,"SharedArrayBufferCancellationToken")}constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===yb.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},LM=class{static{s(this,"SharedArrayBufferCancellationTokenSource")}constructor(t){this.token=new RM(t)}cancel(){}dispose(){}},DM=class{static{s(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(t){let r=t.$cancellationData;return r===void 0?new x8t.CancellationTokenSource:new LM(r)}};jg.SharedArrayReceiverStrategy=DM});var NM=Be(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});k_.Semaphore=void 0;var b8t=gh(),IM=class{static{s(this,"Semaphore")}constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((r,i)=>{this._waiting.push({thunk:t,resolve:r,reject:i}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,b8t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let r=t.thunk();r instanceof Promise?r.then(i=>{this._active--,t.resolve(i),this.runNext()},i=>{this._active--,t.reject(i),this.runNext()}):(this._active--,t.resolve(r),this.runNext())}catch(r){this._active--,t.reject(r),this.runNext()}}};k_.Semaphore=IM});var Tat=Be(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});bh.ReadableStreamMessageReader=bh.AbstractMessageReader=bh.MessageReader=void 0;var MM=gh(),Ug=Mg(),OM=Lf(),k8t=NM(),kat;(function(e){function t(r){let i=r;return i&&Ug.func(i.listen)&&Ug.func(i.dispose)&&Ug.func(i.onError)&&Ug.func(i.onClose)&&Ug.func(i.onPartialMessage)}s(t,"is"),e.is=t})(kat||(bh.MessageReader=kat={}));var T_=class{static{s(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new OM.Emitter,this.closeEmitter=new OM.Emitter,this.partialMessageEmitter=new OM.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${Ug.string(t.message)?t.message:"unknown"}`)}};bh.AbstractMessageReader=T_;var BM;(function(e){function t(r){let i,n,a,o=new Map,l,u=new Map;if(r===void 0||typeof r=="string")i=r??"utf-8";else{if(i=r.charset??"utf-8",r.contentDecoder!==void 0&&(a=r.contentDecoder,o.set(a.name,a)),r.contentDecoders!==void 0)for(let h of r.contentDecoders)o.set(h.name,h);if(r.contentTypeDecoder!==void 0&&(l=r.contentTypeDecoder,u.set(l.name,l)),r.contentTypeDecoders!==void 0)for(let h of r.contentTypeDecoders)u.set(h.name,h)}return l===void 0&&(l=(0,MM.default)().applicationJson.decoder,u.set(l.name,l)),{charset:i,contentDecoder:a,contentDecoders:o,contentTypeDecoder:l,contentTypeDecoders:u}}s(t,"fromOptions"),e.fromOptions=t})(BM||(BM={}));var PM=class extends T_{static{s(this,"ReadableStreamMessageReader")}constructor(t,r){super(),this.readable=t,this.options=BM.fromOptions(r),this.buffer=(0,MM.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new k8t.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;let r=this.readable.onData(i=>{this.onData(i)});return this.readable.onError(i=>this.fireError(i)),this.readable.onClose(()=>this.fireClose()),r}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders(!0);if(!i)return;let n=i.get("content-length");if(!n){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(i))}`));return}let a=parseInt(n);if(isNaN(a)){this.fireError(new Error(`Content-Length value must be a number. Got ${n}`));return}this.nextMessageLength=a}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let i=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,n=await this.options.contentTypeDecoder.decode(i,this.options);this.callback(n)}).catch(i=>{this.fireError(i)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,MM.default)().timer.setTimeout((t,r)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};bh.ReadableStreamMessageReader=PM});var Eat=Be(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});kh.WriteableStreamMessageWriter=kh.AbstractMessageWriter=kh.MessageWriter=void 0;var Cat=gh(),xb=Mg(),T8t=NM(),Sat=Lf(),C8t="Content-Length: ",wat=`\r +`,_at;(function(e){function t(r){let i=r;return i&&xb.func(i.dispose)&&xb.func(i.onClose)&&xb.func(i.onError)&&xb.func(i.write)}s(t,"is"),e.is=t})(_at||(kh.MessageWriter=_at={}));var C_=class{static{s(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new Sat.Emitter,this.closeEmitter=new Sat.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,r,i){this.errorEmitter.fire([this.asError(t),r,i])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${xb.string(t.message)?t.message:"unknown"}`)}};kh.AbstractMessageWriter=C_;var $M;(function(e){function t(r){return r===void 0||typeof r=="string"?{charset:r??"utf-8",contentTypeEncoder:(0,Cat.default)().applicationJson.encoder}:{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,Cat.default)().applicationJson.encoder}}s(t,"fromOptions"),e.fromOptions=t})($M||($M={}));var FM=class extends C_{static{s(this,"WriteableStreamMessageWriter")}constructor(t,r){super(),this.writable=t,this.options=$M.fromOptions(r),this.errorCount=0,this.writeSemaphore=new T8t.Semaphore(1),this.writable.onError(i=>this.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let n=[];return n.push(C8t,i.byteLength.toString(),wat),n.push(wat),this.doWrite(t,n,i)},i=>{throw this.fireError(i),i}))}async doWrite(t,r,i){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(i)}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,r){this.errorCount++,this.fireError(t,r,this.errorCount)}end(){this.writable.end()}};kh.WriteableStreamMessageWriter=FM});var vat=Be(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});S_.AbstractMessageBuffer=void 0;var S8t=13,w8t=10,_8t=`\r +`,VM=class{static{s(this,"AbstractMessageBuffer")}constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let r=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(r),this._totalLength+=r.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let r=0,i=0,n=0,a=0;t:for(;ithis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let a=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(a)}if(this._chunks[0].byteLength>t){let a=this._chunks[0],o=this.asNative(a,t);return this._chunks[0]=a.slice(t),this._totalLength-=t,o}let r=this.allocNative(t),i=0,n=0;for(;t>0;){let a=this._chunks[n];if(a.byteLength>t){let o=a.slice(0,t);r.set(o,i),i+=t,this._chunks[n]=a.slice(t),this._totalLength-=t,t-=t}else r.set(a,i),i+=a.byteLength,this._chunks.shift(),this._totalLength-=a.byteLength,t-=a.byteLength}return r}};S_.AbstractMessageBuffer=VM});var Iat=Be(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.createMessageConnection=ir.ConnectionOptions=ir.MessageStrategy=ir.CancellationStrategy=ir.CancellationSenderStrategy=ir.CancellationReceiverStrategy=ir.RequestCancellationReceiverStrategy=ir.IdCancellationReceiverStrategy=ir.ConnectionStrategy=ir.ConnectionError=ir.ConnectionErrors=ir.LogTraceNotification=ir.SetTraceNotification=ir.TraceFormat=ir.TraceValues=ir.Trace=ir.NullLogger=ir.ProgressType=ir.ProgressToken=void 0;var Aat=gh(),Pi=Mg(),ze=_M(),Rat=vM(),bb=Lf(),zM=Jx(),Cb;(function(e){e.type=new ze.NotificationType("$/cancelRequest")})(Cb||(Cb={}));var GM;(function(e){function t(r){return typeof r=="string"||typeof r=="number"}s(t,"is"),e.is=t})(GM||(ir.ProgressToken=GM={}));var kb;(function(e){e.type=new ze.NotificationType("$/progress")})(kb||(kb={}));var WM=class{static{s(this,"ProgressType")}constructor(){}};ir.ProgressType=WM;var qM;(function(e){function t(r){return Pi.func(r)}s(t,"is"),e.is=t})(qM||(qM={}));ir.NullLogger=Object.freeze({error:s(()=>{},"error"),warn:s(()=>{},"warn"),info:s(()=>{},"info"),log:s(()=>{},"log")});var Fr;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(Fr||(ir.Trace=Fr={}));var Lat;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Lat||(ir.TraceValues=Lat={}));(function(e){function t(i){if(!Pi.string(i))return e.Off;switch(i=i.toLowerCase(),i){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}s(t,"fromString"),e.fromString=t;function r(i){switch(i){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}s(r,"toString"),e.toString=r})(Fr||(ir.Trace=Fr={}));var Ra;(function(e){e.Text="text",e.JSON="json"})(Ra||(ir.TraceFormat=Ra={}));(function(e){function t(r){return Pi.string(r)?(r=r.toLowerCase(),r==="json"?e.JSON:e.Text):e.Text}s(t,"fromString"),e.fromString=t})(Ra||(ir.TraceFormat=Ra={}));var jM;(function(e){e.type=new ze.NotificationType("$/setTrace")})(jM||(ir.SetTraceNotification=jM={}));var w_;(function(e){e.type=new ze.NotificationType("$/logTrace")})(w_||(ir.LogTraceNotification=w_={}));var Tb;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Tb||(ir.ConnectionErrors=Tb={}));var Hg=class e extends Error{static{s(this,"ConnectionError")}constructor(t,r){super(r),this.code=t,Object.setPrototypeOf(this,e.prototype)}};ir.ConnectionError=Hg;var UM;(function(e){function t(r){let i=r;return i&&Pi.func(i.cancelUndispatched)}s(t,"is"),e.is=t})(UM||(ir.ConnectionStrategy=UM={}));var __;(function(e){function t(r){let i=r;return i&&(i.kind===void 0||i.kind==="id")&&Pi.func(i.createCancellationTokenSource)&&(i.dispose===void 0||Pi.func(i.dispose))}s(t,"is"),e.is=t})(__||(ir.IdCancellationReceiverStrategy=__={}));var HM;(function(e){function t(r){let i=r;return i&&i.kind==="request"&&Pi.func(i.createCancellationTokenSource)&&(i.dispose===void 0||Pi.func(i.dispose))}s(t,"is"),e.is=t})(HM||(ir.RequestCancellationReceiverStrategy=HM={}));var E_;(function(e){e.Message=Object.freeze({createCancellationTokenSource(r){return new zM.CancellationTokenSource}});function t(r){return __.is(r)||HM.is(r)}s(t,"is"),e.is=t})(E_||(ir.CancellationReceiverStrategy=E_={}));var v_;(function(e){e.Message=Object.freeze({sendCancellation(r,i){return r.sendNotification(Cb.type,{id:i})},cleanup(r){}});function t(r){let i=r;return i&&Pi.func(i.sendCancellation)&&Pi.func(i.cleanup)}s(t,"is"),e.is=t})(v_||(ir.CancellationSenderStrategy=v_={}));var A_;(function(e){e.Message=Object.freeze({receiver:E_.Message,sender:v_.Message});function t(r){let i=r;return i&&E_.is(i.receiver)&&v_.is(i.sender)}s(t,"is"),e.is=t})(A_||(ir.CancellationStrategy=A_={}));var R_;(function(e){function t(r){let i=r;return i&&Pi.func(i.handleMessage)}s(t,"is"),e.is=t})(R_||(ir.MessageStrategy=R_={}));var Dat;(function(e){function t(r){let i=r;return i&&(A_.is(i.cancellationStrategy)||UM.is(i.connectionStrategy)||R_.is(i.messageStrategy))}s(t,"is"),e.is=t})(Dat||(ir.ConnectionOptions=Dat={}));var Zo;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Zo||(Zo={}));function E8t(e,t,r,i){let n=r!==void 0?r:ir.NullLogger,a=0,o=0,l=0,u="2.0",h,d=new Map,f,p=new Map,m=new Map,g,y=new Rat.LinkedMap,x=new Map,k=new Set,T=new Map,C=Fr.Off,_=Ra.Text,S,w=Zo.New,A=new bb.Emitter,v=new bb.Emitter,M=new bb.Emitter,$=new bb.Emitter,I=new bb.Emitter,F=i&&i.cancellationStrategy?i.cancellationStrategy:A_.Message;function B(G){if(G===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+G.toString()}s(B,"createRequestQueueKey");function O(G){return G===null?"res-unknown-"+(++l).toString():"res-"+G.toString()}s(O,"createResponseQueueKey");function R(){return"not-"+(++o).toString()}s(R,"createNotificationQueueKey");function N(G,nt){ze.Message.isRequest(nt)?G.set(B(nt.id),nt):ze.Message.isResponse(nt)?G.set(O(nt.id),nt):G.set(R(),nt)}s(N,"addMessageToQueue");function P(G){}s(P,"cancelUndispatched");function E(){return w===Zo.Listening}s(E,"isListening");function D(){return w===Zo.Closed}s(D,"isClosed");function V(){return w===Zo.Disposed}s(V,"isDisposed");function L(){(w===Zo.New||w===Zo.Listening)&&(w=Zo.Closed,v.fire(void 0))}s(L,"closeHandler");function q(G){A.fire([G,void 0,void 0])}s(q,"readErrorHandler");function H(G){A.fire(G)}s(H,"writeErrorHandler"),e.onClose(L),e.onError(q),t.onClose(L),t.onError(H);function K(){g||y.size===0||(g=(0,Aat.default)().timer.setImmediate(()=>{g=void 0,st()}))}s(K,"triggerMessageQueue");function U(G){ze.Message.isRequest(G)?ut(G):ze.Message.isNotification(G)?mt(G):ze.Message.isResponse(G)?ot(G):ht(G)}s(U,"handleMessage");function st(){if(y.size===0)return;let G=y.shift();try{let nt=i?.messageStrategy;R_.is(nt)?nt.handleMessage(G,U):U(G)}finally{K()}}s(st,"processMessageQueue");let X=s(G=>{try{if(ze.Message.isNotification(G)&&G.method===Cb.type.method){let nt=G.params.id,W=B(nt),Rt=y.get(W);if(ze.Message.isRequest(Rt)){let At=i?.connectionStrategy,xt=At&&At.cancelUndispatched?At.cancelUndispatched(Rt,P):void 0;if(xt&&(xt.error!==void 0||xt.result!==void 0)){y.delete(W),T.delete(nt),xt.id=Rt.id,yt(xt,G.method,Date.now()),t.write(xt).catch(()=>n.error("Sending response for canceled message failed."));return}}let Y=T.get(nt);if(Y!==void 0){Y.cancel(),Ct(G);return}else k.add(nt)}N(y,G)}finally{K()}},"callback");function ut(G){if(V())return;function nt(Nt,wt,he){let gt={jsonrpc:u,id:G.id};Nt instanceof ze.ResponseError?gt.error=Nt.toJson():gt.result=Nt===void 0?null:Nt,yt(gt,wt,he),t.write(gt).catch(()=>n.error("Sending response failed."))}s(nt,"reply");function W(Nt,wt,he){let gt={jsonrpc:u,id:G.id,error:Nt.toJson()};yt(gt,wt,he),t.write(gt).catch(()=>n.error("Sending response failed."))}s(W,"replyError");function Rt(Nt,wt,he){Nt===void 0&&(Nt=null);let gt={jsonrpc:u,id:G.id,result:Nt};yt(gt,wt,he),t.write(gt).catch(()=>n.error("Sending response failed."))}s(Rt,"replySuccess"),Et(G);let Y=d.get(G.method),At,xt;Y&&(At=Y.type,xt=Y.handler);let Zt=Date.now();if(xt||h){let Nt=G.id??String(Date.now()),wt=__.is(F.receiver)?F.receiver.createCancellationTokenSource(Nt):F.receiver.createCancellationTokenSource(G);G.id!==null&&k.has(G.id)&&wt.cancel(),G.id!==null&&T.set(Nt,wt);try{let he;if(xt)if(G.params===void 0){if(At!==void 0&&At.numberOfParams!==0){W(new ze.ResponseError(ze.ErrorCodes.InvalidParams,`Request ${G.method} defines ${At.numberOfParams} params but received none.`),G.method,Zt);return}he=xt(wt.token)}else if(Array.isArray(G.params)){if(At!==void 0&&At.parameterStructures===ze.ParameterStructures.byName){W(new ze.ResponseError(ze.ErrorCodes.InvalidParams,`Request ${G.method} defines parameters by name but received parameters by position`),G.method,Zt);return}he=xt(...G.params,wt.token)}else{if(At!==void 0&&At.parameterStructures===ze.ParameterStructures.byPosition){W(new ze.ResponseError(ze.ErrorCodes.InvalidParams,`Request ${G.method} defines parameters by position but received parameters by name`),G.method,Zt);return}he=xt(G.params,wt.token)}else h&&(he=h(G.method,G.params,wt.token));let gt=he;he?gt.then?gt.then(te=>{T.delete(Nt),nt(te,G.method,Zt)},te=>{T.delete(Nt),te instanceof ze.ResponseError?W(te,G.method,Zt):te&&Pi.string(te.message)?W(new ze.ResponseError(ze.ErrorCodes.InternalError,`Request ${G.method} failed with message: ${te.message}`),G.method,Zt):W(new ze.ResponseError(ze.ErrorCodes.InternalError,`Request ${G.method} failed unexpectedly without providing any details.`),G.method,Zt)}):(T.delete(Nt),nt(he,G.method,Zt)):(T.delete(Nt),Rt(he,G.method,Zt))}catch(he){T.delete(Nt),he instanceof ze.ResponseError?nt(he,G.method,Zt):he&&Pi.string(he.message)?W(new ze.ResponseError(ze.ErrorCodes.InternalError,`Request ${G.method} failed with message: ${he.message}`),G.method,Zt):W(new ze.ResponseError(ze.ErrorCodes.InternalError,`Request ${G.method} failed unexpectedly without providing any details.`),G.method,Zt)}}else W(new ze.ResponseError(ze.ErrorCodes.MethodNotFound,`Unhandled method ${G.method}`),G.method,Zt)}s(ut,"handleRequest");function ot(G){if(!V())if(G.id===null)G.error?n.error(`Received response message without id: Error is: +${JSON.stringify(G.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let nt=G.id,W=x.get(nt);if(Bt(G,W),W!==void 0){x.delete(nt);try{if(G.error){let Rt=G.error;W.reject(new ze.ResponseError(Rt.code,Rt.message,Rt.data))}else if(G.result!==void 0)W.resolve(G.result);else throw new Error("Should never happen.")}catch(Rt){Rt.message?n.error(`Response handler '${W.method}' failed with message: ${Rt.message}`):n.error(`Response handler '${W.method}' failed unexpectedly.`)}}}}s(ot,"handleResponse");function mt(G){if(V())return;let nt,W;if(G.method===Cb.type.method){let Rt=G.params.id;k.delete(Rt),Ct(G);return}else{let Rt=p.get(G.method);Rt&&(W=Rt.handler,nt=Rt.type)}if(W||f)try{if(Ct(G),W)if(G.params===void 0)nt!==void 0&&nt.numberOfParams!==0&&nt.parameterStructures!==ze.ParameterStructures.byName&&n.error(`Notification ${G.method} defines ${nt.numberOfParams} params but received none.`),W();else if(Array.isArray(G.params)){let Rt=G.params;G.method===kb.type.method&&Rt.length===2&&GM.is(Rt[0])?W({token:Rt[0],value:Rt[1]}):(nt!==void 0&&(nt.parameterStructures===ze.ParameterStructures.byName&&n.error(`Notification ${G.method} defines parameters by name but received parameters by position`),nt.numberOfParams!==G.params.length&&n.error(`Notification ${G.method} defines ${nt.numberOfParams} params but received ${Rt.length} arguments`)),W(...Rt))}else nt!==void 0&&nt.parameterStructures===ze.ParameterStructures.byPosition&&n.error(`Notification ${G.method} defines parameters by position but received parameters by name`),W(G.params);else f&&f(G.method,G.params)}catch(Rt){Rt.message?n.error(`Notification handler '${G.method}' failed with message: ${Rt.message}`):n.error(`Notification handler '${G.method}' failed unexpectedly.`)}else M.fire(G)}s(mt,"handleNotification");function ht(G){if(!G){n.error("Received empty message.");return}n.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(G,null,4)}`);let nt=G;if(Pi.string(nt.id)||Pi.number(nt.id)){let W=nt.id,Rt=x.get(W);Rt&&Rt.reject(new Error("The received response has neither a result nor an error property."))}}s(ht,"handleInvalidMessage");function it(G){if(G!=null)switch(C){case Fr.Verbose:return JSON.stringify(G,null,4);case Fr.Compact:return JSON.stringify(G);default:return}}s(it,"stringifyTrace");function Ot(G){if(!(C===Fr.Off||!S))if(_===Ra.Text){let nt;(C===Fr.Verbose||C===Fr.Compact)&&G.params&&(nt=`Params: ${it(G.params)} + +`),S.log(`Sending request '${G.method} - (${G.id})'.`,nt)}else Lt("send-request",G)}s(Ot,"traceSendingRequest");function St(G){if(!(C===Fr.Off||!S))if(_===Ra.Text){let nt;(C===Fr.Verbose||C===Fr.Compact)&&(G.params?nt=`Params: ${it(G.params)} + +`:nt=`No parameters provided. + +`),S.log(`Sending notification '${G.method}'.`,nt)}else Lt("send-notification",G)}s(St,"traceSendingNotification");function yt(G,nt,W){if(!(C===Fr.Off||!S))if(_===Ra.Text){let Rt;(C===Fr.Verbose||C===Fr.Compact)&&(G.error&&G.error.data?Rt=`Error data: ${it(G.error.data)} + +`:G.result?Rt=`Result: ${it(G.result)} + +`:G.error===void 0&&(Rt=`No result returned. + +`)),S.log(`Sending response '${nt} - (${G.id})'. Processing request took ${Date.now()-W}ms`,Rt)}else Lt("send-response",G)}s(yt,"traceSendingResponse");function Et(G){if(!(C===Fr.Off||!S))if(_===Ra.Text){let nt;(C===Fr.Verbose||C===Fr.Compact)&&G.params&&(nt=`Params: ${it(G.params)} + +`),S.log(`Received request '${G.method} - (${G.id})'.`,nt)}else Lt("receive-request",G)}s(Et,"traceReceivedRequest");function Ct(G){if(!(C===Fr.Off||!S||G.method===w_.type.method))if(_===Ra.Text){let nt;(C===Fr.Verbose||C===Fr.Compact)&&(G.params?nt=`Params: ${it(G.params)} + +`:nt=`No parameters provided. + +`),S.log(`Received notification '${G.method}'.`,nt)}else Lt("receive-notification",G)}s(Ct,"traceReceivedNotification");function Bt(G,nt){if(!(C===Fr.Off||!S))if(_===Ra.Text){let W;if((C===Fr.Verbose||C===Fr.Compact)&&(G.error&&G.error.data?W=`Error data: ${it(G.error.data)} + +`:G.result?W=`Result: ${it(G.result)} + +`:G.error===void 0&&(W=`No result returned. + +`)),nt){let Rt=G.error?` Request failed: ${G.error.message} (${G.error.code}).`:"";S.log(`Received response '${nt.method} - (${G.id})' in ${Date.now()-nt.timerStart}ms.${Rt}`,W)}else S.log(`Received response ${G.id} without active response promise.`,W)}else Lt("receive-response",G)}s(Bt,"traceReceivedResponse");function Lt(G,nt){if(!S||C===Fr.Off)return;let W={isLSPMessage:!0,type:G,message:nt,timestamp:Date.now()};S.log(W)}s(Lt,"logLSPMessage");function ee(){if(D())throw new Hg(Tb.Closed,"Connection is closed.");if(V())throw new Hg(Tb.Disposed,"Connection is disposed.")}s(ee,"throwIfClosedOrDisposed");function at(){if(E())throw new Hg(Tb.AlreadyListening,"Connection is already listening")}s(at,"throwIfListening");function $e(){if(!E())throw new Error("Call listen() first.")}s($e,"throwIfNotListening");function pt(G){return G===void 0?null:G}s(pt,"undefinedToNull");function Wt(G){if(G!==null)return G}s(Wt,"nullToUndefined");function Ht(G){return G!=null&&!Array.isArray(G)&&typeof G=="object"}s(Ht,"isNamedParam");function Dt(G,nt){switch(G){case ze.ParameterStructures.auto:return Ht(nt)?Wt(nt):[pt(nt)];case ze.ParameterStructures.byName:if(!Ht(nt))throw new Error("Received parameters by name but param is not an object literal.");return Wt(nt);case ze.ParameterStructures.byPosition:return[pt(nt)];default:throw new Error(`Unknown parameter structure ${G.toString()}`)}}s(Dt,"computeSingleParam");function bt(G,nt){let W,Rt=G.numberOfParams;switch(Rt){case 0:W=void 0;break;case 1:W=Dt(G.parameterStructures,nt[0]);break;default:W=[];for(let Y=0;Y{ee();let W,Rt;if(Pi.string(G)){W=G;let At=nt[0],xt=0,Zt=ze.ParameterStructures.auto;ze.ParameterStructures.is(At)&&(xt=1,Zt=At);let Nt=nt.length,wt=Nt-xt;switch(wt){case 0:Rt=void 0;break;case 1:Rt=Dt(Zt,nt[xt]);break;default:if(Zt===ze.ParameterStructures.byName)throw new Error(`Received ${wt} parameters for 'by Name' notification parameter structure.`);Rt=nt.slice(xt,Nt).map(he=>pt(he));break}}else{let At=nt;W=G.method,Rt=bt(G,At)}let Y={jsonrpc:u,method:W,params:Rt};return St(Y),t.write(Y).catch(At=>{throw n.error("Sending notification failed."),At})},"sendNotification"),onNotification:s((G,nt)=>{ee();let W;return Pi.func(G)?f=G:nt&&(Pi.string(G)?(W=G,p.set(G,{type:void 0,handler:nt})):(W=G.method,p.set(G.method,{type:G,handler:nt}))),{dispose:s(()=>{W!==void 0?p.delete(W):f=void 0},"dispose")}},"onNotification"),onProgress:s((G,nt,W)=>{if(m.has(nt))throw new Error(`Progress handler for token ${nt} already registered`);return m.set(nt,W),{dispose:s(()=>{m.delete(nt)},"dispose")}},"onProgress"),sendProgress:s((G,nt,W)=>Gt.sendNotification(kb.type,{token:nt,value:W}),"sendProgress"),onUnhandledProgress:$.event,sendRequest:s((G,...nt)=>{ee(),$e();let W,Rt,Y;if(Pi.string(G)){W=G;let Nt=nt[0],wt=nt[nt.length-1],he=0,gt=ze.ParameterStructures.auto;ze.ParameterStructures.is(Nt)&&(he=1,gt=Nt);let te=nt.length;zM.CancellationToken.is(wt)&&(te=te-1,Y=wt);let ne=te-he;switch(ne){case 0:Rt=void 0;break;case 1:Rt=Dt(gt,nt[he]);break;default:if(gt===ze.ParameterStructures.byName)throw new Error(`Received ${ne} parameters for 'by Name' request parameter structure.`);Rt=nt.slice(he,te).map(It=>pt(It));break}}else{let Nt=nt;W=G.method,Rt=bt(G,Nt);let wt=G.numberOfParams;Y=zM.CancellationToken.is(Nt[wt])?Nt[wt]:void 0}let At=a++,xt;Y&&(xt=Y.onCancellationRequested(()=>{let Nt=F.sender.sendCancellation(Gt,At);return Nt===void 0?(n.log(`Received no promise from cancellation strategy when cancelling id ${At}`),Promise.resolve()):Nt.catch(()=>{n.log(`Sending cancellation messages for id ${At} failed`)})}));let Zt={jsonrpc:u,id:At,method:W,params:Rt};return Ot(Zt),typeof F.sender.enableCancellation=="function"&&F.sender.enableCancellation(Zt),new Promise(async(Nt,wt)=>{let he=s(ne=>{Nt(ne),F.sender.cleanup(At),xt?.dispose()},"resolveWithCleanup"),gt=s(ne=>{wt(ne),F.sender.cleanup(At),xt?.dispose()},"rejectWithCleanup"),te={method:W,timerStart:Date.now(),resolve:he,reject:gt};try{await t.write(Zt),x.set(At,te)}catch(ne){throw n.error("Sending request failed."),te.reject(new ze.ResponseError(ze.ErrorCodes.MessageWriteError,ne.message?ne.message:"Unknown reason")),ne}})},"sendRequest"),onRequest:s((G,nt)=>{ee();let W=null;return qM.is(G)?(W=void 0,h=G):Pi.string(G)?(W=null,nt!==void 0&&(W=G,d.set(G,{handler:nt,type:void 0}))):nt!==void 0&&(W=G.method,d.set(G.method,{type:G,handler:nt})),{dispose:s(()=>{W!==null&&(W!==void 0?d.delete(W):h=void 0)},"dispose")}},"onRequest"),hasPendingResponse:s(()=>x.size>0,"hasPendingResponse"),trace:s(async(G,nt,W)=>{let Rt=!1,Y=Ra.Text;W!==void 0&&(Pi.boolean(W)?Rt=W:(Rt=W.sendNotification||!1,Y=W.traceFormat||Ra.Text)),C=G,_=Y,C===Fr.Off?S=void 0:S=nt,Rt&&!D()&&!V()&&await Gt.sendNotification(jM.type,{value:Fr.toString(G)})},"trace"),onError:A.event,onClose:v.event,onUnhandledNotification:M.event,onDispose:I.event,end:s(()=>{t.end()},"end"),dispose:s(()=>{if(V())return;w=Zo.Disposed,I.fire(void 0);let G=new ze.ResponseError(ze.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let nt of x.values())nt.reject(G);x=new Map,T=new Map,k=new Set,y=new Rat.LinkedMap,Pi.func(t.dispose)&&t.dispose(),Pi.func(e.dispose)&&e.dispose()},"dispose"),listen:s(()=>{ee(),at(),w=Zo.Listening,e.listen(X)},"listen"),inspect:s(()=>{(0,Aat.default)().console.log("inspect")},"inspect")};return Gt.onNotification(w_.type,G=>{if(C===Fr.Off||!S)return;let nt=C===Fr.Verbose||C===Fr.Compact;S.log(G.message,nt?G.verbose:void 0)}),Gt.onNotification(kb.type,G=>{let nt=m.get(G.token);nt?nt(G.value):$.fire(G)}),Gt}s(E8t,"createMessageConnection");ir.createMessageConnection=E8t});var L_=Be(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.ProgressType=Ft.ProgressToken=Ft.createMessageConnection=Ft.NullLogger=Ft.ConnectionOptions=Ft.ConnectionStrategy=Ft.AbstractMessageBuffer=Ft.WriteableStreamMessageWriter=Ft.AbstractMessageWriter=Ft.MessageWriter=Ft.ReadableStreamMessageReader=Ft.AbstractMessageReader=Ft.MessageReader=Ft.SharedArrayReceiverStrategy=Ft.SharedArraySenderStrategy=Ft.CancellationToken=Ft.CancellationTokenSource=Ft.Emitter=Ft.Event=Ft.Disposable=Ft.LRUCache=Ft.Touch=Ft.LinkedMap=Ft.ParameterStructures=Ft.NotificationType9=Ft.NotificationType8=Ft.NotificationType7=Ft.NotificationType6=Ft.NotificationType5=Ft.NotificationType4=Ft.NotificationType3=Ft.NotificationType2=Ft.NotificationType1=Ft.NotificationType0=Ft.NotificationType=Ft.ErrorCodes=Ft.ResponseError=Ft.RequestType9=Ft.RequestType8=Ft.RequestType7=Ft.RequestType6=Ft.RequestType5=Ft.RequestType4=Ft.RequestType3=Ft.RequestType2=Ft.RequestType1=Ft.RequestType0=Ft.RequestType=Ft.Message=Ft.RAL=void 0;Ft.MessageStrategy=Ft.CancellationStrategy=Ft.CancellationSenderStrategy=Ft.CancellationReceiverStrategy=Ft.ConnectionError=Ft.ConnectionErrors=Ft.LogTraceNotification=Ft.SetTraceNotification=Ft.TraceFormat=Ft.TraceValues=Ft.Trace=void 0;var fi=_M();Object.defineProperty(Ft,"Message",{enumerable:!0,get:s(function(){return fi.Message},"get")});Object.defineProperty(Ft,"RequestType",{enumerable:!0,get:s(function(){return fi.RequestType},"get")});Object.defineProperty(Ft,"RequestType0",{enumerable:!0,get:s(function(){return fi.RequestType0},"get")});Object.defineProperty(Ft,"RequestType1",{enumerable:!0,get:s(function(){return fi.RequestType1},"get")});Object.defineProperty(Ft,"RequestType2",{enumerable:!0,get:s(function(){return fi.RequestType2},"get")});Object.defineProperty(Ft,"RequestType3",{enumerable:!0,get:s(function(){return fi.RequestType3},"get")});Object.defineProperty(Ft,"RequestType4",{enumerable:!0,get:s(function(){return fi.RequestType4},"get")});Object.defineProperty(Ft,"RequestType5",{enumerable:!0,get:s(function(){return fi.RequestType5},"get")});Object.defineProperty(Ft,"RequestType6",{enumerable:!0,get:s(function(){return fi.RequestType6},"get")});Object.defineProperty(Ft,"RequestType7",{enumerable:!0,get:s(function(){return fi.RequestType7},"get")});Object.defineProperty(Ft,"RequestType8",{enumerable:!0,get:s(function(){return fi.RequestType8},"get")});Object.defineProperty(Ft,"RequestType9",{enumerable:!0,get:s(function(){return fi.RequestType9},"get")});Object.defineProperty(Ft,"ResponseError",{enumerable:!0,get:s(function(){return fi.ResponseError},"get")});Object.defineProperty(Ft,"ErrorCodes",{enumerable:!0,get:s(function(){return fi.ErrorCodes},"get")});Object.defineProperty(Ft,"NotificationType",{enumerable:!0,get:s(function(){return fi.NotificationType},"get")});Object.defineProperty(Ft,"NotificationType0",{enumerable:!0,get:s(function(){return fi.NotificationType0},"get")});Object.defineProperty(Ft,"NotificationType1",{enumerable:!0,get:s(function(){return fi.NotificationType1},"get")});Object.defineProperty(Ft,"NotificationType2",{enumerable:!0,get:s(function(){return fi.NotificationType2},"get")});Object.defineProperty(Ft,"NotificationType3",{enumerable:!0,get:s(function(){return fi.NotificationType3},"get")});Object.defineProperty(Ft,"NotificationType4",{enumerable:!0,get:s(function(){return fi.NotificationType4},"get")});Object.defineProperty(Ft,"NotificationType5",{enumerable:!0,get:s(function(){return fi.NotificationType5},"get")});Object.defineProperty(Ft,"NotificationType6",{enumerable:!0,get:s(function(){return fi.NotificationType6},"get")});Object.defineProperty(Ft,"NotificationType7",{enumerable:!0,get:s(function(){return fi.NotificationType7},"get")});Object.defineProperty(Ft,"NotificationType8",{enumerable:!0,get:s(function(){return fi.NotificationType8},"get")});Object.defineProperty(Ft,"NotificationType9",{enumerable:!0,get:s(function(){return fi.NotificationType9},"get")});Object.defineProperty(Ft,"ParameterStructures",{enumerable:!0,get:s(function(){return fi.ParameterStructures},"get")});var YM=vM();Object.defineProperty(Ft,"LinkedMap",{enumerable:!0,get:s(function(){return YM.LinkedMap},"get")});Object.defineProperty(Ft,"LRUCache",{enumerable:!0,get:s(function(){return YM.LRUCache},"get")});Object.defineProperty(Ft,"Touch",{enumerable:!0,get:s(function(){return YM.Touch},"get")});var v8t=xat();Object.defineProperty(Ft,"Disposable",{enumerable:!0,get:s(function(){return v8t.Disposable},"get")});var Nat=Lf();Object.defineProperty(Ft,"Event",{enumerable:!0,get:s(function(){return Nat.Event},"get")});Object.defineProperty(Ft,"Emitter",{enumerable:!0,get:s(function(){return Nat.Emitter},"get")});var Oat=Jx();Object.defineProperty(Ft,"CancellationTokenSource",{enumerable:!0,get:s(function(){return Oat.CancellationTokenSource},"get")});Object.defineProperty(Ft,"CancellationToken",{enumerable:!0,get:s(function(){return Oat.CancellationToken},"get")});var Mat=bat();Object.defineProperty(Ft,"SharedArraySenderStrategy",{enumerable:!0,get:s(function(){return Mat.SharedArraySenderStrategy},"get")});Object.defineProperty(Ft,"SharedArrayReceiverStrategy",{enumerable:!0,get:s(function(){return Mat.SharedArrayReceiverStrategy},"get")});var XM=Tat();Object.defineProperty(Ft,"MessageReader",{enumerable:!0,get:s(function(){return XM.MessageReader},"get")});Object.defineProperty(Ft,"AbstractMessageReader",{enumerable:!0,get:s(function(){return XM.AbstractMessageReader},"get")});Object.defineProperty(Ft,"ReadableStreamMessageReader",{enumerable:!0,get:s(function(){return XM.ReadableStreamMessageReader},"get")});var KM=Eat();Object.defineProperty(Ft,"MessageWriter",{enumerable:!0,get:s(function(){return KM.MessageWriter},"get")});Object.defineProperty(Ft,"AbstractMessageWriter",{enumerable:!0,get:s(function(){return KM.AbstractMessageWriter},"get")});Object.defineProperty(Ft,"WriteableStreamMessageWriter",{enumerable:!0,get:s(function(){return KM.WriteableStreamMessageWriter},"get")});var A8t=vat();Object.defineProperty(Ft,"AbstractMessageBuffer",{enumerable:!0,get:s(function(){return A8t.AbstractMessageBuffer},"get")});var Un=Iat();Object.defineProperty(Ft,"ConnectionStrategy",{enumerable:!0,get:s(function(){return Un.ConnectionStrategy},"get")});Object.defineProperty(Ft,"ConnectionOptions",{enumerable:!0,get:s(function(){return Un.ConnectionOptions},"get")});Object.defineProperty(Ft,"NullLogger",{enumerable:!0,get:s(function(){return Un.NullLogger},"get")});Object.defineProperty(Ft,"createMessageConnection",{enumerable:!0,get:s(function(){return Un.createMessageConnection},"get")});Object.defineProperty(Ft,"ProgressToken",{enumerable:!0,get:s(function(){return Un.ProgressToken},"get")});Object.defineProperty(Ft,"ProgressType",{enumerable:!0,get:s(function(){return Un.ProgressType},"get")});Object.defineProperty(Ft,"Trace",{enumerable:!0,get:s(function(){return Un.Trace},"get")});Object.defineProperty(Ft,"TraceValues",{enumerable:!0,get:s(function(){return Un.TraceValues},"get")});Object.defineProperty(Ft,"TraceFormat",{enumerable:!0,get:s(function(){return Un.TraceFormat},"get")});Object.defineProperty(Ft,"SetTraceNotification",{enumerable:!0,get:s(function(){return Un.SetTraceNotification},"get")});Object.defineProperty(Ft,"LogTraceNotification",{enumerable:!0,get:s(function(){return Un.LogTraceNotification},"get")});Object.defineProperty(Ft,"ConnectionErrors",{enumerable:!0,get:s(function(){return Un.ConnectionErrors},"get")});Object.defineProperty(Ft,"ConnectionError",{enumerable:!0,get:s(function(){return Un.ConnectionError},"get")});Object.defineProperty(Ft,"CancellationReceiverStrategy",{enumerable:!0,get:s(function(){return Un.CancellationReceiverStrategy},"get")});Object.defineProperty(Ft,"CancellationSenderStrategy",{enumerable:!0,get:s(function(){return Un.CancellationSenderStrategy},"get")});Object.defineProperty(Ft,"CancellationStrategy",{enumerable:!0,get:s(function(){return Un.CancellationStrategy},"get")});Object.defineProperty(Ft,"MessageStrategy",{enumerable:!0,get:s(function(){return Un.MessageStrategy},"get")});var R8t=gh();Ft.RAL=R8t.default});var Pat=Be(tB=>{"use strict";Object.defineProperty(tB,"__esModule",{value:!0});var Yl=L_(),D_=class e extends Yl.AbstractMessageBuffer{static{s(this,"MessageBuffer")}constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(t,r){return new TextEncoder().encode(t)}toString(t,r){return r==="ascii"?this.asciiDecoder.decode(t):new TextDecoder(r).decode(t)}asNative(t,r){return r===void 0?t:t.slice(0,r)}allocNative(t){return new Uint8Array(t)}};D_.emptyBuffer=new Uint8Array(0);var QM=class{static{s(this,"ReadableStreamWrapper")}constructor(t){this.socket=t,this._onData=new Yl.Emitter,this._messageListener=r=>{r.data.arrayBuffer().then(n=>{this._onData.fire(new Uint8Array(n))},()=>{(0,Yl.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),Yl.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),Yl.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),Yl.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},ZM=class{static{s(this,"WritableStreamWrapper")}constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),Yl.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),Yl.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),Yl.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,r){if(typeof t=="string"){if(r!==void 0&&r!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${r}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}},L8t=new TextEncoder,Bat=Object.freeze({messageBuffer:Object.freeze({create:s(e=>new D_(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:s((e,t)=>{if(t.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(L8t.encode(JSON.stringify(e,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:s((e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},"decode")})}),stream:Object.freeze({asReadableStream:s(e=>new QM(e),"asReadableStream"),asWritableStream:s(e=>new ZM(e),"asWritableStream")}),console,timer:Object.freeze({setTimeout(e,t,...r){let i=setTimeout(e,t,...r);return{dispose:s(()=>clearTimeout(i),"dispose")}},setImmediate(e,...t){let r=setTimeout(e,0,...t);return{dispose:s(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){let i=setInterval(e,t,...r);return{dispose:s(()=>clearInterval(i),"dispose")}}})});function JM(){return Bat}s(JM,"RIL");(function(e){function t(){Yl.RAL.install(Bat)}s(t,"install"),e.install=t})(JM||(JM={}));tB.default=JM});var Bf=Be(La=>{"use strict";var D8t=La&&La.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),I8t=La&&La.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&D8t(t,e,r)};Object.defineProperty(La,"__esModule",{value:!0});La.createMessageConnection=La.BrowserMessageWriter=La.BrowserMessageReader=void 0;var N8t=Pat();N8t.default.install();var Yg=L_();I8t(L_(),La);var eB=class extends Yg.AbstractMessageReader{static{s(this,"BrowserMessageReader")}constructor(t){super(),this._onData=new Yg.Emitter,this._messageListener=r=>{this._onData.fire(r.data)},t.addEventListener("error",r=>this.fireError(r)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}};La.BrowserMessageReader=eB;var rB=class extends Yg.AbstractMessageWriter{static{s(this,"BrowserMessageWriter")}constructor(t){super(),this.port=t,this.errorCount=0,t.addEventListener("error",r=>this.fireError(r))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(r){return this.handleError(r,t),Promise.reject(r)}}handleError(t,r){this.errorCount++,this.fireError(t,r,this.errorCount)}end(){}};La.BrowserMessageWriter=rB;function O8t(e,t,r,i){return r===void 0&&(r=Yg.NullLogger),Yg.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,Yg.createMessageConnection)(e,t,r,i)}s(O8t,"createMessageConnection");La.createMessageConnection=O8t});var iB=Be((fQe,$at)=>{"use strict";$at.exports=Bf()});var Di=Be(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.ProtocolNotificationType=ia.ProtocolNotificationType0=ia.ProtocolRequestType=ia.ProtocolRequestType0=ia.RegistrationType=ia.MessageDirection=void 0;var Xg=Bf(),Fat;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Fat||(ia.MessageDirection=Fat={}));var nB=class{static{s(this,"RegistrationType")}constructor(t){this.method=t}};ia.RegistrationType=nB;var sB=class extends Xg.RequestType0{static{s(this,"ProtocolRequestType0")}constructor(t){super(t)}};ia.ProtocolRequestType0=sB;var aB=class extends Xg.RequestType{static{s(this,"ProtocolRequestType")}constructor(t){super(t,Xg.ParameterStructures.byName)}};ia.ProtocolRequestType=aB;var oB=class extends Xg.NotificationType0{static{s(this,"ProtocolNotificationType0")}constructor(t){super(t)}};ia.ProtocolNotificationType0=oB;var lB=class extends Xg.NotificationType{static{s(this,"ProtocolNotificationType")}constructor(t){super(t,Xg.ParameterStructures.byName)}};ia.ProtocolNotificationType=lB});var I_=Be(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.objectLiteral=sn.typedArray=sn.stringArray=sn.array=sn.func=sn.error=sn.number=sn.string=sn.boolean=void 0;function M8t(e){return e===!0||e===!1}s(M8t,"boolean");sn.boolean=M8t;function Vat(e){return typeof e=="string"||e instanceof String}s(Vat,"string");sn.string=Vat;function B8t(e){return typeof e=="number"||e instanceof Number}s(B8t,"number");sn.number=B8t;function P8t(e){return e instanceof Error}s(P8t,"error");sn.error=P8t;function $8t(e){return typeof e=="function"}s($8t,"func");sn.func=$8t;function zat(e){return Array.isArray(e)}s(zat,"array");sn.array=zat;function F8t(e){return zat(e)&&e.every(t=>Vat(t))}s(F8t,"stringArray");sn.stringArray=F8t;function V8t(e,t){return Array.isArray(e)&&e.every(t)}s(V8t,"typedArray");sn.typedArray=V8t;function z8t(e){return e!==null&&typeof e=="object"}s(z8t,"objectLiteral");sn.objectLiteral=z8t});var qat=Be(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.ImplementationRequest=void 0;var Gat=Di(),Wat;(function(e){e.method="textDocument/implementation",e.messageDirection=Gat.MessageDirection.clientToServer,e.type=new Gat.ProtocolRequestType(e.method)})(Wat||(N_.ImplementationRequest=Wat={}))});var Hat=Be(O_=>{"use strict";Object.defineProperty(O_,"__esModule",{value:!0});O_.TypeDefinitionRequest=void 0;var jat=Di(),Uat;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=jat.MessageDirection.clientToServer,e.type=new jat.ProtocolRequestType(e.method)})(Uat||(O_.TypeDefinitionRequest=Uat={}))});var Kat=Be(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});Kg.DidChangeWorkspaceFoldersNotification=Kg.WorkspaceFoldersRequest=void 0;var M_=Di(),Yat;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=M_.MessageDirection.serverToClient,e.type=new M_.ProtocolRequestType0(e.method)})(Yat||(Kg.WorkspaceFoldersRequest=Yat={}));var Xat;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=M_.MessageDirection.clientToServer,e.type=new M_.ProtocolNotificationType(e.method)})(Xat||(Kg.DidChangeWorkspaceFoldersNotification=Xat={}))});var Jat=Be(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});B_.ConfigurationRequest=void 0;var Qat=Di(),Zat;(function(e){e.method="workspace/configuration",e.messageDirection=Qat.MessageDirection.serverToClient,e.type=new Qat.ProtocolRequestType(e.method)})(Zat||(B_.ConfigurationRequest=Zat={}))});var rot=Be(Qg=>{"use strict";Object.defineProperty(Qg,"__esModule",{value:!0});Qg.ColorPresentationRequest=Qg.DocumentColorRequest=void 0;var P_=Di(),tot;(function(e){e.method="textDocument/documentColor",e.messageDirection=P_.MessageDirection.clientToServer,e.type=new P_.ProtocolRequestType(e.method)})(tot||(Qg.DocumentColorRequest=tot={}));var eot;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=P_.MessageDirection.clientToServer,e.type=new P_.ProtocolRequestType(e.method)})(eot||(Qg.ColorPresentationRequest=eot={}))});var sot=Be(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});Zg.FoldingRangeRefreshRequest=Zg.FoldingRangeRequest=void 0;var $_=Di(),iot;(function(e){e.method="textDocument/foldingRange",e.messageDirection=$_.MessageDirection.clientToServer,e.type=new $_.ProtocolRequestType(e.method)})(iot||(Zg.FoldingRangeRequest=iot={}));var not;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=$_.MessageDirection.serverToClient,e.type=new $_.ProtocolRequestType0(e.method)})(not||(Zg.FoldingRangeRefreshRequest=not={}))});var lot=Be(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});F_.DeclarationRequest=void 0;var aot=Di(),oot;(function(e){e.method="textDocument/declaration",e.messageDirection=aot.MessageDirection.clientToServer,e.type=new aot.ProtocolRequestType(e.method)})(oot||(F_.DeclarationRequest=oot={}))});var hot=Be(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});V_.SelectionRangeRequest=void 0;var cot=Di(),uot;(function(e){e.method="textDocument/selectionRange",e.messageDirection=cot.MessageDirection.clientToServer,e.type=new cot.ProtocolRequestType(e.method)})(uot||(V_.SelectionRangeRequest=uot={}))});var mot=Be(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.WorkDoneProgressCancelNotification=Th.WorkDoneProgressCreateRequest=Th.WorkDoneProgress=void 0;var G8t=Bf(),z_=Di(),dot;(function(e){e.type=new G8t.ProgressType;function t(r){return r===e.type}s(t,"is"),e.is=t})(dot||(Th.WorkDoneProgress=dot={}));var fot;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=z_.MessageDirection.serverToClient,e.type=new z_.ProtocolRequestType(e.method)})(fot||(Th.WorkDoneProgressCreateRequest=fot={}));var pot;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=z_.MessageDirection.clientToServer,e.type=new z_.ProtocolNotificationType(e.method)})(pot||(Th.WorkDoneProgressCancelNotification=pot={}))});var bot=Be(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});Ch.CallHierarchyOutgoingCallsRequest=Ch.CallHierarchyIncomingCallsRequest=Ch.CallHierarchyPrepareRequest=void 0;var Jg=Di(),got;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Jg.MessageDirection.clientToServer,e.type=new Jg.ProtocolRequestType(e.method)})(got||(Ch.CallHierarchyPrepareRequest=got={}));var yot;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Jg.MessageDirection.clientToServer,e.type=new Jg.ProtocolRequestType(e.method)})(yot||(Ch.CallHierarchyIncomingCallsRequest=yot={}));var xot;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Jg.MessageDirection.clientToServer,e.type=new Jg.ProtocolRequestType(e.method)})(xot||(Ch.CallHierarchyOutgoingCallsRequest=xot={}))});var _ot=Be(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.SemanticTokensRefreshRequest=na.SemanticTokensRangeRequest=na.SemanticTokensDeltaRequest=na.SemanticTokensRequest=na.SemanticTokensRegistrationType=na.TokenFormat=void 0;var Hc=Di(),kot;(function(e){e.Relative="relative"})(kot||(na.TokenFormat=kot={}));var Sb;(function(e){e.method="textDocument/semanticTokens",e.type=new Hc.RegistrationType(e.method)})(Sb||(na.SemanticTokensRegistrationType=Sb={}));var Tot;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Hc.MessageDirection.clientToServer,e.type=new Hc.ProtocolRequestType(e.method),e.registrationMethod=Sb.method})(Tot||(na.SemanticTokensRequest=Tot={}));var Cot;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Hc.MessageDirection.clientToServer,e.type=new Hc.ProtocolRequestType(e.method),e.registrationMethod=Sb.method})(Cot||(na.SemanticTokensDeltaRequest=Cot={}));var Sot;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Hc.MessageDirection.clientToServer,e.type=new Hc.ProtocolRequestType(e.method),e.registrationMethod=Sb.method})(Sot||(na.SemanticTokensRangeRequest=Sot={}));var wot;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Hc.MessageDirection.serverToClient,e.type=new Hc.ProtocolRequestType0(e.method)})(wot||(na.SemanticTokensRefreshRequest=wot={}))});var Aot=Be(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});G_.ShowDocumentRequest=void 0;var Eot=Di(),vot;(function(e){e.method="window/showDocument",e.messageDirection=Eot.MessageDirection.serverToClient,e.type=new Eot.ProtocolRequestType(e.method)})(vot||(G_.ShowDocumentRequest=vot={}))});var Dot=Be(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});W_.LinkedEditingRangeRequest=void 0;var Rot=Di(),Lot;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Rot.MessageDirection.clientToServer,e.type=new Rot.ProtocolRequestType(e.method)})(Lot||(W_.LinkedEditingRangeRequest=Lot={}))});var Fot=Be(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.WillDeleteFilesRequest=cs.DidDeleteFilesNotification=cs.DidRenameFilesNotification=cs.WillRenameFilesRequest=cs.DidCreateFilesNotification=cs.WillCreateFilesRequest=cs.FileOperationPatternKind=void 0;var lo=Di(),Iot;(function(e){e.file="file",e.folder="folder"})(Iot||(cs.FileOperationPatternKind=Iot={}));var Not;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=lo.MessageDirection.clientToServer,e.type=new lo.ProtocolRequestType(e.method)})(Not||(cs.WillCreateFilesRequest=Not={}));var Oot;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=lo.MessageDirection.clientToServer,e.type=new lo.ProtocolNotificationType(e.method)})(Oot||(cs.DidCreateFilesNotification=Oot={}));var Mot;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=lo.MessageDirection.clientToServer,e.type=new lo.ProtocolRequestType(e.method)})(Mot||(cs.WillRenameFilesRequest=Mot={}));var Bot;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=lo.MessageDirection.clientToServer,e.type=new lo.ProtocolNotificationType(e.method)})(Bot||(cs.DidRenameFilesNotification=Bot={}));var Pot;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=lo.MessageDirection.clientToServer,e.type=new lo.ProtocolNotificationType(e.method)})(Pot||(cs.DidDeleteFilesNotification=Pot={}));var $ot;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=lo.MessageDirection.clientToServer,e.type=new lo.ProtocolRequestType(e.method)})($ot||(cs.WillDeleteFilesRequest=$ot={}))});var qot=Be(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});Sh.MonikerRequest=Sh.MonikerKind=Sh.UniquenessLevel=void 0;var Vot=Di(),zot;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(zot||(Sh.UniquenessLevel=zot={}));var Got;(function(e){e.$import="import",e.$export="export",e.local="local"})(Got||(Sh.MonikerKind=Got={}));var Wot;(function(e){e.method="textDocument/moniker",e.messageDirection=Vot.MessageDirection.clientToServer,e.type=new Vot.ProtocolRequestType(e.method)})(Wot||(Sh.MonikerRequest=Wot={}))});var Yot=Be(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});wh.TypeHierarchySubtypesRequest=wh.TypeHierarchySupertypesRequest=wh.TypeHierarchyPrepareRequest=void 0;var ty=Di(),jot;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=ty.MessageDirection.clientToServer,e.type=new ty.ProtocolRequestType(e.method)})(jot||(wh.TypeHierarchyPrepareRequest=jot={}));var Uot;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=ty.MessageDirection.clientToServer,e.type=new ty.ProtocolRequestType(e.method)})(Uot||(wh.TypeHierarchySupertypesRequest=Uot={}));var Hot;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=ty.MessageDirection.clientToServer,e.type=new ty.ProtocolRequestType(e.method)})(Hot||(wh.TypeHierarchySubtypesRequest=Hot={}))});var Qot=Be(ey=>{"use strict";Object.defineProperty(ey,"__esModule",{value:!0});ey.InlineValueRefreshRequest=ey.InlineValueRequest=void 0;var q_=Di(),Xot;(function(e){e.method="textDocument/inlineValue",e.messageDirection=q_.MessageDirection.clientToServer,e.type=new q_.ProtocolRequestType(e.method)})(Xot||(ey.InlineValueRequest=Xot={}));var Kot;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=q_.MessageDirection.serverToClient,e.type=new q_.ProtocolRequestType0(e.method)})(Kot||(ey.InlineValueRefreshRequest=Kot={}))});var elt=Be(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});_h.InlayHintRefreshRequest=_h.InlayHintResolveRequest=_h.InlayHintRequest=void 0;var ry=Di(),Zot;(function(e){e.method="textDocument/inlayHint",e.messageDirection=ry.MessageDirection.clientToServer,e.type=new ry.ProtocolRequestType(e.method)})(Zot||(_h.InlayHintRequest=Zot={}));var Jot;(function(e){e.method="inlayHint/resolve",e.messageDirection=ry.MessageDirection.clientToServer,e.type=new ry.ProtocolRequestType(e.method)})(Jot||(_h.InlayHintResolveRequest=Jot={}));var tlt;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=ry.MessageDirection.serverToClient,e.type=new ry.ProtocolRequestType0(e.method)})(tlt||(_h.InlayHintRefreshRequest=tlt={}))});var llt=Be(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.DiagnosticRefreshRequest=co.WorkspaceDiagnosticRequest=co.DocumentDiagnosticRequest=co.DocumentDiagnosticReportKind=co.DiagnosticServerCancellationData=void 0;var olt=Bf(),W8t=I_(),iy=Di(),rlt;(function(e){function t(r){let i=r;return i&&W8t.boolean(i.retriggerRequest)}s(t,"is"),e.is=t})(rlt||(co.DiagnosticServerCancellationData=rlt={}));var ilt;(function(e){e.Full="full",e.Unchanged="unchanged"})(ilt||(co.DocumentDiagnosticReportKind=ilt={}));var nlt;(function(e){e.method="textDocument/diagnostic",e.messageDirection=iy.MessageDirection.clientToServer,e.type=new iy.ProtocolRequestType(e.method),e.partialResult=new olt.ProgressType})(nlt||(co.DocumentDiagnosticRequest=nlt={}));var slt;(function(e){e.method="workspace/diagnostic",e.messageDirection=iy.MessageDirection.clientToServer,e.type=new iy.ProtocolRequestType(e.method),e.partialResult=new olt.ProgressType})(slt||(co.WorkspaceDiagnosticRequest=slt={}));var alt;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=iy.MessageDirection.serverToClient,e.type=new iy.ProtocolRequestType0(e.method)})(alt||(co.DiagnosticRefreshRequest=alt={}))});var mlt=Be(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.DidCloseNotebookDocumentNotification=Wi.DidSaveNotebookDocumentNotification=Wi.DidChangeNotebookDocumentNotification=Wi.NotebookCellArrayChange=Wi.DidOpenNotebookDocumentNotification=Wi.NotebookDocumentSyncRegistrationType=Wi.NotebookDocument=Wi.NotebookCell=Wi.ExecutionSummary=Wi.NotebookCellKind=void 0;var wb=(Ig(),b2(Qw)),Jo=I_(),Xl=Di(),cB;(function(e){e.Markup=1,e.Code=2;function t(r){return r===1||r===2}s(t,"is"),e.is=t})(cB||(Wi.NotebookCellKind=cB={}));var uB;(function(e){function t(n,a){let o={executionOrder:n};return(a===!0||a===!1)&&(o.success=a),o}s(t,"create"),e.create=t;function r(n){let a=n;return Jo.objectLiteral(a)&&wb.uinteger.is(a.executionOrder)&&(a.success===void 0||Jo.boolean(a.success))}s(r,"is"),e.is=r;function i(n,a){return n===a?!0:n==null||a===null||a===void 0?!1:n.executionOrder===a.executionOrder&&n.success===a.success}s(i,"equals"),e.equals=i})(uB||(Wi.ExecutionSummary=uB={}));var j_;(function(e){function t(a,o){return{kind:a,document:o}}s(t,"create"),e.create=t;function r(a){let o=a;return Jo.objectLiteral(o)&&cB.is(o.kind)&&wb.DocumentUri.is(o.document)&&(o.metadata===void 0||Jo.objectLiteral(o.metadata))}s(r,"is"),e.is=r;function i(a,o){let l=new Set;return a.document!==o.document&&l.add("document"),a.kind!==o.kind&&l.add("kind"),a.executionSummary!==o.executionSummary&&l.add("executionSummary"),(a.metadata!==void 0||o.metadata!==void 0)&&!n(a.metadata,o.metadata)&&l.add("metadata"),(a.executionSummary!==void 0||o.executionSummary!==void 0)&&!uB.equals(a.executionSummary,o.executionSummary)&&l.add("executionSummary"),l}s(i,"diff"),e.diff=i;function n(a,o){if(a===o)return!0;if(a==null||o===null||o===void 0||typeof a!=typeof o||typeof a!="object")return!1;let l=Array.isArray(a),u=Array.isArray(o);if(l!==u)return!1;if(l&&u){if(a.length!==o.length)return!1;for(let h=0;h{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.InlineCompletionRequest=void 0;var glt=Di(),ylt;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=glt.MessageDirection.clientToServer,e.type=new glt.ProtocolRequestType(e.method)})(ylt||(U_.InlineCompletionRequest=ylt={}))});var Dct=Be(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.WorkspaceSymbolRequest=et.CodeActionResolveRequest=et.CodeActionRequest=et.DocumentSymbolRequest=et.DocumentHighlightRequest=et.ReferencesRequest=et.DefinitionRequest=et.SignatureHelpRequest=et.SignatureHelpTriggerKind=et.HoverRequest=et.CompletionResolveRequest=et.CompletionRequest=et.CompletionTriggerKind=et.PublishDiagnosticsNotification=et.WatchKind=et.RelativePattern=et.FileChangeType=et.DidChangeWatchedFilesNotification=et.WillSaveTextDocumentWaitUntilRequest=et.WillSaveTextDocumentNotification=et.TextDocumentSaveReason=et.DidSaveTextDocumentNotification=et.DidCloseTextDocumentNotification=et.DidChangeTextDocumentNotification=et.TextDocumentContentChangeEvent=et.DidOpenTextDocumentNotification=et.TextDocumentSyncKind=et.TelemetryEventNotification=et.LogMessageNotification=et.ShowMessageRequest=et.ShowMessageNotification=et.MessageType=et.DidChangeConfigurationNotification=et.ExitNotification=et.ShutdownRequest=et.InitializedNotification=et.InitializeErrorCodes=et.InitializeRequest=et.WorkDoneProgressOptions=et.TextDocumentRegistrationOptions=et.StaticRegistrationOptions=et.PositionEncodingKind=et.FailureHandlingKind=et.ResourceOperationKind=et.UnregistrationRequest=et.RegistrationRequest=et.DocumentSelector=et.NotebookCellTextDocumentFilter=et.NotebookDocumentFilter=et.TextDocumentFilter=void 0;et.MonikerRequest=et.MonikerKind=et.UniquenessLevel=et.WillDeleteFilesRequest=et.DidDeleteFilesNotification=et.WillRenameFilesRequest=et.DidRenameFilesNotification=et.WillCreateFilesRequest=et.DidCreateFilesNotification=et.FileOperationPatternKind=et.LinkedEditingRangeRequest=et.ShowDocumentRequest=et.SemanticTokensRegistrationType=et.SemanticTokensRefreshRequest=et.SemanticTokensRangeRequest=et.SemanticTokensDeltaRequest=et.SemanticTokensRequest=et.TokenFormat=et.CallHierarchyPrepareRequest=et.CallHierarchyOutgoingCallsRequest=et.CallHierarchyIncomingCallsRequest=et.WorkDoneProgressCancelNotification=et.WorkDoneProgressCreateRequest=et.WorkDoneProgress=et.SelectionRangeRequest=et.DeclarationRequest=et.FoldingRangeRefreshRequest=et.FoldingRangeRequest=et.ColorPresentationRequest=et.DocumentColorRequest=et.ConfigurationRequest=et.DidChangeWorkspaceFoldersNotification=et.WorkspaceFoldersRequest=et.TypeDefinitionRequest=et.ImplementationRequest=et.ApplyWorkspaceEditRequest=et.ExecuteCommandRequest=et.PrepareRenameRequest=et.RenameRequest=et.PrepareSupportDefaultBehavior=et.DocumentOnTypeFormattingRequest=et.DocumentRangesFormattingRequest=et.DocumentRangeFormattingRequest=et.DocumentFormattingRequest=et.DocumentLinkResolveRequest=et.DocumentLinkRequest=et.CodeLensRefreshRequest=et.CodeLensResolveRequest=et.CodeLensRequest=et.WorkspaceSymbolResolveRequest=void 0;et.InlineCompletionRequest=et.DidCloseNotebookDocumentNotification=et.DidSaveNotebookDocumentNotification=et.DidChangeNotebookDocumentNotification=et.NotebookCellArrayChange=et.DidOpenNotebookDocumentNotification=et.NotebookDocumentSyncRegistrationType=et.NotebookDocument=et.NotebookCell=et.ExecutionSummary=et.NotebookCellKind=et.DiagnosticRefreshRequest=et.WorkspaceDiagnosticRequest=et.DocumentDiagnosticRequest=et.DocumentDiagnosticReportKind=et.DiagnosticServerCancellationData=et.InlayHintRefreshRequest=et.InlayHintResolveRequest=et.InlayHintRequest=et.InlineValueRefreshRequest=et.InlineValueRequest=et.TypeHierarchySupertypesRequest=et.TypeHierarchySubtypesRequest=et.TypeHierarchyPrepareRequest=void 0;var re=Di(),blt=(Ig(),b2(Qw)),In=I_(),q8t=qat();Object.defineProperty(et,"ImplementationRequest",{enumerable:!0,get:s(function(){return q8t.ImplementationRequest},"get")});var j8t=Hat();Object.defineProperty(et,"TypeDefinitionRequest",{enumerable:!0,get:s(function(){return j8t.TypeDefinitionRequest},"get")});var vct=Kat();Object.defineProperty(et,"WorkspaceFoldersRequest",{enumerable:!0,get:s(function(){return vct.WorkspaceFoldersRequest},"get")});Object.defineProperty(et,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:s(function(){return vct.DidChangeWorkspaceFoldersNotification},"get")});var U8t=Jat();Object.defineProperty(et,"ConfigurationRequest",{enumerable:!0,get:s(function(){return U8t.ConfigurationRequest},"get")});var Act=rot();Object.defineProperty(et,"DocumentColorRequest",{enumerable:!0,get:s(function(){return Act.DocumentColorRequest},"get")});Object.defineProperty(et,"ColorPresentationRequest",{enumerable:!0,get:s(function(){return Act.ColorPresentationRequest},"get")});var Rct=sot();Object.defineProperty(et,"FoldingRangeRequest",{enumerable:!0,get:s(function(){return Rct.FoldingRangeRequest},"get")});Object.defineProperty(et,"FoldingRangeRefreshRequest",{enumerable:!0,get:s(function(){return Rct.FoldingRangeRefreshRequest},"get")});var H8t=lot();Object.defineProperty(et,"DeclarationRequest",{enumerable:!0,get:s(function(){return H8t.DeclarationRequest},"get")});var Y8t=hot();Object.defineProperty(et,"SelectionRangeRequest",{enumerable:!0,get:s(function(){return Y8t.SelectionRangeRequest},"get")});var mB=mot();Object.defineProperty(et,"WorkDoneProgress",{enumerable:!0,get:s(function(){return mB.WorkDoneProgress},"get")});Object.defineProperty(et,"WorkDoneProgressCreateRequest",{enumerable:!0,get:s(function(){return mB.WorkDoneProgressCreateRequest},"get")});Object.defineProperty(et,"WorkDoneProgressCancelNotification",{enumerable:!0,get:s(function(){return mB.WorkDoneProgressCancelNotification},"get")});var gB=bot();Object.defineProperty(et,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:s(function(){return gB.CallHierarchyIncomingCallsRequest},"get")});Object.defineProperty(et,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:s(function(){return gB.CallHierarchyOutgoingCallsRequest},"get")});Object.defineProperty(et,"CallHierarchyPrepareRequest",{enumerable:!0,get:s(function(){return gB.CallHierarchyPrepareRequest},"get")});var sy=_ot();Object.defineProperty(et,"TokenFormat",{enumerable:!0,get:s(function(){return sy.TokenFormat},"get")});Object.defineProperty(et,"SemanticTokensRequest",{enumerable:!0,get:s(function(){return sy.SemanticTokensRequest},"get")});Object.defineProperty(et,"SemanticTokensDeltaRequest",{enumerable:!0,get:s(function(){return sy.SemanticTokensDeltaRequest},"get")});Object.defineProperty(et,"SemanticTokensRangeRequest",{enumerable:!0,get:s(function(){return sy.SemanticTokensRangeRequest},"get")});Object.defineProperty(et,"SemanticTokensRefreshRequest",{enumerable:!0,get:s(function(){return sy.SemanticTokensRefreshRequest},"get")});Object.defineProperty(et,"SemanticTokensRegistrationType",{enumerable:!0,get:s(function(){return sy.SemanticTokensRegistrationType},"get")});var X8t=Aot();Object.defineProperty(et,"ShowDocumentRequest",{enumerable:!0,get:s(function(){return X8t.ShowDocumentRequest},"get")});var K8t=Dot();Object.defineProperty(et,"LinkedEditingRangeRequest",{enumerable:!0,get:s(function(){return K8t.LinkedEditingRangeRequest},"get")});var Pf=Fot();Object.defineProperty(et,"FileOperationPatternKind",{enumerable:!0,get:s(function(){return Pf.FileOperationPatternKind},"get")});Object.defineProperty(et,"DidCreateFilesNotification",{enumerable:!0,get:s(function(){return Pf.DidCreateFilesNotification},"get")});Object.defineProperty(et,"WillCreateFilesRequest",{enumerable:!0,get:s(function(){return Pf.WillCreateFilesRequest},"get")});Object.defineProperty(et,"DidRenameFilesNotification",{enumerable:!0,get:s(function(){return Pf.DidRenameFilesNotification},"get")});Object.defineProperty(et,"WillRenameFilesRequest",{enumerable:!0,get:s(function(){return Pf.WillRenameFilesRequest},"get")});Object.defineProperty(et,"DidDeleteFilesNotification",{enumerable:!0,get:s(function(){return Pf.DidDeleteFilesNotification},"get")});Object.defineProperty(et,"WillDeleteFilesRequest",{enumerable:!0,get:s(function(){return Pf.WillDeleteFilesRequest},"get")});var yB=qot();Object.defineProperty(et,"UniquenessLevel",{enumerable:!0,get:s(function(){return yB.UniquenessLevel},"get")});Object.defineProperty(et,"MonikerKind",{enumerable:!0,get:s(function(){return yB.MonikerKind},"get")});Object.defineProperty(et,"MonikerRequest",{enumerable:!0,get:s(function(){return yB.MonikerRequest},"get")});var xB=Yot();Object.defineProperty(et,"TypeHierarchyPrepareRequest",{enumerable:!0,get:s(function(){return xB.TypeHierarchyPrepareRequest},"get")});Object.defineProperty(et,"TypeHierarchySubtypesRequest",{enumerable:!0,get:s(function(){return xB.TypeHierarchySubtypesRequest},"get")});Object.defineProperty(et,"TypeHierarchySupertypesRequest",{enumerable:!0,get:s(function(){return xB.TypeHierarchySupertypesRequest},"get")});var Lct=Qot();Object.defineProperty(et,"InlineValueRequest",{enumerable:!0,get:s(function(){return Lct.InlineValueRequest},"get")});Object.defineProperty(et,"InlineValueRefreshRequest",{enumerable:!0,get:s(function(){return Lct.InlineValueRefreshRequest},"get")});var bB=elt();Object.defineProperty(et,"InlayHintRequest",{enumerable:!0,get:s(function(){return bB.InlayHintRequest},"get")});Object.defineProperty(et,"InlayHintResolveRequest",{enumerable:!0,get:s(function(){return bB.InlayHintResolveRequest},"get")});Object.defineProperty(et,"InlayHintRefreshRequest",{enumerable:!0,get:s(function(){return bB.InlayHintRefreshRequest},"get")});var _b=llt();Object.defineProperty(et,"DiagnosticServerCancellationData",{enumerable:!0,get:s(function(){return _b.DiagnosticServerCancellationData},"get")});Object.defineProperty(et,"DocumentDiagnosticReportKind",{enumerable:!0,get:s(function(){return _b.DocumentDiagnosticReportKind},"get")});Object.defineProperty(et,"DocumentDiagnosticRequest",{enumerable:!0,get:s(function(){return _b.DocumentDiagnosticRequest},"get")});Object.defineProperty(et,"WorkspaceDiagnosticRequest",{enumerable:!0,get:s(function(){return _b.WorkspaceDiagnosticRequest},"get")});Object.defineProperty(et,"DiagnosticRefreshRequest",{enumerable:!0,get:s(function(){return _b.DiagnosticRefreshRequest},"get")});var Kl=mlt();Object.defineProperty(et,"NotebookCellKind",{enumerable:!0,get:s(function(){return Kl.NotebookCellKind},"get")});Object.defineProperty(et,"ExecutionSummary",{enumerable:!0,get:s(function(){return Kl.ExecutionSummary},"get")});Object.defineProperty(et,"NotebookCell",{enumerable:!0,get:s(function(){return Kl.NotebookCell},"get")});Object.defineProperty(et,"NotebookDocument",{enumerable:!0,get:s(function(){return Kl.NotebookDocument},"get")});Object.defineProperty(et,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:s(function(){return Kl.NotebookDocumentSyncRegistrationType},"get")});Object.defineProperty(et,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:s(function(){return Kl.DidOpenNotebookDocumentNotification},"get")});Object.defineProperty(et,"NotebookCellArrayChange",{enumerable:!0,get:s(function(){return Kl.NotebookCellArrayChange},"get")});Object.defineProperty(et,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:s(function(){return Kl.DidChangeNotebookDocumentNotification},"get")});Object.defineProperty(et,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:s(function(){return Kl.DidSaveNotebookDocumentNotification},"get")});Object.defineProperty(et,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:s(function(){return Kl.DidCloseNotebookDocumentNotification},"get")});var Q8t=xlt();Object.defineProperty(et,"InlineCompletionRequest",{enumerable:!0,get:s(function(){return Q8t.InlineCompletionRequest},"get")});var hB;(function(e){function t(r){let i=r;return In.string(i)||In.string(i.language)||In.string(i.scheme)||In.string(i.pattern)}s(t,"is"),e.is=t})(hB||(et.TextDocumentFilter=hB={}));var dB;(function(e){function t(r){let i=r;return In.objectLiteral(i)&&(In.string(i.notebookType)||In.string(i.scheme)||In.string(i.pattern))}s(t,"is"),e.is=t})(dB||(et.NotebookDocumentFilter=dB={}));var fB;(function(e){function t(r){let i=r;return In.objectLiteral(i)&&(In.string(i.notebook)||dB.is(i.notebook))&&(i.language===void 0||In.string(i.language))}s(t,"is"),e.is=t})(fB||(et.NotebookCellTextDocumentFilter=fB={}));var pB;(function(e){function t(r){if(!Array.isArray(r))return!1;for(let i of r)if(!In.string(i)&&!hB.is(i)&&!fB.is(i))return!1;return!0}s(t,"is"),e.is=t})(pB||(et.DocumentSelector=pB={}));var klt;(function(e){e.method="client/registerCapability",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolRequestType(e.method)})(klt||(et.RegistrationRequest=klt={}));var Tlt;(function(e){e.method="client/unregisterCapability",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolRequestType(e.method)})(Tlt||(et.UnregistrationRequest=Tlt={}));var Clt;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(Clt||(et.ResourceOperationKind=Clt={}));var Slt;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(Slt||(et.FailureHandlingKind=Slt={}));var wlt;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(wlt||(et.PositionEncodingKind=wlt={}));var _lt;(function(e){function t(r){let i=r;return i&&In.string(i.id)&&i.id.length>0}s(t,"hasId"),e.hasId=t})(_lt||(et.StaticRegistrationOptions=_lt={}));var Elt;(function(e){function t(r){let i=r;return i&&(i.documentSelector===null||pB.is(i.documentSelector))}s(t,"is"),e.is=t})(Elt||(et.TextDocumentRegistrationOptions=Elt={}));var vlt;(function(e){function t(i){let n=i;return In.objectLiteral(n)&&(n.workDoneProgress===void 0||In.boolean(n.workDoneProgress))}s(t,"is"),e.is=t;function r(i){let n=i;return n&&In.boolean(n.workDoneProgress)}s(r,"hasWorkDoneProgress"),e.hasWorkDoneProgress=r})(vlt||(et.WorkDoneProgressOptions=vlt={}));var Alt;(function(e){e.method="initialize",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(Alt||(et.InitializeRequest=Alt={}));var Rlt;(function(e){e.unknownProtocolVersion=1})(Rlt||(et.InitializeErrorCodes=Rlt={}));var Llt;(function(e){e.method="initialized",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method)})(Llt||(et.InitializedNotification=Llt={}));var Dlt;(function(e){e.method="shutdown",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType0(e.method)})(Dlt||(et.ShutdownRequest=Dlt={}));var Ilt;(function(e){e.method="exit",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType0(e.method)})(Ilt||(et.ExitNotification=Ilt={}));var Nlt;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method)})(Nlt||(et.DidChangeConfigurationNotification=Nlt={}));var Olt;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Olt||(et.MessageType=Olt={}));var Mlt;(function(e){e.method="window/showMessage",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolNotificationType(e.method)})(Mlt||(et.ShowMessageNotification=Mlt={}));var Blt;(function(e){e.method="window/showMessageRequest",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolRequestType(e.method)})(Blt||(et.ShowMessageRequest=Blt={}));var Plt;(function(e){e.method="window/logMessage",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolNotificationType(e.method)})(Plt||(et.LogMessageNotification=Plt={}));var $lt;(function(e){e.method="telemetry/event",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolNotificationType(e.method)})($lt||(et.TelemetryEventNotification=$lt={}));var Flt;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Flt||(et.TextDocumentSyncKind=Flt={}));var Vlt;(function(e){e.method="textDocument/didOpen",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method)})(Vlt||(et.DidOpenTextDocumentNotification=Vlt={}));var zlt;(function(e){function t(i){let n=i;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}s(t,"isIncremental"),e.isIncremental=t;function r(i){let n=i;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}s(r,"isFull"),e.isFull=r})(zlt||(et.TextDocumentContentChangeEvent=zlt={}));var Glt;(function(e){e.method="textDocument/didChange",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method)})(Glt||(et.DidChangeTextDocumentNotification=Glt={}));var Wlt;(function(e){e.method="textDocument/didClose",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method)})(Wlt||(et.DidCloseTextDocumentNotification=Wlt={}));var qlt;(function(e){e.method="textDocument/didSave",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method)})(qlt||(et.DidSaveTextDocumentNotification=qlt={}));var jlt;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(jlt||(et.TextDocumentSaveReason=jlt={}));var Ult;(function(e){e.method="textDocument/willSave",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method)})(Ult||(et.WillSaveTextDocumentNotification=Ult={}));var Hlt;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(Hlt||(et.WillSaveTextDocumentWaitUntilRequest=Hlt={}));var Ylt;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolNotificationType(e.method)})(Ylt||(et.DidChangeWatchedFilesNotification=Ylt={}));var Xlt;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Xlt||(et.FileChangeType=Xlt={}));var Klt;(function(e){function t(r){let i=r;return In.objectLiteral(i)&&(blt.URI.is(i.baseUri)||blt.WorkspaceFolder.is(i.baseUri))&&In.string(i.pattern)}s(t,"is"),e.is=t})(Klt||(et.RelativePattern=Klt={}));var Qlt;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Qlt||(et.WatchKind=Qlt={}));var Zlt;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolNotificationType(e.method)})(Zlt||(et.PublishDiagnosticsNotification=Zlt={}));var Jlt;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Jlt||(et.CompletionTriggerKind=Jlt={}));var tct;(function(e){e.method="textDocument/completion",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(tct||(et.CompletionRequest=tct={}));var ect;(function(e){e.method="completionItem/resolve",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(ect||(et.CompletionResolveRequest=ect={}));var rct;(function(e){e.method="textDocument/hover",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(rct||(et.HoverRequest=rct={}));var ict;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(ict||(et.SignatureHelpTriggerKind=ict={}));var nct;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(nct||(et.SignatureHelpRequest=nct={}));var sct;(function(e){e.method="textDocument/definition",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(sct||(et.DefinitionRequest=sct={}));var act;(function(e){e.method="textDocument/references",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(act||(et.ReferencesRequest=act={}));var oct;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(oct||(et.DocumentHighlightRequest=oct={}));var lct;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(lct||(et.DocumentSymbolRequest=lct={}));var cct;(function(e){e.method="textDocument/codeAction",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(cct||(et.CodeActionRequest=cct={}));var uct;(function(e){e.method="codeAction/resolve",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(uct||(et.CodeActionResolveRequest=uct={}));var hct;(function(e){e.method="workspace/symbol",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(hct||(et.WorkspaceSymbolRequest=hct={}));var dct;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(dct||(et.WorkspaceSymbolResolveRequest=dct={}));var fct;(function(e){e.method="textDocument/codeLens",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(fct||(et.CodeLensRequest=fct={}));var pct;(function(e){e.method="codeLens/resolve",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(pct||(et.CodeLensResolveRequest=pct={}));var mct;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolRequestType0(e.method)})(mct||(et.CodeLensRefreshRequest=mct={}));var gct;(function(e){e.method="textDocument/documentLink",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(gct||(et.DocumentLinkRequest=gct={}));var yct;(function(e){e.method="documentLink/resolve",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(yct||(et.DocumentLinkResolveRequest=yct={}));var xct;(function(e){e.method="textDocument/formatting",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(xct||(et.DocumentFormattingRequest=xct={}));var bct;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(bct||(et.DocumentRangeFormattingRequest=bct={}));var kct;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(kct||(et.DocumentRangesFormattingRequest=kct={}));var Tct;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(Tct||(et.DocumentOnTypeFormattingRequest=Tct={}));var Cct;(function(e){e.Identifier=1})(Cct||(et.PrepareSupportDefaultBehavior=Cct={}));var Sct;(function(e){e.method="textDocument/rename",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(Sct||(et.RenameRequest=Sct={}));var wct;(function(e){e.method="textDocument/prepareRename",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(wct||(et.PrepareRenameRequest=wct={}));var _ct;(function(e){e.method="workspace/executeCommand",e.messageDirection=re.MessageDirection.clientToServer,e.type=new re.ProtocolRequestType(e.method)})(_ct||(et.ExecuteCommandRequest=_ct={}));var Ect;(function(e){e.method="workspace/applyEdit",e.messageDirection=re.MessageDirection.serverToClient,e.type=new re.ProtocolRequestType("workspace/applyEdit")})(Ect||(et.ApplyWorkspaceEditRequest=Ect={}))});var Nct=Be(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});H_.createProtocolConnection=void 0;var Ict=Bf();function Z8t(e,t,r,i){return Ict.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,Ict.createMessageConnection)(e,t,r,i)}s(Z8t,"createProtocolConnection");H_.createProtocolConnection=Z8t});var Mct=Be(sa=>{"use strict";var J8t=sa&&sa.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Y_=sa&&sa.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&J8t(t,e,r)};Object.defineProperty(sa,"__esModule",{value:!0});sa.LSPErrorCodes=sa.createProtocolConnection=void 0;Y_(Bf(),sa);Y_((Ig(),b2(Qw)),sa);Y_(Di(),sa);Y_(Dct(),sa);var t7t=Nct();Object.defineProperty(sa,"createProtocolConnection",{enumerable:!0,get:s(function(){return t7t.createProtocolConnection},"get")});var Oct;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Oct||(sa.LSPErrorCodes=Oct={}))});var Pct=Be(Ql=>{"use strict";var e7t=Ql&&Ql.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Bct=Ql&&Ql.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&e7t(t,e,r)};Object.defineProperty(Ql,"__esModule",{value:!0});Ql.createProtocolConnection=void 0;var r7t=iB();Bct(iB(),Ql);Bct(Mct(),Ql);function i7t(e,t,r,i){return(0,r7t.createMessageConnection)(e,t,r,i)}s(i7t,"createProtocolConnection");Ql.createProtocolConnection=i7t});var Eh,kB=b(()=>{"use strict";(function(e){function t(r){return{dispose:s(async()=>await r(),"dispose")}}s(t,"create"),e.create=t})(Eh||(Eh={}))});var ay,Eb,TB=b(()=>{"use strict";ay=fs(Pct(),1);no();kB();yh();ao();ws();Qo();zg();Eb=class{static{s(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new os,this.documentPhaseListeners=new os,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=hr.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.fileSystemProvider=t.workspace.FileSystemProvider,this.workspaceManager=()=>t.workspace.WorkspaceManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},i=ar.CancellationToken.None){for(let n of t){let a=n.uri.toString();if(n.state===hr.Validated){if(typeof r.validation=="boolean"&&r.validation)this.resetToState(n,hr.IndexedReferences);else if(typeof r.validation=="object"){let o=this.findMissingValidationCategories(n,r);o.length>0&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:o}},result:this.buildState.get(a)?.result}),n.state=hr.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=hr.Changed,await this.emitUpdate(t.map(n=>n.uri),[]),await this.buildDocuments(t,r,i)}async update(t,r,i=ar.CancellationToken.None){this.currentState=hr.Changed;let n=[];for(let u of r){let h=this.langiumDocuments.deleteDocuments(u);for(let d of h)n.push(d.uri),this.cleanUpDeleted(d)}let a=(await Promise.all(t.map(u=>this.findChangedUris(u)))).flat();for(let u of a){let h=this.langiumDocuments.getDocument(u);h===void 0&&(h=this.langiumDocumentFactory.fromModel({$type:"INVALID"},u),h.state=hr.Changed,this.langiumDocuments.addDocument(h)),this.resetToState(h,hr.Changed)}let o=mr(a).concat(n).map(u=>u.toString()).toSet();this.langiumDocuments.all.filter(u=>!o.has(u.uri.toString())&&this.shouldRelink(u,o)).forEach(u=>this.resetToState(u,hr.ComputedScopes)),await this.emitUpdate(a,n),await Bi(i);let l=this.sortDocuments(this.langiumDocuments.all.filter(u=>u.state=1}findMissingValidationCategories(t,r){let i=this.buildState.get(t.uri.toString()),n=this.serviceRegistry.getServices(t.uri).validation.ValidationRegistry.getAllValidationCategories(t),a=i?.result?.validationChecks?new Set(i?.result?.validationChecks):i?.completed?n:new Set,o=r===void 0||r.validation===!0?n:typeof r.validation=="object"?r.validation.categories??n:[];return mr(o).filter(l=>!a.has(l)).toArray()}async findChangedUris(t){if(this.langiumDocuments.getDocument(t)??this.textDocuments?.get(t))return[t];try{let i=await this.fileSystemProvider.stat(t);if(i.isDirectory)return await this.workspaceManager().searchFolder(t);if(this.workspaceManager().shouldIncludeEntry(i))return[t]}catch{}return[]}async emitUpdate(t,r){await Promise.all(this.updateListeners.map(i=>i(t,r)))}sortDocuments(t){let r=0,i=t.length-1;for(;r=0&&!this.hasTextDocument(t[i]);)i--;ri.error!==void 0)?!0:this.indexManager.isAffected(t,r)}onUpdate(t){return this.updateListeners.push(t),Eh.create(()=>{let r=this.updateListeners.indexOf(t);r>=0&&this.updateListeners.splice(r,1)})}resetToState(t,r){switch(r){case hr.Changed:case hr.Parsed:this.indexManager.removeContent(t.uri);case hr.IndexedContent:t.localSymbols=void 0;case hr.ComputedScopes:this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t);case hr.Linked:this.indexManager.removeReferences(t.uri);case hr.IndexedReferences:t.diagnostics=void 0,this.buildState.delete(t.uri.toString());case hr.Validated:}t.state>r&&(t.state=r)}cleanUpDeleted(t){this.buildState.delete(t.uri.toString()),this.indexManager.remove(t.uri),t.state=hr.Changed}async buildDocuments(t,r,i){this.prepareBuild(t,r),await this.runCancelable(t,hr.Parsed,i,o=>this.langiumDocumentFactory.update(o,i)),await this.runCancelable(t,hr.IndexedContent,i,o=>this.indexManager.updateContent(o,i)),await this.runCancelable(t,hr.ComputedScopes,i,async o=>{let l=this.serviceRegistry.getServices(o.uri).references.ScopeComputation;o.localSymbols=await l.collectLocalSymbols(o,i)});let n=t.filter(o=>this.shouldLink(o));await this.runCancelable(n,hr.Linked,i,o=>this.serviceRegistry.getServices(o.uri).references.Linker.link(o,i)),await this.runCancelable(n,hr.IndexedReferences,i,o=>this.indexManager.updateReferences(o,i));let a=t.filter(o=>this.shouldValidate(o)?!0:(this.markAsCompleted(o),!1));await this.runCancelable(a,hr.Validated,i,async o=>{await this.validate(o,i),this.markAsCompleted(o)})}markAsCompleted(t){let r=this.buildState.get(t.uri.toString());r&&(r.completed=!0)}prepareBuild(t,r){for(let i of t){let n=i.uri.toString(),a=this.buildState.get(n);(!a||a.completed)&&this.buildState.set(n,{completed:!1,options:r,result:a?.result})}}async runCancelable(t,r,i,n){for(let o of t)o.stateo.state===r);await this.notifyBuildPhase(a,r,i),this.currentState=r}onBuildPhase(t,r){return this.buildPhaseListeners.add(t,r),Eh.create(()=>{this.buildPhaseListeners.delete(t,r)})}onDocumentPhase(t,r){return this.documentPhaseListeners.add(t,r),Eh.create(()=>{this.documentPhaseListeners.delete(t,r)})}waitUntil(t,r,i){let n;return r&&"path"in r?n=r:i=r,i??(i=ar.CancellationToken.None),n?this.awaitDocumentState(t,n,i):this.awaitBuilderState(t,i)}awaitDocumentState(t,r,i){let n=this.langiumDocuments.getDocument(r);if(n){if(n.state>=t)return Promise.resolve(r);if(i.isCancellationRequested)return Promise.reject(so);if(this.currentState>=t&&t>n.state)return Promise.reject(new ay.ResponseError(ay.LSPErrorCodes.RequestFailed,`Document state of ${r.toString()} is ${hr[n.state]}, requiring ${hr[t]}, but workspace state is already ${hr[this.currentState]}. Returning undefined.`))}else return Promise.reject(new ay.ResponseError(ay.LSPErrorCodes.ServerCancelled,`No document found for URI: ${r.toString()}`));return new Promise((a,o)=>{let l=this.onDocumentPhase(t,h=>{Hi.equals(h.uri,r)&&(l.dispose(),u.dispose(),a(h.uri))}),u=i.onCancellationRequested(()=>{l.dispose(),u.dispose(),o(so)})})}awaitBuilderState(t,r){return this.currentState>=t?Promise.resolve():r.isCancellationRequested?Promise.reject(so):new Promise((i,n)=>{let a=this.onBuildPhase(t,()=>{a.dispose(),o.dispose(),i()}),o=r.onCancellationRequested(()=>{a.dispose(),o.dispose(),n(so)})})}async notifyDocumentPhase(t,r,i){let a=this.documentPhaseListeners.get(r).slice();for(let o of a)try{await Bi(i),await o(t,i)}catch(l){if(!Hl(l))throw l}}async notifyBuildPhase(t,r,i){if(t.length===0)return;let a=this.buildPhaseListeners.get(r).slice();for(let o of a)await Bi(i),await o(t,i)}shouldLink(t){return this.getBuildOptions(t).eagerLinking??!0}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,r){let i=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,n=this.getBuildOptions(t),a=typeof n.validation=="object"?{...n.validation}:{};a.categories=this.findMissingValidationCategories(t,n);let o=await i.validateDocument(t,a,r);t.diagnostics?t.diagnostics.push(...o):t.diagnostics=o;let l=this.buildState.get(t.uri.toString());l&&(l.result??(l.result={}),l.result.validationChecks?l.result.validationChecks=mr(l.result.validationChecks).concat(a.categories).distinct().toArray():l.result.validationChecks=[...a.categories])}getBuildOptions(t){return this.buildState.get(t.uri.toString())?.options??{}}}});var vb,CB=b(()=>{"use strict";ss();d_();no();ws();Qo();vb=class{static{s(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new Nf,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,r){let i=ns(t).uri,n=[];return this.referenceIndex.forEach(a=>{a.forEach(o=>{Hi.equals(o.targetUri,i)&&o.targetPath===r&&n.push(o)})}),mr(n)}allElements(t,r){let i=mr(this.symbolIndex.keys());return r&&(i=i.filter(n=>!r||r.has(n))),i.map(n=>this.getFileDescriptions(n,t)).flat()}getFileDescriptions(t,r){return r?this.symbolByTypeIndex.get(t,r,()=>(this.symbolIndex.get(t)??[]).filter(a=>this.astReflection.isSubtype(a.type,r))):this.symbolIndex.get(t)??[]}remove(t){this.removeContent(t),this.removeReferences(t)}removeContent(t){let r=t.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r)}removeReferences(t){let r=t.toString();this.referenceIndex.delete(r)}async updateContent(t,r=ar.CancellationToken.None){let n=await this.serviceRegistry.getServices(t.uri).references.ScopeComputation.collectExportedSymbols(t,r),a=t.uri.toString();this.symbolIndex.set(a,n),this.symbolByTypeIndex.clear(a)}async updateReferences(t,r=ar.CancellationToken.None){let n=await this.serviceRegistry.getServices(t.uri).workspace.ReferenceDescriptionProvider.createDescriptions(t,r);this.referenceIndex.set(t.uri.toString(),n)}isAffected(t,r){let i=this.referenceIndex.get(t.uri.toString());return i?i.some(n=>!n.local&&r.has(n.targetUri.toString())):!1}}});var Ab,SB=b(()=>{"use strict";no();ao();Qo();ws();Ab=class{static{s(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new Ds,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=t.workspaceFolders??void 0}initialized(t){return this.mutex.write(r=>this.initializeWorkspace(this.folders??[],r))}async initializeWorkspace(t,r=ar.CancellationToken.None){let i=await this.performStartup(t);await Bi(r),await this.documentBuilder.build(i,this.initialBuildOptions,r)}async performStartup(t){let r=[],i=s(o=>{r.push(o),this.langiumDocuments.hasDocument(o.uri)||this.langiumDocuments.addDocument(o)},"collector");await this.loadAdditionalDocuments(t,i);let n=[];await Promise.all(t.map(o=>this.getRootFolder(o)).map(async o=>this.traverseFolder(o,n)));let a=mr(n).distinct(o=>o.toString()).filter(o=>!this.langiumDocuments.hasDocument(o));return await this.loadWorkspaceDocuments(a,i),this._ready.resolve(),r}async loadWorkspaceDocuments(t,r){await Promise.all(t.map(async i=>{let n=await this.langiumDocuments.getOrCreateDocument(i);r(n)}))}loadAdditionalDocuments(t,r){return Promise.resolve()}getRootFolder(t){return gn.parse(t.uri)}async traverseFolder(t,r){try{let i=await this.fileSystemProvider.readDirectory(t);await Promise.all(i.map(async n=>{this.shouldIncludeEntry(n)&&(n.isDirectory?await this.traverseFolder(n.uri,r):n.isFile&&r.push(n.uri))}))}catch(i){console.error("Failure to read directory content of "+t.toString(!0),i)}}async searchFolder(t){let r=[];return await this.traverseFolder(t,r),r}shouldIncludeEntry(t){let r=Hi.basename(t.uri);return r.startsWith(".")?!1:t.isDirectory?r!=="node_modules"&&r!=="out":t.isFile?this.serviceRegistry.hasServices(t.uri):!1}}});function K_(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function _B(e){return e&&"modes"in e&&"defaultMode"in e}function wB(e){return!K_(e)&&!_B(e)}var Rb,X_,$f,Q_=b(()=>{"use strict";fh();Rb=class{static{s(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(t,r,i,n,a){return dg.buildUnexpectedCharactersMessage(t,r,i,n,a)}buildUnableToPopLexerModeMessage(t){return dg.buildUnableToPopLexerModeMessage(t)}},X_={mode:"full"},$f=class{static{s(this,"DefaultLexer")}constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;let r=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let i=wB(r)?Object.values(r):r,n=t.LanguageMetaData.mode==="production";this.chevrotainLexer=new Ai(i,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,r=X_){let i=this.chevrotainLexer.tokenize(t);return{tokens:i.tokens,errors:i.errors,hidden:i.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(t)}}toTokenTypeDictionary(t){if(wB(t))return t;let r=_B(t)?Object.values(t.modes).flat():t,i={};return r.forEach(n=>i[n.name]=n),i}};s(K_,"isTokenTypeArray");s(_B,"isIMultiModeLexerDefinition");s(wB,"isTokenTypeDictionary")});function AB(e,t,r){let i,n;typeof e=="string"?(n=t,i=r):(n=e.range.start,i=t),n||(n=Rr.create(0,0));let a=Vct(e),o=LB(i),l=s7t({lines:a,position:n,options:o});return u7t({index:0,tokens:l,position:n})}function RB(e,t){let r=LB(t),i=Vct(e);if(i.length===0)return!1;let n=i[0],a=i[i.length-1],o=r.start,l=r.end;return!!o?.exec(n)&&!!l?.exec(a)}function Vct(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(kI)}function s7t(e){let t=[],r=e.position.line,i=e.position.character;for(let n=0;n=l.length){if(t.length>0){let d=Rr.create(r,i);t.push({type:"break",content:"",range:wr.create(d,d)})}}else{$ct.lastIndex=u;let d=$ct.exec(l);if(d){let f=d[0],p=d[1],m=Rr.create(r,i+u),g=Rr.create(r,i+u+f.length);t.push({type:"tag",content:p,range:wr.create(m,g)}),u+=f.length,u=vB(l,u)}if(u0&&t[t.length-1].type==="break"?t.slice(0,-1):t}function a7t(e,t,r,i){let n=[];if(e.length===0){let a=Rr.create(r,i),o=Rr.create(r,i+t.length);n.push({type:"text",content:t,range:wr.create(a,o)})}else{let a=0;for(let l of e){let u=l.index,h=t.substring(a,u);h.length>0&&n.push({type:"text",content:t.substring(a,u),range:wr.create(Rr.create(r,a+i),Rr.create(r,u+i))});let d=h.length+1,f=l[1];if(n.push({type:"inline-tag",content:f,range:wr.create(Rr.create(r,a+d+i),Rr.create(r,a+d+f.length+i))}),d+=f.length,l.length===4){d+=l[2].length;let p=l[3];n.push({type:"text",content:p,range:wr.create(Rr.create(r,a+d+i),Rr.create(r,a+d+p.length+i))})}else n.push({type:"text",content:"",range:wr.create(Rr.create(r,a+d+i),Rr.create(r,a+d+i))});a=u+l[0].length}let o=t.substring(a);o.length>0&&n.push({type:"text",content:o,range:wr.create(Rr.create(r,a+i),Rr.create(r,a+i+o.length))})}return n}function vB(e,t){let r=e.substring(t).match(o7t);return r?t+r.index:e.length}function c7t(e){let t=e.match(l7t);if(t&&typeof t.index=="number")return t.index}function u7t(e){let t=Rr.create(e.position.line,e.position.character);if(e.tokens.length===0)return new Z_([],wr.create(t,t));let r=[];for(;e.index0){let o=vB(t,i);n=t.substring(o),t=t.substring(0,i)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(n=`\`${n}\``),r.renderLink?.(t,n)??m7t(t,n)}}function m7t(e,t){try{return gn.parse(e,!0),`[${t}](${e})`}catch{return e}}function Fct(e){return e.endsWith(` +`)?` +`:` + +`}var $ct,n7t,o7t,l7t,Z_,Lb,Db,J_,DB=b(()=>{"use strict";Ig();rg();Qo();s(AB,"parseJSDoc");s(RB,"isJSDoc");s(Vct,"getLines");$ct=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,n7t=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;s(s7t,"tokenize");s(a7t,"buildInlineTokens");o7t=/\S/,l7t=/\s*$/;s(vB,"skipWhitespace");s(c7t,"lastCharacter");s(u7t,"parseJSDocComment");s(h7t,"parseJSDocElement");s(d7t,"appendEmptyLine");s(zct,"parseJSDocText");s(f7t,"parseJSDocInline");s(Gct,"parseJSDocTag");s(Wct,"parseJSDocLine");s(LB,"normalizeOptions");s(EB,"normalizeOption");Z_=class{static{s(this,"JSDocCommentImpl")}constructor(t,r){this.elements=t,this.range=r}getTag(t){return this.getAllTags().find(r=>r.name===t)}getTags(t){return this.getAllTags().filter(r=>r.name===t)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(let r of this.elements)if(t.length===0)t=r.toString();else{let i=r.toString();t+=Fct(t)+i}return t.trim()}toMarkdown(t){let r="";for(let i of this.elements)if(r.length===0)r=i.toMarkdown(t);else{let n=i.toMarkdown(t);r+=Fct(r)+n}return r.trim()}},Lb=class{static{s(this,"JSDocTagImpl")}constructor(t,r,i,n){this.name=t,this.content=r,this.inline=i,this.range=n}toString(){let t=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?t=`${t} ${r}`:this.content.inlines.length>1&&(t=`${t} +${r}`),this.inline?`{${t}}`:t}toMarkdown(t){return t?.renderTag?.(this)??this.toMarkdownDefault(t)}toMarkdownDefault(t){let r=this.content.toMarkdown(t);if(this.inline){let a=p7t(this.name,r,t??{});if(typeof a=="string")return a}let i="";t?.tag==="italic"||t?.tag===void 0?i="*":t?.tag==="bold"?i="**":t?.tag==="bold-italic"&&(i="***");let n=`${i}@${this.name}${i}`;return this.content.inlines.length===1?n=`${n} \u2014 ${r}`:this.content.inlines.length>1&&(n=`${n} +${r}`),this.inline?`{${n}}`:n}};s(p7t,"renderInlineTag");s(m7t,"renderLinkDefault");Db=class{static{s(this,"JSDocTextImpl")}constructor(t,r){this.inlines=t,this.range=r}toString(){let t="";for(let r=0;ri.range.start.line&&(t+=` +`)}return t}toMarkdown(t){let r="";for(let i=0;in.range.start.line&&(r+=` +`)}return r}},J_=class{static{s(this,"JSDocLineImpl")}constructor(t,r){this.text=t,this.range=r}toString(){return this.text}toMarkdown(){return this.text}};s(Fct,"fillNewlines")});var Ib,IB=b(()=>{"use strict";ss();DB();Ib=class{static{s(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(t){let r=this.commentProvider.getComment(t);if(r&&RB(r))return AB(r).toMarkdown({renderLink:s((n,a)=>this.documentationLinkRenderer(t,n,a),"renderLink"),renderTag:s(n=>this.documentationTagRenderer(t,n),"renderTag")})}documentationLinkRenderer(t,r,i){let n=this.findNameInLocalSymbols(t,r)??this.findNameInGlobalScope(t,r);if(n&&n.nameSegment){let a=n.nameSegment.range.start.line+1,o=n.nameSegment.range.start.character+1,l=n.documentUri.with({fragment:`L${a},${o}`});return`[${i}](${l.toString()})`}else return}documentationTagRenderer(t,r){}findNameInLocalSymbols(t,r){let n=ns(t).localSymbols;if(!n)return;let a=t;do{let l=n.getStream(a).find(u=>u.name===r);if(l)return l;a=a.$container}while(a)}findNameInGlobalScope(t,r){return this.indexManager.allElements().find(n=>n.name===r)}}});var Nb,NB=b(()=>{"use strict";f_();qo();Nb=class{static{s(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return XO(t)?t.$comment:pI(t.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}});var Ob,OB,MB,BB=b(()=>{"use strict";ao();y_();Ob=class{static{s(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,r){return Promise.resolve(this.syncParser.parse(t))}},OB=class{static{s(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let r=this.queue.shift();r&&(t.lock(),r.resolve(t))}}),this.workerPool.push(t)}}async parse(t,r){let i=await this.acquireParserWorker(r),n=new Ds,a,o=r.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(i)},this.terminationDelay)});return i.parse(t).then(l=>{let u=this.hydrator.hydrate(l);n.resolve(u)}).catch(l=>{n.reject(l)}).finally(()=>{o.dispose(),clearTimeout(a)}),n.promise}terminateWorker(t){t.terminate();let r=this.workerPool.indexOf(t);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(t){this.initializeWorkers();for(let i of this.workerPool)if(i.ready)return i.lock(),i;let r=new Ds;return t.onCancellationRequested(()=>{let i=this.queue.indexOf(r);i>=0&&this.queue.splice(i,1),r.reject(so)}),this.queue.push(r),r.promise}},MB=class{static{s(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,r,i,n){this.onReadyEmitter=new Li.Emitter,this.deferred=new Ds,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=n,r(a=>{let o=a;this.deferred.resolve(o),this.unlock()}),i(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(so),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 Ds,this.sendMessage(t),this.deferred.promise}}});var Mb,PB=b(()=>{"use strict";no();ao();Mb=class{static{s(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new ar.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();let r=c_();return this.previousTokenSource=r,this.enqueue(this.writeQueue,t,r.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,r,i=ar.CancellationToken.None){let n=new Ds,a={action:r,deferred:n,cancellationToken:i};return t.push(a),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;let t=[];if(this.writeQueue.length>0)t.push(this.writeQueue.shift());else if(this.readQueue.length>0)t.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(t.map(async({action:r,deferred:i,cancellationToken:n})=>{try{let a=await Promise.resolve().then(()=>r(n));i.resolve(a)}catch(a){Hl(a)?i.resolve(void 0):i.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var Bb,$B=b(()=>{"use strict";Zw();Ea();Go();ss();yh();qo();Bb=class{static{s(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new If,this.tokenTypeIdMap=new If,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(r=>({...r,message:r.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){let r=new Map,i=new Map;for(let n of _s(t))r.set(n,{});if(t.$cstNode)for(let n of uf(t.$cstNode))i.set(n,{});return{astNodes:r,cstNodes:i}}dehydrateAstNode(t,r){let i=r.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,t.$cstNode!==void 0&&(i.$cstNode=this.dehydrateCstNode(t.$cstNode,r));for(let[n,a]of Object.entries(t))if(!n.startsWith("$"))if(Array.isArray(a)){let o=[];i[n]=o;for(let l of a)Mi(l)?o.push(this.dehydrateAstNode(l,r)):pn(l)?o.push(this.dehydrateReference(l,r)):o.push(l)}else Mi(a)?i[n]=this.dehydrateAstNode(a,r):pn(a)?i[n]=this.dehydrateReference(a,r):a!==void 0&&(i[n]=a);return i}dehydrateReference(t,r){let i={};return i.$refText=t.$refText,t.$refNode&&(i.$refNode=r.cstNodes.get(t.$refNode)),i}dehydrateCstNode(t,r){let i=r.cstNodes.get(t);return Y0(t)?i.fullText=t.fullText:i.grammarSource=this.getGrammarElementId(t.grammarSource),i.hidden=t.hidden,i.astNode=r.astNodes.get(t.astNode),zo(t)?i.content=t.content.map(n=>this.dehydrateCstNode(n,r)):Ju(t)&&(i.tokenType=t.tokenType.name,i.offset=t.offset,i.length=t.length,i.startLine=t.range.start.line,i.startColumn=t.range.start.character,i.endLine=t.range.end.line,i.endColumn=t.range.end.character),i}hydrate(t){let r=t.value,i=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,i),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(r,i)}}createHydrationContext(t){let r=new Map,i=new Map;for(let a of _s(t))r.set(a,{});let n;if(t.$cstNode)for(let a of uf(t.$cstNode)){let o;"fullText"in a?(o=new Ng(a.fullText),n=o):"content"in a?o=new vf:"tokenType"in a&&(o=this.hydrateCstLeafNode(a)),o&&(i.set(a,o),o.root=n)}return{astNodes:r,cstNodes:i}}hydrateAstNode(t,r){let i=r.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,t.$cstNode&&(i.$cstNode=r.cstNodes.get(t.$cstNode));for(let[n,a]of Object.entries(t))if(!n.startsWith("$"))if(Array.isArray(a)){let o=[];i[n]=o;for(let l of a)Mi(l)?o.push(this.setParent(this.hydrateAstNode(l,r),i)):pn(l)?o.push(this.hydrateReference(l,i,n,r)):o.push(l)}else Mi(a)?i[n]=this.setParent(this.hydrateAstNode(a,r),i):pn(a)?i[n]=this.hydrateReference(a,i,n,r):a!==void 0&&(i[n]=a);return i}setParent(t,r){return t.$container=r,t}hydrateReference(t,r,i,n){return this.linker.buildReference(r,i,n.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,r,i=0){let n=r.cstNodes.get(t);if(typeof t.grammarSource=="number"&&(n.grammarSource=this.getGrammarElement(t.grammarSource)),n.astNode=r.astNodes.get(t.astNode),zo(n))for(let a of t.content){let o=this.hydrateCstNode(a,r,i++);n.content.push(o)}return n}hydrateCstLeafNode(t){let r=this.getTokenType(t.tokenType),i=t.offset,n=t.length,a=t.startLine,o=t.startColumn,l=t.endLine,u=t.endColumn,h=t.hidden;return new Ef(i,n,{start:{line:a,character:o},end:{line:l,character:u}},r,h)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(let r of _s(this.grammar))nx(r)&&this.grammarElementIdMap.set(r,t++)}}});function Yi(e){return{documentation:{CommentProvider:s(t=>new Nb(t),"CommentProvider"),DocumentationProvider:s(t=>new Ib(t),"DocumentationProvider")},parser:{AsyncParser:s(t=>new Ob(t),"AsyncParser"),GrammarConfig:s(t=>OI(t),"GrammarConfig"),LangiumParser:s(t=>LO(t),"LangiumParser"),CompletionParser:s(t=>AO(t),"CompletionParser"),ValueConverter:s(()=>new Rf,"ValueConverter"),TokenBuilder:s(()=>new Uc,"TokenBuilder"),Lexer:s(t=>new $f(t),"Lexer"),ParserErrorMessageProvider:s(()=>new Og,"ParserErrorMessageProvider"),LexerErrorMessageProvider:s(()=>new Rb,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:s(()=>new mb,"AstNodeLocator"),AstNodeDescriptionProvider:s(t=>new fb(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:s(t=>new pb(t),"ReferenceDescriptionProvider")},references:{Linker:s(t=>new rb(t),"Linker"),NameProvider:s(()=>new ib,"NameProvider"),ScopeProvider:s(t=>new lb(t),"ScopeProvider"),ScopeComputation:s(t=>new sb(t),"ScopeComputation"),References:s(t=>new nb(t),"References")},serializer:{Hydrator:s(t=>new Bb(t),"Hydrator"),JsonSerializer:s(t=>new cb(t),"JsonSerializer")},validation:{DocumentValidator:s(t=>new db(t),"DocumentValidator"),ValidationRegistry:s(t=>new hb(t),"ValidationRegistry")},shared:s(()=>e.shared,"shared")}}function Xi(e){return{ServiceRegistry:s(t=>new ub(t),"ServiceRegistry"),workspace:{LangiumDocuments:s(t=>new eb(t),"LangiumDocuments"),LangiumDocumentFactory:s(t=>new tb(t),"LangiumDocumentFactory"),DocumentBuilder:s(t=>new Eb(t),"DocumentBuilder"),IndexManager:s(t=>new vb(t),"IndexManager"),WorkspaceManager:s(t=>new Ab(t),"WorkspaceManager"),FileSystemProvider:s(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:s(()=>new Mb,"WorkspaceLock"),ConfigurationProvider:s(t=>new gb(t),"ConfigurationProvider")},profilers:{}}}var FB=b(()=>{"use strict";MI();RO();DO();n_();IO();GO();WO();qO();jO();YO();f_();KO();QO();m_();ZO();JO();tM();TB();zg();CB();SB();Q_();IB();NB();Qx();BB();PB();$B();s(Yi,"createDefaultCoreModule");s(Xi,"createDefaultSharedCoreModule")});function Vr(e,t,r,i,n,a,o,l,u){let h=[e,t,r,i,n,a,o,l,u].reduce(Pb,{});return Yct(h)}function Hct(e){if(e&&e[Uct])for(let t of Object.values(e))Hct(t);return e}function Yct(e,t){let r=new Proxy({},{deleteProperty:s(()=>!1,"deleteProperty"),set:s(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:s((i,n)=>n===Uct?!0:jct(i,n,e,t||r),"get"),getOwnPropertyDescriptor:s((i,n)=>(jct(i,n,e,t||r),Object.getOwnPropertyDescriptor(i,n)),"getOwnPropertyDescriptor"),has:s((i,n)=>n in e,"has"),ownKeys:s(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}function jct(e,t,r,i){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===qct)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}else if(t in r){let n=r[t];e[t]=qct;try{e[t]=typeof n=="function"?n(i):Yct(n,i)}catch(a){throw e[t]=a instanceof Error?a:void 0,a}return e[t]}else return}function Pb(e,t){if(t){for(let[r,i]of Object.entries(t))if(i!=null)if(typeof i=="object"){let n=e[r];typeof n=="object"&&n!==null?e[r]=Pb(n,i):e[r]=Pb({},i)}else e[r]=i}return e}var VB,Uct,qct,zB=b(()=>{"use strict";(function(e){e.merge=(t,r)=>Pb(Pb({},t),r)})(VB||(VB={}));s(Vr,"inject");Uct=Symbol("isProxy");s(Hct,"eagerLoad");s(Yct,"_inject");qct=Symbol();s(jct,"_resolve");s(Pb,"_merge")});var Xct=b(()=>{"use strict"});var Kct=b(()=>{"use strict";NB();IB();DB()});var Qct=b(()=>{"use strict"});var Zct=b(()=>{"use strict";MI();Qct()});var GB,Ff,tE,WB,Jct=b(()=>{"use strict";fh();n_();Q_();GB={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(Ff||(Ff={}));tE=class extends Uc{static{s(this,"IndentationAwareTokenBuilder")}constructor(t=GB){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...GB,...t},this.indentTokenType=hh({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=hh({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(t,r){let i=super.buildTokens(t,r);if(!K_(i))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:o,ignoreIndentationDelimiters:l}=this.options,u,h,d,f=[];for(let p of i){for(let[m,g]of l)p.name===m?p.PUSH_MODE=Ff.IGNORE_INDENTATION:p.name===g&&(p.POP_MODE=!0);p.name===a?u=p:p.name===n?h=p:p.name===o?d=p:f.push(p)}if(!u||!h||!d)throw new Error("Some indentation/whitespace tokens not found!");return l.length>0?{modes:{[Ff.REGULAR]:[u,h,...f,d],[Ff.IGNORE_INDENTATION]:[...f,d]},defaultMode:Ff.REGULAR}:[u,h,d,...f]}flushLexingReport(t){return{...super.flushLexingReport(t),remainingDedents:this.flushRemainingDedents(t)}}isStartOfLine(t,r){return r===0||`\r +`.includes(t[r-1])}matchWhitespace(t,r,i,n){this.whitespaceRegExp.lastIndex=r;let a=this.whitespaceRegExp.exec(t);return{currIndentLevel:a?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:a}}createIndentationTokenInstance(t,r,i,n){let a=this.getLineNumber(r,n);return Gc(t,i,n,n+i.length,a,a,1,i.length)}getLineNumber(t,r){return t.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(t,r,i,n){if(!this.isStartOfLine(t,r))return null;let{currIndentLevel:a,prevIndentLevel:o,match:l}=this.matchWhitespace(t,r,i,n);return a<=o?null:(this.indentationStack.push(a),l)}dedentMatcher(t,r,i,n){if(!this.isStartOfLine(t,r))return null;let{currIndentLevel:a,prevIndentLevel:o,match:l}=this.matchWhitespace(t,r,i,n);if(a>=o)return null;let u=this.indentationStack.lastIndexOf(a);if(u===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${a} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:l?.[0]?.length??0,line:this.getLineNumber(t,r),column:1}),null;let h=this.indentationStack.length-u-1,d=t.substring(0,r).match(/[\r\n]+$/)?.[0].length??1;for(let f=0;f1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,t,"",t.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},WB=class extends $f{static{s(this,"IndentationAwareLexer")}constructor(t){if(super(t),t.parser.TokenBuilder instanceof tE)this.indentationTokenBuilder=t.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(t,r=X_){let i=super.tokenize(t),n=i.report;r?.mode==="full"&&i.tokens.push(...n.remainingDedents),n.remainingDedents=[];let{indentTokenType:a,dedentTokenType:o}=this.indentationTokenBuilder,l=a.tokenTypeIdx,u=o.tokenTypeIdx,h=[],d=i.tokens.length-1;for(let f=0;f=0&&h.push(i.tokens[d]),i.tokens=h,i}}});var tut=b(()=>{"use strict"});var eut=b(()=>{"use strict";BB();RO();Zw();Jct();DO();Qx();Q_();i_();tut();n_();IO()});var rut=b(()=>{"use strict";GO();WO();qO();HO();jO();YO()});var iut=b(()=>{"use strict";$B();f_()});var eE,Ki,qB=b(()=>{"use strict";eE=class{static{s(this,"EmptyFileSystemProvider")}stat(t){throw new Error("No file system is available.")}statSync(t){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},Ki={fileSystemProvider:s(()=>new eE,"fileSystemProvider")}});function x7t(){let e=Vr(Xi(Ki),y7t),t=Vr(Yi({shared:e}),g7t);return e.ServiceRegistry.register(t),t}function uo(e){let t=x7t(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,gn.parse(`memory:/${r.name??"grammar"}.langium`)),r}var g7t,y7t,nut=b(()=>{"use strict";FB();zB();Ea();qB();Qo();g7t={Grammar:s(()=>{},"Grammar"),LanguageMetaData:s(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},y7t={AstReflection:s(()=>new Jm,"AstReflection")};s(x7t,"createMinimalGrammarServices");s(uo,"loadGrammarFromJson")});var Lr={};Fe(Lr,{AstUtils:()=>RS,BiMap:()=>If,Cancellation:()=>ar,ContextCache:()=>Nf,CstUtils:()=>XS,DONE_RESULT:()=>is,Deferred:()=>Ds,Disposable:()=>Eh,DisposableCache:()=>Wg,DocumentCache:()=>h_,EMPTY_STREAM:()=>th,ErrorWithLocation:()=>df,GrammarUtils:()=>rw,MultiMap:()=>os,OperationCancelled:()=>so,Reduction:()=>Wm,RegExpUtils:()=>JS,SimpleCache:()=>ob,StreamImpl:()=>wa,TreeStreamImpl:()=>$l,URI:()=>gn,UriTrie:()=>Vg,UriUtils:()=>Hi,WorkspaceCache:()=>qg,assertCondition:()=>Pit,assertUnreachable:()=>zl,delayNextTick:()=>FO,interruptAndCheck:()=>Bi,isOperationCancelled:()=>Hl,loadGrammarFromJson:()=>uo,setInterruptionPeriod:()=>nat,startCancelableOperation:()=>c_,stream:()=>mr});var sut=b(()=>{"use strict";d_();y_();xr(Lr,Li);yh();kB();KS();nut();ao();ws();Qo();ss();no();qo();Xo();rg()});var aut=b(()=>{"use strict";QO();m_()});var jB,rE,out=b(()=>{"use strict";yh();jB=class{static{s(this,"DefaultLangiumProfiler")}constructor(t){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=t??new Set(this.allCategories),this.records=new os}isActive(t){return this.activeCategories.has(t)}start(...t){t?t.forEach(r=>this.activeCategories.add(r)):this.activeCategories=new Set(this.allCategories)}stop(...t){t?t.forEach(r=>this.activeCategories.delete(r)):this.activeCategories.clear()}createTask(t,r){if(!this.isActive(t))throw new Error(`Category "${t}" is not active.`);return console.log(`Creating profiling task for '${t}.${r}'.`),new rE(i=>this.records.add(t,this.dumpRecord(t,i)),r)}dumpRecord(t,r){console.info(`Task ${t}.${r.identifier} executed in ${r.duration.toFixed(2)}ms and ended at ${r.date.toISOString()}`);let i=[];for(let o of r.entries.keys()){let l=r.entries.get(o),u=l.reduce((h,d)=>h+d);i.push({name:`${r.identifier}.${o}`,count:l.length,duration:u})}let n=r.duration-i.map(o=>o.duration).reduce((o,l)=>o+l,0);i.push({name:r.identifier,count:1,duration:n}),i.sort((o,l)=>l.duration-o.duration);function a(o){return Math.round(100*o)/100}return s(a,"Round"),console.table(i.map(o=>({Element:o.name,Count:o.count,"Self %":a(100*o.duration/r.duration),"Time (ms)":a(o.duration)}))),r}getRecords(...t){return t.length===0?this.records.values():this.records.entries().filter(r=>t.some(i=>i===r[0])).flatMap(r=>r[1])}},rE=class{static{s(this,"ProfilingTask")}constructor(t,r){this.stack=[],this.entries=new os,this.addRecord=t,this.identifier=r}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(r=>r.id).join(", ")}.`);let t={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(t),this.startTime=void 0,this.entries.clear()}startSubTask(t){this.stack.push({id:t,start:performance.now(),content:0})}stopSubTask(t){let r=this.stack.pop();if(!r)throw new Error(`Task "${this.identifier}.${t}" was not started.`);if(r.id!==t)throw new Error(`Sub-Task "${r.id}" is not already stopped.`);let i=performance.now()-r.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=i);let n=i-r.content;this.entries.add(t,n)}}});var lut=b(()=>{"use strict";ZO();JO();tM();TB();zg();qB();CB();PB();SB();out()});var Nn={};Fe(Nn,{AbstractAstReflection:()=>Kd,AbstractCstNode:()=>Hx,AbstractLangiumParser:()=>Yx,AbstractParserErrorMessageProvider:()=>t_,AbstractThreadedAsyncParser:()=>OB,AstUtils:()=>RS,BiMap:()=>If,Cancellation:()=>ar,CompositeCstNodeImpl:()=>vf,ContextCache:()=>Nf,CstNodeBuilder:()=>Ux,CstUtils:()=>XS,DEFAULT_TOKENIZE_OPTIONS:()=>X_,DONE_RESULT:()=>is,DatatypeSymbol:()=>Jw,DefaultAstNodeDescriptionProvider:()=>fb,DefaultAstNodeLocator:()=>mb,DefaultAsyncParser:()=>Ob,DefaultCommentProvider:()=>Nb,DefaultConfigurationProvider:()=>gb,DefaultDocumentBuilder:()=>Eb,DefaultDocumentValidator:()=>db,DefaultHydrator:()=>Bb,DefaultIndexManager:()=>vb,DefaultJsonSerializer:()=>cb,DefaultLangiumDocumentFactory:()=>tb,DefaultLangiumDocuments:()=>eb,DefaultLangiumProfiler:()=>jB,DefaultLexer:()=>$f,DefaultLexerErrorMessageProvider:()=>Rb,DefaultLinker:()=>rb,DefaultNameProvider:()=>ib,DefaultReferenceDescriptionProvider:()=>pb,DefaultReferences:()=>nb,DefaultScopeComputation:()=>sb,DefaultScopeProvider:()=>lb,DefaultServiceRegistry:()=>ub,DefaultTokenBuilder:()=>Uc,DefaultValueConverter:()=>Rf,DefaultWorkspaceLock:()=>Mb,DefaultWorkspaceManager:()=>Ab,Deferred:()=>Ds,Disposable:()=>Eh,DisposableCache:()=>Wg,DocumentCache:()=>h_,DocumentState:()=>hr,DocumentValidator:()=>oo,EMPTY_SCOPE:()=>y8t,EMPTY_STREAM:()=>th,EmptyFileSystem:()=>Ki,EmptyFileSystemProvider:()=>eE,ErrorWithLocation:()=>df,GrammarAST:()=>ax,GrammarUtils:()=>rw,IndentationAwareLexer:()=>WB,IndentationAwareTokenBuilder:()=>tE,JSDocDocumentationProvider:()=>Ib,LangiumCompletionParser:()=>Kx,LangiumParser:()=>Xx,LangiumParserErrorMessageProvider:()=>Og,LeafCstNodeImpl:()=>Ef,LexingMode:()=>Ff,MapScope:()=>UO,Module:()=>VB,MultiMap:()=>os,MultiMapScope:()=>ab,OperationCancelled:()=>so,ParserWorker:()=>MB,ProfilingTask:()=>rE,Reduction:()=>Wm,RefResolving:()=>Df,RegExpUtils:()=>JS,RootCstNodeImpl:()=>Ng,SimpleCache:()=>ob,StreamImpl:()=>wa,StreamScope:()=>Gg,TextDocument:()=>$g,TreeStreamImpl:()=>$l,URI:()=>gn,UriTrie:()=>Vg,UriUtils:()=>Hi,VALIDATE_EACH_NODE:()=>dat,ValidationCategory:()=>p_,ValidationRegistry:()=>hb,ValueConverter:()=>Ul,WorkspaceCache:()=>qg,assertCondition:()=>Pit,assertUnreachable:()=>zl,createCompletionParser:()=>AO,createDefaultCoreModule:()=>Yi,createDefaultSharedCoreModule:()=>Xi,createGrammarConfig:()=>OI,createLangiumParser:()=>LO,createParser:()=>Zx,delayNextTick:()=>FO,diagnosticData:()=>Of,eagerLoad:()=>Hct,getDiagnosticRange:()=>fat,indentationBuilderDefaultOptions:()=>GB,inject:()=>Vr,interruptAndCheck:()=>Bi,isAstNode:()=>Mi,isAstNodeDescription:()=>W6,isAstNodeWithComment:()=>XO,isCompositeCstNode:()=>zo,isIMultiModeLexerDefinition:()=>_B,isJSDoc:()=>RB,isLeafCstNode:()=>Ju,isLinkingError:()=>Qd,isMultiReference:()=>Sa,isNamed:()=>uat,isOperationCancelled:()=>Hl,isReference:()=>pn,isRootCstNode:()=>Y0,isTokenTypeArray:()=>K_,isTokenTypeDictionary:()=>wB,loadGrammarFromJson:()=>uo,parseJSDoc:()=>AB,prepareLangiumParser:()=>Jst,setInterruptionPeriod:()=>nat,startCancelableOperation:()=>c_,stream:()=>mr,toDiagnosticData:()=>pat,toDiagnosticSeverity:()=>g_});var Is=b(()=>{"use strict";FB();zB();KO();Xct();Go();Kct();Zct();eut();rut();iut();sut();xr(Nn,Lr);aut();lut();Ea()});function Tut(e){return ho.isInstance(e,Jl.$type)}function Cut(e){return ho.isInstance(e,Gb.$type)}function Sut(e){return ho.isInstance(e,Wf.$type)}function wut(e){return ho.isInstance(e,Ah.$type)}function _ut(e){return ho.isInstance(e,uy.$type)}function Eut(e){return ho.isInstance(e,qf.$type)}function vut(e){return ho.isInstance(e,jf.$type)}function Aut(e){return ho.isInstance(e,Uf.$type)}function Rut(e){return ho.isInstance(e,Rh.$type)}function Lut(e){return ho.isInstance(e,Wb.$type)}function Dut(e){return ho.isInstance(e,Hf.$type)}function Iut(e){return ho.isInstance(e,On.$type)}var b7t,Ut,rP,iP,nP,sP,aP,oP,lP,cP,uP,ier,iE,nE,$b,UB,Jl,sE,Gb,cut,aE,HB,Wf,Vf,oE,lE,uut,oy,Zl,YB,hut,cE,XB,Ah,Fb,uy,Vb,KB,zb,uE,zf,qf,hE,QB,jf,Uf,Rh,Wb,ZB,dE,vh,JB,ly,tP,Gf,Hf,eP,fE,cy,On,Nut,ho,dut,k7t,fut,T7t,put,C7t,mut,S7t,gut,w7t,yut,_7t,xut,E7t,but,v7t,kut,A7t,R7t,L7t,D7t,I7t,N7t,O7t,M7t,B7t,P7t,yn,hP,dP,fP,pP,mP,gP,yP,xP,bP,$7t,F7t,V7t,z7t,fo,Yc,Mn,G7t,an=b(()=>{"use strict";Is();Is();Is();Is();b7t=Object.defineProperty,Ut=s((e,t)=>b7t(e,"name",{value:t,configurable:!0}),"__name");(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(rP||(rP={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(iP||(iP={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(nP||(nP={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(sP||(sP={}));(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(aP||(aP={}));(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(oP||(oP={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(lP||(lP={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(cP||(cP={}));(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z][A-Za-z0-9_()&]*(?:[ \t]+[A-Za-z(][A-Za-z0-9_()&]*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(uP||(uP={}));ier={...rP.Terminals,...iP.Terminals,...nP.Terminals,...sP.Terminals,...aP.Terminals,...oP.Terminals,...cP.Terminals,...lP.Terminals,...uP.Terminals},iE={$type:"Accelerator",name:"name",x:"x",y:"y"},nE={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},$b={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},UB={$type:"Annotations",x:"x",y:"y"},Jl={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};s(Tut,"isArchitecture");Ut(Tut,"isArchitecture");sE={$type:"Axis",label:"label",name:"name"},Gb={$type:"Branch",name:"name",order:"order"};s(Cut,"isBranch");Ut(Cut,"isBranch");cut={$type:"Checkout",branch:"branch"},aE={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},HB={$type:"ClassDefStatement",className:"className",styleText:"styleText"},Wf={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};s(Sut,"isCommit");Ut(Sut,"isCommit");Vf={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},oE={$type:"Curve",entries:"entries",label:"label",name:"name"},lE={$type:"Deaccelerator",name:"name",x:"x",y:"y"},uut={$type:"Decorator",strategy:"strategy"},oy={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Zl={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},YB={$type:"Entry",axis:"axis",value:"value"},hut={$type:"Evolution",stages:"stages"},cE={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},XB={$type:"Evolve",component:"component",target:"target"},Ah={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};s(wut,"isGitGraph");Ut(wut,"isGitGraph");Fb={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},uy={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};s(_ut,"isInfo");Ut(_ut,"isInfo");Vb={$type:"Item",classSelector:"classSelector",name:"name"},KB={$type:"Junction",id:"id",in:"in"},zb={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},uE={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},zf={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},qf={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};s(Eut,"isMerge");Ut(Eut,"isMerge");hE={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},QB={$type:"Option",name:"name",value:"value"},jf={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};s(vut,"isPacket");Ut(vut,"isPacket");Uf={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};s(Aut,"isPacketBlock");Ut(Aut,"isPacketBlock");Rh={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};s(Rut,"isPie");Ut(Rut,"isPie");Wb={$type:"PieSection",label:"label",value:"value"};s(Lut,"isPieSection");Ut(Lut,"isPieSection");ZB={$type:"Pipeline",components:"components",parent:"parent"},dE={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},vh={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},JB={$type:"Section",classSelector:"classSelector",name:"name"},ly={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},tP={$type:"Size",height:"height",width:"width"},Gf={$type:"Statement"},Hf={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};s(Dut,"isTreemap");Ut(Dut,"isTreemap");eP={$type:"TreemapRow",indent:"indent",item:"item"},fE={$type:"TreeNode",indent:"indent",name:"name"},cy={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},On={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};s(Iut,"isWardley");Ut(Iut,"isWardley");Nut=class extends Kd{static{s(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={Accelerator:{name:iE.$type,properties:{name:{name:iE.name},x:{name:iE.x},y:{name:iE.y}},superTypes:[]},Anchor:{name:nE.$type,properties:{evolution:{name:nE.evolution},name:{name:nE.name},visibility:{name:nE.visibility}},superTypes:[]},Annotation:{name:$b.$type,properties:{number:{name:$b.number},text:{name:$b.text},x:{name:$b.x},y:{name:$b.y}},superTypes:[]},Annotations:{name:UB.$type,properties:{x:{name:UB.x},y:{name:UB.y}},superTypes:[]},Architecture:{name:Jl.$type,properties:{accDescr:{name:Jl.accDescr},accTitle:{name:Jl.accTitle},edges:{name:Jl.edges,defaultValue:[]},groups:{name:Jl.groups,defaultValue:[]},junctions:{name:Jl.junctions,defaultValue:[]},services:{name:Jl.services,defaultValue:[]},title:{name:Jl.title}},superTypes:[]},Axis:{name:sE.$type,properties:{label:{name:sE.label},name:{name:sE.name}},superTypes:[]},Branch:{name:Gb.$type,properties:{name:{name:Gb.name},order:{name:Gb.order}},superTypes:[Gf.$type]},Checkout:{name:cut.$type,properties:{branch:{name:cut.branch}},superTypes:[Gf.$type]},CherryPicking:{name:aE.$type,properties:{id:{name:aE.id},parent:{name:aE.parent},tags:{name:aE.tags,defaultValue:[]}},superTypes:[Gf.$type]},ClassDefStatement:{name:HB.$type,properties:{className:{name:HB.className},styleText:{name:HB.styleText}},superTypes:[]},Commit:{name:Wf.$type,properties:{id:{name:Wf.id},message:{name:Wf.message},tags:{name:Wf.tags,defaultValue:[]},type:{name:Wf.type}},superTypes:[Gf.$type]},Component:{name:Vf.$type,properties:{decorator:{name:Vf.decorator},evolution:{name:Vf.evolution},inertia:{name:Vf.inertia,defaultValue:!1},label:{name:Vf.label},name:{name:Vf.name},visibility:{name:Vf.visibility}},superTypes:[]},Curve:{name:oE.$type,properties:{entries:{name:oE.entries,defaultValue:[]},label:{name:oE.label},name:{name:oE.name}},superTypes:[]},Deaccelerator:{name:lE.$type,properties:{name:{name:lE.name},x:{name:lE.x},y:{name:lE.y}},superTypes:[]},Decorator:{name:uut.$type,properties:{strategy:{name:uut.strategy}},superTypes:[]},Direction:{name:oy.$type,properties:{accDescr:{name:oy.accDescr},accTitle:{name:oy.accTitle},dir:{name:oy.dir},statements:{name:oy.statements,defaultValue:[]},title:{name:oy.title}},superTypes:[Ah.$type]},Edge:{name:Zl.$type,properties:{lhsDir:{name:Zl.lhsDir},lhsGroup:{name:Zl.lhsGroup,defaultValue:!1},lhsId:{name:Zl.lhsId},lhsInto:{name:Zl.lhsInto,defaultValue:!1},rhsDir:{name:Zl.rhsDir},rhsGroup:{name:Zl.rhsGroup,defaultValue:!1},rhsId:{name:Zl.rhsId},rhsInto:{name:Zl.rhsInto,defaultValue:!1},title:{name:Zl.title}},superTypes:[]},Entry:{name:YB.$type,properties:{axis:{name:YB.axis,referenceType:sE.$type},value:{name:YB.value}},superTypes:[]},Evolution:{name:hut.$type,properties:{stages:{name:hut.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:cE.$type,properties:{boundary:{name:cE.boundary},name:{name:cE.name},secondName:{name:cE.secondName}},superTypes:[]},Evolve:{name:XB.$type,properties:{component:{name:XB.component},target:{name:XB.target}},superTypes:[]},GitGraph:{name:Ah.$type,properties:{accDescr:{name:Ah.accDescr},accTitle:{name:Ah.accTitle},statements:{name:Ah.statements,defaultValue:[]},title:{name:Ah.title}},superTypes:[]},Group:{name:Fb.$type,properties:{icon:{name:Fb.icon},id:{name:Fb.id},in:{name:Fb.in},title:{name:Fb.title}},superTypes:[]},Info:{name:uy.$type,properties:{accDescr:{name:uy.accDescr},accTitle:{name:uy.accTitle},title:{name:uy.title}},superTypes:[]},Item:{name:Vb.$type,properties:{classSelector:{name:Vb.classSelector},name:{name:Vb.name}},superTypes:[]},Junction:{name:KB.$type,properties:{id:{name:KB.id},in:{name:KB.in}},superTypes:[]},Label:{name:zb.$type,properties:{negX:{name:zb.negX,defaultValue:!1},negY:{name:zb.negY,defaultValue:!1},offsetX:{name:zb.offsetX},offsetY:{name:zb.offsetY}},superTypes:[]},Leaf:{name:uE.$type,properties:{classSelector:{name:uE.classSelector},name:{name:uE.name},value:{name:uE.value}},superTypes:[Vb.$type]},Link:{name:zf.$type,properties:{arrow:{name:zf.arrow},from:{name:zf.from},fromPort:{name:zf.fromPort},linkLabel:{name:zf.linkLabel},to:{name:zf.to},toPort:{name:zf.toPort}},superTypes:[]},Merge:{name:qf.$type,properties:{branch:{name:qf.branch},id:{name:qf.id},tags:{name:qf.tags,defaultValue:[]},type:{name:qf.type}},superTypes:[Gf.$type]},Note:{name:hE.$type,properties:{evolution:{name:hE.evolution},text:{name:hE.text},visibility:{name:hE.visibility}},superTypes:[]},Option:{name:QB.$type,properties:{name:{name:QB.name},value:{name:QB.value,defaultValue:!1}},superTypes:[]},Packet:{name:jf.$type,properties:{accDescr:{name:jf.accDescr},accTitle:{name:jf.accTitle},blocks:{name:jf.blocks,defaultValue:[]},title:{name:jf.title}},superTypes:[]},PacketBlock:{name:Uf.$type,properties:{bits:{name:Uf.bits},end:{name:Uf.end},label:{name:Uf.label},start:{name:Uf.start}},superTypes:[]},Pie:{name:Rh.$type,properties:{accDescr:{name:Rh.accDescr},accTitle:{name:Rh.accTitle},sections:{name:Rh.sections,defaultValue:[]},showData:{name:Rh.showData,defaultValue:!1},title:{name:Rh.title}},superTypes:[]},PieSection:{name:Wb.$type,properties:{label:{name:Wb.label},value:{name:Wb.value}},superTypes:[]},Pipeline:{name:ZB.$type,properties:{components:{name:ZB.components,defaultValue:[]},parent:{name:ZB.parent}},superTypes:[]},PipelineComponent:{name:dE.$type,properties:{evolution:{name:dE.evolution},label:{name:dE.label},name:{name:dE.name}},superTypes:[]},Radar:{name:vh.$type,properties:{accDescr:{name:vh.accDescr},accTitle:{name:vh.accTitle},axes:{name:vh.axes,defaultValue:[]},curves:{name:vh.curves,defaultValue:[]},options:{name:vh.options,defaultValue:[]},title:{name:vh.title}},superTypes:[]},Section:{name:JB.$type,properties:{classSelector:{name:JB.classSelector},name:{name:JB.name}},superTypes:[Vb.$type]},Service:{name:ly.$type,properties:{icon:{name:ly.icon},iconText:{name:ly.iconText},id:{name:ly.id},in:{name:ly.in},title:{name:ly.title}},superTypes:[]},Size:{name:tP.$type,properties:{height:{name:tP.height},width:{name:tP.width}},superTypes:[]},Statement:{name:Gf.$type,properties:{},superTypes:[]},TreeNode:{name:fE.$type,properties:{indent:{name:fE.indent},name:{name:fE.name}},superTypes:[]},TreeView:{name:cy.$type,properties:{accDescr:{name:cy.accDescr},accTitle:{name:cy.accTitle},nodes:{name:cy.nodes,defaultValue:[]},title:{name:cy.title}},superTypes:[]},Treemap:{name:Hf.$type,properties:{accDescr:{name:Hf.accDescr},accTitle:{name:Hf.accTitle},title:{name:Hf.title},TreemapRows:{name:Hf.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:eP.$type,properties:{indent:{name:eP.indent},item:{name:eP.item}},superTypes:[]},Wardley:{name:On.$type,properties:{accDescr:{name:On.accDescr},accelerators:{name:On.accelerators,defaultValue:[]},accTitle:{name:On.accTitle},anchors:{name:On.anchors,defaultValue:[]},annotation:{name:On.annotation,defaultValue:[]},annotations:{name:On.annotations,defaultValue:[]},components:{name:On.components,defaultValue:[]},deaccelerators:{name:On.deaccelerators,defaultValue:[]},evolution:{name:On.evolution},evolves:{name:On.evolves,defaultValue:[]},links:{name:On.links,defaultValue:[]},notes:{name:On.notes,defaultValue:[]},pipelines:{name:On.pipelines,defaultValue:[]},size:{name:On.size},title:{name:On.title}},superTypes:[]}}}static{Ut(this,"MermaidAstReflection")}},ho=new Nut,k7t=Ut(()=>dut??(dut=uo(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),T7t=Ut(()=>fut??(fut=uo(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"GitGraphGrammarGrammar"),C7t=Ut(()=>put??(put=uo(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"InfoGrammarGrammar"),S7t=Ut(()=>mut??(mut=uo(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PacketGrammarGrammar"),w7t=Ut(()=>gut??(gut=uo(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PieGrammarGrammar"),_7t=Ut(()=>yut??(yut=uo(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),"RadarGrammarGrammar"),E7t=Ut(()=>xut??(xut=uo(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammarGrammar"),v7t=Ut(()=>but??(but=uo(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),A7t=Ut(()=>kut??(kut=uo(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z][A-Za-z0-9_()&]*(?:[ \\\\t]+[A-Za-z(][A-Za-z0-9_()&]*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"WardleyGrammarGrammar"),R7t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},L7t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},D7t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},I7t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},N7t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},O7t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},M7t={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},B7t={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},P7t={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},yn={AstReflection:Ut(()=>new Nut,"AstReflection")},hP={Grammar:Ut(()=>k7t(),"Grammar"),LanguageMetaData:Ut(()=>R7t,"LanguageMetaData"),parser:{}},dP={Grammar:Ut(()=>T7t(),"Grammar"),LanguageMetaData:Ut(()=>L7t,"LanguageMetaData"),parser:{}},fP={Grammar:Ut(()=>C7t(),"Grammar"),LanguageMetaData:Ut(()=>D7t,"LanguageMetaData"),parser:{}},pP={Grammar:Ut(()=>S7t(),"Grammar"),LanguageMetaData:Ut(()=>I7t,"LanguageMetaData"),parser:{}},mP={Grammar:Ut(()=>w7t(),"Grammar"),LanguageMetaData:Ut(()=>N7t,"LanguageMetaData"),parser:{}},gP={Grammar:Ut(()=>_7t(),"Grammar"),LanguageMetaData:Ut(()=>O7t,"LanguageMetaData"),parser:{}},yP={Grammar:Ut(()=>E7t(),"Grammar"),LanguageMetaData:Ut(()=>M7t,"LanguageMetaData"),parser:{}},xP={Grammar:Ut(()=>v7t(),"Grammar"),LanguageMetaData:Ut(()=>B7t,"LanguageMetaData"),parser:{}},bP={Grammar:Ut(()=>A7t(),"Grammar"),LanguageMetaData:Ut(()=>P7t,"LanguageMetaData"),parser:{}},$7t=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,F7t=/accTitle[\t ]*:([^\n\r]*)/,V7t=/title([\t ][^\n\r]*|)/,z7t={ACC_DESCR:$7t,ACC_TITLE:F7t,TITLE:V7t},fo=class extends Rf{static{s(this,"AbstractMermaidValueConverter")}static{Ut(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let i=this.runCommonConverter(e,t,r);return i===void 0&&(i=this.runCustomConverter(e,t,r)),i===void 0?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){let i=z7t[e.name];if(i===void 0)return;let n=i.exec(t);if(n!==null){if(n[1]!==void 0)return n[1].trim().replace(/[\t ]{2,}/gm," ");if(n[2]!==void 0)return n[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},Yc=class extends fo{static{s(this,"CommonValueConverter")}static{Ut(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},Mn=class extends Uc{static{s(this,"AbstractMermaidTokenBuilder")}static{Ut(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let i=super.buildKeywordTokens(e,t,r);return i.forEach(n=>{this.keywords.has(n.name)&&n.PATTERN!==void 0&&(n.PATTERN=new RegExp(n.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},G7t=class extends Mn{static{s(this,"CommonTokenBuilder")}static{Ut(this,"CommonTokenBuilder")}}});function Out(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let i={Treemap:t.checkSingleRoot.bind(t)};r.register(i,t)}}function mE(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),yP,pE);return t.ServiceRegistry.register(r),Out(r),{shared:t,Treemap:r}}var W7t,q7t,j7t,U7t,pE,kP=b(()=>{"use strict";an();Is();W7t=class extends Mn{static{s(this,"TreemapTokenBuilder")}static{Ut(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},q7t=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,j7t=class extends fo{static{s(this,"TreemapValueConverter")}static{Ut(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));if(e.name==="SEPARATOR")return t.substring(1,t.length-1);if(e.name==="STRING2")return t.substring(1,t.length-1);if(e.name==="INDENTATION")return t.length;if(e.name==="ClassDef"){if(typeof t!="string")return t;let i=q7t.exec(t);if(i)return{$type:"ClassDefStatement",className:i[1],styleText:i[2]||void 0}}}};s(Out,"registerValidationChecks");Ut(Out,"registerValidationChecks");U7t=class{static{s(this,"TreemapValidator")}static{Ut(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let i of e.TreemapRows)i.item&&(r===void 0&&i.indent===void 0?r=0:i.indent===void 0?t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}):r!==void 0&&r>=parseInt(i.indent,10)&&t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}))}},pE={parser:{TokenBuilder:Ut(()=>new W7t,"TokenBuilder"),ValueConverter:Ut(()=>new j7t,"ValueConverter")},validation:{TreemapValidator:Ut(()=>new U7t,"TreemapValidator")}};s(mE,"createTreemapServices");Ut(mE,"createTreemapServices")});function yE(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),bP,gE);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}var H7t,gE,TP=b(()=>{"use strict";an();Is();H7t=class extends fo{static{s(this,"WardleyValueConverter")}static{Ut(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},gE={parser:{ValueConverter:Ut(()=>new H7t,"ValueConverter")}};s(yE,"createWardleyServices");Ut(yE,"createWardleyServices")});function bE(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),dP,xE);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}var Y7t,xE,CP=b(()=>{"use strict";an();Is();Y7t=class extends Mn{static{s(this,"GitGraphTokenBuilder")}static{Ut(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},xE={parser:{TokenBuilder:Ut(()=>new Y7t,"TokenBuilder"),ValueConverter:Ut(()=>new Yc,"ValueConverter")}};s(bE,"createGitGraphServices");Ut(bE,"createGitGraphServices")});function TE(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),fP,kE);return t.ServiceRegistry.register(r),{shared:t,Info:r}}var X7t,kE,SP=b(()=>{"use strict";an();Is();X7t=class extends Mn{static{s(this,"InfoTokenBuilder")}static{Ut(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},kE={parser:{TokenBuilder:Ut(()=>new X7t,"TokenBuilder"),ValueConverter:Ut(()=>new Yc,"ValueConverter")}};s(TE,"createInfoServices");Ut(TE,"createInfoServices")});function SE(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),pP,CE);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}var K7t,CE,wP=b(()=>{"use strict";an();Is();K7t=class extends Mn{static{s(this,"PacketTokenBuilder")}static{Ut(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},CE={parser:{TokenBuilder:Ut(()=>new K7t,"TokenBuilder"),ValueConverter:Ut(()=>new Yc,"ValueConverter")}};s(SE,"createPacketServices");Ut(SE,"createPacketServices")});function _E(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),mP,wE);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}var Q7t,Z7t,wE,_P=b(()=>{"use strict";an();Is();Q7t=class extends Mn{static{s(this,"PieTokenBuilder")}static{Ut(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},Z7t=class extends fo{static{s(this,"PieValueConverter")}static{Ut(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},wE={parser:{TokenBuilder:Ut(()=>new Q7t,"TokenBuilder"),ValueConverter:Ut(()=>new Z7t,"ValueConverter")}};s(_E,"createPieServices");Ut(_E,"createPieServices")});function vE(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),xP,EE);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}var J7t,t$t,EE,EP=b(()=>{"use strict";an();Is();J7t=class extends fo{static{s(this,"TreeViewValueConverter")}static{Ut(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="STRING2")return t.substring(1,t.length-1)}},t$t=class extends Mn{static{s(this,"TreeViewTokenBuilder")}static{Ut(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},EE={parser:{TokenBuilder:Ut(()=>new t$t,"TokenBuilder"),ValueConverter:Ut(()=>new J7t,"ValueConverter")}};s(vE,"createTreeViewServices");Ut(vE,"createTreeViewServices")});function RE(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),hP,AE);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}var e$t,r$t,AE,vP=b(()=>{"use strict";an();Is();e$t=class extends Mn{static{s(this,"ArchitectureTokenBuilder")}static{Ut(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},r$t=class extends fo{static{s(this,"ArchitectureValueConverter")}static{Ut(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let i=t.replace(/^\[|]$/g,"").trim();return(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1),i=i.replace(/\\"/g,'"').replace(/\\'/g,"'")),i.trim()}}},AE={parser:{TokenBuilder:Ut(()=>new e$t,"TokenBuilder"),ValueConverter:Ut(()=>new r$t,"ValueConverter")}};s(RE,"createArchitectureServices");Ut(RE,"createArchitectureServices")});function DE(e=Ki){let t=Vr(Xi(e),yn),r=Vr(Yi({shared:t}),gP,LE);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}var i$t,LE,AP=b(()=>{"use strict";an();Is();i$t=class extends Mn{static{s(this,"RadarTokenBuilder")}static{Ut(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},LE={parser:{TokenBuilder:Ut(()=>new i$t,"TokenBuilder"),ValueConverter:Ut(()=>new Yc,"ValueConverter")}};s(DE,"createRadarServices");Ut(DE,"createRadarServices")});var Mut={};Fe(Mut,{InfoModule:()=>kE,createInfoServices:()=>TE});var But=b(()=>{"use strict";SP();an()});var Put={};Fe(Put,{PacketModule:()=>CE,createPacketServices:()=>SE});var $ut=b(()=>{"use strict";wP();an()});var Fut={};Fe(Fut,{PieModule:()=>wE,createPieServices:()=>_E});var Vut=b(()=>{"use strict";_P();an()});var zut={};Fe(zut,{TreeViewModule:()=>EE,createTreeViewServices:()=>vE});var Gut=b(()=>{"use strict";EP();an()});var Wut={};Fe(Wut,{ArchitectureModule:()=>AE,createArchitectureServices:()=>RE});var qut=b(()=>{"use strict";vP();an()});var jut={};Fe(jut,{GitGraphModule:()=>xE,createGitGraphServices:()=>bE});var Uut=b(()=>{"use strict";CP();an()});var Hut={};Fe(Hut,{RadarModule:()=>LE,createRadarServices:()=>DE});var Yut=b(()=>{"use strict";AP();an()});var Xut={};Fe(Xut,{TreemapModule:()=>pE,createTreemapServices:()=>mE});var Kut=b(()=>{"use strict";kP();an()});var Qut={};Fe(Qut,{WardleyModule:()=>gE,createWardleyServices:()=>yE});var Zut=b(()=>{"use strict";TP();an()});async function Hn(e,t){let r=n$t[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);tl[e]||await r();let n=tl[e].parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new s$t(n);return n.value}var tl,n$t,s$t,Xc=b(()=>{"use strict";kP();TP();CP();SP();wP();_P();EP();vP();AP();an();tl={},n$t={info:Ut(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(But(),Mut)),t=e().Info.parser.LangiumParser;tl.info=t},"info"),packet:Ut(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>($ut(),Put)),t=e().Packet.parser.LangiumParser;tl.packet=t},"packet"),pie:Ut(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(Vut(),Fut)),t=e().Pie.parser.LangiumParser;tl.pie=t},"pie"),treeView:Ut(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(Gut(),zut)),t=e().TreeView.parser.LangiumParser;tl.treeView=t},"treeView"),architecture:Ut(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(qut(),Wut)),t=e().Architecture.parser.LangiumParser;tl.architecture=t},"architecture"),gitGraph:Ut(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(Uut(),jut)),t=e().GitGraph.parser.LangiumParser;tl.gitGraph=t},"gitGraph"),radar:Ut(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(Yut(),Hut)),t=e().Radar.parser.LangiumParser;tl.radar=t},"radar"),treemap:Ut(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(Kut(),Xut)),t=e().Treemap.parser.LangiumParser;tl.treemap=t},"treemap"),wardley:Ut(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(Zut(),Qut)),t=e().Wardley.parser.LangiumParser;tl.wardley=t},"wardley")};s(Hn,"parse");Ut(Hn,"parse");s$t=class extends Error{static{s(this,"MermaidParseError")}constructor(e){let t=e.lexerErrors.map(i=>{let n=i.line!==void 0&&!isNaN(i.line)?i.line:"?",a=i.column!==void 0&&!isNaN(i.column)?i.column:"?";return`Lexer error on line ${n}, column ${a}: ${i.message}`}).join(` +`),r=e.parserErrors.map(i=>{let n=i.token.startLine!==void 0&&!isNaN(i.token.startLine)?i.token.startLine:"?",a=i.token.startColumn!==void 0&&!isNaN(i.token.startColumn)?i.token.startColumn:"?";return`Parse error on line ${n}, column ${a}: ${i.message}`}).join(` +`);super(`Parsing failed: ${t} ${r}`),this.result=e}static{Ut(this,"MermaidParseError")}}});function aa(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var Lh=b(()=>{"use strict";s(aa,"populateCommonDb")});var zr,IE=b(()=>{"use strict";zr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}});var Dh,NE=b(()=>{"use strict";Dh=class{constructor(t){this.init=t;this.records=this.init()}static{s(this,"ImperativeState")}reset(){this.records=this.init()}}});function RP(){return lL({length:7})}function o$t(e,t){let r=Object.create(null);return e.reduce((i,n)=>{let a=t(n);return r[a]||(r[a]=!0,i.push(n)),i},[])}function Jut(e,t,r){let i=e.indexOf(t);i===-1?e.push(r):e.splice(i,1,r)}function eht(e){let t=e.reduce((n,a)=>n.seq>a.seq?n:a,e[0]),r="";e.forEach(function(n){n===t?r+=" *":r+=" |"});let i=[r,t.id,t.seq];for(let n in ce.records.branches)ce.records.branches.get(n)===t.id&&i.push(n);if(z.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=ce.records.commits.get(t.parents[0]);Jut(e,t,n),t.parents[1]&&e.push(ce.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let n=ce.records.commits.get(t.parents[0]);Jut(e,t,n)}}e=o$t(e,n=>n.id),eht(e)}var a$t,Yf,ce,l$t,c$t,u$t,h$t,d$t,f$t,p$t,tht,m$t,g$t,y$t,x$t,b$t,rht,k$t,T$t,C$t,OE,LP=b(()=>{"use strict";Jt();Re();Qe();fr();yi();IE();NE();ps();a$t=Ue.gitGraph,Yf=s(()=>Wr({...a$t,...le().gitGraph}),"getConfig"),ce=new Dh(()=>{let e=Yf(),t=e.mainBranchName,r=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:r}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});s(RP,"getID");s(o$t,"uniqBy");l$t=s(function(e){ce.records.direction=e},"setDirection"),c$t=s(function(e){z.debug("options str",e),e=e?.trim(),e=e||"{}";try{ce.records.options=JSON.parse(e)}catch(t){z.error("error while parsing gitGraph options",t.message)}},"setOptions"),u$t=s(function(){return ce.records.options},"getOptions"),h$t=s(function(e){let t=e.msg,r=e.id,i=e.type,n=e.tags;z.info("commit",t,r,i,n),z.debug("Entering commit:",t,r,i,n);let a=Yf();r=qt.sanitizeText(r,a),t=qt.sanitizeText(t,a),n=n?.map(l=>qt.sanitizeText(l,a));let o={id:r||ce.records.seq+"-"+RP(),message:t,seq:ce.records.seq++,type:i??zr.NORMAL,tags:n??[],parents:ce.records.head==null?[]:[ce.records.head.id],branch:ce.records.currBranch};ce.records.head=o,z.info("main branch",a.mainBranchName),ce.records.commits.has(o.id)&&z.warn(`Commit ID ${o.id} already exists`),ce.records.commits.set(o.id,o),ce.records.branches.set(ce.records.currBranch,o.id),z.debug("in pushCommit "+o.id)},"commit"),d$t=s(function(e){let t=e.name,r=e.order;if(t=qt.sanitizeText(t,Yf()),ce.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);ce.records.branches.set(t,ce.records.head!=null?ce.records.head.id:null),ce.records.branchConfig.set(t,{name:t,order:r}),tht(t),z.debug("in createBranch")},"branch"),f$t=s(e=>{let t=e.branch,r=e.id,i=e.type,n=e.tags,a=Yf();t=qt.sanitizeText(t,a),r&&(r=qt.sanitizeText(r,a));let o=ce.records.branches.get(ce.records.currBranch),l=ce.records.branches.get(t),u=o?ce.records.commits.get(o):void 0,h=l?ce.records.commits.get(l):void 0;if(u&&h&&u.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(ce.records.currBranch===t){let p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},p}if(u===void 0||!u){let p=new Error(`Incorrect usage of "merge". Current branch (${ce.records.currBranch})has no commits`);throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},p}if(!ce.records.branches.has(t)){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},p}if(h===void 0||!h){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},p}if(u===h){let p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},p}if(r&&ce.records.commits.has(r)){let p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw p.hash={text:`merge ${t} ${r} ${i} ${n?.join(" ")}`,token:`merge ${t} ${r} ${i} ${n?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${n?.join(" ")}`]},p}let d=l||"",f={id:r||`${ce.records.seq}-${RP()}`,message:`merged branch ${t} into ${ce.records.currBranch}`,seq:ce.records.seq++,parents:ce.records.head==null?[]:[ce.records.head.id,d],branch:ce.records.currBranch,type:zr.MERGE,customType:i,customId:!!r,tags:n??[]};ce.records.head=f,ce.records.commits.set(f.id,f),ce.records.branches.set(ce.records.currBranch,f.id),z.debug(ce.records.branches),z.debug("in mergeBranch")},"merge"),p$t=s(function(e){let t=e.id,r=e.targetId,i=e.tags,n=e.parent;z.debug("Entering cherryPick:",t,r,i);let a=Yf();if(t=qt.sanitizeText(t,a),r=qt.sanitizeText(r,a),i=i?.map(u=>qt.sanitizeText(u,a)),n=qt.sanitizeText(n,a),!t||!ce.records.commits.has(t)){let u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},u}let o=ce.records.commits.get(t);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&!(Array.isArray(o.parents)&&o.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=o.branch;if(o.type===zr.MERGE&&!n)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!ce.records.commits.has(r)){if(l===ce.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let u=ce.records.branches.get(ce.records.currBranch);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${ce.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let h=ce.records.commits.get(u);if(h===void 0||!h){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${ce.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let d={id:ce.records.seq+"-"+RP(),message:`cherry-picked ${o?.message} into ${ce.records.currBranch}`,seq:ce.records.seq++,parents:ce.records.head==null?[]:[ce.records.head.id,o.id],branch:ce.records.currBranch,type:zr.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${o.id}${o.type===zr.MERGE?`|parent:${n}`:""}`]};ce.records.head=d,ce.records.commits.set(d.id,d),ce.records.branches.set(ce.records.currBranch,d.id),z.debug(ce.records.branches),z.debug("in cherryPick")}},"cherryPick"),tht=s(function(e){if(e=qt.sanitizeText(e,Yf()),ce.records.branches.has(e)){ce.records.currBranch=e;let t=ce.records.branches.get(ce.records.currBranch);t===void 0||!t?ce.records.head=null:ce.records.head=ce.records.commits.get(t)??null}else{let t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},"checkout");s(Jut,"upsert");s(eht,"prettyPrintCommitHistory");m$t=s(function(){z.debug(ce.records.commits);let e=rht()[0];eht([e])},"prettyPrint"),g$t=s(function(){ce.reset(),He()},"clear"),y$t=s(function(){return[...ce.records.branchConfig.values()].map((t,r)=>t.order!==null&&t.order!==void 0?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),x$t=s(function(){return ce.records.branches},"getBranches"),b$t=s(function(){return ce.records.commits},"getCommits"),rht=s(function(){let e=[...ce.records.commits.values()];return e.forEach(function(t){z.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),k$t=s(function(){return ce.records.currBranch},"getCurrentBranch"),T$t=s(function(){return ce.records.direction},"getDirection"),C$t=s(function(){return ce.records.head},"getHead"),OE={commitType:zr,getConfig:Yf,setDirection:l$t,setOptions:c$t,getOptions:u$t,commit:h$t,branch:d$t,merge:f$t,cherryPick:p$t,checkout:tht,prettyPrint:m$t,clear:g$t,getBranchesAsObjArray:y$t,getBranches:x$t,getCommits:b$t,getCommitsArray:rht,getCurrentBranch:k$t,getDirection:T$t,getHead:C$t,setAccTitle:Ye,getAccTitle:Ze,getAccDescription:tr,setAccDescription:Je,setDiagramTitle:sr,getDiagramTitle:er}});var S$t,w$t,_$t,E$t,v$t,A$t,R$t,iht,nht=b(()=>{"use strict";Xc();Jt();Lh();LP();IE();S$t=s((e,t)=>{aa(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)w$t(r,t)},"populate"),w$t=s((e,t)=>{let i={Commit:s(n=>t.commit(_$t(n)),"Commit"),Branch:s(n=>t.branch(E$t(n)),"Branch"),Merge:s(n=>t.merge(v$t(n)),"Merge"),Checkout:s(n=>t.checkout(A$t(n)),"Checkout"),CherryPicking:s(n=>t.cherryPick(R$t(n)),"CherryPicking")}[e.$type];i?i(e):z.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),_$t=s(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?zr[e.type]:zr.NORMAL,tags:e.tags??void 0}),"parseCommit"),E$t=s(e=>({name:e.name,order:e.order??0}),"parseBranch"),v$t=s(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?zr[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),A$t=s(e=>e.branch,"parseCheckout"),R$t=s(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),iht={parse:s(async e=>{let t=await Hn("gitGraph",e);z.debug(t),S$t(t,OE)},"parse")}});var Ih,Nh,tc,Kc,Xf,PE,DP,IP,L$t,Kf,oa,la,ME,qb,BE,Qc,Cr,D$t,aht,oht,I$t,N$t,O$t,M$t,B$t,P$t,$$t,F$t,V$t,z$t,G$t,W$t,sht,q$t,jb,j$t,U$t,H$t,Y$t,X$t,lht,cht=b(()=>{"use strict";lr();ye();Jt();Re();IE();Ih=10,Nh=40,tc=4,Kc=2,Xf=8,PE=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),DP=12,IP=new Set(["redux-color","redux-dark-color"]),L$t=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Kf=s((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),oa=new Map,la=new Map,ME=30,qb=new Map,BE=[],Qc=0,Cr="LR",D$t=s(()=>{oa.clear(),la.clear(),qb.clear(),Qc=0,BE=[],Cr="LR"},"clear"),aht=s(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(i=>{let n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=i.trim(),t.appendChild(n)}),t},"drawText"),oht=s(e=>{let t,r,i;return Cr==="BT"?(r=s((n,a)=>n<=a,"comparisonFunc"),i=1/0):(r=s((n,a)=>n>=a,"comparisonFunc"),i=0),e.forEach(n=>{let a=Cr==="TB"||Cr=="BT"?la.get(n)?.y:la.get(n)?.x;a!==void 0&&r(a,i)&&(t=n,i=a)}),t},"findClosestParent"),I$t=s(e=>{let t="",r=1/0;return e.forEach(i=>{let n=la.get(i).y;n<=r&&(t=i,r=n)}),t||void 0},"findClosestParentBT"),N$t=s((e,t,r)=>{let i=r,n=r,a=[];e.forEach(o=>{let l=t.get(o);if(!l)throw new Error(`Commit not found for key ${o}`);l.parents.length?(i=M$t(l),n=Math.max(i,n)):a.push(l),B$t(l,i)}),i=n,a.forEach(o=>{P$t(o,i,r)}),e.forEach(o=>{let l=t.get(o);if(l?.parents.length){let u=I$t(l.parents);i=la.get(u).y-Nh,i<=n&&(n=i);let h=oa.get(l.branch).pos,d=i-Ih;la.set(l.id,{x:h,y:d})}})},"setParallelBTPos"),O$t=s(e=>{let t=oht(e.parents.filter(i=>i!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=la.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),M$t=s(e=>O$t(e)+Nh,"calculateCommitPosition"),B$t=s((e,t)=>{let r=oa.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let i=r.pos,n=t+Ih;return la.set(e.id,{x:i,y:n}),{x:i,y:n}},"setCommitPosition"),P$t=s((e,t,r)=>{let i=oa.get(e.branch);if(!i)throw new Error(`Branch not found for commit ${e.id}`);let n=t+r,a=i.pos;la.set(e.id,{x:a,y:n})},"setRootPosition"),$$t=s((e,t,r,i,n,a)=>{let{theme:o}=Q(),l=PE.has(o??""),u=IP.has(o??""),h=L$t.has(o??"");if(a===zr.HIGHLIGHT)e.append("rect").attr("x",r.x-10+(l?3:0)).attr("y",r.y-10+(l?3:0)).attr("width",l?14:20).attr("height",l?14:20).attr("class",`commit ${t.id} commit-highlight${Kf(n,Xf,u)} ${i}-outer`),e.append("rect").attr("x",r.x-6+(l?2:0)).attr("y",r.y-6+(l?2:0)).attr("width",l?8:12).attr("height",l?8:12).attr("class",`commit ${t.id} commit${Kf(n,Xf,u)} ${i}-inner`);else if(a===zr.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",l?7:10).attr("class",`commit ${t.id} ${i}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`);else{let d=e.append("circle");if(d.attr("cx",r.x),d.attr("cy",r.y),d.attr("r",l?7:10),d.attr("class",`commit ${t.id} commit${Kf(n,Xf,u)}`),a===zr.MERGE){let f=e.append("circle");f.attr("cx",r.x),f.attr("cy",r.y),f.attr("r",l?5:6),f.attr("class",`commit ${i} ${t.id} commit${Kf(n,Xf,u)}`)}if(a===zr.REVERSE){let f=e.append("path"),p=l?4:5;f.attr("d",`M ${r.x-p},${r.y-p}L${r.x+p},${r.y+p}M${r.x-p},${r.y+p}L${r.x+p},${r.y-p}`).attr("class",`commit ${i} ${t.id} commit${Kf(n,Xf,u)}`)}}},"drawCommitBullet"),F$t=s((e,t,r,i,n)=>{if(t.type!==zr.CHERRY_PICK&&(t.customId&&t.type===zr.MERGE||t.type!==zr.MERGE)&&n.showCommitLabel){let a=e.append("g"),o=a.insert("rect").attr("class","commit-label-bkg"),l=a.append("text").attr("x",i).attr("y",r.y+25).attr("class","commit-label").text(t.id),u=l.node()?.getBBox();if(u&&(o.attr("x",r.posWithOffset-u.width/2-Kc).attr("y",r.y+13.5).attr("width",u.width+2*Kc).attr("height",u.height+2*Kc),Cr==="TB"||Cr==="BT"?(o.attr("x",r.x-(u.width+4*tc+5)).attr("y",r.y-12),l.attr("x",r.x-(u.width+4*tc)).attr("y",r.y+u.height-12)):l.attr("x",r.posWithOffset-u.width/2),n.rotateCommitLabel))if(Cr==="TB"||Cr==="BT")l.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),o.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let h=-7.5-(u.width+10)/25*9.5,d=10+u.width/25*8.5;a.attr("transform","translate("+h+", "+d+") rotate(-45, "+i+", "+r.y+")")}}},"drawCommitLabel"),V$t=s((e,t,r,i)=>{if(t.tags.length>0){let n=0,a=0,o=0,l=[];for(let u of t.tags.reverse()){let h=e.insert("polygon"),d=e.append("circle"),f=e.append("text").attr("y",r.y-16-n).attr("class","tag-label").text(u),p=f.node()?.getBBox();if(!p)throw new Error("Tag bbox not found");a=Math.max(a,p.width),o=Math.max(o,p.height),f.attr("x",r.posWithOffset-p.width/2),l.push({tag:f,hole:d,rect:h,yOffset:n}),n+=20}for(let{tag:u,hole:h,rect:d,yOffset:f}of l){let p=o/2,m=r.y-19.2-f;if(d.attr("class","tag-label-bkg").attr("points",` + ${i-a/2-tc/2},${m+Kc} + ${i-a/2-tc/2},${m-Kc} + ${r.posWithOffset-a/2-tc},${m-p-Kc} + ${r.posWithOffset+a/2+tc},${m-p-Kc} + ${r.posWithOffset+a/2+tc},${m+p+Kc} + ${r.posWithOffset-a/2-tc},${m+p+Kc}`),h.attr("cy",m).attr("cx",i-a/2+tc/2).attr("r",1.5).attr("class","tag-hole"),Cr==="TB"||Cr==="BT"){let g=i+f;d.attr("class","tag-label-bkg").attr("points",` + ${r.x},${g+2} + ${r.x},${g-2} + ${r.x+Ih},${g-p-2} + ${r.x+Ih+a+4},${g-p-2} + ${r.x+Ih+a+4},${g+p+2} + ${r.x+Ih},${g+p+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+i+")"),h.attr("cx",r.x+tc/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+i+")"),u.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+i+")")}}}},"drawCommitTags"),z$t=s(e=>{switch(e.customType??e.type){case zr.NORMAL:return"commit-normal";case zr.REVERSE:return"commit-reverse";case zr.HIGHLIGHT:return"commit-highlight";case zr.MERGE:return"commit-merge";case zr.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),G$t=s((e,t,r,i)=>{let n={x:0,y:0};if(e.parents.length>0){let a=oht(e.parents);if(a){let o=i.get(a)??n;return t==="TB"?o.y+Nh:t==="BT"?(i.get(e.id)??n).y-Nh:o.x+Nh}}else return t==="TB"?ME:t==="BT"?(i.get(e.id)??n).y-Nh:0;return 0},"calculatePosition"),W$t=s((e,t,r)=>{let i=Cr==="BT"&&r?t:t+Ih,n=oa.get(e.branch)?.pos,a=Cr==="TB"||Cr==="BT"?oa.get(e.branch)?.pos:i;if(a===void 0||n===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let o=PE.has(Q().theme??""),l=Cr==="TB"||Cr==="BT"?i:n+(o?DP/2+1:-2);return{x:a,y:l,posWithOffset:i}},"getCommitPosition"),sht=s((e,t,r,i)=>{let n=e.append("g").attr("class","commit-bullets"),a=e.append("g").attr("class","commit-labels"),o=Cr==="TB"||Cr==="BT"?ME:0,l=[...t.keys()],u=i.parallelCommits??!1,h=s((f,p)=>{let m=t.get(f)?.seq,g=t.get(p)?.seq;return m!==void 0&&g!==void 0?m-g:0},"sortKeys"),d=l.sort(h);Cr==="BT"&&(u&&N$t(d,t,o),d=d.reverse()),d.forEach(f=>{let p=t.get(f);if(!p)throw new Error(`Commit not found for key ${f}`);u&&(o=G$t(p,Cr,o,la));let m=W$t(p,o,u);if(r){let g=z$t(p),y=p.customType??p.type,x=oa.get(p.branch)?.index??0;$$t(n,p,m,g,x,y),F$t(a,p,m,o,i),V$t(a,p,m,o)}Cr==="TB"||Cr==="BT"?la.set(p.id,{x:m.x,y:m.posWithOffset}):la.set(p.id,{x:m.posWithOffset,y:m.y}),o=Cr==="BT"&&u?o+Nh:o+Nh+Ih,o>Qc&&(Qc=o)})},"drawCommits"),q$t=s((e,t,r,i,n)=>{let o=(Cr==="TB"||Cr==="BT"?r.xh.branch===o,"isOnBranchToGetCurve"),u=s(h=>h.seq>e.seq&&h.sequ(h)&&l(h))},"shouldRerouteArrow"),jb=s((e,t,r=0)=>{let i=e+Math.abs(e-t)/2;if(r>5)return i;if(BE.every(o=>Math.abs(o-i)>=10))return BE.push(i),i;let a=Math.abs(e-t);return jb(e,t-a/5,r+1)},"findLane"),j$t=s((e,t,r,i)=>{let{theme:n}=Q(),a=IP.has(n??""),o=la.get(t.id),l=la.get(r.id);if(o===void 0||l===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let u=q$t(t,r,o,l,i),h="",d="",f=0,p=0,m=oa.get(r.branch)?.index;r.type===zr.MERGE&&t.id!==r.parents[0]&&(m=oa.get(t.branch)?.index);let g;if(u){h="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",f=10,p=10;let y=o.yl.x&&(h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,r.type===zr.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${o.x} ${l.y-f} ${d} ${o.x-p} ${l.y} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${l.x+f} ${o.y} ${h} ${l.x} ${o.y+p} L ${l.x} ${l.y}`),o.x===l.x&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`)):Cr==="BT"?(o.xl.x&&(h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,r.type===zr.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${o.x} ${l.y+f} ${h} ${o.x-p} ${l.y} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${l.x+f} ${o.y} ${d} ${l.x} ${o.y-p} L ${l.x} ${l.y}`),o.x===l.x&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`)):(o.yl.y&&(r.type===zr.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${l.x-f} ${o.y} ${h} ${l.x} ${o.y-p} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${o.x} ${l.y+f} ${d} ${o.x+p} ${l.y} L ${l.x} ${l.y}`),o.y===l.y&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`));if(g===void 0)throw new Error("Line definition not found");e.append("path").attr("d",g).attr("class","arrow arrow"+Kf(m,Xf,a))},"drawArrow"),U$t=s((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(i=>{let n=t.get(i);n.parents&&n.parents.length>0&&n.parents.forEach(a=>{j$t(r,t.get(a),n,t)})})},"drawArrows"),H$t=s((e,t,r,i)=>{let{look:n,theme:a,themeVariables:o}=Q(),{dropShadow:l,THEME_COLOR_LIMIT:u}=o,h=PE.has(a??""),d=IP.has(a??""),f=e.append("g");t.forEach((p,m)=>{let g=Kf(m,h?u:Xf,d),y=oa.get(p.name)?.pos;if(y===void 0)throw new Error(`Position not found for branch ${p.name}`);let x=Cr==="TB"||Cr==="BT"?y:h?y+DP/2+1:y-2,k=f.append("line");k.attr("x1",0),k.attr("y1",x),k.attr("x2",Qc),k.attr("y2",x),k.attr("class","branch branch"+g),Cr==="TB"?(k.attr("y1",ME),k.attr("x1",y),k.attr("y2",Qc),k.attr("x2",y)):Cr==="BT"&&(k.attr("y1",Qc),k.attr("x1",y),k.attr("y2",ME),k.attr("x2",y)),BE.push(x);let T=p.name,C=aht(T),_=f.insert("rect"),w=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+g);w.node().appendChild(C);let A=C.getBBox(),v=h?0:4,M=h?16:0,$=h?DP:0;n==="neo"&&_.attr("data-look","neo"),_.attr("class","branchLabelBkg label"+g).attr("style",n==="neo"?`filter:${h?`url(#${i}-drop-shadow)`:l}`:"").attr("rx",v).attr("ry",v).attr("x",-A.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-A.height/2+10).attr("width",A.width+18+M).attr("height",A.height+4+$),w.attr("transform","translate("+(-A.width-14-(r.rotateCommitLabel===!0?30:0)+M/2)+", "+(x-A.height/2-2)+")"),Cr==="TB"?(_.attr("x",y-A.width/2-10).attr("y",0),w.attr("transform","translate("+(y-A.width/2-5)+", 0)"),h&&(_.attr("transform",`translate(${-M/2-3}, ${-$-10})`),w.attr("transform","translate("+(y-A.width/2-5)+", "+(-$*2+7)+")"))):Cr==="BT"?(_.attr("x",y-A.width/2-10).attr("y",Qc),w.attr("transform","translate("+(y-A.width/2-5)+", "+Qc+")"),h&&(_.attr("transform",`translate(${-M/2-3}, ${$+10})`),w.attr("transform","translate("+(y-A.width/2-5)+", "+(Qc+$*2+4)+")"))):_.attr("transform","translate(-19, "+(x-12-$/2)+")")})},"drawBranches"),Y$t=s(function(e,t,r,i,n){return oa.set(e,{pos:t,index:r}),t+=50+(n?40:0)+(Cr==="TB"||Cr==="BT"?i.width/2:0),t},"setBranchPosition"),X$t=s(function(e,t,r,i){D$t(),z.debug("in gitgraph renderer",e+` +`,"id:",t,r);let n=i.db;if(!n.getConfig){z.error("getConfig method is not available on db");return}let a=n.getConfig(),o=a.rotateCommitLabel??!1;qb=n.getCommits();let l=n.getBranchesAsObjArray();Cr=n.getDirection();let u=vt(`[id="${t}"]`),{look:h,theme:d,themeVariables:f}=Q(),{useGradient:p,gradientStart:m,gradientStop:g,filterColor:y}=f;if(p){let k=u.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");k.append("stop").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",1),k.append("stop").attr("offset","100%").attr("stop-color",g).attr("stop-opacity",1)}h==="neo"&&PE.has(d??"")&&u.append("defs").append("filter").attr("id",t+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",y);let x=0;l.forEach((k,T)=>{let C=aht(k.name),_=u.append("g"),S=_.insert("g").attr("class","branchLabel"),w=S.insert("g").attr("class","label branch-label");w.node()?.appendChild(C);let A=C.getBBox();x=Y$t(k.name,x,T,A,o),w.remove(),S.remove(),_.remove()}),sht(u,qb,!1,a),a.showBranches&&H$t(u,l,a,t),U$t(u,qb),sht(u,qb,!0,a),Te.insertTitle(u,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),nA(void 0,u,a.diagramPadding,a.useMaxWidth)},"draw"),lht={draw:X$t}});var uht,hht,K$t,Q$t,Z$t,J$t,t9t,e9t,r9t,i9t,dht,fht=b(()=>{"use strict";Qe();uht=8,hht=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),K$t=new Set(["redux-color","redux-dark-color"]),Q$t=new Set(["neo","neo-dark"]),Z$t=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),J$t=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),t9t=s(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let i=0;i{let t=le(),{theme:r,themeVariables:i}=t,{borderColorArray:n}=i,a=hht.has(r);if(Q$t.has(r)){let o="";for(let l=0;l`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%uht;return` + .branch-label${t} { fill: ${e["gitBranchLabel"+r]}; } + .commit${t} { stroke: ${e["git"+r]}; fill: ${e["git"+r]}; } + .commit-highlight${t} { stroke: ${e["gitInv"+r]}; fill: ${e["gitInv"+r]}; } + .label${t} { fill: ${e["git"+r]}; } + .arrow${t} { stroke: ${e["git"+r]}; } + `}).join(` +`)}`,"normalTheme"),i9t=s(e=>{let t=le(),{theme:r}=t,i=J$t.has(r);return` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + ${i?e9t(e):r9t(e)} + + .branch { + stroke-width: ${e.strokeWidth}; + stroke: ${e.commitLineColor??e.lineColor}; + stroke-dasharray: ${i?"4 2":"2"}; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${i?e.nodeBorder:e.commitLabelColor}; ${i?`font-weight:${e.noteFontWeight};`:""}} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${i?"transparent":e.commitLabelBackground}; opacity: ${i?"":.5}; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${i?e.mainBkg:e.tagLabelBackground}; stroke: ${i?e.nodeBorder:e.tagLabelBorder}; ${i?`filter:${e.dropShadow}`:""} } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${i?e.mainBkg:e.primaryColor}; + fill: ${i?e.mainBkg:e.primaryColor}; + } + .commit-reverse { + stroke: ${i?e.mainBkg:e.primaryColor}; + fill: ${i?e.mainBkg:e.primaryColor}; + stroke-width: ${i?e.strokeWidth:3}; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${i?e.mainBkg:e.primaryColor}; + fill: ${i?e.mainBkg:e.primaryColor}; + } + + .arrow { + /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ + stroke-width: ${hht.has(r)?e.strokeWidth:8}; + stroke-linecap: round; + fill: none + } + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`},"getStyles"),dht=i9t});var pht={};Fe(pht,{diagram:()=>n9t});var n9t,mht=b(()=>{"use strict";nht();LP();cht();fht();n9t={parser:iht,db:OE,renderer:lht,styles:dht}});var NP,xht,bht=b(()=>{"use strict";NP=(function(){var e=s(function(B,O,R,N){for(R=R||{},N=B.length;N--;R[B[N]]=O);return R},"o"),t=[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],r=[1,26],i=[1,27],n=[1,28],a=[1,29],o=[1,30],l=[1,31],u=[1,32],h=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],g=[1,12],y=[1,13],x=[1,14],k=[1,15],T=[1,16],C=[1,19],_=[1,20],S=[1,21],w=[1,22],A=[1,23],v=[1,25],M=[1,35],$={trace:s(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:s(function(O,R,N,P,E,D,V){var L=D.length-1;switch(E){case 1:return D[L-1];case 2:this.$=[];break;case 3:D[L-1].push(D[L]),this.$=D[L-1];break;case 4:case 5:this.$=D[L];break;case 6:case 7:this.$=[];break;case 8:P.setWeekday("monday");break;case 9:P.setWeekday("tuesday");break;case 10:P.setWeekday("wednesday");break;case 11:P.setWeekday("thursday");break;case 12:P.setWeekday("friday");break;case 13:P.setWeekday("saturday");break;case 14:P.setWeekday("sunday");break;case 15:P.setWeekend("friday");break;case 16:P.setWeekend("saturday");break;case 17:P.setDateFormat(D[L].substr(11)),this.$=D[L].substr(11);break;case 18:P.enableInclusiveEndDates(),this.$=D[L].substr(18);break;case 19:P.TopAxis(),this.$=D[L].substr(8);break;case 20:P.setAxisFormat(D[L].substr(11)),this.$=D[L].substr(11);break;case 21:P.setTickInterval(D[L].substr(13)),this.$=D[L].substr(13);break;case 22:P.setExcludes(D[L].substr(9)),this.$=D[L].substr(9);break;case 23:P.setIncludes(D[L].substr(9)),this.$=D[L].substr(9);break;case 24:P.setTodayMarker(D[L].substr(12)),this.$=D[L].substr(12);break;case 27:P.setDiagramTitle(D[L].substr(6)),this.$=D[L].substr(6);break;case 28:this.$=D[L].trim(),P.setAccTitle(this.$);break;case 29:case 30:this.$=D[L].trim(),P.setAccDescription(this.$);break;case 31:P.addSection(D[L].substr(8)),this.$=D[L].substr(8);break;case 33:P.addTask(D[L-1],D[L]),this.$="task";break;case 34:this.$=D[L-1],P.setClickEvent(D[L-1],D[L],null);break;case 35:this.$=D[L-2],P.setClickEvent(D[L-2],D[L-1],D[L]);break;case 36:this.$=D[L-2],P.setClickEvent(D[L-2],D[L-1],null),P.setLink(D[L-2],D[L]);break;case 37:this.$=D[L-3],P.setClickEvent(D[L-3],D[L-2],D[L-1]),P.setLink(D[L-3],D[L]);break;case 38:this.$=D[L-2],P.setClickEvent(D[L-2],D[L],null),P.setLink(D[L-2],D[L-1]);break;case 39:this.$=D[L-3],P.setClickEvent(D[L-3],D[L-1],D[L]),P.setLink(D[L-3],D[L-2]);break;case 40:this.$=D[L-1],P.setLink(D[L-1],D[L]);break;case 41:case 47:this.$=D[L-1]+" "+D[L];break;case 42:case 43:case 45:this.$=D[L-2]+" "+D[L-1]+" "+D[L];break;case 44:case 46:this.$=D[L-3]+" "+D[L-2]+" "+D[L-1]+" "+D[L];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:i,14:n,15:a,16:o,17:l,18:u,19:18,20:h,21:d,22:f,23:p,24:m,25:g,26:y,27:x,28:k,29:T,30:C,31:_,33:S,35:w,36:A,37:24,38:v,40:M},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:i,14:n,15:a,16:o,17:l,18:u,19:18,20:h,21:d,22:f,23:p,24:m,25:g,26:y,27:x,28:k,29:T,30:C,31:_,33:S,35:w,36:A,37:24,38:v,40:M},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:s(function(O,R){if(R.recoverable)this.trace(O);else{var N=new Error(O);throw N.hash=R,N}},"parseError"),parse:s(function(O){var R=this,N=[0],P=[],E=[null],D=[],V=this.table,L="",q=0,H=0,K=0,U=2,st=1,X=D.slice.call(arguments,1),ut=Object.create(this.lexer),ot={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(ot.yy[mt]=this.yy[mt]);ut.setInput(O,ot.yy),ot.yy.lexer=ut,ot.yy.parser=this,typeof ut.yylloc>"u"&&(ut.yylloc={});var ht=ut.yylloc;D.push(ht);var it=ut.options&&ut.options.ranges;typeof ot.yy.parseError=="function"?this.parseError=ot.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(bt){N.length=N.length-2*bt,E.length=E.length-bt,D.length=D.length-bt}s(Ot,"popStack");function St(){var bt;return bt=P.pop()||ut.lex()||st,typeof bt!="number"&&(bt instanceof Array&&(P=bt,bt=P.pop()),bt=R.symbols_[bt]||bt),bt}s(St,"lex");for(var yt,Et,Ct,Bt,Lt,ee,at={},$e,pt,Wt,Ht;;){if(Ct=N[N.length-1],this.defaultActions[Ct]?Bt=this.defaultActions[Ct]:((yt===null||typeof yt>"u")&&(yt=St()),Bt=V[Ct]&&V[Ct][yt]),typeof Bt>"u"||!Bt.length||!Bt[0]){var Dt="";Ht=[];for($e in V[Ct])this.terminals_[$e]&&$e>U&&Ht.push("'"+this.terminals_[$e]+"'");ut.showPosition?Dt="Parse error on line "+(q+1)+`: +`+ut.showPosition()+` +Expecting `+Ht.join(", ")+", got '"+(this.terminals_[yt]||yt)+"'":Dt="Parse error on line "+(q+1)+": Unexpected "+(yt==st?"end of input":"'"+(this.terminals_[yt]||yt)+"'"),this.parseError(Dt,{text:ut.match,token:this.terminals_[yt]||yt,line:ut.yylineno,loc:ht,expected:Ht})}if(Bt[0]instanceof Array&&Bt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ct+", token: "+yt);switch(Bt[0]){case 1:N.push(yt),E.push(ut.yytext),D.push(ut.yylloc),N.push(Bt[1]),yt=null,Et?(yt=Et,Et=null):(H=ut.yyleng,L=ut.yytext,q=ut.yylineno,ht=ut.yylloc,K>0&&K--);break;case 2:if(pt=this.productions_[Bt[1]][1],at.$=E[E.length-pt],at._$={first_line:D[D.length-(pt||1)].first_line,last_line:D[D.length-1].last_line,first_column:D[D.length-(pt||1)].first_column,last_column:D[D.length-1].last_column},it&&(at._$.range=[D[D.length-(pt||1)].range[0],D[D.length-1].range[1]]),ee=this.performAction.apply(at,[L,H,q,ot.yy,Bt[1],E,D].concat(X)),typeof ee<"u")return ee;pt&&(N=N.slice(0,-1*pt*2),E=E.slice(0,-1*pt),D=D.slice(0,-1*pt)),N.push(this.productions_[Bt[1]][0]),E.push(at.$),D.push(at._$),Wt=V[N[N.length-2]][N[N.length-1]],N.push(Wt);break;case 3:return!0}}return!0},"parse")},I=(function(){var B={EOF:1,parseError:s(function(R,N){if(this.yy.parser)this.yy.parser.parseError(R,N);else throw new Error(R)},"parseError"),setInput:s(function(O,R){return this.yy=R||this.yy||{},this._input=O,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var O=this._input[0];this.yytext+=O,this.yyleng++,this.offset++,this.match+=O,this.matched+=O;var R=O.match(/(?:\r\n?|\n).*/g);return R?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),O},"input"),unput:s(function(O){var R=O.length,N=O.split(/(?:\r\n?|\n)/g);this._input=O+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-R),this.offset-=R;var P=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===P.length?this.yylloc.first_column:0)+P[P.length-N.length].length-N[0].length:this.yylloc.first_column-R},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-R]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(O){this.unput(this.match.slice(O))},"less"),pastInput:s(function(){var O=this.matched.substr(0,this.matched.length-this.match.length);return(O.length>20?"...":"")+O.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var O=this.match;return O.length<20&&(O+=this._input.substr(0,20-O.length)),(O.substr(0,20)+(O.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var O=this.pastInput(),R=new Array(O.length+1).join("-");return O+this.upcomingInput()+` +`+R+"^"},"showPosition"),test_match:s(function(O,R){var N,P,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),P=O[0].match(/(?:\r\n?|\n).*/g),P&&(this.yylineno+=P.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:P?P[P.length-1].length-P[P.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+O[0].length},this.yytext+=O[0],this.match+=O[0],this.matches=O,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(O[0].length),this.matched+=O[0],N=this.performAction.call(this,this.yy,this,R,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var D in E)this[D]=E[D];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var O,R,N,P;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),D=0;DR[0].length)){if(R=N,P=D,this.options.backtrack_lexer){if(O=this.test_match(N,E[D]),O!==!1)return O;if(this._backtrack){R=!1;continue}else return!1}else if(!this.options.flex)break}return R?(O=this.test_match(R,E[P]),O!==!1?O:!1):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:s(function(){var R=this.next();return R||this.lex()},"lex"),begin:s(function(R){this.conditionStack.push(R)},"begin"),popState:s(function(){var R=this.conditionStack.length-1;return R>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},"topState"),pushState:s(function(R){this.begin(R)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(R,N,P,E){var D=E;switch(P){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return B})();$.lexer=I;function F(){this.yy={}}return s(F,"Parser"),F.prototype=$,$.Parser=F,new F})();NP.parser=NP;xht=NP});var kht=Be((OP,MP)=>{"use strict";(function(e,t){typeof OP=="object"&&typeof MP<"u"?MP.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=t()})(OP,(function(){"use strict";var e="day";return function(t,r,i){var n=s(function(l){return l.add(4-l.isoWeekday(),e)},"a"),a=r.prototype;a.isoWeekYear=function(){return n(this).year()},a.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),e);var u,h,d,f,p=n(this),m=(u=this.isoWeekYear(),h=this.$u,d=(h?i.utc:i)().year(u).startOf("year"),f=4-d.isoWeekday(),d.isoWeekday()>4&&(f+=7),d.add(f,e));return p.diff(m,"week")+1},a.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var o=a.startOf;a.startOf=function(l,u){var h=this.$utils(),d=!!h.u(u)||u;return h.p(l)==="isoweek"?d?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.bind(this)(l,u)}}}))});var Tht=Be((BP,PP)=>{"use strict";(function(e,t){typeof BP=="object"&&typeof PP<"u"?PP.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(BP,(function(){"use strict";var e={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"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,n=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},l=s(function(g){return(g=+g)+(g>68?1900:2e3)},"a"),u=s(function(g){return function(y){this[g]=+y}},"f"),h=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var x=y.match(/([+-]|\d\d)/g),k=60*x[1]+(+x[2]||0);return k===0?0:x[0]==="+"?-k:k})(g)}],d=s(function(g){var y=o[g];return y&&(y.indexOf?y:y.s.concat(y.f))},"u"),f=s(function(g,y){var x,k=o.meridiem;if(k){for(var T=1;T<=24;T+=1)if(g.indexOf(k(T,0,y))>-1){x=T>12;break}}else x=g===(y?"pm":"PM");return x},"d"),p={A:[a,function(g){this.afternoon=f(g,!1)}],a:[a,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[i,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[i,u("day")],Do:[a,function(g){var y=o.ordinal,x=g.match(/\d+/);if(this.day=x[0],y)for(var k=1;k<=31;k+=1)y(k).replace(/\[|\]/g,"")===g&&(this.day=k)}],w:[n,u("week")],ww:[i,u("week")],M:[n,u("month")],MM:[i,u("month")],MMM:[a,function(g){var y=d("months"),x=(d("monthsShort")||y.map((function(k){return k.slice(0,3)}))).indexOf(g)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[a,function(g){var y=d("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[i,function(g){this.year=l(g)}],YYYY:[/\d{4}/,u("year")],Z:h,ZZ:h};function m(g){var y,x;y=g,x=o&&o.formats;for(var k=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(v,M,$){var I=$&&$.toUpperCase();return M||x[$]||e[$]||x[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(F,B,O){return B||O.slice(1)}))}))).match(t),T=k.length,C=0;C-1)return new Date((N==="X"?1e3:1)*R);var D=m(N)(R),V=D.year,L=D.month,q=D.day,H=D.hours,K=D.minutes,U=D.seconds,st=D.milliseconds,X=D.zone,ut=D.week,ot=new Date,mt=q||(V||L?1:ot.getDate()),ht=V||ot.getFullYear(),it=0;V&&!L||(it=L>0?L-1:ot.getMonth());var Ot,St=H||0,yt=K||0,Et=U||0,Ct=st||0;return X?new Date(Date.UTC(ht,it,mt,St,yt,Et,Ct+60*X.offset*1e3)):P?new Date(Date.UTC(ht,it,mt,St,yt,Et,Ct)):(Ot=new Date(ht,it,mt,St,yt,Et,Ct),ut&&(Ot=E(Ot).week(ut).toDate()),Ot)}catch{return new Date("")}})(_,A,S,x),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),$&&_!=this.format(A)&&(this.$d=new Date("")),o={}}else if(A instanceof Array)for(var F=A.length,B=1;B<=F;B+=1){w[1]=A[B-1];var O=x.apply(this,w);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}B===F&&(this.$d=new Date(""))}else T.call(this,C)}}}))});var Cht=Be(($P,FP)=>{"use strict";(function(e,t){typeof $P=="object"&&typeof FP<"u"?FP.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=t()})($P,(function(){"use strict";return function(e,t){var r=t.prototype,i=r.format;r.format=function(n){var a=this,o=this.$locale();if(!this.isValid())return i.bind(this)(n);var l=this.$utils(),u=(n||"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(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return o.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return o.ordinal(a.week(),"W");case"w":case"ww":return l.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return l.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return l.s(String(a.$H===0?24:a.$H),h==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return h}}));return i.bind(this)(u)}}}))});function $ht(e,t,r){let i=!0;for(;i;)i=!1,r.forEach(function(n){let a="^\\s*"+n+"\\s*$",o=new RegExp(a);e[0].match(o)&&(t[n]=!0,e.shift(1),i=!0)})}var _ht,Da,Eht,vht,Aht,Sht,ec,WP,qP,jP,Ub,Hb,UP,HP,VE,fy,YP,Rht,XP,hy,Yb,KP,QP,zE,VP,l9t,c9t,u9t,h9t,d9t,f9t,p9t,m9t,g9t,y9t,x9t,b9t,k9t,T9t,C9t,S9t,w9t,_9t,E9t,v9t,A9t,R9t,L9t,D9t,Lht,I9t,N9t,O9t,Dht,M9t,zP,Iht,Nht,$E,dy,B9t,P9t,GP,FE,xn,Oht,$9t,Qf,F9t,wht,V9t,Mht,z9t,Bht,G9t,W9t,Pht,Fht=b(()=>{"use strict";_ht=fs(Hp(),1),Da=fs(C2(),1),Eht=fs(kht(),1),vht=fs(Tht(),1),Aht=fs(Cht(),1);Jt();ye();Re();yi();Da.default.extend(Eht.default);Da.default.extend(vht.default);Da.default.extend(Aht.default);Sht={friday:5,saturday:6},ec="",WP="",jP="",Ub=[],Hb=[],UP=new Map,HP=[],VE=[],fy="",YP="",Rht=["active","done","crit","milestone","vert"],XP=[],hy="",Yb=!1,KP=!1,QP="sunday",zE="saturday",VP=0,l9t=s(function(){HP=[],VE=[],fy="",XP=[],$E=0,GP=void 0,FE=void 0,xn=[],ec="",WP="",YP="",qP=void 0,jP="",Ub=[],Hb=[],Yb=!1,KP=!1,VP=0,UP=new Map,hy="",He(),QP="sunday",zE="saturday"},"clear"),c9t=s(function(e){hy=e},"setDiagramId"),u9t=s(function(e){WP=e},"setAxisFormat"),h9t=s(function(){return WP},"getAxisFormat"),d9t=s(function(e){qP=e},"setTickInterval"),f9t=s(function(){return qP},"getTickInterval"),p9t=s(function(e){jP=e},"setTodayMarker"),m9t=s(function(){return jP},"getTodayMarker"),g9t=s(function(e){ec=e},"setDateFormat"),y9t=s(function(){Yb=!0},"enableInclusiveEndDates"),x9t=s(function(){return Yb},"endDatesAreInclusive"),b9t=s(function(){KP=!0},"enableTopAxis"),k9t=s(function(){return KP},"topAxisEnabled"),T9t=s(function(e){YP=e},"setDisplayMode"),C9t=s(function(){return YP},"getDisplayMode"),S9t=s(function(){return ec},"getDateFormat"),w9t=s(function(e){Ub=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),_9t=s(function(){return Ub},"getIncludes"),E9t=s(function(e){Hb=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),v9t=s(function(){return Hb},"getExcludes"),A9t=s(function(){return UP},"getLinks"),R9t=s(function(e){fy=e,HP.push(e)},"addSection"),L9t=s(function(){return HP},"getSections"),D9t=s(function(){let e=wht(),t=10,r=0;for(;!e&&r{let u=l.trim();return u==="x"||u==="X"},"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));let a=/^after\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let l=null;for(let h of a.groups.ids.split(" ")){let d=Qf(h);d!==void 0&&(!l||d.endTime>l.endTime)&&(l=d)}if(l)return l.endTime;let u=new Date;return u.setHours(0,0,0,0),u}let o=(0,Da.default)(r,t.trim(),!0);if(o.isValid())return o.toDate();{z.debug("Invalid date:"+r),z.debug("With date format:"+t.trim());let l=new Date(r);if(l===void 0||isNaN(l.getTime())||l.getFullYear()<-1e4||l.getFullYear()>1e4)throw new Error("Invalid date:"+r);return l}},"getStartDate"),Iht=s(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),Nht=s(function(e,t,r,i=!1){r=r.trim();let a=/^until\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let d=null;for(let p of a.groups.ids.split(" ")){let m=Qf(p);m!==void 0&&(!d||m.startTime{window.open(r,"_self")}),UP.set(i,r))}),Mht(e,"clickable")},"setLink"),Mht=s(function(e,t){e.split(",").forEach(function(r){let i=Qf(r);i!==void 0&&i.classes.push(t)})},"setClass"),z9t=s(function(e,t,r){if(Q().securityLevel!=="loose"||t===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{Te.runFunc(t,...i)})},"setClickFun"),Bht=s(function(e,t){XP.push(function(){let r=hy?`${hy}-${e}`:e,i=document.querySelector(`[id="${r}"]`);i!==null&&i.addEventListener("click",function(){t()})},function(){let r=hy?`${hy}-${e}`:e,i=document.querySelector(`[id="${r}-text"]`);i!==null&&i.addEventListener("click",function(){t()})})},"pushFun"),G9t=s(function(e,t,r){e.split(",").forEach(function(i){z9t(i,t,r)}),Mht(e,"clickable")},"setClickEvent"),W9t=s(function(e){XP.forEach(function(t){t(e)})},"bindFunctions"),Pht={getConfig:s(()=>Q().gantt,"getConfig"),clear:l9t,setDateFormat:g9t,getDateFormat:S9t,enableInclusiveEndDates:y9t,endDatesAreInclusive:x9t,enableTopAxis:b9t,topAxisEnabled:k9t,setAxisFormat:u9t,getAxisFormat:h9t,setTickInterval:d9t,getTickInterval:f9t,setTodayMarker:p9t,getTodayMarker:m9t,setAccTitle:Ye,getAccTitle:Ze,setDiagramTitle:sr,getDiagramTitle:er,setDiagramId:c9t,setDisplayMode:T9t,getDisplayMode:C9t,setAccDescription:Je,getAccDescription:tr,addSection:R9t,getSections:L9t,getTasks:D9t,addTask:$9t,findTaskById:Qf,addTaskOrg:F9t,setIncludes:w9t,getIncludes:_9t,setExcludes:E9t,getExcludes:v9t,setClickEvent:G9t,setLink:V9t,getLinks:A9t,bindFunctions:W9t,parseDuration:Iht,isInvalidDate:Lht,setWeekday:I9t,getWeekday:N9t,setWeekend:O9t};s($ht,"getTaskTags")});var Vht=Be((ZP,JP)=>{"use strict";(function(e,t){typeof ZP=="object"&&typeof JP<"u"?JP.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=t()})(ZP,(function(){"use strict";var e,t,r=1e3,i=6e4,n=36e5,a=864e5,o=/\[([^\]]+)]|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,l=31536e6,u=2628e6,h=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:l,months:u,days:a,hours:n,minutes:i,seconds:r,milliseconds:1,weeks:6048e5},f=s(function(_){return _ instanceof T},"c"),p=s(function(_,S,w){return new T(_,w,S.$l)},"f"),m=s(function(_){return t.p(_)+"s"},"m"),g=s(function(_){return _<0},"l"),y=s(function(_){return g(_)?Math.ceil(_):Math.floor(_)},"$"),x=s(function(_){return Math.abs(_)},"y"),k=s(function(_,S){return _?g(_)?{negative:!0,format:""+x(_)+S}:{negative:!1,format:""+_+S}:{negative:!1,format:""}},"v"),T=(function(){function _(w,A,v){var M=this;if(this.$d={},this.$l=v,w===void 0&&(this.$ms=0,this.parseFromMilliseconds()),A)return p(w*d[m(A)],this);if(typeof w=="number")return this.$ms=w,this.parseFromMilliseconds(),this;if(typeof w=="object")return Object.keys(w).forEach((function(F){M.$d[m(F)]=w[F]})),this.calMilliseconds(),this;if(typeof w=="string"){var $=w.match(h);if($){var I=$.slice(2).map((function(F){return F!=null?Number(F):0}));return this.$d.years=I[0],this.$d.months=I[1],this.$d.weeks=I[2],this.$d.days=I[3],this.$d.hours=I[4],this.$d.minutes=I[5],this.$d.seconds=I[6],this.calMilliseconds(),this}}return this}s(_,"l");var S=_.prototype;return S.calMilliseconds=function(){var w=this;this.$ms=Object.keys(this.$d).reduce((function(A,v){return A+(w.$d[v]||0)*d[v]}),0)},S.parseFromMilliseconds=function(){var w=this.$ms;this.$d.years=y(w/l),w%=l,this.$d.months=y(w/u),w%=u,this.$d.days=y(w/a),w%=a,this.$d.hours=y(w/n),w%=n,this.$d.minutes=y(w/i),w%=i,this.$d.seconds=y(w/r),w%=r,this.$d.milliseconds=w},S.toISOString=function(){var w=k(this.$d.years,"Y"),A=k(this.$d.months,"M"),v=+this.$d.days||0;this.$d.weeks&&(v+=7*this.$d.weeks);var M=k(v,"D"),$=k(this.$d.hours,"H"),I=k(this.$d.minutes,"M"),F=this.$d.seconds||0;this.$d.milliseconds&&(F+=this.$d.milliseconds/1e3,F=Math.round(1e3*F)/1e3);var B=k(F,"S"),O=w.negative||A.negative||M.negative||$.negative||I.negative||B.negative,R=$.format||I.format||B.format?"T":"",N=(O?"-":"")+"P"+w.format+A.format+M.format+R+$.format+I.format+B.format;return N==="P"||N==="-P"?"P0D":N},S.toJSON=function(){return this.toISOString()},S.format=function(w){var A=w||"YYYY-MM-DDTHH:mm:ss",v={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return A.replace(o,(function(M,$){return $||String(v[M])}))},S.as=function(w){return this.$ms/d[m(w)]},S.get=function(w){var A=this.$ms,v=m(w);return v==="milliseconds"?A%=1e3:A=v==="weeks"?y(A/d[v]):this.$d[v],A||0},S.add=function(w,A,v){var M;return M=A?w*d[m(A)]:f(w)?w.$ms:p(w,this).$ms,p(this.$ms+M*(v?-1:1),this)},S.subtract=function(w,A){return this.add(w,A,!0)},S.locale=function(w){var A=this.clone();return A.$l=w,A},S.clone=function(){return p(this.$ms,this)},S.humanize=function(w){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!w)},S.valueOf=function(){return this.asMilliseconds()},S.milliseconds=function(){return this.get("milliseconds")},S.asMilliseconds=function(){return this.as("milliseconds")},S.seconds=function(){return this.get("seconds")},S.asSeconds=function(){return this.as("seconds")},S.minutes=function(){return this.get("minutes")},S.asMinutes=function(){return this.as("minutes")},S.hours=function(){return this.get("hours")},S.asHours=function(){return this.as("hours")},S.days=function(){return this.get("days")},S.asDays=function(){return this.as("days")},S.weeks=function(){return this.get("weeks")},S.asWeeks=function(){return this.as("weeks")},S.months=function(){return this.get("months")},S.asMonths=function(){return this.as("months")},S.years=function(){return this.get("years")},S.asYears=function(){return this.as("years")},_})(),C=s(function(_,S,w){return _.add(S.years()*w,"y").add(S.months()*w,"M").add(S.days()*w,"d").add(S.hours()*w,"h").add(S.minutes()*w,"m").add(S.seconds()*w,"s").add(S.milliseconds()*w,"ms")},"p");return function(_,S,w){e=w,t=w().$utils(),w.duration=function(M,$){var I=w.locale();return p(M,{$l:I},$)},w.isDuration=f;var A=S.prototype.add,v=S.prototype.subtract;S.prototype.add=function(M,$){return f(M)?C(this,M,1):A.bind(this)(M,$)},S.prototype.subtract=function(M,$){return f(M)?C(this,M,-1):v.bind(this)(M,$)}}}))});var py,Ght,q9t,zht,j9t,Zc,t8,U9t,Wht,qht=b(()=>{"use strict";py=fs(C2(),1),Ght=fs(Vht(),1);Jt();lr();fr();ye();gi();py.default.extend(Ght.default);q9t=s(function(){z.debug("Something is calling, setConf, remove the call")},"setConf"),zht={monday:ku,tuesday:Bk,wednesday:Pk,thursday:yl,friday:$k,saturday:Fk,sunday:Ro},j9t=s((e,t)=>{let r=[...e].map(()=>-1/0),i=[...e].sort((a,o)=>a.startTime-o.startTime||a.order-o.order),n=0;for(let a of i)for(let o=0;o=r[o]){r[o]=a.endTime,a.order=o+t,o>n&&(n=o);break}return n},"getMaxIntersections"),t8=1e4,U9t=s(function(e,t,r,i){let n=Q().gantt;i.db.setDiagramId(t);let a=Q().securityLevel,o;a==="sandbox"&&(o=vt("#i"+t));let l=a==="sandbox"?vt(o.nodes()[0].contentDocument.body):vt("body"),u=a==="sandbox"?o.nodes()[0].contentDocument:document,h=u.getElementById(t);Zc=h.parentElement.offsetWidth,Zc===void 0&&(Zc=1200),n.useWidth!==void 0&&(Zc=n.useWidth);let d=i.db.getTasks(),f=[];for(let M of d)f.push(M.type);f=v(f);let p={},m=2*n.topPadding;if(i.db.getDisplayMode()==="compact"||n.displayMode==="compact"){let M={};for(let I of d)M[I.section]===void 0?M[I.section]=[I]:M[I.section].push(I);let $=0;for(let I of Object.keys(M)){let F=j9t(M[I],$)+1;$+=F,m+=F*(n.barHeight+n.barGap),p[I]=F}}else{m+=d.length*(n.barHeight+n.barGap);for(let M of f)p[M]=d.filter($=>$.type===M).length}h.setAttribute("viewBox","0 0 "+Zc+" "+m);let g=l.select(`[id="${t}"]`),y=Gk().domain([H2(d,function(M){return M.startTime}),U2(d,function(M){return M.endTime})]).rangeRound([0,Zc-n.leftPadding-n.rightPadding]);function x(M,$){let I=M.startTime,F=$.startTime,B=0;return I>F?B=1:IL.vert===q.vert?0:L.vert?1:-1);let P=[...new Set(M.map(L=>L.order))].map(L=>M.find(q=>q.order===L));g.append("g").selectAll("rect").data(P).enter().append("rect").attr("x",0).attr("y",function(L,q){return q=L.order,q*$+I-2}).attr("width",function(){return R-n.rightPadding/2}).attr("height",$).attr("class",function(L){for(let[q,H]of f.entries())if(L.type===H)return"section section"+q%n.numberSectionStyles;return"section section0"}).enter();let E=g.append("g").selectAll("rect").data(M).enter(),D=i.db.getLinks();if(E.append("rect").attr("id",function(L){return t+"-"+L.id}).attr("rx",3).attr("ry",3).attr("x",function(L){return L.milestone?y(L.startTime)+F+.5*(y(L.endTime)-y(L.startTime))-.5*B:y(L.startTime)+F}).attr("y",function(L,q){return q=L.order,L.vert?n.gridLineStartPadding:q*$+I}).attr("width",function(L){return L.milestone?B:L.vert?.08*B:y(L.renderEndTime||L.endTime)-y(L.startTime)}).attr("height",function(L){return L.vert?d.length*(n.barHeight+n.barGap)+n.barHeight*2:B}).attr("transform-origin",function(L,q){return q=L.order,(y(L.startTime)+F+.5*(y(L.endTime)-y(L.startTime))).toString()+"px "+(q*$+I+.5*B).toString()+"px"}).attr("class",function(L){let q="task",H="";L.classes.length>0&&(H=L.classes.join(" "));let K=0;for(let[st,X]of f.entries())L.type===X&&(K=st%n.numberSectionStyles);let U="";return L.active?L.crit?U+=" activeCrit":U=" active":L.done?L.crit?U=" doneCrit":U=" done":L.crit&&(U+=" crit"),U.length===0&&(U=" task"),L.milestone&&(U=" milestone "+U),L.vert&&(U=" vert "+U),U+=K,U+=" "+H,q+U}),E.append("text").attr("id",function(L){return t+"-"+L.id+"-text"}).text(function(L){return L.task}).attr("font-size",n.fontSize).attr("x",function(L){let q=y(L.startTime),H=y(L.renderEndTime||L.endTime);if(L.milestone&&(q+=.5*(y(L.endTime)-y(L.startTime))-.5*B,H=q+B),L.vert)return y(L.startTime)+F;let K=this.getBBox().width;return K>H-q?H+K+1.5*n.leftPadding>R?q+F-5:H+F+5:(H-q)/2+q+F}).attr("y",function(L,q){return L.vert?n.gridLineStartPadding+d.length*(n.barHeight+n.barGap)+60:(q=L.order,q*$+n.barHeight/2+(n.fontSize/2-2)+I)}).attr("text-height",B).attr("class",function(L){let q=y(L.startTime),H=y(L.endTime);L.milestone&&(H=q+B);let K=this.getBBox().width,U="";L.classes.length>0&&(U=L.classes.join(" "));let st=0;for(let[ut,ot]of f.entries())L.type===ot&&(st=ut%n.numberSectionStyles);let X="";return L.active&&(L.crit?X="activeCritText"+st:X="activeText"+st),L.done?L.crit?X=X+" doneCritText"+st:X=X+" doneText"+st:L.crit&&(X=X+" critText"+st),L.milestone&&(X+=" milestoneText"),L.vert&&(X+=" vertText"),K>H-q?H+K+1.5*n.leftPadding>R?U+" taskTextOutsideLeft taskTextOutside"+st+" "+X:U+" taskTextOutsideRight taskTextOutside"+st+" "+X+" width-"+K:U+" taskText taskText"+st+" "+X+" width-"+K}),Q().securityLevel==="sandbox"){let L;L=vt("#i"+t);let q=L.nodes()[0].contentDocument;E.filter(function(H){return D.has(H.id)}).each(function(H){var K=q.querySelector("#"+CSS.escape(t+"-"+H.id)),U=q.querySelector("#"+CSS.escape(t+"-"+H.id+"-text"));let st=K.parentNode;var X=q.createElement("a");X.setAttribute("xlink:href",D.get(H.id)),X.setAttribute("target","_top"),st.appendChild(X),X.appendChild(K),X.appendChild(U)})}}s(T,"drawRects");function C(M,$,I,F,B,O,R,N){if(R.length===0&&N.length===0)return;let P,E;for(let{startTime:K,endTime:U}of O)(P===void 0||KE)&&(E=U);if(!P||!E)return;if((0,py.default)(E).diff((0,py.default)(P),"year")>5){z.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let D=i.db.getDateFormat(),V=[],L=null,q=(0,py.default)(P);for(;q.valueOf()<=E;)i.db.isInvalidDate(q,D,R,N)?L?L.end=q:L={start:q,end:q}:L&&(V.push(L),L=null),q=q.add(1,"d");g.append("g").selectAll("rect").data(V).enter().append("rect").attr("id",K=>t+"-exclude-"+K.start.format("YYYY-MM-DD")).attr("x",K=>y(K.start.startOf("day"))+I).attr("y",n.gridLineStartPadding).attr("width",K=>y(K.end.endOf("day"))-y(K.start.startOf("day"))).attr("height",B-$-n.gridLineStartPadding).attr("transform-origin",function(K,U){return(y(K.start)+I+.5*(y(K.end)-y(K.start))).toString()+"px "+(U*M+.5*B).toString()+"px"}).attr("class","exclude-range")}s(C,"drawExcludeDays");function _(M,$,I,F){if(I<=0||M>$)return 1/0;let B=$-M,O=py.default.duration({[F??"day"]:I}).asMilliseconds();return O<=0?1/0:Math.ceil(B/O)}s(_,"getEstimatedTickCount");function S(M,$,I,F){let B=i.db.getDateFormat(),O=i.db.getAxisFormat(),R;O?R=O:B==="D"?R="%d":R=n.axisFormat??"%Y-%m-%d";let N=yA(y).tickSize(-F+$+n.gridLineStartPadding).tickFormat(xd(R)),E=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||n.tickInterval);if(E!==null){let D=parseInt(E[1],10);if(isNaN(D)||D<=0)z.warn(`Invalid tick interval value: "${E[1]}". Skipping custom tick interval.`);else{let V=E[2],L=i.db.getWeekday()||n.weekday,q=y.domain(),H=q[0],K=q[1],U=_(H,K,D,V);if(U>t8)z.warn(`The tick interval "${D}${V}" would generate ${U} ticks, which exceeds the maximum allowed (${t8}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(V){case"millisecond":N.ticks(ml.every(D));break;case"second":N.ticks(ma.every(D));break;case"minute":N.ticks(gc.every(D));break;case"hour":N.ticks(yc.every(D));break;case"day":N.ticks(za.every(D));break;case"week":N.ticks(zht[L].every(D));break;case"month":N.ticks(xc.every(D));break}}}if(g.append("g").attr("class","grid").attr("transform","translate("+M+", "+(F-50)+")").call(N).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||n.topAxis){let D=gA(y).tickSize(-F+$+n.gridLineStartPadding).tickFormat(xd(R));if(E!==null){let V=parseInt(E[1],10);if(isNaN(V)||V<=0)z.warn(`Invalid tick interval value: "${E[1]}". Skipping custom tick interval.`);else{let L=E[2],q=i.db.getWeekday()||n.weekday,H=y.domain(),K=H[0],U=H[1];if(_(K,U,V,L)<=t8)switch(L){case"millisecond":D.ticks(ml.every(V));break;case"second":D.ticks(ma.every(V));break;case"minute":D.ticks(gc.every(V));break;case"hour":D.ticks(yc.every(V));break;case"day":D.ticks(za.every(V));break;case"week":D.ticks(zht[q].every(V));break;case"month":D.ticks(xc.every(V));break}}}g.append("g").attr("class","grid").attr("transform","translate("+M+", "+$+")").call(D).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}s(S,"makeGrid");function w(M,$){let I=0,F=Object.keys(p).map(B=>[B,p[B]]);g.append("g").selectAll("text").data(F).enter().append(function(B){let O=B[0].split(qt.lineBreakRegex),R=-(O.length-1)/2,N=u.createElementNS("http://www.w3.org/2000/svg","text");N.setAttribute("dy",R+"em");for(let[P,E]of O.entries()){let D=u.createElementNS("http://www.w3.org/2000/svg","tspan");D.setAttribute("alignment-baseline","central"),D.setAttribute("x","10"),P>0&&D.setAttribute("dy","1em"),D.textContent=E,N.appendChild(D)}return N}).attr("x",10).attr("y",function(B,O){if(O>0)for(let R=0;R{"use strict";H9t=s(e=>` + .mermaid-main-font { + font-family: ${e.fontFamily}; + } + + .exclude-range { + fill: ${e.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${e.sectionBkgColor}; + } + + .section2 { + fill: ${e.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${e.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${e.titleColor}; + } + + .sectionTitle1 { + fill: ${e.titleColor}; + } + + .sectionTitle2 { + fill: ${e.titleColor}; + } + + .sectionTitle3 { + fill: ${e.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${e.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${e.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${e.fontFamily}; + fill: ${e.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${e.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${e.taskTextDarkColor}; + text-anchor: start; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${e.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${e.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${e.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${e.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${e.taskTextDarkColor} !important; + } + + /* Done task text displayed outside the bar sits against the diagram background, + not against the done-task bar, so it must use the outside/contrast color. */ + .doneText0.taskTextOutsideLeft, + .doneText0.taskTextOutsideRight, + .doneText1.taskTextOutsideLeft, + .doneText1.taskTextOutsideRight, + .doneText2.taskTextOutsideLeft, + .doneText2.taskTextOutsideRight, + .doneText3.taskTextOutsideLeft, + .doneText3.taskTextOutsideRight { + fill: ${e.taskTextOutsideColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */ + .doneCritText0.taskTextOutsideLeft, + .doneCritText0.taskTextOutsideRight, + .doneCritText1.taskTextOutsideLeft, + .doneCritText1.taskTextOutsideRight, + .doneCritText2.taskTextOutsideLeft, + .doneCritText2.taskTextOutsideRight, + .doneCritText3.taskTextOutsideLeft, + .doneCritText3.taskTextOutsideRight { + fill: ${e.taskTextOutsideColor} !important; + } + + .vert { + stroke: ${e.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${e.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.titleColor||e.textColor}; + font-family: ${e.fontFamily}; + } +`,"getStyles"),jht=H9t});var Hht={};Fe(Hht,{diagram:()=>Y9t});var Y9t,Yht=b(()=>{"use strict";bht();Fht();qht();Uht();Y9t={parser:xht,db:Pht,renderer:Wht,styles:jht}});var Qht,Zht=b(()=>{"use strict";Xc();Jt();Qht={parse:s(async e=>{let t=await Hn("info",e);z.debug(t)},"parse")}});var Z9t,J9t,Jht,tdt=b(()=>{"use strict";Z9t={version:"11.14.0-tiny"},J9t=s(()=>Z9t.version,"getVersion"),Jht={getVersion:J9t}});var pi,ca=b(()=>{"use strict";lr();ye();pi=s(e=>{let{securityLevel:t}=Q(),r=vt("body");if(t==="sandbox"){let a=vt(`#i${e}`).node()?.contentDocument??document;r=vt(a.body)}return r.select(`#${e}`)},"selectSvgElement")});var tFt,edt,rdt=b(()=>{"use strict";Jt();ca();gi();tFt=s((e,t,r)=>{z.debug(`rendering info diagram +`+e);let i=pi(t);pr(i,100,400,!0),i.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"),edt={draw:tFt}});var idt={};Fe(idt,{diagram:()=>eFt});var eFt,ndt=b(()=>{"use strict";Zht();tdt();rdt();eFt={parser:Qht,db:Jht,renderer:edt}});var odt,e8,GE,r8,nFt,sFt,aFt,oFt,lFt,cFt,uFt,WE,i8=b(()=>{"use strict";Jt();yi();ps();odt=Ue.pie,e8={sections:new Map,showData:!1,config:odt},GE=e8.sections,r8=e8.showData,nFt=structuredClone(odt),sFt=s(()=>structuredClone(nFt),"getConfig"),aFt=s(()=>{GE=new Map,r8=e8.showData,He()},"clear"),oFt=s(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);GE.has(e)||(GE.set(e,t),z.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),lFt=s(()=>GE,"getSections"),cFt=s(e=>{r8=e},"setShowData"),uFt=s(()=>r8,"getShowData"),WE={getConfig:sFt,clear:aFt,setDiagramTitle:sr,getDiagramTitle:er,setAccTitle:Ye,getAccTitle:Ze,setAccDescription:Je,getAccDescription:tr,addSection:oFt,getSections:lFt,setShowData:cFt,getShowData:uFt}});var hFt,ldt,cdt=b(()=>{"use strict";Xc();Jt();Lh();i8();hFt=s((e,t)=>{aa(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),ldt={parse:s(async e=>{let t=await Hn("pie",e);z.debug(t),hFt(t,WE)},"parse")}});var dFt,udt,hdt=b(()=>{"use strict";dFt=s(e=>` + .pieCircle{ + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${e.pieOuterStrokeColor}; + stroke-width: ${e.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${e.pieTitleTextSize}; + fill: ${e.pieTitleTextColor}; + font-family: ${e.fontFamily}; + } + .slice { + font-family: ${e.fontFamily}; + fill: ${e.pieSectionTextColor}; + font-size:${e.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${e.pieLegendTextColor}; + font-family: ${e.fontFamily}; + font-size: ${e.pieLegendTextSize}; + } +`,"getStyles"),udt=dFt});var fFt,pFt,ddt,fdt=b(()=>{"use strict";lr();ye();Jt();ca();gi();Re();fFt=s(e=>{let t=[...e.values()].reduce((n,a)=>n+a,0),r=[...e.entries()].map(([n,a])=>({label:n,value:a})).filter(n=>n.value/t*100>=1);return Yk().value(n=>n.value).sort(null)(r)},"createPieArcs"),pFt=s((e,t,r,i)=>{z.debug(`rendering pie chart +`+e);let n=i.db,a=Q(),o=Wr(n.getConfig(),a.pie),l=40,u=18,h=4,d=450,f=d,p=pi(t),m=p.append("g");m.attr("transform","translate("+f/2+","+d/2+")");let{themeVariables:g}=a,[y]=Gs(g.pieOuterStrokeWidth);y??=2;let x=o.textPosition,k=Math.min(f,d)/2-l,T=Io().innerRadius(0).outerRadius(k),C=Io().innerRadius(k*x).outerRadius(k*x);m.append("circle").attr("cx",0).attr("cy",0).attr("r",k+y/2).attr("class","pieOuterCircle");let _=n.getSections(),S=fFt(_),w=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],A=0;_.forEach(L=>{A+=L});let v=S.filter(L=>(L.data.value/A*100).toFixed(0)!=="0"),M=pa(w).domain([..._.keys()]);m.selectAll("mySlices").data(v).enter().append("path").attr("d",T).attr("fill",L=>M(L.data.label)).attr("class","pieCircle"),m.selectAll("mySlices").data(v).enter().append("text").text(L=>(L.data.value/A*100).toFixed(0)+"%").attr("transform",L=>"translate("+C.centroid(L)+")").style("text-anchor","middle").attr("class","slice");let $=m.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-(d-50)/2).attr("class","pieTitleText"),I=[..._.entries()].map(([L,q])=>({label:L,value:q})),F=m.selectAll(".legend").data(I).enter().append("g").attr("class","legend").attr("transform",(L,q)=>{let H=u+h,K=H*I.length/2,U=12*u,st=q*H-K;return"translate("+U+","+st+")"});F.append("rect").attr("width",u).attr("height",u).style("fill",L=>M(L.label)).style("stroke",L=>M(L.label)),F.append("text").attr("x",u+h).attr("y",u-h).text(L=>n.getShowData()?`${L.label} [${L.value}]`:L.label);let B=Math.max(...F.selectAll("text").nodes().map(L=>L?.getBoundingClientRect().width??0)),O=f+l+u+h+B,R=$.node()?.getBoundingClientRect().width??0,N=f/2-R/2,P=f/2+R/2,E=Math.min(0,N),V=Math.max(O,P)-E;p.attr("viewBox",`${E} 0 ${V} ${d}`),pr(p,d,V,o.useMaxWidth)},"draw"),ddt={draw:pFt}});var pdt={};Fe(pdt,{diagram:()=>mFt});var mFt,mdt=b(()=>{"use strict";cdt();i8();hdt();fdt();mFt={parser:ldt,db:WE,renderer:ddt,styles:udt}});var n8,ydt,xdt=b(()=>{"use strict";n8=(function(){var e=s(function(Rt,Y,At,xt){for(At=At||{},xt=Rt.length;xt--;At[Rt[xt]]=Y);return At},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],a=[1,7],o=[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],l=[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],u=[55,56,57],h=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],g=[1,43],y=[1,41],x=[1,14],k=[1,23],T=[1,18],C=[1,19],_=[1,20],S=[1,21],w=[1,22],A=[1,24],v=[1,25],M=[1,26],$=[1,27],I=[1,28],F=[1,29],B=[1,32],O=[1,33],R=[1,34],N=[1,39],P=[1,40],E=[1,42],D=[1,44],V=[1,62],L=[1,61],q=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],H=[1,65],K=[1,66],U=[1,67],st=[1,68],X=[1,69],ut=[1,70],ot=[1,71],mt=[1,72],ht=[1,73],it=[1,74],Ot=[1,75],St=[1,76],yt=[4,5,6,7,8,9,10,11,12,13,14,15,18],Et=[1,90],Ct=[1,91],Bt=[1,92],Lt=[1,99],ee=[1,93],at=[1,96],$e=[1,94],pt=[1,95],Wt=[1,97],Ht=[1,98],Dt=[1,102],bt=[10,55,56,57],Gt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],G={trace:s(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:s(function(Y,At,xt,Zt,Nt,wt,he){var gt=wt.length-1;switch(Nt){case 23:this.$=wt[gt];break;case 24:this.$=wt[gt-1]+""+wt[gt];break;case 26:this.$=wt[gt-1]+wt[gt];break;case 27:this.$=[wt[gt].trim()];break;case 28:wt[gt-2].push(wt[gt].trim()),this.$=wt[gt-2];break;case 29:this.$=wt[gt-4],Zt.addClass(wt[gt-2],wt[gt]);break;case 37:this.$=[];break;case 42:this.$=wt[gt].trim(),Zt.setDiagramTitle(this.$);break;case 43:this.$=wt[gt].trim(),Zt.setAccTitle(this.$);break;case 44:case 45:this.$=wt[gt].trim(),Zt.setAccDescription(this.$);break;case 46:Zt.addSection(wt[gt].substr(8)),this.$=wt[gt].substr(8);break;case 47:Zt.addPoint(wt[gt-3],"",wt[gt-1],wt[gt],[]);break;case 48:Zt.addPoint(wt[gt-4],wt[gt-3],wt[gt-1],wt[gt],[]);break;case 49:Zt.addPoint(wt[gt-4],"",wt[gt-2],wt[gt-1],wt[gt]);break;case 50:Zt.addPoint(wt[gt-5],wt[gt-4],wt[gt-2],wt[gt-1],wt[gt]);break;case 51:Zt.setXAxisLeftText(wt[gt-2]),Zt.setXAxisRightText(wt[gt]);break;case 52:wt[gt-1].text+=" \u27F6 ",Zt.setXAxisLeftText(wt[gt-1]);break;case 53:Zt.setXAxisLeftText(wt[gt]);break;case 54:Zt.setYAxisBottomText(wt[gt-2]),Zt.setYAxisTopText(wt[gt]);break;case 55:wt[gt-1].text+=" \u27F6 ",Zt.setYAxisBottomText(wt[gt-1]);break;case 56:Zt.setYAxisBottomText(wt[gt]);break;case 57:Zt.setQuadrant1Text(wt[gt]);break;case 58:Zt.setQuadrant2Text(wt[gt]);break;case 59:Zt.setQuadrant3Text(wt[gt]);break;case 60:Zt.setQuadrant4Text(wt[gt]);break;case 64:this.$={text:wt[gt],type:"text"};break;case 65:this.$={text:wt[gt-1].text+""+wt[gt],type:wt[gt-1].type};break;case 66:this.$={text:wt[gt],type:"text"};break;case 67:this.$={text:wt[gt],type:"markdown"};break;case 68:this.$=wt[gt];break;case 69:this.$=wt[gt-1]+""+wt[gt];break}},"anonymous"),table:[{18:t,26:1,27:2,28:r,55:i,56:n,57:a},{1:[3]},{18:t,26:8,27:2,28:r,55:i,56:n,57:a},{18:t,26:9,27:2,28:r,55:i,56:n,57:a},e(o,[2,33],{29:10}),e(l,[2,61]),e(l,[2,62]),e(l,[2,63]),{1:[2,30]},{1:[2,31]},e(u,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:g,14:y,18:x,25:k,35:T,37:C,39:_,41:S,42:w,48:A,50:v,51:M,52:$,53:I,54:F,60:B,61:O,63:R,64:N,65:P,66:E,67:D}),e(o,[2,34]),{27:45,55:i,56:n,57:a},e(u,[2,37]),e(u,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:f,10:p,12:m,13:g,14:y,18:x,25:k,35:T,37:C,39:_,41:S,42:w,48:A,50:v,51:M,52:$,53:I,54:F,60:B,61:O,63:R,64:N,65:P,66:E,67:D}),e(u,[2,39]),e(u,[2,40]),e(u,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(u,[2,45]),e(u,[2,46]),{18:[1,50]},{4:d,5:f,10:p,12:m,13:g,14:y,43:51,58:31,60:B,61:O,63:R,64:N,65:P,66:E,67:D},{4:d,5:f,10:p,12:m,13:g,14:y,43:52,58:31,60:B,61:O,63:R,64:N,65:P,66:E,67:D},{4:d,5:f,10:p,12:m,13:g,14:y,43:53,58:31,60:B,61:O,63:R,64:N,65:P,66:E,67:D},{4:d,5:f,10:p,12:m,13:g,14:y,43:54,58:31,60:B,61:O,63:R,64:N,65:P,66:E,67:D},{4:d,5:f,10:p,12:m,13:g,14:y,43:55,58:31,60:B,61:O,63:R,64:N,65:P,66:E,67:D},{4:d,5:f,10:p,12:m,13:g,14:y,43:56,58:31,60:B,61:O,63:R,64:N,65:P,66:E,67:D},{4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,44:[1,57],47:[1,58],58:60,59:59,63:R,64:N,65:P,66:E,67:D},e(q,[2,64]),e(q,[2,66]),e(q,[2,67]),e(q,[2,70]),e(q,[2,71]),e(q,[2,72]),e(q,[2,73]),e(q,[2,74]),e(q,[2,75]),e(q,[2,76]),e(q,[2,77]),e(q,[2,78]),e(q,[2,79]),e(q,[2,80]),e(o,[2,35]),e(u,[2,38]),e(u,[2,42]),e(u,[2,43]),e(u,[2,44]),{3:64,4:H,5:K,6:U,7:st,8:X,9:ut,10:ot,11:mt,12:ht,13:it,14:Ot,15:St,21:63},e(u,[2,53],{59:59,58:60,4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,49:[1,77],63:R,64:N,65:P,66:E,67:D}),e(u,[2,56],{59:59,58:60,4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,49:[1,78],63:R,64:N,65:P,66:E,67:D}),e(u,[2,57],{59:59,58:60,4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,63:R,64:N,65:P,66:E,67:D}),e(u,[2,58],{59:59,58:60,4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,63:R,64:N,65:P,66:E,67:D}),e(u,[2,59],{59:59,58:60,4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,63:R,64:N,65:P,66:E,67:D}),e(u,[2,60],{59:59,58:60,4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,63:R,64:N,65:P,66:E,67:D}),{45:[1,79]},{44:[1,80]},e(q,[2,65]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),{3:82,4:H,5:K,6:U,7:st,8:X,9:ut,10:ot,11:mt,12:ht,13:it,14:Ot,15:St,18:[1,81]},e(yt,[2,23]),e(yt,[2,1]),e(yt,[2,2]),e(yt,[2,3]),e(yt,[2,4]),e(yt,[2,5]),e(yt,[2,6]),e(yt,[2,7]),e(yt,[2,8]),e(yt,[2,9]),e(yt,[2,10]),e(yt,[2,11]),e(yt,[2,12]),e(u,[2,52],{58:31,43:83,4:d,5:f,10:p,12:m,13:g,14:y,60:B,61:O,63:R,64:N,65:P,66:E,67:D}),e(u,[2,55],{58:31,43:84,4:d,5:f,10:p,12:m,13:g,14:y,60:B,61:O,63:R,64:N,65:P,66:E,67:D}),{46:[1,85]},{45:[1,86]},{4:Et,5:Ct,6:Bt,8:Lt,11:ee,13:at,16:89,17:$e,18:pt,19:Wt,20:Ht,22:88,23:87},e(yt,[2,24]),e(u,[2,51],{59:59,58:60,4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,63:R,64:N,65:P,66:E,67:D}),e(u,[2,54],{59:59,58:60,4:d,5:f,8:V,10:p,12:m,13:g,14:y,18:L,63:R,64:N,65:P,66:E,67:D}),e(u,[2,47],{22:88,16:89,23:100,4:Et,5:Ct,6:Bt,8:Lt,11:ee,13:at,17:$e,18:pt,19:Wt,20:Ht}),{46:[1,101]},e(u,[2,29],{10:Dt}),e(bt,[2,27],{16:103,4:Et,5:Ct,6:Bt,8:Lt,11:ee,13:at,17:$e,18:pt,19:Wt,20:Ht}),e(Gt,[2,25]),e(Gt,[2,13]),e(Gt,[2,14]),e(Gt,[2,15]),e(Gt,[2,16]),e(Gt,[2,17]),e(Gt,[2,18]),e(Gt,[2,19]),e(Gt,[2,20]),e(Gt,[2,21]),e(Gt,[2,22]),e(u,[2,49],{10:Dt}),e(u,[2,48],{22:88,16:89,23:104,4:Et,5:Ct,6:Bt,8:Lt,11:ee,13:at,17:$e,18:pt,19:Wt,20:Ht}),{4:Et,5:Ct,6:Bt,8:Lt,11:ee,13:at,16:89,17:$e,18:pt,19:Wt,20:Ht,22:105},e(Gt,[2,26]),e(u,[2,50],{10:Dt}),e(bt,[2,28],{16:103,4:Et,5:Ct,6:Bt,8:Lt,11:ee,13:at,17:$e,18:pt,19:Wt,20:Ht})],defaultActions:{8:[2,30],9:[2,31]},parseError:s(function(Y,At){if(At.recoverable)this.trace(Y);else{var xt=new Error(Y);throw xt.hash=At,xt}},"parseError"),parse:s(function(Y){var At=this,xt=[0],Zt=[],Nt=[null],wt=[],he=this.table,gt="",te=0,ne=0,It=0,ke=2,J=1,Xe=wt.slice.call(arguments,1),rt=Object.create(this.lexer),or={yy:{}};for(var Sr in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Sr)&&(or.yy[Sr]=this.yy[Sr]);rt.setInput(Y,or.yy),or.yy.lexer=rt,or.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var Dr=rt.yylloc;wt.push(Dr);var Ie=rt.options&&rt.options.ranges;typeof or.yy.parseError=="function"?this.parseError=or.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function vr(ae){xt.length=xt.length-2*ae,Nt.length=Nt.length-ae,wt.length=wt.length-ae}s(vr,"popStack");function ge(){var ae;return ae=Zt.pop()||rt.lex()||J,typeof ae!="number"&&(ae instanceof Array&&(Zt=ae,ae=Zt.pop()),ae=At.symbols_[ae]||ae),ae}s(ge,"lex");for(var se,Oe,ve,ue,Ge,yr,We={},Br,Kr,kr,Gr;;){if(ve=xt[xt.length-1],this.defaultActions[ve]?ue=this.defaultActions[ve]:((se===null||typeof se>"u")&&(se=ge()),ue=he[ve]&&he[ve][se]),typeof ue>"u"||!ue.length||!ue[0]){var Xn="";Gr=[];for(Br in he[ve])this.terminals_[Br]&&Br>ke&&Gr.push("'"+this.terminals_[Br]+"'");rt.showPosition?Xn="Parse error on line "+(te+1)+`: +`+rt.showPosition()+` +Expecting `+Gr.join(", ")+", got '"+(this.terminals_[se]||se)+"'":Xn="Parse error on line "+(te+1)+": Unexpected "+(se==J?"end of input":"'"+(this.terminals_[se]||se)+"'"),this.parseError(Xn,{text:rt.match,token:this.terminals_[se]||se,line:rt.yylineno,loc:Dr,expected:Gr})}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ve+", token: "+se);switch(ue[0]){case 1:xt.push(se),Nt.push(rt.yytext),wt.push(rt.yylloc),xt.push(ue[1]),se=null,Oe?(se=Oe,Oe=null):(ne=rt.yyleng,gt=rt.yytext,te=rt.yylineno,Dr=rt.yylloc,It>0&&It--);break;case 2:if(Kr=this.productions_[ue[1]][1],We.$=Nt[Nt.length-Kr],We._$={first_line:wt[wt.length-(Kr||1)].first_line,last_line:wt[wt.length-1].last_line,first_column:wt[wt.length-(Kr||1)].first_column,last_column:wt[wt.length-1].last_column},Ie&&(We._$.range=[wt[wt.length-(Kr||1)].range[0],wt[wt.length-1].range[1]]),yr=this.performAction.apply(We,[gt,ne,te,or.yy,ue[1],Nt,wt].concat(Xe)),typeof yr<"u")return yr;Kr&&(xt=xt.slice(0,-1*Kr*2),Nt=Nt.slice(0,-1*Kr),wt=wt.slice(0,-1*Kr)),xt.push(this.productions_[ue[1]][0]),Nt.push(We.$),wt.push(We._$),kr=he[xt[xt.length-2]][xt[xt.length-1]],xt.push(kr);break;case 3:return!0}}return!0},"parse")},nt=(function(){var Rt={EOF:1,parseError:s(function(At,xt){if(this.yy.parser)this.yy.parser.parseError(At,xt);else throw new Error(At)},"parseError"),setInput:s(function(Y,At){return this.yy=At||this.yy||{},this._input=Y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var At=Y.match(/(?:\r\n?|\n).*/g);return At?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},"input"),unput:s(function(Y){var At=Y.length,xt=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-At),this.offset-=At;var Zt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),xt.length-1&&(this.yylineno-=xt.length-1);var Nt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:xt?(xt.length===Zt.length?this.yylloc.first_column:0)+Zt[Zt.length-xt.length].length-xt[0].length:this.yylloc.first_column-At},this.options.ranges&&(this.yylloc.range=[Nt[0],Nt[0]+this.yyleng-At]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(Y){this.unput(this.match.slice(Y))},"less"),pastInput:s(function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Y=this.pastInput(),At=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+` +`+At+"^"},"showPosition"),test_match:s(function(Y,At){var xt,Zt,Nt;if(this.options.backtrack_lexer&&(Nt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Nt.yylloc.range=this.yylloc.range.slice(0))),Zt=Y[0].match(/(?:\r\n?|\n).*/g),Zt&&(this.yylineno+=Zt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Zt?Zt[Zt.length-1].length-Zt[Zt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Y[0].length),this.matched+=Y[0],xt=this.performAction.call(this,this.yy,this,At,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),xt)return xt;if(this._backtrack){for(var wt in Nt)this[wt]=Nt[wt];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,At,xt,Zt;this._more||(this.yytext="",this.match="");for(var Nt=this._currentRules(),wt=0;wtAt[0].length)){if(At=xt,Zt=wt,this.options.backtrack_lexer){if(Y=this.test_match(xt,Nt[wt]),Y!==!1)return Y;if(this._backtrack){At=!1;continue}else return!1}else if(!this.options.flex)break}return At?(Y=this.test_match(At,Nt[Zt]),Y!==!1?Y:!1):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:s(function(){var At=this.next();return At||this.lex()},"lex"),begin:s(function(At){this.conditionStack.push(At)},"begin"),popState:s(function(){var At=this.conditionStack.length-1;return At>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(At){return At=this.conditionStack.length-1-Math.abs(At||0),At>=0?this.conditionStack[At]:"INITIAL"},"topState"),pushState:s(function(At){this.begin(At)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(At,xt,Zt,Nt){var wt=Nt;switch(Zt){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return Rt})();G.lexer=nt;function W(){this.yy={}}return s(W,"Parser"),W.prototype=G,G.Parser=W,new W})();n8.parser=n8;ydt=n8});var Ns,qE,bdt=b(()=>{"use strict";lr();ps();Jt();pp();Ns=sl(),qE=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{s(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:Ue.quadrantChart?.chartWidth||500,chartWidth:Ue.quadrantChart?.chartHeight||500,titlePadding:Ue.quadrantChart?.titlePadding||10,titleFontSize:Ue.quadrantChart?.titleFontSize||20,quadrantPadding:Ue.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:Ue.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:Ue.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:Ue.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:Ue.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:Ue.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:Ue.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:Ue.quadrantChart?.pointTextPadding||5,pointLabelFontSize:Ue.quadrantChart?.pointLabelFontSize||12,pointRadius:Ue.quadrantChart?.pointRadius||5,xAxisPosition:Ue.quadrantChart?.xAxisPosition||"top",yAxisPosition:Ue.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:Ue.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:Ue.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Ns.quadrant1Fill,quadrant2Fill:Ns.quadrant2Fill,quadrant3Fill:Ns.quadrant3Fill,quadrant4Fill:Ns.quadrant4Fill,quadrant1TextFill:Ns.quadrant1TextFill,quadrant2TextFill:Ns.quadrant2TextFill,quadrant3TextFill:Ns.quadrant3TextFill,quadrant4TextFill:Ns.quadrant4TextFill,quadrantPointFill:Ns.quadrantPointFill,quadrantPointTextFill:Ns.quadrantPointTextFill,quadrantXAxisTextFill:Ns.quadrantXAxisTextFill,quadrantYAxisTextFill:Ns.quadrantYAxisTextFill,quadrantTitleFill:Ns.quadrantTitleFill,quadrantInternalBorderStrokeFill:Ns.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Ns.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,z.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,r){this.classes.set(t,r)}setConfig(t){z.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){z.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,r,i,n){let a=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,o={top:t==="top"&&r?a:0,bottom:t==="bottom"&&r?a:0},l=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&i?l:0,right:this.config.yAxisPosition==="right"&&i?l:0},h=this.config.titleFontSize+this.config.titlePadding*2,d={top:n?h:0},f=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+o.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,g=this.config.chartHeight-this.config.quadrantPadding*2-o.top-o.bottom-d.top,y=m/2,x=g/2;return{xAxisSpace:o,yAxisSpace:u,titleSpace:d,quadrantSpace:{quadrantLeft:f,quadrantTop:p,quadrantWidth:m,quadrantHalfWidth:y,quadrantHeight:g,quadrantHalfHeight:x}}}getAxisLabels(t,r,i,n){let{quadrantSpace:a,titleSpace:o}=n,{quadrantHalfHeight:l,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:d,quadrantTop:f,quadrantWidth:p}=a,m=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(m?d/2:0),y:t==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+f+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+d+(m?d/2:0),y:t==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+f+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:f+u-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:f+l-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),y}getQuadrants(t){let{quadrantSpace:r}=t,{quadrantHalfHeight:i,quadrantLeft:n,quadrantHalfWidth:a,quadrantTop:o}=r,l=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+a,y:o,width:a,height:i,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:n,y:o,width:a,height:i,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:n,y:o+i,width:a,height:i,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:n+a,y:o+i,width:a,height:i,fill:this.themeConfig.quadrant4Fill}];for(let u of l)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return l}getQuadrantPoints(t){let{quadrantSpace:r}=t,{quadrantHeight:i,quadrantLeft:n,quadrantTop:a,quadrantWidth:o}=r,l=Ao().domain([0,1]).range([n,o+n]),u=Ao().domain([0,1]).range([i+a,a]);return this.data.points.map(d=>{let f=this.classes.get(d.className);return f&&(d={...f,...d}),{x:l(d.x),y:u(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:l(d.x),y:u(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(t){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:o,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:h}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u,x2:o+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o+h,y1:u+r,x2:o+h,y2:u+a-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u+a,x2:o+h+r,y2:u+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o,y1:u+r,x2:o,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+l,y1:u+r,x2:o+l,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+r,y1:u+n,x2:o+h-r,y2:u+n}]}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(){let t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,n=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(n,t,r,i);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(n,t,r,a),borderLines:this.getBorders(a),title:this.getTitle(i)}}}});function s8(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function kdt(e){return!/^\d+$/.test(e)}function Tdt(e){return!/^\d+px$/.test(e)}var Zf,Cdt=b(()=>{"use strict";Zf=class extends Error{static{s(this,"InvalidStyleError")}constructor(t,r,i){super(`value for ${t} ${r} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};s(s8,"validateHexCode");s(kdt,"validateNumber");s(Tdt,"validateSizeInPixels")});function Jc(e){return nr(e.trim(),xFt)}function bFt(e){Yn.setData({quadrant1Text:Jc(e.text)})}function kFt(e){Yn.setData({quadrant2Text:Jc(e.text)})}function TFt(e){Yn.setData({quadrant3Text:Jc(e.text)})}function CFt(e){Yn.setData({quadrant4Text:Jc(e.text)})}function SFt(e){Yn.setData({xAxisLeftText:Jc(e.text)})}function wFt(e){Yn.setData({xAxisRightText:Jc(e.text)})}function _Ft(e){Yn.setData({yAxisTopText:Jc(e.text)})}function EFt(e){Yn.setData({yAxisBottomText:Jc(e.text)})}function a8(e){let t={};for(let r of e){let[i,n]=r.trim().split(/\s*:\s*/);if(i==="radius"){if(kdt(n))throw new Zf(i,n,"number");t.radius=parseInt(n)}else if(i==="color"){if(s8(n))throw new Zf(i,n,"hex code");t.color=n}else if(i==="stroke-color"){if(s8(n))throw new Zf(i,n,"hex code");t.strokeColor=n}else if(i==="stroke-width"){if(Tdt(n))throw new Zf(i,n,"number of pixels (eg. 10px)");t.strokeWidth=n}else throw new Error(`style named ${i} is not supported.`)}return t}function vFt(e,t,r,i,n){let a=a8(n);Yn.addPoints([{x:r,y:i,text:Jc(e.text),className:t,...a}])}function AFt(e,t){Yn.addClass(e,a8(t))}function RFt(e){Yn.setConfig({chartWidth:e})}function LFt(e){Yn.setConfig({chartHeight:e})}function DFt(){let e=Q(),{themeVariables:t,quadrantChart:r}=e;return r&&Yn.setConfig(r),Yn.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}),Yn.setData({titleText:er()}),Yn.build()}var xFt,Yn,IFt,Sdt,wdt=b(()=>{"use strict";ye();fr();yi();bdt();Cdt();xFt=Q();s(Jc,"textSanitizer");Yn=new qE;s(bFt,"setQuadrant1Text");s(kFt,"setQuadrant2Text");s(TFt,"setQuadrant3Text");s(CFt,"setQuadrant4Text");s(SFt,"setXAxisLeftText");s(wFt,"setXAxisRightText");s(_Ft,"setYAxisTopText");s(EFt,"setYAxisBottomText");s(a8,"parseStyles");s(vFt,"addPoint");s(AFt,"addClass");s(RFt,"setWidth");s(LFt,"setHeight");s(DFt,"getQuadrantData");IFt=s(function(){Yn.clear(),He()},"clear"),Sdt={setWidth:RFt,setHeight:LFt,setQuadrant1Text:bFt,setQuadrant2Text:kFt,setQuadrant3Text:TFt,setQuadrant4Text:CFt,setXAxisLeftText:SFt,setXAxisRightText:wFt,setYAxisTopText:_Ft,setYAxisBottomText:EFt,parseStyles:a8,addPoint:vFt,addClass:AFt,getQuadrantData:DFt,clear:IFt,setAccTitle:Ye,getAccTitle:Ze,setDiagramTitle:sr,getDiagramTitle:er,getAccDescription:tr,setAccDescription:Je}});var NFt,_dt,Edt=b(()=>{"use strict";lr();ye();Jt();gi();NFt=s((e,t,r,i)=>{function n(v){return v==="top"?"hanging":"middle"}s(n,"getDominantBaseLine");function a(v){return v==="left"?"start":"middle"}s(a,"getTextAnchor");function o(v){return`translate(${v.x}, ${v.y}) rotate(${v.rotation||0})`}s(o,"getTransformation");let l=Q();z.debug(`Rendering quadrant chart +`+e);let u=l.securityLevel,h;u==="sandbox"&&(h=vt("#i"+t));let f=(u==="sandbox"?vt(h.nodes()[0].contentDocument.body):vt("body")).select(`[id="${t}"]`),p=f.append("g").attr("class","main"),m=l.quadrantChart?.chartWidth??500,g=l.quadrantChart?.chartHeight??500;pr(f,g,m,l.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+m+" "+g),i.db.setHeight(g),i.db.setWidth(m);let y=i.db.getQuadrantData(),x=p.append("g").attr("class","quadrants"),k=p.append("g").attr("class","border"),T=p.append("g").attr("class","data-points"),C=p.append("g").attr("class","labels"),_=p.append("g").attr("class","title");y.title&&_.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",n(y.title.horizontalPos)).attr("text-anchor",a(y.title.verticalPos)).attr("transform",o(y.title)).text(y.title.text),y.borderLines&&k.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",v=>v.x1).attr("y1",v=>v.y1).attr("x2",v=>v.x2).attr("y2",v=>v.y2).style("stroke",v=>v.strokeFill).style("stroke-width",v=>v.strokeWidth);let S=x.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");S.append("rect").attr("x",v=>v.x).attr("y",v=>v.y).attr("width",v=>v.width).attr("height",v=>v.height).attr("fill",v=>v.fill),S.append("text").attr("x",0).attr("y",0).attr("fill",v=>v.text.fill).attr("font-size",v=>v.text.fontSize).attr("dominant-baseline",v=>n(v.text.horizontalPos)).attr("text-anchor",v=>a(v.text.verticalPos)).attr("transform",v=>o(v.text)).text(v=>v.text.text),C.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(v=>v.text).attr("fill",v=>v.fill).attr("font-size",v=>v.fontSize).attr("dominant-baseline",v=>n(v.horizontalPos)).attr("text-anchor",v=>a(v.verticalPos)).attr("transform",v=>o(v));let A=T.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");A.append("circle").attr("cx",v=>v.x).attr("cy",v=>v.y).attr("r",v=>v.radius).attr("fill",v=>v.fill).attr("stroke",v=>v.strokeColor).attr("stroke-width",v=>v.strokeWidth),A.append("text").attr("x",0).attr("y",0).text(v=>v.text.text).attr("fill",v=>v.text.fill).attr("font-size",v=>v.text.fontSize).attr("dominant-baseline",v=>n(v.text.horizontalPos)).attr("text-anchor",v=>a(v.text.verticalPos)).attr("transform",v=>o(v.text))},"draw"),_dt={draw:NFt}});var vdt={};Fe(vdt,{diagram:()=>OFt});var OFt,Adt=b(()=>{"use strict";xdt();wdt();Edt();OFt={parser:ydt,db:Sdt,renderer:_dt,styles:s(()=>"","styles")}});var o8,Ddt,Idt=b(()=>{"use strict";o8=(function(){var e=s(function(R,N,P,E){for(P=P||{},E=R.length;E--;P[R[E]]=N);return P},"o"),t=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],n=[1,5],a=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],u=[1,25],h=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],g=[1,32],y=[1,33],x=[1,34],k=[1,35],T=[1,36],C=[1,37],_=[1,43],S=[1,42],w=[1,47],A=[1,50],v=[1,10,12,14,16,18,19,21,23,34,35,36],M=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],$=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],I=[1,64],F={trace:s(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:s(function(N,P,E,D,V,L,q){var H=L.length-1;switch(V){case 5:D.setOrientation(L[H]);break;case 9:D.setDiagramTitle(L[H].text.trim());break;case 12:D.setLineData({text:"",type:"text"},L[H]);break;case 13:D.setLineData(L[H-1],L[H]);break;case 14:D.setBarData({text:"",type:"text"},L[H]);break;case 15:D.setBarData(L[H-1],L[H]);break;case 16:this.$=L[H].trim(),D.setAccTitle(this.$);break;case 17:case 18:this.$=L[H].trim(),D.setAccDescription(this.$);break;case 19:this.$=L[H-1];break;case 20:this.$=[Number(L[H-2]),...L[H]];break;case 21:this.$=[Number(L[H])];break;case 22:D.setXAxisTitle(L[H]);break;case 23:D.setXAxisTitle(L[H-1]);break;case 24:D.setXAxisTitle({type:"text",text:""});break;case 25:D.setXAxisBand(L[H]);break;case 26:D.setXAxisRangeData(Number(L[H-2]),Number(L[H]));break;case 27:this.$=L[H-1];break;case 28:this.$=[L[H-2],...L[H]];break;case 29:this.$=[L[H]];break;case 30:D.setYAxisTitle(L[H]);break;case 31:D.setYAxisTitle(L[H-1]);break;case 32:D.setYAxisTitle({type:"text",text:""});break;case 33:D.setYAxisRangeData(Number(L[H-2]),Number(L[H]));break;case 37:this.$={text:L[H],type:"text"};break;case 38:this.$={text:L[H],type:"text"};break;case 39:this.$={text:L[H],type:"markdown"};break;case 40:this.$=L[H];break;case 41:this.$=L[H-1]+""+L[H];break}},"anonymous"),table:[e(t,r,{3:1,4:2,7:4,5:i,34:n,35:a,36:o}),{1:[3]},e(t,r,{4:2,7:4,3:8,5:i,34:n,35:a,36:o}),e(t,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:n,35:a,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(t,r,{4:2,7:4,3:21,5:i,34:n,35:a,36:o}),{1:[2,3]},e(l,[2,5]),e(t,[2,7],{4:22,34:n,35:a,36:o}),{11:23,37:24,38:u,39:h,40:27,41:d,42:f,43:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C},{11:39,13:38,24:_,27:S,29:40,30:41,37:24,38:u,39:h,40:27,41:d,42:f,43:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C},{11:45,15:44,27:w,33:46,37:24,38:u,39:h,40:27,41:d,42:f,43:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C},{11:49,17:48,24:A,37:24,38:u,39:h,40:27,41:d,42:f,43:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C},{11:52,17:51,24:A,37:24,38:u,39:h,40:27,41:d,42:f,43:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C},{20:[1,53]},{22:[1,54]},e(v,[2,18]),{1:[2,2]},e(v,[2,8]),e(v,[2,9]),e(M,[2,37],{40:55,41:d,42:f,43:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C}),e(M,[2,38]),e(M,[2,39]),e($,[2,40]),e($,[2,42]),e($,[2,43]),e($,[2,44]),e($,[2,45]),e($,[2,46]),e($,[2,47]),e($,[2,48]),e($,[2,49]),e($,[2,50]),e($,[2,51]),e(v,[2,10]),e(v,[2,22],{30:41,29:56,24:_,27:S}),e(v,[2,24]),e(v,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:u,39:h,40:27,41:d,42:f,43:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C},e(v,[2,11]),e(v,[2,30],{33:60,27:w}),e(v,[2,32]),{31:[1,61]},e(v,[2,12]),{17:62,24:A},{25:63,27:I},e(v,[2,14]),{17:65,24:A},e(v,[2,16]),e(v,[2,17]),e($,[2,41]),e(v,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(v,[2,31]),{27:[1,69]},e(v,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(v,[2,15]),e(v,[2,26]),e(v,[2,27]),{11:59,32:72,37:24,38:u,39:h,40:27,41:d,42:f,43:p,44:m,45:g,46:y,47:x,48:k,49:T,50:C},e(v,[2,33]),e(v,[2,19]),{25:73,27:I},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:s(function(N,P){if(P.recoverable)this.trace(N);else{var E=new Error(N);throw E.hash=P,E}},"parseError"),parse:s(function(N){var P=this,E=[0],D=[],V=[null],L=[],q=this.table,H="",K=0,U=0,st=0,X=2,ut=1,ot=L.slice.call(arguments,1),mt=Object.create(this.lexer),ht={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(ht.yy[it]=this.yy[it]);mt.setInput(N,ht.yy),ht.yy.lexer=mt,ht.yy.parser=this,typeof mt.yylloc>"u"&&(mt.yylloc={});var Ot=mt.yylloc;L.push(Ot);var St=mt.options&&mt.options.ranges;typeof ht.yy.parseError=="function"?this.parseError=ht.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(G){E.length=E.length-2*G,V.length=V.length-G,L.length=L.length-G}s(yt,"popStack");function Et(){var G;return G=D.pop()||mt.lex()||ut,typeof G!="number"&&(G instanceof Array&&(D=G,G=D.pop()),G=P.symbols_[G]||G),G}s(Et,"lex");for(var Ct,Bt,Lt,ee,at,$e,pt={},Wt,Ht,Dt,bt;;){if(Lt=E[E.length-1],this.defaultActions[Lt]?ee=this.defaultActions[Lt]:((Ct===null||typeof Ct>"u")&&(Ct=Et()),ee=q[Lt]&&q[Lt][Ct]),typeof ee>"u"||!ee.length||!ee[0]){var Gt="";bt=[];for(Wt in q[Lt])this.terminals_[Wt]&&Wt>X&&bt.push("'"+this.terminals_[Wt]+"'");mt.showPosition?Gt="Parse error on line "+(K+1)+`: +`+mt.showPosition()+` +Expecting `+bt.join(", ")+", got '"+(this.terminals_[Ct]||Ct)+"'":Gt="Parse error on line "+(K+1)+": Unexpected "+(Ct==ut?"end of input":"'"+(this.terminals_[Ct]||Ct)+"'"),this.parseError(Gt,{text:mt.match,token:this.terminals_[Ct]||Ct,line:mt.yylineno,loc:Ot,expected:bt})}if(ee[0]instanceof Array&&ee.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Lt+", token: "+Ct);switch(ee[0]){case 1:E.push(Ct),V.push(mt.yytext),L.push(mt.yylloc),E.push(ee[1]),Ct=null,Bt?(Ct=Bt,Bt=null):(U=mt.yyleng,H=mt.yytext,K=mt.yylineno,Ot=mt.yylloc,st>0&&st--);break;case 2:if(Ht=this.productions_[ee[1]][1],pt.$=V[V.length-Ht],pt._$={first_line:L[L.length-(Ht||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Ht||1)].first_column,last_column:L[L.length-1].last_column},St&&(pt._$.range=[L[L.length-(Ht||1)].range[0],L[L.length-1].range[1]]),$e=this.performAction.apply(pt,[H,U,K,ht.yy,ee[1],V,L].concat(ot)),typeof $e<"u")return $e;Ht&&(E=E.slice(0,-1*Ht*2),V=V.slice(0,-1*Ht),L=L.slice(0,-1*Ht)),E.push(this.productions_[ee[1]][0]),V.push(pt.$),L.push(pt._$),Dt=q[E[E.length-2]][E[E.length-1]],E.push(Dt);break;case 3:return!0}}return!0},"parse")},B=(function(){var R={EOF:1,parseError:s(function(P,E){if(this.yy.parser)this.yy.parser.parseError(P,E);else throw new Error(P)},"parseError"),setInput:s(function(N,P){return this.yy=P||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var P=N.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:s(function(N){var P=N.length,E=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var D=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var V=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===D.length?this.yylloc.first_column:0)+D[D.length-E.length].length-E[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(N){this.unput(this.match.slice(N))},"less"),pastInput:s(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var N=this.pastInput(),P=new Array(N.length+1).join("-");return N+this.upcomingInput()+` +`+P+"^"},"showPosition"),test_match:s(function(N,P){var E,D,V;if(this.options.backtrack_lexer&&(V={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(V.yylloc.range=this.yylloc.range.slice(0))),D=N[0].match(/(?:\r\n?|\n).*/g),D&&(this.yylineno+=D.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:D?D[D.length-1].length-D[D.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],E=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var L in V)this[L]=V[L];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,P,E,D;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),L=0;LP[0].length)){if(P=E,D=L,this.options.backtrack_lexer){if(N=this.test_match(E,V[L]),N!==!1)return N;if(this._backtrack){P=!1;continue}else return!1}else if(!this.options.flex)break}return P?(N=this.test_match(P,V[D]),N!==!1?N:!1):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:s(function(){var P=this.next();return P||this.lex()},"lex"),begin:s(function(P){this.conditionStack.push(P)},"begin"),popState:s(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},"topState"),pushState:s(function(P){this.begin(P)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(P,E,D,V){var L=V;switch(D){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 31;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 27;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return R})();F.lexer=B;function O(){this.yy={}}return s(O,"Parser"),O.prototype=F,F.Parser=O,new O})();o8.parser=o8;Ddt=o8});function l8(e){return e.type==="bar"}function jE(e){return e.type==="band"}function my(e){return e.type==="linear"}var UE=b(()=>{"use strict";s(l8,"isBarPlot");s(jE,"isBandAxisData");s(my,"isLinearAxisData")});var gy,c8=b(()=>{"use strict";Xa();gy=class{constructor(t){this.parentGroup=t}static{s(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,r){if(!this.parentGroup)return{width:t.reduce((a,o)=>Math.max(o.length,a),0)*r,height:r};let i={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let a of t){let o=cY(n,1,a),l=o?o.width:a.length*r,u=o?o.height:r;i.width=Math.max(i.width,l),i.height=Math.max(i.height,u)}return n.remove(),i}}});var yy,u8=b(()=>{"use strict";yy=class{constructor(t,r,i,n){this.axisConfig=t;this.title=r;this.textDimensionCalculator=i;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{s(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?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(){let 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()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let r=t.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let i=this.getLabelDimension(),n=.2*t.width;this.outerPadding=Math.min(i.width/2,n);let a=i.height+this.axisConfig.labelPadding*2;this.labelTextHeight=i.height,a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let i=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=i.height+this.axisConfig.titlePadding*2;this.titleTextHeight=i.height,n<=r&&(r-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-r}calculateSpaceIfDrawnVertical(t){let r=t.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let i=this.getLabelDimension(),n=.2*t.height;this.outerPadding=Math.min(i.height/2,n);let a=i.width+this.axisConfig.labelPadding*2;a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let i=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=i.height+this.axisConfig.titlePadding*2;this.titleTextHeight=i.height,n<=r&&(r-=n,this.showTitle=!0)}this.boundingRect.width=t.width-r,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?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(){let t=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.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(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(i=>({path:`M ${r},${this.getScaleValue(i)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(i)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),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 r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(i=>({path:`M ${this.getScaleValue(i)},${r} L ${this.getScaleValue(i)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(i=>({path:`M ${this.getScaleValue(i)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(i)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}}});var HE,Ndt=b(()=>{"use strict";lr();Jt();u8();HE=class extends yy{static{s(this,"BandAxis")}constructor(t,r,i,n,a){super(t,n,a,r),this.categories=i,this.scale=Pp().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Pp().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),z.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}}});var YE,Odt=b(()=>{"use strict";lr();u8();YE=class extends yy{static{s(this,"LinearAxis")}constructor(t,r,i,n,a){super(t,n,a,r),this.domain=i,this.scale=Ao().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Ao().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function h8(e,t,r,i){let n=new gy(i);return jE(e)?new HE(t,r,e.categories,e.title,n):new YE(t,r,[e.min,e.max],e.title,n)}var Mdt=b(()=>{"use strict";UE();c8();Ndt();Odt();s(h8,"getAxis")});function Bdt(e,t,r,i){let n=new gy(i);return new d8(n,e,t,r)}var d8,Pdt=b(()=>{"use strict";c8();d8=class{constructor(t,r,i,n){this.textDimensionCalculator=t;this.chartConfig=r;this.chartData=i;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{s(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),i=Math.max(r.width,t.width),n=r.height+2*this.chartConfig.titlePadding;return r.width<=i&&r.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=i,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let 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}};s(Bdt,"getChartTitleComponent")});var XE,$dt=b(()=>{"use strict";lr();XE=class{constructor(t,r,i,n,a){this.plotData=t;this.xAxis=r;this.yAxis=i;this.orientation=n;this.plotIndex=a}static{s(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),r;return this.orientation==="horizontal"?r=No().y(i=>i[0]).x(i=>i[1])(t):r=No().x(i=>i[0]).y(i=>i[1])(t),r?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}});var KE,Fdt=b(()=>{"use strict";KE=class{constructor(t,r,i,n,a,o){this.barData=t;this.boundingRect=r;this.xAxis=i;this.yAxis=n;this.orientation=a;this.plotIndex=o}static{s(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=i/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(a=>({x:this.boundingRect.x,y:a[0]-n,height:i,width:a[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(a=>({x:a[0]-n,y:a[1],width:i,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Vdt(e,t,r){return new f8(e,t,r)}var f8,zdt=b(()=>{"use strict";$dt();Fdt();f8=class{constructor(t,r,i){this.chartConfig=t;this.chartData=r;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0}}static{s(this,"BasePlot")}setAxes(t,r){this.xAxis=t,this.yAxis=r}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");let t=[];for(let[r,i]of this.chartData.plots.entries())switch(i.type){case"line":{let n=new XE(i,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);t.push(...n.getDrawableElement())}break;case"bar":{let n=new KE(i,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);t.push(...n.getDrawableElement())}break}return t}};s(Vdt,"getPlotComponent")});var QE,Gdt=b(()=>{"use strict";Mdt();Pdt();zdt();UE();QE=class{constructor(t,r,i,n){this.chartConfig=t;this.chartData=r;this.componentStore={title:Bdt(t,r,i,n),plot:Vdt(t,r,i),xAxis:h8(r.xAxis,t.xAxis,{titleColor:i.xAxisTitleColor,labelColor:i.xAxisLabelColor,tickColor:i.xAxisTickColor,axisLineColor:i.xAxisLineColor},n),yAxis:h8(r.yAxis,t.yAxis,{titleColor:i.yAxisTitleColor,labelColor:i.yAxisLabelColor,tickColor:i.yAxisTickColor,axisLineColor:i.yAxisLineColor},n)}}static{s(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,r=this.chartConfig.height,i=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:a,height:o});t-=l.width,r-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=l.height,r-=l.height,this.componentStore.xAxis.setAxisPosition("bottom"),l=this.componentStore.xAxis.calculateSpace({width:t,height:r}),r-=l.height,this.componentStore.yAxis.setAxisPosition("left"),l=this.componentStore.yAxis.calculateSpace({width:t,height:r}),i=l.width,t-=l.width,t>0&&(a+=t,t=0),r>0&&(o+=r,r=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([i,i+a]),this.componentStore.xAxis.setBoundingBoxXY({x:i,y:n+o}),this.componentStore.yAxis.setRange([n,n+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(u=>l8(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,r=this.chartConfig.height,i=0,n=0,a=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:o,height:l});t-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("left"),u=this.componentStore.xAxis.calculateSpace({width:t,height:r}),t-=u.width,n=u.width,this.componentStore.yAxis.setAxisPosition("top"),u=this.componentStore.yAxis.calculateSpace({width:t,height:r}),r-=u.height,a=i+u.height,t>0&&(o+=t,t=0),r>0&&(l+=r,r=0),this.componentStore.plot.calculateSpace({width:o,height:l}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.yAxis.setRange([n,n+o]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:i}),this.componentStore.xAxis.setRange([a,a+l]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(h=>l8(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))t.push(...r.getDrawableElements());return t}}});var ZE,Wdt=b(()=>{"use strict";Gdt();ZE=class{static{s(this,"XYChartBuilder")}static build(t,r,i,n){return new QE(t,r,i,n).getDrawableElement()}}});function jdt(){let e=sl(),t=le();return Wr(e.xyChart,t.themeVariables.xyChart)}function Udt(){let e=le();return Wr(Ue.xyChart,e.xyChart)}function Hdt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function g8(e){let t=le();return nr(e.trim(),t)}function $Ft(e){qdt=e}function FFt(e){e==="horizontal"?Kb.chartOrientation="horizontal":Kb.chartOrientation="vertical"}function VFt(e){Xr.xAxis.title=g8(e.text)}function Ydt(e,t){Xr.xAxis={type:"linear",title:Xr.xAxis.title,min:e,max:t},JE=!0}function zFt(e){Xr.xAxis={type:"band",title:Xr.xAxis.title,categories:e.map(t=>g8(t.text))},JE=!0}function GFt(e){Xr.yAxis.title=g8(e.text)}function WFt(e,t){Xr.yAxis={type:"linear",title:Xr.yAxis.title,min:e,max:t},m8=!0}function qFt(e){let t=Math.min(...e),r=Math.max(...e),i=my(Xr.yAxis)?Xr.yAxis.min:1/0,n=my(Xr.yAxis)?Xr.yAxis.max:-1/0;Xr.yAxis={type:"linear",title:Xr.yAxis.title,min:Math.min(i,t),max:Math.max(n,r)}}function Xdt(e){let t=[];if(e.length===0)return t;if(!JE){let r=my(Xr.xAxis)?Xr.xAxis.min:1/0,i=my(Xr.xAxis)?Xr.xAxis.max:-1/0;Ydt(Math.min(r,1),Math.max(i,e.length))}if(m8||qFt(e),jE(Xr.xAxis)&&(t=Xr.xAxis.categories.map((r,i)=>[r,e[i]])),my(Xr.xAxis)){let r=Xr.xAxis.min,i=Xr.xAxis.max,n=(i-r)/(e.length-1),a=[];for(let o=r;o<=i;o+=n)a.push(`${o}`);t=a.map((o,l)=>[o,e[l]])}return t}function Kdt(e){return p8[e===0?0:e%p8.length]}function jFt(e,t){let r=Xdt(t);Xr.plots.push({type:"line",strokeFill:Kdt(Xb),strokeWidth:2,data:r}),Xb++}function UFt(e,t){let r=Xdt(t);Xr.plots.push({type:"bar",fill:Kdt(Xb),data:r}),Xb++}function HFt(){if(Xr.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return Xr.title=er(),ZE.build(Kb,Xr,Qb,qdt)}function YFt(){return Qb}function XFt(){return Kb}function KFt(){return Xr}var Xb,qdt,Kb,Qb,Xr,p8,JE,m8,QFt,Qdt,Zdt=b(()=>{"use strict";Qe();ps();pp();Re();fr();yi();Wdt();UE();Xb=0,Kb=Udt(),Qb=jdt(),Xr=Hdt(),p8=Qb.plotColorPalette.split(",").map(e=>e.trim()),JE=!1,m8=!1;s(jdt,"getChartDefaultThemeConfig");s(Udt,"getChartDefaultConfig");s(Hdt,"getChartDefaultData");s(g8,"textSanitizer");s($Ft,"setTmpSVGG");s(FFt,"setOrientation");s(VFt,"setXAxisTitle");s(Ydt,"setXAxisRangeData");s(zFt,"setXAxisBand");s(GFt,"setYAxisTitle");s(WFt,"setYAxisRangeData");s(qFt,"setYAxisRangeFromPlotData");s(Xdt,"transformDataWithoutCategory");s(Kdt,"getPlotColorFromPalette");s(jFt,"setLineData");s(UFt,"setBarData");s(HFt,"getDrawableElem");s(YFt,"getChartThemeConfig");s(XFt,"getChartConfig");s(KFt,"getXYChartData");QFt=s(function(){He(),Xb=0,Kb=Udt(),Xr=Hdt(),Qb=jdt(),p8=Qb.plotColorPalette.split(",").map(e=>e.trim()),JE=!1,m8=!1},"clear"),Qdt={getDrawableElem:HFt,clear:QFt,setAccTitle:Ye,getAccTitle:Ze,setDiagramTitle:sr,getDiagramTitle:er,getAccDescription:tr,setAccDescription:Je,setOrientation:FFt,setXAxisTitle:VFt,setXAxisRangeData:Ydt,setXAxisBand:zFt,setYAxisTitle:GFt,setYAxisRangeData:WFt,setLineData:jFt,setBarData:UFt,setTmpSVGG:$Ft,getChartThemeConfig:YFt,getChartConfig:XFt,getXYChartData:KFt}});var ZFt,Jdt,tft=b(()=>{"use strict";Jt();ca();gi();ZFt=s((e,t,r,i)=>{let n=i.db,a=n.getChartThemeConfig(),o=n.getChartConfig(),l=n.getXYChartData().plots[0].data.map(C=>C[1]);function u(C){return C==="top"?"text-before-edge":"middle"}s(u,"getDominantBaseLine");function h(C){return C==="left"?"start":C==="right"?"end":"middle"}s(h,"getTextAnchor");function d(C){return`translate(${C.x}, ${C.y}) rotate(${C.rotation||0})`}s(d,"getTextTransformation"),z.debug(`Rendering xychart chart +`+e);let f=pi(t),p=f.append("g").attr("class","main"),m=p.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");pr(f,o.height,o.width,!0),f.attr("viewBox",`0 0 ${o.width} ${o.height}`),m.attr("fill",a.backgroundColor),n.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));let g=n.getDrawableElem(),y={};function x(C){let _=p,S="";for(let[w]of C.entries()){let A=p;w>0&&y[S]&&(A=y[S]),S+=C[w],_=y[S],_||(_=y[S]=A.append("g").attr("class",C[w]))}return _}s(x,"getGroup");for(let C of g){if(C.data.length===0)continue;let _=x(C.groupTexts);switch(C.type){case"rect":if(_.selectAll("rect").data(C.data).enter().append("rect").attr("x",S=>S.x).attr("y",S=>S.y).attr("width",S=>S.width).attr("height",S=>S.height).attr("fill",S=>S.fill).attr("stroke",S=>S.strokeFill).attr("stroke-width",S=>S.strokeWidth),o.showDataLabel){let S=o.showDataLabelOutsideBar;if(o.chartOrientation==="horizontal"){let M=function(B,O){let{data:R,label:N}=B;return O*N.length*.7<=R.width-10};var k=M;s(M,"fitsHorizontally");let w=.7,A=10,v=C.data.map((B,O)=>({data:B,label:l[O].toString()})).filter(B=>B.data.width>0&&B.data.height>0),$=v.map(B=>{let{data:O}=B,R=O.height*.7;for(;!M(B,R)&&R>0;)R-=1;return R}),I=Math.floor(Math.min(...$)),F=s(B=>S?B.data.x+B.data.width+10:B.data.x+B.data.width-10,"determineLabelXPosition");_.selectAll("text").data(v).enter().append("text").attr("x",F).attr("y",B=>B.data.y+B.data.height/2).attr("text-anchor",S?"start":"end").attr("dominant-baseline","middle").attr("fill",a.dataLabelColor).attr("font-size",`${I}px`).text(B=>B.label)}else{let v=function(F,B,O){let{data:R,label:N}=F,E=B*N.length*.7,D=R.x+R.width/2,V=D-E/2,L=D+E/2,q=V>=R.x&&L<=R.x+R.width,H=R.y+O+B<=R.y+R.height;return q&&H};var T=v;s(v,"fitsInBar");let w=10,A=C.data.map((F,B)=>({data:F,label:l[B].toString()})).filter(F=>F.data.width>0&&F.data.height>0),M=A.map(F=>{let{data:B,label:O}=F,R=B.width/(O.length*.7);for(;!v(F,R,10)&&R>0;)R-=1;return R}),$=Math.floor(Math.min(...M)),I=s(F=>S?F.data.y-10:F.data.y+10,"determineLabelYPosition");_.selectAll("text").data(A).enter().append("text").attr("x",F=>F.data.x+F.data.width/2).attr("y",I).attr("text-anchor","middle").attr("dominant-baseline",S?"auto":"hanging").attr("fill",a.dataLabelColor).attr("font-size",`${$}px`).text(F=>F.label)}}break;case"text":_.selectAll("text").data(C.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",S=>S.fill).attr("font-size",S=>S.fontSize).attr("dominant-baseline",S=>u(S.verticalPos)).attr("text-anchor",S=>h(S.horizontalPos)).attr("transform",S=>d(S)).text(S=>S.text);break;case"path":_.selectAll("path").data(C.data).enter().append("path").attr("d",S=>S.path).attr("fill",S=>S.fill?S.fill:"none").attr("stroke",S=>S.strokeFill).attr("stroke-width",S=>S.strokeWidth);break}}},"draw"),Jdt={draw:ZFt}});var eft={};Fe(eft,{diagram:()=>JFt});var JFt,rft=b(()=>{"use strict";Idt();Zdt();tft();JFt={parser:Ddt,db:Qdt,renderer:Jdt}});var y8,sft,aft=b(()=>{"use strict";y8=(function(){var e=s(function(G,nt,W,Rt){for(W=W||{},Rt=G.length;Rt--;W[G[Rt]]=nt);return W},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],o=[1,22],l=[2,7],u=[1,26],h=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],g=[1,35],y=[1,36],x=[1,37],k=[1,38],T=[1,24],C=[1,31],_=[1,32],S=[1,30],w=[1,39],A=[1,40],v=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],M=[1,61],$=[89,90],I=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],F=[27,29],B=[1,70],O=[1,71],R=[1,72],N=[1,73],P=[1,74],E=[1,75],D=[1,76],V=[1,83],L=[1,80],q=[1,84],H=[1,85],K=[1,86],U=[1,87],st=[1,88],X=[1,89],ut=[1,90],ot=[1,91],mt=[1,92],ht=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],it=[63,64],Ot=[1,101],St=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],yt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Et=[1,110],Ct=[1,106],Bt=[1,107],Lt=[1,108],ee=[1,109],at=[1,111],$e=[1,116],pt=[1,117],Wt=[1,114],Ht=[1,115],Dt={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:s(function(nt,W,Rt,Y,At,xt,Zt){var Nt=xt.length-1;switch(At){case 4:this.$=xt[Nt].trim(),Y.setAccTitle(this.$);break;case 5:case 6:this.$=xt[Nt].trim(),Y.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:Y.setDirection("TB");break;case 18:Y.setDirection("BT");break;case 19:Y.setDirection("RL");break;case 20:Y.setDirection("LR");break;case 21:Y.addRequirement(xt[Nt-3],xt[Nt-4]);break;case 22:Y.addRequirement(xt[Nt-5],xt[Nt-6]),Y.setClass([xt[Nt-5]],xt[Nt-3]);break;case 23:Y.setNewReqId(xt[Nt-2]);break;case 24:Y.setNewReqText(xt[Nt-2]);break;case 25:Y.setNewReqRisk(xt[Nt-2]);break;case 26:Y.setNewReqVerifyMethod(xt[Nt-2]);break;case 29:this.$=Y.RequirementType.REQUIREMENT;break;case 30:this.$=Y.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=Y.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=Y.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=Y.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=Y.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=Y.RiskLevel.LOW_RISK;break;case 36:this.$=Y.RiskLevel.MED_RISK;break;case 37:this.$=Y.RiskLevel.HIGH_RISK;break;case 38:this.$=Y.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=Y.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=Y.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=Y.VerifyType.VERIFY_TEST;break;case 42:Y.addElement(xt[Nt-3]);break;case 43:Y.addElement(xt[Nt-5]),Y.setClass([xt[Nt-5]],xt[Nt-3]);break;case 44:Y.setNewElementType(xt[Nt-2]);break;case 45:Y.setNewElementDocRef(xt[Nt-2]);break;case 48:Y.addRelationship(xt[Nt-2],xt[Nt],xt[Nt-4]);break;case 49:Y.addRelationship(xt[Nt-2],xt[Nt-4],xt[Nt]);break;case 50:this.$=Y.Relationships.CONTAINS;break;case 51:this.$=Y.Relationships.COPIES;break;case 52:this.$=Y.Relationships.DERIVES;break;case 53:this.$=Y.Relationships.SATISFIES;break;case 54:this.$=Y.Relationships.VERIFIES;break;case 55:this.$=Y.Relationships.REFINES;break;case 56:this.$=Y.Relationships.TRACES;break;case 57:this.$=xt[Nt-2],Y.defineClass(xt[Nt-1],xt[Nt]);break;case 58:Y.setClass(xt[Nt-1],xt[Nt]);break;case 59:Y.setClass([xt[Nt-2]],xt[Nt]);break;case 60:case 62:this.$=[xt[Nt]];break;case 61:case 63:this.$=xt[Nt-2].concat([xt[Nt]]);break;case 64:this.$=xt[Nt-2],Y.setCssStyle(xt[Nt-1],xt[Nt]);break;case 65:this.$=[xt[Nt]];break;case 66:xt[Nt-2].push(xt[Nt]),this.$=xt[Nt-2];break;case 68:this.$=xt[Nt-1]+xt[Nt];break}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:r,11:i,13:n},{1:[2,2]},{4:17,5:o,7:13,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:o,7:42,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{4:17,5:o,7:43,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{4:17,5:o,7:44,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{4:17,5:o,7:45,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{4:17,5:o,7:46,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{4:17,5:o,7:47,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{4:17,5:o,7:48,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{4:17,5:o,7:49,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{4:17,5:o,7:50,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:k,54:T,72:C,74:_,77:S,89:w,90:A},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(v,[2,17]),e(v,[2,18]),e(v,[2,19]),e(v,[2,20]),{30:60,33:62,75:M,89:w,90:A},{30:63,33:62,75:M,89:w,90:A},{30:64,33:62,75:M,89:w,90:A},e($,[2,29]),e($,[2,30]),e($,[2,31]),e($,[2,32]),e($,[2,33]),e($,[2,34]),e(I,[2,81]),e(I,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(F,[2,79]),e(F,[2,80]),{27:[1,67],29:[1,68]},e(F,[2,85]),e(F,[2,86]),{62:69,65:B,66:O,67:R,68:N,69:P,70:E,71:D},{62:77,65:B,66:O,67:R,68:N,69:P,70:E,71:D},{30:78,33:62,75:M,89:w,90:A},{73:79,75:V,76:L,78:81,79:82,80:q,81:H,82:K,83:U,84:st,85:X,86:ut,87:ot,88:mt},e(ht,[2,60]),e(ht,[2,62]),{73:93,75:V,76:L,78:81,79:82,80:q,81:H,82:K,83:U,84:st,85:X,86:ut,87:ot,88:mt},{30:94,33:62,75:M,76:L,89:w,90:A},{5:[1,95]},{30:96,33:62,75:M,89:w,90:A},{5:[1,97]},{30:98,33:62,75:M,89:w,90:A},{63:[1,99]},e(it,[2,50]),e(it,[2,51]),e(it,[2,52]),e(it,[2,53]),e(it,[2,54]),e(it,[2,55]),e(it,[2,56]),{64:[1,100]},e(v,[2,59],{76:L}),e(v,[2,64],{76:Ot}),{33:103,75:[1,102],89:w,90:A},e(St,[2,65],{79:104,75:V,80:q,81:H,82:K,83:U,84:st,85:X,86:ut,87:ot,88:mt}),e(yt,[2,67]),e(yt,[2,69]),e(yt,[2,70]),e(yt,[2,71]),e(yt,[2,72]),e(yt,[2,73]),e(yt,[2,74]),e(yt,[2,75]),e(yt,[2,76]),e(yt,[2,77]),e(yt,[2,78]),e(v,[2,57],{76:Ot}),e(v,[2,58],{76:L}),{5:Et,28:105,31:Ct,34:Bt,36:Lt,38:ee,40:at},{27:[1,112],76:L},{5:$e,40:pt,56:113,57:Wt,59:Ht},{27:[1,118],76:L},{33:119,89:w,90:A},{33:120,89:w,90:A},{75:V,78:121,79:82,80:q,81:H,82:K,83:U,84:st,85:X,86:ut,87:ot,88:mt},e(ht,[2,61]),e(ht,[2,63]),e(yt,[2,68]),e(v,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Et,28:126,31:Ct,34:Bt,36:Lt,38:ee,40:at},e(v,[2,28]),{5:[1,127]},e(v,[2,42]),{32:[1,128]},{32:[1,129]},{5:$e,40:pt,56:130,57:Wt,59:Ht},e(v,[2,47]),{5:[1,131]},e(v,[2,48]),e(v,[2,49]),e(St,[2,66],{79:104,75:V,80:q,81:H,82:K,83:U,84:st,85:X,86:ut,87:ot,88:mt}),{33:132,89:w,90:A},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(v,[2,27]),{5:Et,28:145,31:Ct,34:Bt,36:Lt,38:ee,40:at},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(v,[2,46]),{5:$e,40:pt,56:152,57:Wt,59:Ht},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(v,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(v,[2,43]),{5:Et,28:159,31:Ct,34:Bt,36:Lt,38:ee,40:at},{5:Et,28:160,31:Ct,34:Bt,36:Lt,38:ee,40:at},{5:Et,28:161,31:Ct,34:Bt,36:Lt,38:ee,40:at},{5:Et,28:162,31:Ct,34:Bt,36:Lt,38:ee,40:at},{5:$e,40:pt,56:163,57:Wt,59:Ht},{5:$e,40:pt,56:164,57:Wt,59:Ht},e(v,[2,23]),e(v,[2,24]),e(v,[2,25]),e(v,[2,26]),e(v,[2,44]),e(v,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:s(function(nt,W){if(W.recoverable)this.trace(nt);else{var Rt=new Error(nt);throw Rt.hash=W,Rt}},"parseError"),parse:s(function(nt){var W=this,Rt=[0],Y=[],At=[null],xt=[],Zt=this.table,Nt="",wt=0,he=0,gt=0,te=2,ne=1,It=xt.slice.call(arguments,1),ke=Object.create(this.lexer),J={yy:{}};for(var Xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xe)&&(J.yy[Xe]=this.yy[Xe]);ke.setInput(nt,J.yy),J.yy.lexer=ke,J.yy.parser=this,typeof ke.yylloc>"u"&&(ke.yylloc={});var rt=ke.yylloc;xt.push(rt);var or=ke.options&&ke.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Sr(kr){Rt.length=Rt.length-2*kr,At.length=At.length-kr,xt.length=xt.length-kr}s(Sr,"popStack");function Dr(){var kr;return kr=Y.pop()||ke.lex()||ne,typeof kr!="number"&&(kr instanceof Array&&(Y=kr,kr=Y.pop()),kr=W.symbols_[kr]||kr),kr}s(Dr,"lex");for(var Ie,vr,ge,se,Oe,ve,ue={},Ge,yr,We,Br;;){if(ge=Rt[Rt.length-1],this.defaultActions[ge]?se=this.defaultActions[ge]:((Ie===null||typeof Ie>"u")&&(Ie=Dr()),se=Zt[ge]&&Zt[ge][Ie]),typeof se>"u"||!se.length||!se[0]){var Kr="";Br=[];for(Ge in Zt[ge])this.terminals_[Ge]&&Ge>te&&Br.push("'"+this.terminals_[Ge]+"'");ke.showPosition?Kr="Parse error on line "+(wt+1)+`: +`+ke.showPosition()+` +Expecting `+Br.join(", ")+", got '"+(this.terminals_[Ie]||Ie)+"'":Kr="Parse error on line "+(wt+1)+": Unexpected "+(Ie==ne?"end of input":"'"+(this.terminals_[Ie]||Ie)+"'"),this.parseError(Kr,{text:ke.match,token:this.terminals_[Ie]||Ie,line:ke.yylineno,loc:rt,expected:Br})}if(se[0]instanceof Array&&se.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ge+", token: "+Ie);switch(se[0]){case 1:Rt.push(Ie),At.push(ke.yytext),xt.push(ke.yylloc),Rt.push(se[1]),Ie=null,vr?(Ie=vr,vr=null):(he=ke.yyleng,Nt=ke.yytext,wt=ke.yylineno,rt=ke.yylloc,gt>0&>--);break;case 2:if(yr=this.productions_[se[1]][1],ue.$=At[At.length-yr],ue._$={first_line:xt[xt.length-(yr||1)].first_line,last_line:xt[xt.length-1].last_line,first_column:xt[xt.length-(yr||1)].first_column,last_column:xt[xt.length-1].last_column},or&&(ue._$.range=[xt[xt.length-(yr||1)].range[0],xt[xt.length-1].range[1]]),ve=this.performAction.apply(ue,[Nt,he,wt,J.yy,se[1],At,xt].concat(It)),typeof ve<"u")return ve;yr&&(Rt=Rt.slice(0,-1*yr*2),At=At.slice(0,-1*yr),xt=xt.slice(0,-1*yr)),Rt.push(this.productions_[se[1]][0]),At.push(ue.$),xt.push(ue._$),We=Zt[Rt[Rt.length-2]][Rt[Rt.length-1]],Rt.push(We);break;case 3:return!0}}return!0},"parse")},bt=(function(){var G={EOF:1,parseError:s(function(W,Rt){if(this.yy.parser)this.yy.parser.parseError(W,Rt);else throw new Error(W)},"parseError"),setInput:s(function(nt,W){return this.yy=W||this.yy||{},this._input=nt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var nt=this._input[0];this.yytext+=nt,this.yyleng++,this.offset++,this.match+=nt,this.matched+=nt;var W=nt.match(/(?:\r\n?|\n).*/g);return W?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),nt},"input"),unput:s(function(nt){var W=nt.length,Rt=nt.split(/(?:\r\n?|\n)/g);this._input=nt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-W),this.offset-=W;var Y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Rt.length-1&&(this.yylineno-=Rt.length-1);var At=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Rt?(Rt.length===Y.length?this.yylloc.first_column:0)+Y[Y.length-Rt.length].length-Rt[0].length:this.yylloc.first_column-W},this.options.ranges&&(this.yylloc.range=[At[0],At[0]+this.yyleng-W]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(nt){this.unput(this.match.slice(nt))},"less"),pastInput:s(function(){var nt=this.matched.substr(0,this.matched.length-this.match.length);return(nt.length>20?"...":"")+nt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var nt=this.match;return nt.length<20&&(nt+=this._input.substr(0,20-nt.length)),(nt.substr(0,20)+(nt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var nt=this.pastInput(),W=new Array(nt.length+1).join("-");return nt+this.upcomingInput()+` +`+W+"^"},"showPosition"),test_match:s(function(nt,W){var Rt,Y,At;if(this.options.backtrack_lexer&&(At={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(At.yylloc.range=this.yylloc.range.slice(0))),Y=nt[0].match(/(?:\r\n?|\n).*/g),Y&&(this.yylineno+=Y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Y?Y[Y.length-1].length-Y[Y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+nt[0].length},this.yytext+=nt[0],this.match+=nt[0],this.matches=nt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(nt[0].length),this.matched+=nt[0],Rt=this.performAction.call(this,this.yy,this,W,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Rt)return Rt;if(this._backtrack){for(var xt in At)this[xt]=At[xt];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var nt,W,Rt,Y;this._more||(this.yytext="",this.match="");for(var At=this._currentRules(),xt=0;xtW[0].length)){if(W=Rt,Y=xt,this.options.backtrack_lexer){if(nt=this.test_match(Rt,At[xt]),nt!==!1)return nt;if(this._backtrack){W=!1;continue}else return!1}else if(!this.options.flex)break}return W?(nt=this.test_match(W,At[Y]),nt!==!1?nt:!1):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:s(function(){var W=this.next();return W||this.lex()},"lex"),begin:s(function(W){this.conditionStack.push(W)},"begin"),popState:s(function(){var W=this.conditionStack.length-1;return W>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(W){return W=this.conditionStack.length-1-Math.abs(W||0),W>=0?this.conditionStack[W]:"INITIAL"},"topState"),pushState:s(function(W){this.begin(W)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(W,Rt,Y,At){var xt=At;switch(Y){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return Rt.yytext=Rt.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return G})();Dt.lexer=bt;function Gt(){this.yy={}}return s(Gt,"Parser"),Gt.prototype=Dt,Dt.Parser=Gt,new Gt})();y8.parser=y8;sft=y8});var tv,oft=b(()=>{"use strict";ye();Jt();yi();tv=class{constructor(){this.relations=[];this.latestRequirement=this.getInitialRequirement();this.requirements=new Map;this.latestElement=this.getInitialElement();this.elements=new Map;this.classes=new Map;this.direction="TB";this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"};this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"};this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"};this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"};this.setAccTitle=Ye;this.getAccTitle=Ze;this.setAccDescription=Je;this.getAccDescription=tr;this.setDiagramTitle=sr;this.getDiagramTitle=er;this.getConfig=s(()=>Q().requirement,"getConfig");this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{s(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,r){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:r,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=t)}setNewReqText(t){this.latestRequirement!==void 0&&(this.latestRequirement.text=t)}setNewReqRisk(t){this.latestRequirement!==void 0&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),z.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){this.latestElement!==void 0&&(this.latestElement.type=t)}setNewElementDocRef(t){this.latestElement!==void 0&&(this.latestElement.docRef=t)}addRelationship(t,r,i){this.relations.push({type:t,src:r,dst:i})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,He()}setCssStyle(t,r){for(let i of t){let n=this.requirements.get(i)??this.elements.get(i);if(!r||!n)return;for(let a of r)a.includes(",")?n.cssStyles.push(...a.split(",")):n.cssStyles.push(a)}}setClass(t,r){for(let i of t){let n=this.requirements.get(i)??this.elements.get(i);if(n)for(let a of r){n.classes.push(a);let o=this.classes.get(a)?.styles;o&&n.cssStyles.push(...o)}}}defineClass(t,r){for(let i of t){let n=this.classes.get(i);n===void 0&&(n={id:i,styles:[],textStyles:[]},this.classes.set(i,n)),r&&r.forEach(function(a){if(/color/.exec(a)){let o=a.replace("fill","bgFill");n.textStyles.push(o)}n.styles.push(a)}),this.requirements.forEach(a=>{a.classes.includes(i)&&a.cssStyles.push(...r.flatMap(o=>o.split(",")))}),this.elements.forEach(a=>{a.classes.includes(i)&&a.cssStyles.push(...r.flatMap(o=>o.split(",")))})}}getClasses(){return this.classes}getData(){let t=Q(),r=[],i=[];for(let n of this.requirements.values()){let a=n;a.id=n.name,a.cssStyles=n.cssStyles,a.cssClasses=n.classes.join(" "),a.shape="requirementBox",a.look=t.look,a.colorIndex=r.length,r.push(a)}for(let n of this.elements.values()){let a=n;a.shape="requirementBox",a.look=t.look,a.id=n.name,a.cssStyles=n.cssStyles,a.cssClasses=n.classes.join(" "),a.colorIndex=r.length,r.push(a)}for(let n of this.relations){let a=0,o=n.type===this.Relationships.CONTAINS,l={id:`${n.src}-${n.dst}-${a}`,start:this.requirements.get(n.src)?.name??this.elements.get(n.src)?.name,end:this.requirements.get(n.dst)?.name??this.elements.get(n.dst)?.name,label:`<<${n.type}>>`,classes:"relationshipLine",style:["fill:none",o?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:o?"normal":"dashed",arrowTypeStart:o?"requirement_contains":"",arrowTypeEnd:o?"":"requirement_arrow",look:t.look,labelType:"markdown"};i.push(l),a++}return{nodes:r,edges:i,other:{},config:t,direction:this.getDirection()}}}});var iVt,nVt,lft,cft=b(()=>{"use strict";Qe();iVt=s(e=>{let t=le(),{themeVariables:r,look:i}=t,{bkgColorArray:n,borderColorArray:a}=r;if(!a?.length)return"";let o="";for(let l=0;l{let t=le(),{look:r,themeVariables:i}=t,{requirementEdgeLabelBackground:n}=i;return` + ${iVt(e)} + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: ${r==="neo"?e.strokeWidth:"1px"}; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${e.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${e.relationLabelColor}; + } + .divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; + } + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + .labelBkg { + background-color: ${n??e.edgeLabelBackground}; + } + +`},"getStyles"),lft=nVt});var x8={};Fe(x8,{draw:()=>sVt});var sVt,uft=b(()=>{"use strict";ye();Jt();bm();Yd();Xd();Re();sVt=s(async function(e,t,r,i){z.info("REF0:"),z.info("Drawing requirement diagram (unified)",t);let{securityLevel:n,state:a,layout:o,look:l}=Q(),u=i.db.getData(),h=vl(t,n);u.type=i.type,u.layoutAlgorithm=Zu(o),u.nodeSpacing=a?.nodeSpacing??50,u.rankSpacing=a?.rankSpacing??50,u.markers=l==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],u.diagramId=t,await Bl(u,h);let d=8;Te.insertTitle(h,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),ro(h,d,"requirementDiagram",a?.useMaxWidth??!0)},"draw")});var hft={};Fe(hft,{diagram:()=>aVt});var aVt,dft=b(()=>{"use strict";aft();oft();cft();uft();aVt={parser:sft,get db(){return new tv},renderer:x8,styles:lft}});var b8,mft,gft=b(()=>{"use strict";b8=(function(){var e=s(function(he,gt,te,ne){for(te=te||{},ne=he.length;ne--;te[he[ne]]=gt);return te},"o"),t=[1,2],r=[1,3],i=[1,4],n=[2,4],a=[1,9],o=[1,11],l=[1,12],u=[1,14],h=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],g=[1,26],y=[1,27],x=[1,28],k=[1,29],T=[1,30],C=[1,31],_=[1,32],S=[1,33],w=[1,34],A=[1,35],v=[1,36],M=[1,37],$=[1,38],I=[1,39],F=[1,40],B=[1,42],O=[1,43],R=[1,44],N=[1,45],P=[1,46],E=[1,47],D=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],V=[1,74],L=[1,80],q=[1,81],H=[1,82],K=[1,83],U=[1,84],st=[1,85],X=[1,86],ut=[1,87],ot=[1,88],mt=[1,89],ht=[1,90],it=[1,91],Ot=[1,92],St=[1,93],yt=[1,94],Et=[1,95],Ct=[1,96],Bt=[1,97],Lt=[1,98],ee=[1,99],at=[1,100],$e=[1,101],pt=[1,102],Wt=[1,103],Ht=[1,104],Dt=[1,105],bt=[2,78],Gt=[4,5,17,51,53,54],G=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],nt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],W=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Rt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Y=[5,52],At=[70,71,72,73],xt=[1,151],Zt={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:s(function(gt,te,ne,It,ke,J,Xe){var rt=J.length-1;switch(ke){case 3:return It.apply(J[rt]),J[rt];break;case 4:case 10:this.$=[];break;case 5:case 11:J[rt-1].push(J[rt]),this.$=J[rt-1];break;case 6:case 7:case 12:case 13:this.$=J[rt];break;case 8:case 9:case 14:this.$=[];break;case 16:J[rt].type="createParticipant",this.$=J[rt];break;case 17:J[rt-1].unshift({type:"boxStart",boxData:It.parseBoxData(J[rt-2])}),J[rt-1].push({type:"boxEnd",boxText:J[rt-2]}),this.$=J[rt-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(J[rt-2]),sequenceIndexStep:Number(J[rt-1]),sequenceVisible:!0,signalType:It.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(J[rt-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:It.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:It.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:It.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:It.LINETYPE.ACTIVE_START,actor:J[rt-1].actor};break;case 24:this.$={type:"activeEnd",signalType:It.LINETYPE.ACTIVE_END,actor:J[rt-1].actor};break;case 30:It.setDiagramTitle(J[rt].substring(6)),this.$=J[rt].substring(6);break;case 31:It.setDiagramTitle(J[rt].substring(7)),this.$=J[rt].substring(7);break;case 32:this.$=J[rt].trim(),It.setAccTitle(this.$);break;case 33:case 34:this.$=J[rt].trim(),It.setAccDescription(this.$);break;case 35:J[rt-1].unshift({type:"loopStart",loopText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.LOOP_START}),J[rt-1].push({type:"loopEnd",loopText:J[rt-2],signalType:It.LINETYPE.LOOP_END}),this.$=J[rt-1];break;case 36:J[rt-1].unshift({type:"rectStart",color:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.RECT_START}),J[rt-1].push({type:"rectEnd",color:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.RECT_END}),this.$=J[rt-1];break;case 37:J[rt-1].unshift({type:"optStart",optText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.OPT_START}),J[rt-1].push({type:"optEnd",optText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.OPT_END}),this.$=J[rt-1];break;case 38:J[rt-1].unshift({type:"altStart",altText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.ALT_START}),J[rt-1].push({type:"altEnd",signalType:It.LINETYPE.ALT_END}),this.$=J[rt-1];break;case 39:J[rt-1].unshift({type:"parStart",parText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.PAR_START}),J[rt-1].push({type:"parEnd",signalType:It.LINETYPE.PAR_END}),this.$=J[rt-1];break;case 40:J[rt-1].unshift({type:"parStart",parText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.PAR_OVER_START}),J[rt-1].push({type:"parEnd",signalType:It.LINETYPE.PAR_END}),this.$=J[rt-1];break;case 41:J[rt-1].unshift({type:"criticalStart",criticalText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.CRITICAL_START}),J[rt-1].push({type:"criticalEnd",signalType:It.LINETYPE.CRITICAL_END}),this.$=J[rt-1];break;case 42:J[rt-1].unshift({type:"breakStart",breakText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.BREAK_START}),J[rt-1].push({type:"breakEnd",optText:It.parseMessage(J[rt-2]),signalType:It.LINETYPE.BREAK_END}),this.$=J[rt-1];break;case 44:this.$=J[rt-3].concat([{type:"option",optionText:It.parseMessage(J[rt-1]),signalType:It.LINETYPE.CRITICAL_OPTION},J[rt]]);break;case 46:this.$=J[rt-3].concat([{type:"and",parText:It.parseMessage(J[rt-1]),signalType:It.LINETYPE.PAR_AND},J[rt]]);break;case 48:this.$=J[rt-3].concat([{type:"else",altText:It.parseMessage(J[rt-1]),signalType:It.LINETYPE.ALT_ELSE},J[rt]]);break;case 49:J[rt-3].draw="participant",J[rt-3].type="addParticipant",J[rt-3].description=It.parseMessage(J[rt-1]),this.$=J[rt-3];break;case 50:J[rt-1].draw="participant",J[rt-1].type="addParticipant",this.$=J[rt-1];break;case 51:J[rt-3].draw="actor",J[rt-3].type="addParticipant",J[rt-3].description=It.parseMessage(J[rt-1]),this.$=J[rt-3];break;case 52:case 57:J[rt-1].draw="actor",J[rt-1].type="addParticipant",this.$=J[rt-1];break;case 53:J[rt-1].type="destroyParticipant",this.$=J[rt-1];break;case 54:J[rt-3].draw="participant",J[rt-3].type="addParticipant",J[rt-3].description=It.parseMessage(J[rt-1]),this.$=J[rt-3];break;case 55:J[rt-1].draw="participant",J[rt-1].type="addParticipant",this.$=J[rt-1];break;case 56:J[rt-3].draw="actor",J[rt-3].type="addParticipant",J[rt-3].description=It.parseMessage(J[rt-1]),this.$=J[rt-3];break;case 58:this.$=[J[rt-1],{type:"addNote",placement:J[rt-2],actor:J[rt-1].actor,text:J[rt]}];break;case 59:J[rt-2]=[].concat(J[rt-1],J[rt-1]).slice(0,2),J[rt-2][0]=J[rt-2][0].actor,J[rt-2][1]=J[rt-2][1].actor,this.$=[J[rt-1],{type:"addNote",placement:It.PLACEMENT.OVER,actor:J[rt-2].slice(0,2),text:J[rt]}];break;case 60:this.$=[J[rt-1],{type:"addLinks",actor:J[rt-1].actor,text:J[rt]}];break;case 61:this.$=[J[rt-1],{type:"addALink",actor:J[rt-1].actor,text:J[rt]}];break;case 62:this.$=[J[rt-1],{type:"addProperties",actor:J[rt-1].actor,text:J[rt]}];break;case 63:this.$=[J[rt-1],{type:"addDetails",actor:J[rt-1].actor,text:J[rt]}];break;case 66:this.$=[J[rt-2],J[rt]];break;case 67:this.$=J[rt];break;case 68:this.$=It.PLACEMENT.LEFTOF;break;case 69:this.$=It.PLACEMENT.RIGHTOF;break;case 70:this.$=[J[rt-4],J[rt-1],{type:"addMessage",from:J[rt-4].actor,to:J[rt-1].actor,signalType:J[rt-3],msg:J[rt],activate:!0},{type:"activeStart",signalType:It.LINETYPE.ACTIVE_START,actor:J[rt-1].actor}];break;case 71:this.$=[J[rt-4],J[rt-1],{type:"addMessage",from:J[rt-4].actor,to:J[rt-1].actor,signalType:J[rt-3],msg:J[rt]},{type:"activeEnd",signalType:It.LINETYPE.ACTIVE_END,actor:J[rt-4].actor}];break;case 72:this.$=[J[rt-4],J[rt-1],{type:"addMessage",from:J[rt-4].actor,to:J[rt-1].actor,signalType:J[rt-3],msg:J[rt],activate:!0,centralConnection:It.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:It.LINETYPE.CENTRAL_CONNECTION,actor:J[rt-1].actor}];break;case 73:this.$=[J[rt-4],J[rt-1],{type:"addMessage",from:J[rt-4].actor,to:J[rt-1].actor,signalType:J[rt-2],msg:J[rt],activate:!1,centralConnection:It.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:It.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:J[rt-4].actor}];break;case 74:this.$=[J[rt-5],J[rt-1],{type:"addMessage",from:J[rt-5].actor,to:J[rt-1].actor,signalType:J[rt-3],msg:J[rt],activate:!0,centralConnection:It.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:It.LINETYPE.CENTRAL_CONNECTION,actor:J[rt-1].actor},{type:"centralConnectionReverse",signalType:It.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:J[rt-5].actor}];break;case 75:this.$=[J[rt-3],J[rt-1],{type:"addMessage",from:J[rt-3].actor,to:J[rt-1].actor,signalType:J[rt-2],msg:J[rt]}];break;case 76:this.$={type:"addParticipant",actor:J[rt-1],config:J[rt]};break;case 77:this.$=J[rt-1].trim();break;case 78:this.$={type:"addParticipant",actor:J[rt]};break;case 79:this.$=It.LINETYPE.SOLID_OPEN;break;case 80:this.$=It.LINETYPE.DOTTED_OPEN;break;case 81:this.$=It.LINETYPE.SOLID;break;case 82:this.$=It.LINETYPE.SOLID_TOP;break;case 83:this.$=It.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=It.LINETYPE.STICK_TOP;break;case 85:this.$=It.LINETYPE.STICK_BOTTOM;break;case 86:this.$=It.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=It.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=It.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=It.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=It.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=It.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=It.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=It.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=It.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=It.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=It.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=It.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=It.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=It.LINETYPE.DOTTED;break;case 100:this.$=It.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=It.LINETYPE.SOLID_CROSS;break;case 102:this.$=It.LINETYPE.DOTTED_CROSS;break;case 103:this.$=It.LINETYPE.SOLID_POINT;break;case 104:this.$=It.LINETYPE.DOTTED_POINT;break;case 105:this.$=It.parseMessage(J[rt].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},e(D,[2,5]),{9:48,13:13,14:u,15:h,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},e(D,[2,7]),e(D,[2,8]),e(D,[2,9]),e(D,[2,15]),{13:49,51:$,53:I,54:F},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:E},{23:56,73:E},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(D,[2,30]),e(D,[2,31]),{33:[1,62]},{35:[1,63]},e(D,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:V},{23:75,55:76,73:V},{23:77,73:E},{69:78,72:[1,79],78:L,79:q,80:H,81:K,82:U,83:st,84:X,85:ut,86:ot,87:mt,88:ht,89:it,90:Ot,91:St,92:yt,93:Et,94:Ct,95:Bt,96:Lt,97:ee,98:at,99:$e,100:pt,101:Wt,102:Ht,103:Dt},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:E},{23:111,73:E},{23:112,73:E},{23:113,73:E},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],bt),e(D,[2,6]),e(D,[2,16]),e(Gt,[2,10],{11:114}),e(D,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(D,[2,22]),{5:[1,118]},{5:[1,119]},e(D,[2,25]),e(D,[2,26]),e(D,[2,27]),e(D,[2,28]),e(D,[2,29]),e(D,[2,32]),e(D,[2,33]),e(G,n,{7:120}),e(G,n,{7:121}),e(G,n,{7:122}),e(nt,n,{41:123,7:124}),e(W,n,{43:125,7:126}),e(W,n,{7:126,43:127}),e(Rt,n,{46:128,7:129}),e(G,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Y,bt,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:E},{69:146,78:L,79:q,80:H,81:K,82:U,83:st,84:X,85:ut,86:ot,87:mt,88:ht,89:it,90:Ot,91:St,92:yt,93:Et,94:Ct,95:Bt,96:Lt,97:ee,98:at,99:$e,100:pt,101:Wt,102:Ht,103:Dt},e(At,[2,79]),e(At,[2,80]),e(At,[2,81]),e(At,[2,82]),e(At,[2,83]),e(At,[2,84]),e(At,[2,85]),e(At,[2,86]),e(At,[2,87]),e(At,[2,88]),e(At,[2,89]),e(At,[2,90]),e(At,[2,91]),e(At,[2,92]),e(At,[2,93]),e(At,[2,94]),e(At,[2,95]),e(At,[2,96]),e(At,[2,97]),e(At,[2,98]),e(At,[2,99]),e(At,[2,100]),e(At,[2,101]),e(At,[2,102]),e(At,[2,103]),e(At,[2,104]),{23:147,73:E},{23:149,60:148,73:E},{73:[2,68]},{73:[2,69]},{58:150,104:xt},{58:152,104:xt},{58:153,104:xt},{58:154,104:xt},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:$,53:I,54:F},{5:[1,160]},e(D,[2,20]),e(D,[2,21]),e(D,[2,23]),e(D,[2,24]),{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},{17:[1,164]},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,50:[1,165],51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},{17:[1,166]},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,49:[1,167],51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},{17:[1,168]},{17:[1,169]},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,48:[1,170],51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:k,37:T,38:C,39:_,40:S,42:w,44:A,45:v,47:M,51:$,53:I,54:F,56:B,61:O,62:R,63:N,64:P,73:E},{16:[1,172]},e(D,[2,50]),{16:[1,173]},e(D,[2,55]),e(Y,[2,76]),{76:[1,174]},{16:[1,175]},e(D,[2,52]),{16:[1,176]},e(D,[2,57]),e(D,[2,53]),{23:177,73:E},{23:178,73:E},{23:179,73:E},{58:180,104:xt},{23:181,72:[1,182],73:E},{58:183,104:xt},{58:184,104:xt},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(D,[2,17]),e(Gt,[2,11]),{13:186,51:$,53:I,54:F},e(Gt,[2,13]),e(Gt,[2,14]),e(D,[2,19]),e(D,[2,35]),e(D,[2,36]),e(D,[2,37]),e(D,[2,38]),{16:[1,187]},e(D,[2,39]),{16:[1,188]},e(D,[2,40]),e(D,[2,41]),{16:[1,189]},e(D,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:xt},{58:196,104:xt},{58:197,104:xt},{5:[2,75]},{58:198,104:xt},{23:199,73:E},{5:[2,58]},{5:[2,59]},{23:200,73:E},e(Gt,[2,12]),e(nt,n,{7:124,41:201}),e(W,n,{7:126,43:202}),e(Rt,n,{7:129,46:203}),e(D,[2,49]),e(D,[2,54]),e(Y,[2,77]),e(D,[2,51]),e(D,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:xt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:s(function(gt,te){if(te.recoverable)this.trace(gt);else{var ne=new Error(gt);throw ne.hash=te,ne}},"parseError"),parse:s(function(gt){var te=this,ne=[0],It=[],ke=[null],J=[],Xe=this.table,rt="",or=0,Sr=0,Dr=0,Ie=2,vr=1,ge=J.slice.call(arguments,1),se=Object.create(this.lexer),Oe={yy:{}};for(var ve in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ve)&&(Oe.yy[ve]=this.yy[ve]);se.setInput(gt,Oe.yy),Oe.yy.lexer=se,Oe.yy.parser=this,typeof se.yylloc>"u"&&(se.yylloc={});var ue=se.yylloc;J.push(ue);var Ge=se.options&&se.options.ranges;typeof Oe.yy.parseError=="function"?this.parseError=Oe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yr(dr){ne.length=ne.length-2*dr,ke.length=ke.length-dr,J.length=J.length-dr}s(yr,"popStack");function We(){var dr;return dr=It.pop()||se.lex()||vr,typeof dr!="number"&&(dr instanceof Array&&(It=dr,dr=It.pop()),dr=te.symbols_[dr]||dr),dr}s(We,"lex");for(var Br,Kr,kr,Gr,Xn,ae,lt={},Xt,oe,Tr,Jr;;){if(kr=ne[ne.length-1],this.defaultActions[kr]?Gr=this.defaultActions[kr]:((Br===null||typeof Br>"u")&&(Br=We()),Gr=Xe[kr]&&Xe[kr][Br]),typeof Gr>"u"||!Gr.length||!Gr[0]){var ei="";Jr=[];for(Xt in Xe[kr])this.terminals_[Xt]&&Xt>Ie&&Jr.push("'"+this.terminals_[Xt]+"'");se.showPosition?ei="Parse error on line "+(or+1)+`: +`+se.showPosition()+` +Expecting `+Jr.join(", ")+", got '"+(this.terminals_[Br]||Br)+"'":ei="Parse error on line "+(or+1)+": Unexpected "+(Br==vr?"end of input":"'"+(this.terminals_[Br]||Br)+"'"),this.parseError(ei,{text:se.match,token:this.terminals_[Br]||Br,line:se.yylineno,loc:ue,expected:Jr})}if(Gr[0]instanceof Array&&Gr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kr+", token: "+Br);switch(Gr[0]){case 1:ne.push(Br),ke.push(se.yytext),J.push(se.yylloc),ne.push(Gr[1]),Br=null,Kr?(Br=Kr,Kr=null):(Sr=se.yyleng,rt=se.yytext,or=se.yylineno,ue=se.yylloc,Dr>0&&Dr--);break;case 2:if(oe=this.productions_[Gr[1]][1],lt.$=ke[ke.length-oe],lt._$={first_line:J[J.length-(oe||1)].first_line,last_line:J[J.length-1].last_line,first_column:J[J.length-(oe||1)].first_column,last_column:J[J.length-1].last_column},Ge&&(lt._$.range=[J[J.length-(oe||1)].range[0],J[J.length-1].range[1]]),ae=this.performAction.apply(lt,[rt,Sr,or,Oe.yy,Gr[1],ke,J].concat(ge)),typeof ae<"u")return ae;oe&&(ne=ne.slice(0,-1*oe*2),ke=ke.slice(0,-1*oe),J=J.slice(0,-1*oe)),ne.push(this.productions_[Gr[1]][0]),ke.push(lt.$),J.push(lt._$),Tr=Xe[ne[ne.length-2]][ne[ne.length-1]],ne.push(Tr);break;case 3:return!0}}return!0},"parse")},Nt=(function(){var he={EOF:1,parseError:s(function(te,ne){if(this.yy.parser)this.yy.parser.parseError(te,ne);else throw new Error(te)},"parseError"),setInput:s(function(gt,te){return this.yy=te||this.yy||{},this._input=gt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var gt=this._input[0];this.yytext+=gt,this.yyleng++,this.offset++,this.match+=gt,this.matched+=gt;var te=gt.match(/(?:\r\n?|\n).*/g);return te?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),gt},"input"),unput:s(function(gt){var te=gt.length,ne=gt.split(/(?:\r\n?|\n)/g);this._input=gt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-te),this.offset-=te;var It=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ne.length-1&&(this.yylineno-=ne.length-1);var ke=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ne?(ne.length===It.length?this.yylloc.first_column:0)+It[It.length-ne.length].length-ne[0].length:this.yylloc.first_column-te},this.options.ranges&&(this.yylloc.range=[ke[0],ke[0]+this.yyleng-te]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(gt){this.unput(this.match.slice(gt))},"less"),pastInput:s(function(){var gt=this.matched.substr(0,this.matched.length-this.match.length);return(gt.length>20?"...":"")+gt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var gt=this.match;return gt.length<20&&(gt+=this._input.substr(0,20-gt.length)),(gt.substr(0,20)+(gt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var gt=this.pastInput(),te=new Array(gt.length+1).join("-");return gt+this.upcomingInput()+` +`+te+"^"},"showPosition"),test_match:s(function(gt,te){var ne,It,ke;if(this.options.backtrack_lexer&&(ke={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ke.yylloc.range=this.yylloc.range.slice(0))),It=gt[0].match(/(?:\r\n?|\n).*/g),It&&(this.yylineno+=It.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:It?It[It.length-1].length-It[It.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+gt[0].length},this.yytext+=gt[0],this.match+=gt[0],this.matches=gt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(gt[0].length),this.matched+=gt[0],ne=this.performAction.call(this,this.yy,this,te,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ne)return ne;if(this._backtrack){for(var J in ke)this[J]=ke[J];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var gt,te,ne,It;this._more||(this.yytext="",this.match="");for(var ke=this._currentRules(),J=0;Jte[0].length)){if(te=ne,It=J,this.options.backtrack_lexer){if(gt=this.test_match(ne,ke[J]),gt!==!1)return gt;if(this._backtrack){te=!1;continue}else return!1}else if(!this.options.flex)break}return te?(gt=this.test_match(te,ke[It]),gt!==!1?gt:!1):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:s(function(){var te=this.next();return te||this.lex()},"lex"),begin:s(function(te){this.conditionStack.push(te)},"begin"),popState:s(function(){var te=this.conditionStack.length-1;return te>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(te){return te=this.conditionStack.length-1-Math.abs(te||0),te>=0?this.conditionStack[te]:"INITIAL"},"topState"),pushState:s(function(te){this.begin(te)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(te,ne,It,ke){var J=ke;switch(It){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;break;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;break;case 10:return this.popState(),this.popState(),77;break;case 11:return ne.yytext=ne.yytext.trim(),73;break;case 12:return ne.yytext=ne.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return ne.yytext=ne.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return ne.yytext=ne.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 14;case 20:return this.begin("ID"),54;break;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 22:return this.popState(),this.popState(),5;break;case 23:return this.begin("LINE"),37;break;case 24:return this.begin("LINE"),38;break;case 25:return this.begin("LINE"),39;break;case 26:return this.begin("LINE"),40;break;case 27:return this.begin("LINE"),50;break;case 28:return this.begin("LINE"),42;break;case 29:return this.begin("LINE"),44;break;case 30:return this.begin("LINE"),49;break;case 31:return this.begin("LINE"),45;break;case 32:return this.begin("LINE"),48;break;case 33:return this.begin("LINE"),47;break;case 34:return this.popState(),16;break;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;break;case 45:return this.begin("ID"),24;break;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;break;case 49:return this.popState(),"acc_title_value";break;case 50:return this.begin("acc_descr"),34;break;case 51:return this.popState(),"acc_descr_value";break;case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return ne.yytext=ne.yytext.trim(),73;break;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return he})();Zt.lexer=Nt;function wt(){this.yy={}}return s(wt,"Parser"),wt.prototype=Zt,Zt.Parser=wt,new wt})();b8.parser=b8;mft=b8});var uVt,hVt,dVt,Zb,ev,k8=b(()=>{"use strict";ye();S0();Jt();NE();fr();yi();uVt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},hVt={FILLED:0,OPEN:1},dVt={LEFTOF:0,RIGHTOF:1,OVER:2},Zb={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},ev=class{constructor(){this.state=new Dh(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}));this.setAccTitle=Ye;this.setAccDescription=Je;this.setDiagramTitle=sr;this.getAccTitle=Ze;this.getAccDescription=tr;this.getDiagramTitle=er;this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(Q().wrap),this.LINETYPE=uVt,this.ARROWTYPE=hVt,this.PLACEMENT=dVt}static{s(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,r,i,n,a){let o=this.state.records.currentBox,l;if(a!==void 0){let h;a.includes(` +`)?h=a+` +`:h=`{ +`+a+` +}`,l=Pu(h,{schema:Bu})}n=l?.type??n,l?.alias&&(!i||i.text===r)&&(i={text:l.alias,wrap:i?.wrap,type:n});let u=this.state.records.actors.get(t);if(u){if(this.state.records.currentBox&&u.box&&this.state.records.currentBox!==u.box)throw new Error(`A same participant should only be defined in one Box: ${u.name} can't be in '${u.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=u.box?u.box:this.state.records.currentBox,u.box=o,u&&r===u.name&&i==null)return}if(i?.text==null&&(i={text:r,type:n}),(n==null||i.text==null)&&(i={text:r,type:n}),this.state.records.actors.set(t,{box:o,name:r,description:i.text,wrap:i.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor){let h=this.state.records.actors.get(this.state.records.prevActor);h&&(h.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let r,i=0;if(!t)return 0;for(r=0;r>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},u}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:r,message:i?.text??"",wrap:i?.wrap??this.autoWrap(),type:n,activate:a,centralConnection:o??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();let r=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(r===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:r}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:Q().sequence?.wrap??!1}clear(){this.state.reset(),He()}parseMessage(t){let r=t.trim(),{wrap:i,cleanedText:n}=this.extractWrap(r),a={text:n,wrap:i};return z.debug(`parseMessage: ${JSON.stringify(a)}`),a}parseBoxData(t){let r=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),i=r?.[1]?r[1].trim():"transparent",n=r?.[2]?r[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",i)||(i="transparent",n=t.trim());else{let l=new Option().style;l.color=i,l.color!==i&&(i="transparent",n=t.trim())}let{wrap:a,cleanedText:o}=this.extractWrap(n);return{text:o?nr(o,Q()):void 0,color:i,wrap:a}}addNote(t,r,i){let n={actor:t,placement:r,message:i.text,wrap:i.wrap??this.autoWrap()},a=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:a[0],to:a[1],message:i.text,wrap:i.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:r})}addLinks(t,r){let i=this.getActor(t);try{let n=nr(r.text,Q());n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");let a=JSON.parse(n);this.insertLinks(i,a)}catch(n){z.error("error while parsing actor link text",n)}}addALink(t,r){let i=this.getActor(t);try{let n={},a=nr(r.text,Q()),o=a.indexOf("@");a=a.replace(/=/g,"="),a=a.replace(/&/g,"&");let l=a.slice(0,o-1).trim(),u=a.slice(o+1).trim();n[l]=u,this.insertLinks(i,n)}catch(n){z.error("error while parsing actor link text",n)}}insertLinks(t,r){if(t.links==null)t.links=r;else for(let i in r)t.links[i]=r[i]}addProperties(t,r){let i=this.getActor(t);try{let n=nr(r.text,Q()),a=JSON.parse(n);this.insertProperties(i,a)}catch(n){z.error("error while parsing actor properties text",n)}}insertProperties(t,r){if(t.properties==null)t.properties=r;else for(let i in r)t.properties[i]=r[i]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,r){let i=this.getActor(t),n=document.getElementById(r.text);try{let a=n.innerHTML,o=JSON.parse(a);o.properties&&this.insertProperties(i,o.properties),o.links&&this.insertLinks(i,o.links)}catch(a){z.error("error while parsing actor details text",a)}}getActorProperty(t,r){if(t?.properties!==void 0)return t.properties[r]}apply(t){if(Array.isArray(t))t.forEach(r=>{this.apply(r)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":Ye(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return Q().sequence}}});var fVt,yft,xft=b(()=>{"use strict";ye();fVt=s(e=>{let t=e.dropShadow??"none",{look:r}=Q();return`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + stroke-width: ${e.strokeWidth??1}; + } + + rect.actor.outer-path[data-look="neo"] { + filter: ${t}; + } + + rect.note[data-look="neo"] { + stroke:${e.noteBorderColor}; + fill:${e.noteBkgColor}; + filter: ${t}; + } + + text.actor > tspan { + fill: ${e.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${e.actorLineColor}; + } + + .innerArc { + stroke-width: 1.5; + stroke-dasharray: none; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${e.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${e.signalColor}; + } + + [id$="-arrowhead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .sequenceNumber { + fill: ${e.sequenceNumberColor}; + } + + [id$="-sequencenumber"] { + fill: ${e.signalColor}; + } + + [id$="-crosshead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .messageText { + fill: ${e.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; + filter: ${r==="neo"?t:"none"}; + } + + .labelText, .labelText > tspan { + fill: ${e.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${e.noteTextColor}; + stroke: none; + ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""} + } + + .activation0 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation1 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation2 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${e.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man circle, line { + fill: ${e.actorBkg}; + stroke-width: 2px; + } + + g rect.rect { + filter: ${t}; + stroke: ${e.nodeBorder}; + } +`},"getStyles"),yft=fVt});var T8,Oh,Mh,Bh,rv,Jf,tu,Jb,pVt,iv,t2,tp,bft,_r,C8,mVt,gVt,yVt,xVt,bVt,kVt,TVt,CVt,SVt,wVt,_Vt,EVt,vVt,kft,AVt,RVt,LVt,DVt,IVt,NVt,OVt,MVt,Tft,BVt,eu,PVt,$Vt,FVt,VVt,zVt,ai,Cft=b(()=>{"use strict";T8=fs(Hp(),1);Qe();Re();fr();Td();Oh=36,Mh="actor-top",Bh="actor-bottom",rv="actor-box",Jf="actor-man",tu=new Set(["redux-color","redux-dark-color"]),Jb=s(function(e,t){let r=kd(e,t);return le().look==="neo"&&r.attr("data-look","neo"),r},"drawRect"),pVt=s(function(e,t,r,i,n){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,l=t.rectData;var u="none";n&&(u="block !important");let h=e.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var d="";l.class!==void 0&&(d=" "+l.class);let f=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",f),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),a!=null){var m=20;for(let x in a){var g=h.append("a"),y=(0,T8.sanitizeUrl)(a[x]);g.attr("xlink:href",y),g.attr("target","_blank"),PVt(i)(x,g,l.x+10,l.height+m,f,20,{class:"actor"},i),m+=30}}return p.attr("height",m),{height:l.height+m,width:f}},"drawPopup"),iv=s(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),t2=s(async function(e,t,r=null){let i=e.append("foreignObject"),n=await xp(t.text,le()),o=i.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(i.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),t.class==="noteText"){let l=e.node().firstChild;l.setAttribute("height",o.height+2*t.textMargin);let u=l.getBBox();i.attr("x",Math.round(u.x+u.width/2-o.width/2)).attr("y",Math.round(u.y+u.height/2-o.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let d=l;l=u,u=d}i.attr("x",Math.round(l+Math.abs(l-u)/2-o.width/2)),t.class==="loopText"?i.attr("y",Math.round(h)):i.attr("y",Math.round(h-o.height))}return[i]},"drawKatex"),tp=s(function(e,t){let r=0,i=0,n=t.text.split(qt.lineBreakRegex),[a,o]=Gs(t.fontSize),l=[],u=0,h=s(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=s(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=s(()=>Math.round(t.y+(r+i+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=s(()=>Math.round(t.y+(r+i+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[d,f]of n.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(u=d*a);let p=e.append("text");p.attr("x",t.x),p.attr("y",h()),t.anchor!==void 0&&p.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&p.style("font-family",t.fontFamily),o!==void 0&&p.style("font-size",o),t.fontWeight!==void 0&&p.style("font-weight",t.fontWeight),t.fill!==void 0&&p.attr("fill",t.fill),t.class!==void 0&&p.attr("class",t.class),t.dy!==void 0?p.attr("dy",t.dy):u!==0&&p.attr("dy",u);let m=f||iL;if(t.tspan){let g=p.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(m)}else p.text(m);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(i+=(p._groups||p)[0][0].getBBox().height,r=i),l.push(p)}return l},"drawText"),bft=s(function(e,t){function r(n,a,o,l,u){return n+","+a+" "+(n+o)+","+a+" "+(n+o)+","+(a+l-u)+" "+(n+o-u*1.2)+","+(a+l)+" "+n+","+(a+l)}s(r,"genPoints");let i=e.append("polygon");return i.attr("points",r(t.x,t.y,t.width,t.height,7)),i.attr("class","labelBox"),t.y=t.y+t.height/2,tp(e,t),i},"drawLabel"),_r=-1,C8=s((e,t,r,i)=>{e.select&&r.forEach(n=>{let a=t.get(n),o=e.select("#actor"+a.actorCnt);!i.mirrorActors&&a.stopy?o.attr("y2",a.stopy+a.height/2):i.mirrorActors&&o.attr("y2",a.stopy)})},"fixLifeLineHeights"),mVt=s(function(e,t,r,i,n){let a=i?t.stopy:t.starty,o=t.x+t.width/2,l=a+t.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append("g").lower();var g=m;i||(_r++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",iv(`actor${_r}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+_r).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=m.append("g"),t.actorCnt=_r,t.links!=null&&g.attr("id","root-"+_r),u==="neo"&&g.attr("data-look","neo"));let y=Fn();var x="actor";t.properties?.class?x=t.properties.class:y.fill="#eaeaea",i?x+=` ${Bh}`:x+=` ${Mh}`,y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.class=x,y.rx=3,y.ry=3,y.name=t.name,u==="neo"&&(y.rx=6,y.ry=6);let k=Jb(g,y),T=n.get(t.name)??0;if(tu.has(h)&&(k.style("stroke",p[T%p.length]),k.style("fill",f[T%p.length])),u==="neo"&&k.attr("filter","url(#drop-shadow)"),t.rectData=y,t.properties?.icon){let _=t.properties.icon.trim();_.charAt(0)==="@"?lT(g,y.x+y.width-20,y.y+10,_.substr(1)):oT(g,y.x+y.width-20,y.y+10,_)}i||(g.attr("data-et","participant"),g.attr("data-type","participant"),g.attr("data-id",t.name)),eu(r,Ci(t.description))(t.description,g,y.x,y.y,y.width,y.height,{class:`actor ${rv}`},r);let C=t.height;if(k.node){let _=k.node().getBBox();t.height=_.height,C=_.height}return C},"drawActorTypeParticipant"),gVt=s(function(e,t,r,i,n){let a=i?t.stopy:t.starty,o=t.x+t.width/2,l=a+t.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append("g").lower();var g=m;i||(_r++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",iv(`actor${_r}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+_r).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=m.append("g"),t.actorCnt=_r,t.links!=null&&g.attr("id","root-"+_r),u==="neo"&&g.attr("data-look","neo"));let y=Fn();var x="actor";t.properties?.class?x=t.properties.class:y.fill="#eaeaea",i?x+=` ${Bh}`:x+=` ${Mh}`,y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.class=x,y.name=t.name;let k=6,T={...y,x:y.x+-k,y:y.y+ +k,class:"actor"},C=Jb(g,y),_=Jb(g,T);t.rectData=y,u==="neo"&&g.attr("filter","url(#drop-shadow)");let S=n.get(t.name)??0;if(tu.has(h)&&(C.style("stroke",p[S%p.length]),C.style("fill",f[S%p.length]),_.style("stroke",p[S%p.length]),_.style("fill",f[S%p.length])),t.properties?.icon){let A=t.properties.icon.trim();A.charAt(0)==="@"?lT(g,y.x+y.width-20,y.y+10,A.substr(1)):oT(g,y.x+y.width-20,y.y+10,A)}eu(r,Ci(t.description))(t.description,g,y.x-k,y.y+k,y.width,y.height,{class:`actor ${rv}`},r);let w=t.height;if(C.node){let A=C.node().getBBox();t.height=A.height,w=A.height}return i||(g.attr("data-et","participant"),g.attr("data-type","collections"),g.attr("data-id",t.name)),w},"drawActorTypeCollections"),yVt=s(function(e,t,r,i,n){let a=i?t.stopy:t.starty,o=t.x+t.width/2,l=a+t.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append("g").lower(),g=m;i||(_r++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",iv(`actor${_r}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+_r).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=m.append("g"),t.actorCnt=_r,t.links!=null&&g.attr("id","root-"+_r),u==="neo"&&g.attr("data-look","neo"));let y=Fn(),x="actor";t.properties?.class?x=t.properties.class:y.fill="#eaeaea",i?x+=` ${Bh}`:x+=` ${Mh}`,g.attr("class",x),y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.name=t.name;let k=y.height/2,T=k/(2.5+y.height/50),C=g.append("g"),_=g.append("g"),S=`M ${y.x},${y.y+k} + a ${T},${k} 0 0 0 0,${y.height} + h ${y.width-2*T} + a ${T},${k} 0 0 0 0,-${y.height} + Z + `;C.append("path").attr("d",S),_.append("path").attr("d",`M ${y.x},${y.y+k} + a ${T},${k} 0 0 0 0,${y.height}`),C.attr("transform",`translate(${T}, ${-(y.height/2)})`),_.attr("transform",`translate(${y.width-T}, ${-y.height/2})`),t.rectData=y,u==="neo"&&C.attr("filter","url(#drop-shadow)");let w=n.get(t.name)??0;if(tu.has(h)&&(C.style("stroke",p[w%p.length]),C.style("fill",f[w%p.length]),_.style("stroke",p[w%p.length]),_.style("fill",f[w%p.length])),t.properties?.icon){let M=t.properties.icon.trim(),$=y.x+y.width-20,I=y.y+10;M.charAt(0)==="@"?lT(g,$,I,M.substr(1)):oT(g,$,I,M)}eu(r,Ci(t.description))(t.description,g,y.x,y.y,y.width,y.height,{class:`actor ${rv}`},r);let A=t.height,v=C.select("path:last-child");if(v.node()){let M=v.node().getBBox();t.height=M.height,A=M.height}return i||(g.attr("data-et","participant"),g.attr("data-type","queue"),g.attr("data-id",t.name)),A},"drawActorTypeQueue"),xVt=s(function(e,t,r,i,n,a){let o=i?t.stopy:t.starty,l=t.x+t.width/2,u=o+75,{look:h,theme:d,themeVariables:f}=r,{bkgColorArray:p,borderColorArray:m,actorBorder:g,actorBkg:y}=f,x=e.append("g").lower();i||(_r++,x.append("line").attr("id","actor"+_r).attr("x1",l).attr("y1",u).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=_r);let k=e.append("g"),T=Jf;i?T+=` ${Bh}`:T+=` ${Mh}`,k.attr("class",T),k.attr("name",t.name);let C=Fn();C.x=t.x,C.y=o,C.fill="#eaeaea",C.width=t.width,C.height=t.height,C.class="actor";let _=t.x+t.width/2,S=o+32,w=22;k.append("defs").append("marker").attr("id",n+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),k.append("circle").attr("cx",_).attr("cy",S).attr("r",w).attr("filter",`${h==="neo"?"url(#drop-shadow)":""}`),k.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${_}, ${S-w})`);let A=a.get(t.name)??0;tu.has(d)?(k.style("stroke",m[A%m.length]),k.style("fill",p[A%m.length])):(k.style("stroke",g),k.style("fill",y));let v=k.node().getBBox();return t.height=v.height+2*(r?.sequence?.labelBoxHeight??0),eu(r,Ci(t.description))(t.description,k,C.x,C.y+w+(i?5:12),C.width,C.height,{class:`actor ${Jf}`},r),i||(k.attr("data-et","participant"),k.attr("data-type","control"),k.attr("data-id",t.name)),t.height},"drawActorTypeControl"),bVt=s(function(e,t,r,i,n){let a=i?t.stopy:t.starty,o=t.x+t.width/2,l=a+75,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append("g").lower(),g=e.append("g"),y="actor";i?y+=` ${Bh}`:y+=` ${Mh}`,g.attr("class",y),g.attr("name",t.name);let x=Fn();x.x=t.x,x.y=a,x.fill="#eaeaea",x.width=t.width,x.height=t.height,x.class="actor";let k=t.x+t.width/2,T=a+(i?10:25),C=22;g.append("circle").attr("cx",k).attr("cy",T).attr("r",C).attr("width",t.width).attr("height",t.height),g.append("line").attr("x1",k-C).attr("x2",k+C).attr("y1",T+C).attr("y2",T+C).attr("stroke-width",2),u==="neo"&&g.attr("filter","url(#drop-shadow)");let _=n.get(t.name)??0;tu.has(h)&&(g.style("stroke",p[_%p.length]),g.style("fill",f[_%p.length]));let S=g.node().getBBox();return t.height=S.height+(r?.sequence?.labelBoxHeight??0),i||(_r++,m.append("line").attr("id","actor"+_r).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=_r),eu(r,Ci(t.description))(t.description,g,x.x,x.y+(i?15:30),x.width,x.height,{class:`actor ${Jf}`},r),i?g.attr("transform",`translate(0, ${C})`):(g.attr("transform",`translate(0, ${C/2-5})`),g.attr("data-et","participant"),g.attr("data-type","entity"),g.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),kVt=s(function(e,t,r,i,n){let a=i?t.stopy:t.starty,o=t.x+t.width/2,l=a+t.height+2*r.boxTextMargin,{theme:u,themeVariables:h,look:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=h,g=e.append("g").lower(),y=g;i||(_r++,Object.keys(t.links||{}).length&&!r.forceMenus&&y.attr("onclick",iv(`actor${_r}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+_r).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),y=g.append("g"),t.actorCnt=_r,t.links!=null&&y.attr("id","root-"+_r),d==="neo"&&y.attr("data-look","neo"));let x=Fn(),k="actor";t.properties?.class?k=t.properties.class:x.fill="#eaeaea",i?k+=` ${Bh}`:k+=` ${Mh}`,x.x=t.x,x.y=a,x.width=t.width,x.height=t.height,x.class=k,x.name=t.name,x.x=t.x,x.y=a;let T=x.width/3,C=x.width/3,_=T/2,S=_/(2.5+T/50),w=y.append("g");w.attr("class",k);let A=` + M ${x.x},${x.y+S} + a ${_},${S} 0 0 0 ${T},0 + a ${_},${S} 0 0 0 -${T},0 + l 0,${C-2*S} + a ${_},${S} 0 0 0 ${T},0 + l 0,-${C-2*S} +`;w.append("path").attr("d",A),d==="neo"&&w.attr("filter","url(#drop-shadow)");let v=n.get(t.name)??0;tu.has(u)?(w.style("stroke",p[v%p.length]),w.style("fill",f[v%p.length])):w.style("stroke",m),w.attr("transform",`translate(${T}, ${S})`),t.rectData=x,eu(r,Ci(t.description))(t.description,y,x.x,x.y+35,x.width,x.height,{class:`actor ${rv}`},r);let M=w.select("path:last-child");if(M.node()){let $=M.node().getBBox();t.height=$.height+(r.sequence.labelBoxHeight??0)}return i||(y.attr("data-et","participant"),y.attr("data-type","database"),y.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),TVt=s(function(e,t,r,i,n){let a=i?t.stopy:t.starty,o=t.x+t.width/2,l=a+80,u=22,h=e.append("g").lower(),{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:g,actorBorder:y}=p;i||(_r++,h.append("line").attr("id","actor"+_r).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=_r);let x=e.append("g"),k=Jf;i?k+=` ${Bh}`:k+=` ${Mh}`,x.attr("class",k),x.attr("name",t.name);let T=Fn();T.x=t.x,T.y=a,T.fill="#eaeaea",T.width=t.width,T.height=t.height,T.class="actor",x.append("line").attr("id","actor-man-torso"+_r).attr("x1",t.x+t.width/2-u*2.5).attr("y1",a+12).attr("x2",t.x+t.width/2-15).attr("y2",a+12),x.append("line").attr("id","actor-man-arms"+_r).attr("x1",t.x+t.width/2-u*2.5).attr("y1",a+2).attr("x2",t.x+t.width/2-u*2.5).attr("y2",a+22),x.append("circle").attr("cx",t.x+t.width/2).attr("cy",a+12).attr("r",u),d==="neo"&&x.attr("filter","url(#drop-shadow)");let C=n.get(t.name)??0;tu.has(f)?(x.style("stroke",g[C%g.length]),x.style("fill",m[C%g.length])):x.style("stroke",y);let _=x.node().getBBox();return t.height=_.height+(r.sequence.labelBoxHeight??0),eu(r,Ci(t.description))(t.description,x,T.x,T.y+15,T.width,T.height,{class:`actor ${Jf}`},r),x.attr("transform",`translate(0,${u/2+10})`),i||(x.attr("data-et","participant"),x.attr("data-type","boundary"),x.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),CVt=s(function(e,t,r,i,n){let a=i?t.stopy:t.starty,o=t.x+t.width/2,l=a+80,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,g=e.append("g").lower();i||(_r++,g.append("line").attr("id","actor"+_r).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=_r);let y=e.append("g"),x=Jf;i?x+=` ${Bh}`:x+=` ${Mh}`,y.attr("class",x),y.attr("name",t.name),i||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);let k=u==="neo"?.5:1,T=u==="neo"?a+(1-k)*30:a;y.append("line").attr("id","actor-man-torso"+_r).attr("x1",o).attr("y1",T+25*k).attr("x2",o).attr("y2",T+45*k),y.append("line").attr("id","actor-man-arms"+_r).attr("x1",o-Oh/2*k).attr("y1",T+33*k).attr("x2",o+Oh/2*k).attr("y2",T+33*k),y.append("line").attr("x1",o-Oh/2*k).attr("y1",T+60*k).attr("x2",o).attr("y2",T+45*k),y.append("line").attr("x1",o).attr("y1",T+45*k).attr("x2",o+(Oh/2-2)*k).attr("y2",T+60*k);let C=y.append("circle");C.attr("cx",t.x+t.width/2),C.attr("cy",T+10*k),C.attr("r",15*k),C.attr("width",t.width*k),C.attr("height",t.height*k);let _=y.node().getBBox();t.height=_.height;let S=Fn();S.x=t.x,S.y=T,S.fill="#eaeaea",S.width=t.width,S.height=t.height/k,S.class="actor",S.rx=3,S.ry=3;let w=n.get(t.name)??0;return tu.has(h)?(y.style("stroke",p[w%p.length]),y.style("fill",f[w%p.length])):y.style("stroke",m),eu(r,Ci(t.description))(t.description,y,S.x,T+35*k-(u==="neo"?10:0),S.width,S.height,{class:`actor ${Jf}`},r),t.height},"drawActorTypeActor"),SVt=s(async function(e,t,r,i,n,a,o){let l=o??new Map([...a.db.getActors().values()].map((u,h)=>[u.name,h]));switch(t.type){case"actor":return await CVt(e,t,r,i,l);case"participant":return await mVt(e,t,r,i,l);case"boundary":return await TVt(e,t,r,i,l);case"control":return await xVt(e,t,r,i,n,l);case"entity":return await bVt(e,t,r,i,l);case"database":return await kVt(e,t,r,i,l);case"collections":return await gVt(e,t,r,i,l);case"queue":return await yVt(e,t,r,i,l)}},"drawActor"),wVt=s(function(e,t,r){let n=e.append("g");kft(n,t),t.name&&eu(r)(t.name,n,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),n.lower()},"drawBox"),_Vt=s(function(e){return e.append("g")},"anchorElement"),EVt=s(function(e,t,r,i,n,a,o){let{theme:l,themeVariables:u}=i,{bkgColorArray:h,borderColorArray:d,mainBkg:f}=u,p=Fn(),m=t.anchored,g=t.actor;p.x=t.startx,p.y=t.starty,p.class="activation"+n%3,p.width=t.stopx-t.startx,p.height=r-t.starty;let y=Jb(m,p),k=(o??new Map([...a.db.getActors().values()].map((T,C)=>[T.name,C]))).get(g)??0;tu.has(l)&&(y.style("stroke",d[k%d.length]),y.style("fill",h[k%d.length]??f))},"drawActivation"),vVt=s(async function(e,t,r,i,n){let{boxMargin:a,boxTextMargin:o,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:h,messageFontSize:d,messageFontWeight:f}=i,p=e.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),m=s(function(x,k,T,C){return p.append("line").attr("x1",x).attr("y1",k).attr("x2",T).attr("y2",C).attr("class","loopLine")},"drawLoopLine");m(t.startx,t.starty,t.stopx,t.starty),m(t.stopx,t.starty,t.stopx,t.stopy),m(t.startx,t.stopy,t.stopx,t.stopy),m(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(x){m(t.startx,x.y,t.stopx,x.y).style("stroke-dasharray","3, 3")});let g=i0();g.text=r,g.x=t.startx,g.y=t.starty,g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(u??0,50),g.height=l+(i.look==="neo"?15:0)||20,g.textMargin=o,g.class="labelText",bft(p,g),g=Tft(),g.text=t.title,g.x=t.startx+u/2+(t.stopx-t.startx)/2,g.y=t.starty+a+o,g.anchor="middle",g.valign="middle",g.textMargin=o,g.class="loopText",g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.wrap=!0;let y=Ci(g.text)?await t2(p,g,t):tp(p,g);if(t.sectionTitles!==void 0){for(let[x,k]of Object.entries(t.sectionTitles))if(k.message){g.text=k.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[x].y+a+o,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.wrap=t.wrap,Ci(g.text)?(t.starty=t.sections[x].y,await t2(p,g,t)):tp(p,g);let T=Math.round(y.map(C=>(C._groups||C)[0][0].getBBox().height).reduce((C,_)=>C+_));t.sections[x].height+=T-(a+o)}}return t.height=Math.round(t.stopy-t.starty),p},"drawLoop"),kft=s(function(e,t){aT(e,t)},"drawBackgroundRect"),AVt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),RVt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),LVt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),DVt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),IVt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),NVt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),OVt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),MVt=s(function(e,t){let{theme:r}=t;e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${r==="redux"||r==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),Tft=s(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),BVt=s(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),eu=(function(){function e(a,o,l,u,h,d,f){let p=o.append("text").attr("x",l+h/2).attr("y",u+d/2+5).style("text-anchor","middle").text(a);n(p,f)}s(e,"byText");function t(a,o,l,u,h,d,f,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[x,k]=Gs(m),T=a.split(qt.lineBreakRegex);for(let C=0;C{let o=ep(ft),l=a.actorKeys.reduce((f,p)=>f+=e.get(p).width+(e.get(p).margin||0),0),u=ft.boxMargin*8;l+=u,l-=2*ft.boxTextMargin,a.wrap&&(a.name=Te.wrapLabel(a.name,l-2*ft.wrapPadding,o));let h=Te.calculateTextDimensions(a.name,o);n=qt.getMax(h.height,n);let d=qt.getMax(l,h.width+2*ft.wrapPadding);if(a.margin=ft.boxTextMargin,la.textMaxHeight=n),qt.getMax(i,ft.height)}var ft,Yt,GVt,Sft,ep,xy,w8,qVt,jVt,_8,_ft,Eft,nv,wft,HVt,XVt,QVt,ZVt,JVt,S8,tzt,vft,ezt,rzt,izt,Aft,Rft=b(()=>{"use strict";lr();Cft();Jt();fr();fr();Td();ye();dp();Re();gi();k8();ft={},Yt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:s(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:s(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:s(function(e){this.boxes.push(e)},"addBox"),addActor:s(function(e){this.actors.push(e)},"addActor"),addLoop:s(function(e){this.loops.push(e)},"addLoop"),addMessage:s(function(e){this.messages.push(e)},"addMessage"),addNote:s(function(e){this.notes.push(e)},"addNote"),lastActor:s(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:s(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:s(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:s(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:s(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,Eft(Q())},"init"),updateVal:s(function(e,t,r,i){e[t]===void 0?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:s(function(e,t,r,i){let n=this,a=0;function o(l){return s(function(h){a++;let d=n.sequenceItems.length-a+1;n.updateVal(h,"starty",t-d*ft.boxMargin,Math.min),n.updateVal(h,"stopy",i+d*ft.boxMargin,Math.max),n.updateVal(Yt.data,"startx",e-d*ft.boxMargin,Math.min),n.updateVal(Yt.data,"stopx",r+d*ft.boxMargin,Math.max),l!=="activation"&&(n.updateVal(h,"startx",e-d*ft.boxMargin,Math.min),n.updateVal(h,"stopx",r+d*ft.boxMargin,Math.max),n.updateVal(Yt.data,"starty",t-d*ft.boxMargin,Math.min),n.updateVal(Yt.data,"stopy",i+d*ft.boxMargin,Math.max))},"updateItemBounds")}s(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:s(function(e,t,r,i){let n=qt.getMin(e,r),a=qt.getMax(e,r),o=qt.getMin(t,i),l=qt.getMax(t,i);this.updateVal(Yt.data,"startx",n,Math.min),this.updateVal(Yt.data,"starty",o,Math.min),this.updateVal(Yt.data,"stopx",a,Math.max),this.updateVal(Yt.data,"stopy",l,Math.max),this.updateBounds(n,o,a,l)},"insert"),newActivation:s(function(e,t,r){let i=r.get(e.from),n=nv(e.from).length||0,a=i.x+i.width/2+(n-1)*ft.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+ft.activationWidth,stopy:void 0,actor:e.from,anchored:ai.anchorElement(t)})},"newActivation"),endActivation:s(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:s(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:s(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:s(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:s(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:s(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Yt.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:s(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:s(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:s(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=qt.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return{bounds:this.data,models:this.models}},"getBounds")},GVt=s(async function(e,t,r){Yt.bumpVerticalPos(ft.boxMargin),t.height=ft.boxMargin,t.starty=Yt.getVerticalPos();let i=Fn();i.x=t.startx,i.y=t.starty,i.width=t.width||ft.width,i.class="note";let n=e.append("g");n.attr("data-et","note"),n.attr("data-id","i"+r);let a=ai.drawRect(n,i),o=i0();o.x=t.startx,o.y=t.starty,o.width=i.width,o.dy="1em",o.text=t.message,o.class="noteText",o.fontFamily=ft.noteFontFamily,o.fontSize=ft.noteFontSize,o.fontWeight=ft.noteFontWeight,o.anchor=ft.noteAlign,o.textMargin=ft.noteMargin,o.valign="center";let l=Ci(o.text)?await t2(n,o):tp(n,o),u=Math.round(l.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,d)=>h+d));a.attr("height",u+2*ft.noteMargin),t.height+=u+2*ft.noteMargin,Yt.bumpVerticalPos(u+2*ft.noteMargin),t.stopy=t.starty+u+2*ft.noteMargin,t.stopx=t.startx+i.width,Yt.insert(t.startx,t.starty,t.stopx,t.stopy),Yt.models.addNote(t)},"drawNote"),Sft=s(function(e,t,r,i,n,a,o){let l=i.db.getActors(),u=l.get(t.from),h=l.get(t.to),d=r.sequenceVisible,f=u.x+u.width/2,p=h.x+h.width/2,m=f<=p,g=vft(t,i),y=e.append("g"),x=16.5,k=s((w,A)=>{let v=w?x:-x;return A?-v:v},"getCircleOffset"),T=s(w=>{y.append("circle").attr("cx",w).attr("cy",o).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:C,CENTRAL_CONNECTION_REVERSE:_,CENTRAL_CONNECTION_DUAL:S}=i.db.LINETYPE;if(d)switch(t.centralConnection){case C:g&&(p+=k(m,!0));break;case _:g||(f+=k(m,!1));break;case S:g?p+=k(m,!0):f+=k(m,!1);break}switch(t.centralConnection){case C:T(p);break;case _:T(f);break;case S:T(f),T(p);break}},"drawCentralConnection"),ep=s(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),xy=s(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),w8=s(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");s(WVt,"boundMessage");qVt=s(async function(e,t,r,i,n,a){let{startx:o,stopx:l,starty:u,message:h,type:d,sequenceIndex:f,sequenceVisible:p}=t,m=Te.calculateTextDimensions(h,ep(ft)),g=i0();g.x=o,g.y=u+10,g.width=l-o,g.class="messageText",g.dy="1em",g.text=h,g.fontFamily=ft.messageFontFamily,g.fontSize=ft.messageFontSize,g.fontWeight=ft.messageFontWeight,g.anchor=ft.messageAlign,g.valign="center",g.textMargin=ft.wrapPadding,g.tspan=!1,Ci(g.text)?await t2(e,g,{startx:o,stopx:l,starty:r}):tp(e,g);let y=m.width,x;if(o===l){let T=p||ft.showSequenceNumbers,C=vft(n,i),_=ezt(n,i),S=o+(T&&(C||_)?10:0);ft.rightAngles?x=e.append("path").attr("d",`M ${S},${r} H ${o+qt.getMax(ft.width/2,y/2)} V ${r+25} H ${o}`):x=e.append("path").attr("d","M "+S+","+r+" C "+(S+60)+","+(r-10)+" "+(o+60)+","+(r+30)+" "+o+","+(r+20)),S8(n,i)&&Sft(e,n,t,i,o,l,r)}else x=e.append("line"),x.attr("x1",o),x.attr("y1",r),x.attr("x2",l),x.attr("y2",r),S8(n,i)&&Sft(e,n,t,i,o,l,r);d===i.db.LINETYPE.DOTTED||d===i.db.LINETYPE.DOTTED_CROSS||d===i.db.LINETYPE.DOTTED_POINT||d===i.db.LINETYPE.DOTTED_OPEN||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===i.db.LINETYPE.SOLID_TOP_DOTTED||d===i.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===i.db.LINETYPE.STICK_TOP_DOTTED||d===i.db.LINETYPE.STICK_BOTTOM_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(x.style("stroke-dasharray","3, 3"),x.attr("class","messageLine1")):x.attr("class","messageLine0"),x.attr("data-et","message"),x.attr("data-id","i"+t.id),x.attr("data-from",t.from),x.attr("data-to",t.to);let k="";if(ft.arrowMarkerAbsolute&&(k=Kh(!0)),x.attr("stroke-width",2),x.attr("stroke","none"),x.style("fill","none"),(d===i.db.LINETYPE.SOLID_TOP||d===i.db.LINETYPE.SOLID_TOP_DOTTED)&&x.attr("marker-end","url("+k+"#"+a+"-solidTopArrowHead)"),(d===i.db.LINETYPE.SOLID_BOTTOM||d===i.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&x.attr("marker-end","url("+k+"#"+a+"-solidBottomArrowHead)"),(d===i.db.LINETYPE.STICK_TOP||d===i.db.LINETYPE.STICK_TOP_DOTTED)&&x.attr("marker-end","url("+k+"#"+a+"-stickTopArrowHead)"),(d===i.db.LINETYPE.STICK_BOTTOM||d===i.db.LINETYPE.STICK_BOTTOM_DOTTED)&&x.attr("marker-end","url("+k+"#"+a+"-stickBottomArrowHead)"),(d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&x.attr("marker-start","url("+k+"#"+a+"-solidBottomArrowHead)"),(d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&x.attr("marker-start","url("+k+"#"+a+"-solidTopArrowHead)"),(d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&x.attr("marker-start","url("+k+"#"+a+"-stickBottomArrowHead)"),(d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&x.attr("marker-start","url("+k+"#"+a+"-stickTopArrowHead)"),(d===i.db.LINETYPE.SOLID||d===i.db.LINETYPE.DOTTED)&&x.attr("marker-end","url("+k+"#"+a+"-arrowhead)"),(d===i.db.LINETYPE.BIDIRECTIONAL_SOLID||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(x.attr("marker-start","url("+k+"#"+a+"-arrowhead)"),x.attr("marker-end","url("+k+"#"+a+"-arrowhead)")),(d===i.db.LINETYPE.SOLID_POINT||d===i.db.LINETYPE.DOTTED_POINT)&&x.attr("marker-end","url("+k+"#"+a+"-filled-head)"),(d===i.db.LINETYPE.SOLID_CROSS||d===i.db.LINETYPE.DOTTED_CROSS)&&x.attr("marker-end","url("+k+"#"+a+"-crosshead)"),p||ft.showSequenceNumbers){let T=d===i.db.LINETYPE.BIDIRECTIONAL_SOLID||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED,C=d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,_=6,S=S8(n,i),w=o,A=l;T?(oo?A=l-2*_:(A=l-_,w+=n?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),A+=S?15:0,x.attr("x2",A),x.attr("x1",w)):x.attr("x1",o+_);let v=0,M=o===l,$=o<=l;M?v=t.fromBounds+1:C?v=$?t.toBounds-1:t.fromBounds+1:v=$?t.fromBounds+1:t.toBounds-1,e.append("line").attr("x1",v).attr("y1",r).attr("x2",v).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+k+"#"+a+"-sequencenumber)"),e.append("text").attr("x",v).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(f)}},"drawMessage"),jVt=s(function(e,t,r,i,n,a,o){let l=0,u=0,h,d=0;for(let f of i){let p=t.get(f),m=p.box;h&&h!=m&&(o||Yt.models.addBox(h),u+=ft.boxMargin+h.margin),m&&m!=h&&(o||(m.x=l+u,m.y=n),u+=m.margin),p.width=qt.getMax(p.width||ft.width,ft.width),p.height=qt.getMax(p.height||ft.height,ft.height),p.margin=p.margin||ft.actorMargin,d=qt.getMax(d,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=Yt.getVerticalPos(),Yt.insert(p.x,n,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,Yt.models.addActor(p)}h&&!o&&Yt.models.addBox(h),Yt.bumpVerticalPos(d)},"addActorRenderingData"),_8=s(async function(e,t,r,i,n,a,o){if(i){let l=0;Yt.bumpVerticalPos(ft.boxMargin*2);for(let u of r){let h=t.get(u);h.stopy||(h.stopy=Yt.getVerticalPos());let d=await ai.drawActor(e,h,ft,!0,n,a,o);l=qt.getMax(l,d)}Yt.bumpVerticalPos(l+ft.boxMargin)}else for(let l of r){let u=t.get(l);await ai.drawActor(e,u,ft,!1,n,a,o)}},"drawActors"),_ft=s(function(e,t,r,i){let n=0,a=0;for(let o of r){let l=t.get(o),u=XVt(l),h=ai.drawPopup(e,l,u,ft,ft.forceMenus,i);h.height>n&&(n=h.height),h.width+l.x>a&&(a=h.width+l.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),Eft=s(function(e){Ti(ft,e),e.fontFamily&&(ft.actorFontFamily=ft.noteFontFamily=ft.messageFontFamily=e.fontFamily),e.fontSize&&(ft.actorFontSize=ft.noteFontSize=ft.messageFontSize=e.fontSize),e.fontWeight&&(ft.actorFontWeight=ft.noteFontWeight=ft.messageFontWeight=e.fontWeight)},"setConf"),nv=s(function(e){return Yt.activations.filter(function(t){return t.actor===e})},"actorActivations"),wft=s(function(e,t){let r=t.get(e),i=nv(e),n=i.reduce(function(o,l){return qt.getMin(o,l.startx)},r.x+r.width/2-1),a=i.reduce(function(o,l){return qt.getMax(o,l.stopx)},r.x+r.width/2+1);return[n,a]},"activationBounds");s(rc,"adjustLoopHeightForWrap");s(UVt,"adjustCreatedDestroyedData");HVt=s(async function(e,t,r,i){let{securityLevel:n,sequence:a,look:o}=Q();ft=a;let l;n==="sandbox"&&(l=vt("#i"+t));let u=n==="sandbox"?vt(l.nodes()[0].contentDocument.body):vt("body"),h=n==="sandbox"?l.nodes()[0].contentDocument:document;Yt.init(),z.debug(i.db);let d=n==="sandbox"?u.select(`[id="${t}"]`):vt(`[id="${t}"]`),f=i.db.getActors(),p=i.db.getCreatedActors(),m=i.db.getDestroyedActors(),g=i.db.getBoxes(),y=i.db.getActorKeys(),x=i.db.getMessages(),k=i.db.getDiagramTitle(),T=i.db.hasAtLeastOneBox(),C=i.db.hasAtLeastOneBoxWithTitle(),_=await YVt(f,x,i);if(ft.height=await KVt(f,_,g),ai.insertComputerIcon(d,t),ai.insertDatabaseIcon(d,t),ai.insertClockIcon(d,t),T&&(Yt.bumpVerticalPos(ft.boxMargin),C&&Yt.bumpVerticalPos(g[0].textMaxHeight)),ft.hideUnusedParticipants===!0){let L=new Set;x.forEach(q=>{L.add(q.from),L.add(q.to)}),y=y.filter(q=>L.has(q))}let S=new Map(y.map((L,q)=>[f.get(L)?.name??L,q]));jVt(d,f,p,y,0,x,!1);let w=await izt(x,f,_,i);ai.insertArrowHead(d,t),ai.insertArrowCrossHead(d,t),ai.insertArrowFilledHead(d,t),ai.insertSequenceNumber(d,t),ai.insertSolidTopArrowHead(d,t),ai.insertSolidBottomArrowHead(d,t),ai.insertStickTopArrowHead(d,t),ai.insertStickBottomArrowHead(d,t),o==="neo"&&ai.insertDropShadow(d,ft);function A(L,q){let H=Yt.endActivation(L);H.starty+18>q&&(H.starty=q-6,q+=12),ai.drawActivation(d,H,q,ft,nv(L.from).length,i,S),Yt.insert(H.startx,q-10,H.stopx,q)}s(A,"activeEnd");let v=1,M=1,$=[],I=[],F=0;for(let L of x){let q,H,K;switch(L.type){case i.db.LINETYPE.NOTE:Yt.resetVerticalPos(),H=L.noteModel,await GVt(d,H,L.id);break;case i.db.LINETYPE.ACTIVE_START:Yt.newActivation(L,d,f);break;case i.db.LINETYPE.CENTRAL_CONNECTION:Yt.newActivation(L,d,f);break;case i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Yt.newActivation(L,d,f);break;case i.db.LINETYPE.ACTIVE_END:A(L,Yt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:rc(w,L,ft.boxMargin,ft.boxMargin+ft.boxTextMargin,U=>Yt.newLoop(U));break;case i.db.LINETYPE.LOOP_END:q=Yt.endLoop(),await ai.drawLoop(d,q,"loop",ft,L),Yt.bumpVerticalPos(q.stopy-Yt.getVerticalPos()),Yt.models.addLoop(q);break;case i.db.LINETYPE.RECT_START:rc(w,L,ft.boxMargin,ft.boxMargin,U=>Yt.newLoop(void 0,U.message));break;case i.db.LINETYPE.RECT_END:q=Yt.endLoop(),I.push(q),Yt.models.addLoop(q),Yt.bumpVerticalPos(q.stopy-Yt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:rc(w,L,ft.boxMargin,ft.boxMargin+ft.boxTextMargin,U=>Yt.newLoop(U));break;case i.db.LINETYPE.OPT_END:q=Yt.endLoop(),await ai.drawLoop(d,q,"opt",ft,L),Yt.bumpVerticalPos(q.stopy-Yt.getVerticalPos()),Yt.models.addLoop(q);break;case i.db.LINETYPE.ALT_START:rc(w,L,ft.boxMargin,ft.boxMargin+ft.boxTextMargin,U=>Yt.newLoop(U));break;case i.db.LINETYPE.ALT_ELSE:rc(w,L,ft.boxMargin+ft.boxTextMargin,ft.boxMargin,U=>Yt.addSectionToLoop(U));break;case i.db.LINETYPE.ALT_END:q=Yt.endLoop(),await ai.drawLoop(d,q,"alt",ft,L),Yt.bumpVerticalPos(q.stopy-Yt.getVerticalPos()),Yt.models.addLoop(q);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:rc(w,L,ft.boxMargin,ft.boxMargin+ft.boxTextMargin,U=>Yt.newLoop(U)),Yt.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:rc(w,L,ft.boxMargin+ft.boxTextMargin,ft.boxMargin,U=>Yt.addSectionToLoop(U));break;case i.db.LINETYPE.PAR_END:q=Yt.endLoop(),await ai.drawLoop(d,q,"par",ft,L),Yt.bumpVerticalPos(q.stopy-Yt.getVerticalPos()),Yt.models.addLoop(q);break;case i.db.LINETYPE.AUTONUMBER:v=L.message.start||v,M=L.message.step||M,L.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:rc(w,L,ft.boxMargin,ft.boxMargin+ft.boxTextMargin,U=>Yt.newLoop(U));break;case i.db.LINETYPE.CRITICAL_OPTION:rc(w,L,ft.boxMargin+ft.boxTextMargin,ft.boxMargin,U=>Yt.addSectionToLoop(U));break;case i.db.LINETYPE.CRITICAL_END:q=Yt.endLoop(),await ai.drawLoop(d,q,"critical",ft,L),Yt.bumpVerticalPos(q.stopy-Yt.getVerticalPos()),Yt.models.addLoop(q);break;case i.db.LINETYPE.BREAK_START:rc(w,L,ft.boxMargin,ft.boxMargin+ft.boxTextMargin,U=>Yt.newLoop(U));break;case i.db.LINETYPE.BREAK_END:q=Yt.endLoop(),await ai.drawLoop(d,q,"break",ft,L),Yt.bumpVerticalPos(q.stopy-Yt.getVerticalPos()),Yt.models.addLoop(q);break;default:try{K=L.msgModel,K.starty=Yt.getVerticalPos(),K.sequenceIndex=v,K.sequenceVisible=i.db.showSequenceNumbers(),K.id=L.id,K.from=L.from,K.to=L.to;let U=await WVt(d,K);UVt(L,K,U,F,f,p,m),$.push({messageModel:K,lineStartY:U,msg:L}),Yt.models.addMessage(K)}catch(U){z.error("error while drawing message",U)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.SOLID_TOP,i.db.LINETYPE.SOLID_BOTTOM,i.db.LINETYPE.STICK_TOP,i.db.LINETYPE.STICK_BOTTOM,i.db.LINETYPE.SOLID_TOP_DOTTED,i.db.LINETYPE.SOLID_BOTTOM_DOTTED,i.db.LINETYPE.STICK_TOP_DOTTED,i.db.LINETYPE.STICK_BOTTOM_DOTTED,i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,i.db.LINETYPE.STICK_ARROW_TOP_REVERSE,i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,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(L.type)&&(v=v+M),F++}z.debug("createdActors",p),z.debug("destroyedActors",m),await _8(d,f,y,!1,t,i,S);for(let L of $)await qVt(d,L.messageModel,L.lineStartY,i,L.msg,t);ft.mirrorActors&&await _8(d,f,y,!0,t,i,S),I.forEach(L=>ai.drawBackgroundRect(d,L)),C8(d,f,y,ft);for(let L of Yt.models.boxes){L.height=Yt.getVerticalPos()-L.y,Yt.insert(L.x,L.y,L.x+L.width,L.height);let q=ft.boxMargin*2;L.startx=L.x-q,L.starty=L.y-q*.25,L.stopx=L.startx+L.width+2*q,L.stopy=L.starty+L.height+q*.75,L.stroke="rgb(0,0,0, 0.5)",ai.drawBox(d,L,ft)}T&&Yt.bumpVerticalPos(ft.boxMargin);let B=_ft(d,f,y,h),{bounds:O}=Yt.getBounds();O.startx===void 0&&(O.startx=0),O.starty===void 0&&(O.starty=0),O.stopx===void 0&&(O.stopx=0),O.stopy===void 0&&(O.stopy=0);let R=O.stopy-O.starty;R2,p=s(x=>u?-x:x,"adjustValue");e.from===e.to?d=h:(e.activate&&!f&&(d+=p(ft.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(d+=p(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(h-=p(3)));let m=[n,a,o,l],g=Math.abs(h-d);e.wrap&&e.message&&(e.message=Te.wrapLabel(e.message,qt.getMax(g+2*ft.wrapPadding,ft.width),ep(ft)));let y=Te.calculateTextDimensions(e.message,ep(ft));return{width:qt.getMax(e.wrap?0:y.width+2*ft.wrapPadding,g+2*ft.wrapPadding,ft.width),height:0,startx:h,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,m),toBounds:Math.max.apply(null,m)}},"buildMessageModel"),izt=s(async function(e,t,r,i){let n={},a=[],o,l,u;for(let h of e){switch(h.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:a.push({id:h.id,msg:h.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:h.message&&(o=a.pop(),n[o.id]=o,n[h.id]=o,a.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=a.pop(),n[o.id]=o;break;case i.db.LINETYPE.ACTIVE_START:{let f=t.get(h.from?h.from:h.to.actor),p=nv(h.from?h.from:h.to.actor).length,m=f.x+f.width/2+(p-1)*ft.activationWidth/2,g={startx:m,stopx:m+ft.activationWidth,actor:h.from,enabled:!0};Yt.activations.push(g)}break;case i.db.LINETYPE.ACTIVE_END:{let f=Yt.activations.map(p=>p.actor).lastIndexOf(h.from);Yt.activations.splice(f,1).splice(0,1)}break}h.placement!==void 0?(l=await QVt(h,t,i),h.noteModel=l,a.forEach(f=>{o=f,o.from=qt.getMin(o.from,l.startx),o.to=qt.getMax(o.to,l.startx+l.width),o.width=qt.getMax(o.width,Math.abs(o.from-o.to))-ft.labelBoxWidth})):(u=rzt(h,t,i),h.msgModel=u,u.startx&&u.stopx&&a.length>0&&a.forEach(f=>{if(o=f,u.startx===u.stopx){let p=t.get(h.from),m=t.get(h.to);o.from=qt.getMin(p.x-u.width/2,p.x-p.width/2,o.from),o.to=qt.getMax(m.x+u.width/2,m.x+p.width/2,o.to),o.width=qt.getMax(o.width,Math.abs(o.to-o.from))-ft.labelBoxWidth}else o.from=qt.getMin(u.startx,o.from),o.to=qt.getMax(u.stopx,o.to),o.width=qt.getMax(o.width,u.width)-ft.labelBoxWidth}))}return Yt.activations=[],z.debug("Loop type widths:",n),n},"calculateLoopBounds"),Aft={bounds:Yt,drawActors:_8,drawActorsPopup:_ft,setConf:Eft,draw:HVt}});var Lft={};Fe(Lft,{diagram:()=>nzt});var nzt,Dft=b(()=>{"use strict";gft();k8();xft();ye();Rft();nzt={parser:mft,get db(){return new ev},renderer:Aft,styles:yft,init:s(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,s1({sequence:{wrap:e.wrap}}))},"init")}});var E8,sv,v8=b(()=>{"use strict";E8=(function(){var e=s(function(Ht,Dt,bt,Gt){for(bt=bt||{},Gt=Ht.length;Gt--;bt[Ht[Gt]]=Dt);return bt},"o"),t=[1,18],r=[1,19],i=[1,20],n=[1,41],a=[1,26],o=[1,42],l=[1,24],u=[1,25],h=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],g=[1,36],y=[1,37],x=[1,38],k=[1,27],T=[1,28],C=[1,29],_=[1,30],S=[1,31],w=[1,44],A=[1,46],v=[1,43],M=[1,47],$=[1,9],I=[1,8,9],F=[1,58],B=[1,59],O=[1,60],R=[1,61],N=[1,62],P=[1,63],E=[1,64],D=[1,8,9,41],V=[1,77],L=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],q=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],H=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],U=[13,60,68,69,70,71,72,86,100,102,103],st=[1,102],X=[1,120],ut=[1,116],ot=[1,112],mt=[1,118],ht=[1,113],it=[1,114],Ot=[1,115],St=[1,117],yt=[1,119],Et=[22,50,60,61,82,86,87,88,89,90],Ct=[1,8,9,39,41,44,46],Bt=[1,8,9,22],Lt=[1,150],ee=[1,8,9,61],at=[1,8,9,22,50,60,61,82,86,87,88,89,90],$e={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:s(function(Dt,bt,Gt,G,nt,W,Rt){var Y=W.length-1;switch(nt){case 8:this.$=W[Y-1];break;case 9:case 10:case 13:case 15:this.$=W[Y];break;case 11:case 14:this.$=W[Y-2]+"."+W[Y];break;case 12:case 16:this.$=W[Y-1]+W[Y];break;case 17:case 18:this.$=W[Y-1]+"~"+W[Y]+"~";break;case 19:G.addRelation(W[Y]);break;case 20:W[Y-1].title=G.cleanupLabel(W[Y]),G.addRelation(W[Y-1]);break;case 31:this.$=W[Y].trim(),G.setAccTitle(this.$);break;case 32:case 33:this.$=W[Y].trim(),G.setAccDescription(this.$);break;case 34:G.addClassesToNamespace(W[Y-3],W[Y-1][0],W[Y-1][1]);break;case 35:G.addClassesToNamespace(W[Y-4],W[Y-1][0],W[Y-1][1]);break;case 36:this.$=W[Y],G.addNamespace(W[Y]);break;case 37:this.$=[[W[Y]],[]];break;case 38:this.$=[[W[Y-1]],[]];break;case 39:W[Y][0].unshift(W[Y-2]),this.$=W[Y];break;case 40:this.$=[[],[W[Y]]];break;case 41:this.$=[[],[W[Y-1]]];break;case 42:W[Y][1].unshift(W[Y-2]),this.$=W[Y];break;case 44:G.setCssClass(W[Y-2],W[Y]);break;case 45:G.addMembers(W[Y-3],W[Y-1]);break;case 47:G.setCssClass(W[Y-5],W[Y-3]),G.addMembers(W[Y-5],W[Y-1]);break;case 48:G.addAnnotation(W[Y-3],W[Y-1]);break;case 49:G.addAnnotation(W[Y-6],W[Y-4]),G.addMembers(W[Y-6],W[Y-1]);break;case 50:G.addAnnotation(W[Y-5],W[Y-3]);break;case 51:this.$=W[Y],G.addClass(W[Y]);break;case 52:this.$=W[Y-1],G.addClass(W[Y-1]),G.setClassLabel(W[Y-1],W[Y]);break;case 56:G.addAnnotation(W[Y],W[Y-2]);break;case 57:case 70:this.$=[W[Y]];break;case 58:W[Y].push(W[Y-1]),this.$=W[Y];break;case 59:break;case 60:G.addMember(W[Y-1],G.cleanupLabel(W[Y]));break;case 61:break;case 62:break;case 63:this.$={id1:W[Y-2],id2:W[Y],relation:W[Y-1],relationTitle1:"none",relationTitle2:"none"};break;case 64:this.$={id1:W[Y-3],id2:W[Y],relation:W[Y-1],relationTitle1:W[Y-2],relationTitle2:"none"};break;case 65:this.$={id1:W[Y-3],id2:W[Y],relation:W[Y-2],relationTitle1:"none",relationTitle2:W[Y-1]};break;case 66:this.$={id1:W[Y-4],id2:W[Y],relation:W[Y-2],relationTitle1:W[Y-3],relationTitle2:W[Y-1]};break;case 67:this.$=G.addNote(W[Y],W[Y-1]);break;case 68:this.$=G.addNote(W[Y]);break;case 69:this.$=W[Y-2],G.defineClass(W[Y-1],W[Y]);break;case 71:this.$=W[Y-2].concat([W[Y]]);break;case 72:G.setDirection("TB");break;case 73:G.setDirection("BT");break;case 74:G.setDirection("RL");break;case 75:G.setDirection("LR");break;case 76:this.$={type1:W[Y-2],type2:W[Y],lineType:W[Y-1]};break;case 77:this.$={type1:"none",type2:W[Y],lineType:W[Y-1]};break;case 78:this.$={type1:W[Y-1],type2:"none",lineType:W[Y]};break;case 79:this.$={type1:"none",type2:"none",lineType:W[Y]};break;case 80:this.$=G.relationType.AGGREGATION;break;case 81:this.$=G.relationType.EXTENSION;break;case 82:this.$=G.relationType.COMPOSITION;break;case 83:this.$=G.relationType.DEPENDENCY;break;case 84:this.$=G.relationType.LOLLIPOP;break;case 85:this.$=G.lineType.LINE;break;case 86:this.$=G.lineType.DOTTED_LINE;break;case 87:case 93:this.$=W[Y-2],G.setClickEvent(W[Y-1],W[Y]);break;case 88:case 94:this.$=W[Y-3],G.setClickEvent(W[Y-2],W[Y-1]),G.setTooltip(W[Y-2],W[Y]);break;case 89:this.$=W[Y-2],G.setLink(W[Y-1],W[Y]);break;case 90:this.$=W[Y-3],G.setLink(W[Y-2],W[Y-1],W[Y]);break;case 91:this.$=W[Y-3],G.setLink(W[Y-2],W[Y-1]),G.setTooltip(W[Y-2],W[Y]);break;case 92:this.$=W[Y-4],G.setLink(W[Y-3],W[Y-2],W[Y]),G.setTooltip(W[Y-3],W[Y-1]);break;case 95:this.$=W[Y-3],G.setClickEvent(W[Y-2],W[Y-1],W[Y]);break;case 96:this.$=W[Y-4],G.setClickEvent(W[Y-3],W[Y-2],W[Y-1]),G.setTooltip(W[Y-3],W[Y]);break;case 97:this.$=W[Y-3],G.setLink(W[Y-2],W[Y]);break;case 98:this.$=W[Y-4],G.setLink(W[Y-3],W[Y-1],W[Y]);break;case 99:this.$=W[Y-4],G.setLink(W[Y-3],W[Y-1]),G.setTooltip(W[Y-3],W[Y]);break;case 100:this.$=W[Y-5],G.setLink(W[Y-4],W[Y-2],W[Y]),G.setTooltip(W[Y-4],W[Y-1]);break;case 101:this.$=W[Y-2],G.setCssStyle(W[Y-1],W[Y]);break;case 102:G.setCssClass(W[Y-1],W[Y]);break;case 103:this.$=[W[Y]];break;case 104:W[Y-2].push(W[Y]),this.$=W[Y-2];break;case 106:this.$=W[Y-1]+W[Y];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:n,43:23,46:a,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:x,75:k,76:T,78:C,82:_,83:S,86:w,100:A,102:v,103:M},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e($,[2,5],{8:[1,48]}),{8:[1,49]},e(I,[2,19],{22:[1,50]}),e(I,[2,21]),e(I,[2,22]),e(I,[2,23]),e(I,[2,24]),e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,30]),{34:[1,51]},{36:[1,52]},e(I,[2,33]),e(I,[2,59],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:F,69:B,70:O,71:R,72:N,73:P,74:E}),{39:[1,65]},e(D,[2,43],{39:[1,67],44:[1,66],46:[1,68]}),e(I,[2,61]),e(I,[2,62]),{16:69,60:p,86:w,100:A,102:v},{16:39,17:40,19:70,60:p,86:w,100:A,102:v,103:M},{16:39,17:40,19:71,60:p,86:w,100:A,102:v,103:M},{16:39,17:40,19:72,60:p,86:w,100:A,102:v,103:M},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:w,100:A,102:v,103:M},{13:V,55:76},{58:78,60:[1,79]},e(I,[2,72]),e(I,[2,73]),e(I,[2,74]),e(I,[2,75]),e(L,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:w,100:A,102:v,103:M}),e(L,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:w,100:A,102:v,103:M},{16:39,17:40,19:87,60:p,86:w,100:A,102:v,103:M},e(q,[2,129]),e(q,[2,130]),e(q,[2,131]),e(q,[2,132]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,133]),e($,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:r,37:i,42:n,46:a,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:x,75:k,76:T,78:C,82:_,83:S,86:w,100:A,102:v,103:M}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:n,43:23,46:a,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:x,75:k,76:T,78:C,82:_,83:S,86:w,100:A,102:v,103:M},e(I,[2,20]),e(I,[2,31]),e(I,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:w,100:A,102:v,103:M},{53:92,66:56,67:57,68:F,69:B,70:O,71:R,72:N,73:P,74:E},e(I,[2,60]),{67:93,73:P,74:E},e(H,[2,79],{66:94,68:F,69:B,70:O,71:R,72:N}),e(K,[2,80]),e(K,[2,81]),e(K,[2,82]),e(K,[2,83]),e(K,[2,84]),e(U,[2,85]),e(U,[2,86]),{8:[1,96],24:97,30:98,40:95,43:23,48:o,54:h,56:d},{16:99,60:p,86:w,100:A,102:v},{41:[1,101],45:100,51:st},{16:103,60:p,86:w,100:A,102:v},{47:[1,104]},{13:[1,105]},{13:[1,106]},{79:[1,107],81:[1,108]},{22:X,50:ut,59:109,60:ot,82:mt,84:110,85:111,86:ht,87:it,88:Ot,89:St,90:yt},{60:[1,121]},{13:V,55:122},e(D,[2,68]),e(D,[2,134]),{22:X,50:ut,59:123,60:ot,61:[1,124],82:mt,84:110,85:111,86:ht,87:it,88:Ot,89:St,90:yt},e(Et,[2,70]),{16:39,17:40,19:125,60:p,86:w,100:A,102:v,103:M},e(L,[2,16]),e(L,[2,17]),e(L,[2,18]),{39:[2,36]},{15:127,16:85,17:86,18:[1,126],39:[2,9],60:p,86:w,100:A,102:v,103:M},{39:[2,10]},e(Ct,[2,51],{11:128,12:[1,129]}),e($,[2,7]),{9:[1,130]},e(Bt,[2,63]),{16:39,17:40,19:131,60:p,86:w,100:A,102:v,103:M},{13:[1,133],16:39,17:40,19:132,60:p,86:w,100:A,102:v,103:M},e(H,[2,78],{66:134,68:F,69:B,70:O,71:R,72:N}),e(H,[2,77]),{41:[1,135]},{24:97,30:98,40:136,43:23,48:o,54:h,56:d},{8:[1,137],41:[2,37]},{8:[1,138],41:[2,40]},e(D,[2,44],{39:[1,139]}),{41:[1,140]},e(D,[2,46]),{41:[2,57],45:141,51:st},{47:[1,142]},{16:39,17:40,19:143,60:p,86:w,100:A,102:v,103:M},e(I,[2,87],{13:[1,144]}),e(I,[2,89],{13:[1,146],77:[1,145]}),e(I,[2,93],{13:[1,147],80:[1,148]}),{13:[1,149]},e(I,[2,101],{61:Lt}),e(ee,[2,103],{85:151,22:X,50:ut,60:ot,82:mt,86:ht,87:it,88:Ot,89:St,90:yt}),e(at,[2,105]),e(at,[2,107]),e(at,[2,108]),e(at,[2,109]),e(at,[2,110]),e(at,[2,111]),e(at,[2,112]),e(at,[2,113]),e(at,[2,114]),e(at,[2,115]),e(I,[2,102]),e(D,[2,67]),e(I,[2,69],{61:Lt}),{60:[1,152]},e(L,[2,14]),{15:153,16:85,17:86,60:p,86:w,100:A,102:v,103:M},{39:[2,12]},e(Ct,[2,52]),{13:[1,154]},{1:[2,4]},e(Bt,[2,65]),e(Bt,[2,64]),{16:39,17:40,19:155,60:p,86:w,100:A,102:v,103:M},e(H,[2,76]),e(I,[2,34]),{41:[1,156]},{24:97,30:98,40:157,41:[2,38],43:23,48:o,54:h,56:d},{24:97,30:98,40:158,41:[2,41],43:23,48:o,54:h,56:d},{45:159,51:st},e(D,[2,45]),{41:[2,58]},e(D,[2,48],{39:[1,160]}),e(I,[2,56]),e(I,[2,88]),e(I,[2,90]),e(I,[2,91],{77:[1,161]}),e(I,[2,94]),e(I,[2,95],{13:[1,162]}),e(I,[2,97],{13:[1,164],77:[1,163]}),{22:X,50:ut,60:ot,82:mt,84:165,85:111,86:ht,87:it,88:Ot,89:St,90:yt},e(at,[2,106]),e(Et,[2,71]),{39:[2,11]},{14:[1,166]},e(Bt,[2,66]),e(I,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,167]},{41:[1,169],45:168,51:st},e(I,[2,92]),e(I,[2,96]),e(I,[2,98]),e(I,[2,99],{77:[1,170]}),e(ee,[2,104],{85:151,22:X,50:ut,60:ot,82:mt,86:ht,87:it,88:Ot,89:St,90:yt}),e(Ct,[2,8]),e(D,[2,47]),{41:[1,171]},e(D,[2,50]),e(I,[2,100]),e(D,[2,49])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],84:[2,36],86:[2,10],127:[2,12],130:[2,4],141:[2,58],153:[2,11],157:[2,39],158:[2,42]},parseError:s(function(Dt,bt){if(bt.recoverable)this.trace(Dt);else{var Gt=new Error(Dt);throw Gt.hash=bt,Gt}},"parseError"),parse:s(function(Dt){var bt=this,Gt=[0],G=[],nt=[null],W=[],Rt=this.table,Y="",At=0,xt=0,Zt=0,Nt=2,wt=1,he=W.slice.call(arguments,1),gt=Object.create(this.lexer),te={yy:{}};for(var ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ne)&&(te.yy[ne]=this.yy[ne]);gt.setInput(Dt,te.yy),te.yy.lexer=gt,te.yy.parser=this,typeof gt.yylloc>"u"&&(gt.yylloc={});var It=gt.yylloc;W.push(It);var ke=gt.options&>.options.ranges;typeof te.yy.parseError=="function"?this.parseError=te.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function J(yr){Gt.length=Gt.length-2*yr,nt.length=nt.length-yr,W.length=W.length-yr}s(J,"popStack");function Xe(){var yr;return yr=G.pop()||gt.lex()||wt,typeof yr!="number"&&(yr instanceof Array&&(G=yr,yr=G.pop()),yr=bt.symbols_[yr]||yr),yr}s(Xe,"lex");for(var rt,or,Sr,Dr,Ie,vr,ge={},se,Oe,ve,ue;;){if(Sr=Gt[Gt.length-1],this.defaultActions[Sr]?Dr=this.defaultActions[Sr]:((rt===null||typeof rt>"u")&&(rt=Xe()),Dr=Rt[Sr]&&Rt[Sr][rt]),typeof Dr>"u"||!Dr.length||!Dr[0]){var Ge="";ue=[];for(se in Rt[Sr])this.terminals_[se]&&se>Nt&&ue.push("'"+this.terminals_[se]+"'");gt.showPosition?Ge="Parse error on line "+(At+1)+`: +`+gt.showPosition()+` +Expecting `+ue.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":Ge="Parse error on line "+(At+1)+": Unexpected "+(rt==wt?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError(Ge,{text:gt.match,token:this.terminals_[rt]||rt,line:gt.yylineno,loc:It,expected:ue})}if(Dr[0]instanceof Array&&Dr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Sr+", token: "+rt);switch(Dr[0]){case 1:Gt.push(rt),nt.push(gt.yytext),W.push(gt.yylloc),Gt.push(Dr[1]),rt=null,or?(rt=or,or=null):(xt=gt.yyleng,Y=gt.yytext,At=gt.yylineno,It=gt.yylloc,Zt>0&&Zt--);break;case 2:if(Oe=this.productions_[Dr[1]][1],ge.$=nt[nt.length-Oe],ge._$={first_line:W[W.length-(Oe||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(Oe||1)].first_column,last_column:W[W.length-1].last_column},ke&&(ge._$.range=[W[W.length-(Oe||1)].range[0],W[W.length-1].range[1]]),vr=this.performAction.apply(ge,[Y,xt,At,te.yy,Dr[1],nt,W].concat(he)),typeof vr<"u")return vr;Oe&&(Gt=Gt.slice(0,-1*Oe*2),nt=nt.slice(0,-1*Oe),W=W.slice(0,-1*Oe)),Gt.push(this.productions_[Dr[1]][0]),nt.push(ge.$),W.push(ge._$),ve=Rt[Gt[Gt.length-2]][Gt[Gt.length-1]],Gt.push(ve);break;case 3:return!0}}return!0},"parse")},pt=(function(){var Ht={EOF:1,parseError:s(function(bt,Gt){if(this.yy.parser)this.yy.parser.parseError(bt,Gt);else throw new Error(bt)},"parseError"),setInput:s(function(Dt,bt){return this.yy=bt||this.yy||{},this._input=Dt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var Dt=this._input[0];this.yytext+=Dt,this.yyleng++,this.offset++,this.match+=Dt,this.matched+=Dt;var bt=Dt.match(/(?:\r\n?|\n).*/g);return bt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Dt},"input"),unput:s(function(Dt){var bt=Dt.length,Gt=Dt.split(/(?:\r\n?|\n)/g);this._input=Dt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-bt),this.offset-=bt;var G=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Gt.length-1&&(this.yylineno-=Gt.length-1);var nt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Gt?(Gt.length===G.length?this.yylloc.first_column:0)+G[G.length-Gt.length].length-Gt[0].length:this.yylloc.first_column-bt},this.options.ranges&&(this.yylloc.range=[nt[0],nt[0]+this.yyleng-bt]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(Dt){this.unput(this.match.slice(Dt))},"less"),pastInput:s(function(){var Dt=this.matched.substr(0,this.matched.length-this.match.length);return(Dt.length>20?"...":"")+Dt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Dt=this.match;return Dt.length<20&&(Dt+=this._input.substr(0,20-Dt.length)),(Dt.substr(0,20)+(Dt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Dt=this.pastInput(),bt=new Array(Dt.length+1).join("-");return Dt+this.upcomingInput()+` +`+bt+"^"},"showPosition"),test_match:s(function(Dt,bt){var Gt,G,nt;if(this.options.backtrack_lexer&&(nt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(nt.yylloc.range=this.yylloc.range.slice(0))),G=Dt[0].match(/(?:\r\n?|\n).*/g),G&&(this.yylineno+=G.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:G?G[G.length-1].length-G[G.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Dt[0].length},this.yytext+=Dt[0],this.match+=Dt[0],this.matches=Dt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Dt[0].length),this.matched+=Dt[0],Gt=this.performAction.call(this,this.yy,this,bt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Gt)return Gt;if(this._backtrack){for(var W in nt)this[W]=nt[W];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Dt,bt,Gt,G;this._more||(this.yytext="",this.match="");for(var nt=this._currentRules(),W=0;Wbt[0].length)){if(bt=Gt,G=W,this.options.backtrack_lexer){if(Dt=this.test_match(Gt,nt[W]),Dt!==!1)return Dt;if(this._backtrack){bt=!1;continue}else return!1}else if(!this.options.flex)break}return bt?(Dt=this.test_match(bt,nt[G]),Dt!==!1?Dt:!1):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:s(function(){var bt=this.next();return bt||this.lex()},"lex"),begin:s(function(bt){this.conditionStack.push(bt)},"begin"),popState:s(function(){var bt=this.conditionStack.length-1;return bt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(bt){return bt=this.conditionStack.length-1-Math.abs(bt||0),bt>=0?this.conditionStack[bt]:"INITIAL"},"topState"),pushState:s(function(bt){this.begin(bt)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(bt,Gt,G,nt){var W=nt;switch(G){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:return this.popState(),41;break;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),48;break;case 39:return this.popState(),8;break;case 40:break;case 41:return this.popState(),this.popState(),41;break;case 42:return this.begin("class-body"),39;break;case 43:return this.popState(),41;break;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 46;case 56:return 47;case 57:return 81;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 77;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 69;case 69:return 69;case 70:return 71;case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:return 89;case 85:return 89;case 86:return 90;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:return 50;case 96:return 50;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return Ht})();$e.lexer=pt;function Wt(){this.yy={}}return s(Wt,"Parser"),Wt.prototype=$e,$e.Parser=Wt,new Wt})();E8.parser=E8;sv=E8});var Oft,e2,Mft=b(()=>{"use strict";ye();fr();Oft=["#","+","~","-",""],e2=class{static{s(this,"ClassMember")}constructor(t,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";let i=nr(t,Q());this.parseMember(i)}getDisplayDetails(){let t=this.visibility+ol(this.id);this.memberType==="method"&&(t+=`(${ol(this.parameters.trim())})`,this.returnType&&(t+=" : "+ol(this.returnType))),t=t.trim();let r=this.parseClassifier();return{displayText:t,cssStyle:r}}parseMember(t){let r="";if(this.memberType==="method"){let a=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(a){let o=a[1]?a[1].trim():"";if(Oft.includes(o)&&(this.visibility=o),this.id=a[2],this.parameters=a[3]?a[3].trim():"",r=a[4]?a[4].trim():"",this.returnType=a[5]?a[5].trim():"",r===""){let l=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(l)&&(r=l,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=t.length,a=t.substring(0,1),o=t.substring(n-1);Oft.includes(a)&&(this.visibility=a),/[$*]/.exec(o)&&(r=o),this.id=t.substring(this.visibility===""?0:1,r===""?n:n-1)}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let i=`${this.visibility?"\\"+this.visibility:""}${ol(this.id)}${this.memberType==="method"?`(${ol(this.parameters)})${this.returnType?" : "+ol(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""}}}});var av,Bft,rp,by,A8=b(()=>{"use strict";lr();Jt();ye();fr();Re();yi();Td();Mft();r1();av="classId-",Bft=0,rp=s(e=>qt.sanitizeText(e,Q()),"sanitizeText"),by=class{constructor(){this.relations=[];this.classes=new Map;this.styleClasses=new Map;this.notes=new Map;this.interfaces=[];this.namespaces=new Map;this.namespaceCounter=0;this.diagramId="";this.functions=[];this.lineType={LINE:0,DOTTED_LINE:1};this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4};this.setupToolTips=s(t=>{let r=cT();vt(t).select("svg").selectAll("g").filter(function(){return vt(this).attr("title")!==null}).on("mouseover",a=>{let o=vt(a.currentTarget),l=o.attr("title");if(!l)return;let u=a.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(Va.sanitize(l)).style("left",`${window.scrollX+u.left+u.width/2}px`).style("top",`${window.scrollY+u.bottom+4}px`),o.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),vt(a.currentTarget).classed("hover",!1)})},"setupToolTips");this.direction="TB";this.setAccTitle=Ye;this.getAccTitle=Ze;this.setAccDescription=Je;this.getAccDescription=tr;this.setDiagramTitle=sr;this.getDiagramTitle=er;this.getConfig=s(()=>Q().class,"getConfig");this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{s(this,"ClassDB")}splitClassNameAndType(t){let r=qt.sanitizeText(t,Q()),i="",n=r;if(r.indexOf("~")>0){let a=r.split("~");n=rp(a[0]),i=rp(a[1])}return{className:n,type:i}}setClassLabel(t,r){let i=qt.sanitizeText(t,Q());r&&(r=rp(r));let{className:n}=this.splitClassNameAndType(i);this.classes.get(n).label=r,this.classes.get(n).text=`${r}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(t){let r=qt.sanitizeText(t,Q()),{className:i,type:n}=this.splitClassNameAndType(r);if(this.classes.has(i))return;let a=qt.sanitizeText(i,Q());this.classes.set(a,{id:a,type:n,label:a,text:`${a}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:av+a+"-"+Bft}),Bft++}addInterface(t,r){let i={id:`interface${this.interfaces.length}`,label:t,classId:r};this.interfaces.push(i)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){let r=qt.sanitizeText(t,Q());if(this.classes.has(r)){let i=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${i}`:i}throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.diagramId="",this.direction="TB",He()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){let r=typeof t=="number"?`note${t}`:t;return this.notes.get(r)}getNotes(){return this.notes}addRelation(t){z.debug("Adding relation: "+JSON.stringify(t));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1===this.relationType.LOLLIPOP&&!r.includes(t.relation.type2)?(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1=`interface${this.interfaces.length-1}`):t.relation.type2===this.relationType.LOLLIPOP&&!r.includes(t.relation.type1)?(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2=`interface${this.interfaces.length-1}`):(this.addClass(t.id1),this.addClass(t.id2)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=qt.sanitizeText(t.relationTitle1.trim(),Q()),t.relationTitle2=qt.sanitizeText(t.relationTitle2.trim(),Q()),this.relations.push(t)}addAnnotation(t,r){let i=this.splitClassNameAndType(t).className;this.classes.get(i).annotations.push(r)}addMember(t,r){this.addClass(t);let i=this.splitClassNameAndType(t).className,n=this.classes.get(i);if(typeof r=="string"){let a=r.trim();a.startsWith("<<")&&a.endsWith(">>")?n.annotations.push(rp(a.substring(2,a.length-2))):a.indexOf(")")>0?n.methods.push(new e2(a,"method")):a&&n.members.push(new e2(a,"attribute"))}}addMembers(t,r){Array.isArray(r)&&(r.reverse(),r.forEach(i=>this.addMember(t,i)))}addNote(t,r){let i=this.notes.size,n={id:`note${i}`,class:r,text:t,index:i};return this.notes.set(n.id,n),n.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),rp(t.trim())}setCssClass(t,r){t.split(",").forEach(i=>{let n=i;/\d/.exec(i[0])&&(n=av+n);let a=this.classes.get(n);a&&(a.cssClasses+=" "+r)})}defineClass(t,r){for(let i of t){let n=this.styleClasses.get(i);n===void 0&&(n={id:i,styles:[],textStyles:[]},this.styleClasses.set(i,n)),r&&r.forEach(a=>{if(/color/.exec(a)){let o=a.replace("fill","bgFill");n.textStyles.push(o)}n.styles.push(a)}),this.classes.forEach(a=>{a.cssClasses.includes(i)&&a.styles.push(...r.flatMap(o=>o.split(",")))})}}setTooltip(t,r){t.split(",").forEach(i=>{r!==void 0&&(this.classes.get(i).tooltip=rp(r))})}getTooltip(t,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,r,i){let n=Q();t.split(",").forEach(a=>{let o=a;/\d/.exec(a[0])&&(o=av+o);let l=this.classes.get(o);l&&(l.link=Te.formatUrl(r,n),n.securityLevel==="sandbox"?l.linkTarget="_top":typeof i=="string"?l.linkTarget=rp(i):l.linkTarget="_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,r,i){t.split(",").forEach(n=>{this.setClickFunc(n,r,i),this.classes.get(n).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,r,i){let n=qt.sanitizeText(t,Q());if(Q().securityLevel!=="loose"||r===void 0)return;let o=n;if(this.classes.has(o)){let l=[];if(typeof i=="string"){l=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u{let u=this.lookUpDomId(o),h=document.querySelector(`[id="${u}"]`);h!==null&&h.addEventListener("click",()=>{Te.runFunc(r,...l)},!1)})}}bindFunctions(t){this.functions.forEach(r=>{r(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,notes:new Map,children:new Map,domId:av+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,r,i){if(this.namespaces.has(t)){for(let n of r){let{className:a}=this.splitClassNameAndType(n),o=this.getClass(a);o.parent=t,this.namespaces.get(t).classes.set(a,o)}for(let n of i){let a=this.getNote(n);a.parent=t,this.namespaces.get(t).notes.set(n,a)}}}setCssStyle(t,r){let i=this.classes.get(t);if(!(!r||!i))for(let n of r)n.includes(",")?i.styles.push(...n.split(",")):i.styles.push(n)}getArrowMarker(t){let r;switch(t){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}getData(){let t=[],r=[],i=Q();for(let a of this.namespaces.values()){let o={id:a.id,label:a.id,isGroup:!0,padding:i.class.padding??16,shape:"rect",cssStyles:[],look:i.look};t.push(o)}for(let a of this.classes.values()){let o={...a,type:void 0,isGroup:!1,parentId:a.parent,look:i.look};t.push(o)}for(let a of this.notes.values()){let o={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:i.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${i.themeVariables.noteBkgColor}`,`stroke: ${i.themeVariables.noteBorderColor}`],look:i.look,parentId:a.parent,labelType:"markdown"};t.push(o);let l=this.classes.get(a.class)?.id;if(l){let u={id:`edgeNote${a.index}`,start:a.id,end:l,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:i.look};r.push(u)}}for(let a of this.interfaces){let o={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:i.look};t.push(o)}let n=0;for(let a of this.relations){n++;let o={id:Nu(a.id1,a.id2,{prefix:"id",counter:n}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:a.relationTitle1==="none"?"":a.relationTitle1,endLabelLeft:a.relationTitle2==="none"?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:a.relation.lineType==1?"dashed":"solid",look:i.look,labelType:"markdown"};r.push(o)}return{nodes:t,edges:r,other:{},config:i,direction:this.getDirection()}}}});var lzt,ov,R8=b(()=>{"use strict";Gm();lzt=s(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} + +.noteLabel .nodeLabel, .noteLabel .edgeLabel { + color: ${e.noteTextColor}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} + +.labelBkg { + background: ${e.mainBkg}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${e.strokeWidth}; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth}; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +[id$="-compositionStart"], .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-compositionEnd"], .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyStart"], .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyEnd"], .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionStart"], .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionEnd"], .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationStart"], .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationEnd"], .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopStart"], .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopEnd"], .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + +.edgeLabel[data-look="neo"] { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} + ${Pl()} +`,"getStyles"),ov=lzt});var czt,uzt,hzt,lv,L8=b(()=>{"use strict";ye();Jt();bm();Yd();Xd();Re();czt=s((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir"),uzt=s(function(e,t){return t.db.getClasses()},"getClasses"),hzt=s(async function(e,t,r,i){z.info("REF0:"),z.info("Drawing class diagram (v3)",t);let{securityLevel:n,state:a,layout:o}=Q();i.db.setDiagramId(t);let l=i.db.getData(),u=vl(t,n);l.type=i.type,l.layoutAlgorithm=Zu(o),l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["aggregation","extension","composition","dependency","lollipop"],l.diagramId=t,await Bl(l,u);let h=8;Te.insertTitle(u,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),ro(u,h,"classDiagram",a?.useMaxWidth??!0)},"draw"),lv={getClasses:uzt,draw:hzt,getDir:czt}});var Pft={};Fe(Pft,{diagram:()=>dzt});var dzt,$ft=b(()=>{"use strict";v8();A8();R8();L8();dzt={parser:sv,get db(){return new by},renderer:lv,styles:ov,init:s(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var zft={};Fe(zft,{diagram:()=>gzt});var gzt,Gft=b(()=>{"use strict";v8();A8();R8();L8();gzt={parser:sv,get db(){return new by},renderer:lv,styles:ov,init:s(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var D8,cv,I8=b(()=>{"use strict";D8=(function(){var e=s(function(D,V,L,q){for(L=L||{},q=D.length;q--;L[D[q]]=V);return L},"o"),t=[1,2],r=[1,3],i=[1,4],n=[2,4],a=[1,9],o=[1,11],l=[1,16],u=[1,17],h=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],g=[1,22],y=[1,23],x=[1,24],k=[1,26],T=[1,27],C=[1,28],_=[1,29],S=[1,30],w=[1,31],A=[1,32],v=[1,35],M=[1,36],$=[1,37],I=[1,38],F=[1,34],B=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],O=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],R=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:s(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,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:s(function(V,L,q,H,K,U,st){var X=U.length-1;switch(K){case 3:return H.setRootDoc(U[X]),U[X];break;case 4:this.$=[];break;case 5:U[X]!="nl"&&(U[X-1].push(U[X]),this.$=U[X-1]);break;case 6:case 7:this.$=U[X];break;case 8:this.$="nl";break;case 12:this.$=U[X];break;case 13:let ht=U[X-1];ht.description=H.trimColon(U[X]),this.$=ht;break;case 14:this.$={stmt:"relation",state1:U[X-2],state2:U[X]};break;case 15:let it=H.trimColon(U[X]);this.$={stmt:"relation",state1:U[X-3],state2:U[X-1],description:it};break;case 19:this.$={stmt:"state",id:U[X-3],type:"default",description:"",doc:U[X-1]};break;case 20:var ut=U[X],ot=U[X-2].trim();if(U[X].match(":")){var mt=U[X].split(":");ut=mt[0],ot=[ot,mt[1]]}this.$={stmt:"state",id:ut,type:"default",description:ot};break;case 21:this.$={stmt:"state",id:U[X-3],type:"default",description:U[X-5],doc:U[X-1]};break;case 22:this.$={stmt:"state",id:U[X],type:"fork"};break;case 23:this.$={stmt:"state",id:U[X],type:"join"};break;case 24:this.$={stmt:"state",id:U[X],type:"choice"};break;case 25:this.$={stmt:"state",id:H.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:U[X-1].trim(),note:{position:U[X-2].trim(),text:U[X].trim()}};break;case 29:this.$=U[X].trim(),H.setAccTitle(this.$);break;case 30:case 31:this.$=U[X].trim(),H.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:U[X-3],url:U[X-2],tooltip:U[X-1]};break;case 33:this.$={stmt:"click",id:U[X-3],url:U[X-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:U[X-1].trim(),classes:U[X].trim()};break;case 36:this.$={stmt:"style",id:U[X-1].trim(),styleClass:U[X].trim()};break;case 37:this.$={stmt:"applyClass",id:U[X-1].trim(),styleClass:U[X].trim()};break;case 38:H.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:H.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:H.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:H.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:U[X].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:U[X-2].trim(),classes:[U[X].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:U[X-2].trim(),classes:[U[X].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:d,24:f,25:p,26:m,27:g,28:y,29:x,32:25,33:k,35:T,37:C,38:_,41:S,45:w,48:A,51:v,52:M,53:$,54:I,57:F},e(B,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:d,24:f,25:p,26:m,27:g,28:y,29:x,32:25,33:k,35:T,37:C,38:_,41:S,45:w,48:A,51:v,52:M,53:$,54:I,57:F},e(B,[2,7]),e(B,[2,8]),e(B,[2,9]),e(B,[2,10]),e(B,[2,11]),e(B,[2,12],{14:[1,40],15:[1,41]}),e(B,[2,16]),{18:[1,42]},e(B,[2,18],{20:[1,43]}),{23:[1,44]},e(B,[2,22]),e(B,[2,23]),e(B,[2,24]),e(B,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(B,[2,28]),{34:[1,49]},{36:[1,50]},e(B,[2,31]),{13:51,24:f,57:F},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(O,[2,44],{58:[1,56]}),e(O,[2,45],{58:[1,57]}),e(B,[2,38]),e(B,[2,39]),e(B,[2,40]),e(B,[2,41]),e(B,[2,6]),e(B,[2,13]),{13:58,24:f,57:F},e(B,[2,17]),e(R,n,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(B,[2,29]),e(B,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(B,[2,14],{14:[1,71]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,72],22:d,24:f,25:p,26:m,27:g,28:y,29:x,32:25,33:k,35:T,37:C,38:_,41:S,45:w,48:A,51:v,52:M,53:$,54:I,57:F},e(B,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(B,[2,34]),e(B,[2,35]),e(B,[2,36]),e(B,[2,37]),e(O,[2,46]),e(O,[2,47]),e(B,[2,15]),e(B,[2,19]),e(R,n,{7:78}),e(B,[2,26]),e(B,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,81],22:d,24:f,25:p,26:m,27:g,28:y,29:x,32:25,33:k,35:T,37:C,38:_,41:S,45:w,48:A,51:v,52:M,53:$,54:I,57:F},e(B,[2,32]),e(B,[2,33]),e(B,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:s(function(V,L){if(L.recoverable)this.trace(V);else{var q=new Error(V);throw q.hash=L,q}},"parseError"),parse:s(function(V){var L=this,q=[0],H=[],K=[null],U=[],st=this.table,X="",ut=0,ot=0,mt=0,ht=2,it=1,Ot=U.slice.call(arguments,1),St=Object.create(this.lexer),yt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(yt.yy[Et]=this.yy[Et]);St.setInput(V,yt.yy),yt.yy.lexer=St,yt.yy.parser=this,typeof St.yylloc>"u"&&(St.yylloc={});var Ct=St.yylloc;U.push(Ct);var Bt=St.options&&St.options.ranges;typeof yt.yy.parseError=="function"?this.parseError=yt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Lt(Y){q.length=q.length-2*Y,K.length=K.length-Y,U.length=U.length-Y}s(Lt,"popStack");function ee(){var Y;return Y=H.pop()||St.lex()||it,typeof Y!="number"&&(Y instanceof Array&&(H=Y,Y=H.pop()),Y=L.symbols_[Y]||Y),Y}s(ee,"lex");for(var at,$e,pt,Wt,Ht,Dt,bt={},Gt,G,nt,W;;){if(pt=q[q.length-1],this.defaultActions[pt]?Wt=this.defaultActions[pt]:((at===null||typeof at>"u")&&(at=ee()),Wt=st[pt]&&st[pt][at]),typeof Wt>"u"||!Wt.length||!Wt[0]){var Rt="";W=[];for(Gt in st[pt])this.terminals_[Gt]&&Gt>ht&&W.push("'"+this.terminals_[Gt]+"'");St.showPosition?Rt="Parse error on line "+(ut+1)+`: +`+St.showPosition()+` +Expecting `+W.join(", ")+", got '"+(this.terminals_[at]||at)+"'":Rt="Parse error on line "+(ut+1)+": Unexpected "+(at==it?"end of input":"'"+(this.terminals_[at]||at)+"'"),this.parseError(Rt,{text:St.match,token:this.terminals_[at]||at,line:St.yylineno,loc:Ct,expected:W})}if(Wt[0]instanceof Array&&Wt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+at);switch(Wt[0]){case 1:q.push(at),K.push(St.yytext),U.push(St.yylloc),q.push(Wt[1]),at=null,$e?(at=$e,$e=null):(ot=St.yyleng,X=St.yytext,ut=St.yylineno,Ct=St.yylloc,mt>0&&mt--);break;case 2:if(G=this.productions_[Wt[1]][1],bt.$=K[K.length-G],bt._$={first_line:U[U.length-(G||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-(G||1)].first_column,last_column:U[U.length-1].last_column},Bt&&(bt._$.range=[U[U.length-(G||1)].range[0],U[U.length-1].range[1]]),Dt=this.performAction.apply(bt,[X,ot,ut,yt.yy,Wt[1],K,U].concat(Ot)),typeof Dt<"u")return Dt;G&&(q=q.slice(0,-1*G*2),K=K.slice(0,-1*G),U=U.slice(0,-1*G)),q.push(this.productions_[Wt[1]][0]),K.push(bt.$),U.push(bt._$),nt=st[q[q.length-2]][q[q.length-1]],q.push(nt);break;case 3:return!0}}return!0},"parse")},P=(function(){var D={EOF:1,parseError:s(function(L,q){if(this.yy.parser)this.yy.parser.parseError(L,q);else throw new Error(L)},"parseError"),setInput:s(function(V,L){return this.yy=L||this.yy||{},this._input=V,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var V=this._input[0];this.yytext+=V,this.yyleng++,this.offset++,this.match+=V,this.matched+=V;var L=V.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),V},"input"),unput:s(function(V){var L=V.length,q=V.split(/(?:\r\n?|\n)/g);this._input=V+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var H=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),q.length-1&&(this.yylineno-=q.length-1);var K=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:q?(q.length===H.length?this.yylloc.first_column:0)+H[H.length-q.length].length-q[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[K[0],K[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(V){this.unput(this.match.slice(V))},"less"),pastInput:s(function(){var V=this.matched.substr(0,this.matched.length-this.match.length);return(V.length>20?"...":"")+V.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var V=this.match;return V.length<20&&(V+=this._input.substr(0,20-V.length)),(V.substr(0,20)+(V.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var V=this.pastInput(),L=new Array(V.length+1).join("-");return V+this.upcomingInput()+` +`+L+"^"},"showPosition"),test_match:s(function(V,L){var q,H,K;if(this.options.backtrack_lexer&&(K={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(K.yylloc.range=this.yylloc.range.slice(0))),H=V[0].match(/(?:\r\n?|\n).*/g),H&&(this.yylineno+=H.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:H?H[H.length-1].length-H[H.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+V[0].length},this.yytext+=V[0],this.match+=V[0],this.matches=V,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(V[0].length),this.matched+=V[0],q=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),q)return q;if(this._backtrack){for(var U in K)this[U]=K[U];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var V,L,q,H;this._more||(this.yytext="",this.match="");for(var K=this._currentRules(),U=0;UL[0].length)){if(L=q,H=U,this.options.backtrack_lexer){if(V=this.test_match(q,K[U]),V!==!1)return V;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(V=this.test_match(L,K[H]),V!==!1?V:!1):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:s(function(){var L=this.next();return L||this.lex()},"lex"),begin:s(function(L){this.conditionStack.push(L)},"begin"),popState:s(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:s(function(L){this.begin(L)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(L,q,H,K){var U=K;switch(H){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState("SCALE"),17;break;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;break;case 19:return this.popState(),"acc_title_value";break;case 20:return this.begin("acc_descr"),35;break;case 21:return this.popState(),"acc_descr_value";break;case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;break;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 27:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 28:return this.popState(),43;break;case 29:return this.pushState("CLASS"),48;break;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 31:return this.popState(),50;break;case 32:return this.pushState("STYLE"),45;break;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 34:return this.popState(),47;break;case 35:return this.pushState("SCALE"),17;break;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),q.yytext=q.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),q.yytext=q.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),q.yytext=q.yytext.slice(0,-10).trim(),27;break;case 42:return this.popState(),q.yytext=q.yytext.slice(0,-8).trim(),25;break;case 43:return this.popState(),q.yytext=q.yytext.slice(0,-8).trim(),26;break;case 44:return this.popState(),q.yytext=q.yytext.slice(0,-10).trim(),27;break;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";break;case 51:return this.popState(),"ID";break;case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;break;case 57:break;case 58:return this.popState(),21;break;case 59:break;case 60:return this.begin("NOTE"),29;break;case 61:return this.popState(),this.pushState("NOTE_ID"),59;break;case 62:return this.popState(),this.pushState("NOTE_ID"),60;break;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";break;case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 69:return this.popState(),q.yytext=q.yytext.substr(2).trim(),31;break;case 70:return this.popState(),q.yytext=q.yytext.slice(0,-8).trim(),31;break;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return q.yytext=q.yytext.trim(),14;break;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78,79],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};return D})();N.lexer=P;function E(){this.yy={}}return s(E,"Parser"),E.prototype=N,N.Parser=E,new E})();D8.parser=D8;cv=D8});var Ph,ip,r2,jft,Uft,Hft,np,uv,N8,O8,M8,B8,hv,dv,Yft,Xft,P8,$8,Kft,Qft,ky,kzt,Zft,F8,Tzt,Czt,Jft,tpt,Szt,ept,wzt,rpt,V8,z8,ipt,fv,npt,G8,pv=b(()=>{"use strict";Ph="state",ip="root",r2="relation",jft="classDef",Uft="style",Hft="applyClass",np="default",uv="divider",N8="fill:none",O8="fill: #333",M8="markdown",B8="normal",hv="rect",dv="rectWithTitle",Yft="stateStart",Xft="stateEnd",P8="divider",$8="roundedWithTitle",Kft="note",Qft="noteGroup",ky="statediagram",kzt="state",Zft=`${ky}-${kzt}`,F8="transition",Tzt="note",Czt="note-edge",Jft=`${F8} ${Czt}`,tpt=`${ky}-${Tzt}`,Szt="cluster",ept=`${ky}-${Szt}`,wzt="cluster-alt",rpt=`${ky}-${wzt}`,V8="parent",z8="note",ipt="state",fv="----",npt=`${fv}${z8}`,G8=`${fv}${V8}`});function W8(e="",t=0,r="",i=fv){let n=r!==null&&r.length>0?`${i}${r}`:"";return`${ipt}-${e}${n}-${t}`}function mv(e,t,r){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(n=>{let a=r.get(n);a&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...a.styles])}));let i=e.find(n=>n.id===t.id);i?Object.assign(i,t):e.push(t)}function Ezt(e){return e?.classes?.join(" ")??""}function vzt(e){return e?.styles??[]}var gv,$h,_zt,spt,Ty,opt,lpt=b(()=>{"use strict";ye();Jt();fr();pv();gv=new Map,$h=0;s(W8,"stateDomId");_zt=s((e,t,r,i,n,a,o,l)=>{z.trace("items",t),t.forEach(u=>{switch(u.stmt){case Ph:Ty(e,u,r,i,n,a,o,l);break;case np:Ty(e,u,r,i,n,a,o,l);break;case r2:{Ty(e,u.state1,r,i,n,a,o,l),Ty(e,u.state2,r,i,n,a,o,l);let h=o==="neo",d={id:"edge"+$h,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:h?"arrow_barb_neo":"arrow_barb",style:N8,labelStyle:"",label:qt.sanitizeText(u.description??"",Q()),arrowheadStyle:O8,labelpos:"c",labelType:M8,thickness:B8,classes:F8,look:o};n.push(d),$h++}break}})},"setupDoc"),spt=s((e,t="TB")=>{let r=t;if(e.doc)for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir");s(mv,"insertOrUpdateNode");s(Ezt,"getClassesFromDbInfo");s(vzt,"getStylesFromDbInfo");Ty=s((e,t,r,i,n,a,o,l)=>{let u=t.id,h=r.get(u),d=Ezt(h),f=vzt(h),p=Q();if(z.info("dataFetcher parsedItem",t,h,f),u!=="root"){let m=hv;t.start===!0?m=Yft:t.start===!1&&(m=Xft),t.type!==np&&(m=t.type),gv.get(u)||gv.set(u,{id:u,shape:m,description:qt.sanitizeText(u,p),cssClasses:`${d} ${Zft}`,cssStyles:f});let g=gv.get(u);t.description&&(Array.isArray(g.description)?(g.shape=dv,g.description.push(t.description)):g.description?.length&&g.description.length>0?(g.shape=dv,g.description===u?g.description=[t.description]:g.description=[g.description,t.description]):(g.shape=hv,g.description=t.description),g.description=qt.sanitizeTextOrArray(g.description,p)),g.description?.length===1&&g.shape===dv&&(g.type==="group"?g.shape=$8:g.shape=hv),!g.type&&t.doc&&(z.info("Setting cluster for XCX",u,spt(t)),g.type="group",g.isGroup=!0,g.dir=spt(t),g.shape=t.type===uv?P8:$8,g.cssClasses=`${g.cssClasses} ${ept} ${a?rpt:""}`);let y={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:u,dir:g.dir,domId:W8(u,$h),type:g.type,isGroup:g.type==="group",padding:8,rx:10,ry:10,look:o,labelType:"markdown"};if(y.shape===P8&&(y.label=""),e&&e.id!=="root"&&(z.trace("Setting node ",u," to be child of its parent ",e.id),y.parentId=e.id),y.centerLabel=!0,t.note){let x={labelStyle:"",shape:Kft,label:t.note.text,labelType:"markdown",cssClasses:tpt,cssStyles:[],cssCompiledStyles:[],id:u+npt+"-"+$h,domId:W8(u,$h,z8),type:g.type,isGroup:g.type==="group",padding:p.flowchart?.padding,look:o,position:t.note.position},k=u+G8,T={labelStyle:"",shape:Qft,label:t.note.text,cssClasses:g.cssClasses,cssStyles:[],id:u+G8,domId:W8(u,$h,V8),type:"group",isGroup:!0,padding:16,look:o,position:t.note.position};$h++,T.id=k,x.parentId=k,mv(i,T,l),mv(i,x,l),mv(i,y,l);let C=u,_=x.id;t.note.position==="left of"&&(C=x.id,_=u),n.push({id:C+"-"+_,start:C,end:_,arrowhead:"none",arrowTypeEnd:"",style:N8,labelStyle:"",classes:Jft,arrowheadStyle:O8,labelpos:"c",labelType:M8,thickness:B8,look:o})}else mv(i,y,l)}t.doc&&(z.trace("Adding nodes children "),_zt(t,t.doc,r,i,n,!a,o,l))},"dataFetcher"),opt=s(()=>{gv.clear(),$h=0},"reset")});var j8,Azt,Rzt,cpt,U8=b(()=>{"use strict";ye();Jt();bm();Yd();Xd();Re();pv();j8=s((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir"),Azt=s(function(e,t){return t.db.getClasses()},"getClasses"),Rzt=s(async function(e,t,r,i){z.info("REF0:"),z.info("Drawing state diagram (v2)",t);let{securityLevel:n,state:a,layout:o}=Q();i.db.extract(i.db.getRootDocV2());let l=i.db.getData(),u=vl(t,n);l.type=i.type,l.layoutAlgorithm=o,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,Q().look==="neo"?l.markers=["barbNeo"]:l.markers=["barb"],l.diagramId=t,await Bl(l,u);let d=8;try{(typeof i.db.getLinks=="function"?i.db.getLinks():new Map).forEach((p,m)=>{let g=typeof m=="string"?m:typeof m?.id=="string"?m.id:"";if(!g){z.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(m));return}let y=u.node()?.querySelectorAll("g"),x;if(y?.forEach(_=>{_.textContent?.trim()===g&&(x=_)}),!x){z.warn("\u26A0\uFE0F Could not find node matching text:",g);return}let k=x.parentNode;if(!k){z.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",g);return}let T=document.createElementNS("http://www.w3.org/2000/svg","a"),C=p.url.replace(/^"+|"+$/g,"");if(T.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",C),T.setAttribute("target","_blank"),p.tooltip){let _=p.tooltip.replace(/^"+|"+$/g,"");T.setAttribute("title",_)}k.replaceChild(T,x),T.appendChild(x),z.info("\u{1F517} Wrapped node in
    tag for:",g,p.url)})}catch(f){z.error("\u274C Error injecting clickable links:",f)}Te.insertTitle(u,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),ro(u,d,ky,a?.useMaxWidth??!0)},"draw"),cpt={getClasses:Azt,draw:Rzt,getDir:j8}});var Os,hpt,dpt,yv,po,xv=b(()=>{"use strict";ye();Jt();Re();fr();yi();lpt();U8();pv();Os={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},hpt=s(()=>new Map,"newClassesList"),dpt=s(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),yv=s(e=>JSON.parse(JSON.stringify(e)),"clone"),po=class{constructor(t){this.version=t;this.nodes=[];this.edges=[];this.rootDoc=[];this.classes=hpt();this.documents={root:dpt()};this.currentDocument=this.documents.root;this.startEndCount=0;this.dividerCnt=0;this.links=new Map;this.getAccTitle=Ze;this.setAccTitle=Ye;this.getAccDescription=tr;this.setAccDescription=Je;this.setDiagramTitle=sr;this.getDiagramTitle=er;this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{s(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let n of Array.isArray(t)?t:t.doc)switch(n.stmt){case Ph:this.addState(n.id.trim(),n.type,n.doc,n.description,n.note);break;case r2:this.addRelation(n.state1,n.state2,n.description);break;case jft:this.addStyleClass(n.id.trim(),n.classes);break;case Uft:this.handleStyleDef(n);break;case Hft:this.setCssClass(n.id.trim(),n.styleClass);break;case"click":this.addLink(n.id,n.url,n.tooltip);break}let r=this.getStates(),i=Q();opt(),Ty(void 0,this.getRootDocV2(),r,this.nodes,this.edges,!0,i.look,this.classes);for(let n of this.nodes)if(Array.isArray(n.label)){if(n.description=n.label.slice(1),n.isGroup&&n.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${n.id}]`);n.label=n.label[0]}}handleStyleDef(t){let r=t.id.trim().split(","),i=t.styleClass.split(",");for(let n of r){let a=this.getState(n);if(!a){let o=n.trim();this.addState(o),a=this.getState(o)}a&&(a.styles=i.map(o=>o.replace(/;/g,"")?.trim()))}}setRootDoc(t){z.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,r,i){if(r.stmt===r2){this.docTranslator(t,r.state1,!0),this.docTranslator(t,r.state2,!1);return}if(r.stmt===Ph&&(r.id===Os.START_NODE?(r.id=t.id+(i?"_start":"_end"),r.start=i):r.id=r.id.trim()),r.stmt!==ip&&r.stmt!==Ph||!r.doc)return;let n=[],a=[];for(let o of r.doc)if(o.type===uv){let l=yv(o);l.doc=yv(a),n.push(l),a=[]}else a.push(o);if(n.length>0&&a.length>0){let o={stmt:Ph,id:oL(),type:"divider",doc:yv(a)};n.push(yv(o)),r.doc=n}r.doc.forEach(o=>this.docTranslator(r,o,!0))}getRootDocV2(){return this.docTranslator({id:ip,stmt:ip},{id:ip,stmt:ip,doc:this.rootDoc},!0),{id:ip,doc:this.rootDoc}}addState(t,r=np,i=void 0,n=void 0,a=void 0,o=void 0,l=void 0,u=void 0){let h=t?.trim();if(!this.currentDocument.states.has(h))z.info("Adding state ",h,n),this.currentDocument.states.set(h,{stmt:Ph,id:h,descriptions:[],type:r,doc:i,note:a,classes:[],styles:[],textStyles:[]});else{let d=this.currentDocument.states.get(h);if(!d)throw new Error(`State not found: ${h}`);d.doc||(d.doc=i),d.type||(d.type=r)}if(n&&(z.info("Setting state description",h,n),(Array.isArray(n)?n:[n]).forEach(f=>this.addDescription(h,f.trim()))),a){let d=this.currentDocument.states.get(h);if(!d)throw new Error(`State not found: ${h}`);d.note=a,d.note.text=qt.sanitizeText(d.note.text,Q())}o&&(z.info("Setting state classes",h,o),(Array.isArray(o)?o:[o]).forEach(f=>this.setCssClass(h,f.trim()))),l&&(z.info("Setting state styles",h,l),(Array.isArray(l)?l:[l]).forEach(f=>this.setStyle(h,f.trim()))),u&&(z.info("Setting state styles",h,l),(Array.isArray(u)?u:[u]).forEach(f=>this.setTextStyle(h,f.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:dpt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=hpt(),t||(this.links=new Map,He())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){z.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,r,i){this.links.set(t,{url:r,tooltip:i}),z.warn("Adding link",t,r,i)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===Os.START_NODE?(this.startEndCount++,`${Os.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",r=np){return t===Os.START_NODE?Os.START_TYPE:r}endIdIfNeeded(t=""){return t===Os.END_NODE?(this.startEndCount++,`${Os.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",r=np){return t===Os.END_NODE?Os.END_TYPE:r}addRelationObjs(t,r,i=""){let n=this.startIdIfNeeded(t.id.trim()),a=this.startTypeIfNeeded(t.id.trim(),t.type),o=this.startIdIfNeeded(r.id.trim()),l=this.startTypeIfNeeded(r.id.trim(),r.type);this.addState(n,a,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(o,l,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles),this.currentDocument.relations.push({id1:n,id2:o,relationTitle:qt.sanitizeText(i,Q())})}addRelation(t,r,i){if(typeof t=="object"&&typeof r=="object")this.addRelationObjs(t,r,i);else if(typeof t=="string"&&typeof r=="string"){let n=this.startIdIfNeeded(t.trim()),a=this.startTypeIfNeeded(t),o=this.endIdIfNeeded(r.trim()),l=this.endTypeIfNeeded(r);this.addState(n,a),this.addState(o,l),this.currentDocument.relations.push({id1:n,id2:o,relationTitle:i?qt.sanitizeText(i,Q()):void 0})}}addDescription(t,r){let i=this.currentDocument.states.get(t),n=r.startsWith(":")?r.replace(":","").trim():r;i?.descriptions?.push(qt.sanitizeText(n,Q()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,r=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let i=this.classes.get(t);r&&i&&r.split(Os.STYLECLASS_SEP).forEach(n=>{let a=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Os.COLOR_KEYWORD).exec(n)){let l=a.replace(Os.FILL_KEYWORD,Os.BG_FILL).replace(Os.COLOR_KEYWORD,Os.FILL_KEYWORD);i.textStyles.push(l)}i.styles.push(a)})}getClasses(){return this.classes}setCssClass(t,r){t.split(",").forEach(i=>{let n=this.getState(i);if(!n){let a=i.trim();this.addState(a),n=this.getState(a)}n?.classes?.push(r)})}setStyle(t,r){this.getState(t)?.styles?.push(r)}setTextStyle(t,r){this.getState(t)?.textStyles?.push(r)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt==="dir")}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let r=this.getDirectionStatement();r?r.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=Q();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:j8(this.getRootDocV2())}}getConfig(){return Q().state}}});var Dzt,bv,H8=b(()=>{"use strict";Dzt=s(e=>` +defs [id$="-barbEnd"] { + fill: ${e.transitionColor}; + stroke: ${e.transitionColor}; + } +g.stateGroup text { + fill: ${e.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${e.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${e.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.stateGroup line { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth||1}; +} + +.transition { + stroke: ${e.transitionColor}; + stroke-width: ${e.strokeWidth||1}; + fill: none; +} + +.stateGroup .composit { + fill: ${e.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + + text { + fill: ${e.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${e.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${e.transitionLabelColor||e.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${e.transitionLabelColor||e.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${e.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node .fork-join { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node circle.state-end { + fill: ${e.innerEndBackground}; + stroke: ${e.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${e.compositeBackground||e.background}; + // stroke: ${e.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${e.stateBkg||e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth||1}px; +} +.node polygon { + fill: ${e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder};; + stroke-width: ${e.strokeWidth||1}px; +} +[id$="-barbEnd"] { + fill: ${e.lineColor}; +} + +.statediagram-cluster rect { + fill: ${e.compositeTitleBackground}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth||1}px; +} + +.cluster-label, .nodeLabel { + color: ${e.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${e.stateBorder||e.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${e.compositeBackground||e.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${e.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${e.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${e.noteTextColor}; +} + +[id$="-dependencyStart"], [id$="-dependencyEnd"] { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth||1}; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + +[data-look="neo"].statediagram-cluster rect { + fill: ${e.mainBkg}; + stroke: ${e.useGradient?"url("+e.svgId+"-gradient)":e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}; +} +[data-look="neo"].statediagram-cluster rect.outer { + rx: ${e.radius}px; + ry: ${e.radius}px; + filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${e.svgId}-drop-shadow)`):"none"} +} +`,"getStyles"),bv=Dzt});var Izt,Nzt,Ozt,Mzt,ppt,Bzt,Pzt,$zt,Fzt,Y8,fpt,mpt,gpt=b(()=>{"use strict";lr();xv();Re();fr();ye();Jt();Izt=s(e=>e.append("circle").attr("class","start-state").attr("r",Q().state.sizeUnit).attr("cx",Q().state.padding+Q().state.sizeUnit).attr("cy",Q().state.padding+Q().state.sizeUnit),"drawStartState"),Nzt=s(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Q().state.textHeight).attr("class","divider").attr("x2",Q().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Ozt=s((e,t)=>{let r=e.append("text").attr("x",2*Q().state.padding).attr("y",Q().state.textHeight+2*Q().state.padding).attr("font-size",Q().state.fontSize).attr("class","state-title").text(t.id),i=r.node().getBBox();return e.insert("rect",":first-child").attr("x",Q().state.padding).attr("y",Q().state.padding).attr("width",i.width+2*Q().state.padding).attr("height",i.height+2*Q().state.padding).attr("rx",Q().state.radius),r},"drawSimpleState"),Mzt=s((e,t)=>{let r=s(function(p,m,g){let y=p.append("tspan").attr("x",2*Q().state.padding).text(m);g||y.attr("dy",Q().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*Q().state.padding).attr("y",Q().state.textHeight+1.3*Q().state.padding).attr("font-size",Q().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),a=n.height,o=e.append("text").attr("x",Q().state.padding).attr("y",a+Q().state.padding*.4+Q().state.dividerMargin+Q().state.textHeight).attr("class","state-description"),l=!0,u=!0;t.descriptions.forEach(function(p){l||(r(o,p,u),u=!1),l=!1});let h=e.append("line").attr("x1",Q().state.padding).attr("y1",Q().state.padding+a+Q().state.dividerMargin/2).attr("y2",Q().state.padding+a+Q().state.dividerMargin/2).attr("class","descr-divider"),d=o.node().getBBox(),f=Math.max(d.width,n.width);return h.attr("x2",f+3*Q().state.padding),e.insert("rect",":first-child").attr("x",Q().state.padding).attr("y",Q().state.padding).attr("width",f+2*Q().state.padding).attr("height",d.height+a+2*Q().state.padding).attr("rx",Q().state.radius),e},"drawDescrState"),ppt=s((e,t,r)=>{let i=Q().state.padding,n=2*Q().state.padding,a=e.node().getBBox(),o=a.width,l=a.x,u=e.append("text").attr("x",0).attr("y",Q().state.titleShift).attr("font-size",Q().state.fontSize).attr("class","state-title").text(t.id),d=u.node().getBBox().width+n,f=Math.max(d,o);f===o&&(f=f+n);let p,m=e.node().getBBox();t.doc,p=l-i,d>o&&(p=(o-f)/2+i),Math.abs(l-m.x)o&&(p=l-(d-o)/2);let g=1-Q().state.textHeight;return e.insert("rect",":first-child").attr("x",p).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",m.height+Q().state.textHeight+Q().state.titleShift+1).attr("rx","0"),u.attr("x",p+i),d<=o&&u.attr("x",l+(f-n)/2-d/2+i),e.insert("rect",":first-child").attr("x",p).attr("y",Q().state.titleShift-Q().state.textHeight-Q().state.padding).attr("width",f).attr("height",Q().state.textHeight*3).attr("rx",Q().state.radius),e.insert("rect",":first-child").attr("x",p).attr("y",Q().state.titleShift-Q().state.textHeight-Q().state.padding).attr("width",f).attr("height",m.height+3+2*Q().state.textHeight).attr("rx",Q().state.radius),e},"addTitleAndBox"),Bzt=s(e=>(e.append("circle").attr("class","end-state-outer").attr("r",Q().state.sizeUnit+Q().state.miniPadding).attr("cx",Q().state.padding+Q().state.sizeUnit+Q().state.miniPadding).attr("cy",Q().state.padding+Q().state.sizeUnit+Q().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",Q().state.sizeUnit).attr("cx",Q().state.padding+Q().state.sizeUnit+2).attr("cy",Q().state.padding+Q().state.sizeUnit+2)),"drawEndState"),Pzt=s((e,t)=>{let r=Q().state.forkWidth,i=Q().state.forkHeight;if(t.parentId){let n=r;r=i,i=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",Q().state.padding).attr("y",Q().state.padding)},"drawForkJoinState"),$zt=s((e,t,r,i)=>{let n=0,a=i.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=e.replace(/\r\n/g,"
    ");o=o.replace(/\n/g,"
    ");let l=o.split(qt.lineBreakRegex),u=1.25*Q().state.noteMargin;for(let h of l){let d=h.trim();if(d.length>0){let f=a.append("tspan");if(f.text(d),u===0){let p=f.node().getBBox();u+=p.height}n+=u,f.attr("x",t+Q().state.noteMargin),f.attr("y",r+n+1.25*Q().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),Fzt=s((e,t)=>{t.attr("class","state-note");let r=t.append("rect").attr("x",0).attr("y",Q().state.padding),i=t.append("g"),{textWidth:n,textHeight:a}=$zt(e,0,0,i);return r.attr("height",a+2*Q().state.noteMargin),r.attr("width",n+Q().state.noteMargin*2),r},"drawNote"),Y8=s(function(e,t){let r=t.id,i={id:r,label:t.id,width:0,height:0},n=e.append("g").attr("id",r).attr("class","stateGroup");t.type==="start"&&Izt(n),t.type==="end"&&Bzt(n),(t.type==="fork"||t.type==="join")&&Pzt(n,t),t.type==="note"&&Fzt(t.note.text,n),t.type==="divider"&&Nzt(n),t.type==="default"&&t.descriptions.length===0&&Ozt(n,t),t.type==="default"&&t.descriptions.length>0&&Mzt(n,t);let a=n.node().getBBox();return i.width=a.width+2*Q().state.padding,i.height=a.height+2*Q().state.padding,i},"drawState"),fpt=0,mpt=s(function(e,t,r){let i=s(function(u){switch(u){case po.relationType.AGGREGATION:return"aggregation";case po.relationType.EXTENSION:return"extension";case po.relationType.COMPOSITION:return"composition";case po.relationType.DEPENDENCY:return"dependency"}},"getRelationType");t.points=t.points.filter(u=>!Number.isNaN(u.y));let n=t.points,a=No().x(function(u){return u.x}).y(function(u){return u.y}).curve(Oo),o=e.append("path").attr("d",a(n)).attr("id","edge"+fpt).attr("class","transition"),l="";if(Q().state.arrowMarkerAbsolute&&(l=Kh(!0)),o.attr("marker-end","url("+l+"#"+i(po.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let u=e.append("g").attr("class","stateLabel"),{x:h,y:d}=Te.calcLabelPosition(t.points),f=qt.getRows(r.title),p=0,m=[],g=0,y=0;for(let T=0;T<=f.length;T++){let C=u.append("text").attr("text-anchor","middle").text(f[T]).attr("x",h).attr("y",d+p),_=C.node().getBBox();g=Math.max(g,_.width),y=Math.min(y,_.x),z.info(_.x,h,d+p),p===0&&(p=C.node().getBBox().height,z.info("Title height",p,d)),m.push(C)}let x=p*f.length;if(f.length>1){let T=(f.length-1)*p*.5;m.forEach((C,_)=>C.attr("y",d+_*p-T)),x=p*f.length}let k=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",h-g/2-Q().state.padding/2).attr("y",d-x/2-Q().state.padding/2-3.5).attr("width",g+Q().state.padding).attr("height",x+Q().state.padding),z.info(k)}fpt++},"drawEdge")});var Ia,X8,Vzt,zzt,Gzt,Wzt,ypt,xpt,bpt=b(()=>{"use strict";lr();O6();to();Jt();fr();gpt();ye();gi();X8={},Vzt=s(function(){},"setConf"),zzt=s(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),Gzt=s(function(e,t,r,i){Ia=Q().state;let n=Q().securityLevel,a;n==="sandbox"&&(a=vt("#i"+t));let o=n==="sandbox"?vt(a.nodes()[0].contentDocument.body):vt("body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;z.debug("Rendering diagram "+e);let u=o.select(`[id='${t}']`);zzt(u);let h=i.db.getRootDoc(),d=u.append("g").attr("id",t+"-root");ypt(h,d,void 0,!1,o,l,i);let f=Ia.padding,p=u.node().getBBox(),m=p.width+f*2,g=p.height+f*2,y=m*1.75;pr(u,g,y,Ia.useMaxWidth),u.attr("viewBox",`${p.x-Ia.padding} ${p.y-Ia.padding} `+m+" "+g)},"draw"),Wzt=s(e=>e?e.length*Ia.fontSizeFactor:1,"getLabelWidth"),ypt=s((e,t,r,i,n,a,o)=>{let l=new Ur({compound:!0,multigraph:!0}),u,h=!0;for(u=0;u{let S=_.parentElement,w=0,A=0;S&&(S.parentElement&&(w=S.parentElement.getBBox().width),A=parseInt(S.getAttribute("data-x-shift"),10),Number.isNaN(A)&&(A=0)),_.setAttribute("x1",0-A+8),_.setAttribute("x2",w-A-8)})):z.debug("No Node "+T+": "+JSON.stringify(l.node(T)))});let x=y.getBBox();l.edges().forEach(function(T){T!==void 0&&l.edge(T)!==void 0&&(z.debug("Edge "+T.v+" -> "+T.w+": "+JSON.stringify(l.edge(T))),mpt(t,l.edge(T),l.edge(T).relation))}),x=y.getBBox();let k={id:r||"root",label:r||"root",width:0,height:0};return k.width=x.width+2*Ia.padding,k.height=x.height+2*Ia.padding,z.debug("Doc rendered",k,l),k},"renderDoc"),xpt={setConf:Vzt,draw:Gzt}});var kpt={};Fe(kpt,{diagram:()=>qzt});var qzt,Tpt=b(()=>{"use strict";I8();xv();H8();bpt();qzt={parser:cv,get db(){return new po(1)},renderer:xpt,styles:bv,init:s(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var wpt={};Fe(wpt,{diagram:()=>Yzt});var Yzt,_pt=b(()=>{"use strict";I8();xv();H8();U8();Yzt={parser:cv,get db(){return new po(2)},renderer:cpt,styles:bv,init:s(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var K8,Apt,Rpt=b(()=>{"use strict";K8=(function(){var e=s(function(f,p,m,g){for(m=m||{},g=f.length;g--;m[f[g]]=p);return m},"o"),t=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],n=[1,11],a=[1,12],o=[1,13],l=[1,14],u={trace:s(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:s(function(p,m,g,y,x,k,T){var C=k.length-1;switch(x){case 1:return k[C-1];case 2:this.$=[];break;case 3:k[C-1].push(k[C]),this.$=k[C-1];break;case 4:case 5:this.$=k[C];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(k[C].substr(6)),this.$=k[C].substr(6);break;case 9:this.$=k[C].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=k[C].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(k[C].substr(8)),this.$=k[C].substr(8);break;case 13:y.addTask(k[C-1],k[C]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:n,16:a,17:o,18:l},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:r,12:i,14:n,16:a,17:o,18:l},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:s(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:s(function(p){var m=this,g=[0],y=[],x=[null],k=[],T=this.table,C="",_=0,S=0,w=0,A=2,v=1,M=k.slice.call(arguments,1),$=Object.create(this.lexer),I={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(I.yy[F]=this.yy[F]);$.setInput(p,I.yy),I.yy.lexer=$,I.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var B=$.yylloc;k.push(B);var O=$.options&&$.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(ot){g.length=g.length-2*ot,x.length=x.length-ot,k.length=k.length-ot}s(R,"popStack");function N(){var ot;return ot=y.pop()||$.lex()||v,typeof ot!="number"&&(ot instanceof Array&&(y=ot,ot=y.pop()),ot=m.symbols_[ot]||ot),ot}s(N,"lex");for(var P,E,D,V,L,q,H={},K,U,st,X;;){if(D=g[g.length-1],this.defaultActions[D]?V=this.defaultActions[D]:((P===null||typeof P>"u")&&(P=N()),V=T[D]&&T[D][P]),typeof V>"u"||!V.length||!V[0]){var ut="";X=[];for(K in T[D])this.terminals_[K]&&K>A&&X.push("'"+this.terminals_[K]+"'");$.showPosition?ut="Parse error on line "+(_+1)+`: +`+$.showPosition()+` +Expecting `+X.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ut="Parse error on line "+(_+1)+": Unexpected "+(P==v?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ut,{text:$.match,token:this.terminals_[P]||P,line:$.yylineno,loc:B,expected:X})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+P);switch(V[0]){case 1:g.push(P),x.push($.yytext),k.push($.yylloc),g.push(V[1]),P=null,E?(P=E,E=null):(S=$.yyleng,C=$.yytext,_=$.yylineno,B=$.yylloc,w>0&&w--);break;case 2:if(U=this.productions_[V[1]][1],H.$=x[x.length-U],H._$={first_line:k[k.length-(U||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(U||1)].first_column,last_column:k[k.length-1].last_column},O&&(H._$.range=[k[k.length-(U||1)].range[0],k[k.length-1].range[1]]),q=this.performAction.apply(H,[C,S,_,I.yy,V[1],x,k].concat(M)),typeof q<"u")return q;U&&(g=g.slice(0,-1*U*2),x=x.slice(0,-1*U),k=k.slice(0,-1*U)),g.push(this.productions_[V[1]][0]),x.push(H.$),k.push(H._$),st=T[g[g.length-2]][g[g.length-1]],g.push(st);break;case 3:return!0}}return!0},"parse")},h=(function(){var f={EOF:1,parseError:s(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m)},"parseError"),setInput:s(function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:s(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(p){this.unput(this.match.slice(p))},"less"),pastInput:s(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:s(function(p,m){var g,y,x;if(this.options.backtrack_lexer&&(x={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(x.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var k in x)this[k]=x[k];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,y;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),k=0;km[0].length)){if(m=g,y=k,this.options.backtrack_lexer){if(p=this.test_match(g,x[k]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,x[y]),p!==!1?p:!1):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:s(function(){var m=this.next();return m||this.lex()},"lex"),begin:s(function(m){this.conditionStack.push(m)},"begin"),popState:s(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:s(function(m){this.begin(m)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(m,g,y,x){var k=x;switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return f})();u.lexer=h;function d(){this.yy={}}return s(d,"Parser"),d.prototype=u,u.Parser=d,new d})();K8.parser=K8;Apt=K8});var Cy,Q8,i2,n2,Zzt,Jzt,tGt,eGt,rGt,iGt,nGt,Lpt,sGt,Z8,Dpt=b(()=>{"use strict";ye();yi();Cy="",Q8=[],i2=[],n2=[],Zzt=s(function(){Q8.length=0,i2.length=0,Cy="",n2.length=0,He()},"clear"),Jzt=s(function(e){Cy=e,Q8.push(e)},"addSection"),tGt=s(function(){return Q8},"getSections"),eGt=s(function(){let e=Lpt(),t=100,r=0;for(;!e&&r{r.people&&e.push(...r.people)}),[...new Set(e)].sort()},"updateActors"),iGt=s(function(e,t){let r=t.substr(1).split(":"),i=0,n=[];r.length===1?(i=Number(r[0]),n=[]):(i=Number(r[0]),n=r[1].split(","));let a=n.map(l=>l.trim()),o={section:Cy,type:Cy,people:a,task:e,score:i};n2.push(o)},"addTask"),nGt=s(function(e){let t={section:Cy,type:Cy,description:e,task:e,classes:[]};i2.push(t)},"addTaskOrg"),Lpt=s(function(){let e=s(function(r){return n2[r].processed},"compileTask"),t=!0;for(let[r,i]of n2.entries())e(r),t=t&&i.processed;return t},"compileTasks"),sGt=s(function(){return rGt()},"getActors"),Z8={getConfig:s(()=>Q().journey,"getConfig"),clear:Zzt,setDiagramTitle:sr,getDiagramTitle:er,setAccTitle:Ye,getAccTitle:Ze,setAccDescription:Je,getAccDescription:tr,addSection:Jzt,getSections:tGt,getTasks:eGt,addTask:iGt,addTaskOrg:nGt,getActors:sGt}});var aGt,Ipt,Npt=b(()=>{"use strict";Gm();aGt=s(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${e.textColor} + } + + .legend { + fill: ${e.textColor}; + font-family: ${e.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${e.textColor} + } + + .face { + ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${e.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${e.fillType0?`fill: ${e.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${e.fillType0?`fill: ${e.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${e.fillType0?`fill: ${e.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${e.fillType0?`fill: ${e.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${e.fillType0?`fill: ${e.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${e.fillType0?`fill: ${e.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${e.fillType0?`fill: ${e.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${e.fillType0?`fill: ${e.fillType7}`:""}; + } + + .actor-0 { + ${e.actor0?`fill: ${e.actor0}`:""}; + } + .actor-1 { + ${e.actor1?`fill: ${e.actor1}`:""}; + } + .actor-2 { + ${e.actor2?`fill: ${e.actor2}`:""}; + } + .actor-3 { + ${e.actor3?`fill: ${e.actor3}`:""}; + } + .actor-4 { + ${e.actor4?`fill: ${e.actor4}`:""}; + } + .actor-5 { + ${e.actor5?`fill: ${e.actor5}`:""}; + } + ${Pl()} +`,"getStyles"),Ipt=aGt});var t7,oGt,Opt,Mpt,lGt,cGt,J8,uGt,hGt,Bpt,dGt,Sy,Ppt=b(()=>{"use strict";lr();Td();t7=s(function(e,t){return kd(e,t)},"drawRect"),oGt=s(function(e,t){let i=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=e.append("g");n.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(u){let h=Io().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(a,"smile");function o(u){let h=Io().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(o,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(l,"ambivalent"),t.score>3?a(n):t.score<3?o(n):l(n),i},"drawFace"),Opt=s(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),Mpt=s(function(e,t){return Nq(e,t)},"drawText"),lGt=s(function(e,t){function r(n,a,o,l,u){return n+","+a+" "+(n+o)+","+a+" "+(n+o)+","+(a+l-u)+" "+(n+o-u*1.2)+","+(a+l)+" "+n+","+(a+l)}s(r,"genPoints");let i=e.append("polygon");i.attr("points",r(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,Mpt(e,t)},"drawLabel"),cGt=s(function(e,t,r){let i=e.append("g"),n=Fn();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,t7(i,n),Bpt(r)(t.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),J8=-1,uGt=s(function(e,t,r,i){let n=t.x+r.width/2,a=e.append("g");J8++,a.append("line").attr("id",i+"-task"+J8).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),oGt(a,{cx:n,cy:300+(5-t.score)*30,score:t.score});let l=Fn();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=r.width,l.height=r.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,t7(a,l);let u=t.x+14;t.people.forEach(h=>{let d=t.actors[h].color,f={cx:u,cy:t.y,r:7,fill:d,stroke:"#000",title:h,pos:t.actors[h].position};Opt(a,f),u+=10}),Bpt(r)(t.task,a,l.x,l.y,l.width,l.height,{class:"task"},r,t.colour)},"drawTask"),hGt=s(function(e,t){aT(e,t)},"drawBackgroundRect"),Bpt=(function(){function e(n,a,o,l,u,h,d,f){let p=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(p,d)}s(e,"byText");function t(n,a,o,l,u,h,d,f,p){let{taskFontSize:m,taskFontFamily:g}=f,y=n.split(//gi);for(let x=0;x{let a=ru[n].color,o={cx:20,cy:i,r:7,fill:a,stroke:"#000",pos:ru[n].position};Sy.drawCircle(e,o);let l=e.append("text").attr("visibility","hidden").text(n),u=l.node().getBoundingClientRect().width;l.remove();let h=[];if(u<=r)h=[n];else{let d=n.split(" "),f="";l=e.append("text").attr("visibility","hidden"),d.forEach(p=>{let m=f?`${f} ${p}`:p;if(l.text(m),l.node().getBoundingClientRect().width>r){if(f&&h.push(f),f=p,l.text(p),l.node().getBoundingClientRect().width>r){let y="";for(let x of p)y+=x,l.text(y+"-"),l.node().getBoundingClientRect().width>r&&(h.push(y.slice(0,-1)+"-"),y=x);f=y}}else f=m}),f&&h.push(f),l.remove()}h.forEach((d,f)=>{let p={x:40,y:i+7+f*20,fill:"#666",text:d,textMargin:t.boxTextMargin??5},g=Sy.drawText(e,p).node().getBoundingClientRect().width;g>kv&&g>t.leftMargin-g&&(kv=g)}),i+=Math.max(20,h.length*20)})}var fGt,ru,kv,el,Fh,mGt,mo,e7,$pt,gGt,r7,Fpt=b(()=>{"use strict";lr();Ppt();ye();gi();fGt=s(function(e){Object.keys(e).forEach(function(r){el[r]=e[r]})},"setConf"),ru={},kv=0;s(pGt,"drawActorLegend");el=Q().journey,Fh=0,mGt=s(function(e,t,r,i){let n=Q(),a=n.journey.titleColor,o=n.journey.titleFontSize,l=n.journey.titleFontFamily,u=n.securityLevel,h;u==="sandbox"&&(h=vt("#i"+t));let d=u==="sandbox"?vt(h.nodes()[0].contentDocument.body):vt("body");mo.init();let f=d.select("#"+t);Sy.initGraphics(f,t);let p=i.db.getTasks(),m=i.db.getDiagramTitle(),g=i.db.getActors();for(let _ in ru)delete ru[_];let y=0;g.forEach(_=>{ru[_]={color:el.actorColours[y%el.actorColours.length],position:y},y++}),pGt(f),Fh=el.leftMargin+kv,mo.insert(0,0,Fh,Object.keys(ru).length*50),gGt(f,p,0,t);let x=mo.getBounds();m&&f.append("text").text(m).attr("x",Fh).attr("font-size",o).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",l);let k=x.stopy-x.starty+2*el.diagramMarginY,T=Fh+x.stopx+2*el.diagramMarginX;pr(f,k,T,el.useMaxWidth),f.append("line").attr("x1",Fh).attr("y1",el.height*4).attr("x2",T-Fh-4).attr("y2",el.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+t+"-arrowhead)");let C=m?70:0;f.attr("viewBox",`${x.startx} -25 ${T} ${k+C}`),f.attr("preserveAspectRatio","xMinYMin meet"),f.attr("height",k+C+25)},"draw"),mo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(e,t,r,i){e[t]===void 0?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:s(function(e,t,r,i){let n=Q().journey,a=this,o=0;function l(u){return s(function(d){o++;let f=a.sequenceItems.length-o+1;a.updateVal(d,"starty",t-f*n.boxMargin,Math.min),a.updateVal(d,"stopy",i+f*n.boxMargin,Math.max),a.updateVal(mo.data,"startx",e-f*n.boxMargin,Math.min),a.updateVal(mo.data,"stopx",r+f*n.boxMargin,Math.max),u!=="activation"&&(a.updateVal(d,"startx",e-f*n.boxMargin,Math.min),a.updateVal(d,"stopx",r+f*n.boxMargin,Math.max),a.updateVal(mo.data,"starty",t-f*n.boxMargin,Math.min),a.updateVal(mo.data,"stopy",i+f*n.boxMargin,Math.max))},"updateItemBounds")}s(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:s(function(e,t,r,i){let n=Math.min(e,r),a=Math.max(e,r),o=Math.min(t,i),l=Math.max(t,i);this.updateVal(mo.data,"startx",n,Math.min),this.updateVal(mo.data,"starty",o,Math.min),this.updateVal(mo.data,"stopx",a,Math.max),this.updateVal(mo.data,"stopy",l,Math.max),this.updateBounds(n,o,a,l)},"insert"),bumpVerticalPos:s(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},e7=el.sectionFills,$pt=el.sectionColours,gGt=s(function(e,t,r,i){let n=Q().journey,a="",o=n.height*2+n.diagramMarginY,l=r+o,u=0,h="#CCC",d="black",f=0;for(let[p,m]of t.entries()){if(a!==m.section){h=e7[u%e7.length],f=u%e7.length,d=$pt[u%$pt.length];let y=0,x=m.section;for(let T=p;T(ru[x]&&(y[x]=ru[x]),y),{});m.x=p*n.taskMargin+p*n.width+Fh,m.y=l,m.width=n.diagramMarginX,m.height=n.diagramMarginY,m.colour=d,m.fill=h,m.num=f,m.actors=g,Sy.drawTask(e,m,n,i),mo.insert(m.x,m.y,m.x+m.width+n.taskMargin,450)}},"drawTasks"),r7={setConf:fGt,draw:mGt}});var Vpt={};Fe(Vpt,{diagram:()=>yGt});var yGt,zpt=b(()=>{"use strict";Rpt();Dpt();Npt();Fpt();yGt={parser:Apt,db:Z8,renderer:r7,styles:Ipt,init:s(e=>{r7.setConf(e.journey),Z8.clear()},"init")}});var n7,Upt,Hpt=b(()=>{"use strict";n7=(function(){var e=s(function(p,m,g,y){for(g=g||{},y=p.length;y--;g[p[y]]=m);return g},"o"),t=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],n=[1,14],a=[1,15],o=[1,16],l=[1,19],u=[1,20],h={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:s(function(m,g,y,x,k,T,C){var _=T.length-1;switch(k){case 1:return T[_-1];case 3:x.setDirection("LR");break;case 4:x.setDirection("TD");break;case 5:this.$=[];break;case 6:T[_-1].push(T[_]),this.$=T[_-1];break;case 7:case 8:this.$=T[_];break;case 9:case 10:this.$=[];break;case 11:x.getCommonDb().setDiagramTitle(T[_].substr(6)),this.$=T[_].substr(6);break;case 12:this.$=T[_].trim(),x.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=T[_].trim(),x.getCommonDb().setAccDescription(this.$);break;case 15:x.addSection(T[_].substr(8)),this.$=T[_].substr(8);break;case 18:x.addTask(T[_],0,""),this.$=T[_];break;case 19:x.addEvent(T[_].substr(2)),this.$=T[_];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:n,19:a,20:o,21:17,22:18,23:l,24:u},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:r,15:i,17:n,19:a,20:o,21:17,22:18,23:l,24:u},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:s(function(m,g){if(g.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=g,y}},"parseError"),parse:s(function(m){var g=this,y=[0],x=[],k=[null],T=[],C=this.table,_="",S=0,w=0,A=0,v=2,M=1,$=T.slice.call(arguments,1),I=Object.create(this.lexer),F={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(F.yy[B]=this.yy[B]);I.setInput(m,F.yy),F.yy.lexer=I,F.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var O=I.yylloc;T.push(O);var R=I.options&&I.options.ranges;typeof F.yy.parseError=="function"?this.parseError=F.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(mt){y.length=y.length-2*mt,k.length=k.length-mt,T.length=T.length-mt}s(N,"popStack");function P(){var mt;return mt=x.pop()||I.lex()||M,typeof mt!="number"&&(mt instanceof Array&&(x=mt,mt=x.pop()),mt=g.symbols_[mt]||mt),mt}s(P,"lex");for(var E,D,V,L,q,H,K={},U,st,X,ut;;){if(V=y[y.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((E===null||typeof E>"u")&&(E=P()),L=C[V]&&C[V][E]),typeof L>"u"||!L.length||!L[0]){var ot="";ut=[];for(U in C[V])this.terminals_[U]&&U>v&&ut.push("'"+this.terminals_[U]+"'");I.showPosition?ot="Parse error on line "+(S+1)+`: +`+I.showPosition()+` +Expecting `+ut.join(", ")+", got '"+(this.terminals_[E]||E)+"'":ot="Parse error on line "+(S+1)+": Unexpected "+(E==M?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(ot,{text:I.match,token:this.terminals_[E]||E,line:I.yylineno,loc:O,expected:ut})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+E);switch(L[0]){case 1:y.push(E),k.push(I.yytext),T.push(I.yylloc),y.push(L[1]),E=null,D?(E=D,D=null):(w=I.yyleng,_=I.yytext,S=I.yylineno,O=I.yylloc,A>0&&A--);break;case 2:if(st=this.productions_[L[1]][1],K.$=k[k.length-st],K._$={first_line:T[T.length-(st||1)].first_line,last_line:T[T.length-1].last_line,first_column:T[T.length-(st||1)].first_column,last_column:T[T.length-1].last_column},R&&(K._$.range=[T[T.length-(st||1)].range[0],T[T.length-1].range[1]]),H=this.performAction.apply(K,[_,w,S,F.yy,L[1],k,T].concat($)),typeof H<"u")return H;st&&(y=y.slice(0,-1*st*2),k=k.slice(0,-1*st),T=T.slice(0,-1*st)),y.push(this.productions_[L[1]][0]),k.push(K.$),T.push(K._$),X=C[y[y.length-2]][y[y.length-1]],y.push(X);break;case 3:return!0}}return!0},"parse")},d=(function(){var p={EOF:1,parseError:s(function(g,y){if(this.yy.parser)this.yy.parser.parseError(g,y);else throw new Error(g)},"parseError"),setInput:s(function(m,g){return this.yy=g||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var g=m.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:s(function(m){var g=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===x.length?this.yylloc.first_column:0)+x[x.length-y.length].length-y[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(m){this.unput(this.match.slice(m))},"less"),pastInput:s(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var m=this.pastInput(),g=new Array(m.length+1).join("-");return m+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:s(function(m,g){var y,x,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),x=m[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(m[0].length),this.matched+=m[0],y=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var T in k)this[T]=k[T];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,g,y,x;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),T=0;Tg[0].length)){if(g=y,x=T,this.options.backtrack_lexer){if(m=this.test_match(y,k[T]),m!==!1)return m;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(m=this.test_match(g,k[x]),m!==!1?m:!1):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:s(function(){var g=this.next();return g||this.lex()},"lex"),begin:s(function(g){this.conditionStack.push(g)},"begin"),popState:s(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:s(function(g){this.begin(g)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(g,y,x,k){var T=k;switch(x){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return p})();h.lexer=d;function f(){this.yy={}}return s(f,"Parser"),f.prototype=h,h.Parser=f,new f})();n7.parser=n7;Upt=n7});var o7={};Fe(o7,{addEvent:()=>nmt,addSection:()=>tmt,addTask:()=>imt,addTaskOrg:()=>smt,clear:()=>Qpt,default:()=>SGt,getCommonDb:()=>Kpt,getDirection:()=>Jpt,getSections:()=>emt,getTasks:()=>rmt,setDirection:()=>Zpt});var wy,Xpt,s7,a7,Tv,_y,Kpt,Qpt,Zpt,Jpt,tmt,emt,rmt,imt,nmt,smt,Ypt,SGt,amt=b(()=>{"use strict";yi();wy="",Xpt=0,s7="LR",a7=[],Tv=[],_y=[],Kpt=s(()=>n1,"getCommonDb"),Qpt=s(function(){a7.length=0,Tv.length=0,wy="",_y.length=0,s7="LR",He()},"clear"),Zpt=s(function(e){s7=e},"setDirection"),Jpt=s(function(){return s7},"getDirection"),tmt=s(function(e){wy=e,a7.push(e)},"addSection"),emt=s(function(){return a7},"getSections"),rmt=s(function(){let e=Ypt(),t=100,r=0;for(;!e&&rr.id===Xpt-1).events.push(e)},"addEvent"),smt=s(function(e){let t={section:wy,type:wy,description:e,task:e,classes:[]};Tv.push(t)},"addTaskOrg"),Ypt=s(function(){let e=s(function(r){return _y[r].processed},"compileTask"),t=!0;for(let[r,i]of _y.entries())e(r),t=t&&i.processed;return t},"compileTasks"),SGt={clear:Qpt,getCommonDb:Kpt,getDirection:Jpt,setDirection:Zpt,addSection:tmt,getSections:emt,getTasks:rmt,addTask:imt,addTaskOrg:smt,addEvent:nmt}});function umt(e,t){e.each(function(){var r=vt(this),i=r.text().split(/(\s+|
    )/).reverse(),n,a=[],o=1.1,l=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",u+"em");for(let d=0;dt||n==="
    ")&&(a.pop(),h.text(a.join(" ").trim()),n==="
    "?a=[""]:a=[n],h=r.append("tspan").attr("x",0).attr("y",l).attr("dy",o+"em").text(n))})}var omt,Cv,wGt,_Gt,lmt,EGt,vGt,l7,AGt,RGt,LGt,c7,cmt,DGt,IGt,NGt,OGt,us,u7=b(()=>{"use strict";lr();omt=0,Cv=s(function(e,t){let r=e.append("rect");return r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),t.class!==void 0&&r.attr("class",t.class),r},"drawRect"),wGt=s(function(e,t){let i=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=e.append("g");n.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(u){let h=Io().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(a,"smile");function o(u){let h=Io().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(o,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(l,"ambivalent"),t.score>3?a(n):t.score<3?o(n):l(n),i},"drawFace"),_Gt=s(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),lmt=s(function(e,t){let r=t.text.replace(//gi," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class!==void 0&&i.attr("class",t.class);let n=i.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),i},"drawText"),EGt=s(function(e,t){function r(n,a,o,l,u){return n+","+a+" "+(n+o)+","+a+" "+(n+o)+","+(a+l-u)+" "+(n+o-u*1.2)+","+(a+l)+" "+n+","+(a+l)}s(r,"genPoints");let i=e.append("polygon");i.attr("points",r(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,lmt(e,t)},"drawLabel"),vGt=s(function(e,t,r){let i=e.append("g"),n=c7();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,Cv(i,n),cmt(r)(t.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),l7=-1,AGt=s(function(e,t,r,i){let n=t.x+r.width/2,a=e.append("g");l7++,a.append("line").attr("id",i+"-task"+l7).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),wGt(a,{cx:n,cy:300+(5-t.score)*30,score:t.score});let l=c7();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=r.width,l.height=r.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,Cv(a,l),cmt(r)(t.task,a,l.x,l.y,l.width,l.height,{class:"task"},r,t.colour)},"drawTask"),RGt=s(function(e,t){Cv(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),LGt=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),c7=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),cmt=(function(){function e(n,a,o,l,u,h,d,f){let p=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(p,d)}s(e,"byText");function t(n,a,o,l,u,h,d,f,p){let{taskFontSize:m,taskFontFamily:g}=f,y=n.split(//gi);for(let x=0;x0?`M0 ${t.height-l} v${-t.height+2*l} q0,-${o},${o},-${o} h${t.width-2*l} q${o},0,${o},${o} v${t.height-l} H0 Z`:`M0 ${t.height-l} v${-(t.height-l)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",i+"-node-"+omt++).attr("class","node-bkg node-"+t.type).attr("d",u),a?.includes("redux")||e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),us={drawRect:Cv,drawCircle:_Gt,drawSection:vGt,drawText:lmt,drawLabel:EGt,drawTask:AGt,drawBackgroundRect:RGt,getTextObj:LGt,getNoteRect:c7,initGraphics:DGt,drawNode:IGt,getVirtualNodeHeight:NGt}});var MGt,hmt,BGt,dmt,fmt=b(()=>{"use strict";lr();u7();Jt();ye();gi();MGt=s(function(e,t,r,i){let n=Q(),{look:a,theme:o,themeVariables:l}=n,{useGradient:u,gradientStart:h,gradientStop:d}=l,f=n.timeline?.leftMargin??50;z.debug("timeline",i.db);let p=n.securityLevel,m;p==="sandbox"&&(m=vt("#i"+t));let y=(p==="sandbox"?vt(m.nodes()[0].contentDocument.body):vt("body")).select("#"+t);y.append("g");let x=i.db.getTasks(),k=i.db.getCommonDb().getDiagramTitle();z.debug("task",x),us.initGraphics(y,t);let T=i.db.getSections();z.debug("sections",T);let C=0,_=0,S=0,w=0,A=50+f,v=50;w=50;let M=0,$=!0;T.forEach(function(R){let N={number:M,descr:R,section:M,width:150,padding:20,maxHeight:C},P=us.getVirtualNodeHeight(y,N,n);z.debug("sectionHeight before draw",P),C=Math.max(C,P+20)});let I=0,F=0;z.debug("tasks.length",x.length);for(let[R,N]of x.entries()){let P={number:R,descr:N,section:N.section,width:150,padding:20,maxHeight:_},E=us.getVirtualNodeHeight(y,P,n);z.debug("taskHeight before draw",E),_=Math.max(_,E+20),I=Math.max(I,N.events.length);let D=0;for(let V of N.events){let L={descr:V,section:N.section,number:N.section,width:150,padding:20,maxHeight:50};D+=us.getVirtualNodeHeight(y,L,n)}N.events.length>0&&(D+=(N.events.length-1)*10),F=Math.max(F,D)}z.debug("maxSectionHeight before draw",C),z.debug("maxTaskHeight before draw",_),T&&T.length>0?T.forEach(R=>{let N=x.filter(V=>V.section===R),P={number:M,descr:R,section:M,width:200*Math.max(N.length,1)-50,padding:20,maxHeight:C};z.debug("sectionNode",P);let E=y.append("g"),D=us.drawNode(E,P,M,n,t);z.debug("sectionNode output",D),E.attr("transform",`translate(${A}, ${w})`),v+=C+50,N.length>0&&hmt(y,N,M,A,v,_,n,I,F,C,!1,t),A+=200*Math.max(N.length,1),v=w,M++}):($=!1,hmt(y,x,M,A,v,_,n,I,F,C,!0,t));let B=y.node().getBBox();if(z.debug("bounds",B),k&&y.append("text").text(k).attr("x",a==="neo"?B.x*2+f:B.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),S=$?C+_+150:_+100,y.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",S).attr("x2",B.width+3*f).attr("y2",S).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),a==="neo"&&u&&o!=="neutral"){let R=y.select("defs"),P=(R.empty()?y.append("defs"):R).append("linearGradient").attr("id",y.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");P.append("stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),P.append("stop").attr("offset","100%").attr("stop-color",d).attr("stop-opacity",1)}cl(void 0,y,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),hmt=s(function(e,t,r,i,n,a,o,l,u,h,d,f){for(let p of t){let m={descr:p.task,section:r,number:r,width:150,padding:20,maxHeight:a};z.debug("taskNode",m);let g=e.append("g").attr("class","taskWrapper"),x=us.drawNode(g,m,r,o,f).height;if(z.debug("taskHeight after draw",x),g.attr("transform",`translate(${i}, ${n})`),a=Math.max(a,x),p.events){let k=e.append("g").attr("class","lineWrapper"),T=a;n+=100,T=T+BGt(e,p.events,r,i,n,o,f),n-=100,k.append("line").attr("x1",i+190/2).attr("y1",n+a).attr("x2",i+190/2).attr("y2",n+a+100+u+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${f}-arrowhead)`).attr("stroke-dasharray","5,5")}i=i+200,d&&!o.timeline?.disableMulticolor&&r++}n=n-10},"drawTasks"),BGt=s(function(e,t,r,i,n,a,o){let l=0,u=n;n=n+100;for(let h of t){let d={descr:h,section:r,number:r,width:150,padding:20,maxHeight:50};z.debug("eventNode",d);let f=e.append("g").attr("class","eventWrapper"),m=us.drawNode(f,d,r,a,o,!0).height;l=l+m,f.attr("transform",`translate(${i}, ${n})`),n=n+10+m}return n=u,l},"drawEvents"),dmt={setConf:s(()=>{},"setConf"),draw:MGt}});var Sv,iu,PGt,h7,$Gt,ymt,FGt,pmt,xmt,mmt,bmt,VGt,gmt,zGt,kmt,Tmt=b(()=>{"use strict";u7();Jt();ye();gi();ca();Re();Sv=200,iu=5,PGt=Sv+iu*2,h7=Sv+100,$Gt=h7+iu*2,ymt=10,FGt=0,pmt=20,xmt=20,mmt=30,bmt=50,VGt=s(function(e,t,r,i){let n=Q(),a=n.timeline?.leftMargin??50;z.debug("timeline",i.db);let o=pi(t);o.append("g");let l=i.db.getTasks(),u=i.db.getCommonDb().getDiagramTitle();z.debug("task",l),us.initGraphics(o);let h=i.db.getSections();z.debug("sections",h);let d=0,f=0,p=50+a,m=50,g=m,y=p,x=PGt+xmt,k=$Gt+bmt,T=y+x,C=0,_=h&&h.length>0,S=_?T:p+x,w=Math.max(50,x+k-iu*2);h.forEach(function(R){let N={number:C,descr:R,section:C,width:w,padding:iu,maxHeight:d},P=us.getVirtualNodeHeight(o,N,n);z.debug("sectionHeight before draw",P),d=Math.max(d,P)});let A=0;z.debug("tasks.length",l.length);for(let[R,N]of l.entries()){let P={number:R,descr:N,section:N.section,width:Sv,padding:iu,maxHeight:f},E=us.getVirtualNodeHeight(o,P,n);z.debug("taskHeight before draw",E),f=Math.max(f,E);let D=0;for(let V of N.events){let L={descr:V,section:N.section,number:N.section,width:h7,padding:iu,maxHeight:50};D+=us.getVirtualNodeHeight(o,L,n)}N.events.length>0&&(D+=(N.events.length-1)*ymt),A=Math.max(A,D)+FGt}z.debug("maxSectionHeight before draw",d),z.debug("maxTaskHeight before draw",f);let M=Math.max(f,A)+mmt;_?h.forEach(R=>{let N=l.filter(K=>K.section===R),P={number:C,descr:R,section:C,width:w,padding:iu,maxHeight:d};z.debug("sectionNode",P);let E=o.append("g"),D=us.drawNode(E,P,C,n);z.debug("sectionNode output",D);let V=S-x;E.attr("transform",`translate(${V}, ${m})`);let L=m+D.height+pmt;N.length>0&&gmt(o,N,C,S,L,f,n,M,!1);let q=N.length,H=D.height+pmt+M*Math.max(q,1)-(q>0?mmt*2:0);m+=H,C++}):gmt(o,l,C,S,m,f,n,M,!0);let $=o.node()?.getBBox();if(!$)throw new Error("bbox not found");if(z.debug("bounds",$),u){if(o.append("text").text(u).attr("x",$.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),$=o.node()?.getBBox(),!$)throw new Error("bbox not found");z.debug("bounds after title",$)}let[I]=Gs(n.fontSize),F=(I??16)*2,B=(I??16)*.5+20,O=o.append("g").attr("class","lineWrapper");O.append("line").attr("x1",S).attr("y1",g-F).attr("x2",S).attr("y2",$.y+$.height+B).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),O.lower(),cl(void 0,o,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),gmt=s(function(e,t,r,i,n,a,o,l,u){for(let h of t){let d={descr:h.task,section:r,number:r,width:Sv,padding:iu,maxHeight:a};z.debug("taskNode",d);let f=e.append("g").attr("class","taskWrapper"),p=us.drawNode(f,d,r,o),m=p.height;z.debug("taskHeight after draw",m);let g=i-xmt-p.width;if(f.attr("transform",`translate(${g}, ${n})`),a=Math.max(a,m),h.events&&h.events.length>0){let y=n,x=i+bmt;zGt(e,h.events,r,i,x,y,o)}n=n+l,u&&!o.timeline?.disableMulticolor&&r++}},"drawTasks"),zGt=s(function(e,t,r,i,n,a,o){let l=a;for(let u of t){let h={descr:u,section:r,number:r,width:h7,padding:iu,maxHeight:0};z.debug("eventNode",h);let d=e.append("g").attr("class","eventWrapper"),p=us.drawNode(d,h,r,o).height;d.attr("transform",`translate(${n}, ${l})`);let m=e.append("g").attr("class","lineWrapper"),g=l+p/2;m.append("line").attr("x1",i).attr("y1",g).attr("x2",n).attr("y2",g).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),l=l+p+ymt}return l-a},"drawEvents"),kmt={setConf:s(()=>{},"setConf"),draw:VGt}});var GGt,WGt,qGt,Cmt,Smt=b(()=>{"use strict";hn();Qe();GGt=s(e=>{let{theme:t}=le(),r=t?.includes("dark"),i=t?.includes("color"),n=e.svgId?.replace(/^#/,"")??"",a=n?`url(#${n}-drop-shadow)`:e.dropShadow??"none",o="";for(let l=0;l{let t="";for(let r=0;r{let{theme:t}=le(),r=t?.includes("redux"),i=t==="neutral",n=e.svgId?.replace(/^#/,"")??"",a="";if(e.useGradient&&n&&e.THEME_COLOR_LIMIT&&!i)for(let o=0;oUGt});var jGt,UGt,_mt=b(()=>{"use strict";Hpt();amt();fmt();Tmt();Smt();jGt={setConf:s(()=>{},"setConf"),draw:s((e,t,r,i)=>(i?.db?.getDirection?.()??"LR")==="TD"?kmt.draw(e,t,r,i):dmt.draw(e,t,r,i),"draw")},UGt={db:o7,renderer:jGt,parser:Upt,styles:Cmt}});var d7,Amt,Rmt=b(()=>{"use strict";d7=(function(){var e=s(function(A,v,M,$){for(M=M||{},$=A.length;$--;M[A[$]]=v);return M},"o"),t=[1,4],r=[1,13],i=[1,12],n=[1,15],a=[1,16],o=[1,20],l=[1,19],u=[6,7,8],h=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],g=[6,7,11,24],y=[1,6,13,16,17,20,23],x=[1,35],k=[1,36],T=[1,6,7,11,13,16,17,20,23],C=[1,38],_={trace:s(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:s(function(v,M,$,I,F,B,O){var R=B.length-1;switch(F){case 6:case 7:return I;case 8:I.getLogger().trace("Stop NL ");break;case 9:I.getLogger().trace("Stop EOF ");break;case 11:I.getLogger().trace("Stop NL2 ");break;case 12:I.getLogger().trace("Stop EOF2 ");break;case 15:I.getLogger().info("Node: ",B[R-1].id),I.addNode(B[R-2].length,B[R-1].id,B[R-1].descr,B[R-1].type,B[R]);break;case 16:I.getLogger().info("Node: ",B[R].id),I.addNode(B[R-1].length,B[R].id,B[R].descr,B[R].type);break;case 17:I.getLogger().trace("Icon: ",B[R]),I.decorateNode({icon:B[R]});break;case 18:case 23:I.decorateNode({class:B[R]});break;case 19:I.getLogger().trace("SPACELIST");break;case 20:I.getLogger().trace("Node: ",B[R-1].id),I.addNode(0,B[R-1].id,B[R-1].descr,B[R-1].type,B[R]);break;case 21:I.getLogger().trace("Node: ",B[R].id),I.addNode(0,B[R].id,B[R].descr,B[R].type);break;case 22:I.decorateNode({icon:B[R]});break;case 27:I.getLogger().trace("node found ..",B[R-2]),this.$={id:B[R-1],descr:B[R-1],type:I.getType(B[R-2],B[R])};break;case 28:this.$={id:B[R],descr:B[R],type:0};break;case 29:I.getLogger().trace("node found ..",B[R-3]),this.$={id:B[R-3],descr:B[R-1],type:I.getType(B[R-2],B[R])};break;case 30:this.$=B[R-1]+B[R];break;case 31:this.$=B[R];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:n,17:a,18:17,19:18,20:o,23:l},e(u,[2,3]),{1:[2,2]},e(u,[2,4]),e(u,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:n,17:a,18:17,19:18,20:o,23:l},{6:r,9:22,12:11,13:i,14:14,16:n,17:a,18:17,19:18,20:o,23:l},{6:h,7:d,10:23,11:f},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:m}),e(p,[2,22]),e(p,[2,23]),e(g,[2,25]),e(g,[2,26]),e(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:n,17:a,18:17,19:18,20:o,23:l},e(y,[2,14],{7:x,11:k}),e(T,[2,8]),e(T,[2,9]),e(T,[2,10]),e(p,[2,16],{15:37,24:m}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:C}),e(g,[2,31]),{21:[1,39]},{22:[1,40]},e(y,[2,13],{7:x,11:k}),e(T,[2,11]),e(T,[2,12]),e(p,[2,15],{24:C}),e(g,[2,30]),{22:[1,41]},e(g,[2,27]),e(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(v,M){if(M.recoverable)this.trace(v);else{var $=new Error(v);throw $.hash=M,$}},"parseError"),parse:s(function(v){var M=this,$=[0],I=[],F=[null],B=[],O=this.table,R="",N=0,P=0,E=0,D=2,V=1,L=B.slice.call(arguments,1),q=Object.create(this.lexer),H={yy:{}};for(var K in this.yy)Object.prototype.hasOwnProperty.call(this.yy,K)&&(H.yy[K]=this.yy[K]);q.setInput(v,H.yy),H.yy.lexer=q,H.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var U=q.yylloc;B.push(U);var st=q.options&&q.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(at){$.length=$.length-2*at,F.length=F.length-at,B.length=B.length-at}s(X,"popStack");function ut(){var at;return at=I.pop()||q.lex()||V,typeof at!="number"&&(at instanceof Array&&(I=at,at=I.pop()),at=M.symbols_[at]||at),at}s(ut,"lex");for(var ot,mt,ht,it,Ot,St,yt={},Et,Ct,Bt,Lt;;){if(ht=$[$.length-1],this.defaultActions[ht]?it=this.defaultActions[ht]:((ot===null||typeof ot>"u")&&(ot=ut()),it=O[ht]&&O[ht][ot]),typeof it>"u"||!it.length||!it[0]){var ee="";Lt=[];for(Et in O[ht])this.terminals_[Et]&&Et>D&&Lt.push("'"+this.terminals_[Et]+"'");q.showPosition?ee="Parse error on line "+(N+1)+`: +`+q.showPosition()+` +Expecting `+Lt.join(", ")+", got '"+(this.terminals_[ot]||ot)+"'":ee="Parse error on line "+(N+1)+": Unexpected "+(ot==V?"end of input":"'"+(this.terminals_[ot]||ot)+"'"),this.parseError(ee,{text:q.match,token:this.terminals_[ot]||ot,line:q.yylineno,loc:U,expected:Lt})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ht+", token: "+ot);switch(it[0]){case 1:$.push(ot),F.push(q.yytext),B.push(q.yylloc),$.push(it[1]),ot=null,mt?(ot=mt,mt=null):(P=q.yyleng,R=q.yytext,N=q.yylineno,U=q.yylloc,E>0&&E--);break;case 2:if(Ct=this.productions_[it[1]][1],yt.$=F[F.length-Ct],yt._$={first_line:B[B.length-(Ct||1)].first_line,last_line:B[B.length-1].last_line,first_column:B[B.length-(Ct||1)].first_column,last_column:B[B.length-1].last_column},st&&(yt._$.range=[B[B.length-(Ct||1)].range[0],B[B.length-1].range[1]]),St=this.performAction.apply(yt,[R,P,N,H.yy,it[1],F,B].concat(L)),typeof St<"u")return St;Ct&&($=$.slice(0,-1*Ct*2),F=F.slice(0,-1*Ct),B=B.slice(0,-1*Ct)),$.push(this.productions_[it[1]][0]),F.push(yt.$),B.push(yt._$),Bt=O[$[$.length-2]][$[$.length-1]],$.push(Bt);break;case 3:return!0}}return!0},"parse")},S=(function(){var A={EOF:1,parseError:s(function(M,$){if(this.yy.parser)this.yy.parser.parseError(M,$);else throw new Error(M)},"parseError"),setInput:s(function(v,M){return this.yy=M||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var M=v.match(/(?:\r\n?|\n).*/g);return M?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},"input"),unput:s(function(v){var M=v.length,$=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;var I=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),$.length-1&&(this.yylineno-=$.length-1);var F=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:$?($.length===I.length?this.yylloc.first_column:0)+I[I.length-$.length].length-$[0].length:this.yylloc.first_column-M},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-M]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(v){this.unput(this.match.slice(v))},"less"),pastInput:s(function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var v=this.pastInput(),M=new Array(v.length+1).join("-");return v+this.upcomingInput()+` +`+M+"^"},"showPosition"),test_match:s(function(v,M){var $,I,F;if(this.options.backtrack_lexer&&(F={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(F.yylloc.range=this.yylloc.range.slice(0))),I=v[0].match(/(?:\r\n?|\n).*/g),I&&(this.yylineno+=I.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:I?I[I.length-1].length-I[I.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(v[0].length),this.matched+=v[0],$=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var B in F)this[B]=F[B];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,M,$,I;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),B=0;BM[0].length)){if(M=$,I=B,this.options.backtrack_lexer){if(v=this.test_match($,F[B]),v!==!1)return v;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(v=this.test_match(M,F[I]),v!==!1?v:!1):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:s(function(){var M=this.next();return M||this.lex()},"lex"),begin:s(function(M){this.conditionStack.push(M)},"begin"),popState:s(function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},"topState"),pushState:s(function(M){this.begin(M)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(M,$,I,F){var B=F;switch(I){case 0:return this.pushState("shapeData"),$.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let O=/\n\s*/g;return $.yytext=$.yytext.replace(O,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return M.getLogger().trace("Found comment",$.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:M.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return M.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:M.getLogger().trace("end icon"),this.popState();break;case 16:return M.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return M.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return M.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return M.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;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:M.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return M.getLogger().trace("description:",$.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),M.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),M.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),M.getLogger().trace("node end ...",$.yytext),"NODE_DEND";break;case 36:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),M.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),M.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return M.getLogger().trace("Long description:",$.yytext),21;break;case 42:return M.getLogger().trace("Long description:",$.yytext),21;break}},"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}}};return A})();_.lexer=S;function w(){this.yy={}}return s(w,"Parser"),w.prototype=_,_.Parser=w,new w})();d7.parser=d7;Amt=d7});var go,p7,f7,m7,KGt,QGt,Lmt,ZGt,JGt,bn,tWt,eWt,rWt,iWt,nWt,sWt,aWt,Dmt,Imt=b(()=>{"use strict";ye();fr();Jt();ps();S0();go=[],p7=[],f7=0,m7={},KGt=s(()=>{go=[],p7=[],f7=0,m7={}},"clear"),QGt=s(e=>{if(go.length===0)return null;let t=go[0].level,r=null;for(let i=go.length-1;i>=0;i--)if(go[i].level===t&&!r&&(r=go[i]),go[i].levell.parentId===n.id);for(let l of o){let u={id:l.id,parentId:n.id,label:nr(l.label??"",i),labelType:"markdown",isGroup:!1,ticket:l?.ticket,priority:l?.priority,assigned:l?.assigned,icon:l?.icon,shape:"kanbanItem",level:l.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(u)}}return{nodes:t,edges:e,other:{},config:Q()}},"getData"),JGt=s((e,t,r,i,n)=>{let a=Q(),o=a.mindmap?.padding??Ue.mindmap.padding;switch(i){case bn.ROUNDED_RECT:case bn.RECT:case bn.HEXAGON:o*=2}let l={id:nr(t,a)||"kbn"+f7++,level:e,label:nr(r,a),width:a.mindmap?.maxNodeWidth??Ue.mindmap.maxNodeWidth,padding:o,isGroup:!1};if(n!==void 0){let h;n.includes(` +`)?h=n+` +`:h=`{ +`+n+` +}`;let d=Pu(h,{schema:Bu});if(d.shape&&(d.shape!==d.shape.toLowerCase()||d.shape.includes("_")))throw new Error(`No such shape: ${d.shape}. Shape names should be lowercase.`);d?.shape&&d.shape==="kanbanItem"&&(l.shape=d?.shape),d?.label&&(l.label=d?.label),d?.icon&&(l.icon=d?.icon.toString()),d?.assigned&&(l.assigned=d?.assigned.toString()),d?.ticket&&(l.ticket=d?.ticket.toString()),d?.priority&&(l.priority=d?.priority)}let u=QGt(e);u?l.parentId=u.id||"kbn"+f7++:p7.push(l),go.push(l)},"addNode"),bn={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},tWt=s((e,t)=>{switch(z.debug("In get type",e,t),e){case"[":return bn.RECT;case"(":return t===")"?bn.ROUNDED_RECT:bn.CLOUD;case"((":return bn.CIRCLE;case")":return bn.CLOUD;case"))":return bn.BANG;case"{{":return bn.HEXAGON;default:return bn.DEFAULT}},"getType"),eWt=s((e,t)=>{m7[e]=t},"setElementForId"),rWt=s(e=>{if(!e)return;let t=Q(),r=go[go.length-1];e.icon&&(r.icon=nr(e.icon,t)),e.class&&(r.cssClasses=nr(e.class,t))},"decorateNode"),iWt=s(e=>{switch(e){case bn.DEFAULT:return"no-border";case bn.RECT:return"rect";case bn.ROUNDED_RECT:return"rounded-rect";case bn.CIRCLE:return"circle";case bn.CLOUD:return"cloud";case bn.BANG:return"bang";case bn.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),nWt=s(()=>z,"getLogger"),sWt=s(e=>m7[e],"getElementById"),aWt={clear:KGt,addNode:JGt,getSections:Lmt,getData:ZGt,nodeType:bn,getType:tWt,setElementForId:eWt,decorateNode:rWt,type2Str:iWt,getLogger:nWt,getElementById:sWt},Dmt=aWt});var oWt,Nmt,Omt=b(()=>{"use strict";ye();Jt();ca();gi();ps();hC();TC();oWt=s(async(e,t,r,i)=>{z.debug(`Rendering kanban diagram +`+e);let a=i.db.getData(),o=Q();o.htmlLabels=!1;let l=pi(t);for(let x of a.nodes)x.domId=`${t}-${x.id}`;let u=l.append("g");u.attr("class","sections");let h=l.append("g");h.attr("class","items");let d=a.nodes.filter(x=>x.isGroup),f=0,p=10,m=[],g=25;for(let x of d){let k=o?.kanban?.sectionWidth||200;f=f+1,x.x=k*f+(f-1)*p/2,x.width=k,x.y=0,x.height=k*3,x.rx=5,x.ry=5,x.cssClasses=x.cssClasses+" section-"+f;let T=await km(u,x);g=Math.max(g,T?.labelBBox?.height),m.push(T)}let y=0;for(let x of d){let k=m[y];y=y+1;let T=o?.kanban?.sectionWidth||200,C=-T*3/2+g,_=C,S=a.nodes.filter(v=>v.parentId===x.id);for(let v of S){if(v.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");v.x=x.x,v.width=T-1.5*p;let $=(await Tm(h,v,{config:o})).node().getBBox();v.y=_+$.height/2,await $0(v),_=v.y+$.height/2+p/2}let w=k.cluster.select("rect"),A=Math.max(_-C+3*p,50)+(g-25);w.attr("height",A)}cl(void 0,l,o.mindmap?.padding??Ue.kanban.padding,o.mindmap?.useMaxWidth??Ue.kanban.useMaxWidth)},"draw"),Nmt={draw:oWt}});var lWt,cWt,Mmt,Bmt=b(()=>{"use strict";hn();Gm();lWt=s(e=>{let t="";for(let i=0;ie.darkMode?kt(i,n):_t(i,n),"adjuster");for(let i=0;i` + .edge { + stroke-width: 3; + } + ${lWt(e)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${e.textColor}; + fill: ${e.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + ${Pl()} +`,"getStyles"),Mmt=cWt});var Pmt={};Fe(Pmt,{diagram:()=>uWt});var uWt,$mt=b(()=>{"use strict";Rmt();Imt();Omt();Bmt();uWt={db:Dmt,renderer:Nmt,parser:Amt,styles:Mmt}});var g7,s2,zmt=b(()=>{"use strict";g7=(function(){var e=s(function(l,u,h,d){for(h=h||{},d=l.length;d--;h[l[d]]=u);return h},"o"),t=[1,9],r=[1,10],i=[1,5,10,12],n={trace:s(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:s(function(u,h,d,f,p,m,g){var y=m.length-1;switch(p){case 7:let x=f.findOrCreateNode(m[y-4].trim().replaceAll('""','"')),k=f.findOrCreateNode(m[y-2].trim().replaceAll('""','"')),T=parseFloat(m[y].trim());f.addLink(x,k,T);break;case 8:case 9:case 11:this.$=m[y];break;case 10:this.$=m[y-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:t,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[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(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:t,20:r},{15:18,16:7,17:8,18:t,20:r},{18:[1,19]},e(r,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:t,20:r},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:s(function(u,h){if(h.recoverable)this.trace(u);else{var d=new Error(u);throw d.hash=h,d}},"parseError"),parse:s(function(u){var h=this,d=[0],f=[],p=[null],m=[],g=this.table,y="",x=0,k=0,T=0,C=2,_=1,S=m.slice.call(arguments,1),w=Object.create(this.lexer),A={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(A.yy[v]=this.yy[v]);w.setInput(u,A.yy),A.yy.lexer=w,A.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var M=w.yylloc;m.push(M);var $=w.options&&w.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(U){d.length=d.length-2*U,p.length=p.length-U,m.length=m.length-U}s(I,"popStack");function F(){var U;return U=f.pop()||w.lex()||_,typeof U!="number"&&(U instanceof Array&&(f=U,U=f.pop()),U=h.symbols_[U]||U),U}s(F,"lex");for(var B,O,R,N,P,E,D={},V,L,q,H;;){if(R=d[d.length-1],this.defaultActions[R]?N=this.defaultActions[R]:((B===null||typeof B>"u")&&(B=F()),N=g[R]&&g[R][B]),typeof N>"u"||!N.length||!N[0]){var K="";H=[];for(V in g[R])this.terminals_[V]&&V>C&&H.push("'"+this.terminals_[V]+"'");w.showPosition?K="Parse error on line "+(x+1)+`: +`+w.showPosition()+` +Expecting `+H.join(", ")+", got '"+(this.terminals_[B]||B)+"'":K="Parse error on line "+(x+1)+": Unexpected "+(B==_?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(K,{text:w.match,token:this.terminals_[B]||B,line:w.yylineno,loc:M,expected:H})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+B);switch(N[0]){case 1:d.push(B),p.push(w.yytext),m.push(w.yylloc),d.push(N[1]),B=null,O?(B=O,O=null):(k=w.yyleng,y=w.yytext,x=w.yylineno,M=w.yylloc,T>0&&T--);break;case 2:if(L=this.productions_[N[1]][1],D.$=p[p.length-L],D._$={first_line:m[m.length-(L||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(L||1)].first_column,last_column:m[m.length-1].last_column},$&&(D._$.range=[m[m.length-(L||1)].range[0],m[m.length-1].range[1]]),E=this.performAction.apply(D,[y,k,x,A.yy,N[1],p,m].concat(S)),typeof E<"u")return E;L&&(d=d.slice(0,-1*L*2),p=p.slice(0,-1*L),m=m.slice(0,-1*L)),d.push(this.productions_[N[1]][0]),p.push(D.$),m.push(D._$),q=g[d[d.length-2]][d[d.length-1]],d.push(q);break;case 3:return!0}}return!0},"parse")},a=(function(){var l={EOF:1,parseError:s(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:s(function(u,h){return this.yy=h||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:s(function(u){var h=u.length,d=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===f.length?this.yylloc.first_column:0)+f[f.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(u){this.unput(this.match.slice(u))},"less"),pastInput:s(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:s(function(u,h){var d,f,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),f=u[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var m in p)this[m]=p[m];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,d,f;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),m=0;mh[0].length)){if(h=d,f=m,this.options.backtrack_lexer){if(u=this.test_match(d,p[m]),u!==!1)return u;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(u=this.test_match(h,p[f]),u!==!1?u:!1):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:s(function(){var h=this.next();return h||this.lex()},"lex"),begin:s(function(h){this.conditionStack.push(h)},"begin"),popState:s(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:s(function(h){this.begin(h)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(h,d,f,p){var m=p;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return l})();n.lexer=a;function o(){this.yy={}}return s(o,"Parser"),o.prototype=n,n.Parser=o,new o})();g7.parser=g7;s2=g7});var _v,Ev,wv,pWt,y7,mWt,x7,gWt,yWt,xWt,bWt,Gmt,Wmt=b(()=>{"use strict";ye();fr();yi();_v=[],Ev=[],wv=new Map,pWt=s(()=>{_v=[],Ev=[],wv=new Map,He()},"clear"),y7=class{constructor(t,r,i=0){this.source=t;this.target=r;this.value=i}static{s(this,"SankeyLink")}},mWt=s((e,t,r)=>{_v.push(new y7(e,t,r))},"addLink"),x7=class{constructor(t){this.ID=t}static{s(this,"SankeyNode")}},gWt=s(e=>{e=qt.sanitizeText(e,Q());let t=wv.get(e);return t===void 0&&(t=new x7(e),wv.set(e,t),Ev.push(t)),t},"findOrCreateNode"),yWt=s(()=>Ev,"getNodes"),xWt=s(()=>_v,"getLinks"),bWt=s(()=>({nodes:Ev.map(e=>({id:e.ID})),links:_v.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),Gmt={nodesMap:wv,getConfig:s(()=>Q().sankey,"getConfig"),getNodes:yWt,getLinks:xWt,getGraph:bWt,addLink:mWt,findOrCreateNode:gWt,getAccTitle:Ze,setAccTitle:Ye,getAccDescription:tr,setAccDescription:Je,getDiagramTitle:er,setDiagramTitle:sr,clear:pWt}});function a2(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r=n)&&(r=n)}return r}var qmt=b(()=>{"use strict";s(a2,"max")});function Ey(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}var jmt=b(()=>{"use strict";s(Ey,"min")});function vy(e,t){let r=0;if(t===void 0)for(let i of e)(i=+i)&&(r+=i);else{let i=-1;for(let n of e)(n=+t(n,++i,e))&&(r+=n)}return r}var Umt=b(()=>{"use strict";s(vy,"sum")});var b7=b(()=>{"use strict";qmt();jmt();Umt()});function kWt(e){return e.target.depth}function k7(e){return e.depth}function T7(e,t){return t-1-e.height}function o2(e,t){return e.sourceLinks.length?e.depth:t-1}function C7(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?Ey(e.sourceLinks,kWt)-1:0}var S7=b(()=>{"use strict";b7();s(kWt,"targetDepth");s(k7,"left");s(T7,"right");s(o2,"justify");s(C7,"center")});function Ay(e){return function(){return e}}var Hmt=b(()=>{"use strict";s(Ay,"constant")});function Ymt(e,t){return vv(e.source,t.source)||e.index-t.index}function Xmt(e,t){return vv(e.target,t.target)||e.index-t.index}function vv(e,t){return e.y0-t.y0}function w7(e){return e.value}function TWt(e){return e.index}function CWt(e){return e.nodes}function SWt(e){return e.links}function Kmt(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function Qmt({nodes:e}){for(let t of e){let r=t.y0,i=r;for(let n of t.sourceLinks)n.y0=r+n.width/2,r+=n.width;for(let n of t.targetLinks)n.y1=i+n.width/2,i+=n.width}}function Av(){let e=0,t=0,r=1,i=1,n=24,a=8,o,l=TWt,u=o2,h,d,f=CWt,p=SWt,m=6;function g(){let R={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return y(R),x(R),k(R),T(R),S(R),Qmt(R),R}s(g,"sankey"),g.update=function(R){return Qmt(R),R},g.nodeId=function(R){return arguments.length?(l=typeof R=="function"?R:Ay(R),g):l},g.nodeAlign=function(R){return arguments.length?(u=typeof R=="function"?R:Ay(R),g):u},g.nodeSort=function(R){return arguments.length?(h=R,g):h},g.nodeWidth=function(R){return arguments.length?(n=+R,g):n},g.nodePadding=function(R){return arguments.length?(a=o=+R,g):a},g.nodes=function(R){return arguments.length?(f=typeof R=="function"?R:Ay(R),g):f},g.links=function(R){return arguments.length?(p=typeof R=="function"?R:Ay(R),g):p},g.linkSort=function(R){return arguments.length?(d=R,g):d},g.size=function(R){return arguments.length?(e=t=0,r=+R[0],i=+R[1],g):[r-e,i-t]},g.extent=function(R){return arguments.length?(e=+R[0][0],r=+R[1][0],t=+R[0][1],i=+R[1][1],g):[[e,t],[r,i]]},g.iterations=function(R){return arguments.length?(m=+R,g):m};function y({nodes:R,links:N}){for(let[E,D]of R.entries())D.index=E,D.sourceLinks=[],D.targetLinks=[];let P=new Map(R.map((E,D)=>[l(E,D,R),E]));for(let[E,D]of N.entries()){D.index=E;let{source:V,target:L}=D;typeof V!="object"&&(V=D.source=Kmt(P,V)),typeof L!="object"&&(L=D.target=Kmt(P,L)),V.sourceLinks.push(D),L.targetLinks.push(D)}if(d!=null)for(let{sourceLinks:E,targetLinks:D}of R)E.sort(d),D.sort(d)}s(y,"computeNodeLinks");function x({nodes:R}){for(let N of R)N.value=N.fixedValue===void 0?Math.max(vy(N.sourceLinks,w7),vy(N.targetLinks,w7)):N.fixedValue}s(x,"computeNodeValues");function k({nodes:R}){let N=R.length,P=new Set(R),E=new Set,D=0;for(;P.size;){for(let V of P){V.depth=D;for(let{target:L}of V.sourceLinks)E.add(L)}if(++D>N)throw new Error("circular link");P=E,E=new Set}}s(k,"computeNodeDepths");function T({nodes:R}){let N=R.length,P=new Set(R),E=new Set,D=0;for(;P.size;){for(let V of P){V.height=D;for(let{source:L}of V.targetLinks)E.add(L)}if(++D>N)throw new Error("circular link");P=E,E=new Set}}s(T,"computeNodeHeights");function C({nodes:R}){let N=a2(R,D=>D.depth)+1,P=(r-e-n)/(N-1),E=new Array(N);for(let D of R){let V=Math.max(0,Math.min(N-1,Math.floor(u.call(null,D,N))));D.layer=V,D.x0=e+V*P,D.x1=D.x0+n,E[V]?E[V].push(D):E[V]=[D]}if(h)for(let D of E)D.sort(h);return E}s(C,"computeNodeLayers");function _(R){let N=Ey(R,P=>(i-t-(P.length-1)*o)/vy(P,w7));for(let P of R){let E=t;for(let D of P){D.y0=E,D.y1=E+D.value*N,E=D.y1+o;for(let V of D.sourceLinks)V.width=V.value*N}E=(i-E+o)/(P.length+1);for(let D=0;DP.length)-1)),_(N);for(let P=0;P0))continue;let K=(q/H-L.y0)*N;L.y0+=K,L.y1+=K,I(L)}h===void 0&&V.sort(vv),v(V,P)}}s(w,"relaxLeftToRight");function A(R,N,P){for(let E=R.length,D=E-2;D>=0;--D){let V=R[D];for(let L of V){let q=0,H=0;for(let{target:U,value:st}of L.sourceLinks){let X=st*(U.layer-L.layer);q+=O(L,U)*X,H+=X}if(!(H>0))continue;let K=(q/H-L.y0)*N;L.y0+=K,L.y1+=K,I(L)}h===void 0&&V.sort(vv),v(V,P)}}s(A,"relaxRightToLeft");function v(R,N){let P=R.length>>1,E=R[P];$(R,E.y0-o,P-1,N),M(R,E.y1+o,P+1,N),$(R,i,R.length-1,N),M(R,t,0,N)}s(v,"resolveCollisions");function M(R,N,P,E){for(;P1e-6&&(D.y0+=V,D.y1+=V),N=D.y1+o}}s(M,"resolveCollisionsTopToBottom");function $(R,N,P,E){for(;P>=0;--P){let D=R[P],V=(D.y1-N)*E;V>1e-6&&(D.y0-=V,D.y1-=V),N=D.y0-o}}s($,"resolveCollisionsBottomToTop");function I({sourceLinks:R,targetLinks:N}){if(d===void 0){for(let{source:{sourceLinks:P}}of N)P.sort(Xmt);for(let{target:{targetLinks:P}}of R)P.sort(Ymt)}}s(I,"reorderNodeLinks");function F(R){if(d===void 0)for(let{sourceLinks:N,targetLinks:P}of R)N.sort(Xmt),P.sort(Ymt)}s(F,"reorderLinks");function B(R,N){let P=R.y0-(R.sourceLinks.length-1)*o/2;for(let{target:E,width:D}of R.sourceLinks){if(E===N)break;P+=D+o}for(let{source:E,width:D}of N.targetLinks){if(E===R)break;P-=D}return P}s(B,"targetTop");function O(R,N){let P=N.y0-(N.targetLinks.length-1)*o/2;for(let{source:E,width:D}of N.targetLinks){if(E===R)break;P+=D+o}for(let{target:E,width:D}of R.sourceLinks){if(E===N)break;P-=D}return P}return s(O,"sourceTop"),g}var Zmt=b(()=>{"use strict";b7();S7();Hmt();s(Ymt,"ascendingSourceBreadth");s(Xmt,"ascendingTargetBreadth");s(vv,"ascendingBreadth");s(w7,"value");s(TWt,"defaultId");s(CWt,"defaultNodes");s(SWt,"defaultLinks");s(Kmt,"find");s(Qmt,"computeLinkBreadths");s(Av,"Sankey")});function v7(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Jmt(){return new v7}var _7,E7,sp,wWt,A7,tgt=b(()=>{"use strict";_7=Math.PI,E7=2*_7,sp=1e-6,wWt=E7-sp;s(v7,"Path");s(Jmt,"path");v7.prototype=Jmt.prototype={constructor:v7,moveTo:s(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:s(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:s(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:s(function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},"quadraticCurveTo"),bezierCurveTo:s(function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:s(function(e,t,r,i,n){e=+e,t=+t,r=+r,i=+i,n=+n;var a=this._x1,o=this._y1,l=r-e,u=i-t,h=a-e,d=o-t,f=h*h+d*d;if(n<0)throw new Error("negative radius: "+n);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>sp)if(!(Math.abs(d*l-u*h)>sp)||!n)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=r-a,m=i-o,g=l*l+u*u,y=p*p+m*m,x=Math.sqrt(g),k=Math.sqrt(f),T=n*Math.tan((_7-Math.acos((g+f-y)/(2*x*k)))/2),C=T/k,_=T/x;Math.abs(C-1)>sp&&(this._+="L"+(e+C*h)+","+(t+C*d)),this._+="A"+n+","+n+",0,0,"+ +(d*p>h*m)+","+(this._x1=e+_*l)+","+(this._y1=t+_*u)}},"arcTo"),arc:s(function(e,t,r,i,n,a){e=+e,t=+t,r=+r,a=!!a;var o=r*Math.cos(i),l=r*Math.sin(i),u=e+o,h=t+l,d=1^a,f=a?i-n:n-i;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+h:(Math.abs(this._x1-u)>sp||Math.abs(this._y1-h)>sp)&&(this._+="L"+u+","+h),r&&(f<0&&(f=f%E7+E7),f>wWt?this._+="A"+r+","+r+",0,1,"+d+","+(e-o)+","+(t-l)+"A"+r+","+r+",0,1,"+d+","+(this._x1=u)+","+(this._y1=h):f>sp&&(this._+="A"+r+","+r+",0,"+ +(f>=_7)+","+d+","+(this._x1=e+r*Math.cos(n))+","+(this._y1=t+r*Math.sin(n))))},"arc"),rect:s(function(e,t,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},"rect"),toString:s(function(){return this._},"toString")};A7=Jmt});var egt=b(()=>{"use strict";tgt()});function Rv(e){return s(function(){return e},"constant")}var rgt=b(()=>{"use strict";s(Rv,"default")});function igt(e){return e[0]}function ngt(e){return e[1]}var sgt=b(()=>{"use strict";s(igt,"x");s(ngt,"y")});var agt,ogt=b(()=>{"use strict";agt=Array.prototype.slice});function _Wt(e){return e.source}function EWt(e){return e.target}function vWt(e){var t=_Wt,r=EWt,i=igt,n=ngt,a=null;function o(){var l,u=agt.call(arguments),h=t.apply(this,u),d=r.apply(this,u);if(a||(a=l=A7()),e(a,+i.apply(this,(u[0]=h,u)),+n.apply(this,u),+i.apply(this,(u[0]=d,u)),+n.apply(this,u)),l)return a=null,l+""||null}return s(o,"link"),o.source=function(l){return arguments.length?(t=l,o):t},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(i=typeof l=="function"?l:Rv(+l),o):i},o.y=function(l){return arguments.length?(n=typeof l=="function"?l:Rv(+l),o):n},o.context=function(l){return arguments.length?(a=l??null,o):a},o}function AWt(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function R7(){return vWt(AWt)}var lgt=b(()=>{"use strict";egt();ogt();rgt();sgt();s(_Wt,"linkSource");s(EWt,"linkTarget");s(vWt,"link");s(AWt,"curveHorizontal");s(R7,"linkHorizontal")});var cgt=b(()=>{"use strict";lgt()});function RWt(e){return[e.source.x1,e.y0]}function LWt(e){return[e.target.x0,e.y1]}function Lv(){return R7().source(RWt).target(LWt)}var ugt=b(()=>{"use strict";cgt();s(RWt,"horizontalSource");s(LWt,"horizontalTarget");s(Lv,"default")});var hgt=b(()=>{"use strict";Zmt();S7();ugt()});var l2,dgt=b(()=>{"use strict";l2=class e{static{s(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+")"}}});var DWt,IWt,fgt,pgt=b(()=>{"use strict";ye();lr();hgt();gi();dgt();DWt={left:k7,right:T7,center:C7,justify:o2},IWt=s(function(e,t,r,i){let{securityLevel:n,sankey:a}=Q(),o=z2.sankey,l;n==="sandbox"&&(l=vt("#i"+t));let u=n==="sandbox"?vt(l.nodes()[0].contentDocument.body):vt("body"),h=n==="sandbox"?u.select(`[id="${t}"]`):vt(`[id="${t}"]`),d=a?.width??o.width,f=a?.height??o.width,p=a?.useMaxWidth??o.useMaxWidth,m=a?.nodeAlignment??o.nodeAlignment,g=a?.prefix??o.prefix,y=a?.suffix??o.suffix,x=a?.showValues??o.showValues,k=i.db.getGraph(),T=DWt[m];Av().nodeId($=>$.id).nodeWidth(10).nodePadding(10+(x?15:0)).nodeAlign(T).extent([[0,0],[d,f]])(k);let S=pa(fR);h.append("g").attr("class","nodes").selectAll(".node").data(k.nodes).join("g").attr("class","node").attr("id",$=>($.uid=l2.next("node-")).id).attr("transform",function($){return"translate("+$.x0+","+$.y0+")"}).attr("x",$=>$.x0).attr("y",$=>$.y0).append("rect").attr("height",$=>$.y1-$.y0).attr("width",$=>$.x1-$.x0).attr("fill",$=>S($.id));let w=s(({id:$,value:I})=>x?`${$} +${g}${Math.round(I*100)/100}${y}`:$,"getText");h.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(k.nodes).join("text").attr("x",$=>$.x0($.y1+$.y0)/2).attr("dy",`${x?"0":"0.35"}em`).attr("text-anchor",$=>$.x0(I.uid=l2.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",I=>I.source.x1).attr("x2",I=>I.target.x0);$.append("stop").attr("offset","0%").attr("stop-color",I=>S(I.source.id)),$.append("stop").attr("offset","100%").attr("stop-color",I=>S(I.target.id))}let M;switch(v){case"gradient":M=s($=>$.uid,"coloring");break;case"source":M=s($=>S($.source.id),"coloring");break;case"target":M=s($=>S($.target.id),"coloring");break;default:M=v}A.append("path").attr("d",Lv()).attr("stroke",M).attr("stroke-width",$=>Math.max(1,$.width)),cl(void 0,h,0,p)},"draw"),fgt={draw:IWt}});var mgt,ggt=b(()=>{"use strict";mgt=s(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")});var NWt,ygt,xgt=b(()=>{"use strict";NWt=s(e=>`.label { + font-family: ${e.fontFamily}; + }`,"getStyles"),ygt=NWt});var bgt={};Fe(bgt,{diagram:()=>MWt});var OWt,MWt,kgt=b(()=>{"use strict";zmt();Wmt();pgt();ggt();xgt();OWt=s2.parse.bind(s2);s2.parse=e=>OWt(mgt(e));MWt={styles:ygt,parser:s2,db:Gmt,renderer:fgt}});var FWt,Ry,L7=b(()=>{"use strict";Qe();ps();Re();yi();FWt=Ue.packet,Ry=class{constructor(){this.packet=[];this.setAccTitle=Ye;this.getAccTitle=Ze;this.setDiagramTitle=sr;this.getDiagramTitle=er;this.getAccDescription=tr;this.setAccDescription=Je}static{s(this,"PacketDB")}getConfig(){let t=Wr({...FWt,...le().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){He(),this.packet=[]}}});var VWt,zWt,GWt,D7,Sgt=b(()=>{"use strict";Xc();Jt();Lh();L7();VWt=1e4,zWt=s((e,t)=>{aa(e,t);let r=-1,i=[],n=1,{bitsPerRow:a}=t.getConfig();for(let{start:o,end:l,bits:u,label:h}of e.blocks){if(o!==void 0&&l!==void 0&&l{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];let i=t*r-1,n=t*r;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),D7={parser:{yy:void 0},parse:s(async e=>{let t=await Hn("packet",e),r=D7.parser?.yy;if(!(r instanceof Ry))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");z.debug(t),zWt(t,r)},"parse")}});var WWt,qWt,wgt,_gt=b(()=>{"use strict";ca();gi();WWt=s((e,t,r,i)=>{let n=i.db,a=n.getConfig(),{rowHeight:o,paddingY:l,bitWidth:u,bitsPerRow:h}=a,d=n.getPacket(),f=n.getDiagramTitle(),p=o+l,m=p*(d.length+1)-(f?0:o),g=u*h+2,y=pi(t);y.attr("viewBox",`0 0 ${g} ${m}`),pr(y,m,g,a.useMaxWidth);for(let[x,k]of d.entries())qWt(y,k,x,a);y.append("text").text(f).attr("x",g/2).attr("y",m-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),qWt=s((e,t,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:o,bitsPerRow:l,showBits:u})=>{let h=e.append("g"),d=r*(i+a)+a;for(let f of t){let p=f.start%l*o+1,m=(f.end-f.start+1)*o-n;if(h.append("rect").attr("x",p).attr("y",d).attr("width",m).attr("height",i).attr("class","packetBlock"),h.append("text").attr("x",p+m/2).attr("y",d+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!u)continue;let g=f.end===f.start,y=d-2;h.append("text").attr("x",p+(g?m/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(f.start),g||h.append("text").attr("x",p+m).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),wgt={draw:WWt}});var jWt,Egt,vgt=b(()=>{"use strict";Re();jWt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},Egt=s(({packet:e}={})=>{let t=Wr(jWt,e);return` + .packetByte { + font-size: ${t.byteFontSize}; + } + .packetByte.start { + fill: ${t.startByteColor}; + } + .packetByte.end { + fill: ${t.endByteColor}; + } + .packetLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .packetTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + .packetBlock { + stroke: ${t.blockStrokeColor}; + stroke-width: ${t.blockStrokeWidth}; + fill: ${t.blockFillColor}; + } + `},"styles")});var Agt={};Fe(Agt,{diagram:()=>UWt});var UWt,Rgt=b(()=>{"use strict";L7();Sgt();_gt();vgt();UWt={parser:D7,get db(){return new Ry},renderer:wgt,styles:Egt}});var Ly,Igt,ap,XWt,KWt,Ngt,QWt,ZWt,JWt,tqt,eqt,rqt,iqt,op,I7=b(()=>{"use strict";Qe();ps();Re();yi();Ly={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},Igt={axes:[],curves:[],options:Ly},ap=structuredClone(Igt),XWt=Ue.radar,KWt=s(()=>Wr({...XWt,...le().radar}),"getConfig"),Ngt=s(()=>ap.axes,"getAxes"),QWt=s(()=>ap.curves,"getCurves"),ZWt=s(()=>ap.options,"getOptions"),JWt=s(e=>{ap.axes=e.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),tqt=s(e=>{ap.curves=e.map(t=>({name:t.name,label:t.label??t.name,entries:eqt(t.entries)}))},"setCurves"),eqt=s(e=>{if(e[0].axis==null)return e.map(r=>r.value);let t=Ngt();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(r=>{let i=e.find(n=>n.axis?.$refText===r.name);if(i===void 0)throw new Error("Missing entry for axis "+r.label);return i.value})},"computeCurveEntries"),rqt=s(e=>{let t=e.reduce((r,i)=>(r[i.name]=i,r),{});ap.options={showLegend:t.showLegend?.value??Ly.showLegend,ticks:t.ticks?.value??Ly.ticks,max:t.max?.value??Ly.max,min:t.min?.value??Ly.min,graticule:t.graticule?.value??Ly.graticule}},"setOptions"),iqt=s(()=>{He(),ap=structuredClone(Igt)},"clear"),op={getAxes:Ngt,getCurves:QWt,getOptions:ZWt,setAxes:JWt,setCurves:tqt,setOptions:rqt,getConfig:KWt,clear:iqt,setAccTitle:Ye,getAccTitle:Ze,setDiagramTitle:sr,getDiagramTitle:er,getAccDescription:tr,setAccDescription:Je}});var nqt,Ogt,Mgt=b(()=>{"use strict";Xc();Jt();Lh();I7();nqt=s(e=>{aa(e,op);let{axes:t,curves:r,options:i}=e;op.setAxes(t),op.setCurves(r),op.setOptions(i)},"populate"),Ogt={parse:s(async e=>{let t=await Hn("radar",e);z.debug(t),nqt(t)},"parse")}});function cqt(e,t,r,i,n,a,o){let l=t.length,u=Math.min(o.width,o.height)/2;r.forEach((h,d)=>{if(h.entries.length!==l)return;let f=h.entries.map((p,m)=>{let g=2*Math.PI*m/l-Math.PI/2,y=uqt(p,i,n,u),x=y*Math.cos(g),k=y*Math.sin(g);return{x,y:k}});a==="circle"?e.append("path").attr("d",hqt(f,o.curveTension)).attr("class",`radarCurve-${d}`):a==="polygon"&&e.append("polygon").attr("points",f.map(p=>`${p.x},${p.y}`).join(" ")).attr("class",`radarCurve-${d}`)})}function uqt(e,t,r,i){let n=Math.min(Math.max(e,t),r);return i*(n-t)/(r-t)}function hqt(e,t){let r=e.length,i=`M${e[0].x},${e[0].y}`;for(let n=0;n{let h=e.append("g").attr("transform",`translate(${n}, ${a+u*o})`);h.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${u}`),h.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(l.label)})}var sqt,aqt,oqt,lqt,Bgt,Pgt=b(()=>{"use strict";ca();gi();sqt=s((e,t,r,i)=>{let n=i.db,a=n.getAxes(),o=n.getCurves(),l=n.getOptions(),u=n.getConfig(),h=n.getDiagramTitle(),d=pi(t),f=aqt(d,u),p=l.max??Math.max(...o.map(y=>Math.max(...y.entries))),m=l.min,g=Math.min(u.width,u.height)/2;oqt(f,a,g,l.ticks,l.graticule),lqt(f,a,g,u),cqt(f,a,o,m,p,l.graticule,u),dqt(f,o,l.showLegend,u),f.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-u.height/2-u.marginTop)},"draw"),aqt=s((e,t)=>{let r=t.width+t.marginLeft+t.marginRight,i=t.height+t.marginTop+t.marginBottom,n={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return pr(e,i,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} ${i}`),e.append("g").attr("transform",`translate(${n.x}, ${n.y})`)},"drawFrame"),oqt=s((e,t,r,i,n)=>{if(n==="circle")for(let a=0;a{let f=2*d*Math.PI/a-Math.PI/2,p=l*Math.cos(f),m=l*Math.sin(f);return`${p},${m}`}).join(" ");e.append("polygon").attr("points",u).attr("class","radarGraticule")}}},"drawGraticule"),lqt=s((e,t,r,i)=>{let n=t.length;for(let a=0;a{"use strict";Re();pp();Qe();fqt=s((e,t)=>{let r="";for(let i=0;i{let t=sl(),r=le(),i=Wr(t,r.themeVariables),n=Wr(i.radar,e);return{themeVariables:i,radarOptions:n}},"buildRadarStyleOptions"),$gt=s(({radar:e}={})=>{let{themeVariables:t,radarOptions:r}=pqt(e);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${r.axisColor}; + stroke-width: ${r.axisStrokeWidth}; + } + .radarAxisLabel { + dominant-baseline: middle; + text-anchor: middle; + font-size: ${r.axisLabelFontSize}px; + color: ${r.axisColor}; + } + .radarGraticule { + fill: ${r.graticuleColor}; + fill-opacity: ${r.graticuleOpacity}; + stroke: ${r.graticuleColor}; + stroke-width: ${r.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${r.legendFontSize}px; + dominant-baseline: hanging; + } + ${fqt(t,r)} + `},"styles")});var Vgt={};Fe(Vgt,{diagram:()=>mqt});var mqt,zgt=b(()=>{"use strict";I7();Mgt();Pgt();Fgt();mqt={parser:Ogt,db:op,renderer:Bgt,styles:$gt}});var N7,qgt,jgt=b(()=>{"use strict";N7=(function(){var e=s(function(C,_,S,w){for(S=S||{},w=C.length;w--;S[C[w]]=_);return S},"o"),t=[1,15],r=[1,7],i=[1,13],n=[1,14],a=[1,19],o=[1,16],l=[1,17],u=[1,18],h=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],y=[1,49],x={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:s(function(_,S,w,A,v,M,$){var I=M.length-1;switch(v){case 4:A.getLogger().debug("Rule: separator (NL) ");break;case 5:A.getLogger().debug("Rule: separator (Space) ");break;case 6:A.getLogger().debug("Rule: separator (EOF) ");break;case 7:A.getLogger().debug("Rule: hierarchy: ",M[I-1]),A.setHierarchy(M[I-1]);break;case 8:A.getLogger().debug("Stop NL ");break;case 9:A.getLogger().debug("Stop EOF ");break;case 10:A.getLogger().debug("Stop NL2 ");break;case 11:A.getLogger().debug("Stop EOF2 ");break;case 12:A.getLogger().debug("Rule: statement: ",M[I]),typeof M[I].length=="number"?this.$=M[I]:this.$=[M[I]];break;case 13:A.getLogger().debug("Rule: statement #2: ",M[I-1]),this.$=[M[I-1]].concat(M[I]);break;case 14:A.getLogger().debug("Rule: link: ",M[I],_),this.$={edgeTypeStr:M[I],label:""};break;case 15:A.getLogger().debug("Rule: LABEL link: ",M[I-3],M[I-1],M[I]),this.$={edgeTypeStr:M[I],label:M[I-1]};break;case 18:let F=parseInt(M[I]),B=A.generateId();this.$={id:B,type:"space",label:"",width:F,children:[]};break;case 23:A.getLogger().debug("Rule: (nodeStatement link node) ",M[I-2],M[I-1],M[I]," typestr: ",M[I-1].edgeTypeStr);let O=A.edgeStrToEdgeData(M[I-1].edgeTypeStr);this.$=[{id:M[I-2].id,label:M[I-2].label,type:M[I-2].type,directions:M[I-2].directions},{id:M[I-2].id+"-"+M[I].id,start:M[I-2].id,end:M[I].id,label:M[I-1].label,type:"edge",directions:M[I].directions,arrowTypeEnd:O,arrowTypeStart:"arrow_open"},{id:M[I].id,label:M[I].label,type:A.typeStr2Type(M[I].typeStr),directions:M[I].directions}];break;case 24:A.getLogger().debug("Rule: nodeStatement (abc88 node size) ",M[I-1],M[I]),this.$={id:M[I-1].id,label:M[I-1].label,type:A.typeStr2Type(M[I-1].typeStr),directions:M[I-1].directions,widthInColumns:parseInt(M[I],10)};break;case 25:A.getLogger().debug("Rule: nodeStatement (node) ",M[I]),this.$={id:M[I].id,label:M[I].label,type:A.typeStr2Type(M[I].typeStr),directions:M[I].directions,widthInColumns:1};break;case 26:A.getLogger().debug("APA123",this?this:"na"),A.getLogger().debug("COLUMNS: ",M[I]),this.$={type:"column-setting",columns:M[I]==="auto"?-1:parseInt(M[I])};break;case 27:A.getLogger().debug("Rule: id-block statement : ",M[I-2],M[I-1]);let R=A.generateId();this.$={...M[I-2],type:"composite",children:M[I-1]};break;case 28:A.getLogger().debug("Rule: blockStatement : ",M[I-2],M[I-1],M[I]);let N=A.generateId();this.$={id:N,type:"composite",label:"",children:M[I-1]};break;case 29:A.getLogger().debug("Rule: node (NODE_ID separator): ",M[I]),this.$={id:M[I]};break;case 30:A.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",M[I-1],M[I]),this.$={id:M[I-1],label:M[I].label,typeStr:M[I].typeStr,directions:M[I].directions};break;case 31:A.getLogger().debug("Rule: dirList: ",M[I]),this.$=[M[I]];break;case 32:A.getLogger().debug("Rule: dirList: ",M[I-1],M[I]),this.$=[M[I-1]].concat(M[I]);break;case 33:A.getLogger().debug("Rule: nodeShapeNLabel: ",M[I-2],M[I-1],M[I]),this.$={typeStr:M[I-2]+M[I],label:M[I-1]};break;case 34:A.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",M[I-3],M[I-2]," #3:",M[I-1],M[I]),this.$={typeStr:M[I-3]+M[I],label:M[I-2],directions:M[I-1]};break;case 35:case 36:this.$={type:"classDef",id:M[I-1].trim(),css:M[I].trim()};break;case 37:this.$={type:"applyClass",id:M[I-1].trim(),styleClass:M[I].trim()};break;case 38:this.$={type:"applyStyles",id:M[I-1].trim(),stylesStr:M[I].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,39:o,43:l,46:u},{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,10:t,21:r,28:i,29:n,31:a,39:o,43:l,46:u}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,39:o,43:l,46:u},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,39:o,43:l,46:u},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(g,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:y},{15:[1,50]},e(d,[2,27]),e(g,[2,33]),{38:[1,51]},{33:52,34:y,38:[2,31]},{31:[2,15]},e(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:s(function(_,S){if(S.recoverable)this.trace(_);else{var w=new Error(_);throw w.hash=S,w}},"parseError"),parse:s(function(_){var S=this,w=[0],A=[],v=[null],M=[],$=this.table,I="",F=0,B=0,O=0,R=2,N=1,P=M.slice.call(arguments,1),E=Object.create(this.lexer),D={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(D.yy[V]=this.yy[V]);E.setInput(_,D.yy),D.yy.lexer=E,D.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var L=E.yylloc;M.push(L);var q=E.options&&E.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function H(Ct){w.length=w.length-2*Ct,v.length=v.length-Ct,M.length=M.length-Ct}s(H,"popStack");function K(){var Ct;return Ct=A.pop()||E.lex()||N,typeof Ct!="number"&&(Ct instanceof Array&&(A=Ct,Ct=A.pop()),Ct=S.symbols_[Ct]||Ct),Ct}s(K,"lex");for(var U,st,X,ut,ot,mt,ht={},it,Ot,St,yt;;){if(X=w[w.length-1],this.defaultActions[X]?ut=this.defaultActions[X]:((U===null||typeof U>"u")&&(U=K()),ut=$[X]&&$[X][U]),typeof ut>"u"||!ut.length||!ut[0]){var Et="";yt=[];for(it in $[X])this.terminals_[it]&&it>R&&yt.push("'"+this.terminals_[it]+"'");E.showPosition?Et="Parse error on line "+(F+1)+`: +`+E.showPosition()+` +Expecting `+yt.join(", ")+", got '"+(this.terminals_[U]||U)+"'":Et="Parse error on line "+(F+1)+": Unexpected "+(U==N?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(Et,{text:E.match,token:this.terminals_[U]||U,line:E.yylineno,loc:L,expected:yt})}if(ut[0]instanceof Array&&ut.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+U);switch(ut[0]){case 1:w.push(U),v.push(E.yytext),M.push(E.yylloc),w.push(ut[1]),U=null,st?(U=st,st=null):(B=E.yyleng,I=E.yytext,F=E.yylineno,L=E.yylloc,O>0&&O--);break;case 2:if(Ot=this.productions_[ut[1]][1],ht.$=v[v.length-Ot],ht._$={first_line:M[M.length-(Ot||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(Ot||1)].first_column,last_column:M[M.length-1].last_column},q&&(ht._$.range=[M[M.length-(Ot||1)].range[0],M[M.length-1].range[1]]),mt=this.performAction.apply(ht,[I,B,F,D.yy,ut[1],v,M].concat(P)),typeof mt<"u")return mt;Ot&&(w=w.slice(0,-1*Ot*2),v=v.slice(0,-1*Ot),M=M.slice(0,-1*Ot)),w.push(this.productions_[ut[1]][0]),v.push(ht.$),M.push(ht._$),St=$[w[w.length-2]][w[w.length-1]],w.push(St);break;case 3:return!0}}return!0},"parse")},k=(function(){var C={EOF:1,parseError:s(function(S,w){if(this.yy.parser)this.yy.parser.parseError(S,w);else throw new Error(S)},"parseError"),setInput:s(function(_,S){return this.yy=S||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var S=_.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},"input"),unput:s(function(_){var S=_.length,w=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),w.length-1&&(this.yylineno-=w.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:w?(w.length===A.length?this.yylloc.first_column:0)+A[A.length-w.length].length-w[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(_){this.unput(this.match.slice(_))},"less"),pastInput:s(function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var _=this.pastInput(),S=new Array(_.length+1).join("-");return _+this.upcomingInput()+` +`+S+"^"},"showPosition"),test_match:s(function(_,S){var w,A,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),A=_[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_[0].length),this.matched+=_[0],w=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var M in v)this[M]=v[M];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,S,w,A;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),M=0;MS[0].length)){if(S=w,A=M,this.options.backtrack_lexer){if(_=this.test_match(w,v[M]),_!==!1)return _;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(_=this.test_match(S,v[A]),_!==!1?_:!1):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:s(function(){var S=this.next();return S||this.lex()},"lex"),begin:s(function(S){this.conditionStack.push(S)},"begin"),popState:s(function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},"topState"),pushState:s(function(S){this.begin(S)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(S,w,A,v){var M=v;switch(A){case 0:return S.getLogger().debug("Found block-beta"),10;break;case 1:return S.getLogger().debug("Found id-block"),29;break;case 2:return S.getLogger().debug("Found block"),10;break;case 3:S.getLogger().debug(".",w.yytext);break;case 4:S.getLogger().debug("_",w.yytext);break;case 5:return 5;case 6:return w.yytext=-1,28;break;case 7:return w.yytext=w.yytext.replace(/columns\s+/,""),S.getLogger().debug("COLUMNS (LEX)",w.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:S.getLogger().debug("LEX: POPPING STR:",w.yytext),this.popState();break;case 13:return S.getLogger().debug("LEX: STR end:",w.yytext),"STR";break;case 14:return w.yytext=w.yytext.replace(/space\:/,""),S.getLogger().debug("SPACE NUM (LEX)",w.yytext),21;break;case 15:return w.yytext="1",S.getLogger().debug("COLUMNS (LEX)",w.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),S.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),S.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),S.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),S.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),S.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),S.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),S.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),S.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),S.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),S.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),S.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),S.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),S.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),S.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),S.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),S.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),S.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return S.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return S.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return S.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return S.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return S.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return S.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return S.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return S.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return S.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return S.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return S.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return S.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),S.getLogger().debug("LEX ARR START"),37;break;case 74:return S.getLogger().debug("Lex: NODE_ID",w.yytext),31;break;case 75:return S.getLogger().debug("Lex: EOF",w.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:S.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:S.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return S.getLogger().debug("LEX: NODE_DESCR:",w.yytext),"NODE_DESCR";break;case 83:S.getLogger().debug("LEX POPPING"),this.popState();break;case 84:S.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return w.yytext=w.yytext.replace(/^,\s*/,""),S.getLogger().debug("Lex (right): dir:",w.yytext),"DIR";break;case 86:return w.yytext=w.yytext.replace(/^,\s*/,""),S.getLogger().debug("Lex (left):",w.yytext),"DIR";break;case 87:return w.yytext=w.yytext.replace(/^,\s*/,""),S.getLogger().debug("Lex (x):",w.yytext),"DIR";break;case 88:return w.yytext=w.yytext.replace(/^,\s*/,""),S.getLogger().debug("Lex (y):",w.yytext),"DIR";break;case 89:return w.yytext=w.yytext.replace(/^,\s*/,""),S.getLogger().debug("Lex (up):",w.yytext),"DIR";break;case 90:return w.yytext=w.yytext.replace(/^,\s*/,""),S.getLogger().debug("Lex (down):",w.yytext),"DIR";break;case 91:return w.yytext="]>",S.getLogger().debug("Lex (ARROW_DIR end):",w.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return S.getLogger().debug("Lex: LINK","#"+w.yytext+"#"),15;break;case 93:return S.getLogger().debug("Lex: LINK",w.yytext),15;break;case 94:return S.getLogger().debug("Lex: LINK",w.yytext),15;break;case 95:return S.getLogger().debug("Lex: LINK",w.yytext),15;break;case 96:return S.getLogger().debug("Lex: START_LINK",w.yytext),this.pushState("LLABEL"),16;break;case 97:return S.getLogger().debug("Lex: START_LINK",w.yytext),this.pushState("LLABEL"),16;break;case 98:return S.getLogger().debug("Lex: START_LINK",w.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return S.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),S.getLogger().debug("Lex: LINK","#"+w.yytext+"#"),15;break;case 102:return this.popState(),S.getLogger().debug("Lex: LINK",w.yytext),15;break;case 103:return this.popState(),S.getLogger().debug("Lex: LINK",w.yytext),15;break;case 104:return S.getLogger().debug("Lex: COLON",w.yytext),w.yytext=w.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return C})();x.lexer=k;function T(){this.yy={}}return s(T,"Parser"),T.prototype=x,x.Parser=T,new T})();N7.parser=N7;qgt=N7});function _qt(e){switch(z.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return z.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 Eqt(e){switch(z.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function vqt(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}var rl,M7,O7,Ugt,Hgt,xqt,Xgt,bqt,Dv,B7,kqt,Tqt,Cqt,Sqt,Kgt,P7,c2,wqt,Ygt,Aqt,Rqt,Lqt,Dqt,Iqt,Nqt,Oqt,Mqt,Bqt,Pqt,$qt,Fqt,Vqt,Qgt,Zgt=b(()=>{"use strict";OD();Qe();ye();Jt();fr();yi();rl=new Map,M7=[],O7=new Map,Ugt="color",Hgt="fill",xqt="bgFill",Xgt=",",bqt=Q(),Dv=new Map,B7="",kqt=s(e=>qt.sanitizeText(e,bqt),"sanitizeText"),Tqt=s(function(e,t=""){let r=Dv.get(e);r||(r={id:e,styles:[],textStyles:[]},Dv.set(e,r)),t?.split(Xgt).forEach(i=>{let n=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Ugt).exec(i)){let o=n.replace(Hgt,xqt).replace(Ugt,Hgt);r.textStyles.push(o)}r.styles.push(n)})},"addStyleClass"),Cqt=s(function(e,t=""){let r=rl.get(e);t!=null&&(r.styles=t.split(Xgt))},"addStyle2Node"),Sqt=s(function(e,t){e.split(",").forEach(function(r){let i=rl.get(r);if(i===void 0){let n=r.trim();i={id:n,type:"na",children:[]},rl.set(n,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),Kgt=s((e,t)=>{let r=e.flat(),i=[],a=r.find(o=>o?.type==="column-setting")?.columns??-1;for(let o of r){if(typeof a=="number"&&a>0&&o.type!=="column-setting"&&typeof o.widthInColumns=="number"&&o.widthInColumns>a&&z.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width ${a}`),o.label&&(o.label=kqt(o.label)),o.type==="classDef"){Tqt(o.id,o.css);continue}if(o.type==="applyClass"){Sqt(o.id,o?.styleClass??"");continue}if(o.type==="applyStyles"){o?.stylesStr&&Cqt(o.id,o?.stylesStr);continue}if(o.type==="column-setting")t.columns=o.columns??-1;else if(o.type==="edge"){let l=(O7.get(o.id)??0)+1;O7.set(o.id,l),o.id=l+"-"+o.id,M7.push(o)}else{o.label||(o.type==="composite"?o.label="":o.label=o.id);let l=rl.get(o.id);if(l===void 0?rl.set(o.id,o):(o.type!=="na"&&(l.type=o.type),o.label!==o.id&&(l.label=o.label)),o.children&&Kgt(o.children,o),o.type==="space"){let u=o.width??1;for(let h=0;h{z.debug("Clear called"),He(),c2={id:"root",type:"composite",children:[],columns:-1},rl=new Map([["root",c2]]),P7=[],Dv=new Map,M7=[],O7=new Map,B7=""},"clear");s(_qt,"typeStr2Type");s(Eqt,"edgeTypeStr2Type");s(vqt,"edgeStrToEdgeData");Ygt=0,Aqt=s(()=>(Ygt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ygt),"generateId"),Rqt=s(e=>{c2.children=e,Kgt(e,c2),P7=c2.children},"setHierarchy"),Lqt=s(e=>{let t=rl.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Dqt=s(()=>[...rl.values()],"getBlocksFlat"),Iqt=s(()=>P7||[],"getBlocks"),Nqt=s(()=>M7,"getEdges"),Oqt=s(e=>rl.get(e),"getBlock"),Mqt=s(e=>{rl.set(e.id,e)},"setBlock"),Bqt=s(e=>{B7=e},"setDiagramId"),Pqt=s(()=>B7,"getDiagramId"),$qt=s(()=>z,"getLogger"),Fqt=s(function(){return Dv},"getClasses"),Vqt={getConfig:s(()=>le().block,"getConfig"),typeStr2Type:_qt,edgeTypeStr2Type:Eqt,edgeStrToEdgeData:vqt,getLogger:$qt,getBlocksFlat:Dqt,getBlocks:Iqt,getEdges:Nqt,setHierarchy:Rqt,getBlock:Oqt,setBlock:Mqt,getColumns:Lqt,getClasses:Fqt,clear:wqt,generateId:Aqt,setDiagramId:Bqt,getDiagramId:Pqt},Qgt=Vqt});var $7,zqt,Jgt,tyt=b(()=>{"use strict";hn();Gm();$7=s((e,t)=>{let r=Xh,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return qi(i,n,a,t)},"fade"),zqt=s(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + /* + * This is for backward compatibility with existing code that didn't + * add a \`

    \` around edge labels. + * + * TODO: We should probably remove this in a future release. + */ + p { + margin: 0; + padding: 0; + display: inline; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + + .node .cluster { + // fill: ${$7(e.mainBkg,.5)}; + fill: ${$7(e.clusterBkg,.5)}; + stroke: ${$7(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${Pl()} +`,"getStyles"),Jgt=zqt});var Gqt,Wqt,qqt,jqt,Uqt,Hqt,Yqt,Xqt,Kqt,Qqt,Zqt,eyt,ryt=b(()=>{"use strict";Jt();Gqt=s((e,t,r,i)=>{t.forEach(n=>{Zqt[n](e,r,i)})},"insertMarkers"),Wqt=s((e,t,r)=>{z.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),qqt=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),jqt=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Uqt=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Hqt=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Yqt=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Xqt=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Kqt=s((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Qqt=s((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Zqt={extension:Wqt,composition:qqt,aggregation:jqt,dependency:Uqt,lollipop:Hqt,point:Yqt,circle:Xqt,cross:Kqt,barb:Qqt},eyt=Gqt});function iyt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let r=t%e,i=Math.floor(t/e);return{px:r,py:i}}function F7(e,t,r=0,i=0){z.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",r),e?.size?.width||(e.size={width:r,height:i,x:0,y:0});let n=0,a=0;if(e.children?.length>0){for(let m of e.children)F7(m,t);let o=Jqt(e);n=o.width,a=o.height,z.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",n,a);for(let m of e.children)m.size&&(z.debug(`abc95 Setting size of children of ${e.id} id=${m.id} ${n} ${a} ${JSON.stringify(m.size)}`),m.size.width=n*(m.widthInColumns??1)+Qi*((m.widthInColumns??1)-1),m.size.height=a,m.size.x=0,m.size.y=0,z.debug(`abc95 updating size of ${e.id} children child:${m.id} maxWidth:${n} maxHeight:${a}`));for(let m of e.children)F7(m,t,n,a);let l=e.columns??-1,u=0;for(let m of e.children)u+=m.widthInColumns??1;let h=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(m>0){let g=(f-m*Qi-Qi)/m;z.debug("abc95 (growing to fit) width",e.id,f,e.size?.width,g);for(let y of e.children)y.size&&(y.size.width=g)}}e.size={width:f,height:p,x:0,y:0}}z.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function nyt(e,t){z.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let r=e.columns??-1;if(z.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,n=e.children.length*i+(e.children.length-1)*Qi;z.debug("widthOfChildren 88",n,"posX");let a=new Map;{let d=0;for(let f of e.children){if(!f.size)continue;let{py:p}=iyt(r,d),m=a.get(p)??0;f.size.height>m&&a.set(p,f.size.height);let g=f?.widthInColumns??1;r>0&&(g=Math.min(g,r-d%r)),d+=g}}let o=new Map;{let d=0,f=[...a.keys()].sort((p,m)=>p-m);for(let p of f)o.set(p,d),d+=(a.get(p)??0)+Qi}let l=0;z.debug("abc91 block?.size?.x",e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-Qi,h=0;for(let d of e.children){let f=e;if(!d.size)continue;let{width:p,height:m}=d.size,{px:g,py:y}=iyt(r,l);if(y!=h&&(h=y,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-Qi,z.debug("New row in layout for block",e.id," and child ",d.id,h)),z.debug(`abc89 layout blocks (child) id: ${d.id} Pos: ${l} (px, py) ${g},${y} (${f?.size?.x},${f?.size?.y}) parent: ${f.id} width: ${p}${Qi}`),f.size){let k=p/2;d.size.x=u+Qi+k,z.debug(`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${u} new startingPosX${d.size.x} ${k} padding=${Qi} width=${p} halfWidth=${k} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 ${p*(d?.widthInColumns??1)/2}`),u=d.size.x+k;let T=o.get(y)??0,C=a.get(y)??m;d.size.y=f.size.y-f.size.height/2+T+C/2+Qi,z.debug(`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${u}${Qi}${k}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${p*(d?.widthInColumns??1)/2}`)}d.children&&nyt(d,t);let x=d?.widthInColumns??1;r>0&&(x=Math.min(x,r-l%r)),l+=x,z.debug("abc88 columnsPos",d,l)}}z.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function syt(e,{minX:t,minY:r,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:a,y:o,width:l,height:u}=e.size;a-l/2i&&(i=a+l/2),o+u/2>n&&(n=o+u/2)}if(e.children)for(let a of e.children)({minX:t,minY:r,maxX:i,maxY:n}=syt(a,{minX:t,minY:r,maxX:i,maxY:n}));return{minX:t,minY:r,maxX:i,maxY:n}}function ayt(e){let t=e.getBlock("root");if(!t)return;F7(t,e,0,0),nyt(t,e),z.debug("getBlocks",JSON.stringify(t,null,2));let{minX:r,minY:i,maxX:n,maxY:a}=syt(t),o=a-i,l=n-r;return{x:r,y:i,width:l,height:o}}var Qi,Jqt,oyt=b(()=>{"use strict";Jt();ye();Qi=Q()?.block?.padding??8;s(iyt,"calculateBlockPosition");Jqt=s(e=>{let t=0,r=0;for(let i of e.children){let{width:n,height:a,x:o,y:l}=i.size??{width:0,height:0,x:0,y:0};z.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",a,"x:",o,"y:",l,i.type),i.type!=="space"&&(n>t&&(t=n/(i.widthInColumns??1)),a>r&&(r=a))}return{width:t,height:r}},"getMaxChildSize");s(F7,"setBlockSizes");s(nyt,"layoutBlocks");s(syt,"findBounds");s(ayt,"layout")});var tjt,ua,Iv=b(()=>{"use strict";Qe();ye();Xa();tjt=s(async(e,t,r,i=!1,n=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let o=Q(),l=Ke(o);return await zi(e,a,{style:r,isTitle:i,useHtmlLabels:l,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},o)},"createLabel"),ua=tjt});var cyt,ejt,lyt,uyt=b(()=>{"use strict";Jt();cyt=s((e,t,r,i,n)=>{t.arrowTypeStart&&lyt(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&lyt(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),ejt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},lyt=s((e,t,r,i,n,a)=>{let o=ejt[r];if(!o){z.warn(`Unknown arrow type: ${r}`);return}let l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${n}_${a}-${o}${l})`)},"addEdgeMarker")});function Nv(e,t){Ke(Q())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}var V7,hs,dyt,fyt,rjt,ijt,hyt,pyt,myt=b(()=>{"use strict";Jt();Iv();Xa();mD();lr();ye();Qe();Re();fr();yD();B0();uyt();V7={},hs={},dyt=s(async(e,t)=>{let r=Q(),i=Ke(r),n=e.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label"),o=t.labelType==="markdown",l=await zi(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:o,isNode:!1,markdown:o,width:o?void 0:Number.POSITIVE_INFINITY},r);a.node().appendChild(l);let u=l.getBBox(),h=u;if(i){let f=l.children[0],p=vt(l);u=f.getBoundingClientRect(),h=u,p.attr("width",u.width),p.attr("height",u.height)}else{let f=vt(l).select("text").node();f&&typeof f.getBBox=="function"&&(h=f.getBBox())}a.attr("transform",Qa(h,i)),V7[t.id]=n,t.width=u.width,t.height=u.height;let d;if(t.startLabelLeft){let f=e.insert("g").attr("class","edgeTerminals"),p=f.insert("g").attr("class","inner"),m=await ua(p,t.startLabelLeft,t.labelStyle);d=m;let g=m.getBBox();if(i){let y=m.children[0],x=vt(m);g=y.getBoundingClientRect(),x.attr("width",g.width),x.attr("height",g.height)}p.attr("transform",Qa(g,i)),hs[t.id]||(hs[t.id]={}),hs[t.id].startLeft=f,Nv(d,t.startLabelLeft)}if(t.startLabelRight){let f=e.insert("g").attr("class","edgeTerminals"),p=f.insert("g").attr("class","inner"),m=await ua(f,t.startLabelRight,t.labelStyle);d=m,p.node().appendChild(m);let g=m.getBBox();if(i){let y=m.children[0],x=vt(m);g=y.getBoundingClientRect(),x.attr("width",g.width),x.attr("height",g.height)}p.attr("transform",Qa(g,i)),hs[t.id]||(hs[t.id]={}),hs[t.id].startRight=f,Nv(d,t.startLabelRight)}if(t.endLabelLeft){let f=e.insert("g").attr("class","edgeTerminals"),p=f.insert("g").attr("class","inner"),m=await ua(p,t.endLabelLeft,t.labelStyle);d=m;let g=m.getBBox();if(i){let y=m.children[0],x=vt(m);g=y.getBoundingClientRect(),x.attr("width",g.width),x.attr("height",g.height)}p.attr("transform",Qa(g,i)),f.node().appendChild(m),hs[t.id]||(hs[t.id]={}),hs[t.id].endLeft=f,Nv(d,t.endLabelLeft)}if(t.endLabelRight){let f=e.insert("g").attr("class","edgeTerminals"),p=f.insert("g").attr("class","inner"),m=await ua(p,t.endLabelRight,t.labelStyle);d=m;let g=m.getBBox();if(i){let y=m.children[0],x=vt(m);g=y.getBoundingClientRect(),x.attr("width",g.width),x.attr("height",g.height)}p.attr("transform",Qa(g,i)),f.node().appendChild(m),hs[t.id]||(hs[t.id]={}),hs[t.id].endRight=f,Nv(d,t.endLabelRight)}return l},"insertEdgeLabel");s(Nv,"setTerminalWidth");fyt=s((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,V7[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath,i=Q(),{subGraphTitleTotalMargin:n}=Lc(i);if(e.label){let a=V7[e.id],o=e.x,l=e.y;if(r){let u=Te.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+n/2})`)}if(e.startLabelLeft){let a=hs[e.id].startLeft,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let a=hs[e.id].startRight,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let a=hs[e.id].endLeft,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let a=hs[e.id].endRight,o=e.x,l=e.y;if(r){let u=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),rjt=s((e,t)=>{let r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,l=e.height/2;return n>=o||a>=l},"outsideNode"),ijt=s((e,t,r)=>{z.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2,l=r.xMath.abs(i-t.x)*u){let f=r.y{z.debug("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(!rjt(t,a)&&!n){let o=ijt(t,i,a),l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)||r.push(o),n=!0}else i=a,n||r.push(a)}),r},"cutPathAtIntersect"),pyt=s(function(e,t,r,i,n,a,o){let l=r.points;z.debug("abc88 InsertEdge: edge=",r,"e=",t);let u=!1,h=a.node(t.v);var d=a.node(t.w);d?.intersect&&h?.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(h.intersect(l[0])),l.push(d.intersect(l[l.length-1]))),r.toCluster&&(z.debug("to cluster abc88",i[r.toCluster]),l=hyt(r.points,i[r.toCluster].node),u=!0),r.fromCluster&&(z.debug("from cluster abc88",i[r.fromCluster]),l=hyt(l.reverse(),i[r.fromCluster].node).reverse(),u=!0);let f=l.filter(_=>!Number.isNaN(_.y)),p=Oo;r.curve&&(n==="graph"||n==="flowchart")&&(p=r.curve);let{x:m,y:g}=fC(r),y=No().x(m).y(g).curve(p),x;switch(r.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-thick";break;default:x=""}switch(r.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break}let k=e.append("path").attr("d",y(f)).attr("id",r.id).attr("class"," "+x+(r.classes?" "+r.classes:"")).attr("style",r.style),T="";(Q().flowchart.arrowMarkerAbsolute||Q().state.arrowMarkerAbsolute)&&(T=Kh(!0)),cyt(k,r,T,o,n);let C={};return u&&(C.updatedPath=l),C.originalPath=r.points,C},"insertEdge")});var njt,gyt,yyt=b(()=>{"use strict";njt=s(e=>{let t=new Set;for(let r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),gyt=s((e,t,r)=>{let i=njt(e),n=2,a=t.height+2*r.padding,o=a/n,l=t.width+2*o+r.padding,u=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:o,y:0},{x:l/2,y:2*u},{x:l-o,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*u,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-o,y:-a},{x:l/2,y:-a-2*u},{x:o,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*u,y:-a/2},{x:0,y:-a/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:o,y:0},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:o,y:-a},{x:l-o,y:-a},{x:l,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:l,y:-o},{x:l,y:-a+o},{x:0,y:-a}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:l,y:0},{x:0,y:-o},{x:0,y:-a+o},{x:l,y:-a}]:i.has("right")&&i.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a},{x:0,y:-a/2}]:i.has("up")&&i.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u},{x:l,y:-u}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:l,y:-o},{x:0,y:-a}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:i.has("left")&&i.has("up")?[{x:l,y:0},{x:0,y:-o},{x:l,y:-a}]:i.has("left")&&i.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:i.has("right")?[{x:o,y:-u},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a+u}]:i.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a},{x:0,y:-a/2}]:i.has("up")?[{x:o,y:-u},{x:o,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u}]:i.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u},{x:l,y:-u}]:[{x:0,y:0}]},"getArrowPoints")});function sjt(e,t){return e.intersect(t)}var xyt,byt=b(()=>{"use strict";s(sjt,"intersectNode");xyt=sjt});function ajt(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,l=a-i.y,u=Math.sqrt(t*t*l*l+r*r*o*o),h=Math.abs(t*r*o/u);i.x{"use strict";s(ajt,"intersectEllipse");Ov=ajt});function ojt(e,t,r){return Ov(e,t,t,r)}var kyt,Tyt=b(()=>{"use strict";z7();s(ojt,"intersectCircle");kyt=ojt});function ljt(e,t,r,i){var n,a,o,l,u,h,d,f,p,m,g,y,x,k,T;if(n=t.y-e.y,o=e.x-t.x,u=t.x*e.y-e.x*t.y,p=n*r.x+o*r.y+u,m=n*i.x+o*i.y+u,!(p!==0&&m!==0&&Cyt(p,m))&&(a=i.y-r.y,l=r.x-i.x,h=i.x*r.y-r.x*i.y,d=a*e.x+l*e.y+h,f=a*t.x+l*t.y+h,!(d!==0&&f!==0&&Cyt(d,f))&&(g=n*l-a*o,g!==0)))return y=Math.abs(g/2),x=o*h-l*u,k=x<0?(x-y)/g:(x+y)/g,x=a*u-n*h,T=x<0?(x-y)/g:(x+y)/g,{x:k,y:T}}function Cyt(e,t){return e*t>0}var Syt,wyt=b(()=>{"use strict";s(ljt,"intersectLine");s(Cyt,"sameSign");Syt=ljt});function cjt(e,t,r){var i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(g){o=Math.min(o,g.x),l=Math.min(l,g.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));for(var u=i-e.width/2-o,h=n-e.height/2-l,d=0;d1&&a.sort(function(g,y){var x=g.x-r.x,k=g.y-r.y,T=Math.sqrt(x*x+k*k),C=y.x-r.x,_=y.y-r.y,S=Math.sqrt(C*C+_*_);return T{"use strict";wyt();_yt=cjt;s(cjt,"intersectPolygon")});var ujt,vyt,Ayt=b(()=>{"use strict";ujt=s((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,l=e.height/2,u,h;return Math.abs(a)*o>Math.abs(n)*l?(a<0&&(l=-l),u=a===0?0:l*n/a,h=l):(n<0&&(o=-o),u=o,h=n===0?0:o*a/n),{x:r+u,y:i+h}},"intersectRect"),vyt=ujt});var mi,G7=b(()=>{"use strict";byt();Tyt();z7();Eyt();Ayt();mi={node:xyt,circle:kyt,ellipse:Ov,polygon:_yt,rect:vyt}});function il(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var on,Ii,W7=b(()=>{"use strict";Iv();Xa();ye();Qe();lr();fr();Re();WL();on=s(async(e,t,r,i)=>{let n=Q(),a,o=t.useHtmlLabels||Ke(n);r?a=r:a="node default";let l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),u=l.insert("g").attr("class","label").attr("style",t.labelStyle),h;t.labelText===void 0?h="":h=typeof t.labelText=="string"?t.labelText:t.labelText[0];let d;t.labelType==="markdown"?d=zi(u,nr(ks(h),n),{useHtmlLabels:o,width:t.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):d=await ua(u,nr(ks(h),n),t.labelStyle,!1,i);let f=d.getBBox(),p=t.padding/2;if(Ke(n)){let m=d.children[0],g=vt(d);await YT(m,h),f=m.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return o?u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):u.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:l,bbox:f,halfPadding:p,label:u}},"labelHelper"),Ii=s((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");s(il,"insertPolygonShape")});var hjt,Ryt,Lyt=b(()=>{"use strict";W7();Jt();ye();Qe();G7();hjt=s(async(e,t)=>{t.useHtmlLabels||Ke(Q())||(t.centerLabel=!0);let{shapeSvg:i,bbox:n,halfPadding:a}=await on(e,t,"node "+t.classes,!0);z.info("Classes = ",t.classes);let o=i.insert("rect",":first-child");return o.attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-a).attr("y",-n.height/2-a).attr("width",n.width+t.padding).attr("height",n.height+t.padding),Ii(t,o),t.intersect=function(l){return mi.rect(t,l)},i},"note"),Ryt=hjt});function q7(e,t,r,i){let n=[],a=s(l=>{n.push(l,0)},"addBorder"),o=s(l=>{n.push(0,l)},"skipBorder");t.includes("t")?(z.debug("add top border"),a(r)):o(r),t.includes("r")?(z.debug("add right border"),a(i)):o(i),t.includes("b")?(z.debug("add bottom border"),a(r)):o(r),t.includes("l")?(z.debug("add left border"),a(i)):o(i),e.attr("stroke-dasharray",n.join(" "))}var Dyt,Na,Iyt,djt,fjt,pjt,mjt,gjt,yjt,xjt,bjt,kjt,Tjt,Cjt,Sjt,wjt,_jt,Ejt,vjt,Ajt,Rjt,Ljt,Nyt,Djt,Ijt,Oyt,Mv,j7,Myt,Byt=b(()=>{"use strict";lr();ye();Qe();Jt();yyt();Iv();G7();Lyt();W7();Dyt=s(e=>e?" "+e:"","formatClass"),Na=s((e,t)=>`${t||"node default"}${Dyt(e.classes)} ${Dyt(e.class)}`,"getClassesFromNode"),Iyt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,o=n+a,l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];z.info("Question main (Circle)");let u=il(r,o,o,l);return u.attr("style",t.style),Ii(t,u),t.intersect=function(h){return z.warn("Intersect called"),mi.polygon(t,l,h)},r},"question"),djt=s((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,n=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return r.insert("polygon",":first-child").attr("points",n.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(o){return mi.circle(t,14,o)},r},"choice"),fjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=4,a=i.height+t.padding,o=a/n,l=i.width+2*o+t.padding,u=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],h=il(r,l,a,u);return h.attr("style",t.style),Ii(t,h),t.intersect=function(d){return mi.polygon(t,u,d)},r},"hexagon"),pjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,void 0,!0),n=2,a=i.height+2*t.padding,o=a/n,l=i.width+2*o+t.padding,u=gyt(t.directions,i,t),h=il(r,l,a,u);return h.attr("style",t.style),Ii(t,h),t.intersect=function(d){return mi.polygon(t,u,d)},r},"block_arrow"),mjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,o=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return il(r,n,a,o).attr("style",t.style),t.width=n+a,t.height=a,t.intersect=function(u){return mi.polygon(t,o,u)},r},"rect_left_inv_arrow"),gjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t),!0),n=i.width+t.padding,a=i.height+t.padding,o=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],l=il(r,n,a,o);return l.attr("style",t.style),Ii(t,l),t.intersect=function(u){return mi.polygon(t,o,u)},r},"lean_right"),yjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,o=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],l=il(r,n,a,o);return l.attr("style",t.style),Ii(t,l),t.intersect=function(u){return mi.polygon(t,o,u)},r},"lean_left"),xjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,o=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],l=il(r,n,a,o);return l.attr("style",t.style),Ii(t,l),t.intersect=function(u){return mi.polygon(t,o,u)},r},"trapezoid"),bjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,o=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=il(r,n,a,o);return l.attr("style",t.style),Ii(t,l),t.intersect=function(u){return mi.polygon(t,o,u)},r},"inv_trapezoid"),kjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,o=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],l=il(r,n,a,o);return l.attr("style",t.style),Ii(t,l),t.intersect=function(u){return mi.polygon(t,o,u)},r},"rect_right_inv_arrow"),Tjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.width+t.padding,a=n/2,o=a/(2.5+n/50),l=i.height+o+t.padding,u="M 0,"+o+" a "+a+","+o+" 0,0,0 "+n+" 0 a "+a+","+o+" 0,0,0 "+-n+" 0 l 0,"+l+" a "+a+","+o+" 0,0,0 "+n+" 0 l 0,"+-l,h=r.attr("label-offset-y",o).insert("path",":first-child").attr("style",t.style).attr("d",u).attr("transform","translate("+-n/2+","+-(l/2+o)+")");return Ii(t,h),t.intersect=function(d){let f=mi.rect(t,d),p=f.x-t.x;if(a!=0&&(Math.abs(p)t.height/2-o)){let m=o*o*(1-p*p/(a*a));m!=0&&(m=Math.sqrt(m)),m=o-m,d.y-t.y>0&&(m=-m),f.y+=m}return f},r},"cylinder"),Cjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await on(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),o=t.positioned?t.width:i.width+t.padding,l=t.positioned?t.height:i.height+t.padding,u=t.positioned?-o/2:-i.width/2-n,h=t.positioned?-l/2:-i.height/2-n;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",u).attr("y",h).attr("width",o).attr("height",l),t.props){let d=new Set(Object.keys(t.props));t.props.borders&&(q7(a,t.props.borders,o,l),d.delete("borders")),d.forEach(f=>{z.warn(`Unknown node property ${f}`)})}return Ii(t,a),t.intersect=function(d){return mi.rect(t,d)},r},"rect"),Sjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await on(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),o=t.positioned?t.width:i.width+t.padding,l=t.positioned?t.height:i.height+t.padding,u=t.positioned?-o/2:-i.width/2-n,h=t.positioned?-l/2:-i.height/2-n;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",u).attr("y",h).attr("width",o).attr("height",l),t.props){let d=new Set(Object.keys(t.props));t.props.borders&&(q7(a,t.props.borders,o,l),d.delete("borders")),d.forEach(f=>{z.warn(`Unknown node property ${f}`)})}return Ii(t,a),t.intersect=function(d){return mi.rect(t,d)},r},"composite"),wjt=s(async(e,t)=>{let{shapeSvg:r}=await on(e,t,"label",!0);z.trace("Classes = ",t.class);let i=r.insert("rect",":first-child"),n=0,a=0;if(i.attr("width",n).attr("height",a),r.attr("class","label edgeLabel"),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(q7(i,t.props.borders,n,a),o.delete("borders")),o.forEach(l=>{z.warn(`Unknown node property ${l}`)})}return Ii(t,i),t.intersect=function(o){return mi.rect(t,o)},r},"labelRect");s(q7,"applyNodePropertyBorders");_jt=s(async(e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";let i=e.insert("g").attr("class",r).attr("id",t.domId||t.id),n=i.insert("rect",":first-child"),a=i.insert("line"),o=i.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText,u="";typeof l=="object"?u=l[0]:u=l,z.info("Label text abc79",u,l,typeof l=="object");let h=await ua(o,u,t.labelStyle,!0,!0),d={width:0,height:0};if(Ke(Q())){let y=h.children[0],x=vt(h);d=y.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height)}z.info("Text 2",l);let f=l.slice(1,l.length),p=h.getBBox(),m=await ua(o,f.join?f.join("
    "):f,t.labelStyle,!0,!0);if(Ke(Q())){let y=m.children[0],x=vt(m);d=y.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height)}let g=t.padding/2;return vt(m).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+g+5)+")"),vt(h).attr("transform","translate( "+(d.width{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.height+t.padding,a=i.width+n/4+t.padding,o=r.insert("rect",":first-child").attr("style",t.style).attr("rx",n/2).attr("ry",n/2).attr("x",-a/2).attr("y",-n/2).attr("width",a).attr("height",n);return Ii(t,o),t.intersect=function(l){return mi.rect(t,l)},r},"stadium"),vjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await on(e,t,Na(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),z.info("Circle main"),Ii(t,a),t.intersect=function(o){return z.info("Circle intersect",t,i.width/2+n,o),mi.circle(t,i.width/2+n,o)},r},"circle"),Ajt=s(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await on(e,t,Na(t,void 0),!0),a=5,o=r.insert("g",":first-child"),l=o.insert("circle"),u=o.insert("circle");return o.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n+a).attr("width",i.width+t.padding+a*2).attr("height",i.height+t.padding+a*2),u.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),z.info("DoubleCircle main"),Ii(t,l),t.intersect=function(h){return z.info("DoubleCircle intersect",t,i.width/2+n+a,h),mi.circle(t,i.width/2+n+a,h)},r},"doublecircle"),Rjt=s(async(e,t)=>{let{shapeSvg:r,bbox:i}=await on(e,t,Na(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,o=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=il(r,n,a,o);return l.attr("style",t.style),Ii(t,l),t.intersect=function(u){return mi.polygon(t,o,u)},r},"subroutine"),Ljt=s((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ii(t,i),t.intersect=function(n){return mi.circle(t,7,n)},r},"start"),Nyt=s((e,t,r)=>{let i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=70,a=10;r==="LR"&&(n=10,a=70);let o=i.append("rect").attr("x",-1*n/2).attr("y",-1*a/2).attr("width",n).attr("height",a).attr("class","fork-join");return Ii(t,o),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return mi.rect(t,l)},i},"forkJoin"),Djt=s((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ii(t,n),t.intersect=function(a){return mi.circle(t,7,a)},r},"end"),Ijt=s(async(e,t)=>{let r=t.padding/2,i=4,n=8,a;t.classes?a="node "+t.classes:a="node default";let o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=o.insert("rect",":first-child"),u=o.insert("line"),h=o.insert("line"),d=0,f=i,p=o.insert("g").attr("class","label"),m=0,g=t.classData.annotations?.[0],y=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",x=await ua(p,y,t.labelStyle,!0,!0),k=x.getBBox();if(Ke(Q())){let v=x.children[0],M=vt(x);k=v.getBoundingClientRect(),M.attr("width",k.width),M.attr("height",k.height)}t.classData.annotations[0]&&(f+=k.height+i,d+=k.width);let T=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(Ke(Q())?T+="<"+t.classData.type+">":T+="<"+t.classData.type+">");let C=await ua(p,T,t.labelStyle,!0,!0);vt(C).attr("class","classTitle");let _=C.getBBox();if(Ke(Q())){let v=C.children[0],M=vt(C);_=v.getBoundingClientRect(),M.attr("width",_.width),M.attr("height",_.height)}f+=_.height+i,_.width>d&&(d=_.width);let S=[];t.classData.members.forEach(async v=>{let M=v.getDisplayDetails(),$=M.displayText;Ke(Q())&&($=$.replace(//g,">"));let I=await ua(p,$,M.cssStyle?M.cssStyle:t.labelStyle,!0,!0),F=I.getBBox();if(Ke(Q())){let B=I.children[0],O=vt(I);F=B.getBoundingClientRect(),O.attr("width",F.width),O.attr("height",F.height)}F.width>d&&(d=F.width),f+=F.height+i,S.push(I)}),f+=n;let w=[];if(t.classData.methods.forEach(async v=>{let M=v.getDisplayDetails(),$=M.displayText;Ke(Q())&&($=$.replace(//g,">"));let I=await ua(p,$,M.cssStyle?M.cssStyle:t.labelStyle,!0,!0),F=I.getBBox();if(Ke(Q())){let B=I.children[0],O=vt(I);F=B.getBoundingClientRect(),O.attr("width",F.width),O.attr("height",F.height)}F.width>d&&(d=F.width),f+=F.height+i,w.push(I)}),f+=n,g){let v=(d-k.width)/2;vt(x).attr("transform","translate( "+(-1*d/2+v)+", "+-1*f/2+")"),m=k.height+i}let A=(d-_.width)/2;return vt(C).attr("transform","translate( "+(-1*d/2+A)+", "+(-1*f/2+m)+")"),m+=_.height+i,u.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+n+m).attr("y2",-f/2-r+n+m),m+=n,S.forEach(v=>{vt(v).attr("transform","translate( "+-d/2+", "+(-1*f/2+m+n/2)+")");let M=v?.getBBox();m+=(M?.height??0)+i}),m+=n,h.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+n+m).attr("y2",-f/2-r+n+m),m+=n,w.forEach(v=>{vt(v).attr("transform","translate( "+-d/2+", "+(-1*f/2+m)+")");let M=v?.getBBox();m+=(M?.height??0)+i}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-d/2-r).attr("y",-(f/2)-r).attr("width",d+t.padding).attr("height",f+t.padding),Ii(t,l),t.intersect=function(v){return mi.rect(t,v)},o},"class_box"),Oyt={rhombus:Iyt,composite:Sjt,question:Iyt,rect:Cjt,labelRect:wjt,rectWithTitle:_jt,choice:djt,circle:vjt,doublecircle:Ajt,stadium:Ejt,hexagon:fjt,block_arrow:pjt,rect_left_inv_arrow:mjt,lean_right:gjt,lean_left:yjt,trapezoid:xjt,inv_trapezoid:bjt,rect_right_inv_arrow:kjt,cylinder:Tjt,start:Ljt,end:Djt,note:Ryt,subroutine:Rjt,fork:Nyt,join:Nyt,class_box:Ijt},Mv={},j7=s(async(e,t,r)=>{let i,n;if(t.link){let a;Q().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),n=await Oyt[t.shape](i,t,r)}else n=await Oyt[t.shape](e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),t.class&&n.attr("class","node default "+t.class),Mv[t.id]=i,t.haveCallback&&Mv[t.id].attr("class",Mv[t.id].attr("class")+" clickable"),i},"insertNode"),Myt=s(e=>{let t=Mv[e.id];z.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode")});function Pyt(e,t,r=!1){let i=e,n="default";(i?.classes?.length||0)>0&&(n=(i?.classes??[]).join(" ")),n=n+" flowchart-label";let a=0,o="",l;switch(i.type){case"round":a=5,o="rect";break;case"composite":a=0,o="composite",l=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"}let u=aL(i?.styles??[]),h=i.label,d=i.size??{width:0,height:0,x:0,y:0},f=t.getDiagramId();return{labelStyle:u.labelStyle,shape:o,labelText:h,rx:a,ry:a,class:n,style:u.style,id:i.id,domId:f?`${f}-${i.id}`:i.id,directions:i.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:r,intersect:void 0,type:i.type,padding:l??le()?.block?.padding??0}}async function Njt(e,t,r){let i=Pyt(t,r,!1);if(i.type==="group")return;let n=le(),a=await j7(e,i,{config:n}),o=a.node().getBBox(),l=r.getBlock(i.id);l.size={width:o.width,height:o.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}async function Ojt(e,t,r){let i=Pyt(t,r,!0);if(r.getBlock(i.id).type!=="space"){let a=le();await j7(e,i,{config:a}),t.intersect=i?.intersect,Myt(i)}}async function U7(e,t,r,i){for(let n of t)await i(e,n,r),n.children&&await U7(e,n.children,r,i)}async function $yt(e,t,r){await U7(e,t,r,Njt)}async function Fyt(e,t,r){await U7(e,t,r,Ojt)}async function Vyt(e,t,r,i,n){let a=new Ur({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let o of r)o.size&&a.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(let o of t)if(o.start&&o.end){let l=i.getBlock(o.start),u=i.getBlock(o.end);if(l?.size&&u?.size){let h=l.size,d=u.size,f=[{x:h.x,y:h.y},{x:h.x+(d.x-h.x)/2,y:h.y+(d.y-h.y)/2},{x:d.x,y:d.y}],p=n?`${n}-${o.id}`:o.id;pyt(e,{v:o.start,w:o.end,name:p},{...o,id:p,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,n),o.label&&(await dyt(e,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),fyt({...o,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var zyt=b(()=>{"use strict";to();Qe();myt();Byt();Re();s(Pyt,"getNodeFromBlock");s(Njt,"calculateBlockSize");s(Ojt,"insertBlockPositioned");s(U7,"performOperations");s($yt,"calculateBlockSizes");s(Fyt,"insertBlocks");s(Vyt,"insertEdges")});var Mjt,Bjt,Gyt,Wyt=b(()=>{"use strict";lr();Qe();ryt();Jt();gi();oyt();zyt();Mjt=s(function(e,t){return t.db.getClasses()},"getClasses"),Bjt=s(async function(e,t,r,i){let{securityLevel:n,block:a}=le(),o=i.db;o.setDiagramId(t);let l;n==="sandbox"&&(l=vt("#i"+t));let u=n==="sandbox"?vt(l.nodes()[0].contentDocument.body):vt("body"),h=n==="sandbox"?u.select(`[id="${t}"]`):vt(`[id="${t}"]`);eyt(h,["point","circle","cross"],i.type,t);let f=o.getBlocks(),p=o.getBlocksFlat(),m=o.getEdges(),g=h.insert("g").attr("class","block");await $yt(g,f,o);let y=ayt(o);if(await Fyt(g,f,o),await Vyt(g,m,p,o,t),y){let x=y,k=Math.max(1,Math.round(.125*(x.width/x.height))),T=x.height+k+10,C=x.width+10,{useMaxWidth:_}=a;pr(h,T,C,!!_),z.debug("Here Bounds",y,x),h.attr("viewBox",`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},"draw"),Gyt={draw:Bjt,getClasses:Mjt}});var qyt={};Fe(qyt,{diagram:()=>Pjt});var Pjt,jyt=b(()=>{"use strict";jgt();Zgt();tyt();Wyt();Pjt={parser:qgt,db:Qgt,renderer:Gyt,styles:Jgt}});var ic,zjt,Gjt,Wjt,qjt,jjt,Ujt,Hjt,u2,H7=b(()=>{"use strict";Qe();ps();yi();Re();NE();ic=new Dh(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),zjt=s(()=>{ic.reset(),He()},"clear"),Gjt=s(()=>ic.records.stack[0],"getRoot"),Wjt=s(()=>ic.records.cnt,"getCount"),qjt=Ue.treeView,jjt=s(()=>Wr(qjt,le().treeView),"getConfig"),Ujt=s((e,t)=>{for(;e<=ic.records.stack[ic.records.stack.length-1].level;)ic.records.stack.pop();let r={id:ic.records.cnt++,level:e,name:t,children:[]};ic.records.stack[ic.records.stack.length-1].children.push(r),ic.records.stack.push(r)},"addNode"),Hjt={clear:zjt,addNode:Ujt,getRoot:Gjt,getCount:Wjt,getConfig:jjt,getAccTitle:Ze,getAccDescription:tr,getDiagramTitle:er,setAccDescription:Je,setAccTitle:Ye,setDiagramTitle:sr},u2=Hjt});var Yjt,Yyt,Xyt=b(()=>{"use strict";Jt();Lh();H7();Xc();Yjt=s(e=>{aa(e,u2),e.nodes.map(t=>u2.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),Yyt={parse:s(async e=>{let t=await Hn("treeView",e);z.debug(t),Yjt(t)},"parse")}});var Xjt,Kyt,Kjt,Qjt,Zjt,Qyt,Zyt=b(()=>{"use strict";Jt();ca();gi();Xjt=s((e,t,r,i,n)=>{let a=i.append("text").text(r.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:o,width:l}=a.node().getBBox(),u=o+n.paddingY*2,h=l+n.paddingX*2;a.attr("x",e+n.paddingX),a.attr("y",t+u/2),r.BBox={x:e,y:t,width:h,height:u}},"positionLabel"),Kyt=s((e,t,r,i,n,a)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",i).attr("y2",n).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),Kjt=s((e,t,r)=>{let i=0,n=0,a=s((l,u,h,d)=>{let f=d*(h.rowIndent+h.paddingX);Xjt(f,i,u,l,h);let{height:p,width:m}=u.BBox;Kyt(l,f-h.rowIndent,i+p/2,f,i+p/2,h.lineThickness),n=Math.max(n,f+m),i+=p},"drawNode"),o=s((l,u=0)=>{a(e,l,r,u),l.children.forEach(p=>{o(p,u+1)});let{x:h,y:d,height:f}=l.BBox;if(l.children.length){let{y:p,height:m}=l.children[l.children.length-1].BBox;Kyt(e,h+r.paddingX,d+f,h+r.paddingX,p+m/2+r.lineThickness/2,r.lineThickness)}},"processNode");return o(t),{totalHeight:i,totalWidth:n}},"drawTree"),Qjt=s((e,t,r,i)=>{z.debug(`Rendering treeView diagram +`+e);let n=i.db,a=n.getRoot(),o=n.getConfig(),l=pi(t),u=l.append("g");u.attr("class","tree-view");let{totalHeight:h,totalWidth:d}=Kjt(u,a,o);l.attr("viewBox",`-${o.lineThickness/2} 0 ${d} ${h}`),pr(l,h,d,o.useMaxWidth)},"draw"),Zjt={draw:Qjt},Qyt=Zjt});var Jjt,tUt,Jyt,t1t=b(()=>{"use strict";Re();Jjt={labelFontSize:"16px",labelColor:"black",lineColor:"black"},tUt=s(({treeView:e})=>{let{labelFontSize:t,labelColor:r,lineColor:i}=Wr(Jjt,e);return` + .treeView-node-label { + font-size: ${t}; + fill: ${r}; + } + .treeView-node-line { + stroke: ${i}; + } + `},"styles"),Jyt=tUt});var e1t={};Fe(e1t,{diagram:()=>eUt});var eUt,r1t=b(()=>{"use strict";Xyt();H7();Zyt();t1t();eUt={db:u2,renderer:Qyt,parser:Yyt,styles:Jyt}});var Y7,s1t,a1t=b(()=>{"use strict";Y7=(function(){var e=s(function(k,T,C,_){for(C=C||{},_=k.length;_--;C[k[_]]=T);return C},"o"),t=[1,4],r=[1,14],i=[1,12],n=[1,13],a=[6,7,8],o=[1,20],l=[1,18],u=[1,19],h=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:s(function(T,C,_,S,w,A,v){var M=A.length-1;switch(w){case 6:case 7:return S;case 15:S.addNode(A[M-1].length,A[M].trim());break;case 16:S.addNode(0,A[M].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:i,14:n},e(a,[2,3]),{1:[2,2]},e(a,[2,4]),e(a,[2,5]),{1:[2,6],6:r,12:15,13:i,14:n},{6:r,9:16,12:11,13:i,14:n},{6:o,7:l,10:17,11:u},e(h,[2,18],{14:[1,21]}),e(h,[2,16]),e(h,[2,17]),{6:o,7:l,10:22,11:u},{1:[2,7],6:r,12:15,13:i,14:n},e(d,[2,14],{7:f,11:p}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(h,[2,15]),e(d,[2,13],{7:f,11:p}),e(m,[2,11]),e(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(T,C){if(C.recoverable)this.trace(T);else{var _=new Error(T);throw _.hash=C,_}},"parseError"),parse:s(function(T){var C=this,_=[0],S=[],w=[null],A=[],v=this.table,M="",$=0,I=0,F=0,B=2,O=1,R=A.slice.call(arguments,1),N=Object.create(this.lexer),P={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(P.yy[E]=this.yy[E]);N.setInput(T,P.yy),P.yy.lexer=N,P.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var D=N.yylloc;A.push(D);var V=N.options&&N.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function L(yt){_.length=_.length-2*yt,w.length=w.length-yt,A.length=A.length-yt}s(L,"popStack");function q(){var yt;return yt=S.pop()||N.lex()||O,typeof yt!="number"&&(yt instanceof Array&&(S=yt,yt=S.pop()),yt=C.symbols_[yt]||yt),yt}s(q,"lex");for(var H,K,U,st,X,ut,ot={},mt,ht,it,Ot;;){if(U=_[_.length-1],this.defaultActions[U]?st=this.defaultActions[U]:((H===null||typeof H>"u")&&(H=q()),st=v[U]&&v[U][H]),typeof st>"u"||!st.length||!st[0]){var St="";Ot=[];for(mt in v[U])this.terminals_[mt]&&mt>B&&Ot.push("'"+this.terminals_[mt]+"'");N.showPosition?St="Parse error on line "+($+1)+`: +`+N.showPosition()+` +Expecting `+Ot.join(", ")+", got '"+(this.terminals_[H]||H)+"'":St="Parse error on line "+($+1)+": Unexpected "+(H==O?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(St,{text:N.match,token:this.terminals_[H]||H,line:N.yylineno,loc:D,expected:Ot})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+H);switch(st[0]){case 1:_.push(H),w.push(N.yytext),A.push(N.yylloc),_.push(st[1]),H=null,K?(H=K,K=null):(I=N.yyleng,M=N.yytext,$=N.yylineno,D=N.yylloc,F>0&&F--);break;case 2:if(ht=this.productions_[st[1]][1],ot.$=w[w.length-ht],ot._$={first_line:A[A.length-(ht||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(ht||1)].first_column,last_column:A[A.length-1].last_column},V&&(ot._$.range=[A[A.length-(ht||1)].range[0],A[A.length-1].range[1]]),ut=this.performAction.apply(ot,[M,I,$,P.yy,st[1],w,A].concat(R)),typeof ut<"u")return ut;ht&&(_=_.slice(0,-1*ht*2),w=w.slice(0,-1*ht),A=A.slice(0,-1*ht)),_.push(this.productions_[st[1]][0]),w.push(ot.$),A.push(ot._$),it=v[_[_.length-2]][_[_.length-1]],_.push(it);break;case 3:return!0}}return!0},"parse")},y=(function(){var k={EOF:1,parseError:s(function(C,_){if(this.yy.parser)this.yy.parser.parseError(C,_);else throw new Error(C)},"parseError"),setInput:s(function(T,C){return this.yy=C||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var C=T.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:s(function(T){var C=T.length,_=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),_.length-1&&(this.yylineno-=_.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:_?(_.length===S.length?this.yylloc.first_column:0)+S[S.length-_.length].length-_[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(T){this.unput(this.match.slice(T))},"less"),pastInput:s(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var T=this.pastInput(),C=new Array(T.length+1).join("-");return T+this.upcomingInput()+` +`+C+"^"},"showPosition"),test_match:s(function(T,C){var _,S,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),S=T[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],_=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),_)return _;if(this._backtrack){for(var A in w)this[A]=w[A];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,C,_,S;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),A=0;AC[0].length)){if(C=_,S=A,this.options.backtrack_lexer){if(T=this.test_match(_,w[A]),T!==!1)return T;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(T=this.test_match(C,w[S]),T!==!1?T:!1):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:s(function(){var C=this.next();return C||this.lex()},"lex"),begin:s(function(C){this.conditionStack.push(C)},"begin"),popState:s(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:s(function(C){this.begin(C)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(C,_,S,w){var A=w;switch(S){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return k})();g.lexer=y;function x(){this.yy={}}return s(x,"Parser"),x.prototype=g,g.Parser=x,new x})();Y7.parser=Y7;s1t=Y7});var Bv,o1t=b(()=>{"use strict";ye();fr();yi();Bv=class{constructor(){this.stack=[];this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{s(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,He()}getRoot(){return this.root}addNode(t,r){let i=qt.sanitizeText(r,Q());if(!this.root){this.root={text:i,children:[]},this.stack=[{level:0,node:this.root}],sr(i);return}this.baseLevel??=t;let n=t-this.baseLevel+1;for(n<=0&&(n=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=n;)this.stack.pop();let a=this.stack[this.stack.length-1].node,o={text:i,children:[]};a.children.push(o),this.stack.push({level:n,node:o})}getAccTitle(){return Ze()}setAccTitle(t){Ye(t)}getAccDescription(){return tr()}setAccDescription(t){Je(t)}getDiagramTitle(){return er()}setDiagramTitle(t){sr(t)}}});var sUt,Dy,aUt,oUt,lUt,f1t,l1t,c1t,u1t,cUt,h1t,uUt,hUt,dUt,X7,fUt,pUt,p1t,Pv,d1t,Iy,m1t,g1t=b(()=>{"use strict";ye();ca();gi();Re();xe();sUt=14,Dy=250,aUt=30,oUt=60,lUt=5,f1t=82*Math.PI/180,l1t=Math.cos(f1t),c1t=Math.sin(f1t),u1t=s((e,t,r)=>{let i=e.node().getBBox(),n=i.width+t*2,a=i.height+t*2;pr(e,a,n,r),e.attr("viewBox",`${i.x-t} ${i.y-t} ${n} ${a}`)},"applyPaddedViewBox"),cUt=s((e,t,r,i)=>{let a=i.db.getRoot();if(!a)return;let o=Q(),{look:l,handDrawnSeed:u,themeVariables:h}=o,d=Gs(o.fontSize)[0]??sUt,f=l==="handDrawn",p=a.children??[],m=o.ishikawa?.diagramPadding??20,g=o.ishikawa?.useMaxWidth??!1,y=pi(t),x=y.append("g").attr("class","ishikawa"),k=f?$t.svg(y.node()):void 0,T=k?{roughSvg:k,seed:u??0,lineColor:h?.lineColor??"#333",fillColor:h?.mainBkg??"#fff"}:void 0,C=`ishikawa-arrow-${t}`;f||x.append("defs").append("marker").attr("id",C).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let _=0,S=Dy,w=f?void 0:Iy(x,_,S,_,S,"ishikawa-spine");if(uUt(x,_,S,a.text,d,T),!p.length){f&&Iy(x,_,S,_,S,"ishikawa-spine",T),u1t(y,m,g);return}_-=20;let A=p.filter((N,P)=>P%2===0),v=p.filter((N,P)=>P%2===1),M=h1t(A),$=h1t(v),I=M.total+$.total,F=Dy,B=Dy;if(I>0){let N=Dy*2,P=Dy*.3;F=Math.max(P,N*(M.total/I)),B=Math.max(P,N*($.total/I))}let O=d*2;F=Math.max(F,M.max*O),B=Math.max(B,$.max*O),S=Math.max(F,Dy),w&&w.attr("y1",S).attr("y2",S),x.select(".ishikawa-head-group").attr("transform",`translate(0,${S})`);let R=Math.ceil(p.length/2);for(let N=0;NMath.min(E,D.getBBox().x),1/0)}if(f)Iy(x,_,S,0,S,"ishikawa-spine",T);else{w.attr("x1",_);let N=`url(#${C})`;x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",N)}u1t(y,m,g)},"draw"),h1t=s(e=>{let t=s(r=>r.children.reduce((i,n)=>i+1+t(n),0),"countDescendants");return e.reduce((r,i)=>{let n=t(i);return r.total+=n,r.max=Math.max(r.max,n),r},{total:0,max:0})},"sideStats"),uUt=s((e,t,r,i,n,a)=>{let o=Math.max(6,Math.floor(110/(n*.6))),l=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${t},${r})`),u=Pv(l,p1t(i,o),0,0,"ishikawa-head-label","start",n),h=u.node().getBBox(),d=Math.max(60,h.width+6),f=Math.max(40,h.height*2+40),p=`M 0 ${-f/2} L 0 ${f/2} Q ${d*2.4} 0 0 ${-f/2} Z`;if(a){let m=a.roughSvg.path(p,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});l.insert(()=>m,":first-child").attr("class","ishikawa-head")}else l.insert("path",":first-child").attr("class","ishikawa-head").attr("d",p);u.attr("transform",`translate(${(d-h.width)/2-h.x+3},${-h.y-h.height/2})`)},"drawHead"),hUt=s((e,t)=>{let r=[],i=[],n=s((a,o,l)=>{let u=t===-1?[...a].reverse():a;for(let h of u){let d=r.length,f=h.children??[];r.push({depth:l,text:p1t(h.text,15),parentIndex:o,childCount:f.length}),l%2===0?(i.push(d),f.length&&n(f,d,l+1)):(f.length&&n(f,d,l+1),i.push(d))}},"walk");return n(e,-1,2),{entries:r,yOrder:i}},"flattenTree"),dUt=s((e,t,r,i,n,a,o)=>{let l=e.append("g").attr("class","ishikawa-label-group"),h=Pv(l,t,r,i+11*n,"ishikawa-label cause","middle",a).node().getBBox();if(o){let d=o.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});l.insert(()=>d,":first-child").attr("class","ishikawa-label-box")}else l.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",h.x-20).attr("y",h.y-2).attr("width",h.width+40).attr("height",h.height+4)},"drawCauseLabel"),X7=s((e,t,r,i,n,a)=>{let o=Math.sqrt(i*i+n*n);if(o===0)return;let l=i/o,u=n/o,h=6,d=-u*h,f=l*h,p=t,m=r,g=`M ${p} ${m} L ${p-l*h*2+d} ${m-u*h*2+f} L ${p-l*h*2-d} ${m-u*h*2-f} Z`,y=a.roughSvg.path(g,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});e.append(()=>y)},"drawArrowMarker"),fUt=s((e,t,r,i,n,a,o,l)=>{let u=t.children??[],h=a*(u.length?1:.2),d=-l1t*h,f=c1t*h*n,p=r+d,m=i+f;if(Iy(e,r,i,p,m,"ishikawa-branch",l),l&&X7(e,r,i,r-p,i-m,l),dUt(e,t.text,p,m,n,o,l),!u.length)return;let{entries:g,yOrder:y}=hUt(u,n),x=g.length,k=new Array(x);for(let[w,A]of y.entries())k[A]=i+f*((w+1)/(x+1));let T=new Map;T.set(-1,{x0:r,y0:i,x1:p,y1:m,childCount:u.length,childrenDrawn:0});let C=-l1t,_=c1t*n,S=n<0?"ishikawa-label up":"ishikawa-label down";for(let[w,A]of g.entries()){let v=k[w],M=T.get(A.parentIndex),$=e.append("g").attr("class","ishikawa-sub-group"),I=0,F=0,B=0;if(A.depth%2===0){let O=M.y1-M.y0;I=d1t(M.x0,M.x1,O?(v-M.y0)/O:.5),F=v,B=I-(A.childCount>0?oUt+A.childCount*lUt:aUt),Iy($,I,v,B,v,"ishikawa-sub-branch",l),l&&X7($,I,v,1,0,l),Pv($,A.text,B,v,"ishikawa-label align","end",o)}else{let O=M.childrenDrawn++;I=d1t(M.x0,M.x1,(M.childCount-O)/(M.childCount+1)),F=M.y0,B=I+C*((v-F)/_),Iy($,I,F,B,v,"ishikawa-sub-branch",l),l&&X7($,I,F,I-B,F-v,l),Pv($,A.text,B,v,S,"end",o)}A.childCount>0&&T.set(w,{x0:I,y0:F,x1:B,y1:v,childCount:A.childCount,childrenDrawn:0})}},"drawBranch"),pUt=s(e=>e.split(/|\n/),"splitLines"),p1t=s((e,t)=>{if(e.length<=t)return e;let r=[];for(let i of e.split(/\s+/)){let n=r.length-1;n>=0&&r[n].length+1+i.length<=t?r[n]+=" "+i:r.push(i)}return r.join(` +`)},"wrapText"),Pv=s((e,t,r,i,n,a,o)=>{let l=pUt(t),u=o*1.05,h=e.append("text").attr("class",n).attr("text-anchor",a).attr("x",r).attr("y",i-(l.length-1)*u/2);for(let[d,f]of l.entries())h.append("tspan").attr("x",r).attr("dy",d===0?0:u).text(f);return h},"drawMultilineText"),d1t=s((e,t,r)=>e+(t-e)*r,"lerp"),Iy=s((e,t,r,i,n,a,o)=>{if(o){let l=o.roughSvg.line(t,r,i,n,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>l).attr("class",a);return}return e.append("line").attr("class",a).attr("x1",t).attr("y1",r).attr("x2",i).attr("y2",n)},"drawLine"),m1t={draw:cUt}});var mUt,y1t,x1t=b(()=>{"use strict";mUt=s(e=>` +.ishikawa .ishikawa-spine, +.ishikawa .ishikawa-branch, +.ishikawa .ishikawa-sub-branch { + stroke: ${e.lineColor}; + stroke-width: 2; + fill: none; +} + +.ishikawa .ishikawa-sub-branch { + stroke-width: 1; +} + +.ishikawa .ishikawa-arrow { + fill: ${e.lineColor}; +} + +.ishikawa .ishikawa-head { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa .ishikawa-label-box { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa text { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + fill: ${e.textColor}; +} + +.ishikawa .ishikawa-head-label { + font-weight: 600; + text-anchor: middle; + dominant-baseline: middle; + font-size: 14px; +} + +.ishikawa .ishikawa-label { + text-anchor: end; +} + +.ishikawa .ishikawa-label.cause { + text-anchor: middle; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.align { + text-anchor: end; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.up { + dominant-baseline: baseline; +} + +.ishikawa .ishikawa-label.down { + dominant-baseline: hanging; +} +`,"getStyles"),y1t=mUt});var b1t={};Fe(b1t,{diagram:()=>gUt});var gUt,k1t=b(()=>{"use strict";a1t();o1t();g1t();x1t();gUt={parser:s1t,get db(){return new Bv},renderer:m1t,styles:y1t}});var K7,S1t,w1t=b(()=>{"use strict";K7=(function(){var e=s(function(T,C,_,S){for(_=_||{},S=T.length;S--;_[T[S]]=C);return _},"o"),t=[5,8],r=[7,8,11,12,17,19,22,24],i=[1,17],n=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],u=[7,8,11,12,17,19,22,24,27],h=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],y={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:s(function(C,_,S,w,A,v,M){var $=v.length-1;switch(A){case 1:return v[$-1];case 2:case 3:case 4:this.$=[];break;case 5:v[$-1].push(v[$]),this.$=v[$-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=v[$];break;case 8:w.setDiagramTitle(v[$].substr(6)),this.$=v[$].substr(6);break;case 9:w.addSubsetData([v[$]],void 0,void 0),w.setIndentMode&&w.setIndentMode(!0);break;case 10:w.addSubsetData([v[$-1]],v[$],void 0),w.setIndentMode&&w.setIndentMode(!0);break;case 11:w.addSubsetData([v[$-2]],void 0,parseFloat(v[$])),w.setIndentMode&&w.setIndentMode(!0);break;case 12:w.addSubsetData([v[$-3]],v[$-2],parseFloat(v[$])),w.setIndentMode&&w.setIndentMode(!0);break;case 13:if(v[$].length<2)throw new Error("union requires multiple identifiers");w.validateUnionIdentifiers&&w.validateUnionIdentifiers(v[$]),w.addSubsetData(v[$],void 0,void 0),w.setIndentMode&&w.setIndentMode(!0);break;case 14:if(v[$-1].length<2)throw new Error("union requires multiple identifiers");w.validateUnionIdentifiers&&w.validateUnionIdentifiers(v[$-1]),w.addSubsetData(v[$-1],v[$],void 0),w.setIndentMode&&w.setIndentMode(!0);break;case 15:if(v[$-2].length<2)throw new Error("union requires multiple identifiers");w.validateUnionIdentifiers&&w.validateUnionIdentifiers(v[$-2]),w.addSubsetData(v[$-2],void 0,parseFloat(v[$])),w.setIndentMode&&w.setIndentMode(!0);break;case 16:if(v[$-3].length<2)throw new Error("union requires multiple identifiers");w.validateUnionIdentifiers&&w.validateUnionIdentifiers(v[$-3]),w.addSubsetData(v[$-3],v[$-2],parseFloat(v[$])),w.setIndentMode&&w.setIndentMode(!0);break;case 17:case 18:case 19:w.addTextData(v[$-1],v[$],void 0);break;case 20:case 21:w.addTextData(v[$-2],v[$-1],v[$]);break;case 23:w.addStyleData(v[$-1],v[$]);break;case 24:case 25:case 26:var I=w.getCurrentSets();if(!I)throw new Error("text requires set");w.addTextData(I,v[$],void 0);break;case 27:case 28:var I=w.getCurrentSets();if(!I)throw new Error("text requires set");w.addTextData(I,v[$-1],v[$]);break;case 29:case 41:this.$=[v[$]];break;case 30:case 42:this.$=[...v[$-2],v[$]];break;case 31:this.$=[v[$-2],v[$]];break;case 33:this.$=v[$].join(" ");break;case 34:this.$=[v[$]];break;case 35:v[$-1].push(v[$]),this.$=v[$-1];break;case 43:case 44:this.$=v[$];break}},"anonymous"),table:[e(t,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(r,[2,4],{6:5}),e(t,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(r,[2,5]),e(r,[2,6]),e(r,[2,7]),e(r,[2,8]),{13:16,20:i,21:n},{13:20,18:19,20:i,21:n},{13:20,18:21,20:i,21:n},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:i,21:n},e(r,[2,9],{14:[1,27],15:[1,28]}),e(a,[2,43]),e(a,[2,44]),e(r,[2,13],{14:[1,29],15:[1,30],27:o}),e(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},e(r,[2,22]),e(r,[2,24],{14:[1,35]}),e(r,[2,25],{14:[1,36]}),e(r,[2,26]),{20:l,25:37,26:38,27:o},e(r,[2,10],{15:[1,40]}),{16:[1,41]},e(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:i,21:n},e(r,[2,17],{14:[1,45]}),e(r,[2,18],{14:[1,46]}),e(r,[2,19]),e(r,[2,27]),e(r,[2,28]),e(r,[2,23],{27:[1,47]}),e(u,[2,29]),{15:[1,48]},{16:[1,49]},e(r,[2,11]),{16:[1,50]},e(r,[2,15]),e(a,[2,42]),e(r,[2,20]),e(r,[2,21]),{20:l,26:51},{16:h,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},e(r,[2,12]),e(r,[2,16]),e(u,[2,30]),e(u,[2,31]),e(u,[2,32]),e(u,[2,33],{30:61,16:h,20:d,31:f,32:p,33:m}),e(g,[2,34]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),e(g,[2,39]),e(g,[2,40]),e(g,[2,35])],defaultActions:{6:[2,1]},parseError:s(function(C,_){if(_.recoverable)this.trace(C);else{var S=new Error(C);throw S.hash=_,S}},"parseError"),parse:s(function(C){var _=this,S=[0],w=[],A=[null],v=[],M=this.table,$="",I=0,F=0,B=0,O=2,R=1,N=v.slice.call(arguments,1),P=Object.create(this.lexer),E={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(E.yy[D]=this.yy[D]);P.setInput(C,E.yy),E.yy.lexer=P,E.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var V=P.yylloc;v.push(V);var L=P.options&&P.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(Et){S.length=S.length-2*Et,A.length=A.length-Et,v.length=v.length-Et}s(q,"popStack");function H(){var Et;return Et=w.pop()||P.lex()||R,typeof Et!="number"&&(Et instanceof Array&&(w=Et,Et=w.pop()),Et=_.symbols_[Et]||Et),Et}s(H,"lex");for(var K,U,st,X,ut,ot,mt={},ht,it,Ot,St;;){if(st=S[S.length-1],this.defaultActions[st]?X=this.defaultActions[st]:((K===null||typeof K>"u")&&(K=H()),X=M[st]&&M[st][K]),typeof X>"u"||!X.length||!X[0]){var yt="";St=[];for(ht in M[st])this.terminals_[ht]&&ht>O&&St.push("'"+this.terminals_[ht]+"'");P.showPosition?yt="Parse error on line "+(I+1)+`: +`+P.showPosition()+` +Expecting `+St.join(", ")+", got '"+(this.terminals_[K]||K)+"'":yt="Parse error on line "+(I+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:P.match,token:this.terminals_[K]||K,line:P.yylineno,loc:V,expected:St})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+st+", token: "+K);switch(X[0]){case 1:S.push(K),A.push(P.yytext),v.push(P.yylloc),S.push(X[1]),K=null,U?(K=U,U=null):(F=P.yyleng,$=P.yytext,I=P.yylineno,V=P.yylloc,B>0&&B--);break;case 2:if(it=this.productions_[X[1]][1],mt.$=A[A.length-it],mt._$={first_line:v[v.length-(it||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(it||1)].first_column,last_column:v[v.length-1].last_column},L&&(mt._$.range=[v[v.length-(it||1)].range[0],v[v.length-1].range[1]]),ot=this.performAction.apply(mt,[$,F,I,E.yy,X[1],A,v].concat(N)),typeof ot<"u")return ot;it&&(S=S.slice(0,-1*it*2),A=A.slice(0,-1*it),v=v.slice(0,-1*it)),S.push(this.productions_[X[1]][0]),A.push(mt.$),v.push(mt._$),Ot=M[S[S.length-2]][S[S.length-1]],S.push(Ot);break;case 3:return!0}}return!0},"parse")},x=(function(){var T={EOF:1,parseError:s(function(_,S){if(this.yy.parser)this.yy.parser.parseError(_,S);else throw new Error(_)},"parseError"),setInput:s(function(C,_){return this.yy=_||this.yy||{},this._input=C,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var _=C.match(/(?:\r\n?|\n).*/g);return _?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},"input"),unput:s(function(C){var _=C.length,S=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-_),this.offset-=_;var w=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1&&(this.yylineno-=S.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:S?(S.length===w.length?this.yylloc.first_column:0)+w[w.length-S.length].length-S[0].length:this.yylloc.first_column-_},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-_]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(C){this.unput(this.match.slice(C))},"less"),pastInput:s(function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var C=this.pastInput(),_=new Array(C.length+1).join("-");return C+this.upcomingInput()+` +`+_+"^"},"showPosition"),test_match:s(function(C,_){var S,w,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),w=C[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(C[0].length),this.matched+=C[0],S=this.performAction.call(this,this.yy,this,_,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var v in A)this[v]=A[v];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,_,S,w;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),v=0;v_[0].length)){if(_=S,w=v,this.options.backtrack_lexer){if(C=this.test_match(S,A[v]),C!==!1)return C;if(this._backtrack){_=!1;continue}else return!1}else if(!this.options.flex)break}return _?(C=this.test_match(_,A[w]),C!==!1?C:!1):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:s(function(){var _=this.next();return _||this.lex()},"lex"),begin:s(function(_){this.conditionStack.push(_)},"begin"),popState:s(function(){var _=this.conditionStack.length-1;return _>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(_){return _=this.conditionStack.length-1-Math.abs(_||0),_>=0?this.conditionStack[_]:"INITIAL"},"topState"),pushState:s(function(_){this.begin(_)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(_,S,w,A){var v=A;switch(w){case 0:break;case 1:break;case 2:break;case 3:if(_.getIndentMode&&_.getIndentMode())return _.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:_.setIndentMode&&_.setIndentMode(!1),this.begin("INITIAL"),this.unput(S.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(_.consumeIndentText)_.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return S.yytext=S.yytext.slice(2,-2),14;break;case 17:return S.yytext=S.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return T})();y.lexer=x;function k(){this.yy={}}return s(k,"Parser"),k.prototype=y,y.Parser=k,new k})();K7.parser=K7;S1t=K7});function DUt(){return Wr(LUt,le().venn)}var Q7,Z7,J7,t$,e$,r$,bUt,kUt,h2,TUt,CUt,SUt,wUt,$v,_Ut,EUt,vUt,AUt,RUt,LUt,IUt,_1t,E1t=b(()=>{"use strict";Re();Qe();yi();ps();Q7=[],Z7=[],J7=[],t$=new Set,r$=!1,bUt=s((e,t,r)=>{let i=$v(e).sort(),n=r??10/Math.pow(e.length,2);e$=i,i.length===1&&t$.add(i[0]),Q7.push({sets:i,size:n,label:t?h2(t):void 0})},"addSubsetData"),kUt=s(()=>Q7,"getSubsetData"),h2=s(e=>{let t=e.trim();return t.length>=2&&t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t},"normalizeText"),TUt=s(e=>e&&h2(e),"normalizeStyleValue"),CUt=s((e,t,r)=>{let i=h2(t);Z7.push({sets:$v(e).sort(),id:i,label:r?h2(r):void 0})},"addTextData"),SUt=s((e,t)=>{let r=$v(e).sort(),i={};for(let[n,a]of t)i[n]=TUt(a)??a;J7.push({targets:r,styles:i})},"addStyleData"),wUt=s(()=>J7,"getStyleData"),$v=s(e=>e.map(t=>h2(t)),"normalizeIdentifierList"),_Ut=s(e=>{let r=$v(e).filter(i=>!t$.has(i));if(r.length>0)throw new Error(`unknown set identifier: ${r.join(", ")}`)},"validateUnionIdentifiers"),EUt=s(()=>Z7,"getTextData"),vUt=s(()=>e$,"getCurrentSets"),AUt=s(()=>r$,"getIndentMode"),RUt=s(e=>{r$=e},"setIndentMode"),LUt=Ue.venn;s(DUt,"getConfig");IUt=s(()=>{He(),Q7.length=0,Z7.length=0,J7.length=0,t$.clear(),e$=void 0,r$=!1},"customClear"),_1t={getConfig:DUt,clear:IUt,setAccTitle:Ye,getAccTitle:Ze,setDiagramTitle:sr,getDiagramTitle:er,getAccDescription:tr,setAccDescription:Je,addSubsetData:bUt,getSubsetData:kUt,addTextData:CUt,addStyleData:SUt,validateUnionIdentifiers:_Ut,getTextData:EUt,getStyleData:wUt,getCurrentSets:vUt,getIndentMode:AUt,setIndentMode:RUt}});var NUt,v1t,A1t=b(()=>{"use strict";NUt=s(e=>` + .venn-title { + font-size: 32px; + fill: ${e.vennTitleTextColor}; + font-family: ${e.fontFamily}; + } + + .venn-circle text { + font-size: 48px; + font-family: ${e.fontFamily}; + } + + .venn-intersection text { + font-size: 48px; + fill: ${e.vennSetTextColor}; + font-family: ${e.fontFamily}; + } + + .venn-text-node { + font-family: ${e.fontFamily}; + color: ${e.vennSetTextColor}; + } +`,"getStyles"),v1t=NUt});function Fv(e,t){let r=MUt(e),i=r.filter(l=>OUt(l,e)),n=0,a=0,o=[];if(i.length>1){let l=I1t(i);for(let h=0;hd.angle-h.angle);let u=i[i.length-1];for(let h=0;hg.radius*2&&(C=g.radius*2),(p==null||p.width>C)&&(p={circle:g,width:C,p1:d,p2:u,large:C>g.radius,sweep:!0})}p!=null&&(o.push(p),n+=s$(p.circle.radius,p.width),u=d)}}else{let l=e[0];for(let h=1;hMath.abs(l.radius-e[h].radius)){u=!0;break}u?n=a=0:(n=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-1e-10,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=n+a,t.arcArea=n,t.polygonArea=a,t.arcs=o,t.innerPoints=i,t.intersectionPoints=r),n+a}function OUt(e,t){return t.every(r=>ha(e,r)=e+t)return 0;if(r<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let i=e-(r*r-t*t+e*e)/(2*r),n=t-(r*r-e*e+t*t)/(2*r);return s$(e,i)+s$(t,n)}function D1t(e,t){let r=ha(e,t),i=e.radius,n=t.radius;if(r>=i+n||r<=Math.abs(i-n))return[];let a=(i*i-n*n+r*r)/(2*r),o=Math.sqrt(i*i-a*a),l=e.x+a*(t.x-e.x)/r,u=e.y+a*(t.y-e.y)/r,h=-(t.y-e.y)*(o/r),d=-(t.x-e.x)*(o/r);return[{x:l+h,y:u-d},{x:l-h,y:u+d}]}function I1t(e){let t={x:0,y:0};for(let r of e)t.x+=r.x,t.y+=r.y;return t.x/=e.length,t.y/=e.length,t}function BUt(e,t,r,i){i=i||{};let n=i.maxIterations||100,a=i.tolerance||1e-10,o=e(t),l=e(r),u=r-t;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return t;if(l===0)return r;for(let h=0;h=0&&(t=d),Math.abs(u)a$(t))}function Ny(e,t){let r=0;for(let i=0;iS.fx-w.fx,"sortOrder"),k=t.slice(),T=t.slice(),C=t.slice(),_=t.slice();for(let S=0;S{let M=v.slice();return M.fx=v.fx,M.id=v.id,M});A.sort((v,M)=>v.id-M.id),r.history.push({x:g[0].slice(),fx:g[0].fx,simplex:A})}p=0;for(let A=0;A=g[m-1].fx){let A=!1;if(T.fx>w.fx?(nu(C,1+d,k,-d,w),C.fx=e(C),C.fx=1)break;for(let v=1;vl+a*n*u||h>=x)y=n;else{if(Math.abs(f)<=-o*u)return n;f*(y-g)>=0&&(y=g),g=n,x=h}return 0}s(m,"zoom");for(let g=0;g<10;++g){if(nu(i.x,1,r.x,n,t),h=i.fx=e(i.x,i.fxprime),f=Ny(i.fxprime,t),h>l+a*n*u||g&&h>=d)return m(p,n,d);if(Math.abs(f)<=-o*u)return n;if(f>=0)return m(n,p,h);d=h,p=n,n*=2}return n}function $Ut(e,t,r){let i={x:t.slice(),fx:0,fxprime:t.slice()},n={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,l,u=1,h;r=r||{},h=r.maxIterations||t.length*20,i.fx=e(i.x,i.fxprime),o=i.fxprime.slice(),l$(o,i.fxprime,-1);for(let d=0;d{let f={};for(let p=0;ph$(e,t,i)-r,0,e+t)}function FUt(e,t={}){let r=t.distinct,i=e.map(l=>Object.assign({},l));function n(l){return l.join(";")}if(s(n,"toKey"),r){let l=new Map;for(let u of i)for(let h=0;hl===u?0:la.sets.length===2).forEach(a=>{let o=r[a.sets[0]],l=r[a.sets[1]],u=Math.sqrt(t[o].size/Math.PI),h=Math.sqrt(t[l].size/Math.PI),d=c$(u,h,a.size);i[o][l]=i[l][o]=d;let f=0;a.size+1e-10>=Math.min(t[o].size,t[l].size)?f=1:a.size<=1e-10&&(f=-1),n[o][l]=n[l][o]=f}),{distances:i,constraints:n}}function zUt(e,t,r,i){for(let a=0;a0&&g<=f||p<0&&g>=f||(n+=2*y*y,t[2*a]+=4*y*(o-h),t[2*a+1]+=4*y*(l-d),t[2*u]+=4*y*(h-o),t[2*u+1]+=4*y*(d-l))}}return n}function GUt(e,t={}){let r=qUt(e,t),i=t.lossFunction||Oy;if(e.length>=8){let n=WUt(e,t),a=i(n,e),o=i(r,e);a+1e-8p.map(m=>m/l));let u=s((p,m)=>zUt(p,m,a,o),"obj"),h=null;for(let p=0;pf.sets.length===2);for(let f of e){let p=f.weight!=null?f.weight:1,m=f.sets[0],g=f.sets[1];f.size+M1t>=Math.min(i[m].size,i[g].size)&&(p=0),n[m].push({set:g,size:f.size,weight:p}),n[g].push({set:m,size:f.size,weight:p})}let a=[];Object.keys(n).forEach(f=>{let p=0;for(let m=0;me[o]));let a=i.weight!=null?i.weight:1;r+=a*(n-i.size)*(n-i.size)}return r}function B1t(e,t){let r=0;for(let i of t){if(i.sets.length===1)continue;let n;if(i.sets.length===2){let l=e[i.sets[0]],u=e[i.sets[1]];n=h$(l.radius,u.radius,ha(l,u))}else n=Fv(i.sets.map(l=>e[l]));let a=i.weight!=null?i.weight:1,o=Math.log((n+1)/(i.size+1));r+=a*o*o}return r}function jUt(e,t,r){if(r==null?e.sort((n,a)=>a.radius-n.radius):e.sort(r),e.length>0){let n=e[0].x,a=e[0].y;for(let o of e)o.x-=n,o.y-=a}if(e.length===2&&ha(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,a=Math.cos(n),o=Math.sin(n);for(let l of e){let u=l.x,h=l.y;l.x=a*u-o*h,l.y=o*u+a*h}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let a=e[1].y/(1e-10+e[1].x);for(let o of e){var i=(o.x+a*o.y)/(1+a*a);o.x=2*i-o.x,o.y=2*i*a-o.y}}}}function UUt(e){e.forEach(n=>{n.parent=n});function t(n){return n.parent!==n&&(n.parent=t(n.parent)),n.parent}s(t,"find");function r(n,a){let o=t(n),l=t(a);o.parent=l}s(r,"union");for(let n=0;n{delete n.parent}),Array.from(i.values())}function u$(e){let t=s(r=>{let i=e.reduce((a,o)=>Math.max(a,o[r]+o.radius),Number.NEGATIVE_INFINITY),n=e.reduce((a,o)=>Math.min(a,o[r]-o.radius),Number.POSITIVE_INFINITY);return{max:i,min:n}},"minMax");return{xRange:t("x"),yRange:t("y")}}function P1t(e,t,r){t==null&&(t=Math.PI/2);let i=V1t(e).map(h=>Object.assign({},h)),n=UUt(i);for(let h of n){jUt(h,t,r);let d=u$(h);h.size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),h.bounds=d}n.sort((h,d)=>d.size-h.size),i=n[0];let a=i.bounds,o=(a.xRange.max-a.xRange.min)/50;function l(h,d,f){if(!h)return;let p=h.bounds,m,g;if(d)m=a.xRange.max-p.xRange.min+o;else{m=a.xRange.max-p.xRange.max;let y=(p.xRange.max-p.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;y<0&&(m+=y)}if(f)g=a.yRange.max-p.yRange.min+o;else{g=a.yRange.max-p.yRange.max;let y=(p.yRange.max-p.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;y<0&&(g+=y)}for(let y of h)y.x+=m,y.y+=g,i.push(y)}s(l,"addCluster");let u=1;for(;u({radius:d*m.radius,x:i+f+(m.x-o.min)*d,y:i+p+(m.y-l.min)*d,setid:m.setid})))}function F1t(e){let t={};for(let r of e)t[r.setid]=r;return t}function V1t(e){return Object.keys(e).map(r=>Object.assign(e[r],{setid:r}))}function z1t(e={}){let t=!1,r=600,i=350,n=15,a=1e3,o=Math.PI/2,l=!0,u=null,h=!0,d=!0,f=null,p=null,m=!1,g=null,y=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,x={},k=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],T=0,C=s(function(A){if(A in x)return x[A];var v=x[A]=k[T];return T+=1,T>=k.length&&(T=0),v},"colours"),_=O1t,S=Oy;function w(A){let v=A.datum(),M=new Set;v.forEach(X=>{X.size==0&&X.sets.length==1&&M.add(X.sets[0])}),v=v.filter(X=>!X.sets.some(ut=>M.has(ut)));let $={},I={};if(v.length>0){let X=_(v,{lossFunction:S,distinct:m});l&&(X=P1t(X,o,p)),$=$1t(X,r,i,n,u),I=W1t($,v,y)}let F={};v.forEach(X=>{X.label&&(F[X.sets]=X.label)});function B(X){if(X.sets in F)return F[X.sets];if(X.sets.length==1)return""+X.sets[0]}s(B,"label"),A.selectAll("svg").data([$]).enter().append("svg");let O=A.select("svg");t?O.attr("viewBox",`0 0 ${r} ${i}`):O.attr("width",r).attr("height",i);let R={},N=!1;O.selectAll(".venn-area path").each(function(X){let ut=this.getAttribute("d");X.sets.length==1&&ut&&!m&&(N=!0,R[X.sets[0]]=XUt(ut))});function P(X){return ut=>{let ot=X.sets.map(mt=>{let ht=R[mt],it=$[mt];return ht||(ht={x:r/2,y:i/2,radius:1}),it||(it={x:r/2,y:i/2,radius:1}),{x:ht.x*(1-ut)+it.x*ut,y:ht.y*(1-ut)+it.y*ut,radius:ht.radius*(1-ut)+it.radius*ut}});return L1t(ot,g)}}s(P,"pathTween");let E=O.selectAll(".venn-area").data(v,X=>X.sets),D=E.enter().append("g").attr("class",X=>`venn-area venn-${X.sets.length==1?"circle":"intersection"}${X.colour||X.color?" venn-coloured":""}`).attr("data-venn-sets",X=>X.sets.join("_")),V=D.append("path"),L=D.append("text").attr("class","label").text(X=>B(X)).attr("text-anchor","middle").attr("dy",".35em").attr("x",r/2).attr("y",i/2);d&&(V.style("fill-opacity","0").filter(X=>X.sets.length==1).style("fill",X=>X.colour?X.colour:X.color?X.color:C(X.sets)).style("fill-opacity",".25"),L.style("fill",X=>X.colour||X.color?"#FFF":e.textFill?e.textFill:X.sets.length==1?C(X.sets):"#444"));function q(X){return typeof X.transition=="function"?X.transition("venn").duration(a):X}s(q,"asTransition");let H=A;N&&typeof H.transition=="function"?(H=q(A),H.selectAll("path").attrTween("d",P)):H.selectAll("path").attr("d",X=>L1t(X.sets.map(ut=>$[ut])),g);let K=H.selectAll("text").filter(X=>X.sets in I).text(X=>B(X)).attr("x",X=>Math.floor(I[X.sets].x)).attr("y",X=>Math.floor(I[X.sets].y));h&&(N?"on"in K?K.on("end",i$($,B)):K.each("end",i$($,B)):K.each(i$($,B)));let U=q(E.exit()).remove();typeof E.transition=="function"&&U.selectAll("path").attrTween("d",P);let st=U.selectAll("text").attr("x",r/2).attr("y",i/2);return f!==null&&(L.style("font-size","0px"),K.style("font-size",f),st.style("font-size","0px")),{circles:$,textCentres:I,nodes:E,enter:D,update:H,exit:U}}return s(w,"chart"),w.wrap=function(A){return arguments.length?(h=A,w):h},w.useViewBox=function(){return t=!0,w},w.width=function(A){return arguments.length?(r=A,w):r},w.height=function(A){return arguments.length?(i=A,w):i},w.padding=function(A){return arguments.length?(n=A,w):n},w.distinct=function(A){return arguments.length?(m=A,w):m},w.colours=function(A){return arguments.length?(C=A,w):C},w.colors=function(A){return arguments.length?(C=A,w):C},w.fontSize=function(A){return arguments.length?(f=A,w):f},w.round=function(A){return arguments.length?(g=A,w):g},w.duration=function(A){return arguments.length?(a=A,w):a},w.layoutFunction=function(A){return arguments.length?(_=A,w):_},w.normalize=function(A){return arguments.length?(l=A,w):l},w.scaleToFit=function(A){return arguments.length?(u=A,w):u},w.styled=function(A){return arguments.length?(d=A,w):d},w.orientation=function(A){return arguments.length?(o=A,w):o},w.orientationOrder=function(A){return arguments.length?(p=A,w):p},w.lossFunction=function(A){return arguments.length?(S=A==="default"?Oy:A==="logRatio"?B1t:A,w):S},w}function i$(e,t){return function(r){let i=this,n=e[r.sets[0]].radius||50,a=t(r)||"",o=a.split(/\s+/).reverse(),u=(a.length+o.length)/3,h=o.pop(),d=[h],f=0,p=1.1;i.textContent=null;let m=[];function g(C){let _=i.ownerDocument.createElementNS(i.namespaceURI,"tspan");return _.textContent=C,m.push(_),i.append(_),_}s(g,"append");let y=g(h);for(;h=o.pop(),!!h;){d.push(h);let C=d.join(" ");y.textContent=C,C.length>u&&y.getComputedTextLength()>n&&(d.pop(),y.textContent=d.join(" "),d=[h],y=g(h),f++)}let x=.35-f*p/2,k=i.getAttribute("x"),T=i.getAttribute("y");m.forEach((C,_)=>{C.setAttribute("x",k),C.setAttribute("y",T),C.setAttribute("dy",`${x+_*p}em`)})}}function n$(e,t,r){let i=t[0].radius-ha(t[0],e);for(let n=1;n=a&&(n=i[d],a=f)}let o=N1t(d=>-1*n$({x:d[0],y:d[1]},e,t),[n.x,n.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:r?0:o[0],y:o[1]},u=!0;for(let d of e)if(ha(l,d)>d.radius){u=!1;break}for(let d of t)if(ha(l,d)d.p1))}function HUt(e){let t={},r=Object.keys(e);for(let i of r)t[i]=[];for(let i=0;i0&&console.log("WARNING: area "+o+" not represented on screen")}return i}function YUt(e,t,r){let i=[];return i.push(` +M`,e,t),i.push(` +m`,-r,0),i.push(` +a`,r,r,0,1,0,r*2,0),i.push(` +a`,r,r,0,1,0,-r*2,0),i.join(" ")}function XUt(e){let t=e.split(" ");return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function q1t(e){if(e.length===0)return[];let t={};return Fv(e,t),t.arcs}function j1t(e,t){if(e.length===0)return"M 0 0";let r=Math.pow(10,t||0),i=t!=null?a=>Math.round(a*r)/r:a=>a;if(e.length==1){let a=e[0].circle;return YUt(i(a.x),i(a.y),i(a.radius))}let n=[` +M`,i(e[0].p2.x),i(e[0].p2.y)];for(let a of e){let o=i(a.circle.radius);n.push(` +A`,o,o,0,a.large?1:0,a.sweep?1:0,i(a.p1.x),i(a.p1.y))}return n.join(" ")}function L1t(e,t){return j1t(q1t(e),t)}function U1t(e,t={}){let{lossFunction:r,layoutFunction:i=O1t,normalize:n=!0,orientation:a=Math.PI/2,orientationOrder:o,width:l=600,height:u=350,padding:h=15,scaleToFit:d=!1,symmetricalTextCentre:f=!1,distinct:p,round:m=2}=t,g=i(e,{lossFunction:r==="default"||!r?Oy:r==="logRatio"?B1t:r,distinct:p});n&&(g=P1t(g,a,o));let y=$1t(g,l,u,h,d),x=W1t(y,e,f),k=new Map(Object.keys(y).map(_=>[_,{set:_,x:y[_].x,y:y[_].y,radius:y[_].radius}])),T=e.map(_=>{let S=_.sets.map(v=>k.get(v)),w=q1t(S),A=j1t(w,m);return{circles:S,arcs:w,path:A,area:_,has:new Set(_.sets)}});function C(_){let S="";for(let w of T)w.has.size>_.length&&_.every(A=>w.has.has(A))&&(S+=" "+w.path);return S}return s(C,"genDistinctPath"),T.map(({circles:_,arcs:S,path:w,area:A})=>({data:A,text:x[A.sets],circles:_,arcs:S,path:w,distinctPath:w+C(A.sets)}))}var M1t,H1t=b(()=>{"use strict";s(Fv,"intersectionArea");s(OUt,"containedInCircles");s(MUt,"getIntersectionPoints");s(s$,"circleArea");s(ha,"distance");s(h$,"circleOverlap");s(D1t,"circleCircleIntersection");s(I1t,"getCenter");s(BUt,"bisect");s(a$,"zeros");s(R1t,"zerosM");s(Ny,"dot");s(o$,"norm2");s(l$,"scale");s(nu,"weightedSum");s(N1t,"nelderMead");s(PUt,"wolfeLineSearch");s($Ut,"conjugateGradient");s(O1t,"venn");M1t=1e-10;s(c$,"distanceFromIntersectArea");s(FUt,"addMissingAreas");s(VUt,"getDistanceMatrices");s(zUt,"constrainedMDSGradient");s(GUt,"bestInitialLayout");s(WUt,"constrainedMDSLayout");s(qUt,"greedyLayout");s(Oy,"lossFunction");s(B1t,"logRatioLossFunction");s(jUt,"orientateCircles");s(UUt,"disjointCluster");s(u$,"getBoundingBox");s(P1t,"normalizeSolution");s($1t,"scaleSolution");s(F1t,"toObjectNotation");s(V1t,"fromObjectNotation");s(z1t,"VennDiagram");s(i$,"wrapText");s(n$,"circleMargin");s(G1t,"computeTextCentre");s(HUt,"getOverlappingCircles");s(W1t,"computeTextCentres");s(YUt,"circlePath");s(XUt,"circleFromPath");s(q1t,"intersectionAreaArcs");s(j1t,"arcsToPath");s(L1t,"intersectionAreaPath");s(U1t,"layout")});function QUt(e){let t=new Map;for(let r of e){let i=r.targets.join("|"),n=t.get(i);n?Object.assign(n,r.styles):t.set(i,{...r.styles})}return t}function lp(e){return e.join("|")}function JUt(e,t,r,i,n,a){let o=e?.useDebugLayout??!1,u=r.select("svg").append("g").attr("class","venn-text-nodes"),h=new Map;for(let d of i){let f=lp(d.sets),p=h.get(f);p?p.push(d):h.set(f,[d])}for(let[d,f]of h.entries()){let p=t.get(d);if(!p?.text)continue;let m=p.text.x,g=p.text.y,y=Math.min(...p.circles.map(O=>O.radius)),x=Math.min(...p.circles.map(O=>O.radius-Math.hypot(m-O.x,g-O.y))),k=Number.isFinite(x)?Math.max(0,x):0;k===0&&Number.isFinite(y)&&(k=y*.6);let T=u.append("g").attr("class","venn-text-area").attr("font-size",`${40*n}px`);o&&T.append("circle").attr("class","venn-text-debug-circle").attr("cx",m).attr("cy",g).attr("r",k).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*n).attr("stroke-dasharray",`${6*n} ${4*n}`);let C=Math.max(80*n,k*2*.95),_=Math.max(60*n,k*2*.95),A=(p.data.label&&p.data.label.length>0?Math.min(32*n,k*.25):0)+(f.length<=2?30*n:0),v=m-C/2,M=g-_/2+A,$=Math.max(1,Math.ceil(Math.sqrt(f.length))),I=Math.max(1,Math.ceil(f.length/$)),F=C/$,B=_/I;for(let[O,R]of f.entries()){let N=O%$,P=Math.floor(O/$),E=v+F*(N+.5),D=M+B*(P+.5);o&&T.append("rect").attr("class","venn-text-debug-cell").attr("x",v+F*N).attr("y",M+B*P).attr("width",F).attr("height",B).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*n).attr("stroke-dasharray",`${4*n} ${3*n}`);let V=F*.9,L=B*.9,q=T.append("foreignObject").attr("class","venn-text-node-fo").attr("width",V).attr("height",L).attr("x",E-V/2).attr("y",D-L/2).attr("overflow","visible"),H=a.get(R.id)?.color,K=q.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(R.label??R.id);H&&K.style("color",H)}}}var ZUt,Y1t,X1t=b(()=>{"use strict";lr();hn();Qe();ca();H1t();gi();xe();s(QUt,"buildStyleByKey");ZUt=s((e,t,r,i)=>{let n=i.db,a=n.getConfig?.(),{themeVariables:o,look:l,handDrawnSeed:u}=le(),h=l==="handDrawn",d=[o.venn1,o.venn2,o.venn3,o.venn4,o.venn5,o.venn6,o.venn7,o.venn8].filter(Boolean),f=n.getDiagramTitle?.(),p=n.getSubsetData(),m=n.getTextData(),g=QUt(n.getStyleData()),y=a?.width??800,x=a?.height??450,T=y/1600,C=f?48*T:0,_=o.primaryTextColor??o.textColor,S=pi(t);S.attr("viewBox",`0 0 ${y} ${x}`),f&&S.append("text").text(f).attr("class","venn-title").attr("font-size",`${32*T}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*T).style("fill",o.vennTitleTextColor||o.titleColor);let w=vt(document.createElement("div")),A=z1t().width(y).height(x-C);w.datum(p).call(A);let v=h?$t.svg(w.select("svg").node()):void 0,M=U1t(p,{width:y,height:x-C,padding:a?.padding??15}),$=new Map;for(let O of M){let R=lp([...O.data.sets].sort());$.set(R,O)}m.length>0&&JUt(a,$,w,m,T,g);let I=Qr(o.background||"#f4f4f4");w.selectAll(".venn-circle").each(function(O,R){let N=vt(this),E=lp([...O.sets].sort()),D=g.get(E),V=D?.fill||d[R%d.length]||o.primaryColor;N.classed(`venn-set-${R%8}`,!0);let L=D?.["fill-opacity"]??.1,q=D?.stroke||V,H=D?.["stroke-width"]||`${5*T}`;if(h&&v){let U=$.get(E);if(U&&U.circles.length>0){let st=U.circles[0],X=v.circle(st.x,st.y,st.radius*2,{roughness:.7,seed:u,fill:A2(V,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+R*60,stroke:q,strokeWidth:parseFloat(String(H))});N.select("path").remove(),N.node()?.insertBefore(X,N.select("text").node())}}else N.select("path").style("fill",V).style("fill-opacity",L).style("stroke",q).style("stroke-width",H).style("stroke-opacity",.95);let K=D?.color||(I?_t(V,30):kt(V,30));N.select("text").style("font-size",`${48*T}px`).style("fill",K)}),h&&v?w.selectAll(".venn-intersection").each(function(O){let R=vt(this),P=lp([...O.sets].sort()),E=g.get(P),D=E?.fill;if(D){let V=R.select("path"),L=V.attr("d");if(L){let q=v.path(L,{roughness:.7,seed:u,fill:A2(D,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),H=V.node();H?.parentNode?.insertBefore(q,H),V.remove()}}else R.select("path").style("fill-opacity",0);R.select("text").style("font-size",`${48*T}px`).style("fill",E?.color??o.vennSetTextColor??_)}):(w.selectAll(".venn-intersection text").style("font-size",`${48*T}px`).style("fill",O=>{let N=lp([...O.sets].sort());return g.get(N)?.color??o.vennSetTextColor??_}),w.selectAll(".venn-intersection path").style("fill-opacity",O=>{let N=lp([...O.sets].sort());return g.get(N)?.fill?1:0}).style("fill",O=>{let N=lp([...O.sets].sort());return g.get(N)?.fill??"transparent"}));let F=S.append("g").attr("transform",`translate(0, ${C})`),B=w.select("svg").node();if(B&&"childNodes"in B)for(let O of[...B.childNodes])F.node()?.appendChild(O);pr(S,x,y,a?.useMaxWidth??!0)},"draw");s(lp,"stableSetsKey");s(JUt,"renderTextNodes");Y1t={draw:ZUt}});var K1t={};Fe(K1t,{diagram:()=>tHt});var tHt,Q1t=b(()=>{"use strict";w1t();E1t();A1t();X1t();tHt={parser:S1t,db:_1t,renderer:Y1t,styles:v1t}});var My,d$=b(()=>{"use strict";ps();Qe();Re();me();yi();My=class{constructor(){this.nodes=[];this.levels=new Map;this.outerNodes=[];this.classes=new Map;this.setAccTitle=Ye;this.getAccTitle=Ze;this.setDiagramTitle=sr;this.getDiagramTitle=er;this.getAccDescription=tr;this.setAccDescription=Je}static{s(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=Ue,r=le();return Wr({...t.treemap,...r.treemap??{}})}addNode(t,r){this.nodes.push(t),this.levels.set(t,r),r===0&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,r){let i=this.classes.get(t)??{id:t,styles:[],textStyles:[]},n=r.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(a=>{R0(a)&&(i?.textStyles?i.textStyles.push(a):i.textStyles=[a]),i?.styles?i.styles.push(a):i.styles=[a]}),this.classes.set(t,i)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){He(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function t0t(e){if(!e.length)return[];let t=[],r=[];return e.forEach(i=>{let n={name:i.name,children:i.type==="Leaf"?void 0:[]};for(n.classSelector=i?.classSelector,i?.cssCompiledStyles&&(n.cssCompiledStyles=i.cssCompiledStyles),i.type==="Leaf"&&i.value!==void 0&&(n.value=i.value);r.length>0&&r[r.length-1].level>=i.level;)r.pop();if(r.length===0)t.push(n);else{let a=r[r.length-1].node;a.children?a.children.push(n):a.children=[n]}i.type!=="Leaf"&&r.push({node:n,level:i.level})}),t}var e0t=b(()=>{"use strict";s(t0t,"buildHierarchy")});var nHt,sHt,f$,r0t=b(()=>{"use strict";Xc();Jt();Lh();e0t();d$();nHt=s((e,t)=>{aa(e,t);let r=[];for(let a of e.TreemapRows??[])a.$type==="ClassDefStatement"&&t.addClass(a.className??"",a.styleText??"");for(let a of e.TreemapRows??[]){let o=a.item;if(!o)continue;let l=a.indent?parseInt(a.indent):0,u=sHt(o),h=o.classSelector?t.getStylesForClass(o.classSelector):[],d=h.length>0?h:void 0,f={level:l,name:u,type:o.$type,value:o.value,classSelector:o.classSelector,cssCompiledStyles:d};r.push(f)}let i=t0t(r),n=s((a,o)=>{for(let l of a)t.addNode(l,o),l.children&&l.children.length>0&&n(l.children,o+1)},"addNodesRecursively");n(i,0)},"populate"),sHt=s(e=>e.name?String(e.name):"","getItemName"),f$={parser:{yy:void 0},parse:s(async e=>{try{let r=await Hn("treemap",e);z.debug("Treemap AST:",r);let i=f$.parser?.yy;if(!(i instanceof My))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");nHt(r,i)}catch(t){throw z.error("Error parsing treemap:",t),t}},"parse")}});var aHt,By,d2,oHt,lHt,i0t,n0t=b(()=>{"use strict";ca();Xd();gi();lr();me();Qe();Jt();aHt=10,By=10,d2=25,oHt=s((e,t,r,i)=>{let n=i.db,a=n.getConfig(),o=a.padding??aHt,l=n.getDiagramTitle(),u=n.getRoot(),{themeVariables:h}=le();if(!u)return;let d=l?30:0,f=pi(t),p=a.nodeWidth?a.nodeWidth*By:960,m=a.nodeHeight?a.nodeHeight*By:500,g=p,y=m+d;f.attr("viewBox",`0 0 ${g} ${y}`),pr(f,y,g,a.useMaxWidth);let x;try{let O=a.valueFormat||",";if(O==="$0,0")x=s(R=>"$"+pl(",")(R),"valueFormat");else if(O.startsWith("$")&&O.includes(",")){let R=/\.\d+/.exec(O),N=R?R[0]:"";x=s(P=>"$"+pl(","+N)(P),"valueFormat")}else if(O.startsWith("$")){let R=O.substring(1);x=s(N=>"$"+pl(R||"")(N),"valueFormat")}else x=pl(O)}catch(O){z.error("Error creating format function:",O),x=pl(",")}let k=pa().range(["transparent",h.cScale0,h.cScale1,h.cScale2,h.cScale3,h.cScale4,h.cScale5,h.cScale6,h.cScale7,h.cScale8,h.cScale9,h.cScale10,h.cScale11]),T=pa().range(["transparent",h.cScalePeer0,h.cScalePeer1,h.cScalePeer2,h.cScalePeer3,h.cScalePeer4,h.cScalePeer5,h.cScalePeer6,h.cScalePeer7,h.cScalePeer8,h.cScalePeer9,h.cScalePeer10,h.cScalePeer11]),C=pa().range([h.cScaleLabel0,h.cScaleLabel1,h.cScaleLabel2,h.cScaleLabel3,h.cScaleLabel4,h.cScaleLabel5,h.cScaleLabel6,h.cScaleLabel7,h.cScaleLabel8,h.cScaleLabel9,h.cScaleLabel10,h.cScaleLabel11]);l&&f.append("text").attr("x",g/2).attr("y",d/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(l);let _=f.append("g").attr("transform",`translate(0, ${d})`).attr("class","treemapContainer"),S=Mp(u).sum(O=>O.value??0).sort((O,R)=>(R.value??0)-(O.value??0)),A=Dk().size([p,m]).paddingTop(O=>O.children&&O.children.length>0?d2+By:0).paddingInner(o).paddingLeft(O=>O.children&&O.children.length>0?By:0).paddingRight(O=>O.children&&O.children.length>0?By:0).paddingBottom(O=>O.children&&O.children.length>0?By:0).round(!0)(S),v=A.descendants().filter(O=>O.children&&O.children.length>0),M=_.selectAll(".treemapSection").data(v).enter().append("g").attr("class","treemapSection").attr("transform",O=>`translate(${O.x0},${O.y0})`);M.append("rect").attr("width",O=>O.x1-O.x0).attr("height",d2).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",O=>O.depth===0?"display: none;":""),M.append("clipPath").attr("id",(O,R)=>`clip-section-${t}-${R}`).append("rect").attr("width",O=>Math.max(0,O.x1-O.x0-12)).attr("height",d2),M.append("rect").attr("width",O=>O.x1-O.x0).attr("height",O=>O.y1-O.y0).attr("class",(O,R)=>`treemapSection section${R}`).attr("fill",O=>k(O.data.name)).attr("fill-opacity",.6).attr("stroke",O=>T(O.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",O=>{if(O.depth===0)return"display: none;";let R=Pt({cssCompiledStyles:O.data.cssCompiledStyles});return R.nodeStyles+";"+R.borderStyles.join(";")}),M.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",d2/2).attr("dominant-baseline","middle").text(O=>O.depth===0?"":O.data.name).attr("font-weight","bold").attr("style",O=>{if(O.depth===0)return"display: none;";let R="dominant-baseline: middle; font-size: 12px; fill:"+C(O.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",N=Pt({cssCompiledStyles:O.data.cssCompiledStyles});return R+N.labelStyles.replace("color:","fill:")}).each(function(O){if(O.depth===0)return;let R=vt(this),N=O.data.name;R.text(N);let P=O.x1-O.x0,E=6,D;a.showValues!==!1&&O.value?D=P-10-30-10-E:D=P-E-6;let L=Math.max(15,D),q=R.node();if(q.getComputedTextLength()>L){let U=N;for(;U.length>0;){if(U=N.substring(0,U.length-1),U.length===0){R.text("..."),q.getComputedTextLength()>L&&R.text("");break}if(R.text(U+"..."),q.getComputedTextLength()<=L)break}}}),a.showValues!==!1&&M.append("text").attr("class","treemapSectionValue").attr("x",O=>O.x1-O.x0-10).attr("y",d2/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(O=>O.value?x(O.value):"").attr("font-style","italic").attr("style",O=>{if(O.depth===0)return"display: none;";let R="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+C(O.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",N=Pt({cssCompiledStyles:O.data.cssCompiledStyles});return R+N.labelStyles.replace("color:","fill:")});let $=A.leaves(),I=_.selectAll(".treemapLeafGroup").data($).enter().append("g").attr("class",(O,R)=>`treemapNode treemapLeafGroup leaf${R}${O.data.classSelector?` ${O.data.classSelector}`:""}x`).attr("transform",O=>`translate(${O.x0},${O.y0})`);I.append("rect").attr("width",O=>O.x1-O.x0).attr("height",O=>O.y1-O.y0).attr("class","treemapLeaf").attr("fill",O=>O.parent?k(O.parent.data.name):k(O.data.name)).attr("style",O=>Pt({cssCompiledStyles:O.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",O=>O.parent?k(O.parent.data.name):k(O.data.name)).attr("stroke-width",3),I.append("clipPath").attr("id",(O,R)=>`clip-${t}-${R}`).append("rect").attr("width",O=>Math.max(0,O.x1-O.x0-4)).attr("height",O=>Math.max(0,O.y1-O.y0-4)),I.append("text").attr("class","treemapLabel").attr("x",O=>(O.x1-O.x0)/2).attr("y",O=>(O.y1-O.y0)/2).attr("style",O=>{let R="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+C(O.data.name)+";",N=Pt({cssCompiledStyles:O.data.cssCompiledStyles});return R+N.labelStyles.replace("color:","fill:")}).attr("clip-path",(O,R)=>`url(#clip-${t}-${R})`).text(O=>O.data.name).each(function(O){let R=vt(this),N=O.x1-O.x0,P=O.y1-O.y0,E=R.node(),D=4,V=N-2*D,L=P-2*D;if(V<10||L<10){R.style("display","none");return}let q=parseInt(R.style("font-size"),10),H=8,K=28,U=.6,st=6,X=2;for(;E.getComputedTextLength()>V&&q>H;)q--,R.style("font-size",`${q}px`);let ut=Math.max(st,Math.min(K,Math.round(q*U))),ot=q+X+ut;for(;ot>L&&q>H&&(q--,ut=Math.max(st,Math.min(K,Math.round(q*U))),!(utL;R.style("font-size",`${q}px`),(E.getComputedTextLength()>V||q(R.x1-R.x0)/2).attr("y",function(R){return(R.y1-R.y0)/2}).attr("style",R=>{let N="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+C(R.data.name)+";",P=Pt({cssCompiledStyles:R.data.cssCompiledStyles});return N+P.labelStyles.replace("color:","fill:")}).attr("clip-path",(R,N)=>`url(#clip-${t}-${N})`).text(R=>R.value?x(R.value):"").each(function(R){let N=vt(this),P=this.parentNode;if(!P){N.style("display","none");return}let E=vt(P).select(".treemapLabel");if(E.empty()||E.style("display")==="none"){N.style("display","none");return}let D=parseFloat(E.style("font-size")),V=28,L=.6,q=6,H=2,K=Math.max(q,Math.min(V,Math.round(D*L)));N.style("font-size",`${K}px`);let st=(R.y1-R.y0)/2+D/2+H;N.attr("y",st);let X=R.x1-R.x0,mt=R.y1-R.y0-4,ht=X-8;N.node().getComputedTextLength()>ht||st+K>mt||K{"use strict";Re();pp();Qe();cHt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},uHt=s(({treemap:e}={})=>{let t=sl(),r=le(),i=Wr(t,r.themeVariables),n=Wr(cHt,e),a=n.titleColor??i.titleColor,o=n.labelColor??i.textColor,l=n.valueColor??i.textColor;return` + .treemapNode.section { + stroke: ${n.sectionStrokeColor}; + stroke-width: ${n.sectionStrokeWidth}; + fill: ${n.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${n.leafStrokeColor}; + stroke-width: ${n.leafStrokeWidth}; + fill: ${n.leafFillColor}; + } + .treemapLabel { + fill: ${o}; + font-size: ${n.labelFontSize}; + } + .treemapValue { + fill: ${l}; + font-size: ${n.valueFontSize}; + } + .treemapTitle { + fill: ${a}; + font-size: ${n.titleFontSize}; + } + `},"getStyles"),s0t=uHt});var o0t={};Fe(o0t,{diagram:()=>hHt});var hHt,l0t=b(()=>{"use strict";d$();r0t();n0t();a0t();hHt={parser:f$,get db(){return new My},renderer:i0t,styles:s0t}});var Vv,cp,h0t,pHt,mHt,p$,d0t=b(()=>{"use strict";Xc();Jt();Lh();Vv=s((e,t)=>{let r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),cp=s((e,t,r)=>({x:Vv(t,`${r} evolution`),y:Vv(e,`${r} visibility`)}),"toCoordinates"),h0t=s(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),pHt=s(e=>{if(!e?.startsWith("+"))return{};let r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),mHt=s((e,t)=>{if(aa(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let r=e.evolution.stages.map(n=>n.secondName?`${n.name.trim()} / ${n.secondName.trim()}`:n.name.trim()),i=e.evolution.stages.filter(n=>n.boundary!==void 0).map(n=>n.boundary);t.updateAxes({stages:r,stageBoundaries:i})}if(e.anchors.forEach(r=>{let i=cp(r.visibility,r.evolution,`Anchor "${r.name}"`);t.addNode(r.name,r.name,i.x,i.y,"anchor")}),e.components.forEach(r=>{let i=cp(r.visibility,r.evolution,`Component "${r.name}"`),n=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,a=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,o=r.decorator?.strategy;t.addNode(r.name,r.name,i.x,i.y,"component",n,a,r.inertia,o)}),e.notes.forEach(r=>{let i=cp(r.visibility,r.evolution,`Note "${r.text}"`);t.addNote(r.text,i.x,i.y)}),e.pipelines.forEach(r=>{let i=t.getNode(r.parent);if(!i||typeof i.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);let n=i.y;t.startPipeline(r.parent),r.components.forEach(a=>{let o=`${r.parent}_${a.name}`,l=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,u=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,h=Vv(a.evolution,`Pipeline component "${a.name}" evolution`);t.addNode(o,a.name,h,n,"pipeline-component",l,u),t.addPipelineComponent(r.parent,o)})}),e.links.forEach(r=>{let i=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-.")),n=h0t(r.fromPort)??h0t(r.toPort),{flow:a,label:o}=pHt(r.arrow);!n&&a&&(n=a);let l=r.linkLabel,u=o??l;t.addLink(r.from,r.to,i,u,n)}),e.evolves.forEach(r=>{let i=t.getNode(r.component);if(i?.y!==void 0){let n=Vv(r.target,`Evolve target for "${r.component}"`);t.addTrend(r.component,n,i.y)}}),e.annotations.length>0){let r=e.annotations[0],i=cp(r.x,r.y,"Annotations box");t.setAnnotationsBox(i.x,i.y)}e.annotation.forEach(r=>{let i=cp(r.x,r.y,`Annotation ${r.number}`);t.addAnnotation(r.number,[{x:i.x,y:i.y}],r.text)}),e.accelerators.forEach(r=>{let i=cp(r.x,r.y,`Accelerator "${r.name}"`);t.addAccelerator(r.name,i.x,i.y)}),e.deaccelerators.forEach(r=>{let i=cp(r.x,r.y,`Deaccelerator "${r.name}"`);t.addDeaccelerator(r.name,i.x,i.y)})},"populateDb"),p$={parser:{yy:void 0},parse:s(async e=>{let t=await Hn("wardley",e);z.debug(t);let r=p$.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");mHt(t,r)},"parse")}});var zv,f0t=b(()=>{"use strict";zv=class{constructor(){this.nodes=new Map;this.links=[];this.trends=new Map;this.pipelines=new Map;this.annotations=[];this.notes=[];this.accelerators=[];this.deaccelerators=[];this.axes={}}static{s(this,"WardleyBuilder")}addNode(t){let r=this.nodes.get(t.id)??{id:t.id,label:t.label},i={...r,...t,className:t.className??r.className,labelOffsetX:t.labelOffsetX??r.labelOffsetX,labelOffsetY:t.labelOffsetY??r.labelOffsetY};this.nodes.set(t.id,i)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});let r=this.nodes.get(t);r&&(r.isPipelineParent=!0)}addPipelineComponent(t,r){let i=this.pipelines.get(t);i&&i.componentIds.push(r);let n=this.nodes.get(r);n&&(n.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,r){this.annotationsBox={x:t,y:r}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,r){this.size={width:t,height:r}}getNode(t){return this.nodes.get(t)}build(){let t=[];for(let r of this.nodes.values()){if(typeof r.x!="number"||typeof r.y!="number")throw new Error(`Node "${r.label}" is missing coordinates`);t.push(r)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}}});function Vh(e){let t=Q();return nr(e.trim(),t)}function gHt(){return Q()["wardley-beta"]}function yHt(e,t,r,i,n,a,o,l,u){Ms.addNode({id:e,label:Vh(t),x:r,y:i,className:n,labelOffsetX:a,labelOffsetY:o,inertia:l,sourceStrategy:u})}function xHt(e,t,r=!1,i,n){Ms.addLink({source:e,target:t,dashed:r,label:i,flow:n})}function bHt(e,t,r){Ms.addTrend({nodeId:e,targetX:t,targetY:r})}function kHt(e,t,r){Ms.addAnnotation({number:e,coordinates:t,text:r?Vh(r):void 0})}function THt(e,t,r){Ms.addNote({text:Vh(e),x:t,y:r})}function CHt(e,t,r){Ms.addAccelerator({name:Vh(e),x:t,y:r})}function SHt(e,t,r){Ms.addDeaccelerator({name:Vh(e),x:t,y:r})}function wHt(e,t){Ms.setAnnotationsBox(e,t)}function _Ht(e,t){Ms.setSize(e,t)}function EHt(e){Ms.startPipeline(e)}function vHt(e,t){Ms.addPipelineComponent(e,t)}function AHt(e){let t={};e.xLabel&&(t.xLabel=Vh(e.xLabel)),e.yLabel&&(t.yLabel=Vh(e.yLabel)),e.stages&&(t.stages=e.stages.map(r=>Vh(r))),e.stageBoundaries&&(t.stageBoundaries=e.stageBoundaries),Ms.setAxes(t)}function RHt(e){return Ms.getNode(e)}function LHt(){return Ms.build()}function DHt(){Ms.clear(),He()}var Ms,p0t,m0t=b(()=>{"use strict";ye();fr();yi();f0t();Ms=new zv;s(Vh,"textSanitizer");s(gHt,"getConfig");s(yHt,"addNode");s(xHt,"addLink");s(bHt,"addTrend");s(kHt,"addAnnotation");s(THt,"addNote");s(CHt,"addAccelerator");s(SHt,"addDeaccelerator");s(wHt,"setAnnotationsBox");s(_Ht,"setSize");s(EHt,"startPipeline");s(vHt,"addPipelineComponent");s(AHt,"updateAxes");s(RHt,"getNode");s(LHt,"getWardleyData");s(DHt,"clear");p0t={getConfig:gHt,addNode:yHt,addLink:xHt,addTrend:bHt,addAnnotation:kHt,addNote:THt,addAccelerator:CHt,addDeaccelerator:SHt,setAnnotationsBox:wHt,setSize:_Ht,startPipeline:EHt,addPipelineComponent:vHt,updateAxes:AHt,getNode:RHt,getWardleyData:LHt,clear:DHt,setAccTitle:Ye,getAccTitle:Ze,setDiagramTitle:sr,getDiagramTitle:er,getAccDescription:tr,setAccDescription:Je}});var IHt,NHt,OHt,MHt,g0t,y0t=b(()=>{"use strict";ye();Jt();ca();gi();IHt=["Genesis","Custom Built","Product","Commodity"],NHt=s(()=>{let{themeVariables:e}=Q();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),OHt=s(()=>{let e=Q()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),MHt=s((e,t,r,i)=>{z.debug(`Rendering Wardley map +`+e);let n=OHt(),a=NHt(),o=n.nodeRadius*1.6,l=i.db,u=l.getWardleyData(),h=l.getDiagramTitle(),d=u.size?.width??n.width,f=u.size?.height??n.height,p=pi(t);p.selectAll("*").remove(),pr(p,f,d,n.useMaxWidth),p.attr("viewBox",`0 0 ${d} ${f}`);let m=p.append("g").attr("class","wardley-map"),g=p.append("defs");g.append("marker").attr("id",`arrow-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",a.evolutionStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-end-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",a.linkStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-start-${t}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",a.linkStroke).attr("stroke","none"),m.append("rect").attr("class","wardley-background").attr("width",d).attr("height",f).attr("fill",a.backgroundColor);let y=d-n.padding*2,x=f-n.padding*2;h&&m.append("text").attr("class","wardley-title").attr("x",d/2).attr("y",n.padding/2).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let k=s(E=>n.padding+E/100*y,"projectX"),T=s(E=>f-n.padding-E/100*x,"projectY"),C=m.append("g").attr("class","wardley-axes");C.append("line").attr("x1",n.padding).attr("x2",d-n.padding).attr("y1",f-n.padding).attr("y2",f-n.padding).attr("stroke",a.axisColor).attr("stroke-width",1),C.append("line").attr("x1",n.padding).attr("x2",n.padding).attr("y1",n.padding).attr("y2",f-n.padding).attr("stroke",a.axisColor).attr("stroke-width",1);let _=u.axes.xLabel??"Evolution",S=u.axes.yLabel??"Visibility";C.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",n.padding+y/2).attr("y",f-n.padding/4).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(_),C.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",n.padding/3).attr("y",n.padding+x/2).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${n.padding/3} ${n.padding+x/2})`).text(S);let w=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:IHt;if(w.length>0){let E=m.append("g").attr("class","wardley-stages"),D=u.axes.stageBoundaries,V=[];if(D&&D.length===w.length){let L=0;D.forEach(q=>{V.push({start:L,end:q}),L=q})}else{let L=1/w.length;w.forEach((q,H)=>{V.push({start:H*L,end:(H+1)*L})})}w.forEach((L,q)=>{let H=V[q],K=n.padding+H.start*y,U=n.padding+H.end*y,st=(K+U)/2;q>0&&E.append("line").attr("x1",K).attr("x2",K).attr("y1",n.padding).attr("y2",f-n.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),E.append("text").attr("class","wardley-stage-label").attr("x",st).attr("y",f-n.padding/1.5).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize-2).attr("text-anchor","middle").text(L)})}if(n.showGrid){let E=m.append("g").attr("class","wardley-grid");for(let D=1;D<4;D++){let V=D/4,L=n.padding+y*V;E.append("line").attr("x1",L).attr("x2",L).attr("y1",n.padding).attr("y2",f-n.padding).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6"),E.append("line").attr("x1",n.padding).attr("x2",d-n.padding).attr("y1",f-n.padding-x*V).attr("y2",f-n.padding-x*V).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6")}}let A=new Map;if(u.nodes.forEach(E=>{A.set(E.id,{x:k(E.x),y:T(E.y),node:E})}),u.pipelines.length>0){let E=m.append("g").attr("class","wardley-pipelines"),D=m.append("g").attr("class","wardley-pipeline-links");u.pipelines.forEach(V=>{if(V.componentIds.length===0)return;let L=V.componentIds.map(U=>({id:U,pos:A.get(U),node:u.nodes.find(st=>st.id===U)})).filter(U=>U.pos&&U.node).sort((U,st)=>U.node.x-st.node.x);for(let U=0;U{let st=A.get(U);st&&(q=Math.min(q,st.x),H=Math.max(H,st.x),K=st.y)}),q!==1/0&&H!==-1/0){let st=n.nodeRadius*4,X=K-st/2,ut=A.get(V.nodeId);if(ut){let ot=(q+H)/2;ut.x=ot,ut.y=X-o/6}E.append("rect").attr("class","wardley-pipeline-box").attr("x",q-15).attr("y",X).attr("width",H-q+30).attr("height",st).attr("fill","none").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let v=m.append("g").attr("class","wardley-links"),M=new Map;u.pipelines.forEach(E=>{M.set(E.nodeId,new Set(E.componentIds))});let $=u.links.filter(E=>!(!A.has(E.source)||!A.has(E.target)||M.get(E.target)?.has(E.source)));v.selectAll("line").data($).enter().append("line").attr("class",E=>`wardley-link${E.dashed?" wardley-link--dashed":""}`).attr("x1",E=>{let D=A.get(E.source),V=A.get(E.target),q=u.nodes.find(st=>st.id===E.source).isPipelineParent?o/Math.sqrt(2):n.nodeRadius,H=V.x-D.x,K=V.y-D.y,U=Math.sqrt(H*H+K*K);return D.x+H/U*q}).attr("y1",E=>{let D=A.get(E.source),V=A.get(E.target),q=u.nodes.find(st=>st.id===E.source).isPipelineParent?o/Math.sqrt(2):n.nodeRadius,H=V.x-D.x,K=V.y-D.y,U=Math.sqrt(H*H+K*K);return D.y+K/U*q}).attr("x2",E=>{let D=A.get(E.source),V=A.get(E.target),q=u.nodes.find(st=>st.id===E.target).isPipelineParent?o/Math.sqrt(2):n.nodeRadius,H=D.x-V.x,K=D.y-V.y,U=Math.sqrt(H*H+K*K);return V.x+H/U*q}).attr("y2",E=>{let D=A.get(E.source),V=A.get(E.target),q=u.nodes.find(st=>st.id===E.target).isPipelineParent?o/Math.sqrt(2):n.nodeRadius,H=D.x-V.x,K=D.y-V.y,U=Math.sqrt(H*H+K*K);return V.y+K/U*q}).attr("stroke",a.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",E=>E.dashed?"6 6":null).attr("marker-end",E=>E.flow==="forward"||E.flow==="bidirectional"?`url(#link-arrow-end-${t})`:null).attr("marker-start",E=>E.flow==="backward"||E.flow==="bidirectional"?`url(#link-arrow-start-${t})`:null),v.selectAll("text").data($.filter(E=>E.label)).enter().append("text").attr("class","wardley-link-label").attr("x",E=>{let D=A.get(E.source),V=A.get(E.target),L=(D.x+V.x)/2,q=V.y-D.y,H=V.x-D.x,K=Math.sqrt(H*H+q*q),U=8,st=q/K;return L+st*U}).attr("y",E=>{let D=A.get(E.source),V=A.get(E.target),L=(D.y+V.y)/2,q=V.x-D.x,H=V.y-D.y,K=Math.sqrt(q*q+H*H),U=8,st=-q/K;return L+st*U}).attr("fill",a.axisTextColor).attr("font-size",n.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",E=>{let D=A.get(E.source),V=A.get(E.target),L=(D.x+V.x)/2,q=(D.y+V.y)/2,H=V.x-D.x,K=V.y-D.y,U=Math.sqrt(H*H+K*K),st=8,X=K/U,ut=-H/U,ot=L+X*st,mt=q+ut*st,ht=Math.atan2(K,H)*180/Math.PI;return(ht>90||ht<-90)&&(ht+=180),`rotate(${ht} ${ot} ${mt})`}).text(E=>E.label);let I=m.append("g").attr("class","wardley-trends"),F=u.trends.map(E=>{let D=A.get(E.nodeId);if(!D)return null;let V=k(E.targetX),L=T(E.targetY),q=V-D.x,H=L-D.y,K=Math.sqrt(q*q+H*H),U=n.nodeRadius+2,st=K>U?V-q/K*U:V,X=K>U?L-H/K*U:L;return{origin:D,targetX:V,targetY:L,adjustedX2:st,adjustedY2:X}}).filter(E=>E!==null);I.selectAll("line").data(F).enter().append("line").attr("class","wardley-trend").attr("x1",E=>E.origin.x).attr("y1",E=>E.origin.y).attr("x2",E=>E.adjustedX2).attr("y2",E=>E.adjustedY2).attr("stroke",a.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${t})`);let O=m.append("g").attr("class","wardley-nodes").selectAll("g").data(u.nodes).enter().append("g").attr("class",E=>["wardley-node",E.className?`wardley-node--${E.className}`:""].filter(Boolean).join(" "));O.filter(E=>E.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",E=>A.get(E.id).x).attr("cy",E=>A.get(E.id).y).attr("r",n.nodeRadius*2).attr("fill","#666").attr("stroke",a.componentStroke).attr("stroke-width",1),O.filter(E=>E.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",E=>A.get(E.id).x).attr("cy",E=>A.get(E.id).y).attr("r",n.nodeRadius*2).attr("fill","#ccc").attr("stroke",a.componentStroke).attr("stroke-width",1),O.filter(E=>E.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",E=>A.get(E.id).x).attr("cy",E=>A.get(E.id).y).attr("r",n.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let R=O.filter(E=>E.sourceStrategy==="market");R.append("circle").attr("class","wardley-market-overlay").attr("cx",E=>A.get(E.id).x).attr("cy",E=>A.get(E.id).y).attr("r",n.nodeRadius*2).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),O.filter(E=>!E.isPipelineParent&&E.sourceStrategy!=="market"&&E.className!=="anchor").append("circle").attr("cx",E=>A.get(E.id).x).attr("cy",E=>A.get(E.id).y).attr("r",n.nodeRadius).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1);let N=n.nodeRadius*.7,P=n.nodeRadius*1.2;if(R.append("line").attr("class","wardley-market-line").attr("x1",E=>A.get(E.id).x).attr("y1",E=>A.get(E.id).y-P).attr("x2",E=>A.get(E.id).x-P*Math.cos(Math.PI/6)).attr("y2",E=>A.get(E.id).y+P*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),R.append("line").attr("class","wardley-market-line").attr("x1",E=>A.get(E.id).x-P*Math.cos(Math.PI/6)).attr("y1",E=>A.get(E.id).y+P*Math.sin(Math.PI/6)).attr("x2",E=>A.get(E.id).x+P*Math.cos(Math.PI/6)).attr("y2",E=>A.get(E.id).y+P*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),R.append("line").attr("class","wardley-market-line").attr("x1",E=>A.get(E.id).x+P*Math.cos(Math.PI/6)).attr("y1",E=>A.get(E.id).y+P*Math.sin(Math.PI/6)).attr("x2",E=>A.get(E.id).x).attr("y2",E=>A.get(E.id).y-P).attr("stroke",a.componentStroke).attr("stroke-width",1),R.append("circle").attr("class","wardley-market-dot").attr("cx",E=>A.get(E.id).x).attr("cy",E=>A.get(E.id).y-P).attr("r",N).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),R.append("circle").attr("class","wardley-market-dot").attr("cx",E=>A.get(E.id).x-P*Math.cos(Math.PI/6)).attr("cy",E=>A.get(E.id).y+P*Math.sin(Math.PI/6)).attr("r",N).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),R.append("circle").attr("class","wardley-market-dot").attr("cx",E=>A.get(E.id).x+P*Math.cos(Math.PI/6)).attr("cy",E=>A.get(E.id).y+P*Math.sin(Math.PI/6)).attr("r",N).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),O.filter(E=>E.isPipelineParent===!0).append("rect").attr("x",E=>A.get(E.id).x-o/2).attr("y",E=>A.get(E.id).y-o/2).attr("width",o).attr("height",o).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1),O.filter(E=>E.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",E=>{let D=A.get(E.id),V=E.isPipelineParent?o/2+15:n.nodeRadius+15;return E.sourceStrategy&&(V+=n.nodeRadius+10),D.x+V}).attr("y1",E=>{let D=A.get(E.id),V=E.isPipelineParent?o:n.nodeRadius*2;return D.y-V/2}).attr("x2",E=>{let D=A.get(E.id),V=E.isPipelineParent?o/2+15:n.nodeRadius+15;return E.sourceStrategy&&(V+=n.nodeRadius+10),D.x+V}).attr("y2",E=>{let D=A.get(E.id),V=E.isPipelineParent?o:n.nodeRadius*2;return D.y+V/2}).attr("stroke",a.componentStroke).attr("stroke-width",6),O.append("text").attr("x",E=>{let D=A.get(E.id);if(E.className==="anchor")return E.labelOffsetX!==void 0?D.x+E.labelOffsetX:D.x;let V=n.nodeLabelOffset;E.sourceStrategy&&E.labelOffsetX===void 0&&(V+=10);let L=E.labelOffsetX??V;return D.x+L}).attr("y",E=>{let D=A.get(E.id);if(E.className==="anchor")return E.labelOffsetY!==void 0?D.y+E.labelOffsetY:D.y-3;let V=-n.nodeLabelOffset;E.sourceStrategy&&E.labelOffsetY===void 0&&(V-=10);let L=E.labelOffsetY??V;return D.y+L}).attr("class","wardley-node-label").attr("fill",E=>E.className==="evolved"?a.evolutionStroke:E.className==="anchor"?"#000":a.componentLabelColor).attr("font-size",n.labelFontSize).attr("font-weight",E=>E.className==="anchor"?"bold":"normal").attr("text-anchor",E=>E.className==="anchor"?"middle":"start").attr("dominant-baseline",E=>E.className==="anchor"?"middle":"auto").text(E=>E.label),u.annotations.length>0){let E=m.append("g").attr("class","wardley-annotations");if(u.annotations.forEach(D=>{let V=D.coordinates.map(L=>({x:k(L.x),y:T(L.y)}));if(V.length>1)for(let L=0;L{let q=E.append("g").attr("class","wardley-annotation");q.append("circle").attr("cx",L.x).attr("cy",L.y).attr("r",10).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5),q.append("text").attr("x",L.x).attr("y",L.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text(D.number)})}),u.annotationsBox){let D=k(u.annotationsBox.x),V=T(u.annotationsBox.y),L=10,q=16,H=11,K=E.append("g").attr("class","wardley-annotations-box"),U=[...u.annotations].filter(X=>X.text).sort((X,ut)=>X.number-ut.number),st=[];if(U.forEach((X,ut)=>{let ot=K.append("text").attr("x",D+L).attr("y",V+L+(ut+1)*q).attr("font-size",H).attr("fill",a.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${X.number}. ${X.text}`);st.push(ot)}),st.length>0){let X=0,ut=0;st.forEach(yt=>{let Et=yt.node(),Ct=Et.getComputedTextLength();X=Math.max(X,Ct);let Bt=Et.getBBox();ut=Math.max(ut,Bt.height)});let ot=X+L*2+105,mt=U.length*q+L*2+ut/2,ht=n.padding,it=d-n.padding-ot,Ot=n.padding,St=f-n.padding-mt;D=Math.max(ht,Math.min(D,it)),V=Math.max(Ot,Math.min(V,St)),st.forEach((yt,Et)=>{yt.attr("x",D+L).attr("y",V+L+(Et+1)*q)}),K.insert("rect","text").attr("x",D).attr("y",V).attr("width",ot).attr("height",mt).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(u.notes.length>0){let E=m.append("g").attr("class","wardley-notes");u.notes.forEach(D=>{let V=k(D.x),L=T(D.y);E.append("text").attr("x",V).attr("y",L).attr("text-anchor","start").attr("font-size",11).attr("fill",a.axisTextColor).attr("font-weight","bold").text(D.text)})}if(u.accelerators.length>0){let E=m.append("g").attr("class","wardley-accelerators");u.accelerators.forEach(D=>{let V=k(D.x),L=T(D.y),q=60,H=30,K=20,U=` + M ${V} ${L-H/2} + L ${V+q-K} ${L-H/2} + L ${V+q-K} ${L-H/2-8} + L ${V+q} ${L} + L ${V+q-K} ${L+H/2+8} + L ${V+q-K} ${L+H/2} + L ${V} ${L+H/2} + Z + `;E.append("path").attr("d",U).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),E.append("text").attr("x",V+q/2).attr("y",L+H/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text(D.name)})}if(u.deaccelerators.length>0){let E=m.append("g").attr("class","wardley-deaccelerators");u.deaccelerators.forEach(D=>{let V=k(D.x),L=T(D.y),q=60,H=30,K=20,U=` + M ${V+q} ${L-H/2} + L ${V+K} ${L-H/2} + L ${V+K} ${L-H/2-8} + L ${V} ${L} + L ${V+K} ${L+H/2+8} + L ${V+K} ${L+H/2} + L ${V+q} ${L+H/2} + Z + `;E.append("path").attr("d",U).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),E.append("text").attr("x",V+q/2).attr("y",L+H/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text(D.name)})}},"draw"),g0t={draw:MHt}});var x0t={};Fe(x0t,{diagram:()=>BHt});var BHt,b0t=b(()=>{"use strict";d0t();m0t();y0t();BHt={parser:p$,db:p0t,renderer:g0t,styles:s(()=>"","styles")}});var SYt={};Fe(SYt,{default:()=>CYt});Zh();Y3();td();var dvt=s(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),fvt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(jU(),qU));return{id:"c4",diagram:e}},"loader"),pvt={id:"c4",detector:dvt,loader:fvt},UU=pvt;var yit="flowchart",uMt=s((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),hMt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(V6(),F6));return{id:yit,diagram:e}},"loader"),dMt={id:yit,detector:uMt,loader:hMt},xit=dMt;var bit="flowchart-v2",fMt=s((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),pMt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(V6(),F6));return{id:bit,diagram:e}},"loader"),mMt={id:bit,detector:fMt,loader:pMt},kit=mMt;var kMt=s(e=>/^\s*erDiagram/.test(e),"detector"),TMt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Rit(),Ait));return{id:"er",diagram:e}},"loader"),CMt={id:"er",detector:kMt,loader:TMt},Lit=CMt;var ght="gitGraph",s9t=s(e=>/^\s*gitGraph/.test(e),"detector"),a9t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(mht(),pht));return{id:ght,diagram:e}},"loader"),o9t={id:ght,detector:s9t,loader:a9t},yht=o9t;var Xht="gantt",X9t=s(e=>/^\s*gantt/.test(e),"detector"),K9t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Yht(),Hht));return{id:Xht,diagram:e}},"loader"),Q9t={id:Xht,detector:X9t,loader:K9t},Kht=Q9t;var sdt="info",rFt=s(e=>/^\s*info/.test(e),"detector"),iFt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ndt(),idt));return{id:sdt,diagram:e}},"loader"),adt={id:sdt,detector:rFt,loader:iFt};var gFt=s(e=>/^\s*pie/.test(e),"detector"),yFt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(mdt(),pdt));return{id:"pie",diagram:e}},"loader"),gdt={id:"pie",detector:gFt,loader:yFt};var Rdt="quadrantChart",MFt=s(e=>/^\s*quadrantChart/.test(e),"detector"),BFt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Adt(),vdt));return{id:Rdt,diagram:e}},"loader"),PFt={id:Rdt,detector:MFt,loader:BFt},Ldt=PFt;var ift="xychart",tVt=s(e=>/^\s*xychart(-beta)?/.test(e),"detector"),eVt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(rft(),eft));return{id:ift,diagram:e}},"loader"),rVt={id:ift,detector:tVt,loader:eVt},nft=rVt;var fft="requirement",oVt=s(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),lVt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(dft(),hft));return{id:fft,diagram:e}},"loader"),cVt={id:fft,detector:oVt,loader:lVt},pft=cVt;var Ift="sequence",szt=s(e=>/^\s*sequenceDiagram/.test(e),"detector"),azt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Dft(),Lft));return{id:Ift,diagram:e}},"loader"),ozt={id:Ift,detector:szt,loader:azt},Nft=ozt;var Fft="class",fzt=s((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),pzt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>($ft(),Pft));return{id:Fft,diagram:e}},"loader"),mzt={id:Fft,detector:fzt,loader:pzt},Vft=mzt;var Wft="classDiagram",yzt=s((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),xzt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Gft(),zft));return{id:Wft,diagram:e}},"loader"),bzt={id:Wft,detector:yzt,loader:xzt},qft=bzt;var Cpt="state",jzt=s((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),Uzt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Tpt(),kpt));return{id:Cpt,diagram:e}},"loader"),Hzt={id:Cpt,detector:jzt,loader:Uzt},Spt=Hzt;var Ept="stateDiagram",Xzt=s((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Kzt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_pt(),wpt));return{id:Ept,diagram:e}},"loader"),Qzt={id:Ept,detector:Xzt,loader:Kzt},vpt=Qzt;var Gpt="journey",xGt=s(e=>/^\s*journey/.test(e),"detector"),bGt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(zpt(),Vpt));return{id:Gpt,diagram:e}},"loader"),kGt={id:Gpt,detector:xGt,loader:bGt},Wpt=kGt;Jt();ca();gi();var TGt=s((e,t,r)=>{z.debug(`rendering svg for syntax error +`);let i=pi(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),pr(i,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"),i7={draw:TGt},qpt=i7;var CGt={db:{},renderer:i7,parser:{parse:s(()=>{},"parse")}},jpt=CGt;var Emt="timeline",HGt=s(e=>/^\s*timeline/.test(e),"detector"),YGt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_mt(),wmt));return{id:Emt,diagram:e}},"loader"),XGt={id:Emt,detector:HGt,loader:YGt},vmt=XGt;var Fmt="kanban",hWt=s(e=>/^\s*kanban/.test(e),"detector"),dWt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>($mt(),Pmt));return{id:Fmt,diagram:e}},"loader"),fWt={id:Fmt,detector:hWt,loader:dWt},Vmt=fWt;var Tgt="sankey",BWt=s(e=>/^\s*sankey(-beta)?/.test(e),"detector"),PWt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(kgt(),bgt));return{id:Tgt,diagram:e}},"loader"),$Wt={id:Tgt,detector:BWt,loader:PWt},Cgt=$Wt;var Lgt="packet",HWt=s(e=>/^\s*packet(-beta)?/.test(e),"detector"),YWt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Rgt(),Agt));return{id:Lgt,diagram:e}},"loader"),Dgt={id:Lgt,detector:HWt,loader:YWt};var Ggt="radar",gqt=s(e=>/^\s*radar-beta/.test(e),"detector"),yqt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(zgt(),Vgt));return{id:Ggt,diagram:e}},"loader"),Wgt={id:Ggt,detector:gqt,loader:yqt};var Uyt="block",$jt=s(e=>/^\s*block(-beta)?/.test(e),"detector"),Fjt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(jyt(),qyt));return{id:Uyt,diagram:e}},"loader"),Vjt={id:Uyt,detector:$jt,loader:Fjt},Hyt=Vjt;var i1t="treeView",rUt=s(e=>/^\s*treeView-beta/.test(e),"detector"),iUt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(r1t(),e1t));return{id:i1t,diagram:e}},"loader"),nUt={id:i1t,detector:rUt,loader:iUt},n1t=nUt;var T1t="ishikawa",yUt=s(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),xUt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(k1t(),b1t));return{id:T1t,diagram:e}},"loader"),C1t={id:T1t,detector:yUt,loader:xUt};var Z1t="venn",eHt=s(e=>/^\s*venn-beta/.test(e),"detector"),rHt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Q1t(),K1t));return{id:Z1t,diagram:e}},"loader"),iHt={id:Z1t,detector:eHt,loader:rHt},J1t=iHt;td();ye();var c0t="treemap",dHt=s(e=>/^\s*treemap/.test(e),"detector"),fHt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(l0t(),o0t));return{id:c0t,diagram:e}},"loader"),u0t={id:c0t,detector:dHt,loader:fHt};var k0t="wardley-beta",PHt=s(e=>/^\s*wardley-beta/i.test(e),"detector"),$Ht=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(b0t(),x0t));return{id:k0t,diagram:e}},"loader"),FHt={id:k0t,detector:PHt,loader:$Ht},T0t=FHt;var C0t=!1,Py=s(()=>{C0t||(C0t=!0,ed("error",jpt,e=>e.toLowerCase().trim()==="error"),ed("---",{db:{clear:s(()=>{},"clear")},styles:{},renderer:{draw:s(()=>{},"draw")},parser:{parse:s(()=>{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:s(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),$2(UU,Vmt,qft,Vft,Lit,Kht,adt,gdt,pft,Nft,kit,xit,vmt,yht,vpt,Spt,Wpt,Ldt,Cgt,Dgt,nft,Hyt,n1t,Wgt,C1t,u0t,J1t,T0t))},"addDiagrams");Jt();td();ye();var S0t=s(async()=>{z.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(cc).map(async([r,{detector:i,loader:n}])=>{if(n)try{o1(r)}catch{try{let{diagram:a,id:o}=await n();ed(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete cc[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(let r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");Jt();lr();var Gv="comm",Wv="rule",qv="decl";var w0t="@import";var _0t="@namespace",E0t="@keyframes";var v0t="@layer";var m$=Math.abs,f2=String.fromCharCode;function jv(e){return e.trim()}s(jv,"trim");function p2(e,t,r){return e.replace(t,r)}s(p2,"replace");function A0t(e,t,r){return e.indexOf(t,r)}s(A0t,"indexof");function zh(e,t){return e.charCodeAt(t)|0}s(zh,"charat");function Gh(e,t,r){return e.slice(t,r)}s(Gh,"substr");function Oa(e){return e.length}s(Oa,"strlen");function R0t(e){return e.length}s(R0t,"sizeof");function $y(e,t){return t.push(e),e}s($y,"append");var Uv=1,Fy=1,L0t=0,yo=0,ln=0,zy="";function Hv(e,t,r,i,n,a,o,l){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Uv,column:Fy,length:o,return:"",siblings:l}}s(Hv,"node");function D0t(){return ln}s(D0t,"char");function I0t(){return ln=yo>0?zh(zy,--yo):0,Fy--,ln===10&&(Fy=1,Uv--),ln}s(I0t,"prev");function xo(){return ln=yo2||Vy(ln)>3?"":" "}s(M0t,"whitespace");function B0t(e,t){for(;--t&&xo()&&!(ln<48||ln>102||ln>57&&ln<65||ln>70&&ln<97););return Yv(e,m2()+(t<6&&su()==32&&xo()==32))}s(B0t,"escaping");function g$(e){for(;xo();)switch(ln){case e:return yo;case 34:case 39:e!==34&&e!==39&&g$(ln);break;case 40:e===41&&g$(e);break;case 92:xo();break}return yo}s(g$,"delimiter");function P0t(e,t){for(;xo()&&e+ln!==57;)if(e+ln===84&&su()===47)break;return"/*"+Yv(t,yo-1)+"*"+f2(e===47?e:xo())}s(P0t,"commenter");function $0t(e){for(;!Vy(su());)xo();return Yv(e,yo)}s($0t,"identifier");function z0t(e){return O0t(Kv("",null,null,null,[""],e=N0t(e),0,[0],e))}s(z0t,"compile");function Kv(e,t,r,i,n,a,o,l,u){for(var h=0,d=0,f=o,p=0,m=0,g=0,y=1,x=1,k=1,T=0,C="",_=n,S=a,w=i,A=C;x;)switch(g=T,T=xo()){case 40:if(g!=108&&zh(A,f-1)==58){A0t(A+=p2(Xv(T),"&","&\f"),"&\f",m$(h?l[h-1]:0))!=-1&&(k=-1);break}case 34:case 39:case 91:A+=Xv(T);break;case 9:case 10:case 13:case 32:A+=M0t(g);break;case 92:A+=B0t(m2()-1,7);continue;case 47:switch(su()){case 42:case 47:$y(VHt(P0t(xo(),m2()),t,r,u),u),(Vy(g||1)==5||Vy(su()||1)==5)&&Oa(A)&&Gh(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*y:l[h++]=Oa(A)*k;case 125*y:case 59:case 0:switch(T){case 0:case 125:x=0;case 59+d:k==-1&&(A=p2(A,/\f/g,"")),m>0&&(Oa(A)-f||y===0&&g===47)&&$y(m>32?V0t(A+";",i,r,f-1,u):V0t(p2(A," ","")+";",i,r,f-2,u),u);break;case 59:A+=";";default:if($y(w=F0t(A,t,r,h,d,n,l,C,_=[],S=[],f,a),a),T===123)if(d===0)Kv(A,t,w,w,_,a,f,l,S);else{switch(p){case 99:if(zh(A,3)===110)break;case 108:if(zh(A,2)===97)break;default:d=0;case 100:case 109:case 115:}d?Kv(e,w,w,i&&$y(F0t(e,w,w,0,0,n,l,C,n,_=[],f,S),S),n,S,f,l,i?_:S):Kv(A,w,w,w,[""],S,0,l,S)}}h=d=m=0,y=k=1,C=A="",f=o;break;case 58:f=1+Oa(A),m=g;default:if(y<1){if(T==123)--y;else if(T==125&&y++==0&&I0t()==125)continue}switch(A+=f2(T),T*y){case 38:k=d>0?1:(A+="\f",-1);break;case 44:l[h++]=(Oa(A)-1)*k,k=1;break;case 64:su()===45&&(A+=Xv(xo())),p=su(),d=f=Oa(C=A+=$0t(m2())),T++;break;case 45:g===45&&Oa(A)==2&&(y=0)}}return a}s(Kv,"parse");function F0t(e,t,r,i,n,a,o,l,u,h,d,f){for(var p=n-1,m=n===0?a:[""],g=R0t(m),y=0,x=0,k=0;y0?m[T]+" "+C:p2(C,/&\f/g,m[T])))&&(u[k++]=_);return Hv(e,t,r,n===0?Wv:l,u,h,d,f)}s(F0t,"ruleset");function VHt(e,t,r,i){return Hv(e,t,r,Gv,f2(D0t()),Gh(e,2,-2),0,i)}s(VHt,"comment");function V0t(e,t,r,i,n){return Hv(e,t,r,qv,Gh(e,0,i),Gh(e,i+1,-1),i,n)}s(V0t,"declaration");function Qv(e,t){for(var r="",i=0;i{j0t.forEach(e=>{e()}),j0t=[]},"attachFunctions");Jt();var H0t=s(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");P2();S0();function Y0t(e){let t=e.match(B2);if(!t)return{text:e,metadata:{}};let r=Pu(t[1],{schema:Bu})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}s(Y0t,"extractFrontMatter");Re();var GHt=s(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),WHt=s(e=>{let{text:t,metadata:r}=Y0t(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),qHt=s(e=>{let t=Te.detectInit(e)??{},r=Te.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:NU(e),directive:t}},"processDirectives");function y$(e){let t=GHt(e),r=WHt(t),i=qHt(r.text),n=Wr(r.config,i.directive);return e=H0t(i.text),{code:e,title:r.title,config:n}}s(y$,"preprocessDiagram");Z3();R2();Re();function X0t(e){let t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}s(X0t,"toBase64");var jHt=5e4,UHt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",HHt="sandbox",YHt="loose",XHt="http://www.w3.org/2000/svg",KHt="http://www.w3.org/1999/xlink",QHt="http://www.w3.org/1999/xhtml",ZHt="100%",JHt="100%",tYt="border:0;margin:0;",eYt="margin:0",rYt="allow-top-navigation-by-user-activation allow-popups",iYt='The "iframe" tag is not supported by your browser.',nYt=["foreignobject"],sYt=["dominant-baseline"];function J0t(e){let t=y$(e);return Ky(),U9(t.config??{}),t}s(J0t,"processAndSetConfigs");async function aYt(e,t){Py();try{let{code:r,config:i}=J0t(e);return{diagramType:(await txt(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}s(aYt,"parse");var K0t=s((e,t,r=[])=>` +.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),oYt=s((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=` +${e.themeCSS}`),e.fontFamily!==void 0&&(r+=` +:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=` +:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let o=Ke(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{qe(l.styles)||o.forEach(u=>{r+=K0t(l.id,u,l.styles)}),qe(l.textStyles)||(r+=K0t(l.id,"tspan",(l?.textStyles||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),lYt=s((e,t,r,i)=>{let n=oYt(e,r),a=xF(t,n,{...e.themeVariables,theme:e.theme,look:e.look},i);return Qv(z0t(`${i}{${a}}`),G0t)},"createUserStyles"),cYt=s((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=ks(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),uYt=s((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":JHt,i=X0t(`${e}`);return``},"putIntoIFrame"),Q0t=s((e,t,r,i,n)=>{let a=e.append("div");a.attr("id",r),i&&a.attr("style",i);let o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",XHt);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function Z0t(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(Z0t,"sandboxedIframe");var hYt=s((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),dYt=s(async function(e,t,r){Py();let i=J0t(t);t=i.code;let n=le();z.debug(n),t.length>(n?.maxTextSize??jHt)&&(t=UHt);let a="#"+e,o="i"+e,l="#"+o,u="d"+e,h="#"+u,d=s(()=>{let B=vt(p?l:h).node();B&&"remove"in B&&B.remove()},"removeTempElements"),f=vt("body"),p=n.securityLevel===HHt,m=n.securityLevel===YHt,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let F=Z0t(vt(r),o);f=vt(F.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=vt(r);Q0t(f,e,u,`font-family: ${g}`,KHt)}else{if(hYt(document,e,u,o),p){let F=Z0t(vt("body"),o);f=vt(F.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=vt("body");Q0t(f,e,u)}let y,x;try{y=await Gy.fromText(t,{title:i.title})}catch(F){if(n.suppressErrorRendering)throw d(),F;y=await Gy.fromText("error"),x=F}let k=f.select(h).node(),T=y.type,C=k.firstChild,_=C.firstChild,S=y.renderer.getClasses?.(t,y),w=lYt(n,T,S,a),A=document.createElement("style");A.innerHTML=w,C.insertBefore(A,_);try{await y.renderer.draw(t,e,"11.14.0",y)}catch(F){throw n.suppressErrorRendering?d():qpt.draw(t,e,"11.14.0"),F}let v=f.select(`${h} svg`),M=y.db.getAccTitle?.(),$=y.db.getAccDescription?.();pYt(T,v,M,$),f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",QHt);let I=f.select(h).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),I=cYt(I,p,Kn(n.arrowMarkerAbsolute)),p){let F=f.select(h+" svg").node();I=uYt(I,F)}else m||(I=Va.sanitize(I,{ADD_TAGS:nYt,ADD_ATTR:sYt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(U0t(),x)throw x;return d(),{diagramType:T,svg:I,bindFunctions:y.db.bindFunctions}},"render");function fYt(e={}){let t=Ti({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),W9(t),t?.theme&&t.theme in $a?t.themeVariables=$a[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=$a.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?O3(t):M3();qy(r.logLevel),Py()}s(fYt,"initialize");var txt=s((e,t={})=>{let{code:r}=y$(e);return Gy.fromText(r,t)},"getDiagramFromText");function pYt(e,t,r,i){W0t(t,e),q0t(t,r,i,t.attr("id"))}s(pYt,"addA11yInfo");var Wh=Object.freeze({render:dYt,parse:aYt,getDiagramFromText:txt,initialize:fYt,getConfig:le,setConfig:D2,getSiteConfig:M3,updateSiteConfig:q9,reset:s(()=>{Ky()},"reset"),globalReset:s(()=>{Ky(cu)},"globalReset"),defaultConfig:cu});qy(le().logLevel);Ky(le());Yd();Re();var mYt=s((e,t,r)=>{z.warn(e),hL(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),ext=s(async function(e={querySelector:".mermaid"}){try{await gYt(e)}catch(t){if(hL(t)&&z.error(t.str),au.parseError&&au.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),gYt=s(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let i=Wh.getConfig();z.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");z.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(z.debug("Start On Load: "+i?.startOnLoad),Wh.updateSiteConfig({startOnLoad:i?.startOnLoad}));let a=new Te.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),o,l=[];for(let u of Array.from(n)){z.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;o=u.innerHTML,o=M2(Te.entityDecode(o)).trim().replace(//gi,"
    ");let d=Te.detectInit(o);d&&z.debug("Detected early reinit: ",d);try{let{svg:f,bindFunctions:p}=await sxt(h,o,u);u.innerHTML=f,e&&await e(h),p&&p(u)}catch(f){mYt(f,l,au.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),rxt=s(function(e){Wh.initialize(e)},"initialize"),yYt=s(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&rxt(e);let i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ext(i)},"init"),xYt=s(async(e,{lazyLoad:t=!0}={})=>{Py(),$2(...e),t===!1&&await S0t()},"registerExternalDiagrams"),ixt=s(function(){if(au.startOnLoad){let{startOnLoad:e}=Wh.getConfig();e&&au.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",ixt,!1)}var bYt=s(function(e){au.parseError=e},"setParseErrorHandler"),Zv=[],x$=!1,nxt=s(async()=>{if(!x$){for(x$=!0;Zv.length>0;){let e=Zv.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}x$=!1}},"executeQueue"),kYt=s(async(e,t)=>new Promise((r,i)=>{let n=s(()=>new Promise((a,o)=>{Wh.parse(e,t).then(l=>{a(l),r(l)},l=>{z.error("Error parsing",l),au.parseError?.(l),o(l),i(l)})}),"performCall");Zv.push(n),nxt().catch(i)}),"parse"),sxt=s((e,t,r)=>new Promise((i,n)=>{let a=s(()=>new Promise((o,l)=>{Wh.render(e,t,r).then(u=>{o(u),i(u)},u=>{z.error("Error parsing",u),au.parseError?.(u),l(u),n(u)})}),"performCall");Zv.push(a),nxt().catch(n)}),"render"),TYt=s(()=>Object.keys(cc).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),au={startOnLoad:!0,mermaidAPI:Wh,parse:kYt,render:sxt,init:yYt,run:ext,registerExternalDiagrams:xYt,registerLayoutLoaders:B6,initialize:rxt,parseError:void 0,contentLoaded:ixt,setParseErrorHandler:bYt,detectType:kp,registerIconPacks:hF,getRegisteredDiagramsMetadata:TYt},CYt=au;return b2(SYt);})(); +/*! Check if previously processed */ +/*! + * Wait for document loaded before starting the execution + */ +/*! Bundled license information: + +dompurify/dist/purify.es.mjs: + (*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE *) + +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) + +lodash-es/lodash.js: + (** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) +*/ +globalThis["mermaid"] = globalThis.__esbuild_esm_mermaid_nm["mermaid"].default; diff --git a/docs/javascripts/mermaid-init.js b/docs/javascripts/mermaid-init.js new file mode 100644 index 0000000..09058f0 --- /dev/null +++ b/docs/javascripts/mermaid-init.js @@ -0,0 +1,16 @@ +// Initialize the self-hosted Mermaid tiny build. +// +// The companion file docs/assets/javascripts/mermaid.tiny.js is a UMD bundle +// that sets window.mermaid when it loads. Zensical's theme integration picks +// up window.mermaid automatically and uses it instead of loading Mermaid from +// unpkg (which is blocked by the Content Security Policy on +// docs.aws.amazon.com). +// +// See CONTRIBUTING.md ("Vendored dependencies") for the upgrade procedure. + +if (window.mermaid && typeof window.mermaid.initialize === "function") { + window.mermaid.initialize({ + startOnLoad: false, + securityLevel: "strict", + }); +} diff --git a/scripts/vendor_mermaid.py b/scripts/vendor_mermaid.py new file mode 100755 index 0000000..7667917 --- /dev/null +++ b/scripts/vendor_mermaid.py @@ -0,0 +1,183 @@ +#!/usr/bin/env python3 +"""Vendor a pinned build of @mermaid-js/tiny into docs/assets/javascripts/. + +Why this exists: + docs.aws.amazon.com applies a Content Security Policy that disallows + third-party script origins. Zensical's default Mermaid integration loads + mermaid from unpkg.com, which the CSP blocks. We therefore self-host + Mermaid from docs/assets/ (served same-origin). + + We use the "tiny" build (@mermaid-js/tiny), which ships as a single UMD + file with no lazy-loaded chunks. All currently-used diagram types + (flowchart, sequence, state, class, ER) are supported. Mindmap, + architecture, and KaTeX math are not. + +Configuration: + Version and expected SHA-256 are read from scripts/vendor_mermaid.toml. + +Usage: + python3 scripts/vendor_mermaid.py # download and verify + python3 scripts/vendor_mermaid.py --check # verify only, do not download + python3 scripts/vendor_mermaid.py --latest # print pinned + latest on npm + +Upgrading: + 1. Bump `version` in scripts/vendor_mermaid.toml. + 2. Run the script. It will fail with the new SHA-256 printed. Paste that + value into `sha256` in the TOML. + 3. Run the script again. It should succeed. + 4. Preview with `zensical serve`, then commit the TOML and the vendored + file together. +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import sys +import tomllib +import urllib.request +from pathlib import Path + +REPO_ROOT = Path(__file__).resolve().parent.parent +PIN_FILE = Path(__file__).resolve().parent / "vendor_mermaid.toml" +DEST_FILE = REPO_ROOT / "docs" / "assets" / "javascripts" / "mermaid.tiny.js" +SOURCE_URL_TEMPLATE = ( + "https://cdn.jsdelivr.net/npm/@mermaid-js/tiny@{version}/dist/mermaid.tiny.js" +) +NPM_REGISTRY_LATEST = "https://registry.npmjs.org/@mermaid-js/tiny/latest" + + +def load_pin() -> tuple[str, str]: + """Read the pinned version and expected SHA-256 from the TOML file.""" + if not PIN_FILE.exists(): + print(f"ERROR: pin file missing: {PIN_FILE}", file=sys.stderr) + sys.exit(1) + + with PIN_FILE.open("rb") as handle: + data = tomllib.load(handle) + + missing = [key for key in ("version", "sha256") if key not in data] + if missing: + print( + f"ERROR: {PIN_FILE.name} is missing required keys: " + f"{', '.join(missing)}", + file=sys.stderr, + ) + sys.exit(1) + return data["version"], data["sha256"] + + +def sha256_of(path: Path) -> str: + hasher = hashlib.sha256() + with path.open("rb") as handle: + for chunk in iter(lambda: handle.read(65536), b""): + hasher.update(chunk) + return hasher.hexdigest() + + +def check_only(version: str, expected_sha256: str) -> int: + if not DEST_FILE.exists(): + print( + f"ERROR: {DEST_FILE.relative_to(REPO_ROOT)} is missing. " + f"Run without --check to download.", + file=sys.stderr, + ) + return 1 + + actual = sha256_of(DEST_FILE) + if actual != expected_sha256: + print( + f"ERROR: SHA-256 mismatch for {DEST_FILE.relative_to(REPO_ROOT)}", + file=sys.stderr, + ) + print(f" expected (from {PIN_FILE.name}): {expected_sha256}", file=sys.stderr) + print(f" actual: {actual}", file=sys.stderr) + return 1 + + print( + f"OK: {DEST_FILE.relative_to(REPO_ROOT)} matches " + f"@mermaid-js/tiny@{version} (sha256={expected_sha256})" + ) + return 0 + + +def print_latest(version: str) -> int: + with urllib.request.urlopen(NPM_REGISTRY_LATEST, timeout=10) as response: + payload = json.load(response) + print(f"Pinned: {version}") + print(f"Latest: {payload['version']}") + return 0 + + +def download_and_verify(version: str, expected_sha256: str) -> int: + # Idempotent: skip download if the committed file already matches. + if DEST_FILE.exists() and sha256_of(DEST_FILE) == expected_sha256: + print(f"Already up to date: @mermaid-js/tiny@{version}") + return 0 + + source_url = SOURCE_URL_TEMPLATE.format(version=version) + print(f"Downloading @mermaid-js/tiny@{version} from {source_url}") + + DEST_FILE.parent.mkdir(parents=True, exist_ok=True) + tmp_file = DEST_FILE.with_suffix(DEST_FILE.suffix + ".tmp") + + try: + with urllib.request.urlopen(source_url, timeout=30) as response: + tmp_file.write_bytes(response.read()) + + actual = sha256_of(tmp_file) + if actual != expected_sha256: + print("ERROR: SHA-256 mismatch after download", file=sys.stderr) + print( + f" expected (from {PIN_FILE.name}): {expected_sha256}", + file=sys.stderr, + ) + print(f" actual: {actual}", file=sys.stderr) + print( + f"\nIf you intentionally bumped `version` in {PIN_FILE.name}, " + f"update `sha256` to the 'actual' value above and re-run.", + file=sys.stderr, + ) + tmp_file.unlink(missing_ok=True) + return 1 + + tmp_file.replace(DEST_FILE) + except Exception: + tmp_file.unlink(missing_ok=True) + raise + + print(f"Vendored @mermaid-js/tiny@{version}") + print(f" Path: {DEST_FILE.relative_to(REPO_ROOT)}") + print(f" SHA-256: {expected_sha256}") + return 0 + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + group = parser.add_mutually_exclusive_group() + group.add_argument( + "--check", + action="store_true", + help="Verify the committed vendored file matches the pinned SHA-256 " + "without downloading.", + ) + group.add_argument( + "--latest", + action="store_true", + help="Print the currently-pinned version and the latest version on npm, " + "then exit.", + ) + args = parser.parse_args() + + version, expected_sha256 = load_pin() + + if args.check: + return check_only(version, expected_sha256) + if args.latest: + return print_latest(version) + return download_and_verify(version, expected_sha256) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/vendor_mermaid.toml b/scripts/vendor_mermaid.toml new file mode 100644 index 0000000..487cbda --- /dev/null +++ b/scripts/vendor_mermaid.toml @@ -0,0 +1,8 @@ +# Pin file for scripts/vendor_mermaid.py. +# +# Bump `version`, run `python3 scripts/vendor_mermaid.py`. The script will +# fail with the new SHA-256 printed; paste that value into `sha256` below, +# then re-run. See CONTRIBUTING.md ("Vendored dependencies") for details. + +version = "11.14.0" +sha256 = "aa1f0a2b8e3ce63bc187079fc3481f02758bf71498b3d6d2dddcd069b8233f61" diff --git a/zensical.toml b/zensical.toml index 8bdf70a..4314c8e 100644 --- a/zensical.toml +++ b/zensical.toml @@ -133,7 +133,13 @@ extra_css = ["stylesheets/extra.css"] # The path provided should be relative to the "docs_dir". # # Read more: https://zensical.org/docs/customization/#additional-javascript -#extra_javascript = ["javascripts/extra.js"] +# +# mermaid.tiny.js: self-hosted Mermaid diagram renderer. +# See CONTRIBUTING.md for the upgrade procedure. +extra_javascript = [ + "assets/javascripts/mermaid.tiny.js", + "javascripts/mermaid-init.js", +] # ---------------------------------------------------------------------------- # Section for configuring theme options