!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RevealMermaid=e()}(this,(function(){"use strict";var t="11.4.1",e=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,o=(t,e)=>n(t,"name",{value:e,configurable:!0}),l=(t,e)=>function(){return e||(0,t[i(t)[0]])((e={exports:{}}).exports,e),e.exports},h=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},u=(t,e,a,o)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let l of i(e))s.call(t,l)||l===a||n(t,l,{get:()=>e[l],enumerable:!(o=r(e,l))||o.enumerable});return t},d=(t,e,n)=>(u(t,e,"default"),n&&u(n,e,"default")),p=(t,r,i)=>(i=null!=t?e(a(t)):{},u(!r&&t&&t.__esModule?i:n(i,"default",{value:t,enumerable:!0}),t)),g=l({"../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js"(t,e){!function(n,r){"object"==typeof t&&void 0!==e?e.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs=r()}(t,(function(){var t=6e4,e=36e5,n="millisecond",r="second",i="minute",a="hour",s="day",l="week",c="month",h="quarter",u="year",d="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,m={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:o((function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}),"ordinal")},y=o((function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t}),"m"),v={s:y,z:o((function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")}),"z"),m:o((function t(e,n){if(e.date()1)return t(s[0])}else{var o=e.name;b[o]=e,i=o}return!r&&i&&(x=i),i||!r&&x}),"t"),_=o((function(t,e){if(k(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new C(n)}),"O"),E=v;E.l=T,E.i=k,E.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var C=function(){function m(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}o(m,"M");var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(E.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(g);if(r){var i=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return E},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(t,e){var n=_(t);return this.startOf(e)<=n&&n<=this.endOf(e)},y.isAfter=function(t,e){return _(t){}),"trace"),debug:o(((...t)=>{}),"debug"),info:o(((...t)=>{}),"info"),warn:o(((...t)=>{}),"warn"),error:o(((...t)=>{}),"error"),fatal:o(((...t)=>{}),"fatal")},v=o((function(t="fatal"){let e=m.fatal;"string"==typeof t?t.toLowerCase()in m&&(e=m[t]):"number"==typeof t&&(e=t),y.trace=()=>{},y.debug=()=>{},y.info=()=>{},y.warn=()=>{},y.error=()=>{},y.fatal=()=>{},e<=m.fatal&&(y.fatal=console.error?console.error.bind(console,x("FATAL"),"color: orange"):console.log.bind(console,"",x("FATAL"))),e<=m.error&&(y.error=console.error?console.error.bind(console,x("ERROR"),"color: orange"):console.log.bind(console,"",x("ERROR"))),e<=m.warn&&(y.warn=console.warn?console.warn.bind(console,x("WARN"),"color: orange"):console.log.bind(console,"",x("WARN"))),e<=m.info&&(y.info=console.info?console.info.bind(console,x("INFO"),"color: lightblue"):console.log.bind(console,"",x("INFO"))),e<=m.debug&&(y.debug=console.debug?console.debug.bind(console,x("DEBUG"),"color: lightgreen"):console.log.bind(console,"",x("DEBUG"))),e<=m.trace&&(y.trace=console.debug?console.debug.bind(console,x("TRACE"),"color: lightgreen"):console.log.bind(console,"",x("TRACE")))}),"setLogLevel"),x=o((t=>`%c${(0,f.default)().format("ss.SSS")} : ${t} : `),"format"),b=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,w=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,k=/\s*%%.*\n/gm,T=class extends Error{static{o(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},_={},E=o((function(t,e){t=t.replace(b,"").replace(w,"").replace(k,"\n");for(const[n,{detector:r}]of Object.entries(_)){if(r(t,e))return n}throw new T(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),C=o(((...t)=>{for(const{id:e,detector:n,loader:r}of t)S(e,n,r)}),"registerLazyLoadedDiagrams"),S=o(((t,e,n)=>{_[t]&&y.warn(`Detector with key ${t} already exists. Overwriting.`),_[t]={detector:e,loader:n},y.debug(`Detector with key ${t} added${n?" with loader":""}`)}),"addDetector"),A=o((t=>_[t].loader),"getDiagramLoader"),L=o(((t,e,{depth:n=2,clobber:r=!1}={})=>{const i={depth:n,clobber:r};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>L(t,e,i))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||n<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((i=>{"object"!=typeof e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(r||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=L(t[i],e[i],{depth:n-1,clobber:r}))})),t)}),"assignWithDepth"),N=L,I={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:o((t=>t>=255?255:t<0?0:t),"r"),g:o((t=>t>=255?255:t<0?0:t),"g"),b:o((t=>t>=255?255:t<0?0:t),"b"),h:o((t=>t%360),"h"),s:o((t=>t>=100?100:t<0?0:t),"s"),l:o((t=>t>=100?100:t<0?0:t),"l"),a:o((t=>t>=1?1:t<0?0:t),"a")},toLinear:o((t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92}),"toLinear"),hue2rgb:o(((t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t)),"hue2rgb"),hsl2rgb:o((({h:t,s:e,l:n},r)=>{if(!e)return 2.55*n;t/=360,e/=100;const i=(n/=100)<.5?n*(1+e):n+e-n*e,a=2*n-i;switch(r){case"r":return 255*I.hue2rgb(a,i,t+1/3);case"g":return 255*I.hue2rgb(a,i,t);case"b":return 255*I.hue2rgb(a,i,t-1/3)}}),"hsl2rgb"),rgb2hsl:o((({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),s=(i+a)/2;if("l"===r)return 100*s;if(i===a)return 0;const o=i-a;if("s"===r)return 100*(s>.5?o/(2-i-a):o/(i+a));switch(i){case t:return 60*((e-n)/o+(ee>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t))),"clamp"),round:o((t=>Math.round(1e10*t)/1e10),"round")},unit:{dec2hex:o((t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}),"dec2hex")}},R={};for(let t=0;t<=255;t++)R[t]=M.unit.dec2hex(t);var D,O=0,P=1,B=2,$=class{static{o(this,"Type")}constructor(){this.type=O}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=O}is(t){return this.type===t}},F=class{static{o(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new $}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=O,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:r}=t;void 0===e&&(t.h=M.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=M.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=M.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:r}=t;void 0===e&&(t.r=M.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=M.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=M.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(B)||void 0===e?(this._ensureHSL(),M.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(B)||void 0===e?(this._ensureHSL(),M.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(B)||void 0===e?(this._ensureHSL(),M.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(P)||void 0===e?(this._ensureRGB(),M.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(P)||void 0===e?(this._ensureRGB(),M.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(P)||void 0===e?(this._ensureRGB(),M.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(P),this.changed=!0,this.data.r=t}set g(t){this.type.set(P),this.changed=!0,this.data.g=t}set b(t){this.type.set(P),this.changed=!0,this.data.b=t}set h(t){this.type.set(B),this.changed=!0,this.data.h=t}set s(t){this.type.set(B),this.changed=!0,this.data.s=t}set l(t){this.type.set(B),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},z=new F({r:0,g:0,b:0,a:0},"transparent"),U={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:o((t=>{if(35!==t.charCodeAt(0))return;const e=t.match(U.re);if(!e)return;const n=e[1],r=parseInt(n,16),i=n.length,a=i%4==0,s=i>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return z.set({r:(r>>l*(c+3)&h)*o,g:(r>>l*(c+2)&h)*o,b:(r>>l*(c+1)&h)*o,a:a?(r&h)*o/255:1},t)}),"parse"),stringify:o((t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`#${R[Math.round(e)]}${R[Math.round(n)]}${R[Math.round(r)]}${R[Math.round(255*i)]}`:`#${R[Math.round(e)]}${R[Math.round(n)]}${R[Math.round(r)]}`}),"stringify")},G=U,q={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:o((t=>{const e=t.match(q.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return M.channel.clamp.h(.9*parseFloat(t));case"rad":return M.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return M.channel.clamp.h(360*parseFloat(t))}}return M.channel.clamp.h(parseFloat(t))}),"_hue2deg"),parse:o((t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(q.re);if(!n)return;const[,r,i,a,s,o]=n;return z.set({h:q._hue2deg(r),s:M.channel.clamp.s(parseFloat(i)),l:M.channel.clamp.l(parseFloat(a)),a:s?M.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)}),"parse"),stringify:o((t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${M.lang.round(e)}, ${M.lang.round(n)}%, ${M.lang.round(r)}%, ${i})`:`hsl(${M.lang.round(e)}, ${M.lang.round(n)}%, ${M.lang.round(r)}%)`}),"stringify")},j=q,Y={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:o((t=>{t=t.toLowerCase();const e=Y.colors[t];if(e)return G.parse(e)}),"parse"),stringify:o((t=>{const e=G.stringify(t);for(const t in Y.colors)if(Y.colors[t]===e)return t}),"stringify")},W=Y,H={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:o((t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(H.re);if(!n)return;const[,r,i,a,s,o,l,c,h]=n;return z.set({r:M.channel.clamp.r(i?2.55*parseFloat(r):parseFloat(r)),g:M.channel.clamp.g(s?2.55*parseFloat(a):parseFloat(a)),b:M.channel.clamp.b(l?2.55*parseFloat(o):parseFloat(o)),a:c?M.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)}),"parse"),stringify:o((t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${M.lang.round(e)}, ${M.lang.round(n)}, ${M.lang.round(r)}, ${M.lang.round(i)})`:`rgb(${M.lang.round(e)}, ${M.lang.round(n)}, ${M.lang.round(r)})`}),"stringify")},V=H,X={format:{keyword:W,hex:G,rgb:V,rgba:V,hsl:j,hsla:j},parse:o((t=>{if("string"!=typeof t)return t;const e=G.parse(t)||V.parse(t)||j.parse(t)||W.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)}),"parse"),stringify:o((t=>!t.changed&&t.color?t.color:t.type.is(B)||void 0===t.data.r?j.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?V.stringify(t):G.stringify(t)),"stringify")},K=o(((t,e)=>{const n=X.parse(t);for(const t in e)n[t]=M.channel.clamp[t](e[t]);return X.stringify(n)}),"change"),Z=K,Q=o(((t,e,n=0,r=1)=>{if("number"!=typeof t)return Z(t,{a:e});const i=z.set({r:M.channel.clamp.r(t),g:M.channel.clamp.g(e),b:M.channel.clamp.b(n),a:M.channel.clamp.a(r)});return X.stringify(i)}),"rgba"),J=Q,tt=o(((t,e)=>M.lang.round(X.parse(t)[e])),"channel"),et=o((t=>{const{r:e,g:n,b:r}=X.parse(t),i=.2126*M.channel.toLinear(e)+.7152*M.channel.toLinear(n)+.0722*M.channel.toLinear(r);return M.lang.round(i)}),"luminance"),nt=et,rt=o((t=>nt(t)>=.5),"isLight"),it=o((t=>!rt(t)),"isDark"),at=o(((t,e,n)=>{const r=X.parse(t),i=r[e],a=M.channel.clamp[e](i+n);return i!==a&&(r[e]=a),X.stringify(r)}),"adjustChannel"),st=o(((t,e)=>at(t,"l",e)),"lighten"),ot=o(((t,e)=>at(t,"l",-e)),"darken"),lt=o(((t,e)=>{const n=X.parse(t),r={};for(const t in e)e[t]&&(r[t]=n[t]+e[t]);return Z(t,r)}),"adjust"),ct=lt,ht=o(((t,e,n=50)=>{const{r:r,g:i,b:a,a:s}=X.parse(t),{r:o,g:l,b:c,a:h}=X.parse(e),u=n/100,d=2*u-1,p=s-h,g=((d*p==-1?d:(d+p)/(1+d*p))+1)/2,f=1-g;return J(r*g+o*f,i*g+l*f,a*g+c*f,s*u+h*(1-u))}),"mix"),ut=o(((t,e=100)=>{const n=X.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,ht(n,t,e)}),"invert"),dt="#ffffff",pt="#f2f2f2",gt=o(((t,e)=>ct(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),ft=class{static{o(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ct(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ct(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?ot(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||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(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||st(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ct(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ct(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ct(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ct(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ct(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ct(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ct(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ct(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ct(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},mt=o((t=>{const e=new ft;return e.calculate(t),e}),"getThemeVariables"),yt=class{static{o(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=ct(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(ut("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=J(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=ot("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ot(this.sectionBkgColor,10),this.taskBorderColor=J(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=J(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=st(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=st(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=st(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ct(this.primaryColor,{h:64}),this.fillType3=ct(this.secondaryColor,{h:64}),this.fillType4=ct(this.primaryColor,{h:-64}),this.fillType5=ct(this.secondaryColor,{h:-64}),this.fillType6=ct(this.primaryColor,{h:128}),this.fillType7=ct(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||ct(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ct(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ct(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ct(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ct(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ct(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ct(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ct(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ct(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},vt=o((t=>{const e=new yt;return e.calculate(t),e}),"getThemeVariables"),xt=class{static{o(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ct(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ct(this.primaryColor,{h:-160}),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=J(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ct(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ct(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ct(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ct(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ct(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ct(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ct(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ct(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ct(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ot(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},bt=o((t=>{const e=new xt;return e.calculate(t),e}),"getThemeVariables"),wt=class{static{o(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=st("#cde498",10),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.primaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=ot(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||ct(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ct(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ct(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ct(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ct(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ct(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ct(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ct(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ct(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ot(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},kt=o((t=>{const e=new wt;return e.calculate(t),e}),"getThemeVariables"),Tt=class{static{o(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=st(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ct(this.primaryColor,{h:-160}),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=st(this.contrast,55),this.border2=this.contrast,this.actorBorder=st(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[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},_t={base:{getThemeVariables:mt},dark:{getThemeVariables:vt},default:{getThemeVariables:bt},forest:{getThemeVariables:kt},neutral:{getThemeVariables:o((t=>{const e=new Tt;return e.calculate(t),e}),"getThemeVariables")}},Et={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Ct={...Et,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:_t.default.getThemeVariables(),sequence:{...Et.sequence,messageFont:o((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:o((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:o((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Et.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Et.c4,useWidth:void 0,personFont:o((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:o((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:o((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:o((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:o((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:o((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:o((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:o((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:o((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:o((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:o((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:o((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:o((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:o((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:o((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:o((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:o((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:o((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:o((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:o((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:o((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:o((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...Et.pie,useWidth:984},xyChart:{...Et.xyChart,useWidth:void 0},requirement:{...Et.requirement,useWidth:void 0},packet:{...Et.packet}},St=o(((t,e="")=>Object.keys(t).reduce(((n,r)=>Array.isArray(t[r])?n:"object"==typeof t[r]&&null!==t[r]?[...n,e+r,...St(t[r],"")]:[...n,e+r]),[])),"keyify"),At=new Set(St(Ct,"")),Lt=Ct,Nt=o((t=>{if(y.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>Nt(t)));else{for(const e of Object.keys(t)){if(y.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!At.has(e)||null==t[e]){y.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){y.debug("sanitizing object",e),Nt(t[e]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const r of n)e.includes(r)&&(y.debug("sanitizing css option",e),t[e]=It(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const n=t.themeVariables[e];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}y.debug("After sanitization",t)}}),"sanitizeDirective"),It=o((t=>{let e=0,n=0;for(const r of t){if(e{let n=N({},t),r={};for(const t of e)qt(t),r=N(r,t);if(n=N(n,r),r.theme&&r.theme in _t){const t=N({},D),e=N(t.themeVariables||{},r.themeVariables);n.theme&&n.theme in _t&&(n.themeVariables=_t[n.theme].getThemeVariables(e))}return Xt(Ot=n),Ot}),"updateCurrentConfig"),Bt=o((t=>(Rt=N({},Mt),Rt=N(Rt,t),t.theme&&_t[t.theme]&&(Rt.themeVariables=_t[t.theme].getThemeVariables(t.themeVariables)),Pt(Rt,Dt),Rt)),"setSiteConfig"),$t=o((t=>{D=N({},t)}),"saveConfigFromInitialize"),Ft=o((t=>(Rt=N(Rt,t),Pt(Rt,Dt),Rt)),"updateSiteConfig"),zt=o((()=>N({},Rt)),"getSiteConfig"),Ut=o((t=>(Xt(t),N(Ot,t),Gt())),"setConfig"),Gt=o((()=>N({},Ot)),"getConfig"),qt=o((t=>{t&&(["secure",...Rt.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(y.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&qt(t[e])})))}),"sanitize"),jt=o((t=>{Nt(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Dt.push(t),Pt(Rt,Dt)}),"addDirective"),Yt=o(((t=Rt)=>{Pt(t,Dt=[])}),"reset"),Wt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ht={},Vt=o((t=>{Ht[t]||(y.warn(Wt[t]),Ht[t]=!0)}),"issueWarning"),Xt=o((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Vt("LAZY_LOAD_DEPRECATED")}),"checkConfig"),{entries:Kt,setPrototypeOf:Zt,isFrozen:Qt,getPrototypeOf:Jt,getOwnPropertyDescriptor:te}=Object,{freeze:ee,seal:ne,create:re}=Object,{apply:ie,construct:ae}="undefined"!=typeof Reflect&&Reflect;ee||(ee=o((function(t){return t}),"freeze")),ne||(ne=o((function(t){return t}),"seal")),ie||(ie=o((function(t,e,n){return t.apply(e,n)}),"apply")),ae||(ae=o((function(t,e){return new t(...e)}),"construct"));var se=ve(Array.prototype.forEach),oe=ve(Array.prototype.pop),le=ve(Array.prototype.push),ce=ve(String.prototype.toLowerCase),he=ve(String.prototype.toString),ue=ve(String.prototype.match),de=ve(String.prototype.replace),pe=ve(String.prototype.indexOf),ge=ve(String.prototype.trim),fe=ve(Object.prototype.hasOwnProperty),me=ve(RegExp.prototype.test),ye=xe(TypeError);function ve(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:ce;Zt&&Zt(t,null);let r=e.length;for(;r--;){let i=e[r];if("string"==typeof i){const t=n(i);t!==i&&(Qt(e)||(e[r]=t),i=t)}t[i]=!0}return t}function we(t){for(let e=0;e/gm),Be=ne(/\${[\w\W]*}/gm),$e=ne(/^data-[\-\w.\u00B7-\uFFFF]/),Fe=ne(/^aria-[\-\w]+$/),ze=ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ue=ne(/^(?:\w+script|data):/i),Ge=ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qe=ne(/^html$/i),je=ne(/^[a-z][.\w]*(-[.\w]+)+$/i),Ye=Object.freeze({__proto__:null,ARIA_ATTR:Fe,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:je,DATA_ATTR:$e,DOCTYPE_NAME:qe,ERB_EXPR:Pe,IS_ALLOWED_URI:ze,IS_SCRIPT_OR_DATA:Ue,MUSTACHE_EXPR:Oe,TMPLIT_EXPR:Be}),We=1,He=3,Ve=7,Xe=8,Ke=9,Ze=o((function(){return"undefined"==typeof window?null:window}),"getGlobal"),Qe=o((function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}),"_createTrustedTypesPolicy");function Je(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze();const e=o((t=>Je(t)),"DOMPurify");if(e.version="3.2.1",e.removed=[],!t||!t.document||t.document.nodeType!==Ke)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:h,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:g}=t,f=c.prototype,m=Te(f,"cloneNode"),y=Te(f,"remove"),v=Te(f,"nextSibling"),x=Te(f,"childNodes"),b=Te(f,"parentNode");if("function"==typeof s){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let w,k="";const{implementation:T,createNodeIterator:_,createDocumentFragment:E,getElementsByTagName:C}=n,{importNode:S}=r;let A={};e.isSupported="function"==typeof Kt&&"function"==typeof b&&T&&void 0!==T.createHTMLDocument;const{MUSTACHE_EXPR:L,ERB_EXPR:N,TMPLIT_EXPR:I,DATA_ATTR:M,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:P}=Ye;let{IS_ALLOWED_URI:B}=Ye,$=null;const F=be({},[..._e,...Ee,...Ce,...Ae,...Ne]);let z=null;const U=be({},[...Ie,...Me,...Re,...De]);let G=Object.seal(re(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}})),q=null,j=null,Y=!0,W=!0,H=!1,V=!0,X=!1,K=!0,Z=!1,Q=!1,J=!1,tt=!1,et=!1,nt=!1,rt=!0,it=!1;const at="user-content-";let st=!0,ot=!1,lt={},ct=null;const ht=be({},["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"]);let ut=null;const dt=be({},["audio","video","img","source","image","track"]);let pt=null;const gt=be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ft="http://www.w3.org/1998/Math/MathML",mt="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml";let vt=yt,xt=!1,bt=null;const wt=be({},[ft,mt,yt],he);let kt=be({},["mi","mo","mn","ms","mtext"]),Tt=be({},["annotation-xml"]);const _t=be({},["title","style","font","a","script"]);let Et=null;const Ct=["application/xhtml+xml","text/html"],St="text/html";let At=null,Lt=null;const Nt=n.createElement("form"),It=o((function(t){return t instanceof RegExp||t instanceof Function}),"isRegexOrFunction"),Mt=o((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Lt||Lt!==t){if(t&&"object"==typeof t||(t={}),t=ke(t),Et=-1===Ct.indexOf(t.PARSER_MEDIA_TYPE)?St:t.PARSER_MEDIA_TYPE,At="application/xhtml+xml"===Et?he:ce,$=fe(t,"ALLOWED_TAGS")?be({},t.ALLOWED_TAGS,At):F,z=fe(t,"ALLOWED_ATTR")?be({},t.ALLOWED_ATTR,At):U,bt=fe(t,"ALLOWED_NAMESPACES")?be({},t.ALLOWED_NAMESPACES,he):wt,pt=fe(t,"ADD_URI_SAFE_ATTR")?be(ke(gt),t.ADD_URI_SAFE_ATTR,At):gt,ut=fe(t,"ADD_DATA_URI_TAGS")?be(ke(dt),t.ADD_DATA_URI_TAGS,At):dt,ct=fe(t,"FORBID_CONTENTS")?be({},t.FORBID_CONTENTS,At):ht,q=fe(t,"FORBID_TAGS")?be({},t.FORBID_TAGS,At):{},j=fe(t,"FORBID_ATTR")?be({},t.FORBID_ATTR,At):{},lt=!!fe(t,"USE_PROFILES")&&t.USE_PROFILES,Y=!1!==t.ALLOW_ARIA_ATTR,W=!1!==t.ALLOW_DATA_ATTR,H=t.ALLOW_UNKNOWN_PROTOCOLS||!1,V=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,X=t.SAFE_FOR_TEMPLATES||!1,K=!1!==t.SAFE_FOR_XML,Z=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,nt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,rt=!1!==t.SANITIZE_DOM,it=t.SANITIZE_NAMED_PROPS||!1,st=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,B=t.ALLOWED_URI_REGEXP||ze,vt=t.NAMESPACE||yt,kt=t.MATHML_TEXT_INTEGRATION_POINTS||kt,Tt=t.HTML_INTEGRATION_POINTS||Tt,G=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&It(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&It(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(W=!1),et&&(tt=!0),lt&&($=be({},Ne),z=[],!0===lt.html&&(be($,_e),be(z,Ie)),!0===lt.svg&&(be($,Ee),be(z,Me),be(z,De)),!0===lt.svgFilters&&(be($,Ce),be(z,Me),be(z,De)),!0===lt.mathMl&&(be($,Ae),be(z,Re),be(z,De))),t.ADD_TAGS&&($===F&&($=ke($)),be($,t.ADD_TAGS,At)),t.ADD_ATTR&&(z===U&&(z=ke(z)),be(z,t.ADD_ATTR,At)),t.ADD_URI_SAFE_ATTR&&be(pt,t.ADD_URI_SAFE_ATTR,At),t.FORBID_CONTENTS&&(ct===ht&&(ct=ke(ct)),be(ct,t.FORBID_CONTENTS,At)),st&&($["#text"]=!0),Z&&be($,["html","head","body"]),$.table&&(be($,["tbody"]),delete q.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw ye('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw ye('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=t.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else void 0===w&&(w=Qe(g,i)),null!==w&&"string"==typeof k&&(k=w.createHTML(""));ee&&ee(t),Lt=t}}),"_parseConfig"),Rt=be({},[...Ee,...Ce,...Se]),Dt=be({},[...Ae,...Le]),Ot=o((function(t){let e=b(t);e&&e.tagName||(e={namespaceURI:vt,tagName:"template"});const n=ce(t.tagName),r=ce(e.tagName);return!!bt[t.namespaceURI]&&(t.namespaceURI===mt?e.namespaceURI===yt?"svg"===n:e.namespaceURI===ft?"svg"===n&&("annotation-xml"===r||kt[r]):Boolean(Rt[n]):t.namespaceURI===ft?e.namespaceURI===yt?"math"===n:e.namespaceURI===mt?"math"===n&&Tt[r]:Boolean(Dt[n]):t.namespaceURI===yt?!(e.namespaceURI===mt&&!Tt[r])&&(!(e.namespaceURI===ft&&!kt[r])&&(!Dt[n]&&(_t[n]||!Rt[n]))):!("application/xhtml+xml"!==Et||!bt[t.namespaceURI]))}),"_checkValidNamespace"),Pt=o((function(t){le(e.removed,{element:t});try{b(t).removeChild(t)}catch(e){y(t)}}),"_forceRemove"),Bt=o((function(t,n){try{le(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(t){le(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t&&!z[t])if(tt||et)try{Pt(n)}catch(t){}else try{n.setAttribute(t,"")}catch(t){}}),"_removeAttribute"),$t=o((function(t){let e=null,r=null;if(J)t=""+t;else{const e=ue(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===Et&&vt===yt&&(t=''+t+"");const i=w?w.createHTML(t):t;if(vt===yt)try{e=(new p).parseFromString(i,Et)}catch(t){}if(!e||!e.documentElement){e=T.createDocument(vt,"template",null);try{e.documentElement.innerHTML=xt?k:i}catch(t){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),vt===yt?C.call(e,Z?"html":"body")[0]:Z?e.documentElement:a}),"_initDocument"),Ft=o((function(t){return _.call(t.ownerDocument||t,t,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)}),"_createNodeIterator"),zt=o((function(t){return t instanceof d&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof u)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)}),"_isClobbered"),Ut=o((function(t){return"function"==typeof l&&t instanceof l}),"_isNode");function Gt(t,n,r){A[t]&&se(A[t],(t=>{t.call(e,n,r,Lt)}))}o(Gt,"_executeHook");const qt=o((function(t){let n=null;if(Gt("beforeSanitizeElements",t,null),zt(t))return Pt(t),!0;const r=At(t.nodeName);if(Gt("uponSanitizeElement",t,{tagName:r,allowedTags:$}),t.hasChildNodes()&&!Ut(t.firstElementChild)&&me(/<[/\w]/g,t.innerHTML)&&me(/<[/\w]/g,t.textContent))return Pt(t),!0;if(t.nodeType===Ve)return Pt(t),!0;if(K&&t.nodeType===Xe&&me(/<[/\w]/g,t.data))return Pt(t),!0;if(!$[r]||q[r]){if(!q[r]&&Yt(r)){if(G.tagNameCheck instanceof RegExp&&me(G.tagNameCheck,r))return!1;if(G.tagNameCheck instanceof Function&&G.tagNameCheck(r))return!1}if(st&&!ct[r]){const e=b(t)||t.parentNode,n=x(t)||t.childNodes;if(n&&e){for(let r=n.length-1;r>=0;--r){const i=m(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,v(t))}}}return Pt(t),!0}return t instanceof c&&!Ot(t)?(Pt(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!me(/<\/no(script|embed|frames)/i,t.innerHTML)?(X&&t.nodeType===He&&(n=t.textContent,se([L,N,I],(t=>{n=de(n,t," ")})),t.textContent!==n&&(le(e.removed,{element:t.cloneNode()}),t.textContent=n)),Gt("afterSanitizeElements",t,null),!1):(Pt(t),!0)}),"_sanitizeElements"),jt=o((function(t,e,r){if(rt&&("id"===e||"name"===e)&&(r in n||r in Nt))return!1;if(W&&!j[e]&&me(M,e));else if(Y&&me(R,e));else if(!z[e]||j[e]){if(!(Yt(t)&&(G.tagNameCheck instanceof RegExp&&me(G.tagNameCheck,t)||G.tagNameCheck instanceof Function&&G.tagNameCheck(t))&&(G.attributeNameCheck instanceof RegExp&&me(G.attributeNameCheck,e)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(e))||"is"===e&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&me(G.tagNameCheck,r)||G.tagNameCheck instanceof Function&&G.tagNameCheck(r))))return!1}else if(pt[e]);else if(me(B,de(r,O,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==pe(r,"data:")||!ut[t]){if(H&&!me(D,de(r,O,"")));else if(r)return!1}else;return!0}),"_isValidAttribute"),Yt=o((function(t){return"annotation-xml"!==t&&ue(t,P)}),"_isBasicCustomElement"),Wt=o((function(t){Gt("beforeSanitizeAttributes",t,null);const{attributes:n}=t;if(!n)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let i=n.length;for(;i--;){const a=n[i],{name:s,namespaceURI:o,value:l}=a,c=At(s);let h="value"===s?l:ge(l);if(r.attrName=c,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,Gt("uponSanitizeAttribute",t,r),h=r.attrValue,!it||"id"!==c&&"name"!==c||(Bt(s,t),h=at+h),K&&me(/((--!?|])>)|<\/(style|title)/i,h)){Bt(s,t);continue}if(r.forceKeepAttr)continue;if(Bt(s,t),!r.keepAttr)continue;if(!V&&me(/\/>/i,h)){Bt(s,t);continue}X&&se([L,N,I],(t=>{h=de(h,t," ")}));const u=At(t.nodeName);if(jt(u,c,h)){if(w&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(o);else switch(g.getAttributeType(u,c)){case"TrustedHTML":h=w.createHTML(h);break;case"TrustedScriptURL":h=w.createScriptURL(h)}try{o?t.setAttributeNS(o,s,h):t.setAttribute(s,h),zt(t)?Pt(t):oe(e.removed)}catch(t){}}}Gt("afterSanitizeAttributes",t,null)}),"_sanitizeAttributes"),Ht=o((function t(e){let n=null;const r=Ft(e);for(Gt("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)Gt("uponSanitizeShadowNode",n,null),qt(n)||(n.content instanceof a&&t(n.content),Wt(n));Gt("afterSanitizeShadowDOM",e,null)}),"_sanitizeShadowDOM");return e.sanitize=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,s=null,o=null,c=null;if(xt=!t,xt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ut(t)){if("function"!=typeof t.toString)throw ye("toString is not a function");if("string"!=typeof(t=t.toString()))throw ye("dirty is not a string, aborting")}if(!e.isSupported)return t;if(Q||Mt(n),e.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=At(t.nodeName);if(!$[e]||q[e])throw ye("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=$t("\x3c!----\x3e"),s=i.ownerDocument.importNode(t,!0),s.nodeType===We&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!tt&&!X&&!Z&&-1===t.indexOf("<"))return w&&nt?w.createHTML(t):t;if(i=$t(t),!i)return tt?null:nt?k:""}i&&J&&Pt(i.firstChild);const h=Ft(ot?t:i);for(;o=h.nextNode();)qt(o)||(o.content instanceof a&&Ht(o.content),Wt(o));if(ot)return t;if(tt){if(et)for(c=E.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(z.shadowroot||z.shadowrootmode)&&(c=S.call(r,c,!0)),c}let u=Z?i.outerHTML:i.innerHTML;return Z&&$["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&me(qe,i.ownerDocument.doctype.name)&&(u="\n"+u),X&&se([L,N,I],(t=>{u=de(u,t," ")})),w&&nt?w.createHTML(u):u},e.setConfig=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Mt(t),Q=!0},e.clearConfig=function(){Lt=null,Q=!1},e.isValidAttribute=function(t,e,n){Lt||Mt({});const r=At(t),i=At(e);return jt(r,i,n)},e.addHook=function(t,e){"function"==typeof e&&(A[t]=A[t]||[],le(A[t],e))},e.removeHook=function(t){if(A[t])return oe(A[t])},e.removeHooks=function(t){A[t]&&(A[t]=[])},e.removeAllHooks=function(){A={}},e}o(Je,"createDOMPurify");var tn=Je(),en=//gi,nn=o((t=>{if(!t)return[""];return pn(t).replace(/\\n/g,"#br#").split("#br#")}),"getRows"),rn=(()=>{let t=!1;return()=>{t||(an(),t=!0)}})();function an(){const t="data-temp-href-target";tn.addHook("beforeSanitizeAttributes",(e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),tn.addHook("afterSanitizeAttributes",(e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}o(an,"setupDompurifyHooks");var sn=o((t=>{rn();return tn.sanitize(t)}),"removeScript"),on=o(((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const n=e.securityLevel;"antiscript"===n||"strict"===n?t=sn(t):"loose"!==n&&(t=(t=(t=pn(t)).replace(//g,">")).replace(/=/g,"="),t=dn(t))}return t}),"sanitizeMore"),ln=o(((t,e)=>t?t=e.dompurifyConfig?tn.sanitize(on(t,e),e.dompurifyConfig).toString():tn.sanitize(on(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),cn=o(((t,e)=>"string"==typeof t?ln(t,e):t.flat().map((t=>ln(t,e)))),"sanitizeTextOrArray"),hn=o((t=>en.test(t)),"hasBreaks"),un=o((t=>t.split(en)),"splitBreaks"),dn=o((t=>t.replace(/#br#/g,"
")),"placeholderToBreak"),pn=o((t=>t.replace(en,"#br#")),"breakToPlaceholder"),gn=o((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),fn=o((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),mn=o((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),yn=o((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),vn=o((function(t){const e=t.split(/(,)/),n=[];for(let t=0;t0&&t+1Math.max(0,t.split(e).length-1)),"countOccurrence"),bn=o(((t,e)=>{const n=xn(t,"~"),r=xn(e,"~");return 1===n&&1===r}),"shouldCombineSets"),wn=o((t=>{const e=xn(t,"~");let n=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),n=!0);const r=[...t];let i=r.indexOf("~"),a=r.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)r[i]="<",r[a]=">",i=r.indexOf("~"),a=r.lastIndexOf("~");return n&&r.unshift("~"),r.join("")}),"processSet"),kn=o((()=>void 0!==window.MathMLElement),"isMathMLSupported"),Tn=/\$\$(.*)\$\$/g,_n=o((t=>(t.match(Tn)?.length??0)>0),"hasKatex"),En=o((async(t,e)=>{t=await Cn(t,e);const n=document.createElement("div");n.innerHTML=t,n.id="katex-temp",n.style.visibility="hidden",n.style.position="absolute",n.style.top="0";document.querySelector("body")?.insertAdjacentElement("beforeend",n);const r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r}),"calculateMathMLDimensions"),Cn=o((async(t,e)=>{if(!_n(t))return t;if(!(kn()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Tn,"MathML is unsupported in this environment.");const{default:n}=await Promise.resolve().then((function(){return wB})),r=e.forceLegacyMathML||!kn()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(en).map((t=>_n(t)?`
${t}
`:`
${t}
`)).join("").replace(Tn,((t,e)=>n.renderToString(e,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g," ").replace(//g,"")))}),"renderKatex"),Sn={getRows:nn,sanitizeText:ln,sanitizeTextOrArray:cn,hasBreaks:hn,splitBreaks:un,lineBreakRegex:en,removeScript:sn,getUrl:gn,evaluate:fn,getMax:mn,getMin:yn},An=o((function(t,e){for(let n of e)t.attr(n[0],n[1])}),"d3Attrs"),Ln=o((function(t,e,n){let r=new Map;return n?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r}),"calculateSvgSizeAttrs"),Nn=o((function(t,e,n,r){const i=Ln(e,n,r);An(t,i)}),"configureSvgSize"),In=o((function(t,e,n,r){const i=e.node().getBBox(),a=i.width,s=i.height;y.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;y.info(`Graph bounds: ${o}x${l}`,t),o=a+2*n,l=s+2*n,y.info(`Calculated bounds: ${o}x${l}`),Nn(e,l,o,r);const c=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;e.attr("viewBox",c)}),"setupGraphViewbox"),Mn={},Rn=o(((t,e,n)=>{let r="";return t in Mn&&Mn[t]?r=Mn[t](n):y.warn(`No theme found for ${t}`),` & {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n fill: ${n.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${n.errorBkgColor};\n }\n & .error-text {\n fill: ${n.errorTextColor};\n stroke: ${n.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${n.lineColor};\n stroke: ${n.lineColor};\n }\n & .marker.cross {\n stroke: ${n.lineColor};\n }\n\n & svg {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${r}\n\n ${e}\n`}),"getStyles"),Dn=o(((t,e)=>{void 0!==e&&(Mn[t]=e)}),"addStylesForDiagram"),On=Rn,Pn={};h(Pn,{clear:()=>Un,getAccDescription:()=>Yn,getAccTitle:()=>qn,getDiagramTitle:()=>Hn,setAccDescription:()=>jn,setAccTitle:()=>Gn,setDiagramTitle:()=>Wn});var Bn="",$n="",Fn="",zn=o((t=>ln(t,Gt())),"sanitizeText"),Un=o((()=>{Bn="",Fn="",$n=""}),"clear"),Gn=o((t=>{Bn=zn(t).replace(/^\s+/g,"")}),"setAccTitle"),qn=o((()=>Bn),"getAccTitle"),jn=o((t=>{Fn=zn(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),Yn=o((()=>Fn),"getAccDescription"),Wn=o((t=>{$n=zn(t)}),"setDiagramTitle"),Hn=o((()=>$n),"getDiagramTitle"),Vn=y,Xn=v,Kn=Gt,Zn=Ut,Qn=Mt,Jn=o((t=>ln(t,Kn())),"sanitizeText"),tr=In,er=o((()=>Pn),"getCommonDb"),nr={},rr=o(((t,e,n)=>{nr[t]&&Vn.warn(`Diagram with id ${t} already registered. Overwriting.`),nr[t]=e,n&&S(t,n),Dn(t,e.styles),e.injectUtils?.(Vn,Xn,Kn,Jn,tr,er(),(()=>{}))}),"registerDiagram"),ir=o((t=>{if(t in nr)return nr[t];throw new ar(t)}),"getDiagram"),ar=class extends Error{static{o(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};function sr(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function or(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function lr(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function cr(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function hr(t){let e,n,r;function i(t,r,i=0,a=t.length){if(i>>1;n(t[e],r)<0?i=e+1:a=e}while(i>>1;n(t[e],r)<=0?i=e+1:a=e}while(in&&r(t[s-1],e)>-r(t[s],e)?s-1:s}return 2!==t.length?(e=lr,n=o(((e,n)=>lr(t(e),n)),"compare2"),r=o(((e,n)=>t(e)-n),"delta")):(e=t===lr||t===cr?t:ur,n=t,r=t),o(i,"left"),o(a,"right"),o(s,"center"),{left:i,center:s,right:a}}function ur(){return 0}function dr(t){return null===t?NaN:+t}o(sr,"max"),o(or,"min"),o(lr,"ascending"),o(cr,"descending"),o(hr,"bisector"),o(ur,"zero"),o(dr,"number");var pr=hr(lr),gr=pr.right;pr.left,hr(dr).center;var fr=gr,mr=class extends Map{static{o(this,"InternMap")}constructor(t,e=br){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(yr(this,t))}has(t){return super.has(yr(this,t))}set(t,e){return super.set(vr(this,t),e)}delete(t){return super.delete(xr(this,t))}};function yr({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function vr({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function xr({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function br(t){return null!==t&&"object"==typeof t?t.valueOf():t}o(yr,"intern_get"),o(vr,"intern_set"),o(xr,"intern_delete"),o(br,"keyof");var wr=Math.sqrt(50),kr=Math.sqrt(10),Tr=Math.sqrt(2);function _r(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=wr?10:a>=kr?5:a>=Tr?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/ce&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*ce&&--l),l0))return[];if((t=+t)===(e=+e))return[t];const r=e=i))return[];const o=a-i+1,l=new Array(o);if(r)if(s<0)for(let t=0;t+t(e)}function Dr(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Or(){return!this.__axis}function Pr(t,e){var n=[],r=null,i=null,a=6,s=6,l=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,h=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",d=1===t||3===t?Ir:Mr;function p(o){var p=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,g=null==i?e.tickFormat?e.tickFormat.apply(e,n):Lr:i,f=Math.max(a,0)+l,m=e.range(),y=+m[0]+c,v=+m[m.length-1]+c,x=(e.bandwidth?Dr:Rr)(e.copy(),c),b=o.selection?o.selection():o,w=b.selectAll(".domain").data([null]),k=b.selectAll(".tick").data(p,e).order(),T=k.exit(),_=k.enter().append("g").attr("class","tick"),E=k.select("line"),C=k.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(_),E=E.merge(_.append("line").attr("stroke","currentColor").attr(u+"2",h*a)),C=C.merge(_.append("text").attr("fill","currentColor").attr(u,h*f).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),o!==b&&(w=w.transition(o),k=k.transition(o),E=E.transition(o),C=C.transition(o),T=T.transition(o).attr("opacity",Nr).attr("transform",(function(t){return isFinite(t=x(t))?d(t+c):this.getAttribute("transform")})),_.attr("opacity",Nr).attr("transform",(function(t){var e=this.parentNode.__axis;return d((e&&isFinite(e=e(t))?e:x(t))+c)}))),T.remove(),w.attr("d",4===t||2===t?s?"M"+h*s+","+y+"H"+c+"V"+v+"H"+h*s:"M"+c+","+y+"V"+v:s?"M"+y+","+h*s+"V"+c+"H"+v+"V"+h*s:"M"+y+","+c+"H"+v),k.attr("opacity",1).attr("transform",(function(t){return d(x(t)+c)})),E.attr(u+"2",h*a),C.attr(u,h*f).text(g),b.filter(Or).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=x}))}return o(p,"axis"),p.scale=function(t){return arguments.length?(e=t,p):e},p.ticks=function(){return n=Array.from(arguments),p},p.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),p):n.slice()},p.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),p):r&&r.slice()},p.tickFormat=function(t){return arguments.length?(i=t,p):i},p.tickSize=function(t){return arguments.length?(a=s=+t,p):a},p.tickSizeInner=function(t){return arguments.length?(a=+t,p):a},p.tickSizeOuter=function(t){return arguments.length?(s=+t,p):s},p.tickPadding=function(t){return arguments.length?(l=+t,p):l},p.offset=function(t){return arguments.length?(c=+t,p):c},p}function Br(t){return Pr(1,t)}function $r(t){return Pr(3,t)}function Fr(){}function zr(t){return null==t?Fr:function(){return this.querySelector(t)}}function Ur(t){"function"!=typeof t&&(t=zr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=b+1);!(x=m[w])&&++w=0;)(r=i[a])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this}function yi(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=vi),o(e,"compareNode");for(var n=this._groups,r=n.length,i=new Array(r),a=0;ae?1:t>=e?0:NaN}function xi(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function bi(){return Array.from(this)}function wi(){for(var t=this._groups,e=0,n=t.length;e=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ci.hasOwnProperty(e)?{space:Ci[e],local:t}:t}function Ai(t){return function(){this.removeAttribute(t)}}function Li(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ni(t,e){return function(){this.setAttribute(t,e)}}function Ii(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mi(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ri(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Di(t,e){var n=Si(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Li:Ai:"function"==typeof e?n.local?Ri:Mi:n.local?Ii:Ni)(n,e))}function Oi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Pi(t){return function(){this.style.removeProperty(t)}}function Bi(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $i(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Fi(t,e,n){return arguments.length>1?this.each((null==e?Pi:"function"==typeof e?$i:Bi)(t,e,null==n?"":n)):zi(this.node(),t)}function zi(t,e){return t.style.getPropertyValue(e)||Oi(t).getComputedStyle(t,null).getPropertyValue(e)}function Ui(t){return function(){delete this[t]}}function Gi(t,e){return function(){this[t]=e}}function qi(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ji(t,e){return arguments.length>1?this.each((null==e?Ui:"function"==typeof e?qi:Gi)(t,e)):this.node()[t]}function Yi(t){return t.trim().split(/^|\s+/)}function Wi(t){return t.classList||new Hi(t)}function Hi(t){this._node=t,this._names=Yi(t.getAttribute("class")||"")}function Vi(t,e){for(var n=Wi(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ca(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))}),"remove"),contains:o((function(t){return this._names.indexOf(t)>=0}),"contains")},o(Vi,"classedAdd"),o(Xi,"classedRemove"),o(Ki,"classedTrue"),o(Zi,"classedFalse"),o(Qi,"classedFunction"),o(Ji,"default"),o(ta,"textRemove"),o(ea,"textConstant"),o(na,"textFunction"),o(ra,"default"),o(ia,"htmlRemove"),o(aa,"htmlConstant"),o(sa,"htmlFunction"),o(oa,"default"),o(la,"raise"),o(ca,"default"),o(ha,"lower"),o(ua,"default"),o(da,"creatorInherit"),o(pa,"creatorFixed"),o(ga,"default"),o(fa,"default"),o(ma,"constantNull"),o(ya,"default"),o(va,"remove"),o(xa,"default"),o(ba,"selection_cloneShallow"),o(wa,"selection_cloneDeep"),o(ka,"default"),o(Ta,"default"),o(_a,"contextListener"),o(Ea,"parseTypenames"),o(Ca,"onRemove"),o(Sa,"onAdd"),o(Aa,"default"),o(La,"dispatchEvent"),o(Na,"dispatchConstant"),o(Ia,"dispatchFunction"),o(Ma,"default"),o(Ra,"default");var Da=[null];function Oa(t,e){this._groups=t,this._parents=e}function Pa(){return new Oa([[document.documentElement]],Da)}function Ba(){return this}o(Oa,"Selection"),o(Pa,"selection"),o(Ba,"selection_selection"),Oa.prototype=Pa.prototype={constructor:Oa,select:Ur,selectAll:Wr,selectChild:Qr,selectChildren:ni,filter:ri,data:ui,enter:ai,exit:pi,join:gi,merge:fi,selection:Ba,order:mi,sort:yi,call:xi,nodes:bi,node:wi,size:ki,empty:Ti,each:_i,attr:Di,style:Fi,property:ji,classed:Ji,text:ra,html:oa,raise:ca,lower:ua,append:fa,insert:ya,remove:xa,clone:ka,datum:Ta,on:Aa,dispatch:Ma,[Symbol.iterator]:Ra};var $a=Pa;function Fa(t){return"string"==typeof t?new Oa([[document.querySelector(t)]],[document.documentElement]):new Oa([[t]],Da)}function za(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ua(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ga(){}o(Fa,"default"),o(za,"default"),o(Ua,"extend"),o(Ga,"Color");var qa=.7,ja=1/qa,Ya="\\s*([+-]?\\d+)\\s*",Wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ha="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Va=/^#([0-9a-f]{3,8})$/,Xa=new RegExp(`^rgb\\(${Ya},${Ya},${Ya}\\)$`),Ka=new RegExp(`^rgb\\(${Ha},${Ha},${Ha}\\)$`),Za=new RegExp(`^rgba\\(${Ya},${Ya},${Ya},${Wa}\\)$`),Qa=new RegExp(`^rgba\\(${Ha},${Ha},${Ha},${Wa}\\)$`),Ja=new RegExp(`^hsl\\(${Wa},${Ha},${Ha}\\)$`),ts=new RegExp(`^hsla\\(${Wa},${Ha},${Ha},${Wa}\\)$`),es={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};function ns(){return this.rgb().formatHex()}function rs(){return this.rgb().formatHex8()}function is(){return xs(this).formatHsl()}function as(){return this.rgb().formatRgb()}function ss(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Va.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?os(e):3===n?new us(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ls(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ls(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Xa.exec(t))?new us(e[1],e[2],e[3],1):(e=Ka.exec(t))?new us(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Za.exec(t))?ls(e[1],e[2],e[3],e[4]):(e=Qa.exec(t))?ls(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ja.exec(t))?vs(e[1],e[2]/100,e[3]/100,1):(e=ts.exec(t))?vs(e[1],e[2]/100,e[3]/100,e[4]):es.hasOwnProperty(t)?os(es[t]):"transparent"===t?new us(NaN,NaN,NaN,0):null}function os(t){return new us(t>>16&255,t>>8&255,255&t,1)}function ls(t,e,n,r){return r<=0&&(t=e=n=NaN),new us(t,e,n,r)}function cs(t){return t instanceof Ga||(t=ss(t)),t?new us((t=t.rgb()).r,t.g,t.b,t.opacity):new us}function hs(t,e,n,r){return 1===arguments.length?cs(t):new us(t,e,n,null==r?1:r)}function us(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ds(){return`#${ys(this.r)}${ys(this.g)}${ys(this.b)}`}function ps(){return`#${ys(this.r)}${ys(this.g)}${ys(this.b)}${ys(255*(isNaN(this.opacity)?1:this.opacity))}`}function gs(){const t=fs(this.opacity);return`${1===t?"rgb(":"rgba("}${ms(this.r)}, ${ms(this.g)}, ${ms(this.b)}${1===t?")":`, ${t})`}`}function fs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ms(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ys(t){return((t=ms(t))<16?"0":"")+t.toString(16)}function vs(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ws(t,e,n,r)}function xs(t){if(t instanceof ws)return new ws(t.h,t.s,t.l,t.opacity);if(t instanceof Ga||(t=ss(t)),!t)return new ws;if(t instanceof ws)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),s=NaN,o=a-i,l=(a+i)/2;return o?(s=e===a?(n-r)/o+6*(n0&&l<1?0:s,new ws(s,o,l,t.opacity)}function bs(t,e,n,r){return 1===arguments.length?xs(t):new ws(t,e,n,null==r?1:r)}function ws(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ks(t){return(t=(t||0)%360)<0?t+360:t}function Ts(t){return Math.max(0,Math.min(1,t||0))}function _s(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}za(Ga,ss,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ns,formatHex:ns,formatHex8:rs,formatHsl:is,formatRgb:as,toString:as}),o(ns,"color_formatHex"),o(rs,"color_formatHex8"),o(is,"color_formatHsl"),o(as,"color_formatRgb"),o(ss,"color"),o(os,"rgbn"),o(ls,"rgba"),o(cs,"rgbConvert"),o(hs,"rgb"),o(us,"Rgb"),za(us,hs,Ua(Ga,{brighter(t){return t=null==t?ja:Math.pow(ja,t),new us(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?qa:Math.pow(qa,t),new us(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new us(ms(this.r),ms(this.g),ms(this.b),fs(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:ds,formatHex:ds,formatHex8:ps,formatRgb:gs,toString:gs})),o(ds,"rgb_formatHex"),o(ps,"rgb_formatHex8"),o(gs,"rgb_formatRgb"),o(fs,"clampa"),o(ms,"clampi"),o(ys,"hex"),o(vs,"hsla"),o(xs,"hslConvert"),o(bs,"hsl"),o(ws,"Hsl"),za(ws,bs,Ua(Ga,{brighter(t){return t=null==t?ja:Math.pow(ja,t),new ws(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?qa:Math.pow(qa,t),new ws(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new us(_s(t>=240?t-240:t+120,i,r),_s(t,i,r),_s(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ws(ks(this.h),Ts(this.s),Ts(this.l),fs(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(){const t=fs(this.opacity);return`${1===t?"hsl(":"hsla("}${ks(this.h)}, ${100*Ts(this.s)}%, ${100*Ts(this.l)}%${1===t?")":`, ${t})`}`}})),o(ks,"clamph"),o(Ts,"clampt"),o(_s,"hsl2rgb");var Es=Math.PI/180,Cs=180/Math.PI,Ss=.96422,As=.82521,Ls=4/29,Ns=6/29,Is=3*Ns*Ns;function Ms(t){if(t instanceof Ds)return new Ds(t.l,t.a,t.b,t.opacity);if(t instanceof Us)return Gs(t);t instanceof us||(t=cs(t));var e,n,r=$s(t.r),i=$s(t.g),a=$s(t.b),s=Os((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=s:(e=Os((.4360747*r+.3850649*i+.1430804*a)/Ss),n=Os((.0139322*r+.0971045*i+.7141733*a)/As)),new Ds(116*s-16,500*(e-s),200*(s-n),t.opacity)}function Rs(t,e,n,r){return 1===arguments.length?Ms(t):new Ds(t,e,n,null==r?1:r)}function Ds(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Os(t){return t>.008856451679035631?Math.pow(t,1/3):t/Is+Ls}function Ps(t){return t>Ns?t*t*t:Is*(t-Ls)}function Bs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $s(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Fs(t){if(t instanceof Us)return new Us(t.h,t.c,t.l,t.opacity);if(t instanceof Ds||(t=Ms(t)),0===t.a&&0===t.b)return new Us(NaN,0()=>t),"default");function js(t,e){return function(n){return t+n*e}}function Ys(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Ws(t,e){var n=e-t;return n?js(t,n>180||n<-180?n-360*Math.round(n/360):n):qs(isNaN(t)?e:t)}function Hs(t){return 1==(t=+t)?Vs:function(e,n){return n-e?Ys(e,n,t):qs(isNaN(e)?n:e)}}function Vs(t,e){var n=e-t;return n?js(t,n):qs(isNaN(t)?e:t)}function Xs(t){return function(e,n){var r=t((e=zs(e)).h,(n=zs(n)).h),i=Vs(e.c,n.c),a=Vs(e.l,n.l),s=Vs(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=s(t),e+""}}}o(js,"linear"),o(Ys,"exponential"),o(Ws,"hue"),o(Hs,"gamma"),o(Vs,"nogamma"),o(Xs,"hcl");var Ks=Xs(Ws);function Zs(t,e,n,r,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*n+(1+3*t+3*a-3*s)*r+s*i)/6}o(Zs,"basis"),o((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],s=r>0?t[r-1]:2*i-a,o=ra&&(i=e.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(n=n[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:ro(n,r)})),a=so.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ro(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}function l(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ro(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}function c(t,e,n,r,a,s){if(t!==n||e!==r){var o=a.push(i(a)+"scale(",null,",",null,")");s.push({i:o-4,x:ro(t,n)},{i:o-2,x:ro(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}return o(i,"pop"),o(a,"translate"),o(s,"rotate"),o(l,"skewX"),o(c,"scale"),function(e,n){var r=[],i=[];return e=t(e),n=t(n),a(e.translateX,e.translateY,n.translateX,n.translateY,r,i),s(e.rotate,n.rotate,r,i),l(e.skewX,n.skewX,r,i),c(e.scaleX,e.scaleY,n.scaleX,n.scaleY,r,i),e=n=null,function(t){for(var e,n=-1,a=i.length;++ne&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}function Io(t,e,n){var r=t[0],i=t[1],a=e[0],s=e[1];return i2?Mo:Io,i=a=null,d}function d(e){return null==e||isNaN(e=+e)?n:(i||(i=r(s.map(t),l,c)))(t(h(e)))}return o(u,"rescale"),o(d,"scale"),d.invert=function(n){return h(e((a||(a=r(l,s.map(t),ro)))(n)))},d.domain=function(t){return arguments.length?(s=Array.from(t,Co),u()):s.slice()},d.range=function(t){return arguments.length?(l=Array.from(t),u()):l.slice()},d.rangeRound=function(t){return l=Array.from(t),c=uo,u()},d.clamp=function(t){return arguments.length?(h=!!t||Ao,u()):h!==Ao},d.interpolate=function(t){return arguments.length?(c=t,u()):c},d.unknown=function(t){return arguments.length?(n=t,d):n},function(n,r){return t=n,e=r,u()}}function Oo(){return Do()(Ao,Ao)}function Po(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Bo(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function $o(t){return(t=Bo(Math.abs(t)))?t[1]:NaN}function Fo(t,e){return function(n,r){for(var i=n.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),a.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}function zo(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}o(Ao,"identity"),o(Lo,"normalize"),o(No,"clamper"),o(Io,"bimap"),o(Mo,"polymap"),o(Ro,"copy"),o(Do,"transformer"),o(Oo,"continuous"),o(Po,"default"),o(Bo,"formatDecimalParts"),o($o,"default"),o(Fo,"default"),o(zo,"default");var Uo,Go=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qo(t){if(!(e=Go.exec(t)))throw new Error("invalid format: "+t);var e;return new jo({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function jo(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Yo(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}function Wo(t,e){var n=Bo(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Uo=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Bo(t,Math.max(0,e+a-1))[0]}function Ho(t,e){var n=Bo(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}o(qo,"formatSpecifier"),qo.prototype=jo.prototype,o(jo,"FormatSpecifier"),jo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},o(Yo,"default"),o(Wo,"default"),o(Ho,"default");var Vo={"%":o(((t,e)=>(100*t).toFixed(e)),"%"),b:o((t=>Math.round(t).toString(2)),"b"),c:o((t=>t+""),"c"),d:Po,e:o(((t,e)=>t.toExponential(e)),"e"),f:o(((t,e)=>t.toFixed(e)),"f"),g:o(((t,e)=>t.toPrecision(e)),"g"),o:o((t=>Math.round(t).toString(8)),"o"),p:o(((t,e)=>Ho(100*t,e)),"p"),r:Ho,s:Wo,X:o((t=>Math.round(t).toString(16).toUpperCase()),"X"),x:o((t=>Math.round(t).toString(16)),"x")};function Xo(t){return t}o(Xo,"default");var Ko,Zo,Qo,Jo=Array.prototype.map,tl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function el(t){var e=void 0===t.grouping||void 0===t.thousands?Xo:Fo(Jo.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",r=void 0===t.currency?"":t.currency[1]+"",i=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Xo:zo(Jo.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var h=(t=qo(t)).fill,u=t.align,d=t.sign,p=t.symbol,g=t.zero,f=t.width,m=t.comma,y=t.precision,v=t.trim,x=t.type;"n"===x?(m=!0,x="g"):Vo[x]||(void 0===y&&(y=12),v=!0,x="g"),(g||"0"===h&&"="===u)&&(g=!0,h="0",u="=");var b="$"===p?n:"#"===p&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",w="$"===p?r:/[%p]/.test(x)?s:"",k=Vo[x],T=/[defgprs%]/.test(x);function _(t){var n,r,s,o=b,p=w;if("c"===x)p=k(t)+p,t="";else{var _=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:k(Math.abs(t),y),v&&(t=Yo(t)),_&&0==+t&&"+"!==d&&(_=!1),o=(_?"("===d?d:l:"-"===d||"("===d?"":d)+o,p=("s"===x?tl[8+Uo/3]:"")+p+(_&&"("===d?")":""),T)for(n=-1,r=t.length;++n(s=t.charCodeAt(n))||s>57){p=(46===s?i+t.slice(n+1):t.slice(n))+p,t=t.slice(0,n);break}}m&&!g&&(t=e(t,1/0));var E=o.length+t.length+p.length,C=E>1)+o+t+p+C.slice(E);break;default:t=C+o+t+p}return a(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),o(_,"format"),_.toString=function(){return t+""},_}function u(t,e){var n=h(((t=qo(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($o(e)/3))),i=Math.pow(10,-r),a=tl[8+r/3];return function(t){return n(i*t)+a}}return o(h,"newFormat"),o(u,"formatPrefix"),{format:h,formatPrefix:u}}function nl(t){return Ko=el(t),Zo=Ko.format,Qo=Ko.formatPrefix,Ko}function rl(t){return Math.max(0,-$o(Math.abs(t)))}function il(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($o(e)/3)))-$o(Math.abs(t)))}function al(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$o(e)-$o(t))+1}function sl(t,e,n,r){var i,a=Sr(t,e,n);switch((r=qo(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=il(a,s))||(r.precision=i),Qo(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=al(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=rl(a))||(r.precision=i-2*("%"===r.type))}return Zo(r)}function ol(t){var e=t.domain;return t.ticks=function(t){var n=e();return Er(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return sl(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),s=0,o=a.length-1,l=a[s],c=a[o],h=10;for(c0;){if((i=Cr(l,c,n))===r)return a[s]=l,a[o]=c,e(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function ll(){var t=Oo();return t.copy=function(){return Ro(t,ll())},ko.apply(t,arguments),ol(t)}o(el,"default"),nl({thousands:",",grouping:[3],currency:["$",""]}),o(nl,"defaultLocale"),o(rl,"default"),o(il,"default"),o(al,"default"),o(sl,"tickFormat"),o(ol,"linearish"),o(ll,"linear");var cl=new Date,hl=new Date;function ul(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o(i,"interval"),i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n0))return s;let o;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(oul((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(cl.setTime(+e),hl.setTime(+r),t(cl),t(hl),Math.floor(n(cl,hl))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}o(ul,"timeInterval");var dl=ul((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));dl.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?ul((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):dl:null),dl.range;var pl=1e3,gl=6e4,fl=36e5,ml=864e5,yl=6048e5,vl=2592e6,xl=31536e6,bl=ul((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*pl)}),((t,e)=>(e-t)/pl),(t=>t.getUTCSeconds()));bl.range;var wl=ul((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pl)}),((t,e)=>{t.setTime(+t+e*gl)}),((t,e)=>(e-t)/gl),(t=>t.getMinutes()));wl.range;var kl=ul((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*gl)}),((t,e)=>(e-t)/gl),(t=>t.getUTCMinutes()));kl.range;var Tl=ul((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pl-t.getMinutes()*gl)}),((t,e)=>{t.setTime(+t+e*fl)}),((t,e)=>(e-t)/fl),(t=>t.getHours()));Tl.range;var _l=ul((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*fl)}),((t,e)=>(e-t)/fl),(t=>t.getUTCHours()));_l.range;var El=ul((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*gl)/ml),(t=>t.getDate()-1));El.range;var Cl=ul((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/ml),(t=>t.getUTCDate()-1));Cl.range;var Sl=ul((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/ml),(t=>Math.floor(t/ml)));function Al(t){return ul((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*gl)/yl))}Sl.range,o(Al,"timeWeekday");var Ll=Al(0),Nl=Al(1),Il=Al(2),Ml=Al(3),Rl=Al(4),Dl=Al(5),Ol=Al(6);function Pl(t){return ul((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/yl))}Ll.range,Nl.range,Il.range,Ml.range,Rl.range,Dl.range,Ol.range,o(Pl,"utcWeekday");var Bl=Pl(0),$l=Pl(1),Fl=Pl(2),zl=Pl(3),Ul=Pl(4),Gl=Pl(5),ql=Pl(6);Bl.range,$l.range,Fl.range,zl.range,Ul.range,Gl.range,ql.range;var jl=ul((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));jl.range;var Yl=ul((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Yl.range;var Wl=ul((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));Wl.every=t=>isFinite(t=Math.floor(t))&&t>0?ul((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,Wl.range;var Hl=ul((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Vl(t,e,n,r,i,a){const s=[[bl,1,pl],[bl,5,5e3],[bl,15,15e3],[bl,30,3e4],[a,1,gl],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,fl],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,ml],[r,2,1728e5],[n,1,yl],[e,1,vl],[e,3,7776e6],[t,1,xl]];function l(t,e,n){const r=et)).right(s,i);if(a===s.length)return t.every(Sr(e/xl,n/xl,r));if(0===a)return dl.every(Math.max(Sr(e,n,r),1));const[o,l]=s[i/s[a-1][2]isFinite(t=Math.floor(t))&&t>0?ul((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,Hl.range,o(Vl,"ticker"),Vl(Hl,Yl,Bl,Sl,_l,kl);var[Xl,Kl]=Vl(Wl,jl,Ll,El,Tl,wl);function Zl(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ql(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Jl(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function tc(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,h=cc(i),u=hc(i),d=cc(a),p=hc(a),g=cc(s),f=hc(s),m=cc(l),y=hc(l),v=cc(c),x=hc(c),b={a:D,A:O,b:P,B:B,c:null,d:Ic,e:Ic,f:Pc,g:Hc,G:Xc,H:Mc,I:Rc,j:Dc,L:Oc,m:Bc,M:$c,p:$,q:F,Q:vh,s:xh,S:Fc,u:zc,U:Uc,V:qc,w:jc,W:Yc,x:null,X:null,y:Wc,Y:Vc,Z:Kc,"%":yh},w={a:z,A:U,b:G,B:q,c:null,d:Zc,e:Zc,f:nh,g:ph,G:fh,H:Qc,I:Jc,j:th,L:eh,m:rh,M:ih,p:j,q:Y,Q:vh,s:xh,S:ah,u:sh,U:oh,V:ch,w:hh,W:uh,x:null,X:null,y:dh,Y:gh,Z:mh,"%":yh},k={a:S,A:A,b:L,B:N,c:I,d:wc,e:wc,f:Sc,g:yc,G:mc,H:Tc,I:Tc,j:kc,L:Cc,m:bc,M:_c,p:C,q:xc,Q:Lc,s:Nc,S:Ec,u:dc,U:pc,V:gc,w:uc,W:fc,x:M,X:R,y:yc,Y:mc,Z:vc,"%":Ac};function T(t,e){return function(n){var r,i,a,s=[],o=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++o53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Ql(Jl(a.y,0,1))).getUTCDay(),r=i>4||0===i?$l.ceil(r):$l(r),r=Cl.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Zl(Jl(a.y,0,1))).getDay(),r=i>4||0===i?Nl.ceil(r):Nl(r),r=El.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Ql(Jl(a.y,0,1)).getUTCDay():Zl(Jl(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Ql(a)):Zl(a)}}function E(t,e,n,r){for(var i,a,s=0,o=e.length,l=n.length;s=l)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(a=k[i in rc?e.charAt(s++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function C(t,e,n){var r=h.exec(e.slice(n));return r?(t.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function S(t,e,n){var r=g.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function A(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1}function L(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=x.get(r[0].toLowerCase()),n+r[0].length):-1}function N(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1}function I(t,n,r){return E(t,e,n,r)}function M(t,e,r){return E(t,n,e,r)}function R(t,e,n){return E(t,r,e,n)}function D(t){return s[t.getDay()]}function O(t){return a[t.getDay()]}function P(t){return c[t.getMonth()]}function B(t){return l[t.getMonth()]}function $(t){return i[+(t.getHours()>=12)]}function F(t){return 1+~~(t.getMonth()/3)}function z(t){return s[t.getUTCDay()]}function U(t){return a[t.getUTCDay()]}function G(t){return c[t.getUTCMonth()]}function q(t){return l[t.getUTCMonth()]}function j(t){return i[+(t.getUTCHours()>=12)]}function Y(t){return 1+~~(t.getUTCMonth()/3)}return b.x=T(n,b),b.X=T(r,b),b.c=T(e,b),w.x=T(n,w),w.X=T(r,w),w.c=T(e,w),o(T,"newFormat"),o(_,"newParse"),o(E,"parseSpecifier"),o(C,"parsePeriod"),o(S,"parseShortWeekday"),o(A,"parseWeekday"),o(L,"parseShortMonth"),o(N,"parseMonth"),o(I,"parseLocaleDateTime"),o(M,"parseLocaleDate"),o(R,"parseLocaleTime"),o(D,"formatShortWeekday"),o(O,"formatWeekday"),o(P,"formatShortMonth"),o(B,"formatMonth"),o($,"formatPeriod"),o(F,"formatQuarter"),o(z,"formatUTCShortWeekday"),o(U,"formatUTCWeekday"),o(G,"formatUTCShortMonth"),o(q,"formatUTCMonth"),o(j,"formatUTCPeriod"),o(Y,"formatUTCQuarter"),{format:o((function(t){var e=T(t+="",b);return e.toString=function(){return t},e}),"format"),parse:o((function(t){var e=_(t+="",!1);return e.toString=function(){return t},e}),"parse"),utcFormat:o((function(t){var e=T(t+="",w);return e.toString=function(){return t},e}),"utcFormat"),utcParse:o((function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}),"utcParse")}}o(Zl,"localDate"),o(Ql,"utcDate"),o(Jl,"newDate"),o(tc,"formatLocale");var ec,nc,rc={"-":"",_:" ",0:"0"},ic=/^\s*\d+/,ac=/^%/,sc=/[\\^$*+?|[\]().{}]/g;function oc(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[t.toLowerCase(),e])))}function uc(t,e,n){var r=ic.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function dc(t,e,n){var r=ic.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function pc(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function gc(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function fc(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function mc(t,e,n){var r=ic.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function yc(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function vc(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function xc(t,e,n){var r=ic.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function bc(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function wc(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function kc(t,e,n){var r=ic.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Tc(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function _c(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ec(t,e,n){var r=ic.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Cc(t,e,n){var r=ic.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Sc(t,e,n){var r=ic.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ac(t,e,n){var r=ac.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lc(t,e,n){var r=ic.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Nc(t,e,n){var r=ic.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ic(t,e){return oc(t.getDate(),e,2)}function Mc(t,e){return oc(t.getHours(),e,2)}function Rc(t,e){return oc(t.getHours()%12||12,e,2)}function Dc(t,e){return oc(1+El.count(Wl(t),t),e,3)}function Oc(t,e){return oc(t.getMilliseconds(),e,3)}function Pc(t,e){return Oc(t,e)+"000"}function Bc(t,e){return oc(t.getMonth()+1,e,2)}function $c(t,e){return oc(t.getMinutes(),e,2)}function Fc(t,e){return oc(t.getSeconds(),e,2)}function zc(t){var e=t.getDay();return 0===e?7:e}function Uc(t,e){return oc(Ll.count(Wl(t)-1,t),e,2)}function Gc(t){var e=t.getDay();return e>=4||0===e?Rl(t):Rl.ceil(t)}function qc(t,e){return t=Gc(t),oc(Rl.count(Wl(t),t)+(4===Wl(t).getDay()),e,2)}function jc(t){return t.getDay()}function Yc(t,e){return oc(Nl.count(Wl(t)-1,t),e,2)}function Wc(t,e){return oc(t.getFullYear()%100,e,2)}function Hc(t,e){return oc((t=Gc(t)).getFullYear()%100,e,2)}function Vc(t,e){return oc(t.getFullYear()%1e4,e,4)}function Xc(t,e){var n=t.getDay();return oc((t=n>=4||0===n?Rl(t):Rl.ceil(t)).getFullYear()%1e4,e,4)}function Kc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+oc(e/60|0,"0",2)+oc(e%60,"0",2)}function Zc(t,e){return oc(t.getUTCDate(),e,2)}function Qc(t,e){return oc(t.getUTCHours(),e,2)}function Jc(t,e){return oc(t.getUTCHours()%12||12,e,2)}function th(t,e){return oc(1+Cl.count(Hl(t),t),e,3)}function eh(t,e){return oc(t.getUTCMilliseconds(),e,3)}function nh(t,e){return eh(t,e)+"000"}function rh(t,e){return oc(t.getUTCMonth()+1,e,2)}function ih(t,e){return oc(t.getUTCMinutes(),e,2)}function ah(t,e){return oc(t.getUTCSeconds(),e,2)}function sh(t){var e=t.getUTCDay();return 0===e?7:e}function oh(t,e){return oc(Bl.count(Hl(t)-1,t),e,2)}function lh(t){var e=t.getUTCDay();return e>=4||0===e?Ul(t):Ul.ceil(t)}function ch(t,e){return t=lh(t),oc(Ul.count(Hl(t),t)+(4===Hl(t).getUTCDay()),e,2)}function hh(t){return t.getUTCDay()}function uh(t,e){return oc($l.count(Hl(t)-1,t),e,2)}function dh(t,e){return oc(t.getUTCFullYear()%100,e,2)}function ph(t,e){return oc((t=lh(t)).getUTCFullYear()%100,e,2)}function gh(t,e){return oc(t.getUTCFullYear()%1e4,e,4)}function fh(t,e){var n=t.getUTCDay();return oc((t=n>=4||0===n?Ul(t):Ul.ceil(t)).getUTCFullYear()%1e4,e,4)}function mh(){return"+0000"}function yh(){return"%"}function vh(t){return+t}function xh(t){return Math.floor(+t/1e3)}function bh(t){return ec=tc(t),nc=ec.format,ec.parse,ec.utcFormat,ec.utcParse,ec}function wh(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],s=t[i];return s1?0:t<-1?$h:Math.acos(t)}function Gh(t){return t>=1?Fh:t<=-1?-Fh:Math.asin(t)}o(Uh,"acos"),o(Gh,"asin");var qh=Math.PI,jh=2*qh,Yh=1e-6,Wh=jh-Yh;function Hh(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Hh;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eYh)if(Math.abs(h*o-l*c)>Yh&&i){let d=n-a,p=r-s,g=o*o+l*l,f=d*d+p*p,m=Math.sqrt(g),y=Math.sqrt(u),v=i*Math.tan((qh-Math.acos((g+u-f)/(2*m*y)))/2),x=v/y,b=v/m;Math.abs(x-1)>Yh&&this._append`L${t+x*c},${e+x*h}`,this._append`A${i},${i},0,0,${+(h*d>c*p)},${this._x1=t+b*o},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),o=n*Math.sin(r),l=t+s,c=e+o,h=1^a,u=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Yh||Math.abs(this._y1-c)>Yh)&&this._append`L${l},${c}`,n&&(u<0&&(u=u%jh+jh),u>Wh?this._append`A${n},${n},0,1,${h},${t-s},${e-o}A${n},${n},0,1,${h},${this._x1=l},${this._y1=c}`:u>Yh&&this._append`A${n},${n},0,${+(u>=qh)},${h},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Kh(){return new Xh}function Zh(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Xh(e)}function Qh(t){return t.innerRadius}function Jh(t){return t.outerRadius}function tu(t){return t.startAngle}function eu(t){return t.endAngle}function nu(t){return t&&t.padAngle}function ru(t,e,n,r,i,a,s,o){var l=n-t,c=r-e,h=s-i,u=o-a,d=u*l-h*c;if(!(d*dN*N+I*I&&(_=C,E=S),{cx:_,cy:E,x01:-h,y01:-u,x11:_*(i/w-1),y11:E*(i/w-1)}}function au(){var t=Qh,e=Jh,n=Lh(0),r=null,i=tu,a=eu,s=nu,l=null,c=Zh(h);function h(){var o,h,u=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-Fh,g=a.apply(this,arguments)-Fh,f=Nh(g-p),m=g>p;if(l||(l=o=c()),dBh)if(f>zh-Bh)l.moveTo(d*Mh(p),d*Oh(p)),l.arc(0,0,d,p,g,!m),u>Bh&&(l.moveTo(u*Mh(g),u*Oh(g)),l.arc(0,0,u,g,p,m));else{var y,v,x=p,b=g,w=p,k=g,T=f,_=f,E=s.apply(this,arguments)/2,C=E>Bh&&(r?+r.apply(this,arguments):Ph(u*u+d*d)),S=Dh(Nh(d-u)/2,+n.apply(this,arguments)),A=S,L=S;if(C>Bh){var N=Gh(C/u*Oh(E)),I=Gh(C/d*Oh(E));(T-=2*N)>Bh?(w+=N*=m?1:-1,k-=N):(T=0,w=k=(p+g)/2),(_-=2*I)>Bh?(x+=I*=m?1:-1,b-=I):(_=0,x=b=(p+g)/2)}var M=d*Mh(x),R=d*Oh(x),D=u*Mh(k),O=u*Oh(k);if(S>Bh){var P,B=d*Mh(b),$=d*Oh(b),F=u*Mh(w),z=u*Oh(w);if(f<$h)if(P=ru(M,R,F,z,B,$,D,O)){var U=M-P[0],G=R-P[1],q=B-P[0],j=$-P[1],Y=1/Oh(Uh((U*q+G*j)/(Ph(U*U+G*G)*Ph(q*q+j*j)))/2),W=Ph(P[0]*P[0]+P[1]*P[1]);A=Dh(S,(u-W)/(Y-1)),L=Dh(S,(d-W)/(Y+1))}else A=L=0}_>Bh?L>Bh?(y=iu(F,z,M,R,d,L,m),v=iu(B,$,D,O,d,L,m),l.moveTo(y.cx+y.x01,y.cy+y.y01),LBh&&T>Bh?A>Bh?(y=iu(D,O,B,$,u,-A,m),v=iu(M,R,F,z,u,-A,m),l.lineTo(y.cx+y.x01,y.cy+y.y01),At?1:e>=t?0:NaN}function pu(t){return t}function gu(){var t=pu,e=du,n=null,r=Lh(0),i=Lh(zh),a=Lh(0);function s(s){var o,l,c,h,u,d=(s=lu(s)).length,p=0,g=new Array(d),f=new Array(d),m=+r.apply(this,arguments),y=Math.min(zh,Math.max(-zh,i.apply(this,arguments)-m)),v=Math.min(Math.abs(y)/d,a.apply(this,arguments)),x=v*(y<0?-1:1);for(o=0;o0&&(p+=u);for(null!=e?g.sort((function(t,n){return e(f[t],f[n])})):null!=n&&g.sort((function(t,e){return n(s[t],s[e])})),o=0,c=p?(y-d*x)/p:0;o0?u*c:0)+x,f[l]={data:s[l],index:o,value:u,startAngle:m,endAngle:h,padAngle:v};return f}return o(s,"pie"),s.value=function(e){return arguments.length?(t="function"==typeof e?e:Lh(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Lh(+t),s):r},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Lh(+t),s):i},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Lh(+t),s):a},s}o(Kh,"path"),Kh.prototype=Xh.prototype,o(Zh,"withPath"),o(Qh,"arcInnerRadius"),o(Jh,"arcOuterRadius"),o(tu,"arcStartAngle"),o(eu,"arcEndAngle"),o(nu,"arcPadAngle"),o(ru,"intersect"),o(iu,"cornerTangents"),o(au,"default"),o(su,"Linear"),su.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._point=0}),"lineStart"),lineEnd:o((function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}),"point")},o(ou,"default"),o(lu,"default"),o(cu,"x"),o(hu,"y"),o(uu,"default"),o(du,"default"),o(pu,"default"),o(gu,"default");var fu=class{static{o(this,"Bump")}constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}};function mu(t){return new fu(t,!0)}function yu(t){return new fu(t,!1)}function vu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function xu(t){this._context=t}function bu(t){return new xu(t)}function wu(){}function ku(t){this._context=t}function Tu(t){return new ku(t)}function _u(t){this._context=t}function Eu(t){return new _u(t)}function Cu(t,e){this._basis=new xu(t),this._beta=e}o(mu,"bumpX"),o(yu,"bumpY"),o(vu,"point"),o(xu,"Basis"),xu.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0}),"lineStart"),lineEnd:o((function(){switch(this._point){case 3:vu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}),"point")},o(bu,"default"),o(wu,"default"),o(ku,"BasisClosed"),ku.prototype={areaStart:wu,areaEnd:wu,lineStart:o((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:o((function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:vu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}),"point")},o(Tu,"default"),o(_u,"BasisOpen"),_u.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0}),"lineStart"),lineEnd:o((function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:vu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}),"point")},o(Eu,"default"),o(Cu,"Bundle"),Cu.prototype={lineStart:o((function(){this._x=[],this._y=[],this._basis.lineStart()}),"lineStart"),lineEnd:o((function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],s=t[n]-i,o=e[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*s),this._beta*e[l]+(1-this._beta)*(a+r*o));this._x=this._y=null,this._basis.lineEnd()}),"lineEnd"),point:o((function(t,e){this._x.push(+t),this._y.push(+e)}),"point")};var Su=o((function t(e){function n(t){return 1===e?new xu(t):new Cu(t,e)}return o(n,"bundle"),n.beta=function(e){return t(+e)},n}),"custom")(.85);function Au(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Lu(t,e){this._context=t,this._k=(1-e)/6}o(Au,"point"),o(Lu,"Cardinal"),Lu.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0}),"lineStart"),lineEnd:o((function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Au(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Au(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Nu=o((function t(e){function n(t){return new Lu(t,e)}return o(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function Iu(t,e){this._context=t,this._k=(1-e)/6}o(Iu,"CardinalClosed"),Iu.prototype={areaStart:wu,areaEnd:wu,lineStart:o((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:o((function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Au(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Mu=o((function t(e){function n(t){return new Iu(t,e)}return o(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function Ru(t,e){this._context=t,this._k=(1-e)/6}o(Ru,"CardinalOpen"),Ru.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0}),"lineStart"),lineEnd:o((function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Au(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Du=o((function t(e){function n(t){return new Ru(t,e)}return o(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function Ou(t,e,n){var r=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Bh){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Bh){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(r,i,a,s,t._x2,t._y2)}function Pu(t,e){this._context=t,this._alpha=e}o(Ou,"point"),o(Pu,"CatmullRom"),Pu.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((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:o((function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ou(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Bu=o((function t(e){function n(t){return e?new Pu(t,e):new Lu(t,0)}return o(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function $u(t,e){this._context=t,this._alpha=e}o($u,"CatmullRomClosed"),$u.prototype={areaStart:wu,areaEnd:wu,lineStart:o((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:o((function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}}),"lineEnd"),point:o((function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ou(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Fu=o((function t(e){function n(t){return e?new $u(t,e):new Iu(t,0)}return o(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function zu(t,e){this._context=t,this._alpha=e}o(zu,"CatmullRomOpen"),zu.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((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:o((function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:Ou(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Uu=o((function t(e){function n(t){return e?new zu(t,e):new Ru(t,0)}return o(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function Gu(t){this._context=t}function qu(t){return new Gu(t)}function ju(t){return t<0?-1:1}function Yu(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),o=(a*i+s*r)/(r+i);return(ju(a)+ju(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Wu(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Hu(t,e,n){var r=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-r)/3;t._context.bezierCurveTo(r+o,i+o*e,a-o,s-o*n,a,s)}function Vu(t){this._context=t}function Xu(t){this._context=new Ku(t)}function Ku(t){this._context=t}function Zu(t){return new Vu(t)}function Qu(t){return new Xu(t)}function Ju(t){this._context=t}function td(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}),"point")},o(rd,"default"),o(id,"stepBefore"),o(ad,"stepAfter");var sd={value:o((()=>{}),"value")};function od(){for(var t,e=0,n=arguments.length,r={};e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function hd(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),a=0;a=0&&e._call.call(void 0,t),e=e._next;--fd}function Ad(){xd=(vd=wd.now())+bd,fd=md=0;try{Sd()}finally{fd=0,Nd(),xd=0}}function Ld(){var t=wd.now(),e=t-vd;e>1e3&&(bd-=e,vd=t)}function Nd(){for(var t,e,n=dd,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:dd=e);pd=t,Id(r)}function Id(t){fd||(md&&(md=clearTimeout(md)),t-xd>24?(t<1/0&&(md=setTimeout(Ad,t-wd.now()-bd)),yd&&(yd=clearInterval(yd))):(yd||(vd=wd.now(),yd=setInterval(Ld,1e3)),fd=1,kd(Ad)))}function Md(t,e,n){var r=new Ed;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}o(Td,"now"),o(_d,"clearNow"),o(Ed,"Timer"),Ed.prototype=Cd.prototype={constructor:Ed,restart:o((function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Td():+n)+(null==e?0:+e),this._next||pd===this||(pd?pd._next=this:dd=this,pd=this),this._call=t,this._time=n,Id()}),"restart"),stop:o((function(){this._call&&(this._call=null,this._time=1/0,Id())}),"stop")},o(Cd,"timer"),o(Sd,"timerFlush"),o(Ad,"wake"),o(Ld,"poke"),o(Nd,"nap"),o(Id,"sleep"),o(Md,"default");var Rd=gd("start","end","cancel","interrupt"),Dd=[];function Od(t,e,n,r,i,a){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};Fd(t,n,{name:e,index:r,group:i,on:Rd,tween:Dd,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Pd(t,e){var n=$d(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Bd(t,e){var n=$d(t,e);if(n.state>3)throw new Error("too late; already running");return n}function $d(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Fd(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(s,n.delay,n.time),n.delay<=t&&s(t-n.delay)}function s(a){var o,h,u,d;if(1!==n.state)return c();for(o in i)if((d=i[o]).name===n.name){if(3===d.state)return Md(s);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[o]):+o2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):s=!1;s&&delete t.__transition}}function Ud(t){return this.each((function(){zd(this,t)}))}function Gd(t,e){var n,r;return function(){var i=Bd(this,t),a=i.tween;if(a!==n)for(var s=0,o=(r=n=a).length;s=0&&(t=t.slice(0,e)),!t||"start"===t}))}function vp(t,e,n){var r,i,a=yp(e)?Pd:Bd;return function(){var s=a(this,t),o=s.on;o!==r&&(i=(r=o).copy()).on(e,n),s.on=i}}function xp(t,e){var n=this._id;return arguments.length<2?$d(this.node(),n).on.on(t):this.each(vp(n,t,e))}function bp(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function wp(){return this.on("end.remove",bp(this._id))}function kp(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=zr(t));for(var r=this._groups,i=r.length,a=new Array(i),s=0;s{const{securityLevel:e}=Kn();let n=Fa("body");if("sandbox"===e){const e=Fa(`#i${t}`);n=Fa((e.node()?.contentDocument??document).body)}return n.select(`#${t}`)}),"selectSvgElement");function rg(t){return null==t}function ig(t){return"object"==typeof t&&null!==t}function ag(t){return Array.isArray(t)?t:rg(t)?[]:[t]}function sg(t,e){var n,r,i,a;if(e)for(n=0,r=(a=Object.keys(e)).length;no&&(e=r-o+(a=" ... ").length),n-r>o&&(n=r+o-(s=" ...").length),{str:a+t.slice(e,n).replace(/\t/g,"→")+s,pos:r-e+a.length}}function gg(t,e){return cg.repeat(" ",e-t.length)+t}function fg(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;n=r.exec(t.buffer);)a.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o,l,c="",h=Math.min(t.line+e.linesAfter,a.length).toString().length,u=e.maxLength-(e.indent+h+3);for(o=1;o<=e.linesBefore&&!(s-o<0);o++)l=pg(t.buffer,i[s-o],a[s-o],t.position-(i[s]-i[s-o]),u),c=cg.repeat(" ",e.indent)+gg((t.line-o+1).toString(),h)+" | "+l.str+"\n"+c;for(l=pg(t.buffer,i[s],a[s],t.position,u),c+=cg.repeat(" ",e.indent)+gg((t.line+1).toString(),h)+" | "+l.str+"\n",c+=cg.repeat("-",e.indent+h+3+l.pos)+"^\n",o=1;o<=e.linesAfter&&!(s+o>=a.length);o++)l=pg(t.buffer,i[s+o],a[s+o],t.position-(i[s]-i[s+o]),u),c+=cg.repeat(" ",e.indent)+gg((t.line+o+1).toString(),h)+" | "+l.str+"\n";return c.replace(/\n$/,"")}o(pg,"getLine"),o(gg,"padStart"),o(fg,"makeSnippet");var mg=fg,yg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],vg=["scalar","sequence","mapping"];function xg(t){var e={};return null!==t&&Object.keys(t).forEach((function(n){t[n].forEach((function(t){e[String(t)]=n}))})),e}function bg(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===yg.indexOf(e))throw new dg('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=xg(e.styleAliases||null),-1===vg.indexOf(this.kind))throw new dg('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}o(xg,"compileStyleAliases"),o(bg,"Type$1");var wg=bg;function kg(t,e){var n=[];return t[e].forEach((function(t){var e=n.length;n.forEach((function(n,r){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=r)})),n[e]=t})),n}function Tg(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for(o(r,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:o((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:o((function(t){return t.toString(10)}),"decimal"),hexadecimal:o((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Yg=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Wg(t){return null!==t&&!(!Yg.test(t)||"_"===t[t.length-1])}function Hg(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)}o(Wg,"resolveYamlFloat"),o(Hg,"constructYamlFloat");var Vg=/^[-+]?[0-9]+e/;function Xg(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(cg.isNegativeZero(t))return"-0.0";return n=t.toString(10),Vg.test(n)?n.replace("e",".e"):n}function Kg(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||cg.isNegativeZero(t))}o(Xg,"representYamlFloat"),o(Kg,"isFloat");var Zg=new wg("tag:yaml.org,2002:float",{kind:"scalar",resolve:Wg,construct:Hg,predicate:Kg,represent:Xg,defaultStyle:"lowercase"}),Qg=Lg.extend({implicit:[Rg,Bg,jg,Zg]}),Jg=Qg,tf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ef=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function nf(t){return null!==t&&(null!==tf.exec(t)||null!==ef.exec(t))}function rf(t){var e,n,r,i,a,s,o,l,c=0,h=null;if(null===(e=tf.exec(t))&&(e=ef.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(n,r,i,a,s,o,c)),h&&l.setTime(l.getTime()-h),l}function af(t){return t.toISOString()}o(nf,"resolveYamlTimestamp"),o(rf,"constructYamlTimestamp"),o(af,"representYamlTimestamp");var sf=new wg("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:nf,construct:rf,instanceOf:Date,represent:af});function of(t){return"<<"===t||null===t}o(of,"resolveYamlMerge");var lf=new wg("tag:yaml.org,2002:merge",{kind:"scalar",resolve:of}),cf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function hf(t){if(null===t)return!1;var e,n,r=0,i=t.length,a=cf;for(n=0;n64)){if(e<0)return!1;r+=6}return r%8==0}function uf(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,a=cf,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(255&s)),s=s<<6|a.indexOf(r.charAt(e));return 0===(n=i%4*6)?(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)):18===n?(o.push(s>>10&255),o.push(s>>2&255)):12===n&&o.push(s>>4&255),new Uint8Array(o)}function df(t){var e,n,r="",i=0,a=t.length,s=cf;for(e=0;e>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+t[e];return 0===(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}function pf(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}o(hf,"resolveYamlBinary"),o(uf,"constructYamlBinary"),o(df,"representYamlBinary"),o(pf,"isBinary");var gf=new wg("tag:yaml.org,2002:binary",{kind:"scalar",resolve:hf,construct:uf,predicate:pf,represent:df}),ff=Object.prototype.hasOwnProperty,mf=Object.prototype.toString;function yf(t){if(null===t)return!0;var e,n,r,i,a,s=[],o=t;for(e=0,n=o.length;e>10),56320+(t-65536&1023))}o(Of,"_class"),o(Pf,"is_EOL"),o(Bf,"is_WHITE_SPACE"),o($f,"is_WS_OR_EOL"),o(Ff,"is_FLOW_INDICATOR"),o(zf,"fromHexCode"),o(Uf,"escapedHexLen"),o(Gf,"fromDecimalCode"),o(qf,"simpleEscapeSequence"),o(jf,"charFromCodepoint");var Yf,Wf=new Array(256),Hf=new Array(256);for(Yf=0;Yf<256;Yf++)Wf[Yf]=qf(Yf)?1:0,Hf[Yf]=qf(Yf);function Vf(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Af,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Xf(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=mg(n),new dg(e,n)}function Kf(t,e){throw Xf(t,e)}function Zf(t,e){t.onWarning&&t.onWarning.call(null,Xf(t,e))}o(Vf,"State$1"),o(Xf,"generateError"),o(Kf,"throwError"),o(Zf,"throwWarning");var Qf={YAML:o((function(t,e,n){var r,i,a;null!==t.version&&Kf(t,"duplication of %YAML directive"),1!==n.length&&Kf(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Kf(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),a=parseInt(r[2],10),1!==i&&Kf(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Zf(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:o((function(t,e,n){var r,i;2!==n.length&&Kf(t,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],Rf.test(r)||Kf(t,"ill-formed tag handle (first argument) of the TAG directive"),Lf.call(t.tagMap,r)&&Kf(t,'there is a previously declared suffix for "'+r+'" tag handle'),Df.test(i)||Kf(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){Kf(t,"tag prefix is malformed: "+i)}t.tagMap[r]=i}),"handleTagDirective")};function Jf(t,e,n,r){var i,a,s,o;if(e1&&(t.result+=cg.repeat("\n",e-1))}function sm(t,e,n){var r,i,a,s,o,l,c,h,u=t.kind,d=t.result;if($f(h=t.input.charCodeAt(t.position))||Ff(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&($f(r=t.input.charCodeAt(t.position+1))||n&&Ff(r)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,s=!1;0!==h;){if(58===h){if($f(r=t.input.charCodeAt(t.position+1))||n&&Ff(r))break}else if(35===h){if($f(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&im(t)||n&&Ff(h))break;if(Pf(h)){if(o=t.line,l=t.lineStart,c=t.lineIndent,rm(t,!1,-1),t.lineIndent>=e){s=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=o,t.lineStart=l,t.lineIndent=c;break}}s&&(Jf(t,i,a,!1),am(t,t.line-o),i=a=t.position,s=!1),Bf(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Jf(t,i,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function om(t,e){var n,r,i;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(Jf(t,r,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else Pf(n)?(Jf(t,r,i,!0),am(t,rm(t,!1,e)),r=i=t.position):t.position===t.lineStart&&im(t)?Kf(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Kf(t,"unexpected end of the stream within a single quoted scalar")}function lm(t,e){var n,r,i,a,s,o;if(34!==(o=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return Jf(t,n,t.position,!0),t.position++,!0;if(92===o){if(Jf(t,n,t.position,!0),Pf(o=t.input.charCodeAt(++t.position)))rm(t,!1,e);else if(o<256&&Wf[o])t.result+=Hf[o],t.position++;else if((s=Uf(o))>0){for(i=s,a=0;i>0;i--)(s=zf(o=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:Kf(t,"expected hexadecimal character");t.result+=jf(a),t.position++}else Kf(t,"unknown escape sequence");n=r=t.position}else Pf(o)?(Jf(t,n,r,!0),am(t,rm(t,!1,e)),n=r=t.position):t.position===t.lineStart&&im(t)?Kf(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}Kf(t,"unexpected end of the stream within a double quoted scalar")}function cm(t,e){var n,r,i,a,s,o,l,c,h,u,d,p,g=!0,f=t.tag,m=t.anchor,y=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,c=!1,a=[];else{if(123!==p)return!1;s=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(rm(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=f,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=a,!0;g?44===p&&Kf(t,"expected the node content, but found ','"):Kf(t,"missed comma between flow collection entries"),d=null,o=l=!1,63===p&&$f(t.input.charCodeAt(t.position+1))&&(o=l=!0,t.position++,rm(t,!0,e)),n=t.line,r=t.lineStart,i=t.position,mm(t,e,1,!1,!0),u=t.tag,h=t.result,rm(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==n||58!==p||(o=!0,p=t.input.charCodeAt(++t.position),rm(t,!0,e),mm(t,e,1,!1,!0),d=t.result),c?em(t,a,y,u,h,d,n,r,i):o?a.push(em(t,null,y,u,h,d,n,r,i)):a.push(h),rm(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}Kf(t,"unexpected end of the stream within a flow collection")}function hm(t,e){var n,r,i,a,s=1,o=!1,l=!1,c=e,h=0,u=!1;if(124===(a=t.input.charCodeAt(t.position)))r=!1;else{if(62!==a)return!1;r=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===s?s=43===a?3:2:Kf(t,"repeat of a chomping mode identifier");else{if(!((i=Gf(a))>=0))break;0===i?Kf(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Kf(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(Bf(a)){do{a=t.input.charCodeAt(++t.position)}while(Bf(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Pf(a)&&0!==a)}for(;0!==a;){for(nm(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndentc&&(c=t.lineIndent),Pf(a))h++;else{if(t.lineIndente)&&0!==r)Kf(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,o=t.lineStart,l=t.position),mm(t,e,4,!0,i)&&(y?f=t.result:m=t.result),y||(em(t,d,p,g,f,m,s,o,l),g=f=m=null),rm(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Kf(t,"bad indentation of a mapping entry");else if(t.lineIndente?g=1:t.lineIndent===e?g=0:t.lineIndente?g=1:t.lineIndent===e?g=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&Kf(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Kf(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function ym(t){var e,n,r,i,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(rm(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(s=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!$f(i);)i=t.input.charCodeAt(++t.position);for(r=[],(n=t.input.slice(e,t.position)).length<1&&Kf(t,"directive name must not be less than one character in length");0!==i;){for(;Bf(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!Pf(i));break}if(Pf(i))break;for(e=t.position;0!==i&&!$f(i);)i=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==i&&nm(t),Lf.call(Qf,n)?Qf[n](t,n,r):Zf(t,'unknown document directive "'+n+'"')}rm(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,rm(t,!0,-1)):s&&Kf(t,"directives end mark is expected"),mm(t,t.lineIndent-1,4,!1,!0),rm(t,!0,-1),t.checkLineBreaks&&If.test(t.input.slice(a,t.position))&&Zf(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&im(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,rm(t,!0,-1)):t.position=55296&&r<=56319&&e+1=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function Um(t){return/^\n* /.test(t)}o(Nm,"State"),o(Im,"indentString"),o(Mm,"generateNextLine"),o(Rm,"testImplicitResolving"),o(Dm,"isWhitespace"),o(Om,"isPrintable"),o(Pm,"isNsCharOrWhitespace"),o(Bm,"isPlainSafe"),o($m,"isPlainSafeFirst"),o(Fm,"isPlainSafeLast"),o(zm,"codePointAt"),o(Um,"needIndentIndicator");function Gm(t,e,n,r,i,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==r,g=-1,f=$m(zm(t,0))&&Fm(zm(t,t.length-1));if(e||s)for(l=0;l=65536?l+=2:l++){if(!Om(c=zm(t,l)))return 5;f=f&&Bm(c,h,o),h=c}else{for(l=0;l=65536?l+=2:l++){if(10===(c=zm(t,l)))u=!0,p&&(d=d||l-g-1>r&&" "!==t[g+1],g=l);else if(!Om(c))return 5;f=f&&Bm(c,h,o),h=c}d=d||p&&l-g-1>r&&" "!==t[g+1]}return u||d?n>9&&Um(t)?5:s?2===a?5:2:d?4:3:!f||s||i(t)?2===a?5:2:1}function qm(t,e,n,r,i){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Cm.indexOf(e)||Sm.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,n),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=r||t.flowLevel>-1&&n>=t.flowLevel;function c(e){return Rm(t,e)}switch(o(c,"testAmbiguity"),Gm(e,l,t.indent,s,c,t.quotingType,t.forceQuotes&&!r,i)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+jm(e,t.indent)+Ym(Im(e,a));case 4:return">"+jm(e,t.indent)+Ym(Im(Wm(e,s),a));case 5:return'"'+Vm(e)+'"';default:throw new dg("impossible error: invalid scalar style")}}()}function jm(t,e){var n=Um(t)?String(e):"",r="\n"===t[t.length-1];return n+(r&&("\n"===t[t.length-2]||"\n"===t)?"+":r?"":"-")+"\n"}function Ym(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Wm(t,e){for(var n,r,i,a=/(\n+)([^\n]*)/g,s=(n=-1!==(n=t.indexOf("\n"))?n:t.length,a.lastIndex=n,Hm(t.slice(0,n),e)),o="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],c=i[2];r=" "===c[0],s+=l+(o||r||""===c?"":"\n")+Hm(c,e),o=r}return s}function Hm(t,e){if(""===t||" "===t[0])return t;for(var n,r,i=/ [^ ]/g,a=0,s=0,o=0,l="";n=i.exec(t);)(o=n.index)-a>e&&(r=s>a?s:o,l+="\n"+t.slice(a,r),a=r+1),s=o;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function Vm(t){for(var e,n="",r=0,i=0;i=65536?i+=2:i++)r=zm(t,i),!(e=Em[r])&&Om(r)?(n+=t[i],r>=65536&&(n+=t[i+1])):n+=e||Lm(r);return n}function Xm(t,e,n){var r,i,a,s="",o=t.tag;for(r=0,i=n.length;r1024&&(o+="? "),o+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),ty(t,e,s,!1,!1)&&(l+=o+=t.dump));t.tag=c,t.dump="{"+l+"}"}function Qm(t,e,n,r){var i,a,s,o,l,c,h="",u=t.tag,d=Object.keys(n);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new dg("sortKeys must be a boolean or a function");for(i=0,a=d.length;i1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Mm(t,e)),ty(t,e+1,o,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Jm(t,e,n){var r,i,a,s,o,l;for(a=0,s=(i=n?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+l+'" style');r=o.represent[l](e,l)}t.dump=r}return!0}return!1}function ty(t,e,n,r,i,a,s){t.tag=null,t.dump=n,Jm(t,n,!1)||Jm(t,n,!0);var o,l=km.call(t.dump),c=r;r&&(r=t.flowLevel<0||t.flowLevel>e);var h,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(h=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(d&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)r&&0!==Object.keys(t.dump).length?(Qm(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Zm(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)r&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?Km(t,e-1,t.dump,i):Km(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Xm(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new dg("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&qm(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(o=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),o="!"===t.tag[0]?"!"+o:"tag:yaml.org,2002:"===o.slice(0,18)?"!!"+o.slice(18):"!<"+o+">",t.dump=o+" "+t.dump)}return!0}function ey(t,e){var n,r,i=[],a=[];for(ny(t,i,a),n=0,r=a.length;n{const e=t?.subGraphTitleMargin?.top??0,n=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:e+n}}),"getSubGraphTitleMargins"),sy=l({"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(t,e){var n=1e3,r=60*n,i=60*r,a=24*i;function s(t){if(!((t=String(t)).length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*a;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function l(t){var e=Math.abs(t);return e>=a?Math.round(t/a)+"d":e>=i?Math.round(t/i)+"h":e>=r?Math.round(t/r)+"m":e>=n?Math.round(t/n)+"s":t+"ms"}function c(t){var e=Math.abs(t);return e>=a?h(t,e,a,"day"):e>=i?h(t,e,i,"hour"):e>=r?h(t,e,r,"minute"):e>=n?h(t,e,n,"second"):t+" ms"}function h(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}e.exports=function(t,e){e=e||{};var n=typeof t;if("string"===n&&t.length>0)return s(t);if("number"===n&&isFinite(t))return e.long?c(t):l(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))},o(s,"parse"),o(l,"fmtShort"),o(c,"fmtLong"),o(h,"plural")}}),oy=l({"../../node_modules/.pnpm/debug@4.3.7_supports-color@8.1.1/node_modules/debug/src/common.js"(t,e){function n(t){function e(t){let e=0;for(let n=0;n{if("%%"===e)return"%";s++;const a=n.formatters[i];if("function"==typeof a){const n=t[s];e=a.call(r,n),t.splice(s,1),s--}return e})),n.formatArgs.call(r,t);(r.log||n.log).apply(r,t)}return o(l,"debug"),l.namespace=t,l.useColors=n.useColors(),l.color=n.selectColor(t),l.extend=r,l.destroy=n.destroy,Object.defineProperty(l,"enabled",{enumerable:!0,configurable:!1,get:o((()=>null!==s?s:(i!==n.namespaces&&(i=n.namespaces,a=n.enabled(t)),a)),"get"),set:o((t=>{s=t}),"set")}),"function"==typeof n.init&&n.init(l),l}function r(t,e){const r=n(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function i(t){let e;n.save(t),n.namespaces=t,n.names=[],n.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(e=0;e"-"+t))].join(",");return n.enable(""),t}function s(t){if("*"===t[t.length-1])return!0;let e,r;for(e=0,r=n.skips.length;e{n[e]=t[e]})),n.names=[],n.skips=[],n.formatters={},o(e,"selectColor"),n.selectColor=e,o(n,"createDebug"),o(r,"extend"),o(i,"enable"),o(a,"disable"),o(s,"enabled"),o(l,"toNamespace"),o(c,"coerce"),o(h,"destroy"),n.enable(n.load()),n}o(n,"setup"),e.exports=n}}),ly=l({"../../node_modules/.pnpm/debug@4.3.7_supports-color@8.1.1/node_modules/debug/src/browser.js"(t,e){function n(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),t.splice(i,0,n)}function i(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(t){}}function a(){let e;try{e=t.storage.getItem("debug")}catch(t){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}function s(){try{return localStorage}catch(t){}}t.formatArgs=r,t.save=i,t.load=a,t.useColors=n,t.storage=s(),t.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],o(n,"useColors"),o(r,"formatArgs"),t.log=console.debug||console.log||(()=>{}),o(i,"save"),o(a,"load"),o(s,"localstorage"),e.exports=oy()(t);var{formatters:l}=e.exports;l.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}}),cy=Object.freeze({left:0,top:0,width:16,height:16}),hy=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),uy=Object.freeze({...cy,...hy}),dy=Object.freeze({...uy,body:"",hidden:!1}),py=Object.freeze({width:null,height:null}),gy=Object.freeze({...py,...hy}),fy=/^[a-z0-9]+(-[a-z0-9]+)*$/,my=o(((t,e,n,r="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:t};return e&&!yy(a)?null:a}const a=i[0],s=a.split("-");if(s.length>1){const t={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!yy(t)?null:t}if(n&&""===r){const t={provider:r,prefix:"",name:a};return e&&!yy(t,n)?null:t}return null}),"stringToIcon"),yy=o(((t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(fy)||!(e&&""===t.prefix||t.prefix.match(fy))||!t.name.match(fy))),"validateIconName");function vy(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function xy(t,e){const n=vy(t,e);for(const r in dy)r in hy?r in t&&!(r in n)&&(n[r]=hy[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function by(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function a(t){if(n[t])return i[t]=[];if(!(t in i)){i[t]=null;const e=r[t]&&r[t].parent,n=e&&a(e);n&&(i[t]=[e].concat(n))}return i[t]}return o(a,"resolve"),(e||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function wy(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let a={};function s(t){a=xy(r[t]||i[t],a)}return o(s,"parse"),s(e),n.forEach(s),xy(t,a)}function ky(t,e){if(t.icons[e])return wy(t,e,[]);const n=by(t,[e])[e];return n?wy(t,e,n):null}o(vy,"mergeIconTransformations"),o(xy,"mergeIconData"),o(by,"getIconsTree"),o(wy,"internalGetIconData"),o(ky,"getIconData");var Ty=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_y=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ey(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const r=t.split(Ty);if(null===r||!r.length)return t;const i=[];let a=r.shift(),s=_y.test(a);for(;;){if(s){const t=parseFloat(a);isNaN(t)?i.push(a):i.push(Math.ceil(t*e*n)/n)}else i.push(a);if(a=r.shift(),void 0===a)return i.join("");s=!s}}function Cy(t,e="defs"){let n="";const r=t.indexOf("<"+e);for(;r>=0;){const i=t.indexOf(">",r),a=t.indexOf("",a);if(-1===s)break;n+=t.slice(i+1,a).trim(),t=t.slice(0,r).trim()+t.slice(s+1)}return{defs:n,content:t}}function Sy(t,e){return t?""+t+""+e:e}function Ay(t,e,n){const r=Cy(t);return Sy(r.defs,e+r.content+n)}o(Ey,"calculateSize"),o(Cy,"splitSVGDefs"),o(Sy,"mergeDefsAndContent"),o(Ay,"wrapSVGContent");var Ly=o((t=>"unset"===t||"undefined"===t||"none"===t),"isUnsetKeyword");function Ny(t,e){const n={...uy,...t},r={...gy,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,r].forEach((t=>{const e=[],n=t.hFlip,r=t.vFlip;let s,o=t.rotate;switch(n?r?o+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):r&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),o<0&&(o-=4*Math.floor(o/4)),o%=4,o){case 1:s=i.height/2+i.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),e.length&&(a=Ay(a,'',""))}));const s=r.width,l=r.height,c=i.width,h=i.height;let u,d;null===s?(d=null===l?"1em":"auto"===l?h:l,u=Ey(d,c/h)):(u="auto"===s?c:s,d=null===l?Ey(u,h/c):"auto"===l?h:l);const p={},g=o(((t,e)=>{Ly(e)||(p[t]=e.toString())}),"setAttr");g("width",u),g("height",d);const f=[i.left,i.top,c,h];return p.viewBox=f.join(" "),{attributes:p,viewBox:f,body:a}}o(Ny,"iconToSVG");var Iy=/\sid="(\S+)"/g,My="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Ry=0;function Dy(t,e=My){const n=[];let r;for(;r=Iy.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach((n=>{const r="function"==typeof e?e(n):e+(Ry++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")})),t=t.replace(new RegExp(i,"g"),"")}function Oy(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)n+=" "+t+'="'+e[t]+'"';return'"+t+""}o(Dy,"replaceIDs"),o(Oy,"iconToHTML"),p(ly(),1);var Py={body:'?',height:80,width:80},By=new Map,$y=new Map,Fy=o((t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(y.debug("Registering icon pack:",e.name),"loader"in e)$y.set(e.name,e.loader);else{if(!("icons"in e))throw y.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');By.set(e.name,e.icons)}}}),"registerIconPacks"),zy=o((async(t,e)=>{const n=my(t,!0,void 0!==e);if(!n)throw new Error(`Invalid icon name: ${t}`);const r=n.prefix||e;if(!r)throw new Error(`Icon name must contain a prefix: ${t}`);let i=By.get(r);if(!i){const t=$y.get(r);if(!t)throw new Error(`Icon set not found: ${n.prefix}`);try{i={...await t(),prefix:r},By.set(r,i)}catch(t){throw y.error(t),new Error(`Failed to load icon set: ${n.prefix}`)}}const a=ky(i,n.name);if(!a)throw new Error(`Icon not found: ${t}`);return a}),"getRegisteredIconData"),Uy=o((async(t,e)=>{let n;try{n=await zy(t,e?.fallbackPrefix)}catch(t){y.error(t),n=Py}const r=Ny(n,e);return Oy(Dy(r.body),r.attributes)}),"getIconSVG"),Gy=l({"../../node_modules/.pnpm/@braintree+sanitize-url@7.1.0/node_modules/@braintree/sanitize-url/dist/constants.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}}),qy=l({"../../node_modules/.pnpm/@braintree+sanitize-url@7.1.0/node_modules/@braintree/sanitize-url/dist/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var e=Gy();function n(t){return e.relativeFirstCharacters.indexOf(t[0])>-1}function r(t){return t.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))}function i(t){return URL.canParse(t)}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}function s(t){if(!t)return e.BLANK_URL;var s,o=a(t.trim());do{s=(o=a(o=r(o).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim())).match(e.ctrlCharactersRegex)||o.match(e.htmlEntitiesRegex)||o.match(e.htmlCtrlEntityRegex)||o.match(e.whitespaceEscapeCharsRegex)}while(s&&s.length>0);var l=o;if(!l)return e.BLANK_URL;if(n(l))return l;var c=l.trimStart(),h=c.match(e.urlSchemeRegex);if(!h)return l;var u=h[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(u))return e.BLANK_URL;var d=c.replace(/\\/g,"/");if("mailto:"===u||u.includes("://"))return d;if("http:"===u||"https:"===u){if(!i(d))return e.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d}o(n,"isRelativeUrlWithoutProtocol"),o(r,"decodeHtmlCharacters"),o(i,"isValidUrl"),o(a,"decodeURI"),o(s,"sanitizeUrl"),t.sanitizeUrl=s}}),jy="object"==typeof global&&global&&global.Object===Object&&global,Yy="object"==typeof self&&self&&self.Object===Object&&self,Wy=jy||Yy||Function("return this")(),Hy=Wy.Symbol,Vy=Object.prototype,Xy=Vy.hasOwnProperty,Ky=Vy.toString,Zy=Hy?Hy.toStringTag:void 0;function Qy(t){var e=Xy.call(t,Zy),n=t[Zy];try{t[Zy]=void 0;var r=!0}catch(t){}var i=Ky.call(t);return r&&(e?t[Zy]=n:delete t[Zy]),i}o(Qy,"getRawTag");var Jy=Qy,tv=Object.prototype.toString;function ev(t){return tv.call(t)}o(ev,"objectToString");var nv=ev,rv=Hy?Hy.toStringTag:void 0;function iv(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":rv&&rv in Object(t)?Jy(t):nv(t)}o(iv,"baseGetTag");var av=iv;function sv(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}o(sv,"isObject");var ov=sv;function lv(t){if(!ov(t))return!1;var e=av(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}o(lv,"isFunction");var cv,hv=lv,uv=Wy["__core-js_shared__"],dv=(cv=/[^.]+$/.exec(uv&&uv.keys&&uv.keys.IE_PROTO||""))?"Symbol(src)_1."+cv:"";function pv(t){return!!dv&&dv in t}o(pv,"isMasked");var gv=pv,fv=Function.prototype.toString;function mv(t){if(null!=t){try{return fv.call(t)}catch(t){}try{return t+""}catch(t){}}return""}o(mv,"toSource");var yv=mv,vv=/^\[object .+?Constructor\]$/,xv=Function.prototype,bv=Object.prototype,wv=xv.toString,kv=bv.hasOwnProperty,Tv=RegExp("^"+wv.call(kv).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _v(t){return!(!ov(t)||gv(t))&&(hv(t)?Tv:vv).test(yv(t))}o(_v,"baseIsNative");var Ev=_v;function Cv(t,e){return null==t?void 0:t[e]}o(Cv,"getValue");var Sv=Cv;function Av(t,e){var n=Sv(t,e);return Ev(n)?n:void 0}o(Av,"getNative");var Lv=Av,Nv=Lv(Object,"create");function Iv(){this.__data__=Nv?Nv(null):{},this.size=0}o(Iv,"hashClear");var Mv=Iv;function Rv(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}o(Rv,"hashDelete");var Dv=Rv,Ov=Object.prototype.hasOwnProperty;function Pv(t){var e=this.__data__;if(Nv){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Ov.call(e,t)?e[t]:void 0}o(Pv,"hashGet");var Bv=Pv,$v=Object.prototype.hasOwnProperty;function Fv(t){var e=this.__data__;return Nv?void 0!==e[t]:$v.call(e,t)}o(Fv,"hashHas");var zv=Fv;function Uv(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Nv&&void 0===e?"__lodash_hash_undefined__":e,this}o(Uv,"hashSet");var Gv=Uv;function qv(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1}o(nx,"listCacheHas");var rx=nx;function ix(t,e){var n=this.__data__,r=Kv(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}o(ix,"listCacheSet");var ax=ix;function sx(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}o(Ab,"isLength");var Lb=Ab;function Nb(t){return null!=t&&Lb(t.length)&&!hv(t)}o(Nb,"isArrayLike");var Ib=Nb;function Mb(t){return xb(t)&&Ib(t)}o(Mb,"isArrayLikeObject");var Rb=Mb;function Db(){return!1}o(Db,"stubFalse");var Ob=Db,Pb="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bb=Pb&&"object"==typeof module&&module&&!module.nodeType&&module,$b=Bb&&Bb.exports===Pb?Wy.Buffer:void 0,Fb=($b?$b.isBuffer:void 0)||Ob,zb=Function.prototype,Ub=Object.prototype,Gb=zb.toString,qb=Ub.hasOwnProperty,jb=Gb.call(Object);function Yb(t){if(!xb(t)||"[object Object]"!=av(t))return!1;var e=db(t);if(null===e)return!0;var n=qb.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Gb.call(n)==jb}o(Yb,"isPlainObject");var Wb=Yb,Hb={};function Vb(t){return xb(t)&&Lb(t.length)&&!!Hb[av(t)]}Hb["[object Float32Array]"]=Hb["[object Float64Array]"]=Hb["[object Int8Array]"]=Hb["[object Int16Array]"]=Hb["[object Int32Array]"]=Hb["[object Uint8Array]"]=Hb["[object Uint8ClampedArray]"]=Hb["[object Uint16Array]"]=Hb["[object Uint32Array]"]=!0,Hb["[object Arguments]"]=Hb["[object Array]"]=Hb["[object ArrayBuffer]"]=Hb["[object Boolean]"]=Hb["[object DataView]"]=Hb["[object Date]"]=Hb["[object Error]"]=Hb["[object Function]"]=Hb["[object Map]"]=Hb["[object Number]"]=Hb["[object Object]"]=Hb["[object RegExp]"]=Hb["[object Set]"]=Hb["[object String]"]=Hb["[object WeakMap]"]=!1,o(Vb,"baseIsTypedArray");var Xb=Vb;function Kb(t){return function(e){return t(e)}}o(Kb,"baseUnary");var Zb=Kb,Qb="object"==typeof exports&&exports&&!exports.nodeType&&exports,Jb=Qb&&"object"==typeof module&&module&&!module.nodeType&&module,tw=Jb&&Jb.exports===Qb&&jy.process,ew=function(){try{var t=Jb&&Jb.require&&Jb.require("util").types;return t||tw&&tw.binding&&tw.binding("util")}catch(t){}}(),nw=ew&&ew.isTypedArray,rw=nw?Zb(nw):Xb;function iw(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}o(iw,"safeGet");var aw=iw,sw=Object.prototype.hasOwnProperty;function ow(t,e,n){var r=t[e];sw.call(t,e)&&Vv(r,n)&&(void 0!==n||e in t)||qx(t,e,n)}o(ow,"assignValue");var lw=ow;function cw(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a-1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}o(Gw,"shortOut");var qw=Gw(zw);function jw(t,e){return qw($w(t,e,Rw),t+"")}o(jw,"baseRest");var Yw=jw;function Ww(t,e,n){if(!ov(n))return!1;var r=typeof e;return!!("number"==r?Ib(n)&&fw(e,n.length):"string"==r&&e in n)&&Vv(n[e],t)}o(Ww,"isIterateeCall");var Hw=Ww;function Vw(t){return Yw((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,s&&Hw(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++rt.args));Nt(t),r=N(r,[...t])}else r=n.args;if(!r)return;let i=E(t,e);const a="config";return void 0!==r[a]&&("flowchart-v2"===i&&(i="flowchart"),r[i]=r[a],delete r[a]),r}),"detectInit"),nk=o((function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${tk.source})(?=[}][%]{2}).*\n`,"ig");let r;t=t.trim().replace(n,"").replace(/'/gm,'"'),y.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const i=[];for(;null!==(r=w.exec(t));)if(r.index===w.lastIndex&&w.lastIndex++,r&&!e||e&&r[1]?.match(e)||e&&r[2]?.match(e)){const t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:t,args:e})}return 0===i.length?{type:t,args:null}:1===i.length?i[0]:i}catch(n){return y.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),rk=o((function(t){return t.replace(w,"")}),"removeDirectives"),ik=o((function(t,e){for(const[n,r]of e.entries())if(r.match(t))return n;return-1}),"isSubstringInArray");function ak(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Jw[n]??e}function sk(t,e){const n=t.trim();if(n)return"loose"!==e.securityLevel?(0,Qw.sanitizeUrl)(n):n}o(ak,"interpolateToCurve"),o(sk,"formatUrl");var ok=o(((t,...e)=>{const n=t.split("."),r=n.length-1,i=n[r];let a=window;for(let e=0;e{n+=lk(t,e),e=t}));return dk(t,n/2)}function hk(t){return 1===t.length?t[0]:ck(t)}o(lk,"distance"),o(ck,"traverseEdge"),o(hk,"calcLabelPosition");var uk=o(((t,e=2)=>{const n=Math.pow(10,e);return Math.round(t*n)/n}),"roundNumber"),dk=o(((t,e)=>{let n,r=e;for(const e of t){if(n){const t=lk(e,n);if(t=1)return{x:e.x,y:e.y};if(i>0&&i<1)return{x:uk((1-i)*n.x+i*e.x,5),y:uk((1-i)*n.y+i*e.y,5)}}}n=e}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),pk=o(((t,e,n)=>{y.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());const r=dk(e,25),i=t?10:5,a=Math.atan2(e[0].y-r.y,e[0].x-r.x),s={x:0,y:0};return s.x=Math.sin(a)*i+(e[0].x+r.x)/2,s.y=-Math.cos(a)*i+(e[0].y+r.y)/2,s}),"calcCardinalityPosition");function gk(t,e,n){const r=structuredClone(n);y.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse();const i=dk(r,25+t),a=10+.5*t,s=Math.atan2(r[0].y-i.y,r[0].x-i.x),o={x:0,y:0};return"start_left"===e?(o.x=Math.sin(s+Math.PI)*a+(r[0].x+i.x)/2,o.y=-Math.cos(s+Math.PI)*a+(r[0].y+i.y)/2):"end_right"===e?(o.x=Math.sin(s-Math.PI)*a+(r[0].x+i.x)/2-5,o.y=-Math.cos(s-Math.PI)*a+(r[0].y+i.y)/2-5):"end_left"===e?(o.x=Math.sin(s)*a+(r[0].x+i.x)/2-5,o.y=-Math.cos(s)*a+(r[0].y+i.y)/2-5):(o.x=Math.sin(s)*a+(r[0].x+i.x)/2,o.y=-Math.cos(s)*a+(r[0].y+i.y)/2),o}function fk(t){let e="",n="";for(const r of t)void 0!==r&&(r.startsWith("color:")||r.startsWith("text-align:")?n=n+r+";":e=e+r+";");return{style:e,labelStyle:n}}o(gk,"calcTerminalLabelPosition"),o(fk,"getStylesFromArray");var mk=0,yk=o((()=>(mk++,"id-"+Math.random().toString(36).substr(2,12)+"-"+mk)),"generateId");function vk(t){let e="";const n="0123456789abcdef",r=n.length;for(let i=0;ivk(t.length)),"random"),bk=o((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"),wk=o((function(t,e){const n=e.text.replace(Sn.lineBreakRegex," "),[,r]=Mk(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",r),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(n),i}),"drawSimpleText"),kk=Cx(((t,e,n)=>{if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},n),Sn.lineBreakRegex.test(t))return t;const r=t.split(" ").filter(Boolean),i=[];let a="";return r.forEach(((t,s)=>{const o=Ek(`${t} `,n),l=Ek(a,n);if(o>e){const{hyphenatedStrings:r,remainingWord:s}=Tk(t,e,"-",n);i.push(a,...r),a=s}else l+o>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");s+1===r.length&&i.push(a)})),i.filter((t=>""!==t)).join(n.joinWith)}),((t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`)),Tk=Cx(((t,e,n="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const i=[...t],a=[];let s="";return i.forEach(((t,o)=>{const l=`${s}${t}`;if(Ek(l,r)>=e){const t=o+1,e=i.length===t,r=`${l}${n}`;a.push(e?l:r),s=""}else s=l})),{hyphenatedStrings:a,remainingWord:s}}),((t,e,n="-",r)=>`${t}${e}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`));function _k(t,e){return Sk(t,e).height}function Ek(t,e){return Sk(t,e).width}o(_k,"calculateTextHeight"),o(Ek,"calculateTextWidth");var Ck,Sk=Cx(((t,e)=>{const{fontSize:n=12,fontFamily:r="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};const[,a]=Mk(n),s=["sans-serif",r],o=t.split(Sn.lineBreakRegex),l=[],c=Fa("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const t of s){let e=0;const n={width:0,height:0,lineHeight:0};for(const r of o){const s=bk();s.text=r||"​";const o=wk(h,s).style("font-size",a).style("font-weight",i).style("font-family",t),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");n.width=Math.round(Math.max(n.width,l.width)),e=Math.round(l.height),n.height+=e,n.lineHeight=Math.round(Math.max(n.lineHeight,e))}l.push(n)}h.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),Ak=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{o(this,"InitIDGenerator")}},Lk=o((function(t){return Ck=Ck||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ck.innerHTML=t,unescape(Ck.textContent)}),"entityDecode");function Nk(t){return"str"in t}o(Nk,"isDetailedError");var Ik=o(((t,e,n,r)=>{if(!r)return;const i=t.node()?.getBBox();i&&t.append("text").text(r).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-n).attr("class",e)}),"insertTitle"),Mk=o((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function Rk(t,e){return Zw({},t,e)}o(Rk,"cleanAndMerge");var Dk={assignWithDepth:N,wrapLabel:kk,calculateTextHeight:_k,calculateTextWidth:Ek,calculateTextDimensions:Sk,cleanAndMerge:Rk,detectInit:ek,detectDirective:nk,isSubstringInArray:ik,interpolateToCurve:ak,calcLabelPosition:hk,calcCardinalityPosition:pk,calcTerminalLabelPosition:gk,formatUrl:sk,getStylesFromArray:fk,generateId:yk,random:xk,runFunc:ok,entityDecode:Lk,insertTitle:Ik,parseFontSize:Mk,InitIDGenerator:Ak},Ok=o((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),Pk=o((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Bk=o(((t,e,{counter:n=0,prefix:r,suffix:i})=>`${r?`${r}_`:""}${t}_${e}_${n}${i?`_${i}`:""}`),"getEdgeId");function $k(t){return t??null}function Fk(t){for(var e=[],n=1;n"']/,jk=new RegExp(qk.source,"g"),Yk=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Wk=new RegExp(Yk.source,"g"),Hk={"&":"&","<":"<",">":">",'"':""","'":"'"},Vk=o((t=>Hk[t]),"getEscapeReplacement");function Xk(t,e){if(e){if(qk.test(t))return t.replace(jk,Vk)}else if(Yk.test(t))return t.replace(Wk,Vk);return t}o(Xk,"escape$1");var Kk=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Zk(t){return t.replace(Kk,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}o(Zk,"unescape");var Qk=/(^|[^\[])\^/g;function Jk(t,e){let n="string"==typeof t?t:t.source;e=e||"";const r={replace:o(((t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(Qk,"$1"),n=n.replace(t,i),r}),"replace"),getRegex:o((()=>new RegExp(n,e)),"getRegex")};return r}function tT(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}o(Jk,"edit"),o(tT,"cleanUrl");var eT={exec:o((()=>null),"exec")};function nT(t,e){const n=t.replace(/\|/g,((t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length{const e=t.match(/^\s+/);if(null===e)return t;const[n]=e;return n.length>=r.length?t.slice(r.length):t})).join("\n")}o(nT,"splitCells"),o(rT,"rtrim"),o(iT,"findClosingBracket"),o(aT,"outputLink"),o(sT,"indentCodeCompensation");var oT=class{static{o(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||Uk}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:rT(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=sT(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=rT(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:rT(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=rT(e[0],"\n").split("\n"),n="",r="";const i=[];for(;t.length>0;){let e=!1;const a=[];let s;for(s=0;s/.test(t[s]))a.push(t[s]),e=!0;else{if(e)break;a.push(t[s])}t=t.slice(s);const o=a.join("\n"),l=o.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${o}`:o,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;const h=i[i.length-1];if("code"===h?.type)break;if("blockquote"===h?.type){const e=h,a=e.raw+"\n"+t.join("\n"),s=this.blockquote(a);i[i.length-1]=s,n=n.substring(0,n.length-e.raw.length)+s.raw,r=r.substring(0,r.length-e.text.length)+s.text;break}if("list"!==h?.type);else{const e=h,a=e.raw+"\n"+t.join("\n"),s=this.list(a);i[i.length-1]=s,n=n.substring(0,n.length-h.raw.length)+s.raw,r=r.substring(0,r.length-e.raw.length)+s.raw,t=a.substring(i[i.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let s=!1;for(;t;){let n=!1,r="",o="";if(!(e=a.exec(t)))break;if(this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,o=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(/[^ ]/),u=u>4?1:u,o=l.slice(u),u+=e[1].length),h&&/^ *$/.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){const e=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;t;){const s=t.split("\n",1)[0];if(c=s,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(c))break;if(a.test(c))break;if(e.test(c))break;if(n.test(t))break;if(c.search(/[^ ]/)>=u||!c.trim())o+="\n"+c.slice(u);else{if(h)break;if(l.search(/[^ ]/)>=4)break;if(i.test(l))break;if(a.test(l))break;if(n.test(l))break;o+="\n"+c}h||c.trim()||(h=!0),r+=s+"\n",t=t.substring(s.length+1),l=c.slice(u)}}i.loose||(s?i.loose=!0:/\n *\n *$/.test(r)&&(s=!0));let d,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(o),p&&(d="[ ] "!==p[0],o=o.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:r,task:!!p,checked:d,loose:!1,text:o,tokens:[]}),i.raw+=r}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t"space"===t.type)),n=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));i.loose=n}if(i.loose)for(let t=0;t$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const n=nT(e[1]),r=e[2].replace(/^\||\| *$/g,"").split("|"),i=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const t of r)/^ *-+: *$/.test(t)?a.align.push("right"):/^ *:-+: *$/.test(t)?a.align.push("center"):/^ *:-+ *$/.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]}))));return a}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:Xk(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;const e=rT(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=iT(e[2],"()");if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^$/.test(t)?n.slice(1):n.slice(1,-1)),aT(e,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const t=e[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return aT(n,t,n[0],this.lexer)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let i,a,s=n,o=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(r=l.exec(e));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){s+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){o+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+o);const e=[...r[0]][0].length,l=t.slice(0,n+r.index+e+a);if(Math.min(n,a)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const n=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return n&&r&&(t=t.substring(1,t.length-1)),t=Xk(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=Xk(e[1]),n="mailto:"+t):(t=Xk(e[1]),n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=Xk(e[0]),n="mailto:"+t;else{let r;do{r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(r!==e[0]);t=Xk(e[0]),n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:Xk(e[0]),{type:"text",raw:e[0],text:t}}}},lT=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cT=/(?:[*+-]|\d{1,9}[.)])/,hT=Jk(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,cT).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),uT=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,dT=/(?!\s*\])(?:\\.|[^\[\]\\])+/,pT=Jk(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",dT).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gT=Jk(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,cT).getRegex(),fT="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",mT=/|$))/,yT=Jk("^ {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",mT).replace("tag",fT).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vT=Jk(uT).replace("hr",lT).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",fT).getRegex(),xT={blockquote:Jk(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vT).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:pT,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:lT,html:yT,lheading:hT,list:gT,newline:/^(?: *(?:\n|$))+/,paragraph:vT,table:eT,text:/^[^\n]+/},bT=Jk("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",lT).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",fT).getRegex(),wT={...xT,table:bT,paragraph:Jk(uT).replace("hr",lT).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bT).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",fT).getRegex()},kT={...xT,html:Jk("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",mT).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:eT,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jk(uT).replace("hr",lT).replace("heading"," *#{1,6} *[^\n]").replace("lheading",hT).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},TT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,_T=/^( {2,}|\\)\n(?!\s*$)/,ET="\\p{P}\\p{S}",CT=Jk(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ET).getRegex(),ST=Jk(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ET).getRegex(),AT=Jk("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ET).getRegex(),LT=Jk("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ET).getRegex(),NT=Jk(/\\([punct])/,"gu").replace(/punct/g,ET).getRegex(),IT=Jk(/^<(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(),MT=Jk(mT).replace("(?:--\x3e|$)","--\x3e").getRegex(),RT=Jk("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",MT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),DT=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,OT=Jk(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",DT).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),PT=Jk(/^!?\[(label)\]\[(ref)\]/).replace("label",DT).replace("ref",dT).getRegex(),BT=Jk(/^!?\[(ref)\](?:\[\])?/).replace("ref",dT).getRegex(),$T={_backpedal:eT,anyPunctuation:NT,autolink:IT,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:_T,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:eT,emStrongLDelim:ST,emStrongRDelimAst:AT,emStrongRDelimUnd:LT,escape:TT,link:OT,nolink:BT,punctuation:CT,reflink:PT,reflinkSearch:Jk("reflink|nolink(?!\\()","g").replace("reflink",PT).replace("nolink",BT).getRegex(),tag:RT,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\e+" ".repeat(n.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.space(t))t=t.substring(r.raw.length),1===r.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(r);else if(r=this.tokenizer.code(t))t=t.substring(r.raw.length),i=e[e.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?e.push(r):(i.raw+="\n"+r.raw,i.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(r=this.tokenizer.fences(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.heading(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.hr(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.blockquote(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.list(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.html(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.def(t))t=t.substring(r.raw.length),i=e[e.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(i.raw+="\n"+r.raw,i.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(r=this.tokenizer.table(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.lheading(t))t=t.substring(r.raw.length),e.push(r);else{if(a=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(a=t.substring(0,e+1))}if(this.state.top&&(r=this.tokenizer.paragraph(a)))i=e[e.length-1],n&&"paragraph"===i?.type?(i.raw+="\n"+r.raw,i.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(r),n=a.length!==t.length,t=t.substring(r.raw.length);else if(r=this.tokenizer.text(t))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===i.type?(i.raw+="\n"+r.raw,i.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,r,i,a,s,o,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(s||(o=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.escape(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.tag(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.link(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.emStrong(t,l,o))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.codespan(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.br(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.del(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.autolink(t))t=t.substring(n.raw.length),e.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(t))){if(i=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(n=this.tokenizer.inlineText(i))t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),s=!0,r=e[e.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(n.raw.length),e.push(n);return e}},YT=class{static{o(this,"_Renderer")}options;parser;constructor(t){this.options=t||Uk}space(t){return""}code({text:t,lang:e,escaped:n}){const r=(e||"").match(/^\S*/)?.[0],i=t.replace(/\n$/,"")+"\n";return r?'
'+(n?i:Xk(i,!0))+"
\n":"
"+(n?i:Xk(i,!0))+"
\n"}blockquote({tokens:t}){return`
\n${this.parser.parse(t)}
\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
\n"}list(t){const e=t.ordered,n=t.start;let r="";for(let e=0;e\n"+r+"\n"}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",n="";for(let e=0;e${r}`),"\n\n"+e+"\n"+r+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:n}){const r=this.parser.parseInline(n),i=tT(t);if(null===i)return r;let a='
    ",a}image({href:t,title:e,text:n}){const r=tT(t);if(null===r)return n;let i=`${n}{const i=t[r].flat(1/0);n=n.concat(this.walkTokens(i,e))})):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){const e=this.defaults.renderer||new YT(this.defaults);for(const n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n;let i=t.renderer[r];t.useNewRenderer||(i=this.#e(i,r,e));const a=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new oT(this.defaults);for(const n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=t.tokenizer[r],a=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new VT;for(const n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,i=t.hooks[r],a=e[r];VT.passThroughHooks.has(n)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>a.call(e,t)));const n=i.call(e,t);return a.call(e,n)}:e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,r=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(r.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}})),this}#e(t,e,n){switch(e){case"heading":return function(r){return r.type&&r.type===e?t.call(this,n.parser.parseInline(r.tokens),r.depth,Zk(n.parser.parseInline(r.tokens,n.parser.textRenderer))):t.apply(this,arguments)};case"code":return function(n){return n.type&&n.type===e?t.call(this,n.text,n.lang,!!n.escaped):t.apply(this,arguments)};case"table":return function(n){if(!n.type||n.type!==e)return t.apply(this,arguments);let r="",i="";for(let t=0;t0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):o+=t+" "}o+=this.parser.parse(e.tokens,a),s+=this.listitem({type:"list_item",raw:o,text:o,task:i,checked:!!r,loose:a,tokens:e.tokens})}return t.call(this,s,r,i)};case"html":return function(n){return n.type&&n.type===e?t.call(this,n.text,n.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(n){return n.type&&n.type===e?t.call(this,this.parser.parseInline(n.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(n){return n.type&&n.type===e?t.call(this,n.text):t.apply(this,arguments)};case"link":return function(n){return n.type&&n.type===e?t.call(this,n.href,n.title,this.parser.parseInline(n.tokens)):t.apply(this,arguments)};case"image":return function(n){return n.type&&n.type===e?t.call(this,n.href,n.title,n.text):t.apply(this,arguments)}}return t}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return jT.lex(t,e??this.defaults)}parser(t,e){return HT.parse(t,e??this.defaults)}#t(t,e){return(n,r)=>{const i={...r},a={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);const s=this.#n(!!a.silent,!!a.async);if(null==n)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then((e=>t(e,a))).then((t=>a.hooks?a.hooks.processAllTokens(t):t)).then((t=>a.walkTokens?Promise.all(this.walkTokens(t,a.walkTokens)).then((()=>t)):t)).then((t=>e(t,a))).then((t=>a.hooks?a.hooks.postprocess(t):t)).catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let r=t(n,a);a.hooks&&(r=a.hooks.processAllTokens(r)),a.walkTokens&&this.walkTokens(r,a.walkTokens);let i=e(r,a);return a.hooks&&(i=a.hooks.postprocess(i)),i}catch(t){return s(t)}}}#n(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="

    An error occurred:

    "+Xk(n.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}},KT=new XT;function ZT(t,e){return KT.parse(t,e)}function QT(t,{markdownAutoWrap:e}){const n=Fk(t.replace(//g,"\n").replace(/\n{2,}/g,"\n"));return!1===e?n.replace(/ /g," "):n}function JT(t,e={}){const n=QT(t,e),r=ZT.lexer(n),i=[[]];let a=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach(((t,n)=>{0!==n&&(a++,i.push([])),t.split(" ").forEach((t=>{(t=t.replace(/'/g,"'"))&&i[a].push({content:t,type:e})}))}))}else"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{s(e,t.type)})):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}return o(s,"processNode"),r.forEach((t=>{"paragraph"===t.type?t.tokens?.forEach((t=>{s(t)})):"html"===t.type&&i[a].push({content:t.text,type:"normal"})})),i}function t_(t,{markdownAutoWrap:e}={}){const n=ZT.lexer(t);function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(r).join("")}`:"em"===t.type?`${t.tokens?.map(r).join("")}`:"paragraph"===t.type?`

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

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:`Unsupported markdown: ${t.type}`}return o(r,"output"),n.map(r).join("")}function e_(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function n_(t,e){return r_(t,[],e_(e.content),e.type)}function r_(t,e,n,r){if(0===n.length)return[{content:e.join(""),type:r},{content:"",type:r}];const[i,...a]=n,s=[...e,i];return t([{content:s.join(""),type:r}])?r_(t,s,a,r):(0===e.length&&i&&(e.push(i),n.shift()),[{content:e.join(""),type:r},{content:n.join(""),type:r}])}function i_(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return a_(t,e)}function a_(t,e,n=[],r=[]){if(0===t.length)return r.length>0&&n.push(r),n.length>0?n:[];let i="";" "===t[0].content&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...r];if(""!==i&&s.push({content:i,type:"normal"}),s.push(a),e(s))return a_(t,e,n,s);if(r.length>0)n.push(r),t.unshift(a);else if(a.content){const[r,i]=n_(e,a);n.push([r]),i.content&&t.unshift(i)}return a_(t,e,n)}function s_(t,e){e&&t.attr("style",e)}async function o_(t,e,n,r,i=!1){const a=t.append("foreignObject");a.attr("width",10*n+"px"),a.attr("height",10*n+"px");const s=a.append("xhtml:div");let o=e.label;e.label&&_n(e.label)&&(o=await Cn(e.label.replace(Sn.lineBreakRegex,"\n"),Kn()));const l=e.isNode?"nodeLabel":"edgeLabel",c=s.append("span");c.html(o),s_(c,e.labelStyle),c.attr("class",`${l} ${r}`),s_(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",n+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===n&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",n+"px"),h=s.node().getBoundingClientRect()),a.node()}function l_(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}function c_(t,e,n){const r=t.append("text"),i=l_(r,1,e);d_(i,n);const a=i.node().getComputedTextLength();return r.remove(),a}function h_(t,e,n){const r=t.append("text"),i=l_(r,1,e);d_(i,[{content:n,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}function u_(t,e,n,r=!1){const i=e.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1");let l=0;for(const e of n){const n=o((e=>c_(i,1.1,e)<=t),"checkWidth"),r=n(e)?[e]:i_(e,n);for(const t of r){d_(l_(s,l,1.1),t),l++}}if(r){const t=s.node().getBBox(),e=2;return a.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),i.node()}return s.node()}function d_(t,e){t.text(""),e.forEach(((e,n)=>{const r=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===n?r.text(e.content):r.text(" "+e.content)}))}function p_(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>``))}o(ZT,"marked"),ZT.options=ZT.setOptions=function(t){return KT.setOptions(t),ZT.defaults=KT.defaults,Gk(ZT.defaults),ZT},ZT.getDefaults=zk,ZT.defaults=Uk,ZT.use=function(...t){return KT.use(...t),ZT.defaults=KT.defaults,Gk(ZT.defaults),ZT},ZT.walkTokens=function(t,e){return KT.walkTokens(t,e)},ZT.parseInline=KT.parseInline,ZT.Parser=HT,ZT.parser=HT.parse,ZT.Renderer=YT,ZT.TextRenderer=WT,ZT.Lexer=jT,ZT.lexer=jT.lex,ZT.Tokenizer=oT,ZT.Hooks=VT,ZT.parse=ZT,ZT.options,ZT.setOptions,ZT.use,ZT.walkTokens,ZT.parseInline,HT.parse,jT.lex,o(QT,"preprocessMarkdown"),o(JT,"markdownToLines"),o(t_,"markdownToHTML"),o(e_,"splitTextToChars"),o(n_,"splitWordToFitWidth"),o(r_,"splitWordToFitWidthRecursion"),o(i_,"splitLineToFitWidth"),o(a_,"splitLineToFitWidthRecursion"),o(s_,"applyStyle"),o(o_,"addHtmlSpan"),o(l_,"createTspan"),o(c_,"computeWidthOfText"),o(h_,"computeDimensionOfText"),o(u_,"createFormattedText"),o(d_,"updateTextContentAndStyles"),o(p_,"replaceIconSubstring");var g_=o((async(t,e="",{style:n="",isTitle:r=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(y.debug("XYZ createText",e,n,r,i,a,s,"addSvgBackground: ",l),a){const r=t_(e,c),a=p_(Pk(r)),h=e.replace(/\\\\/g,"\\"),u={isNode:s,label:_n(e)?h:a,labelStyle:n.replace("fill:","color:")};return await o_(t,u,o,i,l)}{const r=u_(o,t,JT(e.replace(//g,"
    ").replace("
    ","
    "),c),!!e&&l);if(s){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));const t=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Fa(r).attr("style",t)}else{const t=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Fa(r).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Fa(r).select("text").attr("style",e)}return r}}),"createText"),f_=o((async(t,e,n)=>{let r;const i=e.useHtmlLabels||fn(Kn()?.htmlLabels);r=n||"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",$k(e.labelStyle));let l;l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const c=await g_(s,ln(Pk(l),Kn()),{useHtmlLabels:i,width:e.width||Kn().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let h=c.getBBox();const u=(e?.padding??0)/2;if(i){const t=c.children[0],e=Fa(c),n=t.getElementsByTagName("img");if(n){const t=""===l.replace(/]*>/g,"").trim();await Promise.all([...n].map((e=>new Promise((n=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=Kn().fontSize?Kn().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[r=Lt.fontSize]=Mk(t),i=r*n+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";n(e)}o(r,"setupImage"),setTimeout((()=>{e.complete&&r()})),e.addEventListener("error",r),e.addEventListener("load",r)})))))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return i?s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):s.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:u,label:s}}),"labelHelper"),m_=o((async(t,e,n)=>{const r=n.useHtmlLabels||fn(Kn()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",n.labelStyle||""),a=await g_(i,ln(Pk(e),Kn()),{useHtmlLabels:r,width:n.width||Kn()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img});let s=a.getBBox();const o=n.padding/2;if(fn(Kn()?.flowchart?.htmlLabels)){const t=a.children[0],e=Fa(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}return r?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),n.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}}),"insertLabel"),y_=o(((t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height}),"updateNodeBounds"),v_=o(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function x_(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function b_(t,e,n,r,i,a){const s=[],o=n-t,l=r-e,c=o/a,h=2*Math.PI/c,u=e+l/2;for(let e=0;e<=50;e++){const n=t+e/50*o,r=u+i*Math.sin(h*(n-t));s.push({x:n,y:r})}return s}function w_(t,e,n,r,i,a){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(r-1);for(let i=0;i2&&r.push(t)}const i=[];e=Math.max(e,.1);const a=[];for(const t of r)for(let e=0;et.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!a.length)return i;let s=[],o=a[0].ymin,l=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;eo);e++)t=e;a.splice(0,t+1).forEach((t=>{s.push({s:o,edge:t})}))}if(s=s.filter((t=>!(t.edge.ymax<=o))),s.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||l%e==0)&&s.length>1)for(let t=0;t=s.length)break;const n=s[t].edge,r=s[e].edge;i.push([[Math.round(n.x),o],[Math.round(r.x),o]])}o+=n,s.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),l++}return i}(s,a,r);if(i){for(const t of s)k_(t,o,-i);!function(t,e,n){const r=[];t.forEach((t=>r.push(...t))),k_(r,e,n)}(l,o,-i)}return l}function E_(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(a=i),__(t,i,r,a||1)}o(x_,"createPathFromPoints"),o(b_,"generateFullSineWavePoints"),o(w_,"generateCirclePoints"),o(k_,"t"),o(T_,"e"),o(__,"s"),o(E_,"n");var C_=class{static{o(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const n=E_(t,e);return{type:"fillSketch",ops:this.renderLines(n,e)}}renderLines(t,e){const n=[];for(const r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}};function S_(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}o(S_,"a");var A_=class extends C_{static{o(this,"h")}fillPolygons(t,e){let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);const r=E_(t,Object.assign({},e,{hachureGap:n})),i=Math.PI/180*e.hachureAngle,a=[],s=.5*n*Math.cos(i),o=.5*n*Math.sin(i);for(const[t,e]of r)S_([t,e])&&a.push([[t[0]-s,t[1]+o],[...e]],[[t[0]+s,t[1]-o],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}},L_=class extends C_{static{o(this,"r")}fillPolygons(t,e){const n=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),i=this._fillPolygons(t,r);return n.ops=n.ops.concat(i.ops),n}},N_=class{static{o(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){const n=E_(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(n,e)}dotsOnLines(t,e){const n=[];let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let i=e.fillWeight;i<0&&(i=e.strokeWidth/2);const a=r/4;for(const s of t){const t=S_(s),o=t/r,l=Math.ceil(o)-1,c=t-l*r,h=(s[0][0]+s[1][0])/2-r/4,u=Math.min(s[0][1],s[1][1]);for(let t=0;t{const a=S_(t),s=Math.floor(a/(n+r)),o=(a+r-s*(n+r))/2;let l=t[0],c=t[1];l[0]>c[0]&&(l=t[1],c=t[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let t=0;t{const i=S_(t),a=Math.round(i/(2*e));let s=t[0],o=t[1];s[0]>o[0]&&(s=t[1],o=t[0]);const l=Math.atan((o[1]-s[1])/(o[0]-s[0]));for(let t=0;tr%2?t+n:t+e));a.push({key:"C",data:t}),e=t[4],n=t[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],n=o[3];break;case"q":{const t=o.map(((t,r)=>r%2?t+n:t+e));a.push({key:"Q",data:t}),e=t[2],n=t[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],n=o[6];break;case"a":e+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,n]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],n=o[3];break;case"s":{const t=o.map(((t,r)=>r%2?t+n:t+e));a.push({key:"S",data:t}),e=t[2],n=t[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],n=o[1];break;case"t":e+=o[0],n+=o[1],a.push({key:"T",data:[e,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=r,n=i}return a}function F_(t){const e=[];let n="",r=0,i=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let t=0,a=0;"C"===n||"S"===n?(t=r+(r-o),a=i+(i-l)):(t=r,a=i),e.push({key:"C",data:[t,a,...h]}),o=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[t,a]=h;let s=0,c=0;"Q"===n||"T"===n?(s=r+(r-o),c=i+(i-l)):(s=r,c=i);const u=r+2*(s-r)/3,d=i+2*(c-i)/3,p=t+2*(s-t)/3,g=a+2*(c-a)/3;e.push({key:"C",data:[u,d,p,g,t,a]}),o=s,l=c,r=t,i=a;break}case"Q":{const[t,n,a,s]=h,c=r+2*(t-r)/3,u=i+2*(n-i)/3,d=a+2*(t-a)/3,p=s+2*(n-s)/3;e.push({key:"C",data:[c,u,d,p,a,s]}),o=t,l=n,r=a,i=s;break}case"A":{const t=Math.abs(h[0]),n=Math.abs(h[1]),a=h[2],s=h[3],o=h[4],l=h[5],c=h[6];0===t||0===n?(e.push({key:"C",data:[r,i,l,c,l,c]}),r=l,i=c):r===l&&i===c||(U_(r,i,l,c,t,n,a,s,o).forEach((function(t){e.push({key:"C",data:t})})),r=l,i=c);break}case"Z":e.push({key:"Z",data:[]}),r=a,i=s}n=c}return e}function z_(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function U_(t,e,n,r,i,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let d=[],p=0,g=0,f=0,m=0;if(c)[p,g,f,m]=c;else{[t,e]=z_(t,e,-h),[n,r]=z_(n,r,-h);const s=(t-n)/2,c=(e-r)/2;let u=s*s/(i*i)+c*c/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const d=i*i,y=a*a,v=d*y-d*c*c-y*s*s,x=d*c*c+y*s*s,b=(o===l?-1:1)*Math.sqrt(Math.abs(v/x));f=b*i*c/a+(t+n)/2,m=b*-a*s/i+(e+r)/2,p=Math.asin(parseFloat(((e-m)/a).toFixed(9))),g=Math.asin(parseFloat(((r-m)/a).toFixed(9))),tg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let y=g-p;if(Math.abs(y)>120*Math.PI/180){const t=g,e=n,o=r;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=U_(n=f+i*Math.cos(g),r=m+a*Math.sin(g),e,o,i,a,s,0,l,[g,t,f,m])}y=g-p;const v=Math.cos(p),x=Math.sin(p),b=Math.cos(g),w=Math.sin(g),k=Math.tan(y/4),T=4/3*i*k,_=4/3*a*k,E=[t,e],C=[t+T*x,e-_*v],S=[n+T*w,r-_*b],A=[n,r];if(C[0]=2*E[0]-C[0],C[1]=2*E[1]-C[1],c)return[C,S,A].concat(d);{d=[C,S,A].concat(d);const t=[];for(let e=0;e2){const i=[];for(let e=0;e2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(g-p)/2),y=lE(m,c,h,u,d,p,g,1,l);if(!l.disableMultiStroke){const t=lE(m,c,h,u,d,p,g,1.5,l);y.push(...t)}return s&&(o?y.push(...rE(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...rE(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function K_(t,e){const n=F_($_(B_(t))),r=[];let i=[0,0],a=[0,0];for(const{key:t,data:s}of n)switch(t){case"M":a=[s[0],s[1]],i=[s[0],s[1]];break;case"L":r.push(...rE(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,n,i,o,l,c]=s;r.push(...cE(t,n,i,o,l,c,a,e)),a=[l,c];break}case"Z":r.push(...rE(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:r}}function Z_(t,e){const n=[];for(const r of t)if(r.length){const t=e.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:"move",data:[r[0][0]+nE(t,e),r[0][1]+nE(t,e)]});for(let a=1;a500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>l&&(u=c/10);const d=u/2,p=.2+.2*tE(i);let g=i.bowing*i.maxRandomnessOffset*(r-e)/200,f=i.bowing*i.maxRandomnessOffset*(t-n)/200;g=nE(g,i,h),f=nE(f,i,h);const m=[],y=o((()=>nE(d,i,h)),"M"),v=o((()=>nE(u,i,h)),"k"),x=i.preserveVertices;return a&&(s?m.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):m.push({op:"move",data:[t+(x?0:nE(u,i,h)),e+(x?0:nE(u,i,h))]})),s?m.push({op:"bcurveTo",data:[g+t+(n-t)*p+y(),f+e+(r-e)*p+y(),g+t+2*(n-t)*p+y(),f+e+2*(r-e)*p+y(),n+(x?0:y()),r+(x?0:y())]}):m.push({op:"bcurveTo",data:[g+t+(n-t)*p+v(),f+e+(r-e)*p+v(),g+t+2*(n-t)*p+v(),f+e+2*(r-e)*p+v(),n+(x?0:v()),r+(x?0:v())]}),m}function aE(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+nE(e,n),t[0][1]+nE(e,n)]),r.push([t[0][0]+nE(e,n),t[0][1]+nE(e,n)]);for(let i=1;i3){const a=[],s=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&i.push(n)):i.push(n),i.push(t[e+3])}else{const r=.5,a=t[e+0],s=t[e+1],o=t[e+2],l=t[e+3],c=gE(a,s,r),h=gE(s,o,r),u=gE(o,l,r),d=gE(c,h,r),p=gE(h,u,r),g=gE(d,p,r);fE([a,c,d,g],0,n,i),fE([g,p,u,l],0,n,i)}var a,s;return i}function mE(t,e){return yE(t,0,t.length,e)}function yE(t,e,n,r,i){const a=i||[],s=t[e],o=t[n-1];let l=0,c=1;for(let r=e+1;rl&&(l=e,c=r)}return Math.sqrt(l)>r?(yE(t,e,c+1,r,a),yE(t,c,n,r,a)):(a.length||a.push(s),a.push(o)),a}function vE(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let n=0;n0?yE(r,0,r.length,n):r}o(q_,"v"),o(j_,"S"),o(Y_,"O"),o(W_,"L"),o(H_,"T"),o(V_,"D"),o(X_,"A"),o(K_,"_"),o(Z_,"I"),o(Q_,"C"),o(J_,"z"),o(tE,"W"),o(eE,"E"),o(nE,"G"),o(rE,"$"),o(iE,"R"),o(aE,"j"),o(sE,"q"),o(oE,"F"),o(lE,"V"),o(cE,"Z"),o(hE,"Q"),o(uE,"H"),o(dE,"N"),o(pE,"B"),o(gE,"J"),o(fE,"K"),o(mE,"U"),o(yE,"X"),o(vE,"Y");var xE="none",bE=class{static{o(this,"et")}constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,n){return{shape:t,sets:e||[],options:n||this.defaultOptions}}line(t,e,n,r,i){const a=this._o(i);return this._d("line",[q_(t,e,n,r,a)],a)}rectangle(t,e,n,r,i){const a=this._o(i),s=[],o=Y_(t,e,n,r,a);if(a.fill){const i=[[t,e],[t+n,e],[t+n,e+r],[t,e+r]];"solid"===a.fillStyle?s.push(Z_([i],a)):s.push(Q_([i],a))}return a.stroke!==xE&&s.push(o),this._d("rectangle",s,a)}ellipse(t,e,n,r,i){const a=this._o(i),s=[],o=H_(n,r,a),l=V_(t,e,a,o);if(a.fill)if("solid"===a.fillStyle){const n=V_(t,e,a,o).opset;n.type="fillPath",s.push(n)}else s.push(Q_([l.estimatedPoints],a));return a.stroke!==xE&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,n,r){const i=this.ellipse(t,e,n,n,r);return i.shape="circle",i}linearPath(t,e){const n=this._o(e);return this._d("linearPath",[j_(t,!1,n)],n)}arc(t,e,n,r,i,a,s=!1,o){const l=this._o(o),c=[],h=X_(t,e,n,r,i,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const o=X_(t,e,n,r,i,a,!0,!1,s);o.type="fillPath",c.push(o)}else c.push(function(t,e,n,r,i,a,s){const o=t,l=e;let c=Math.abs(n/2),h=Math.abs(r/2);c+=nE(.01*c,s),h+=nE(.01*h,s);let u=i,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/s.curveStepCount,g=[];for(let t=u;t<=d;t+=p)g.push([o+c*Math.cos(t),l+h*Math.sin(t)]);return g.push([o+c*Math.cos(d),l+h*Math.sin(d)]),g.push([o,l]),Q_([g],s)}(t,e,n,r,i,a,l));return l.stroke!==xE&&c.push(h),this._d("arc",c,l)}curve(t,e){const n=this._o(e),r=[],i=W_(t,n);if(n.fill&&n.fill!==xE)if("solid"===n.fillStyle){const e=W_(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],i=t;if(i.length){const t="number"==typeof i[0][0]?[i]:i;for(const r of t)r.length<3?e.push(...r):3===r.length?e.push(...vE(uE([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):e.push(...vE(uE(r),10,(1+n.roughness)/2))}e.length&&r.push(Q_([e],n))}return n.stroke!==xE&&r.push(i),this._d("curve",r,n)}polygon(t,e){const n=this._o(e),r=[],i=j_(t,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(Z_([t],n)):r.push(Q_([t],n))),n.stroke!==xE&&r.push(i),this._d("polygon",r,n)}path(t,e){const n=this._o(e),r=[];if(!t)return this._d("path",r,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=n.fill&&"transparent"!==n.fill&&n.fill!==xE,a=n.stroke!==xE,s=!!(n.simplification&&n.simplification<1),l=function(t,e,n){const r=F_($_(B_(t))),i=[];let a=[],s=[0,0],l=[];const c=o((()=>{l.length>=4&&a.push(...vE(l,1)),l=[]}),"i"),h=o((()=>{c(),a.length&&(i.push(a),a=[])}),"c");for(const{key:t,data:e}of r)switch(t){case"M":h(),s=[e[0],e[1]],a.push(s);break;case"L":c(),a.push([e[0],e[1]]);break;case"C":if(!l.length){const t=a.length?a[a.length-1]:s;l.push([t[0],t[1]])}l.push([e[0],e[1]]),l.push([e[2],e[3]]),l.push([e[4],e[5]]);break;case"Z":c(),a.push([s[0],s[1]])}if(h(),!n)return i;const u=[];for(const t of i){const e=mE(t,n);e.length&&u.push(e)}return u}(t,0,s?4-4*(n.simplification||1):(1+n.roughness)/2),c=K_(t,n);if(i)if("solid"===n.fillStyle)if(1===l.length){const e=K_(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(Z_(l,n));else r.push(Q_(l,n));return a&&(s?l.forEach((t=>{r.push(j_(t,!1,n))})):r.push(c)),this._d("path",r,n)}opsToPath(t,e){let n="";for(const r of t.ops){const t="number"==typeof e&&e>=0?r.data.map((t=>+t.toFixed(e))):r.data;switch(r.op){case"move":n+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":n+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":n+=`L${t[0]} ${t[1]} `}}return n.trim()}toPaths(t){const e=t.sets||[],n=t.options||this.defaultOptions,r=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:xE};break;case"fillPath":e={d:this.opsToPath(t),stroke:xE,strokeWidth:0,fill:n.fill||xE};break;case"fillSketch":e=this.fillSketch(t,n)}e&&r.push(e)}return r}fillSketch(t,e){let n=e.fillWeight;return n<0&&(n=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||xE,strokeWidth:n,fill:xE}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}},wE=class{static{o(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new bE(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),r=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(r,a,i,e),r.restore();break}case"fillSketch":this.fillSketch(r,a,n)}}fillSketch(t,e,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=r,this._drawToContext(t,e,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,n,r="nonzero"){t.beginPath();for(const r of e.ops){const e="number"==typeof n&&n>=0?r.data.map((t=>+t.toFixed(n))):r.data;switch(r.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(r):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,n,r,i){const a=this.gen.line(t,e,n,r,i);return this.draw(a),a}rectangle(t,e,n,r,i){const a=this.gen.rectangle(t,e,n,r,i);return this.draw(a),a}ellipse(t,e,n,r,i){const a=this.gen.ellipse(t,e,n,r,i);return this.draw(a),a}circle(t,e,n,r){const i=this.gen.circle(t,e,n,r);return this.draw(i),i}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n),n}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n),n}arc(t,e,n,r,i,a,s=!1,o){const l=this.gen.arc(t,e,n,r,i,a,s,o);return this.draw(l),l}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n),n}path(t,e){const n=this.gen.path(t,e);return this.draw(n),n}},kE="http://www.w3.org/2000/svg",TE=class{static{o(this,"ot")}constructor(t,e){this.svg=t,this.gen=new bE(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(kE,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=r.createElementNS(kE,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",n.stroke),e.setAttribute("stroke-width",n.strokeWidth+""),e.setAttribute("fill","none"),n.strokeLineDash&&e.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":e=r.createElementNS(kE,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",n.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(r,s,n)}e&&i.appendChild(e)}return i}fillSketch(t,e,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const i=t.createElementNS(kE,"path");return i.setAttribute("d",this.opsToPath(e,n.fixedDecimalPlaceDigits)),i.setAttribute("stroke",n.fill||""),i.setAttribute("stroke-width",r+""),i.setAttribute("fill","none"),n.fillLineDash&&i.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,n,r,i){const a=this.gen.line(t,e,n,r,i);return this.draw(a)}rectangle(t,e,n,r,i){const a=this.gen.rectangle(t,e,n,r,i);return this.draw(a)}ellipse(t,e,n,r,i){const a=this.gen.ellipse(t,e,n,r,i);return this.draw(a)}circle(t,e,n,r){const i=this.gen.circle(t,e,n,r);return this.draw(i)}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n)}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n)}arc(t,e,n,r,i,a,s=!1,o){const l=this.gen.arc(t,e,n,r,i,a,s,o);return this.draw(l)}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n)}path(t,e){const n=this.gen.path(t,e);return this.draw(n)}},_E={canvas:o(((t,e)=>new wE(t,e)),"canvas"),svg:o(((t,e)=>new TE(t,e)),"svg"),generator:o((t=>new bE(t)),"generator"),newSeed:o((()=>bE.newSeed()),"newSeed")},EE=o(((t,e)=>{var n,r,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),n=0===o?0:c*s/o,r=c):(s<0&&(l=-l),n=l,r=0===s?0:l*o/s),{x:i+n,y:a+r}}),"intersectRect"),CE=EE;function SE(t,e){e&&t.attr("style",e)}async function AE(t){const e=Fa(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div");let r=t.label;t.label&&_n(t.label)&&(r=await Cn(t.label.replace(Sn.lineBreakRegex,"\n"),Kn()));const i=t.isNode?"nodeLabel":"edgeLabel";return n.html('"+r+""),SE(n,t.labelStyle),n.style("display","inline-block"),n.style("padding-right","1px"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}o(SE,"applyStyle"),o(AE,"addHtmlLabel");var LE=o((async(t,e,n,r)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),fn(Kn().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),y.info("vertexText"+i);const t={isNode:r,label:Pk(i).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e?e.replace("fill:","color:"):e};return await AE(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[];for(const e of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),n?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}}),"createLabel"),NE=LE,IE=o(((t,e,n,r,i)=>["M",t+i,e,"H",t+n-i,"A",i,i,0,0,1,t+n,e+i,"V",e+r-i,"A",i,i,0,0,1,t+n-i,e+r,"H",t+i,"A",i,i,0,0,1,t,e+r-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" ")),"createRoundedRectPathD"),ME=o((t=>{const{handDrawnSeed:e}=Kn();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),RE=o((t=>{const e=DE([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),DE=o((t=>{const e=new Map;return t.forEach((t=>{const[n,r]=t.split(":");e.set(n.trim(),r?.trim())})),e}),"styles2Map"),OE=o((t=>{const{stylesArray:e}=RE(t),n=[],r=[],i=[],a=[];return e.forEach((t=>{const e=t[0];"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e?n.push(t.join(":")+" !important"):(r.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))})),{labelStyles:n.join(";"),nodeStyles:r.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}}),"styles2String"),PE=o(((t,e)=>{const{themeVariables:n,handDrawnSeed:r}=Kn(),{nodeBorder:i,mainBkg:a}=n,{stylesMap:s}=RE(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:r,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),BE=o((async(t,e)=>{y.info("Creating subgraph rect for ",e.id,e);const n=Kn(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:s}=r,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=OE(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=fn(n.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await g_(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0});let f=g.getBBox();if(fn(n.flowchart.htmlLabels)){const t=g.children[0],e=Fa(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const m=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,x=e.x-m/2,b=e.y-v/2;let w;if(y.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=_E.svg(u),n=PE(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),r=t.path(IE(x,b,m,v,0),n);w=u.insert((()=>(y.debug("Rough node insert CXC",r),r)),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",v);const{subGraphTitleTopMargin:k}=ay(n);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+k})`),o){const t=p.select("span");t&&t.attr("style",o)}const T=w.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return CE(e,t)},{cluster:u,labelBBox:f}}),"rect"),$E=o(((t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const s=r.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return CE(e,t)},{cluster:n,labelBBox:{width:0,height:0}}}),"noteGroup"),FE=o((async(t,e)=>{const n=Kn(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=r,c=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const p=u.node().appendChild(await NE(e.label,e.labelStyle,void 0,!0));let g=p.getBBox();if(fn(n.flowchart.htmlLabels)){const t=p.children[0],e=Fa(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,m=f/2,y=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height+f,x=e.height+f-g.height-6,b=e.x-y/2,w=e.y-v/2;e.width=y;const k=e.y-e.height/2-m+g.height+2;let T;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),n=_E.svg(c),r=e.rx||e.ry?n.path(IE(b,w,y,v,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):n.rectangle(b,w,y,v,{seed:i});T=c.insert((()=>r),":first-child");const h=n.rectangle(b,k,y,x,{fill:t?a:s,fillStyle:t?"hachure":"solid",stroke:l,seed:i});T=c.insert((()=>r),":first-child"),d=c.insert((()=>h))}else{T=h.insert("rect",":first-child");const t="outer";T.attr("class",t).attr("x",b).attr("y",w).attr("width",y).attr("height",v).attr("data-look",e.look),d.attr("class","inner").attr("x",b).attr("y",k).attr("width",y).attr("height",x)}u.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(fn(n.flowchart.htmlLabels)?0:3)})`);const _=T.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return CE(e,t)},{cluster:c,labelBBox:g}}),"roundedWithTitle"),zE=o((async(t,e)=>{y.info("Creating subgraph rect for ",e.id,e);const n=Kn(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:s}=r,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=OE(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=fn(n.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await g_(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width});let f=g.getBBox();if(fn(n.flowchart.htmlLabels)){const t=g.children[0],e=Fa(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const m=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,x=e.x-m/2,b=e.y-v/2;let w;if(y.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=_E.svg(u),n=PE(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),r=t.path(IE(x,b,m,v,e.rx),n);w=u.insert((()=>(y.debug("Rough node insert CXC",r),r)),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",v);const{subGraphTitleTopMargin:k}=ay(n);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+k})`),o){const t=p.select("span");t&&t.attr("style",o)}const T=w.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return CE(e,t)},{cluster:u,labelBBox:f}}),"kanbanSection"),UE=o(((t,e)=>{const n=Kn(),{themeVariables:r,handDrawnSeed:i}=n,{nodeBorder:a}=r,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,c=e.width+l;e.diff=-e.padding;const h=e.height+l,u=e.x-c/2,d=e.y-h/2;let p;if(e.width=c,"handDrawn"===e.look){const t=_E.svg(s).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert((()=>t),":first-child")}else{p=o.insert("rect",":first-child");const t="divider";p.attr("class",t).attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return CE(e,t)},{cluster:s,labelBBox:{}}}),"divider"),GE={rect:BE,squareRect:BE,roundedWithTitle:FE,noteGroup:$E,divider:UE,kanbanSection:zE},qE=new Map,jE=o((async(t,e)=>{const n=e.shape||"rect",r=await GE[n](t,e);return qE.set(e.id,r),r}),"insertCluster"),YE=o((()=>{qE=new Map}),"clear");function WE(t,e){return t.intersect(e)}o(WE,"intersectNode");var HE=WE;function VE(t,e,n,r){var i=t.x,a=t.y,s=i-r.x,o=a-r.y,l=Math.sqrt(e*e*o*o+n*n*s*s),c=Math.abs(e*n*s/l);r.x0}o(QE,"intersectLine"),o(JE,"sameSign");var tC=QE;function eC(t,e,n){let r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)})):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=r-t.width/2-s,c=i-t.height/2-o;for(let r=0;r1&&a.sort((function(t,e){let r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),s=e.x-n.x,o=e.y-n.y,l=Math.sqrt(s*s+o*o);return ac),":first-child");return h.attr("class","anchor").attr("style",$k(s)),y_(e,h),e.intersect=function(t){return y.info("Circle intersect",e,1,t),nC.circle(e,1,t)},a}function iC(t,e,n,r,i,a,s){const o=(t+n)/2,l=(e+r)/2,c=Math.atan2(r-e,n-t),h=(n-t)/2/i,u=(r-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),g=o+p*a*Math.sin(c)*(s?-1:1),f=l-p*i*Math.cos(c)*(s?-1:1),m=Math.atan2((e-f)/a,(t-g)/i);let y=Math.atan2((r-f)/a,(n-g)/i)-m;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const v=[];for(let t=0;t<20;t++){const e=m+t/19*y,n=g+i*Math.cos(e),r=f+a*Math.sin(e);v.push({x:n,y:r})}return v}async function aC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=e,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...iC(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...iC(s/2,o/2,s/2,-o/2,c,l,!0)],d=_E.svg(i),p=PE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=x_(u),f=d.path(g,p),m=i.insert((()=>f),":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),r&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",r),m.attr("transform",`translate(${c/2}, 0)`),y_(e,m),e.intersect=function(t){return nC.polygon(e,u,t)},i}function sC(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}async function oC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=a.height+e.padding,o=a.width+e.padding+12,l=-s,c=[{x:12,y:l},{x:o,y:l},{x:o,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=x_(c),a=t.path(r,n);h=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),u&&h.attr("style",u)}else h=sC(i,o,s,c);return r&&h.attr("style",r),y_(e,h),e.intersect=function(t){return nC.polygon(e,c,t)},i}function lC(t,e){const{nodeStyles:n}=OE(e);e.label="";const r=t.insert("g").attr("class",v_(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=_E.svg(r),l=PE(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const c=x_(s),h=o.path(c,l),u=r.insert((()=>h),":first-child");return i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return nC.polygon(e,s,t)},r}async function cC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,halfPadding:s}=await f_(t,e,v_(e)),o=a.width/2+s;let l;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=t.circle(0,0,2*o,n);l=i.insert((()=>r),":first-child"),l.attr("class","basic label-container").attr("style",$k(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return y_(e,l),e.intersect=function(t){return y.info("Circle intersect",e,o,t),nC.circle(e,o,t)},i}function hC(t){const e=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=2*t;return`M ${-r/2*e},${r/2*n} L ${r/2*e},${-r/2*n}\n M ${r/2*e},${r/2*n} L ${-r/2*e},${-r/2*n}`}function uC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n,e.label="";const i=t.insert("g").attr("class",v_(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,o=_E.svg(i),l=PE(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,2*a,l),h=hC(a),u=o.path(h,l),d=i.insert((()=>c),":first-child");return d.insert((()=>u)),s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),y_(e,d),e.intersect=function(t){y.info("crossedCircle intersect",e,{radius:a,point:t});return nC.circle(e,a,t)},i}function dC(t,e,n,r=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(r-1);for(let i=0;iv),":first-child").attr("stroke-opacity",0),x.insert((()=>m),":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),r&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",r),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),y_(e,x),e.intersect=function(t){return nC.polygon(e,d,t)},i}function gC(t,e,n,r=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(r-1);for(let i=0;iv),":first-child").attr("stroke-opacity",0),x.insert((()=>m),":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),r&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",r),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),y_(e,x),e.intersect=function(t){return nC.polygon(e,d,t)},i}function mC(t,e,n,r=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(r-1);for(let i=0;iw),":first-child").attr("stroke-opacity",0),k.insert((()=>y),":first-child"),k.insert((()=>x),":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),r&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",r),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),y_(e,k),e.intersect=function(t){return nC.polygon(e,p,t)},i}async function vC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(80,1.25*(a.width+2*(e.padding??0)),e?.width??0),o=Math.max(20,a.height+2*(e.padding??0),e?.height??0),l=o/2,{cssStyles:c}=e,h=_E.svg(i),u=PE(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=s-l,p=o/4,g=[{x:d,y:0},{x:p,y:0},{x:0,y:o/2},{x:p,y:o},{x:d,y:o},...w_(-d,-o/2,l,50,270,90)],f=x_(g),m=h.path(f,u),y=i.insert((()=>m),":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",r),y.attr("transform",`translate(${-s/2}, ${-o/2})`),y_(e,y),e.intersect=function(t){return nC.polygon(e,g,t)},i}o(rC,"anchor"),o(iC,"generateArcPoints"),o(aC,"bowTieRect"),o(sC,"insertPolygonShape"),o(oC,"card"),o(lC,"choice"),o(cC,"circle"),o(hC,"createLine"),o(uC,"crossedCircle"),o(dC,"generateCirclePoints"),o(pC,"curlyBraceLeft"),o(gC,"generateCirclePoints"),o(fC,"curlyBraceRight"),o(mC,"generateCirclePoints"),o(yC,"curlyBraces"),o(vC,"curvedTrapezoid");var xC=o(((t,e,n,r,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r].join(" ")),"createCylinderPathD"),bC=o(((t,e,n,r,i,a)=>[`M${t},${e+a}`,`M${t+n},${e+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r].join(" ")),"createOuterCylinderPathD"),wC=o(((t,e,n,r,i,a)=>[`M${t-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(" ")),"createInnerCylinderPathD");async function kC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+e.padding,e.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+e.padding,e.height??0);let u;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=bC(0,0,o,h,l,c),r=wC(0,c,o,h,l,c),a=t.path(n,PE(e,{})),s=t.path(r,PE(e,{fill:"none"}));u=i.insert((()=>s),":first-child"),u=i.insert((()=>a),":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const t=xC(0,0,o,h,l,c);u=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",$k(d)).attr("style",r)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),y_(e,u),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-a.height/2+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(t){const n=nC.rect(e,t),r=n.x-(e.x??0);if(0!=l&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(n.y-(e.y??0))>(e.height??0)/2-c)){let i=c*c*(1-r*r/(l*l));i>0&&(i=Math.sqrt(i)),i=c-i,t.y-(e.y??0)>0&&(i=-i),n.y+=i}return n},i}async function TC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=a.width+e.padding,l=a.height+e.padding,c=.2*l,h=-o/2,u=-l/2-c/2,{cssStyles:d}=e,p=_E.svg(i),g=PE(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],m=p.polygon(f.map((t=>[t.x,t.y])),g),y=i.insert((()=>m),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),s.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(e.padding??0)/2-(a.y-(a.top??0))})`),y_(e,y),e.intersect=function(t){return nC.rect(e,t)},i}async function _C(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,halfPadding:s}=await f_(t,e,v_(e)),o=a.width/2+s+5,l=a.width/2+s;let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{roughness:.2,strokeWidth:2.5}),r=PE(e,{roughness:.2,strokeWidth:1.5}),a=t.circle(0,0,2*o,n),s=t.circle(0,0,2*l,r);c=i.insert("g",":first-child"),c.attr("class",$k(e.cssClasses)).attr("style",$k(h)),c.node()?.appendChild(a),c.node()?.appendChild(s)}else{c=i.insert("g",":first-child");const t=c.insert("circle",":first-child"),e=c.insert("circle");c.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",l).attr("cx",0).attr("cy",0)}return y_(e,c),e.intersect=function(t){return y.info("DoubleCircle intersect",e,o,t),nC.circle(e,o,t)},i}function EC(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:i}=OE(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",v_(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=_E.svg(a),{nodeBorder:l}=n,c=PE(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);const h=o.circle(0,0,14,c),u=a.insert((()=>h),":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),y_(e,u),e.intersect=function(t){y.info("filledCircle intersect",e,{radius:7,point:t});return nC.circle(e,7,t)},a}async function CC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=a.width+(e.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=e,d=_E.svg(i),p=PE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=x_(h),f=d.path(g,p),m=i.insert((()=>f),":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),r&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",r),e.width=o,e.height=l,y_(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return y.info("Triangle intersect",e,h,t),nC.polygon(e,h,t)},i}function SC(t,e,{dir:n,config:{state:r,themeVariables:i}}){const{nodeStyles:a}=OE(e);e.label="";const s=t.insert("g").attr("class",v_(e)).attr("id",e.domId??e.id),{cssStyles:o}=e;let l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===n&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const h=-1*l/2,u=-1*c/2,d=_E.svg(s),p=PE(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=d.rectangle(h,u,l,c,p),f=s.insert((()=>g),":first-child");o&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),y_(e,f);const m=r?.padding??0;return e.width&&e.height&&(e.width+=m/2||0,e.height+=m/2||0),e.intersect=function(t){return nC.rect(e,t)},s}async function AC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(80,a.width+2*(e.padding??0),e?.width??0),o=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=o/2,{cssStyles:c}=e,h=_E.svg(i),u=PE(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...w_(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}],p=x_(d),g=h.path(p,u),f=i.insert((()=>g),":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",r),y_(e,f),e.intersect=function(t){y.info("Pill intersect",e,{radius:l,point:t});return nC.polygon(e,d,t)},i}o(kC,"cylinder"),o(TC,"dividedRectangle"),o(_C,"doublecircle"),o(EC,"filledCircle"),o(CC,"flippedTriangle"),o(SC,"forkJoin"),o(AC,"halfRoundedRectangle");var LC=o(((t,e,n,r,i)=>[`M${t+i},${e}`,`L${t+n-i},${e}`,`L${t+n},${e-r/2}`,`L${t+n-i},${e-r}`,`L${t+i},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createHexagonPathD");async function NC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=a.height+e.padding,o=s/4,l=a.width+2*o+e.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=LC(0,0,l,s,o),a=t.path(r,n);h=i.insert((()=>a),":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=sC(i,l,s,c);return r&&h.attr("style",r),e.width=l,e.height=s,y_(e,h),e.intersect=function(t){return nC.polygon(e,c,t)},i}async function IC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.label="",e.labelStyle=n;const{shapeSvg:i}=await f_(t,e,v_(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,l=_E.svg(i),c=PE(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=x_(h),d=l.path(u,c),p=i.insert((()=>d),":first-child");return p.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",o),r&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",r),p.attr("transform",`translate(${-a/2}, ${-s/2})`),y_(e,p),e.intersect=function(t){y.info("Pill intersect",e,{points:h});return nC.polygon(e,h,t)},i}async function MC(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:i}=OE(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=r?.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await f_(t,e,"icon-shape default"),d="t"===e.pos,p=o,g=o,{nodeBorder:f}=n,{stylesMap:m}=RE(e),v=-g/2,x=-p/2,b=e.label?8:0,w=_E.svg(c),k=PE(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const T=w.rectangle(v,x,g,p,k),_=Math.max(g,h.width),E=p+h.height+b,C=w.rectangle(-_/2,-E/2,_,E,{...k,fill:"transparent",stroke:"none"}),S=c.insert((()=>T),":first-child"),A=c.insert((()=>C));if(e.icon){const t=c.append("g");t.html(`${await Uy(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const n=t.node().getBBox(),r=n.width,i=n.height,a=n.x,s=n.y;t.attr("transform",`translate(${-r/2-a},${d?h.height/2+b/2-i/2-s:-h.height/2-b/2-i/2-s})`),t.attr("style",`color: ${m.get("stroke")??f};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),S.attr("transform",`translate(0,${d?h.height/2+b/2:-h.height/2-b/2})`),y_(e,A),e.intersect=function(t){if(y.info("iconSquare intersect",e,t),!e.label)return nC.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];a=d?[{x:n-h.width/2,y:r-i/2},{x:n+h.width/2,y:r-i/2},{x:n+h.width/2,y:r-i/2+h.height+b},{x:n+g/2,y:r-i/2+h.height+b},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+h.height+b},{x:n-h.width/2,y:r-i/2+h.height+b}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+p},{x:n+h.width/2,y:r-i/2+p},{x:n+h.width/2/2,y:r+i/2},{x:n-h.width/2,y:r+i/2},{x:n-h.width/2,y:r-i/2+p},{x:n-g/2,y:r-i/2+p}];return nC.polygon(e,a,t)},c}async function RC(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:i}=OE(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=r?.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await f_(t,e,"icon-shape default"),d=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=n,{stylesMap:m}=RE(e),v=_E.svg(c),x=PE(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=m.get("fill");x.stroke=b??f;const w=c.append("g");e.icon&&w.html(`${await Uy(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const k=w.node().getBBox(),T=k.width,_=k.height,E=k.x,C=k.y,S=Math.max(T,_)*Math.SQRT2+40,A=v.circle(0,0,S,x),L=Math.max(S,h.width),N=S+h.height+d,I=v.rectangle(-L/2,-N/2,L,N,{...x,fill:"transparent",stroke:"none"}),M=c.insert((()=>A),":first-child"),R=c.insert((()=>I));return w.attr("transform",`translate(${-T/2-E},${p?h.height/2+d/2-_/2-C:-h.height/2-d/2-_/2-C})`),w.attr("style",`color: ${m.get("stroke")??g};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-N/2:N/2-h.height})`),M.attr("transform",`translate(0,${p?h.height/2+d/2:-h.height/2-d/2})`),y_(e,R),e.intersect=function(t){y.info("iconSquare intersect",e,t);return nC.rect(e,t)},c}async function DC(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:i}=OE(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=r?.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await f_(t,e,"icon-shape default"),p="t"===e.pos,g=o+2*u,f=o+2*u,{nodeBorder:m,mainBkg:v}=n,{stylesMap:x}=RE(e),b=-f/2,w=-g/2,k=e.label?8:0,T=_E.svg(c),_=PE(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const E=x.get("fill");_.stroke=E??v;const C=T.path(IE(b,w,f,g,5),_),S=Math.max(f,h.width),A=g+h.height+k,L=T.rectangle(-S/2,-A/2,S,A,{..._,fill:"transparent",stroke:"none"}),N=c.insert((()=>C),":first-child").attr("class","icon-shape2"),I=c.insert((()=>L));if(e.icon){const t=c.append("g");t.html(`${await Uy(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const n=t.node().getBBox(),r=n.width,i=n.height,a=n.x,s=n.y;t.attr("transform",`translate(${-r/2-a},${p?h.height/2+k/2-i/2-s:-h.height/2-k/2-i/2-s})`),t.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-A/2:A/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),y_(e,I),e.intersect=function(t){if(y.info("iconSquare intersect",e,t),!e.label)return nC.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];a=p?[{x:n-h.width/2,y:r-i/2},{x:n+h.width/2,y:r-i/2},{x:n+h.width/2,y:r-i/2+h.height+k},{x:n+f/2,y:r-i/2+h.height+k},{x:n+f/2,y:r+i/2},{x:n-f/2,y:r+i/2},{x:n-f/2,y:r-i/2+h.height+k},{x:n-h.width/2,y:r-i/2+h.height+k}]:[{x:n-f/2,y:r-i/2},{x:n+f/2,y:r-i/2},{x:n+f/2,y:r-i/2+g},{x:n+h.width/2,y:r-i/2+g},{x:n+h.width/2/2,y:r+i/2},{x:n-h.width/2,y:r+i/2},{x:n-h.width/2,y:r-i/2+g},{x:n-f/2,y:r-i/2+g}];return nC.polygon(e,a,t)},c}async function OC(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:i}=OE(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=r?.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await f_(t,e,"icon-shape default"),p="t"===e.pos,g=o+2*u,f=o+2*u,{nodeBorder:m,mainBkg:v}=n,{stylesMap:x}=RE(e),b=-f/2,w=-g/2,k=e.label?8:0,T=_E.svg(c),_=PE(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const E=x.get("fill");_.stroke=E??v;const C=T.path(IE(b,w,f,g,.1),_),S=Math.max(f,h.width),A=g+h.height+k,L=T.rectangle(-S/2,-A/2,S,A,{..._,fill:"transparent",stroke:"none"}),N=c.insert((()=>C),":first-child"),I=c.insert((()=>L));if(e.icon){const t=c.append("g");t.html(`${await Uy(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const n=t.node().getBBox(),r=n.width,i=n.height,a=n.x,s=n.y;t.attr("transform",`translate(${-r/2-a},${p?h.height/2+k/2-i/2-s:-h.height/2-k/2-i/2-s})`),t.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-A/2:A/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),y_(e,I),e.intersect=function(t){if(y.info("iconSquare intersect",e,t),!e.label)return nC.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];a=p?[{x:n-h.width/2,y:r-i/2},{x:n+h.width/2,y:r-i/2},{x:n+h.width/2,y:r-i/2+h.height+k},{x:n+f/2,y:r-i/2+h.height+k},{x:n+f/2,y:r+i/2},{x:n-f/2,y:r+i/2},{x:n-f/2,y:r-i/2+h.height+k},{x:n-h.width/2,y:r-i/2+h.height+k}]:[{x:n-f/2,y:r-i/2},{x:n+f/2,y:r-i/2},{x:n+f/2,y:r-i/2+g},{x:n+h.width/2,y:r-i/2+g},{x:n+h.width/2/2,y:r+i/2},{x:n-h.width/2,y:r+i/2},{x:n-h.width/2,y:r-i/2+g},{x:n-f/2,y:r-i/2+g}];return nC.polygon(e,a,t)},c}async function PC(t,e,{config:{flowchart:n}}){const r=new Image;r.src=e?.img??"",await r.decode();const i=Number(r.naturalWidth.toString().replace("px","")),a=Number(r.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;const{labelStyles:s}=OE(e);e.labelStyle=s;const o=n?.wrappingWidth;e.defaultWidth=n?.wrappingWidth;const l=Math.max(e.label?o??0:0,e?.assetWidth??i),c="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,h="on"===e.constraint?c/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(c,o??0);const{shapeSvg:u,bbox:d,label:p}=await f_(t,e,"image-shape default"),g="t"===e.pos,f=-c/2,m=-h/2,v=e.label?8:0,x=_E.svg(u),b=PE(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=x.rectangle(f,m,c,h,b),k=Math.max(c,d.width),T=h+d.height+v,_=x.rectangle(-k/2,-T/2,k,T,{...b,fill:"none",stroke:"none"}),E=u.insert((()=>w),":first-child"),C=u.insert((()=>_));if(e.img){const t=u.append("image");t.attr("href",e.img),t.attr("width",c),t.attr("height",h),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-c/2},${g?T/2-h:-T/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-v/2:h/2-d.height/2+v/2})`),E.attr("transform",`translate(0,${g?d.height/2+v/2:-d.height/2-v/2})`),y_(e,C),e.intersect=function(t){if(y.info("iconSquare intersect",e,t),!e.label)return nC.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];a=g?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+v},{x:n+c/2,y:r-i/2+d.height+v},{x:n+c/2,y:r+i/2},{x:n-c/2,y:r+i/2},{x:n-c/2,y:r-i/2+d.height+v},{x:n-d.width/2,y:r-i/2+d.height+v}]:[{x:n-c/2,y:r-i/2},{x:n+c/2,y:r-i/2},{x:n+c/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-c/2,y:r-i/2+h}];return nC.polygon(e,a,t)},u}async function BC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=x_(l),a=t.path(r,n);c=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=sC(i,s,o,l);return r&&c.attr("style",r),e.width=s,e.height=o,y_(e,c),e.intersect=function(t){return nC.polygon(e,l,t)},i}async function $C(t,e,n){const{labelStyles:r,nodeStyles:i}=OE(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await f_(t,e,v_(e)),o=Math.max(s.width+2*n.labelPaddingX,e?.width||0),l=Math.max(s.height+2*n.labelPaddingY,e?.height||0),c=-o/2,h=-l/2;let u,{rx:d,ry:p}=e;const{cssStyles:g}=e;if(n?.rx&&n.ry&&(d=n.rx,p=n.ry),"handDrawn"===e.look){const t=_E.svg(a),n=PE(e,{}),r=d||p?t.path(IE(c,h,o,l,d||0),n):t.rectangle(c,h,o,l,n);u=a.insert((()=>r),":first-child"),u.attr("class","basic label-container").attr("style",$k(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",i).attr("rx",$k(d)).attr("ry",$k(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return y_(e,u),e.intersect=function(t){return nC.rect(e,t)},a}async function FC(t,e){const{shapeSvg:n,bbox:r,label:i}=await f_(t,e,"label"),a=n.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),n.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),y_(e,a),e.intersect=function(t){return nC.rect(e,t)},n}async function zC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=x_(l),a=t.path(r,n);c=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=sC(i,s,o,l);return r&&c.attr("style",r),e.width=s,e.height=o,y_(e,c),e.intersect=function(t){return nC.polygon(e,l,t)},i}async function UC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=x_(l),a=t.path(r,n);c=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=sC(i,s,o,l);return r&&c.attr("style",r),e.width=s,e.height=o,y_(e,c),e.intersect=function(t){return nC.polygon(e,l,t)},i}function GC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.label="",e.labelStyle=n;const i=t.insert("g").attr("class",v_(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],c=_E.svg(i),h=PE(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const u=x_(l),d=c.path(u,h),p=i.insert((()=>d),":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),p.attr("transform",`translate(-${s/2},${-o})`),y_(e,p),e.intersect=function(t){y.info("lightningBolt intersect",e,t);return nC.polygon(e,l,t)},i}o(NC,"hexagon"),o(IC,"hourglass"),o(MC,"icon"),o(RC,"iconCircle"),o(DC,"iconRounded"),o(OC,"iconSquare"),o(PC,"imageSquare"),o(BC,"inv_trapezoid"),o($C,"drawRect"),o(FC,"labelRect"),o(zC,"lean_left"),o(UC,"lean_right"),o(GC,"lightningBolt");var qC=o(((t,e,n,r,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${n},0`].join(" ")),"createCylinderPathD"),jC=o(((t,e,n,r,i,a,s)=>[`M${t},${e+a}`,`M${t+n},${e+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${n},0`].join(" ")),"createOuterCylinderPathD"),YC=o(((t,e,n,r,i,a)=>[`M${t-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(" ")),"createInnerCylinderPathD");async function WC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+(e.padding??0),e.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(e.padding??0),e.height??0),u=.1*h;let d;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=jC(0,0,o,h,l,c,u),r=YC(0,c,o,h,l,c),a=PE(e,{}),s=t.path(n,a),g=t.path(r,a);i.insert((()=>g),":first-child").attr("class","line"),d=i.insert((()=>s),":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const t=qC(0,0,o,h,l,c,u);d=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",$k(p)).attr("style",r)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),y_(e,d),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-a.height/2+c-(a.y-(a.top??0))})`),e.intersect=function(t){const n=nC.rect(e,t),r=n.x-(e.x??0);if(0!=l&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(n.y-(e.y??0))>(e.height??0)/2-c)){let i=c*c*(1-r*r/(l*l));i>0&&(i=Math.sqrt(i)),i=c-i,t.y-(e.y??0)>0&&(i=-i),n.y+=i}return n},i}async function HC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,{cssStyles:u}=e,d=_E.svg(i),p=PE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...b_(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],f=d.polygon(g.map((t=>[t.x,t.y])),p),m=i.insert((()=>f),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),r&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",r),m.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),y_(e,m),e.intersect=function(t){return nC.polygon(e,g,t)},i}async function VC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=e,d=_E.svg(i),p=PE(e,{}),g=[{x:c-5,y:h+5},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:c+5,y:h-5},{x:c+5,y:h},{x:c,y:h},{x:c,y:h+5}],f=[{x:c,y:h+5},{x:c+o-5,y:h+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}];"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const m=x_(g),y=d.path(m,p),v=x_(f),x=d.path(v,{...p,fill:"none"}),b=i.insert((()=>x),":first-child");return b.insert((()=>y),":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),r&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",r),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),y_(e,b),e.intersect=function(t){return nC.polygon(e,g,t)},i}async function XC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,{cssStyles:p}=e,g=b_(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:d+5},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:u+5,y:d-5},{x:u+5,y:d},{x:u,y:d},{x:u,y:d+5}],y=[{x:u,y:d+5},{x:u+o-5,y:d+5},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=_E.svg(i),x=PE(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=x_(m),w=v.path(b,x),k=x_(y),T=v.path(k,x),_=i.insert((()=>w),":first-child");return _.insert((()=>T)),_.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",p),r&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",r),_.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),y_(e,_),e.intersect=function(t){return nC.polygon(e,m,t)},i}async function KC(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:i}=OE(e);e.labelStyle=r;e.useHtmlLabels||!1!==Gt().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:a,bbox:s}=await f_(t,e,v_(e)),o=Math.max(s.width+2*(e.padding??0),e?.width??0),l=Math.max(s.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=e,d=_E.svg(a),p=PE(e,{fill:n.noteBkgColor,stroke:n.noteBorderColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=d.rectangle(c,h,o,l,p),f=a.insert((()=>g),":first-child");return f.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",i),y_(e,f),e.intersect=function(t){return nC.rect(e,t)},a}o(WC,"linedCylinder"),o(HC,"linedWaveEdgedRect"),o(VC,"multiRect"),o(XC,"multiWaveEdgedRectangle"),o(KC,"note");var ZC=o(((t,e,n)=>[`M${t+n/2},${e}`,`L${t+n},${e-n/2}`,`L${t+n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" ")),"createDecisionBoxPathD");async function QC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=a.width+e.padding+(a.height+e.padding),o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let l;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=ZC(0,0,s),a=t.path(r,n);l=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${s/2})`),c&&l.attr("style",c)}else l=sC(i,s,s,o);return r&&l.attr("style",r),y_(e,l),e.intersect=function(t){return y.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",nC.polygon(e,o,t)),nC.polygon(e,o,t)},i}async function JC(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=-Math.max(a.width+(e.padding??0),e?.width??0)/2,l=-Math.max(a.height+(e.padding??0),e?.height??0)/2,c=l/2,h=[{x:o+c,y:l},{x:o,y:0},{x:o+c,y:-l},{x:-o,y:-l},{x:-o,y:l}],{cssStyles:u}=e,d=_E.svg(i),p=PE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=x_(h),f=d.path(g,p),m=i.insert((()=>f),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),r&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",r),m.attr("transform",`translate(${-c/2},0)`),s.attr("transform",`translate(${-c/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),y_(e,m),e.intersect=function(t){return nC.polygon(e,h,t)},i}async function tS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);let i;e.labelStyle=n,i=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",r),l=e.description,c=e.label,h=o.node().appendChild(await NE(c,e.labelStyle,!0,!0));let u={width:0,height:0};if(fn(Kn()?.flowchart?.htmlLabels)){const t=h.children[0],e=Fa(h);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}y.info("Text 2",l);const d=l||[],p=h.getBBox(),g=o.node().appendChild(await NE(d.join?d.join("
    "):d,e.labelStyle,!0,!0)),f=g.children[0],m=Fa(g);u=f.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const v=(e.padding||0)/2;Fa(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+v+5)+")"),Fa(h).attr("transform","translate( "+(u.width(y.debug("Rough node insert CXC",r),i)),":first-child"),T=a.insert((()=>(y.debug("Rough node insert CXC",r),r)),":first-child")}else T=s.insert("rect",":first-child"),_=s.insert("line"),T.attr("class","outer title-state").attr("style",r).attr("x",-u.width/2-v).attr("y",-u.height/2-v).attr("width",u.width+(e.padding||0)).attr("height",u.height+(e.padding||0)),_.attr("class","divider").attr("x1",-u.width/2-v).attr("x2",u.width/2+v).attr("y1",-u.height/2-v+p.height+v).attr("y2",-u.height/2-v+p.height+v);return y_(e,T),e.intersect=function(t){return nC.rect(e,t)},a}async function eS(t,e){return $C(t,e,{rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function nS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=e?.padding??0,l=Math.max(a.width+2*(e.padding??0),e?.width??0),c=Math.max(a.height+2*(e.padding??0),e?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:d}=e,p=_E.svg(i),g=PE(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],m=p.polygon(f.map((t=>[t.x,t.y])),g),y=i.insert((()=>m),":first-child");return y.attr("class","basic label-container").attr("style",$k(d)),r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-c/2+(e.padding??0)-(a.y-(a.top??0))})`),y_(e,y),e.intersect=function(t){return nC.rect(e,t)},i}async function rS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=e,d=_E.svg(i),p=PE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],f=x_(g),m=d.path(f,p),y=i.insert((()=>m),":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",u),r&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",r),y.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),y_(e,y),e.intersect=function(t){return nC.polygon(e,g,t)},i}async function iS(t,e){return $C(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function aS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=a.height+e.padding,o=a.width+s/4+e.padding;let l;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=IE(-o/2,-s/2,o,s,s/2),a=t.path(r,n);l=i.insert((()=>a),":first-child"),l.attr("class","basic label-container").attr("style",$k(c))}else l=i.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",r).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return y_(e,l),e.intersect=function(t){return nC.rect(e,t)},i}async function sS(t,e){return $C(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function oS(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:i}=OE(e);e.labelStyle=r;const{cssStyles:a}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=n,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=_E.svg(c),u=PE(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),p=o??l,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),f=c.insert((()=>d),":first-child");return f.insert((()=>g)),a&&f.selectAll("path").attr("style",a),i&&f.selectAll("path").attr("style",i),y_(e,f),e.intersect=function(t){return nC.circle(e,7,t)},c}function lS(t,e,{config:{themeVariables:n}}){const{lineColor:r}=n,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if("handDrawn"===e.look){const t=_E.svg(i).circle(0,0,14,ME(r));a=i.insert((()=>t)),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return y_(e,a),e.intersect=function(t){return nC.circle(e,7,t)},i}async function cS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=(e?.padding||0)/2,o=a.width+e.padding,l=a.height+e.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=t.rectangle(c-8,h,o+16,l,n),a=t.line(c,h,c,h+l,n),s=t.line(c+o,h,c+o,h+l,n);i.insert((()=>a),":first-child"),i.insert((()=>s),":first-child");const u=i.insert((()=>r),":first-child"),{cssStyles:d}=e;u.attr("class","basic label-container").attr("style",$k(d)),y_(e,u)}else{const t=sC(i,o,l,u);r&&t.attr("style",r),y_(e,t)}return e.intersect=function(t){return nC.polygon(e,u,t)},i}async function hS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:d}=e,p=_E.svg(i),g=PE(e,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=x_(f),v=p.path(y,g),x=x_(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert((()=>b),":first-child");return w.insert((()=>v),":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",d),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),y_(e,w),e.intersect=function(t){return nC.polygon(e,f,t)},i}async function uS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=.2*o,u=.2*l,d=l+c,{cssStyles:p}=e,g=_E.svg(i),f=PE(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-o/2-o/2*.1,y:d/2},...b_(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,c,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],y=-o/2+o/2*.1,v=-d/2-.4*u,x=[{x:y+o-h,y:1.4*(v+l)},{x:y+o,y:v+l-u},{x:y+o,y:.9*(v+l)},...b_(y+o,1.3*(v+l),y+o-h,1.5*(v+l),.03*-l,.5)],b=x_(m),w=g.path(b,f),k=x_(x),T=g.path(k,{...f,fillStyle:"solid"}),_=i.insert((()=>T),":first-child");return _.insert((()=>w),":first-child"),_.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",p),r&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",r),_.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),y_(e,_),e.intersect=function(t){return nC.polygon(e,m,t)},i}async function dS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(a.width+e.padding,e?.width||0),o=Math.max(a.height+e.padding,e?.height||0),l=-s/2,c=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",r).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",o),y_(e,h),e.intersect=function(t){return nC.rect(e,t)},i}o(QC,"question"),o(JC,"rect_left_inv_arrow"),o(tS,"rectWithTitle"),o(eS,"roundedRect"),o(nS,"shadedProcess"),o(rS,"slopedRect"),o(iS,"squareRect"),o(aS,"stadium"),o(sS,"state"),o(oS,"stateEnd"),o(lS,"stateStart"),o(cS,"subroutine"),o(hS,"taggedRect"),o(uS,"taggedWaveEdgedRectangle"),o(dS,"text");var pS=o(((t,e,n,r,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-r}\n l${n},0\n a${i},${a} 0,0,1 0,${r}\n M${n},${-r}\n a${i},${a} 0,0,0 0,${r}\n l${-n},0`),"createCylinderPathD"),gS=o(((t,e,n,r,i,a)=>[`M${t},${e}`,`M${t+n},${e}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(" ")),"createOuterCylinderPathD"),fS=o(((t,e,n,r,i,a)=>[`M${t+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(" ")),"createInnerCylinderPathD");async function mS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await f_(t,e,v_(e)),l="neo"===e.look?2*o:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),d=a.width+u+l,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=_E.svg(i),n=gS(0,0,d,c,u,h),r=fS(0,0,d,c,u,h),a=t.path(n,PE(e,{})),s=t.path(r,PE(e,{fill:"none"}));g=i.insert((()=>s),":first-child"),g=i.insert((()=>a),":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=pS(0,0,d,c,u,h);g=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",$k(p)).attr("style",r),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),r&&g.selectAll("path").attr("style",r)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),s.attr("transform",`translate(${-a.width/2-u-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),y_(e,g),e.intersect=function(t){const n=nC.rect(e,t),r=n.y-(e.y??0);if(0!=h&&(Math.abs(r)<(e.height??0)/2||Math.abs(r)==(e.height??0)/2&&Math.abs(n.x-(e.x??0))>(e.width??0)/2-u)){let i=u*u*(1-r*r/(h*h));0!=i&&(i=Math.sqrt(Math.abs(i))),i=u-i,t.x-(e.x??0)>0&&(i=-i),n.x+=i}return n},i}async function yS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=a.width+e.padding,o=a.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=_E.svg(i),n=PE(e,{}),r=x_(l),a=t.path(r,n);c=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=sC(i,s,o,l);return r&&c.attr("style",r),e.width=s,e.height=o,y_(e,c),e.intersect=function(t){return nC.polygon(e,l,t)},i}async function vS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(60,a.width+2*(e.padding??0),e?.width??0),o=Math.max(20,a.height+2*(e.padding??0),e?.height??0),{cssStyles:l}=e,c=_E.svg(i),h=PE(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const u=[{x:-s/2*.8,y:-o/2},{x:s/2*.8,y:-o/2},{x:s/2,y:-o/2*.6},{x:s/2,y:o/2},{x:-s/2,y:o/2},{x:-s/2,y:-o/2*.6}],d=x_(u),p=c.path(d,h),g=i.insert((()=>p),":first-child");return g.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",l),r&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",r),y_(e,g),e.intersect=function(t){return nC.polygon(e,u,t)},i}async function xS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=fn(Kn().flowchart?.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=e,p=_E.svg(i),g=PE(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=x_(u),m=p.path(f,g),v=i.insert((()=>m),":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",d),r&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",r),e.width=l,e.height=c,y_(e,v),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return y.info("Triangle intersect",e,u,t),nC.polygon(e,u,t)},i}async function bS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/8,h=l+c,{cssStyles:u}=e,d=70-o,p=d>0?d/2:0,g=_E.svg(i),f=PE(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-o/2-p,y:h/2},...b_(-o/2-p,h/2,o/2+p,h/2,c,.8),{x:o/2+p,y:-h/2},{x:-o/2-p,y:-h/2}],y=x_(m),v=g.path(y,f),x=i.insert((()=>v),":first-child");return x.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",u),r&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",r),x.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c-(a.y-(a.top??0))})`),y_(e,x),e.intersect=function(t){return nC.polygon(e,m,t)},i}async function wS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a}=await f_(t,e,v_(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=s/o;let c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);const u=Math.min(.2*h,h/4),d=h+2*u,{cssStyles:p}=e,g=_E.svg(i),f=PE(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2,y:d/2},...b_(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...b_(c/2,-d/2,-c/2,-d/2,u,-1)],y=x_(m),v=g.path(y,f),x=i.insert((()=>v),":first-child");return x.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",p),r&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",r),y_(e,x),e.intersect=function(t){return nC.polygon(e,m,t)},i}async function kS(t,e){const{labelStyles:n,nodeStyles:r}=OE(e);e.labelStyle=n;const{shapeSvg:i,bbox:a,label:s}=await f_(t,e,v_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=e,d=_E.svg(i),p=PE(e,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5}\n M${c-5},${h} L${c+o},${h}\n M${c},${h-5} L${c},${h+l}`;"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const m=d.path(f,p),y=i.insert((()=>m),":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),y_(e,y),e.intersect=function(t){return nC.polygon(e,g,t)},i}async function TS(t,e,n,r,i=n.class.padding??12){const a=r?0:3,s=t.insert("g").attr("class",v_(e)).attr("id",e.domId||e.id);let o=null,l=null,c=null,h=null,u=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await _S(o,{text:`«${t}»`},0);u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await _S(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=s.insert("g").attr("class","members-group text");let f=0;for(const t of e.members){f+=await _S(c,t,f,[t.parseClassifier()])+a}p=c.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let m=0;for(const t of e.methods){m+=await _S(h,t,m,[t.parseClassifier()])+a}let y=s.node().getBBox();if(null!==o){const t=o.node().getBBox();o.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),y=s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*i:2*i)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function _S(t,e,n,r=[]){const i=t.insert("g").attr("class","label").attr("style",r.join("; ")),a=Gt();let s="useHtmlLabels"in e?e.useHtmlLabels:fn(a.htmlLabels)??!0,l="";l="text"in e?e.text:e.label,!s&&l.startsWith("\\")&&(l=l.substring(1)),_n(l)&&(s=!0);const c=await g_(i,Jn(Pk(l)),{width:Ek(l,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let h,u=1;if(s){const t=c.children[0],e=Fa(c);u=t.innerHTML.split("
    ").length,t.innerHTML.includes("")&&(u+=t.innerHTML.split("").length-1);const n=t.getElementsByTagName("img");if(n){const t=""===l.replace(/]*>/g,"").trim();await Promise.all([...n].map((e=>new Promise((n=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,n=5,r=parseInt(t,10)*n+"px";e.style.minWidth=r,e.style.maxWidth=r}else e.style.width="100%";n(e)}o(r,"setupImage"),setTimeout((()=>{e.complete&&r()})),e.addEventListener("error",r),e.addEventListener("load",r)})))))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{r.includes("font-weight: bolder")&&Fa(c).selectAll("tspan").attr("font-weight",""),u=c.children.length;const t=c.children[0];if(""===c.textContent||c.textContent.includes(">")){t.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===l[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),h=c.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*u)+n)+")"),h.height}async function ES(t,e){const n=Kn(),r=n.class.padding??12,i=r,a=e.useHtmlLabels??fn(n.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await TS(t,e,n,a,i),{labelStyles:c,nodeStyles:h}=OE(e);e.labelStyle=c,e.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=u.replaceAll("!important","").split(";"));const d=0===s.members.length&&0===s.methods.length&&!n.class?.hideEmptyMembersBox,p=_E.svg(o),g=PE(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=l.width;let m=l.height;0===s.members.length&&0===s.methods.length?m+=i:s.members.length>0&&0===s.methods.length&&(m+=2*i);const y=-f/2,v=-m/2,x=p.rectangle(y-r,v-r-(d?r:0===s.members.length&&0===s.methods.length?-r/2:0),f+2*r,m+2*r+(d?2*r:0===s.members.length&&0===s.methods.length?-r:0),g),b=o.insert((()=>x),":first-child");b.attr("class","basic label-container");const w=b.node().getBBox();o.selectAll(".text").each(((t,e,n)=>{const i=Fa(n[e]),l=i.attr("transform");let c=0;if(l){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(l);t&&(c=parseFloat(t[2]))}let h=c+v+r-(d?r:0===s.members.length&&0===s.methods.length?-r/2:0);a||(h-=4);let u=y;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(u=-i.node()?.getBBox().width/2||0,o.selectAll("text").each((function(t,e,n){"middle"===window.getComputedStyle(n[e]).textAnchor&&(u=0)}))),i.attr("transform",`translate(${u}, ${h})`)}));const k=o.select(".annotation-group").node().getBBox().height-(d?r/2:0)||0,T=o.select(".label-group").node().getBBox().height-(d?r/2:0)||0,_=o.select(".members-group").node().getBBox().height-(d?r/2:0)||0;if(s.members.length>0||s.methods.length>0||d){const t=p.line(w.x,k+T+v+r,w.x+w.width,k+T+v+r,g);o.insert((()=>t)).attr("class","divider").attr("style",u)}if(d||s.members.length>0||s.methods.length>0){const t=p.line(w.x,k+T+_+v+2*i+r,w.x+w.width,k+T+_+v+r+2*i,g);o.insert((()=>t)).attr("class","divider").attr("style",u)}if("handDrawn"!==s.look&&o.selectAll("path").attr("style",u),b.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",u),!a){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(u);if(e){const t=e[0].replace("color","fill");o.selectAll("tspan").attr("style",t)}else if(c){const e=t.exec(c);if(e){const t=e[0].replace("color","fill");o.selectAll("tspan").attr("style",t)}}}return y_(e,b),e.intersect=function(t){return nC.rect(e,t)},o}o(mS,"tiltedCylinder"),o(yS,"trapezoid"),o(vS,"trapezoidalPentagon"),o(xS,"triangle"),o(bS,"waveEdgedRectangle"),o(wS,"waveRectangle"),o(kS,"windowPane"),o(TS,"textHelper"),o(_S,"addText"),o(ES,"classBox");var CS=o((t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}}),"colorFromPriority");async function SS(t,e,{config:n}){const{labelStyles:r,nodeStyles:i}=OE(e);e.labelStyle=r||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:o,label:l}=await f_(t,e,v_(e)),c=e.padding||10;let h,u="";"ticket"in e&&e.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),h=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let p,g;({label:p,bbox:g}=h?await m_(h,"ticket"in e&&e.ticket||"",d):await m_(s,"ticket"in e&&e.ticket||"",d));const{label:f,bbox:m}=await m_(s,"assigned"in e&&e.assigned||"",d);e.width=a;const y=e?.width||0,v=Math.max(g.height,m.height)/2,x=Math.max(o.height+20,e?.height||0)+v,b=-y/2,w=-x/2;let k;l.attr("transform","translate("+(c-y/2)+", "+(-v-o.height/2)+")"),p.attr("transform","translate("+(c-y/2)+", "+(-v+o.height/2)+")"),f.attr("transform","translate("+(c+y/2-m.width-20)+", "+(-v+o.height/2)+")");const{rx:T,ry:_}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=_E.svg(s),n=PE(e,{}),r=T||_?t.path(IE(b,w,y,x,T||0),n):t.rectangle(b,w,y,x,n);k=s.insert((()=>r),":first-child"),k.attr("class","basic label-container").attr("style",E||null)}else{k=s.insert("rect",":first-child"),k.attr("class","basic label-container __APA__").attr("style",i).attr("rx",T??5).attr("ry",_??5).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),n=b+2,r=w+Math.floor((T??0)/2),i=w+x-Math.floor((T??0)/2);e.attr("x1",n).attr("y1",r).attr("x2",n).attr("y2",i).attr("stroke-width","4").attr("stroke",CS(t))}}return y_(e,k),e.height=x,e.intersect=function(t){return nC.rect(e,t)},s}o(SS,"kanbanItem");var AS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:iS},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:eS},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:aS},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:cS},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:kC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:cC},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:QC},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:NC},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:UC},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:zC},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:yS},{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:BC},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_C},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:dS},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:oC},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:nS},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:lS},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:oS},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:SC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:IC},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:pC},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:fC},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:yC},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:GC},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:bS},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:AC},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:mS},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:WC},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:vC},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:TC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:xS},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:kS},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:EC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:vS},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:CC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:rS},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:XC},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:VC},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:aC},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:uC},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:uS},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:hS},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:wS},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:JC},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:HC}],LS=o((()=>{const t={state:sS,choice:lC,note:KC,rectWithTitle:tS,labelRect:FC,iconSquare:OC,iconCircle:RC,icon:MC,iconRounded:DC,imageSquare:PC,anchor:rC,kanbanItem:SS,classBox:ES},e=[...Object.entries(t),...AS.flatMap((t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map((e=>[e,t.handler]))))];return Object.fromEntries(e)}),"generateShapeMap"),NS=LS();function IS(t){return t in NS}o(IS,"isValidShape");var MS=new Map;async function RS(t,e,n){let r,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?NS[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===n.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(r,e,n)}else i=await a(t,e,n),r=i;return e.tooltip&&i.attr("title",e.tooltip),MS.set(e.id,r),e.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}o(RS,"insertNode");var DS=o(((t,e)=>{MS.set(e.id,t)}),"setNodeElem"),OS=o((()=>{MS.clear()}),"clear"),PS=o((t=>{const e=MS.get(t.id);y.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n}),"positionNode"),BS={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function $S(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=FS(t),e=FS(e);const[n,r]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-n,o=a-r;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}o($S,"calculateDeltaAndAngle");var FS=o((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),zS=o((t=>({x:o((function(e,n,r){let i=0;const a=FS(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(BS,t.arrowTypeEnd)){const{angle:e,deltaX:n}=$S(r[r.length-1],r[r.length-2]);i=BS[t.arrowTypeEnd]*Math.cos(e)*(n>=0?1:-1)}const s=Math.abs(FS(e).x-FS(r[r.length-1]).x),o=Math.abs(FS(e).y-FS(r[r.length-1]).y),l=Math.abs(FS(e).x-FS(r[0]).x),c=Math.abs(FS(e).y-FS(r[0]).y),h=BS[t.arrowTypeStart],u=BS[t.arrowTypeEnd];if(s0&&o0&&c=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(BS,t.arrowTypeEnd)){const{angle:e,deltaY:n}=$S(r[r.length-1],r[r.length-2]);i=BS[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(n>=0?1:-1)}const s=Math.abs(FS(e).y-FS(r[r.length-1]).y),o=Math.abs(FS(e).x-FS(r[r.length-1]).x),l=Math.abs(FS(e).y-FS(r[0]).y),c=Math.abs(FS(e).x-FS(r[0]).x),h=BS[t.arrowTypeStart],u=BS[t.arrowTypeEnd];if(s0&&o0&&c{e.arrowTypeStart&&qS(t,"start",e.arrowTypeStart,n,r,i),e.arrowTypeEnd&&qS(t,"end",e.arrowTypeEnd,n,r,i)}),"addEdgeMarkers"),GS={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},qS=o(((t,e,n,r,i,a)=>{const s=GS[n];if(!s)return void y.warn(`Unknown arrow type: ${n}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${r}#${i}_${a}-${s}${o})`)}),"addEdgeMarker"),jS=new Map,YS=new Map,WS=o((()=>{jS.clear(),YS.clear()}),"clear"),HS=o((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),VS=o((async(t,e)=>{let n=fn(Kn().flowchart.htmlLabels);const r=await g_(t,e.label,{style:HS(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1});y.info("abc82",e,e.labelType);const i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(r);let s,o=r.getBBox();if(n){const t=r.children[0],e=Fa(r);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}if(a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),jS.set(e.id,i),e.width=o.width,e.height=o.height,e.startLabelLeft){const n=await NE(e.startLabelLeft,HS(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");s=i.node().appendChild(n);const a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),YS.get(e.id)||YS.set(e.id,{}),YS.get(e.id).startLeft=r,XS(s,e.startLabelLeft)}if(e.startLabelRight){const n=await NE(e.startLabelRight,HS(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");s=r.node().appendChild(n),i.node().appendChild(n);const a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),YS.get(e.id)||YS.set(e.id,{}),YS.get(e.id).startRight=r,XS(s,e.startLabelRight)}if(e.endLabelLeft){const n=await NE(e.endLabelLeft,HS(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");s=i.node().appendChild(n);const a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),r.node().appendChild(n),YS.get(e.id)||YS.set(e.id,{}),YS.get(e.id).endLeft=r,XS(s,e.endLabelLeft)}if(e.endLabelRight){const n=await NE(e.endLabelRight,HS(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");s=i.node().appendChild(n);const a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),r.node().appendChild(n),YS.get(e.id)||YS.set(e.id,{}),YS.get(e.id).endRight=r,XS(s,e.endLabelRight)}return r}),"insertEdgeLabel");function XS(t,e){Kn().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}o(XS,"setTerminalWidth");var KS=o(((t,e)=>{y.debug("Moving label abc88 ",t.id,t.label,jS.get(t.id),e);let n=e.updatedPath?e.updatedPath:e.originalPath;const r=Kn(),{subGraphTitleTotalMargin:i}=ay(r);if(t.label){const r=jS.get(t.id);let a=t.x,s=t.y;if(n){const r=Dk.calcLabelPosition(n);y.debug("Moving label "+t.label+" from (",a,",",s,") to (",r.x,",",r.y,") abc88"),e.updatedPath&&(a=r.x,s=r.y)}r.attr("transform",`translate(${a}, ${s+i/2})`)}if(t.startLabelLeft){const e=YS.get(t.id).startLeft;let r=t.x,i=t.y;if(n){const e=Dk.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){const e=YS.get(t.id).startRight;let r=t.x,i=t.y;if(n){const e=Dk.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){const e=YS.get(t.id).endLeft;let r=t.x,i=t.y;if(n){const e=Dk.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){const e=YS.get(t.id).endRight;let r=t.x,i=t.y;if(n){const e=Dk.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}}),"positionEdgeLabel"),ZS=o(((t,e)=>{const n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),s=t.width/2,o=t.height/2;return i>=s||a>=o}),"outsideNode"),QS=o(((t,e,n)=>{y.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,i=t.y,a=Math.abs(r-n.x),s=t.width/2;let o=n.xMath.abs(r-e.x)*l){let t=n.y{y.warn("abc88 cutPathAtIntersect",t,e);let n=[],r=t[0],i=!1;return t.forEach((t=>{if(y.info("abc88 checking point",t,e),ZS(e,t)||i)y.warn("abc88 outside",t,r),r=t,i||n.push(t);else{const a=QS(e,r,t);y.debug("abc88 inside",t,r,a),y.debug("abc88 intersection",a,e);let s=!1;n.forEach((t=>{s=s||t.x===a.x&&t.y===a.y})),n.some((t=>t.x===a.x&&t.y===a.y))?y.warn("abc88 no intersect",a,n):n.push(a),i=!0}})),y.debug("returning points",n),n}),"cutPathAtIntersect");function tA(t){const e=[],n=[];for(let r=1;r5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),n.push(r))}return{cornerPoints:e,cornerPointPositions:n}}o(tA,"extractCornerPoints");var eA=o((function(t,e,n){const r=e.x-t.x,i=e.y-t.y,a=n/Math.sqrt(r*r+i*i);return{x:e.x-a*r,y:e.y-a*i}}),"findAdjacentPoint"),nA=o((function(t){const{cornerPointPositions:e}=tA(t),n=[];for(let r=0;r10&&Math.abs(i.y-e.y)>=10){y.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;u=a.x===s.x?{x:l<0?s.x-t+h:s.x+t-h,y:c<0?s.y-h:s.y+h}:{x:l<0?s.x-h:s.x+h,y:c<0?s.y-t+h:s.y+t-h}}else y.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));n.push(u,o)}else n.push(t[r]);return n}),"fixCorners"),rA=o((function(t,e,n,r,i,a,s){const{handDrawnSeed:o}=Kn();let l=e.points,c=!1;const h=i;var u=a;u.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),y.debug("Last point APA12",e.start,"--\x3e",e.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),e.toCluster&&(y.info("to cluster abc88",n.get(e.toCluster)),l=JS(e.points,n.get(e.toCluster).node),c=!0),e.fromCluster&&(y.debug("from cluster abc88",n.get(e.fromCluster),JSON.stringify(l,null,2)),l=JS(l.reverse(),n.get(e.fromCluster).node).reverse(),c=!0);let d=l.filter((t=>!Number.isNaN(t.y)));d=nA(d);let p=bu;e.curve&&(p=e.curve);const{x:g,y:f}=zS(e),m=uu().x(g).y(f).curve(p);let v,x;switch(e.thickness){case"normal":default:v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible"}switch(e.pattern){case"solid":default:v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed"}let b=m(d);const w=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const n=_E.svg(t);Object.assign([],d);v+=" transition",x=Fa(n.path(b,{roughness:.3,seed:o})).select("path").attr("id",e.id).attr("class"," "+v+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce(((t,e)=>t+";"+e),""):"");let r=x.attr("d");x.attr("d",r),t.node().appendChild(x.node())}else x=t.append("path").attr("d",b).attr("id",e.id).attr("class"," "+v+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce(((t,e)=>t+";"+e),""):"");let k="";(Kn().flowchart.arrowMarkerAbsolute||Kn().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),y.info("arrowTypeStart",e.arrowTypeStart),y.info("arrowTypeEnd",e.arrowTypeEnd),US(x,e,k,s,r);let T={};return c&&(T.updatedPath=l),T.originalPath=e.points,T}),"insertEdge"),iA=o(((t,e,n,r)=>{e.forEach((e=>{gA[e](t,n,r)}))}),"insertMarkers"),aA=o(((t,e,n)=>{y.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),sA=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),oA=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),lA=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"dependency"),cA=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),hA=o(((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),uA=o(((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"circle"),dA=o(((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")}),"cross"),pA=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb"),gA={extension:aA,composition:sA,aggregation:oA,dependency:lA,lollipop:cA,point:hA,circle:uA,cross:dA,barb:pA},fA=iA,mA={common:Sn,getConfig:Gt,insertCluster:jE,insertEdge:rA,insertEdgeLabel:VS,insertMarkers:fA,insertNode:RS,interpolateToCurve:ak,labelHelper:f_,log:y,positionEdgeLabel:KS},yA={},vA=o((t=>{for(const e of t)yA[e.name]=e}),"registerLayoutLoaders");o((()=>{vA([{name:"dagre",loader:o((async()=>await Promise.resolve().then((function(){return lH}))),"loader")}])}),"registerDefaultLayoutLoaders")();var xA=o((async(t,e)=>{if(!(t.layoutAlgorithm in yA))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const n=yA[t.layoutAlgorithm];return(await n.loader()).render(t,e,mA,{algorithm:n.algorithm})}),"render"),bA=o(((t="",{fallback:e="dagre"}={})=>{if(t in yA)return t;if(e in yA)return y.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm"),wA=ub(Object.keys,Object),kA=Object.prototype.hasOwnProperty;function TA(t){if(!fb(t))return wA(t);var e=[];for(var n in Object(t))kA.call(t,n)&&"constructor"!=n&&e.push(n);return e}o(TA,"baseKeys");var _A=TA,EA=Lv(Wy,"DataView"),CA=Lv(Wy,"Promise"),SA=Lv(Wy,"Set"),AA=Lv(Wy,"WeakMap"),LA="[object Map]",NA="[object Promise]",IA="[object Set]",MA="[object WeakMap]",RA="[object DataView]",DA=yv(EA),OA=yv(lx),PA=yv(CA),BA=yv(SA),$A=yv(AA),FA=av;(EA&&FA(new EA(new ArrayBuffer(1)))!=RA||lx&&FA(new lx)!=LA||CA&&FA(CA.resolve())!=NA||SA&&FA(new SA)!=IA||AA&&FA(new AA)!=MA)&&(FA=o((function(t){var e=av(t),n="[object Object]"==e?t.constructor:void 0,r=n?yv(n):"";if(r)switch(r){case DA:return RA;case OA:return LA;case PA:return NA;case BA:return IA;case $A:return MA}return e}),"getTag"));var zA=FA,UA=Object.prototype.hasOwnProperty;function GA(t){if(null==t)return!0;if(Ib(t)&&(Sb(t)||"string"==typeof t||"function"==typeof t.splice||Fb(t)||rw(t)||Cb(t)))return!t.length;var e=zA(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(fb(t))return!_A(t).length;for(var n in t)if(UA.call(t,n))return!1;return!0}o(GA,"isEmpty");var qA=GA,jA={id:"c4",detector:o((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return YV}));return{id:"c4",diagram:t}}),"loader")},YA="flowchart",WA=o(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),HA={id:YA,detector:WA,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return oK}));return{id:YA,diagram:t}}),"loader")},VA="flowchart-v2",XA=o(((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t))),"detector"),KA={id:VA,detector:XA,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return oK}));return{id:VA,diagram:t}}),"loader")},ZA={id:"er",detector:o((t=>/^\s*erDiagram/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return XK}));return{id:"er",diagram:t}}),"loader")},QA="gitGraph",JA={id:QA,detector:o((t=>/^\s*gitGraph/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return zrt}));return{id:QA,diagram:t}}),"loader")},tL="gantt",eL={id:tL,detector:o((t=>/^\s*gantt/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return wat}));return{id:tL,diagram:t}}),"loader")},nL="info",rL={id:nL,detector:o((t=>/^\s*info/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Sat}));return{id:nL,diagram:t}}),"loader")},iL={id:"pie",detector:o((t=>/^\s*pie/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return qat}));return{id:"pie",diagram:t}}),"loader")},aL="quadrantChart",sL={id:aL,detector:o((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return vst}));return{id:aL,diagram:t}}),"loader")},oL="xychart",lL={id:oL,detector:o((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return got}));return{id:oL,diagram:t}}),"loader")},cL="requirement",hL={id:cL,detector:o((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Jot}));return{id:cL,diagram:t}}),"loader")},uL="sequence",dL={id:uL,detector:o((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Fct}));return{id:uL,diagram:t}}),"loader")},pL="class",gL=o(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),fL={id:pL,detector:gL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return jht}));return{id:pL,diagram:t}}),"loader")},mL="classDiagram",yL=o(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),vL={id:mL,detector:yL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Wht}));return{id:mL,diagram:t}}),"loader")},xL="state",bL=o(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),wL={id:xL,detector:bL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Ydt}));return{id:xL,diagram:t}}),"loader")},kL="stateDiagram",TL=o(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),_L={id:kL,detector:TL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Hdt}));return{id:kL,diagram:t}}),"loader")},EL="journey",CL={id:EL,detector:o((t=>/^\s*journey/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Dpt}));return{id:EL,diagram:t}}),"loader")},SL=o(((t,e,n)=>{y.debug("rendering svg for syntax error\n");const r=ng(e),i=r.append("g");r.attr("viewBox","0 0 2412 512"),Nn(r,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)}),"draw"),AL={draw:SL},LL=AL,NL={db:{},renderer:AL,parser:{parse:o((()=>{}),"parse")}},IL="flowchart-elk",ML=o(((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0)),"detector"),RL={id:IL,detector:ML,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return oK}));return{id:IL,diagram:t}}),"loader")},DL="timeline",OL={id:DL,detector:o((t=>/^\s*timeline/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Tgt}));return{id:DL,diagram:t}}),"loader")},PL="mindmap",BL={id:PL,detector:o((t=>/^\s*mindmap/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return rLt}));return{id:PL,diagram:t}}),"loader")},$L="kanban",FL={id:$L,detector:o((t=>/^\s*kanban/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return SLt}));return{id:$L,diagram:t}}),"loader")},zL="sankey",UL={id:zL,detector:o((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return RNt}));return{id:zL,diagram:t}}),"loader")},GL="packet",qL={id:GL,detector:o((t=>/^\s*packet-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return XNt}));return{id:GL,diagram:t}}),"loader")},jL="block",YL={id:jL,detector:o((t=>/^\s*block-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return mRt}));return{id:jL,diagram:t}}),"loader")},WL="architecture",HL={id:WL,detector:o((t=>/^\s*architecture/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return wDt}));return{id:WL,diagram:t}}),"loader")},VL=!1,XL=o((()=>{VL||(VL=!0,rr("error",NL,(t=>"error"===t.toLowerCase().trim())),rr("---",{db:{clear:o((()=>{}),"clear")},styles:{},renderer:{draw:o((()=>{}),"draw")},parser:{parse:o((()=>{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:o((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),C(jA,FL,vL,fL,ZA,eL,rL,iL,hL,dL,RL,KA,HA,BL,OL,JA,_L,wL,CL,sL,UL,qL,lL,YL,HL))}),"addDiagrams"),KL=o((async()=>{y.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(_).map((async([t,{detector:e,loader:n}])=>{if(n)try{ir(t)}catch{try{const{diagram:t,id:r}=await n();rr(r,t,e)}catch(e){throw y.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete _[t],e}}})))).filter((t=>"rejected"===t.status));if(t.length>0){y.error(`Failed to load ${t.length} external diagrams`);for(const e of t)y.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams"),ZL="comm",QL="rule",JL="decl",tN=Math.abs,eN=String.fromCharCode;function nN(t){return t.trim()}function rN(t,e,n){return t.replace(e,n)}function iN(t,e,n){return t.indexOf(e,n)}function aN(t,e){return 0|t.charCodeAt(e)}function sN(t,e,n){return t.slice(e,n)}function oN(t){return t.length}function lN(t){return t.length}function cN(t,e){return e.push(t),t}o(nN,"trim"),o(rN,"replace"),o(iN,"indexof"),o(aN,"charat"),o(sN,"substr"),o(oN,"strlen"),o(lN,"sizeof"),o(cN,"append");var hN=1,uN=1,dN=0,pN=0,gN=0,fN="";function mN(t,e,n,r,i,a,s,o){return{value:t,root:e,parent:n,type:r,props:i,children:a,line:hN,column:uN,length:s,return:"",siblings:o}}function yN(){return gN}function vN(){return gN=pN>0?aN(fN,--pN):0,uN--,10===gN&&(uN=1,hN--),gN}function xN(){return gN=pN2||TN(gN)>3?"":" "}function AN(t,e){for(;--e&&xN()&&!(gN<48||gN>102||gN>57&&gN<65||gN>70&&gN<97););return kN(t,wN()+(e<6&&32==bN()&&32==xN()))}function LN(t){for(;xN();)switch(gN){case t:return pN;case 34:case 39:34!==t&&39!==t&&LN(gN);break;case 40:41===t&&LN(t);break;case 92:xN()}return pN}function NN(t,e){for(;xN()&&t+gN!==57&&(t+gN!==84||47!==bN()););return"/*"+kN(e,pN-1)+"*"+eN(47===t?t:xN())}function IN(t){for(;!TN(bN());)xN();return kN(t,pN)}function MN(t){return EN(RN("",null,null,null,[""],t=_N(t),0,[0],t))}function RN(t,e,n,r,i,a,s,o,l){for(var c=0,h=0,u=s,d=0,p=0,g=0,f=1,m=1,y=1,v=0,x="",b=i,w=a,k=r,T=x;m;)switch(g=v,v=xN()){case 40:if(108!=g&&58==aN(T,u-1)){-1!=iN(T+=rN(CN(v),"&","&\f"),"&\f",tN(c?o[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:T+=CN(v);break;case 9:case 10:case 13:case 32:T+=SN(g);break;case 92:T+=AN(wN()-1,7);continue;case 47:switch(bN()){case 42:case 47:cN(ON(NN(xN(),wN()),e,n,l),l),5!=TN(g||1)&&5!=TN(bN()||1)||!oN(T)||" "===sN(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*f:o[c++]=oN(T)*y;case 125*f:case 59:case 0:switch(v){case 0:case 125:m=0;case 59+h:-1==y&&(T=rN(T,/\f/g,"")),p>0&&(oN(T)-u||0===f&&47===g)&&cN(p>32?PN(T+";",r,n,u-1,l):PN(rN(T," ","")+";",r,n,u-2,l),l);break;case 59:T+=";";default:if(cN(k=DN(T,e,n,c,h,i,o,x,b=[],w=[],u,a),a),123===v)if(0===h)RN(T,e,k,k,b,a,u,o,w);else switch(99===d&&110===aN(T,3)?100:d){case 100:case 108:case 109:case 115:RN(t,k,k,r&&cN(DN(t,k,k,0,0,i,o,x,i,b=[],u,w),w),i,w,u,o,r?b:w);break;default:RN(T,k,k,k,[""],w,0,o,w)}}c=h=p=0,f=y=1,x=T="",u=s;break;case 58:u=1+oN(T),p=g;default:if(f<1)if(123==v)--f;else if(125==v&&0==f++&&125==vN())continue;switch(T+=eN(v),v*f){case 38:y=h>0?1:(T+="\f",-1);break;case 44:o[c++]=(oN(T)-1)*y,y=1;break;case 64:45===bN()&&(T+=CN(xN())),d=bN(),h=u=oN(x=T+=IN(wN())),v++;break;case 45:45===g&&2==oN(T)&&(f=0)}}return a}function DN(t,e,n,r,i,a,s,o,l,c,h,u){for(var d=i-1,p=0===i?a:[""],g=lN(p),f=0,m=0,y=0;f0?p[v]+" "+x:rN(x,/&\f/g,p[v])))&&(l[y++]=b);return mN(t,e,n,0===i?QL:o,l,c,h,u)}function ON(t,e,n,r){return mN(t,e,n,ZL,eN(yN()),sN(t,2,-2),0,r)}function PN(t,e,n,r,i){return mN(t,e,n,JL,sN(t,0,r),sN(t,r+1,-1),r,i)}function BN(t,e){for(var n="",r=0;r{GN.forEach((t=>{t()})),GN=[]}),"attachFunctions"),jN=o((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function YN(t){const e=t.match(b);if(!e)return{text:t,metadata:{}};let n=iy(e[1],{schema:ry})??{};n="object"!=typeof n||Array.isArray(n)?{}:n;const r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:t.slice(e[0].length),metadata:r}}o(YN,"extractFrontMatter");var WN=o((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,n)=>"<"+e+n.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),HN=o((t=>{const{text:e,metadata:n}=YN(t),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||(a.gantt={}),a.gantt.displayMode=r),{title:i,config:a,text:e}}),"processFrontmatter"),VN=o((t=>{const e=Dk.detectInit(t)??{},n=Dk.detectDirective(t,"wrap");return Array.isArray(n)?e.wrap=n.some((({type:t})=>"wrap"===t)):"wrap"===n?.type&&(e.wrap=!0),{text:rk(t),directive:e}}),"processDirectives");function XN(t){const e=WN(t),n=HN(e),r=VN(n.text),i=Rk(n.config,r.directive);return{code:t=jN(r.text),title:n.title,config:i}}function KN(t){const e=(new TextEncoder).encode(t),n=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(n)}o(XN,"preprocessDiagram"),o(KN,"toBase64");var ZN=["foreignobject"],QN=["dominant-baseline"];function JN(t){const e=XN(t);return Yt(),jt(e.config??{}),e}async function tI(t,e){XL();try{const{code:e,config:n}=JN(t);return{diagramType:(await uI(e)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}o(JN,"processAndSetConfigs"),o(tI,"parse");var eI=o(((t,e,n=[])=>`\n.${t} ${e} { ${n.join(" !important; ")} !important; }`),"cssImportantStyles"),nI=o(((t,e=new Map)=>{let n="";if(void 0!==t.themeCSS&&(n+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(n+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const r=["> *","span"],i=["rect","polygon","ellipse","circle","path"],a=t.htmlLabels??t.flowchart?.htmlLabels?r:i;e.forEach((t=>{qA(t.styles)||a.forEach((e=>{n+=eI(t.id,e,t.styles)})),qA(t.textStyles)||(n+=eI(t.id,"tspan",(t?.textStyles||[]).map((t=>t.replace("color","fill")))))}))}return n}),"createCssStyles"),rI=o(((t,e,n,r)=>{const i=nI(t,n);return BN(MN(`${r}{${On(e,i,t.themeVariables)}}`),$N)}),"createUserStyles"),iI=o(((t="",e,n)=>{let r=t;return n||e||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=Pk(r),r=r.replace(/
    /g,"
    "),r}),"cleanUpSvgCode"),aI=o(((t="",e)=>``),"putIntoIFrame"),sI=o(((t,e,n,r,i)=>{const a=t.append("div");a.attr("id",n),r&&a.attr("style",r);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&s.attr("xmlns:xlink",i),s.append("g"),t}),"appendDivSvgG");function oI(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}o(oI,"sandboxedIframe");var lI=o(((t,e,n,r)=>{t.getElementById(e)?.remove(),t.getElementById(n)?.remove(),t.getElementById(r)?.remove()}),"removeExistingElements"),cI=o((async function(e,n,r){XL();const i=JN(n);n=i.code;const a=Gt();y.debug(a),n.length>(a?.maxTextSize??5e4)&&(n="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const s="#"+e,l="i"+e,c="#"+l,h="d"+e,u="#"+h,d=o((()=>{const t=Fa(g?c:u).node();t&&"remove"in t&&t.remove()}),"removeTempElements");let p=Fa("body");const g="sandbox"===a.securityLevel,f="loose"===a.securityLevel,m=a.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),g){const t=oI(Fa(r),l);p=Fa(t.nodes()[0].contentDocument.body),p.node().style.margin=0}else p=Fa(r);sI(p,e,h,`font-family: ${m}`,"http://www.w3.org/1999/xlink")}else{if(lI(document,e,h,l),g){const t=oI(Fa("body"),l);p=Fa(t.nodes()[0].contentDocument.body),p.node().style.margin=0}else p=Fa("body");sI(p,e,h)}let v,x;try{v=await UN.fromText(n,{title:i.title})}catch(t){if(a.suppressErrorRendering)throw d(),t;v=await UN.fromText("error"),x=t}const b=p.select(u).node(),w=v.type,k=b.firstChild,T=k.firstChild,_=v.renderer.getClasses?.(n,v),E=rI(a,w,_,s),C=document.createElement("style");C.innerHTML=E,k.insertBefore(C,T);try{await v.renderer.draw(n,e,t,v)}catch(r){throw a.suppressErrorRendering?d():LL.draw(n,e,t),r}const S=p.select(`${u} svg`),A=v.db.getAccTitle?.(),L=v.db.getAccDescription?.();dI(w,S,A,L),p.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let N=p.select(u).node().innerHTML;if(y.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),N=iI(N,g,fn(a.arrowMarkerAbsolute)),g){const t=p.select(u+" svg").node();N=aI(N,t)}else f||(N=tn.sanitize(N,{ADD_TAGS:ZN,ADD_ATTR:QN,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(qN(),x)throw x;return d(),{diagramType:w,svg:N,bindFunctions:v.db.bindFunctions}}),"render");function hI(t={}){const e=N({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),$t(e),e?.theme&&e.theme in _t?e.themeVariables=_t[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=_t.default.getThemeVariables(e.themeVariables));const n="object"==typeof e?Bt(e):zt();v(n.logLevel),XL()}o(hI,"initialize");var uI=o(((t,e={})=>{const{code:n}=XN(t);return UN.fromText(n,e)}),"getDiagramFromText");function dI(t,e,n,r){FN(e,t),zN(e,n,r,e.attr("id"))}o(dI,"addA11yInfo");var pI=Object.freeze({render:cI,parse:tI,getDiagramFromText:uI,initialize:hI,getConfig:Gt,setConfig:Ut,getSiteConfig:zt,updateSiteConfig:Ft,reset:o((()=>{Yt()}),"reset"),globalReset:o((()=>{Yt(Mt)}),"globalReset"),defaultConfig:Mt});v(Gt().logLevel),Yt(Gt());var gI=o(((t,e,n)=>{y.warn(t),Nk(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))}),"handleError"),fI=o((async function(t={querySelector:".mermaid"}){try{await mI(t)}catch(e){if(Nk(e)&&y.error(e.str),SI.parseError&&SI.parseError(e),!t.suppressErrors)throw y.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),mI=o((async function({postRenderCallback:t,querySelector:e,nodes:n}={querySelector:".mermaid"}){const r=pI.getConfig();let i;if(y.debug((t?"":"No ")+"Callback function found"),n)i=n;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}y.debug(`Found ${i.length} diagrams`),void 0!==r?.startOnLoad&&(y.debug("Start On Load: "+r?.startOnLoad),pI.updateSiteConfig({startOnLoad:r?.startOnLoad}));const a=new Dk.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed);let s;const o=[];for(const e of Array.from(i)){if(y.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const n=`mermaid-${a.next()}`;s=e.innerHTML,s=Fk(Dk.entityDecode(s)).trim().replace(//gi,"
    ");const r=Dk.detectInit(s);r&&y.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await CI(n,s,e);e.innerHTML=r,t&&await t(n),i&&i(e)}catch(t){gI(t,o,SI.parseError)}}if(o.length>0)throw o[0]}),"runThrowsErrors"),yI=o((function(t){pI.initialize(t)}),"initialize"),vI=o((async function(t,e,n){y.warn("mermaid.init is deprecated. Please use run instead."),t&&yI(t);const r={postRenderCallback:n,querySelector:".mermaid"};"string"==typeof e?r.querySelector=e:e&&(e instanceof HTMLElement?r.nodes=[e]:r.nodes=e),await fI(r)}),"init"),xI=o((async(t,{lazyLoad:e=!0}={})=>{XL(),C(...t),!1===e&&await KL()}),"registerExternalDiagrams"),bI=o((function(){if(SI.startOnLoad){const{startOnLoad:t}=pI.getConfig();t&&SI.run().catch((t=>y.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",bI,!1);var wI=o((function(t){SI.parseError=t}),"setParseErrorHandler"),kI=[],TI=!1,_I=o((async()=>{if(!TI){for(TI=!0;kI.length>0;){const t=kI.shift();if(t)try{await t()}catch(t){y.error("Error executing queue",t)}}TI=!1}}),"executeQueue"),EI=o((async(t,e)=>new Promise(((n,r)=>{const i=o((()=>new Promise(((i,a)=>{pI.parse(t,e).then((t=>{i(t),n(t)}),(t=>{y.error("Error parsing",t),SI.parseError?.(t),a(t),r(t)}))}))),"performCall");kI.push(i),_I().catch(r)}))),"parse"),CI=o(((t,e,n)=>new Promise(((r,i)=>{const a=o((()=>new Promise(((a,s)=>{pI.render(t,e,n).then((t=>{a(t),r(t)}),(t=>{y.error("Error parsing",t),SI.parseError?.(t),s(t),i(t)}))}))),"performCall");kI.push(a),_I().catch(i)}))),"render"),SI={startOnLoad:!0,mermaidAPI:pI,parse:EI,render:CI,init:vI,run:fI,registerExternalDiagrams:xI,registerLayoutLoaders:vA,initialize:yI,parseError:void 0,contentLoaded:bI,setParseErrorHandler:wI,detectType:E,registerIconPacks:Fy},AI=SI;function LI(t){let{beforeRender:e,afterRender:n}=t;return function(t){ /*! Check if previously processed */ /*! * Wait for document loaded before starting the execution */ /*! * reveal.js Mermaid plugin */ return async function(t){let{el:e,beforeRender:n,afterRender:r}=t;if(!1===await(null==n?void 0:n(e)))return;const i=e.textContent.trim();try{const{svg:t}=await AI.render(`mermaid-${Math.random().toString(36).substring(2)}`,i);e.innerHTML=t,await(null==r?void 0:r(e))}catch(t){let n="";null!=t&&t.str&&(n=t.str),null!=t&&t.message&&(n=t.message),console.error(n,{error:t,graphDefinition:i,el:e}),e.innerHTML=n}}({el:t,beforeRender:e,afterRender:n})}}const NI={id:"mermaid",init:function(t){const{...e}=t.getConfig().mermaid||{},{...n}=t.getConfig().mermaidPlugin||{},r=LI({beforeRender:n.beforeRender,afterRender:n.afterRender});AI.initialize({startOnLoad:!1,...e});const i=t.getRevealElement().querySelectorAll(".mermaid");Array.from(i).forEach((function(t){r(t)}))}};var II=class t{static{o(this,"SourceLocation")}constructor(t,e,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=n}static range(e,n){return n?e&&e.loc&&n.loc&&e.loc.lexer===n.loc.lexer?new t(e.loc.lexer,e.loc.start,n.loc.end):null:e&&e.loc}},MI=class t{static{o(this,"Token")}constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(e,n){return new t(n,II.range(this,e))}},RI=class t{static{o(this,"ParseError")}constructor(e,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,i,a="KaTeX parse error: "+e,s=n&&n.loc;if(s&&s.start<=s.end){var o=s.lexer.input;r=s.start,i=s.end,r===o.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ";var l=o.slice(r,i).replace(/[^]/g,"$&̲");a+=(r>15?"…"+o.slice(r-15,r):o.slice(0,r))+l+(i+15":">","<":"<",'"':""","'":"'"},FI=/[&><"']/g;function zI(t){return String(t).replace(FI,(t=>$I[t]))}o(zI,"escape");var UI=o((function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e}),"getBaseElem"),GI=o((function(t){var e=UI(t);return"mathord"===e.type||"textord"===e.type||"atom"===e.type}),"isCharacterBox"),qI=o((function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t}),"assert"),jI={contains:DI,deflt:OI,escape:zI,hyphenate:BI,getBaseElem:UI,isCharacterBox:GI,protocolFromUrl:o((function(t){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?":"!==e[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}),"protocolFromUrl")},YI={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:o((t=>"#"+t),"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:o(((t,e)=>(e.push(t),e)),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:o((t=>Math.max(0,t)),"processor"),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:o((t=>Math.max(0,t)),"processor"),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:o((t=>Math.max(0,t)),"processor"),cli:"-e, --max-expand ",cliProcessor:o((t=>"Infinity"===t?1/0:parseInt(t)),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};function WI(t){if(t.default)return t.default;var e=t.type,n=Array.isArray(e)?e[0]:e;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}o(WI,"getDefaultValue");var HI=class{static{o(this,"Settings")}constructor(t){for(var e in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{},YI)if(YI.hasOwnProperty(e)){var n=YI[e];this[e]=void 0!==t[e]?n.processor?n.processor(t[e]):t[e]:WI(n)}}reportNonstrict(t,e,n){var r=this.strict;if("function"==typeof r&&(r=r(t,e,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new RI("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",n);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,n){var r=this.strict;if("function"==typeof r)try{r=r(t,e,n)}catch(t){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+e+" ["+t+"]"),!1)))}isTrusted(t){if(t.url&&!t.protocol){var e=jI.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}var n="function"==typeof this.trust?this.trust(t):this.trust;return Boolean(n)}},VI=class{static{o(this,"Style")}constructor(t,e,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=n}sup(){return XI[KI[this.id]]}sub(){return XI[ZI[this.id]]}fracNum(){return XI[QI[this.id]]}fracDen(){return XI[JI[this.id]]}cramp(){return XI[tM[this.id]]}text(){return XI[eM[this.id]]}isTight(){return this.size>=2}},XI=[new VI(0,0,!1),new VI(1,0,!0),new VI(2,1,!1),new VI(3,1,!0),new VI(4,2,!1),new VI(5,2,!0),new VI(6,3,!1),new VI(7,3,!0)],KI=[4,5,4,5,6,7,6,7],ZI=[5,5,5,5,7,7,7,7],QI=[2,3,4,5,6,7,6,7],JI=[3,3,5,5,7,7,7,7],tM=[1,1,3,3,5,5,7,7],eM=[0,1,2,3,2,3,2,3],nM={DISPLAY:XI[0],TEXT:XI[2],SCRIPT:XI[4],SCRIPTSCRIPT:XI[6]},rM=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function iM(t){for(var e=0;e=i[0]&&t<=i[1])return n.name}return null}o(iM,"scriptFromCodepoint");var aM=[];function sM(t){for(var e=0;e=aM[e]&&t<=aM[e+1])return!0;return!1}rM.forEach((t=>t.blocks.forEach((t=>aM.push(...t))))),o(sM,"supportedCodepoint");var oM=80,lM=o((function(t,e){return"M95,"+(622+t+e)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+t/2.075+" -"+t+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+t)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}),"sqrtMain"),cM=o((function(t,e){return"M263,"+(601+t+e)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+t/2.084+" -"+t+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+t)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}),"sqrtSize1"),hM=o((function(t,e){return"M983 "+(10+t+e)+"\nl"+t/3.13+" -"+t+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+t)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}),"sqrtSize2"),uM=o((function(t,e){return"M424,"+(2398+t+e)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+t/4.223+" -"+t+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+t)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+t)+" "+e+"\nh400000v"+(40+t)+"h-400000z"}),"sqrtSize3"),dM=o((function(t,e){return"M473,"+(2713+t+e)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+t/5.298+" -"+t+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+t)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"}),"sqrtSize4"),pM=o((function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"}),"phasePath"),gM=o((function(t,e,n){return"M702 "+(t+e)+"H400000"+(40+t)+"\nH742v"+(n-54-e-t)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+e+"H400000v"+(40+t)+"H742z"}),"sqrtTall"),fM=o((function(t,e,n){e*=1e3;var r="";switch(t){case"sqrtMain":r=lM(e,oM);break;case"sqrtSize1":r=cM(e,oM);break;case"sqrtSize2":r=hM(e,oM);break;case"sqrtSize3":r=uM(e,oM);break;case"sqrtSize4":r=dM(e,oM);break;case"sqrtTall":r=gM(e,oM,n)}return r}),"sqrtPath"),mM=o((function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}}),"innerPath"),yM={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},vM=o((function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z\nM367 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v602 h84z\nM403 1759 V0 H319 V1759 v"+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+e+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(e+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(e+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(e+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(e+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}),"tallDelim"),xM=class{static{o(this,"DocumentFragment")}constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return jI.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;et.toText()),"toText");return this.children.map(t).join("")}},bM={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},wM={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},kM={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function TM(t,e){bM[t]=e}function _M(t,e,n){if(!bM[e])throw new Error("Font metrics not found for font: "+e+".");var r=t.charCodeAt(0),i=bM[e][r];if(!i&&t[0]in kM&&(r=kM[t[0]].charCodeAt(0),i=bM[e][r]),i||"text"!==n||sM(r)&&(i=bM[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}o(TM,"setFontMetrics"),o(_M,"getCharacterMetrics");var EM={};function CM(t){var e;if(!EM[e=t>=5?0:t>=3?1:2]){var n=EM[e]={cssEmPerMu:wM.quad[e]/18};for(var r in wM)wM.hasOwnProperty(r)&&(n[r]=wM[r][e])}return EM[e]}o(CM,"getGlobalMetrics");var SM=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],AM=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],LM=o((function(t,e){return e.size<2?t:SM[t-1][e.size-1]}),"sizeAtStyle"),NM=class t{static{o(this,"Options")}constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=AM[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return new t(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:LM(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:AM[t-1]})}havingBaseStyle(e){e=e||this.style.text();var n=LM(t.BASESIZE,e);return this.size===n&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=CM(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};NM.BASESIZE=6;var IM={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},MM={ex:!0,em:!0,mu:!0},RM=o((function(t){return"string"!=typeof t&&(t=t.unit),t in IM||t in MM||"ex"===t}),"validUnit"),DM=o((function(t,e){var n;if(t.unit in IM)n=IM[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)n=e.fontMetrics().cssEmPerMu;else{var r;if(r=e.style.isTight()?e.havingStyle(e.style.text()):e,"ex"===t.unit)n=r.fontMetrics().xHeight;else{if("em"!==t.unit)throw new RI("Invalid unit: '"+t.unit+"'");n=r.fontMetrics().quad}r!==e&&(n*=r.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*n,e.maxSize)}),"calculateSize"),OM=o((function(t){return+t.toFixed(4)+"em"}),"makeEm"),PM=o((function(t){return t.filter((t=>t)).join(" ")}),"createClass"),BM=o((function(t,e,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},e){e.style.isTight()&&this.classes.push("mtight");var r=e.getColor();r&&(this.style.color=r)}}),"initNode"),$M=o((function(t){var e=document.createElement(t);for(var n in e.className=PM(this.classes),this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&e.setAttribute(r,this.attributes[r]);for(var i=0;i"}),"toMarkup"),zM=class{static{o(this,"Span")}constructor(t,e,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,BM.call(this,t,n,r),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return jI.contains(this.classes,t)}toNode(){return $M.call(this,"span")}toMarkup(){return FM.call(this,"span")}},UM=class{static{o(this,"Anchor")}constructor(t,e,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,BM.call(this,e,r),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return jI.contains(this.classes,t)}toNode(){return $M.call(this,"a")}toMarkup(){return FM.call(this,"a")}},GM=class{static{o(this,"Img")}constructor(t,e,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=e,this.src=t,this.classes=["mord"],this.style=n}hasClass(t){return jI.contains(this.classes,t)}toNode(){var t=document.createElement("img");for(var e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){var t=''+jI.escape(this.alt)+'0&&((e=document.createElement("span")).style.marginRight=OM(this.italic)),this.classes.length>0&&((e=e||document.createElement("span")).className=PM(this.classes)),this.style)this.style.hasOwnProperty(n)&&((e=e||document.createElement("span")).style[n]=this.style[n]);return e?(e.appendChild(t),e):t}toMarkup(){var t=!1,e="0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=jI.hyphenate(r)+":"+this.style[r]+";");n&&(t=!0,e+=' style="'+jI.escape(n)+'"');var i=jI.escape(this.text);return t?(e+=">",e+=i,e+=""):i}},YM=class{static{o(this,"SvgNode")}constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var n=0;n':''}},HM=class{static{o(this,"LineNode")}constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","line");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var t=" but got "+String(t)+".")}o(VM,"assertSymbolDomNode"),o(XM,"assertSpan");var KM={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ZM={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},QM={math:{},text:{}};function JM(t,e,n,r,i,a){QM[t][i]={font:e,group:n,replace:r},a&&r&&(QM[t][r]=QM[t][i])}o(JM,"defineSymbol");var tR="math",eR="text",nR="main",rR="ams",iR="accent-token",aR="bin",sR="close",oR="inner",lR="mathord",cR="op-token",hR="open",uR="punct",dR="rel",pR="spacing",gR="textord";JM(tR,nR,dR,"≡","\\equiv",!0),JM(tR,nR,dR,"≺","\\prec",!0),JM(tR,nR,dR,"≻","\\succ",!0),JM(tR,nR,dR,"∼","\\sim",!0),JM(tR,nR,dR,"⊥","\\perp"),JM(tR,nR,dR,"⪯","\\preceq",!0),JM(tR,nR,dR,"⪰","\\succeq",!0),JM(tR,nR,dR,"≃","\\simeq",!0),JM(tR,nR,dR,"∣","\\mid",!0),JM(tR,nR,dR,"≪","\\ll",!0),JM(tR,nR,dR,"≫","\\gg",!0),JM(tR,nR,dR,"≍","\\asymp",!0),JM(tR,nR,dR,"∥","\\parallel"),JM(tR,nR,dR,"⋈","\\bowtie",!0),JM(tR,nR,dR,"⌣","\\smile",!0),JM(tR,nR,dR,"⊑","\\sqsubseteq",!0),JM(tR,nR,dR,"⊒","\\sqsupseteq",!0),JM(tR,nR,dR,"≐","\\doteq",!0),JM(tR,nR,dR,"⌢","\\frown",!0),JM(tR,nR,dR,"∋","\\ni",!0),JM(tR,nR,dR,"∝","\\propto",!0),JM(tR,nR,dR,"⊢","\\vdash",!0),JM(tR,nR,dR,"⊣","\\dashv",!0),JM(tR,nR,dR,"∋","\\owns"),JM(tR,nR,uR,".","\\ldotp"),JM(tR,nR,uR,"⋅","\\cdotp"),JM(tR,nR,gR,"#","\\#"),JM(eR,nR,gR,"#","\\#"),JM(tR,nR,gR,"&","\\&"),JM(eR,nR,gR,"&","\\&"),JM(tR,nR,gR,"ℵ","\\aleph",!0),JM(tR,nR,gR,"∀","\\forall",!0),JM(tR,nR,gR,"ℏ","\\hbar",!0),JM(tR,nR,gR,"∃","\\exists",!0),JM(tR,nR,gR,"∇","\\nabla",!0),JM(tR,nR,gR,"♭","\\flat",!0),JM(tR,nR,gR,"ℓ","\\ell",!0),JM(tR,nR,gR,"♮","\\natural",!0),JM(tR,nR,gR,"♣","\\clubsuit",!0),JM(tR,nR,gR,"℘","\\wp",!0),JM(tR,nR,gR,"♯","\\sharp",!0),JM(tR,nR,gR,"♢","\\diamondsuit",!0),JM(tR,nR,gR,"ℜ","\\Re",!0),JM(tR,nR,gR,"♡","\\heartsuit",!0),JM(tR,nR,gR,"ℑ","\\Im",!0),JM(tR,nR,gR,"♠","\\spadesuit",!0),JM(tR,nR,gR,"§","\\S",!0),JM(eR,nR,gR,"§","\\S"),JM(tR,nR,gR,"¶","\\P",!0),JM(eR,nR,gR,"¶","\\P"),JM(tR,nR,gR,"†","\\dag"),JM(eR,nR,gR,"†","\\dag"),JM(eR,nR,gR,"†","\\textdagger"),JM(tR,nR,gR,"‡","\\ddag"),JM(eR,nR,gR,"‡","\\ddag"),JM(eR,nR,gR,"‡","\\textdaggerdbl"),JM(tR,nR,sR,"⎱","\\rmoustache",!0),JM(tR,nR,hR,"⎰","\\lmoustache",!0),JM(tR,nR,sR,"⟯","\\rgroup",!0),JM(tR,nR,hR,"⟮","\\lgroup",!0),JM(tR,nR,aR,"∓","\\mp",!0),JM(tR,nR,aR,"⊖","\\ominus",!0),JM(tR,nR,aR,"⊎","\\uplus",!0),JM(tR,nR,aR,"⊓","\\sqcap",!0),JM(tR,nR,aR,"∗","\\ast"),JM(tR,nR,aR,"⊔","\\sqcup",!0),JM(tR,nR,aR,"◯","\\bigcirc",!0),JM(tR,nR,aR,"∙","\\bullet",!0),JM(tR,nR,aR,"‡","\\ddagger"),JM(tR,nR,aR,"≀","\\wr",!0),JM(tR,nR,aR,"⨿","\\amalg"),JM(tR,nR,aR,"&","\\And"),JM(tR,nR,dR,"⟵","\\longleftarrow",!0),JM(tR,nR,dR,"⇐","\\Leftarrow",!0),JM(tR,nR,dR,"⟸","\\Longleftarrow",!0),JM(tR,nR,dR,"⟶","\\longrightarrow",!0),JM(tR,nR,dR,"⇒","\\Rightarrow",!0),JM(tR,nR,dR,"⟹","\\Longrightarrow",!0),JM(tR,nR,dR,"↔","\\leftrightarrow",!0),JM(tR,nR,dR,"⟷","\\longleftrightarrow",!0),JM(tR,nR,dR,"⇔","\\Leftrightarrow",!0),JM(tR,nR,dR,"⟺","\\Longleftrightarrow",!0),JM(tR,nR,dR,"↦","\\mapsto",!0),JM(tR,nR,dR,"⟼","\\longmapsto",!0),JM(tR,nR,dR,"↗","\\nearrow",!0),JM(tR,nR,dR,"↩","\\hookleftarrow",!0),JM(tR,nR,dR,"↪","\\hookrightarrow",!0),JM(tR,nR,dR,"↘","\\searrow",!0),JM(tR,nR,dR,"↼","\\leftharpoonup",!0),JM(tR,nR,dR,"⇀","\\rightharpoonup",!0),JM(tR,nR,dR,"↙","\\swarrow",!0),JM(tR,nR,dR,"↽","\\leftharpoondown",!0),JM(tR,nR,dR,"⇁","\\rightharpoondown",!0),JM(tR,nR,dR,"↖","\\nwarrow",!0),JM(tR,nR,dR,"⇌","\\rightleftharpoons",!0),JM(tR,rR,dR,"≮","\\nless",!0),JM(tR,rR,dR,"","\\@nleqslant"),JM(tR,rR,dR,"","\\@nleqq"),JM(tR,rR,dR,"⪇","\\lneq",!0),JM(tR,rR,dR,"≨","\\lneqq",!0),JM(tR,rR,dR,"","\\@lvertneqq"),JM(tR,rR,dR,"⋦","\\lnsim",!0),JM(tR,rR,dR,"⪉","\\lnapprox",!0),JM(tR,rR,dR,"⊀","\\nprec",!0),JM(tR,rR,dR,"⋠","\\npreceq",!0),JM(tR,rR,dR,"⋨","\\precnsim",!0),JM(tR,rR,dR,"⪹","\\precnapprox",!0),JM(tR,rR,dR,"≁","\\nsim",!0),JM(tR,rR,dR,"","\\@nshortmid"),JM(tR,rR,dR,"∤","\\nmid",!0),JM(tR,rR,dR,"⊬","\\nvdash",!0),JM(tR,rR,dR,"⊭","\\nvDash",!0),JM(tR,rR,dR,"⋪","\\ntriangleleft"),JM(tR,rR,dR,"⋬","\\ntrianglelefteq",!0),JM(tR,rR,dR,"⊊","\\subsetneq",!0),JM(tR,rR,dR,"","\\@varsubsetneq"),JM(tR,rR,dR,"⫋","\\subsetneqq",!0),JM(tR,rR,dR,"","\\@varsubsetneqq"),JM(tR,rR,dR,"≯","\\ngtr",!0),JM(tR,rR,dR,"","\\@ngeqslant"),JM(tR,rR,dR,"","\\@ngeqq"),JM(tR,rR,dR,"⪈","\\gneq",!0),JM(tR,rR,dR,"≩","\\gneqq",!0),JM(tR,rR,dR,"","\\@gvertneqq"),JM(tR,rR,dR,"⋧","\\gnsim",!0),JM(tR,rR,dR,"⪊","\\gnapprox",!0),JM(tR,rR,dR,"⊁","\\nsucc",!0),JM(tR,rR,dR,"⋡","\\nsucceq",!0),JM(tR,rR,dR,"⋩","\\succnsim",!0),JM(tR,rR,dR,"⪺","\\succnapprox",!0),JM(tR,rR,dR,"≆","\\ncong",!0),JM(tR,rR,dR,"","\\@nshortparallel"),JM(tR,rR,dR,"∦","\\nparallel",!0),JM(tR,rR,dR,"⊯","\\nVDash",!0),JM(tR,rR,dR,"⋫","\\ntriangleright"),JM(tR,rR,dR,"⋭","\\ntrianglerighteq",!0),JM(tR,rR,dR,"","\\@nsupseteqq"),JM(tR,rR,dR,"⊋","\\supsetneq",!0),JM(tR,rR,dR,"","\\@varsupsetneq"),JM(tR,rR,dR,"⫌","\\supsetneqq",!0),JM(tR,rR,dR,"","\\@varsupsetneqq"),JM(tR,rR,dR,"⊮","\\nVdash",!0),JM(tR,rR,dR,"⪵","\\precneqq",!0),JM(tR,rR,dR,"⪶","\\succneqq",!0),JM(tR,rR,dR,"","\\@nsubseteqq"),JM(tR,rR,aR,"⊴","\\unlhd"),JM(tR,rR,aR,"⊵","\\unrhd"),JM(tR,rR,dR,"↚","\\nleftarrow",!0),JM(tR,rR,dR,"↛","\\nrightarrow",!0),JM(tR,rR,dR,"⇍","\\nLeftarrow",!0),JM(tR,rR,dR,"⇏","\\nRightarrow",!0),JM(tR,rR,dR,"↮","\\nleftrightarrow",!0),JM(tR,rR,dR,"⇎","\\nLeftrightarrow",!0),JM(tR,rR,dR,"△","\\vartriangle"),JM(tR,rR,gR,"ℏ","\\hslash"),JM(tR,rR,gR,"▽","\\triangledown"),JM(tR,rR,gR,"◊","\\lozenge"),JM(tR,rR,gR,"Ⓢ","\\circledS"),JM(tR,rR,gR,"®","\\circledR"),JM(eR,rR,gR,"®","\\circledR"),JM(tR,rR,gR,"∡","\\measuredangle",!0),JM(tR,rR,gR,"∄","\\nexists"),JM(tR,rR,gR,"℧","\\mho"),JM(tR,rR,gR,"Ⅎ","\\Finv",!0),JM(tR,rR,gR,"⅁","\\Game",!0),JM(tR,rR,gR,"‵","\\backprime"),JM(tR,rR,gR,"▲","\\blacktriangle"),JM(tR,rR,gR,"▼","\\blacktriangledown"),JM(tR,rR,gR,"■","\\blacksquare"),JM(tR,rR,gR,"⧫","\\blacklozenge"),JM(tR,rR,gR,"★","\\bigstar"),JM(tR,rR,gR,"∢","\\sphericalangle",!0),JM(tR,rR,gR,"∁","\\complement",!0),JM(tR,rR,gR,"ð","\\eth",!0),JM(eR,nR,gR,"ð","ð"),JM(tR,rR,gR,"╱","\\diagup"),JM(tR,rR,gR,"╲","\\diagdown"),JM(tR,rR,gR,"□","\\square"),JM(tR,rR,gR,"□","\\Box"),JM(tR,rR,gR,"◊","\\Diamond"),JM(tR,rR,gR,"¥","\\yen",!0),JM(eR,rR,gR,"¥","\\yen",!0),JM(tR,rR,gR,"✓","\\checkmark",!0),JM(eR,rR,gR,"✓","\\checkmark"),JM(tR,rR,gR,"ℶ","\\beth",!0),JM(tR,rR,gR,"ℸ","\\daleth",!0),JM(tR,rR,gR,"ℷ","\\gimel",!0),JM(tR,rR,gR,"ϝ","\\digamma",!0),JM(tR,rR,gR,"ϰ","\\varkappa"),JM(tR,rR,hR,"┌","\\@ulcorner",!0),JM(tR,rR,sR,"┐","\\@urcorner",!0),JM(tR,rR,hR,"└","\\@llcorner",!0),JM(tR,rR,sR,"┘","\\@lrcorner",!0),JM(tR,rR,dR,"≦","\\leqq",!0),JM(tR,rR,dR,"⩽","\\leqslant",!0),JM(tR,rR,dR,"⪕","\\eqslantless",!0),JM(tR,rR,dR,"≲","\\lesssim",!0),JM(tR,rR,dR,"⪅","\\lessapprox",!0),JM(tR,rR,dR,"≊","\\approxeq",!0),JM(tR,rR,aR,"⋖","\\lessdot"),JM(tR,rR,dR,"⋘","\\lll",!0),JM(tR,rR,dR,"≶","\\lessgtr",!0),JM(tR,rR,dR,"⋚","\\lesseqgtr",!0),JM(tR,rR,dR,"⪋","\\lesseqqgtr",!0),JM(tR,rR,dR,"≑","\\doteqdot"),JM(tR,rR,dR,"≓","\\risingdotseq",!0),JM(tR,rR,dR,"≒","\\fallingdotseq",!0),JM(tR,rR,dR,"∽","\\backsim",!0),JM(tR,rR,dR,"⋍","\\backsimeq",!0),JM(tR,rR,dR,"⫅","\\subseteqq",!0),JM(tR,rR,dR,"⋐","\\Subset",!0),JM(tR,rR,dR,"⊏","\\sqsubset",!0),JM(tR,rR,dR,"≼","\\preccurlyeq",!0),JM(tR,rR,dR,"⋞","\\curlyeqprec",!0),JM(tR,rR,dR,"≾","\\precsim",!0),JM(tR,rR,dR,"⪷","\\precapprox",!0),JM(tR,rR,dR,"⊲","\\vartriangleleft"),JM(tR,rR,dR,"⊴","\\trianglelefteq"),JM(tR,rR,dR,"⊨","\\vDash",!0),JM(tR,rR,dR,"⊪","\\Vvdash",!0),JM(tR,rR,dR,"⌣","\\smallsmile"),JM(tR,rR,dR,"⌢","\\smallfrown"),JM(tR,rR,dR,"≏","\\bumpeq",!0),JM(tR,rR,dR,"≎","\\Bumpeq",!0),JM(tR,rR,dR,"≧","\\geqq",!0),JM(tR,rR,dR,"⩾","\\geqslant",!0),JM(tR,rR,dR,"⪖","\\eqslantgtr",!0),JM(tR,rR,dR,"≳","\\gtrsim",!0),JM(tR,rR,dR,"⪆","\\gtrapprox",!0),JM(tR,rR,aR,"⋗","\\gtrdot"),JM(tR,rR,dR,"⋙","\\ggg",!0),JM(tR,rR,dR,"≷","\\gtrless",!0),JM(tR,rR,dR,"⋛","\\gtreqless",!0),JM(tR,rR,dR,"⪌","\\gtreqqless",!0),JM(tR,rR,dR,"≖","\\eqcirc",!0),JM(tR,rR,dR,"≗","\\circeq",!0),JM(tR,rR,dR,"≜","\\triangleq",!0),JM(tR,rR,dR,"∼","\\thicksim"),JM(tR,rR,dR,"≈","\\thickapprox"),JM(tR,rR,dR,"⫆","\\supseteqq",!0),JM(tR,rR,dR,"⋑","\\Supset",!0),JM(tR,rR,dR,"⊐","\\sqsupset",!0),JM(tR,rR,dR,"≽","\\succcurlyeq",!0),JM(tR,rR,dR,"⋟","\\curlyeqsucc",!0),JM(tR,rR,dR,"≿","\\succsim",!0),JM(tR,rR,dR,"⪸","\\succapprox",!0),JM(tR,rR,dR,"⊳","\\vartriangleright"),JM(tR,rR,dR,"⊵","\\trianglerighteq"),JM(tR,rR,dR,"⊩","\\Vdash",!0),JM(tR,rR,dR,"∣","\\shortmid"),JM(tR,rR,dR,"∥","\\shortparallel"),JM(tR,rR,dR,"≬","\\between",!0),JM(tR,rR,dR,"⋔","\\pitchfork",!0),JM(tR,rR,dR,"∝","\\varpropto"),JM(tR,rR,dR,"◀","\\blacktriangleleft"),JM(tR,rR,dR,"∴","\\therefore",!0),JM(tR,rR,dR,"∍","\\backepsilon"),JM(tR,rR,dR,"▶","\\blacktriangleright"),JM(tR,rR,dR,"∵","\\because",!0),JM(tR,rR,dR,"⋘","\\llless"),JM(tR,rR,dR,"⋙","\\gggtr"),JM(tR,rR,aR,"⊲","\\lhd"),JM(tR,rR,aR,"⊳","\\rhd"),JM(tR,rR,dR,"≂","\\eqsim",!0),JM(tR,nR,dR,"⋈","\\Join"),JM(tR,rR,dR,"≑","\\Doteq",!0),JM(tR,rR,aR,"∔","\\dotplus",!0),JM(tR,rR,aR,"∖","\\smallsetminus"),JM(tR,rR,aR,"⋒","\\Cap",!0),JM(tR,rR,aR,"⋓","\\Cup",!0),JM(tR,rR,aR,"⩞","\\doublebarwedge",!0),JM(tR,rR,aR,"⊟","\\boxminus",!0),JM(tR,rR,aR,"⊞","\\boxplus",!0),JM(tR,rR,aR,"⋇","\\divideontimes",!0),JM(tR,rR,aR,"⋉","\\ltimes",!0),JM(tR,rR,aR,"⋊","\\rtimes",!0),JM(tR,rR,aR,"⋋","\\leftthreetimes",!0),JM(tR,rR,aR,"⋌","\\rightthreetimes",!0),JM(tR,rR,aR,"⋏","\\curlywedge",!0),JM(tR,rR,aR,"⋎","\\curlyvee",!0),JM(tR,rR,aR,"⊝","\\circleddash",!0),JM(tR,rR,aR,"⊛","\\circledast",!0),JM(tR,rR,aR,"⋅","\\centerdot"),JM(tR,rR,aR,"⊺","\\intercal",!0),JM(tR,rR,aR,"⋒","\\doublecap"),JM(tR,rR,aR,"⋓","\\doublecup"),JM(tR,rR,aR,"⊠","\\boxtimes",!0),JM(tR,rR,dR,"⇢","\\dashrightarrow",!0),JM(tR,rR,dR,"⇠","\\dashleftarrow",!0),JM(tR,rR,dR,"⇇","\\leftleftarrows",!0),JM(tR,rR,dR,"⇆","\\leftrightarrows",!0),JM(tR,rR,dR,"⇚","\\Lleftarrow",!0),JM(tR,rR,dR,"↞","\\twoheadleftarrow",!0),JM(tR,rR,dR,"↢","\\leftarrowtail",!0),JM(tR,rR,dR,"↫","\\looparrowleft",!0),JM(tR,rR,dR,"⇋","\\leftrightharpoons",!0),JM(tR,rR,dR,"↶","\\curvearrowleft",!0),JM(tR,rR,dR,"↺","\\circlearrowleft",!0),JM(tR,rR,dR,"↰","\\Lsh",!0),JM(tR,rR,dR,"⇈","\\upuparrows",!0),JM(tR,rR,dR,"↿","\\upharpoonleft",!0),JM(tR,rR,dR,"⇃","\\downharpoonleft",!0),JM(tR,nR,dR,"⊶","\\origof",!0),JM(tR,nR,dR,"⊷","\\imageof",!0),JM(tR,rR,dR,"⊸","\\multimap",!0),JM(tR,rR,dR,"↭","\\leftrightsquigarrow",!0),JM(tR,rR,dR,"⇉","\\rightrightarrows",!0),JM(tR,rR,dR,"⇄","\\rightleftarrows",!0),JM(tR,rR,dR,"↠","\\twoheadrightarrow",!0),JM(tR,rR,dR,"↣","\\rightarrowtail",!0),JM(tR,rR,dR,"↬","\\looparrowright",!0),JM(tR,rR,dR,"↷","\\curvearrowright",!0),JM(tR,rR,dR,"↻","\\circlearrowright",!0),JM(tR,rR,dR,"↱","\\Rsh",!0),JM(tR,rR,dR,"⇊","\\downdownarrows",!0),JM(tR,rR,dR,"↾","\\upharpoonright",!0),JM(tR,rR,dR,"⇂","\\downharpoonright",!0),JM(tR,rR,dR,"⇝","\\rightsquigarrow",!0),JM(tR,rR,dR,"⇝","\\leadsto"),JM(tR,rR,dR,"⇛","\\Rrightarrow",!0),JM(tR,rR,dR,"↾","\\restriction"),JM(tR,nR,gR,"‘","`"),JM(tR,nR,gR,"$","\\$"),JM(eR,nR,gR,"$","\\$"),JM(eR,nR,gR,"$","\\textdollar"),JM(tR,nR,gR,"%","\\%"),JM(eR,nR,gR,"%","\\%"),JM(tR,nR,gR,"_","\\_"),JM(eR,nR,gR,"_","\\_"),JM(eR,nR,gR,"_","\\textunderscore"),JM(tR,nR,gR,"∠","\\angle",!0),JM(tR,nR,gR,"∞","\\infty",!0),JM(tR,nR,gR,"′","\\prime"),JM(tR,nR,gR,"△","\\triangle"),JM(tR,nR,gR,"Γ","\\Gamma",!0),JM(tR,nR,gR,"Δ","\\Delta",!0),JM(tR,nR,gR,"Θ","\\Theta",!0),JM(tR,nR,gR,"Λ","\\Lambda",!0),JM(tR,nR,gR,"Ξ","\\Xi",!0),JM(tR,nR,gR,"Π","\\Pi",!0),JM(tR,nR,gR,"Σ","\\Sigma",!0),JM(tR,nR,gR,"Υ","\\Upsilon",!0),JM(tR,nR,gR,"Φ","\\Phi",!0),JM(tR,nR,gR,"Ψ","\\Psi",!0),JM(tR,nR,gR,"Ω","\\Omega",!0),JM(tR,nR,gR,"A","Α"),JM(tR,nR,gR,"B","Β"),JM(tR,nR,gR,"E","Ε"),JM(tR,nR,gR,"Z","Ζ"),JM(tR,nR,gR,"H","Η"),JM(tR,nR,gR,"I","Ι"),JM(tR,nR,gR,"K","Κ"),JM(tR,nR,gR,"M","Μ"),JM(tR,nR,gR,"N","Ν"),JM(tR,nR,gR,"O","Ο"),JM(tR,nR,gR,"P","Ρ"),JM(tR,nR,gR,"T","Τ"),JM(tR,nR,gR,"X","Χ"),JM(tR,nR,gR,"¬","\\neg",!0),JM(tR,nR,gR,"¬","\\lnot"),JM(tR,nR,gR,"⊤","\\top"),JM(tR,nR,gR,"⊥","\\bot"),JM(tR,nR,gR,"∅","\\emptyset"),JM(tR,rR,gR,"∅","\\varnothing"),JM(tR,nR,lR,"α","\\alpha",!0),JM(tR,nR,lR,"β","\\beta",!0),JM(tR,nR,lR,"γ","\\gamma",!0),JM(tR,nR,lR,"δ","\\delta",!0),JM(tR,nR,lR,"ϵ","\\epsilon",!0),JM(tR,nR,lR,"ζ","\\zeta",!0),JM(tR,nR,lR,"η","\\eta",!0),JM(tR,nR,lR,"θ","\\theta",!0),JM(tR,nR,lR,"ι","\\iota",!0),JM(tR,nR,lR,"κ","\\kappa",!0),JM(tR,nR,lR,"λ","\\lambda",!0),JM(tR,nR,lR,"μ","\\mu",!0),JM(tR,nR,lR,"ν","\\nu",!0),JM(tR,nR,lR,"ξ","\\xi",!0),JM(tR,nR,lR,"ο","\\omicron",!0),JM(tR,nR,lR,"π","\\pi",!0),JM(tR,nR,lR,"ρ","\\rho",!0),JM(tR,nR,lR,"σ","\\sigma",!0),JM(tR,nR,lR,"τ","\\tau",!0),JM(tR,nR,lR,"υ","\\upsilon",!0),JM(tR,nR,lR,"ϕ","\\phi",!0),JM(tR,nR,lR,"χ","\\chi",!0),JM(tR,nR,lR,"ψ","\\psi",!0),JM(tR,nR,lR,"ω","\\omega",!0),JM(tR,nR,lR,"ε","\\varepsilon",!0),JM(tR,nR,lR,"ϑ","\\vartheta",!0),JM(tR,nR,lR,"ϖ","\\varpi",!0),JM(tR,nR,lR,"ϱ","\\varrho",!0),JM(tR,nR,lR,"ς","\\varsigma",!0),JM(tR,nR,lR,"φ","\\varphi",!0),JM(tR,nR,aR,"∗","*",!0),JM(tR,nR,aR,"+","+"),JM(tR,nR,aR,"−","-",!0),JM(tR,nR,aR,"⋅","\\cdot",!0),JM(tR,nR,aR,"∘","\\circ",!0),JM(tR,nR,aR,"÷","\\div",!0),JM(tR,nR,aR,"±","\\pm",!0),JM(tR,nR,aR,"×","\\times",!0),JM(tR,nR,aR,"∩","\\cap",!0),JM(tR,nR,aR,"∪","\\cup",!0),JM(tR,nR,aR,"∖","\\setminus",!0),JM(tR,nR,aR,"∧","\\land"),JM(tR,nR,aR,"∨","\\lor"),JM(tR,nR,aR,"∧","\\wedge",!0),JM(tR,nR,aR,"∨","\\vee",!0),JM(tR,nR,gR,"√","\\surd"),JM(tR,nR,hR,"⟨","\\langle",!0),JM(tR,nR,hR,"∣","\\lvert"),JM(tR,nR,hR,"∥","\\lVert"),JM(tR,nR,sR,"?","?"),JM(tR,nR,sR,"!","!"),JM(tR,nR,sR,"⟩","\\rangle",!0),JM(tR,nR,sR,"∣","\\rvert"),JM(tR,nR,sR,"∥","\\rVert"),JM(tR,nR,dR,"=","="),JM(tR,nR,dR,":",":"),JM(tR,nR,dR,"≈","\\approx",!0),JM(tR,nR,dR,"≅","\\cong",!0),JM(tR,nR,dR,"≥","\\ge"),JM(tR,nR,dR,"≥","\\geq",!0),JM(tR,nR,dR,"←","\\gets"),JM(tR,nR,dR,">","\\gt",!0),JM(tR,nR,dR,"∈","\\in",!0),JM(tR,nR,dR,"","\\@not"),JM(tR,nR,dR,"⊂","\\subset",!0),JM(tR,nR,dR,"⊃","\\supset",!0),JM(tR,nR,dR,"⊆","\\subseteq",!0),JM(tR,nR,dR,"⊇","\\supseteq",!0),JM(tR,rR,dR,"⊈","\\nsubseteq",!0),JM(tR,rR,dR,"⊉","\\nsupseteq",!0),JM(tR,nR,dR,"⊨","\\models"),JM(tR,nR,dR,"←","\\leftarrow",!0),JM(tR,nR,dR,"≤","\\le"),JM(tR,nR,dR,"≤","\\leq",!0),JM(tR,nR,dR,"<","\\lt",!0),JM(tR,nR,dR,"→","\\rightarrow",!0),JM(tR,nR,dR,"→","\\to"),JM(tR,rR,dR,"≱","\\ngeq",!0),JM(tR,rR,dR,"≰","\\nleq",!0),JM(tR,nR,pR," ","\\ "),JM(tR,nR,pR," ","\\space"),JM(tR,nR,pR," ","\\nobreakspace"),JM(eR,nR,pR," ","\\ "),JM(eR,nR,pR," "," "),JM(eR,nR,pR," ","\\space"),JM(eR,nR,pR," ","\\nobreakspace"),JM(tR,nR,pR,null,"\\nobreak"),JM(tR,nR,pR,null,"\\allowbreak"),JM(tR,nR,uR,",",","),JM(tR,nR,uR,";",";"),JM(tR,rR,aR,"⊼","\\barwedge",!0),JM(tR,rR,aR,"⊻","\\veebar",!0),JM(tR,nR,aR,"⊙","\\odot",!0),JM(tR,nR,aR,"⊕","\\oplus",!0),JM(tR,nR,aR,"⊗","\\otimes",!0),JM(tR,nR,gR,"∂","\\partial",!0),JM(tR,nR,aR,"⊘","\\oslash",!0),JM(tR,rR,aR,"⊚","\\circledcirc",!0),JM(tR,rR,aR,"⊡","\\boxdot",!0),JM(tR,nR,aR,"△","\\bigtriangleup"),JM(tR,nR,aR,"▽","\\bigtriangledown"),JM(tR,nR,aR,"†","\\dagger"),JM(tR,nR,aR,"⋄","\\diamond"),JM(tR,nR,aR,"⋆","\\star"),JM(tR,nR,aR,"◃","\\triangleleft"),JM(tR,nR,aR,"▹","\\triangleright"),JM(tR,nR,hR,"{","\\{"),JM(eR,nR,gR,"{","\\{"),JM(eR,nR,gR,"{","\\textbraceleft"),JM(tR,nR,sR,"}","\\}"),JM(eR,nR,gR,"}","\\}"),JM(eR,nR,gR,"}","\\textbraceright"),JM(tR,nR,hR,"{","\\lbrace"),JM(tR,nR,sR,"}","\\rbrace"),JM(tR,nR,hR,"[","\\lbrack",!0),JM(eR,nR,gR,"[","\\lbrack",!0),JM(tR,nR,sR,"]","\\rbrack",!0),JM(eR,nR,gR,"]","\\rbrack",!0),JM(tR,nR,hR,"(","\\lparen",!0),JM(tR,nR,sR,")","\\rparen",!0),JM(eR,nR,gR,"<","\\textless",!0),JM(eR,nR,gR,">","\\textgreater",!0),JM(tR,nR,hR,"⌊","\\lfloor",!0),JM(tR,nR,sR,"⌋","\\rfloor",!0),JM(tR,nR,hR,"⌈","\\lceil",!0),JM(tR,nR,sR,"⌉","\\rceil",!0),JM(tR,nR,gR,"\\","\\backslash"),JM(tR,nR,gR,"∣","|"),JM(tR,nR,gR,"∣","\\vert"),JM(eR,nR,gR,"|","\\textbar",!0),JM(tR,nR,gR,"∥","\\|"),JM(tR,nR,gR,"∥","\\Vert"),JM(eR,nR,gR,"∥","\\textbardbl"),JM(eR,nR,gR,"~","\\textasciitilde"),JM(eR,nR,gR,"\\","\\textbackslash"),JM(eR,nR,gR,"^","\\textasciicircum"),JM(tR,nR,dR,"↑","\\uparrow",!0),JM(tR,nR,dR,"⇑","\\Uparrow",!0),JM(tR,nR,dR,"↓","\\downarrow",!0),JM(tR,nR,dR,"⇓","\\Downarrow",!0),JM(tR,nR,dR,"↕","\\updownarrow",!0),JM(tR,nR,dR,"⇕","\\Updownarrow",!0),JM(tR,nR,cR,"∐","\\coprod"),JM(tR,nR,cR,"⋁","\\bigvee"),JM(tR,nR,cR,"⋀","\\bigwedge"),JM(tR,nR,cR,"⨄","\\biguplus"),JM(tR,nR,cR,"⋂","\\bigcap"),JM(tR,nR,cR,"⋃","\\bigcup"),JM(tR,nR,cR,"∫","\\int"),JM(tR,nR,cR,"∫","\\intop"),JM(tR,nR,cR,"∬","\\iint"),JM(tR,nR,cR,"∭","\\iiint"),JM(tR,nR,cR,"∏","\\prod"),JM(tR,nR,cR,"∑","\\sum"),JM(tR,nR,cR,"⨂","\\bigotimes"),JM(tR,nR,cR,"⨁","\\bigoplus"),JM(tR,nR,cR,"⨀","\\bigodot"),JM(tR,nR,cR,"∮","\\oint"),JM(tR,nR,cR,"∯","\\oiint"),JM(tR,nR,cR,"∰","\\oiiint"),JM(tR,nR,cR,"⨆","\\bigsqcup"),JM(tR,nR,cR,"∫","\\smallint"),JM(eR,nR,oR,"…","\\textellipsis"),JM(tR,nR,oR,"…","\\mathellipsis"),JM(eR,nR,oR,"…","\\ldots",!0),JM(tR,nR,oR,"…","\\ldots",!0),JM(tR,nR,oR,"⋯","\\@cdots",!0),JM(tR,nR,oR,"⋱","\\ddots",!0),JM(tR,nR,gR,"⋮","\\varvdots"),JM(tR,nR,iR,"ˊ","\\acute"),JM(tR,nR,iR,"ˋ","\\grave"),JM(tR,nR,iR,"¨","\\ddot"),JM(tR,nR,iR,"~","\\tilde"),JM(tR,nR,iR,"ˉ","\\bar"),JM(tR,nR,iR,"˘","\\breve"),JM(tR,nR,iR,"ˇ","\\check"),JM(tR,nR,iR,"^","\\hat"),JM(tR,nR,iR,"⃗","\\vec"),JM(tR,nR,iR,"˙","\\dot"),JM(tR,nR,iR,"˚","\\mathring"),JM(tR,nR,lR,"","\\@imath"),JM(tR,nR,lR,"","\\@jmath"),JM(tR,nR,gR,"ı","ı"),JM(tR,nR,gR,"ȷ","ȷ"),JM(eR,nR,gR,"ı","\\i",!0),JM(eR,nR,gR,"ȷ","\\j",!0),JM(eR,nR,gR,"ß","\\ss",!0),JM(eR,nR,gR,"æ","\\ae",!0),JM(eR,nR,gR,"œ","\\oe",!0),JM(eR,nR,gR,"ø","\\o",!0),JM(eR,nR,gR,"Æ","\\AE",!0),JM(eR,nR,gR,"Œ","\\OE",!0),JM(eR,nR,gR,"Ø","\\O",!0),JM(eR,nR,iR,"ˊ","\\'"),JM(eR,nR,iR,"ˋ","\\`"),JM(eR,nR,iR,"ˆ","\\^"),JM(eR,nR,iR,"˜","\\~"),JM(eR,nR,iR,"ˉ","\\="),JM(eR,nR,iR,"˘","\\u"),JM(eR,nR,iR,"˙","\\."),JM(eR,nR,iR,"¸","\\c"),JM(eR,nR,iR,"˚","\\r"),JM(eR,nR,iR,"ˇ","\\v"),JM(eR,nR,iR,"¨",'\\"'),JM(eR,nR,iR,"˝","\\H"),JM(eR,nR,iR,"◯","\\textcircled");var fR={"--":!0,"---":!0,"``":!0,"''":!0};JM(eR,nR,gR,"–","--",!0),JM(eR,nR,gR,"–","\\textendash"),JM(eR,nR,gR,"—","---",!0),JM(eR,nR,gR,"—","\\textemdash"),JM(eR,nR,gR,"‘","`",!0),JM(eR,nR,gR,"‘","\\textquoteleft"),JM(eR,nR,gR,"’","'",!0),JM(eR,nR,gR,"’","\\textquoteright"),JM(eR,nR,gR,"“","``",!0),JM(eR,nR,gR,"“","\\textquotedblleft"),JM(eR,nR,gR,"”","''",!0),JM(eR,nR,gR,"”","\\textquotedblright"),JM(tR,nR,gR,"°","\\degree",!0),JM(eR,nR,gR,"°","\\degree"),JM(eR,nR,gR,"°","\\textdegree",!0),JM(tR,nR,gR,"£","\\pounds"),JM(tR,nR,gR,"£","\\mathsterling",!0),JM(eR,nR,gR,"£","\\pounds"),JM(eR,nR,gR,"£","\\textsterling",!0),JM(tR,rR,gR,"✠","\\maltese"),JM(eR,rR,gR,"✠","\\maltese");var mR,yR,vR='0123456789/@."';for(yR=0;yR0)return BR(i,l,r,e,a.concat(c));if(o){var h,u;if("boldsymbol"===o){var d=FR(i,r,e,a,n);h=d.fontName,u=[d.fontClass]}else s?(h=tD[o].fontName,u=[o]):(h=JR(o,e.fontWeight,e.fontShape),u=[o,e.fontWeight,e.fontShape]);if(PR(i,h,r).metrics)return BR(i,h,r,e,a.concat(u));if(fR.hasOwnProperty(i)&&"Typewriter"===h.slice(0,10)){for(var p=[],g=0;g{if(PM(t.classes)!==PM(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(1===t.classes.length){var n=t.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in t.style)if(t.style.hasOwnProperty(r)&&t.style[r]!==e.style[r])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0}),"canCombine"),GR=o((t=>{for(var e=0;ee&&(e=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}t.height=e,t.depth=n,t.maxFontSize=r}),"sizeElementFromChildren"),jR=o((function(t,e,n,r){var i=new zM(t,e,n,r);return qR(i),i}),"makeSpan"),YR=o(((t,e,n,r)=>new zM(t,e,n,r)),"makeSvgSpan"),WR=o((function(t,e,n){var r=jR([t],[],e);return r.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),r.style.borderBottomWidth=OM(r.height),r.maxFontSize=1,r}),"makeLineSpan"),HR=o((function(t,e,n,r){var i=new UM(t,e,n,r);return qR(i),i}),"makeAnchor"),VR=o((function(t){var e=new xM(t);return qR(e),e}),"makeFragment"),XR=o((function(t,e){return t instanceof xM?jR([],[t],e):t}),"wrapFragment"),KR=o((function(t){if("individualShift"===t.positionType){for(var e=t.children,n=[e[0]],r=-e[0].shift-e[0].elem.depth,i=r,a=1;a{var n=jR(["mspace"],[],e),r=DM(t,e);return n.style.marginRight=OM(r),n}),"makeGlue"),JR=o((function(t,e,n){var r="";switch(t){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=t}return r+"-"+("textbf"===e&&"textit"===n?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")}),"retrieveTextFontName"),tD={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},eD={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},nD=o((function(t,e){var[n,r,i]=eD[t],a=new WM(n),s=new YM([a],{width:OM(r),height:OM(i),style:"width:"+OM(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),o=YR(["overlay"],[s],e);return o.height=i,o.style.height=OM(i),o.style.width=OM(r),o}),"staticSvg"),rD={fontMap:tD,makeSymbol:BR,mathsym:$R,makeSpan:jR,makeSvgSpan:YR,makeLineSpan:WR,makeAnchor:HR,makeFragment:VR,wrapFragment:XR,makeVList:ZR,makeOrd:zR,makeGlue:QR,staticSvg:nD,svgData:eD,tryCombineChars:GR},iD={number:3,unit:"mu"},aD={number:4,unit:"mu"},sD={number:5,unit:"mu"},oD={mord:{mop:iD,mbin:aD,mrel:sD,minner:iD},mop:{mord:iD,mop:iD,mrel:sD,minner:iD},mbin:{mord:aD,mop:aD,mopen:aD,minner:aD},mrel:{mord:sD,mop:sD,mopen:sD,minner:sD},mopen:{},mclose:{mop:iD,mbin:aD,mrel:sD,minner:iD},mpunct:{mord:iD,mop:iD,mrel:sD,mopen:iD,mclose:iD,mpunct:iD,minner:iD},minner:{mord:iD,mop:iD,mbin:aD,mrel:sD,mopen:iD,mpunct:iD,minner:iD}},lD={mord:{mop:iD},mop:{mord:iD,mop:iD},mbin:{},mrel:{},mopen:{},mclose:{mop:iD},mpunct:{},minner:{mop:iD}},cD={},hD={},uD={};function dD(t){for(var{type:e,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l{var n=e.classes[0],r=t.classes[0];"mbin"===n&&jI.contains(vD,r)?e.classes[0]="mord":"mbin"===r&&jI.contains(yD,n)&&(t.classes[0]="mord")}),{node:h},u,d),kD(i,((t,e)=>{var n=ED(e),r=ED(t),i=n&&r?t.hasClass("mtight")?lD[n][r]:oD[n][r]:null;if(i)return rD.makeGlue(i,l)}),{node:h},u,d),i}),"buildExpression"),kD=o((function t(e,n,r,i,a){i&&e.push(i);for(var s=0;sn=>{e.splice(t+1,0,n),s++})(s)}}i&&e.pop()}),"traverseNonSpaceNodes"),TD=o((function(t){return t instanceof xM||t instanceof UM||t instanceof zM&&t.hasClass("enclosing")?t:null}),"checkPartialGroup"),_D=o((function t(e,n){var r=TD(e);if(r){var i=r.children;if(i.length){if("right"===n)return t(i[i.length-1],"right");if("left"===n)return t(i[0],"left")}}return e}),"getOutermostNode"),ED=o((function(t,e){return t?(e&&(t=_D(t,e)),bD[t.classes[0]]||null):null}),"getTypeOfDomTree"),CD=o((function(t,e){var n=["nulldelimiter"].concat(t.baseSizingClasses());return mD(e.concat(n))}),"makeNullDelimiter"),SD=o((function(t,e,n){if(!t)return mD();if(hD[t.type]){var r=hD[t.type](t,e);if(n&&e.size!==n.size){r=mD(e.sizingClasses(n),[r],e);var i=e.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new RI("Got group of unknown type: '"+t.type+"'")}),"buildGroup");function AD(t,e){var n=mD(["base"],t,e),r=mD(["strut"]);return r.style.height=OM(n.height+n.depth),n.depth&&(r.style.verticalAlign=OM(-n.depth)),n.children.unshift(r),n}function LD(t,e){var n=null;1===t.length&&"tag"===t[0].type&&(n=t[0].tag,t=t[0].body);var r,i=wD(t,e,"root");2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,s=[],o=[],l=0;l0&&(s.push(AD(o,e)),o=[]),s.push(i[l]));o.length>0&&s.push(AD(o,e)),n?((a=AD(wD(n,e,!0))).classes=["tag"],s.push(a)):r&&s.push(r);var h=mD(["katex-html"],s);if(h.setAttribute("aria-hidden","true"),a){var u=a.children[0];u.style.height=OM(h.height+h.depth),h.depth&&(u.style.verticalAlign=OM(-h.depth))}return h}function ND(t){return new xM(t)}o(AD,"buildHTMLUnbreakable"),o(LD,"buildHTML"),o(ND,"newDocumentFragment");var ID=class{static{o(this,"MathNode")}constructor(t,e,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=n||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);this.classes.length>0&&(t.className=PM(this.classes));for(var n=0;n0&&(t+=' class ="'+jI.escape(PM(this.classes))+'"'),t+=">";for(var n=0;n"}toText(){return this.children.map((t=>t.toText())).join("")}},MD=class{static{o(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return jI.escape(this.toText())}toText(){return this.text}},RD=class{static{o(this,"SpaceNode")}constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=t>=.05555&&t<=.05556?" ":t>=.1666&&t<=.1667?" ":t>=.2222&&t<=.2223?" ":t>=.2777&&t<=.2778?"  ":t>=-.05556&&t<=-.05555?" ⁣":t>=-.1667&&t<=-.1666?" ⁣":t>=-.2223&&t<=-.2222?" ⁣":t>=-.2778&&t<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",OM(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},DD={MathNode:ID,TextNode:MD,SpaceNode:RD,newDocumentFragment:ND},OD=o((function(t,e,n){return!QM[e][t]||!QM[e][t].replace||55349===t.charCodeAt(0)||fR.hasOwnProperty(t)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(t=QM[e][t].replace),new DD.TextNode(t)}),"makeText"),PD=o((function(t){return 1===t.length?t[0]:new DD.MathNode("mrow",t)}),"makeRow"),BD=o((function(t,e){if("texttt"===e.fontFamily)return"monospace";if("textsf"===e.fontFamily)return"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===e.fontShape&&"textbf"===e.fontWeight)return"bold-italic";if("textit"===e.fontShape)return"italic";if("textbf"===e.fontWeight)return"bold";var n=e.font;if(!n||"mathnormal"===n)return null;var r=t.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===t.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=t.text;return jI.contains(["\\imath","\\jmath"],i)?null:(QM[r][i]&&QM[r][i].replace&&(i=QM[r][i].replace),_M(i,rD.fontMap[n].fontName,r)?rD.fontMap[n].variant:null)}),"getVariant"),$D=o((function(t,e,n){if(1===t.length){var r=zD(t[0],e);return n&&r instanceof ID&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,a=[],s=0;s0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(o),i=o}return a}),"buildExpression"),FD=o((function(t,e,n){return PD($D(t,e,n))}),"buildExpressionRow"),zD=o((function(t,e){if(!t)return new DD.MathNode("mrow");if(uD[t.type])return uD[t.type](t,e);throw new RI("Got group of unknown type: '"+t.type+"'")}),"buildGroup");function UD(t,e,n,r,i){var a,s=$D(t,n);a=1===s.length&&s[0]instanceof ID&&jI.contains(["mrow","mtable"],s[0].type)?s[0]:new DD.MathNode("mrow",s);var o=new DD.MathNode("annotation",[new DD.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new DD.MathNode("semantics",[a,o]),c=new DD.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var h=i?"katex":"katex-mathml";return rD.makeSpan([h],[c])}o(UD,"buildMathML");var GD=o((function(t){return new NM({style:t.displayMode?nM.DISPLAY:nM.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})}),"optionsFromSettings"),qD=o((function(t,e){if(e.displayMode){var n=["katex-display"];e.leqno&&n.push("leqno"),e.fleqn&&n.push("fleqn"),t=rD.makeSpan(n,[t])}return t}),"displayWrap"),jD=o((function(t,e,n){var r,i=GD(n);if("mathml"===n.output)return UD(t,e,i,n.displayMode,!0);if("html"===n.output){var a=LD(t,i);r=rD.makeSpan(["katex"],[a])}else{var s=UD(t,e,i,n.displayMode,!1),o=LD(t,i);r=rD.makeSpan(["katex"],[s,o])}return qD(r,n)}),"buildTree"),YD=o((function(t,e,n){var r=LD(t,GD(n)),i=rD.makeSpan(["katex"],[r]);return qD(i,n)}),"buildHTMLTree"),WD={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},HD=o((function(t){var e=new DD.MathNode("mo",[new DD.TextNode(WD[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e}),"mathMLnode"),VD={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},XD=o((function(t){return"ordgroup"===t.type?t.body.length:1}),"groupLength"),KD=o((function(t,e){function n(){var n=4e5,r=t.label.slice(1);if(jI.contains(["widehat","widecheck","widetilde","utilde"],r)){var i,a,s,o=XD(t.base);if(o>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,s=.42,a=r+"4"):(i=312,n=2340,s=.34,a="tilde4");else{var l=[1,1,2,2,3,3][o];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],i=[0,239,300,360,420][l],s=[0,.24,.3,.3,.36,.42][l],a=r+l):(n=[0,600,1033,2339,2340][l],i=[0,260,286,306,312][l],s=[0,.26,.286,.3,.306,.34][l],a="tilde"+l)}var c=new WM(a),h=new YM([c],{width:"100%",height:OM(s),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:rD.makeSvgSpan([],[h],e),minWidth:0,height:s}}var u,d,p=[],g=VD[r],[f,m,y]=g,v=y/1e3,x=f.length;if(1===x)u=["hide-tail"],d=[g[3]];else if(2===x)u=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");u=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var b=0;b0&&(r.style.minWidth=OM(i)),r}),"svgSpan"),ZD=o((function(t,e,n,r,i){var a,s=t.height+t.depth+n+r;if(/fbox|color|angl/.test(e)){if(a=rD.makeSpan(["stretchy",e],[],i),"fbox"===e){var o=i.color&&i.getColor();o&&(a.style.borderColor=o)}}else{var l=[];/^[bx]cancel$/.test(e)&&l.push(new HM({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&l.push(new HM({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new YM(l,{width:"100%",height:OM(s)});a=rD.makeSvgSpan([],[c],i)}return a.height=s,a.style.height=OM(s),a}),"encloseSpan"),QD={encloseSpan:ZD,mathMLnode:HD,svgSpan:KD};function JD(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function tO(t){var e=eO(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function eO(t){return t&&("atom"===t.type||ZM.hasOwnProperty(t.type))?t:null}o(JD,"assertNodeType"),o(tO,"assertSymbolNodeType"),o(eO,"checkSymbolNodeType");var nO=o(((t,e)=>{var n,r,i;t&&"supsub"===t.type?(n=(r=JD(t.base,"accent")).base,t.base=n,i=XM(SD(t,e)),t.base=r):n=(r=JD(t,"accent")).base;var a=SD(n,e.havingCrampedStyle()),s=0;if(r.isShifty&&jI.isCharacterBox(n)){var o=jI.getBaseElem(n);s=VM(SD(o,e.havingCrampedStyle())).skew}var l,c="\\c"===r.label,h=c?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight);if(r.isStretchy)l=QD.svgSpan(r,e),l=rD.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+OM(2*s)+")",marginLeft:OM(2*s)}:void 0}]},e);else{var u,d;"\\vec"===r.label?(u=rD.staticSvg("vec",e),d=rD.svgData.vec[1]):((u=VM(u=rD.makeOrd({mode:r.mode,text:r.label},e,"textord"))).italic=0,d=u.width,c&&(h+=u.depth)),l=rD.makeSpan(["accent-body"],[u]);var p="\\textcircled"===r.label;p&&(l.classes.push("accent-full"),h=a.height);var g=s;p||(g-=d/2),l.style.left=OM(g),"\\textcircled"===r.label&&(l.style.top=".2em"),l=rD.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:l}]},e)}var f=rD.makeSpan(["mord","accent"],[l],e);return i?(i.children[0]=f,i.height=Math.max(f.height,i.height),i.classes[0]="mord",i):f}),"htmlBuilder$a"),rO=o(((t,e)=>{var n=t.isStretchy?QD.mathMLnode(t.label):new DD.MathNode("mo",[OD(t.label,t.mode)]),r=new DD.MathNode("mover",[zD(t.base,e),n]);return r.setAttribute("accent","true"),r}),"mathmlBuilder$9"),iO=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((t=>"\\"+t)).join("|"));dD({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:o(((t,e)=>{var n=gD(e[0]),r=!iO.test(t.funcName),i=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:i,base:n}}),"handler"),htmlBuilder:nO,mathmlBuilder:rO}),dD({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:o(((t,e)=>{var n=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}}),"handler"),htmlBuilder:nO,mathmlBuilder:rO}),dD({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:o(((t,e)=>{var{parser:n,funcName:r}=t,i=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}}),"handler"),htmlBuilder:o(((t,e)=>{var n=SD(t.base,e),r=QD.svgSpan(t,e),i="\\utilde"===t.label?.12:0,a=rD.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},e);return rD.makeSpan(["mord","accentunder"],[a],e)}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>{var n=QD.mathMLnode(t.label),r=new DD.MathNode("munder",[zD(t.base,e),n]);return r.setAttribute("accentunder","true"),r}),"mathmlBuilder")});var aO=o((t=>{var e=new DD.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e}),"paddedNode");dD({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r,funcName:i}=t;return{type:"xArrow",mode:r.mode,label:i,body:e[0],below:n[0]}},htmlBuilder(t,e){var n,r=e.style,i=e.havingStyle(r.sup()),a=rD.wrapFragment(SD(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd";a.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(r.sub()),(n=rD.wrapFragment(SD(t.below,i,e),e)).classes.push(s+"-arrow-pad"));var o,l=QD.svgSpan(t,e),c=-e.fontMetrics().axisHeight+.5*l.height,h=-e.fontMetrics().axisHeight-.5*l.height-.111;if((a.depth>.25||"\\xleftequilibrium"===t.label)&&(h-=a.depth),n){var u=-e.fontMetrics().axisHeight+n.height+.5*l.height+.111;o=rD.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:u}]},e)}else o=rD.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:l,shift:c}]},e);return o.children[0].children[0].children[1].classes.push("svg-align"),rD.makeSpan(["mrel","x-arrow"],[o],e)},mathmlBuilder(t,e){var n,r=QD.mathMLnode(t.label);if(r.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body){var i=aO(zD(t.body,e));if(t.below){var a=aO(zD(t.below,e));n=new DD.MathNode("munderover",[r,a,i])}else n=new DD.MathNode("mover",[r,i])}else if(t.below){var s=aO(zD(t.below,e));n=new DD.MathNode("munder",[r,s])}else n=aO(),n=new DD.MathNode("mover",[r,n]);return n}});var sO=rD.makeSpan;function oO(t,e){var n=wD(t.body,e,!0);return sO([t.mclass],n,e)}function lO(t,e){var n,r=$D(t.body,e);return"minner"===t.mclass?n=new DD.MathNode("mpadded",r):"mord"===t.mclass?t.isCharacterBox?(n=r[0]).type="mi":n=new DD.MathNode("mi",r):(t.isCharacterBox?(n=r[0]).type="mo":n=new DD.MathNode("mo",r),"mbin"===t.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===t.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===t.mclass||"mclose"===t.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===t.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}o(oO,"htmlBuilder$9"),o(lO,"mathmlBuilder$8"),dD({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:r}=t,i=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:fD(i),isCharacterBox:jI.isCharacterBox(i)}},htmlBuilder:oO,mathmlBuilder:lO});var cO=o((t=>{var e="ordgroup"===t.type&&t.body.length?t.body[0]:t;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family}),"binrelClass");dD({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:cO(e[0]),body:fD(e[1]),isCharacterBox:jI.isCharacterBox(e[1])}}}),dD({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var n,{parser:r,funcName:i}=t,a=e[1],s=e[0];n="\\stackrel"!==i?cO(a):"mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:fD(a)},l={type:"supsub",mode:s.mode,base:o,sup:"\\underset"===i?null:s,sub:"\\underset"===i?s:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:jI.isCharacterBox(l)}},htmlBuilder:oO,mathmlBuilder:lO}),dD({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:cO(e[0]),body:fD(e[0])}},htmlBuilder(t,e){var n=wD(t.body,e,!0),r=rD.makeSpan([t.mclass],n,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(t,e){var n=$D(t.body,e),r=new DD.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var hO={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},uO=o((()=>({type:"styling",body:[],mode:"math",style:"display"})),"newCell"),dO=o((t=>"textord"===t.type&&"@"===t.text),"isStartOfArrow"),pO=o(((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e),"isLabelEnd");function gO(t,e,n){var r=hO[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:r,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[e[0]],[]),n.callFunction("\\Big",[i],[]),n.callFunction("\\\\cdright",[e[1]],[])]};return n.callFunction("\\\\cdparent",[a],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}function fO(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===e[e.length-1].length&&e.pop();break}throw new RI("Expected \\\\ or \\cr or \\end",t.nextToken)}t.consume()}for(var r=[],i=[r],a=0;a-1);else{if(!("<>AV".indexOf(c)>-1))throw new RI('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;pnew DD.MathNode("mrow",[zD(t.fragment,e)])}),dD({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,r=JD(e[0],"ordgroup").body,i="",a=0;a=1114111)throw new RI("\\@char with invalid code point "+i);return o<=65535?s=String.fromCharCode(o):(o-=65536,s=String.fromCharCode(55296+(o>>10),56320+(1023&o))),{type:"textord",mode:n.mode,text:s}}});var mO=o(((t,e)=>{var n=wD(t.body,e.withColor(t.color),!1);return rD.makeFragment(n)}),"htmlBuilder$8"),yO=o(((t,e)=>{var n=$D(t.body,e.withColor(t.color)),r=new DD.MathNode("mstyle",n);return r.setAttribute("mathcolor",t.color),r}),"mathmlBuilder$7");dD({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,r=JD(e[0],"color-token").color,i=e[1];return{type:"color",mode:n.mode,color:r,body:fD(i)}},htmlBuilder:mO,mathmlBuilder:yO}),dD({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:r}=t,i=JD(e[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var a=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:a}},htmlBuilder:mO,mathmlBuilder:yO}),dD({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:r}=t,i="["===r.gullet.future().text?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:i&&JD(i,"size").value}},htmlBuilder(t,e){var n=rD.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=OM(DM(t.size,e)))),n},mathmlBuilder(t,e){var n=new DD.MathNode("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",OM(DM(t.size,e)))),n}});var vO={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},xO=o((t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new RI("Expected a control sequence",t);return e}),"checkControlSequence"),bO=o((t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text&&(e=t.gullet.popToken()),e}),"getRHS"),wO=o(((t,e,n,r)=>{var i=t.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,i,r)}),"letCommand");dD({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var r=e.fetch();if(vO[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=vO[r.text]),JD(e.parseFunction(),"internal");throw new RI("Invalid token after macro prefix",r)}}),dD({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=e.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new RI("Expected a control sequence",r);for(var a,s=0,o=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){a=e.gullet.future(),o[s].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new RI('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new RI('Argument number "'+r.text+'" out of order');s++,o.push([])}else{if("EOF"===r.text)throw new RI("Expected a macro definition");o[s].push(r.text)}var{tokens:l}=e.gullet.consumeArg();return a&&l.unshift(a),"\\edef"!==n&&"\\xdef"!==n||(l=e.gullet.expandTokens(l)).reverse(),e.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:o},n===vO[n]),{type:"internal",mode:e.mode}}}),dD({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=xO(e.gullet.popToken());e.gullet.consumeSpaces();var i=bO(e);return wO(e,r,i,"\\\\globallet"===n),{type:"internal",mode:e.mode}}}),dD({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=xO(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return wO(e,r,a,"\\\\globalfuture"===n),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var kO=o((function(t,e,n){var r=_M(QM.math[t]&&QM.math[t].replace||t,e,n);if(!r)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return r}),"getMetrics"),TO=o((function(t,e,n,r){var i=n.havingBaseStyle(e),a=rD.makeSpan(r.concat(i.sizingClasses(n)),[t],n),s=i.sizeMultiplier/n.sizeMultiplier;return a.height*=s,a.depth*=s,a.maxFontSize=i.sizeMultiplier,a}),"styleWrap"),_O=o((function(t,e,n){var r=e.havingBaseStyle(n),i=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=OM(i),t.height-=i,t.depth+=i}),"centerSpan"),EO=o((function(t,e,n,r,i,a){var s=rD.makeSymbol(t,"Main-Regular",i,r),o=TO(s,e,r,a);return n&&_O(o,r,e),o}),"makeSmallDelim"),CO=o((function(t,e,n,r){return rD.makeSymbol(t,"Size"+e+"-Regular",n,r)}),"mathrmSize"),SO=o((function(t,e,n,r,i,a){var s=CO(t,e,i,r),o=TO(rD.makeSpan(["delimsizing","size"+e],[s],r),nM.TEXT,r,a);return n&&_O(o,r,nM.TEXT),o}),"makeLargeDelim"),AO=o((function(t,e,n){var r;return r="Size1-Regular"===e?"delim-size1":"delim-size4",{type:"elem",elem:rD.makeSpan(["delimsizinginner",r],[rD.makeSpan([],[rD.makeSymbol(t,e,n)])])}}),"makeGlyphSpan"),LO=o((function(t,e,n){var r=bM["Size4-Regular"][t.charCodeAt(0)]?bM["Size4-Regular"][t.charCodeAt(0)][4]:bM["Size1-Regular"][t.charCodeAt(0)][4],i=new WM("inner",mM(t,Math.round(1e3*e))),a=new YM([i],{width:OM(r),height:OM(e),style:"width:"+OM(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),s=rD.makeSvgSpan([],[a],n);return s.height=e,s.style.height=OM(e),s.style.width=OM(r),{type:"elem",elem:s}}),"makeInner"),NO={type:"kern",size:-.008},IO=["|","\\lvert","\\rvert","\\vert"],MO=["\\|","\\lVert","\\rVert","\\Vert"],RO=o((function(t,e,n,r,i,a){var s,o,l,c,h="",u=0;s=l=c=t,o=null;var d="Size1-Regular";"\\uparrow"===t?l=c="⏐":"\\Uparrow"===t?l=c="‖":"\\downarrow"===t?s=l="⏐":"\\Downarrow"===t?s=l="‖":"\\updownarrow"===t?(s="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===t?(s="\\Uparrow",l="‖",c="\\Downarrow"):jI.contains(IO,t)?(l="∣",h="vert",u=333):jI.contains(MO,t)?(l="∥",h="doublevert",u=556):"["===t||"\\lbrack"===t?(s="⎡",l="⎢",c="⎣",d="Size4-Regular",h="lbrack",u=667):"]"===t||"\\rbrack"===t?(s="⎤",l="⎥",c="⎦",d="Size4-Regular",h="rbrack",u=667):"\\lfloor"===t||"⌊"===t?(l=s="⎢",c="⎣",d="Size4-Regular",h="lfloor",u=667):"\\lceil"===t||"⌈"===t?(s="⎡",l=c="⎢",d="Size4-Regular",h="lceil",u=667):"\\rfloor"===t||"⌋"===t?(l=s="⎥",c="⎦",d="Size4-Regular",h="rfloor",u=667):"\\rceil"===t||"⌉"===t?(s="⎤",l=c="⎥",d="Size4-Regular",h="rceil",u=667):"("===t||"\\lparen"===t?(s="⎛",l="⎜",c="⎝",d="Size4-Regular",h="lparen",u=875):")"===t||"\\rparen"===t?(s="⎞",l="⎟",c="⎠",d="Size4-Regular",h="rparen",u=875):"\\{"===t||"\\lbrace"===t?(s="⎧",o="⎨",c="⎩",l="⎪",d="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(s="⎫",o="⎬",c="⎭",l="⎪",d="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(s="⎧",c="⎩",l="⎪",d="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(s="⎫",c="⎭",l="⎪",d="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(s="⎧",c="⎭",l="⎪",d="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(s="⎫",c="⎩",l="⎪",d="Size4-Regular");var p=kO(s,d,i),g=p.height+p.depth,f=kO(l,d,i),m=f.height+f.depth,y=kO(c,d,i),v=y.height+y.depth,x=0,b=1;if(null!==o){var w=kO(o,d,i);x=w.height+w.depth,b=2}var k=g+v+x,T=k+Math.max(0,Math.ceil((e-k)/(b*m)))*b*m,_=r.fontMetrics().axisHeight;n&&(_*=r.sizeMultiplier);var E=T/2-_,C=[];if(h.length>0){var S=T-g-v,A=Math.round(1e3*T),L=vM(h,Math.round(1e3*S)),N=new WM(h,L),I=(u/1e3).toFixed(3)+"em",M=(A/1e3).toFixed(3)+"em",R=new YM([N],{width:I,height:M,viewBox:"0 0 "+u+" "+A}),D=rD.makeSvgSpan([],[R],r);D.height=A/1e3,D.style.width=I,D.style.height=M,C.push({type:"elem",elem:D})}else{if(C.push(AO(c,d,i)),C.push(NO),null===o){var O=T-g-v+.016;C.push(LO(l,O,r))}else{var P=(T-g-v-x)/2+.016;C.push(LO(l,P,r)),C.push(NO),C.push(AO(o,d,i)),C.push(NO),C.push(LO(l,P,r))}C.push(NO),C.push(AO(s,d,i))}var B=r.havingBaseStyle(nM.TEXT),$=rD.makeVList({positionType:"bottom",positionData:E,children:C},B);return TO(rD.makeSpan(["delimsizing","mult"],[$],B),nM.TEXT,r,a)}),"makeStackedDelim"),DO=.08,OO=o((function(t,e,n,r,i){var a=fM(t,r,n),s=new WM(t,a),o=new YM([s],{width:"400em",height:OM(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return rD.makeSvgSpan(["hide-tail"],[o],i)}),"sqrtSvg"),PO=o((function(t,e){var n,r,i=e.havingBaseSizing(),a=WO("\\surd",t*i.sizeMultiplier,jO,i),s=i.sizeMultiplier,o=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),l=0,c=0,h=0;return"small"===a.type?(t<1?s=1:t<1.4&&(s=.7),c=(1+o)/s,(n=OO("sqrtMain",l=(1+o+DO)/s,h=1e3+1e3*o+80,o,e)).style.minWidth="0.853em",r=.833/s):"large"===a.type?(h=1080*zO[a.size],c=(zO[a.size]+o)/s,l=(zO[a.size]+o+DO)/s,(n=OO("sqrtSize"+a.size,l,h,o,e)).style.minWidth="1.02em",r=1/s):(l=t+o+DO,c=t+o,h=Math.floor(1e3*t+o)+80,(n=OO("sqrtTall",l,h,o,e)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=OM(l),{span:n,advanceWidth:r,ruleWidth:(e.fontMetrics().sqrtRuleThickness+o)*s}}),"makeSqrtImage"),BO=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],$O=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],FO=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],zO=[0,1.2,1.8,2.4,3],UO=o((function(t,e,n,r,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),jI.contains(BO,t)||jI.contains(FO,t))return SO(t,e,!1,n,r,i);if(jI.contains($O,t))return RO(t,zO[e],!1,n,r,i);throw new RI("Illegal delimiter: '"+t+"'")}),"makeSizedDelim"),GO=[{type:"small",style:nM.SCRIPTSCRIPT},{type:"small",style:nM.SCRIPT},{type:"small",style:nM.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],qO=[{type:"small",style:nM.SCRIPTSCRIPT},{type:"small",style:nM.SCRIPT},{type:"small",style:nM.TEXT},{type:"stack"}],jO=[{type:"small",style:nM.SCRIPTSCRIPT},{type:"small",style:nM.SCRIPT},{type:"small",style:nM.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],YO=o((function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")}),"delimTypeToFont"),WO=o((function(t,e,n,r){for(var i=Math.min(2,3-r.style.size);ie)return n[i]}return n[n.length-1]}),"traverseSequence"),HO=o((function(t,e,n,r,i,a){var s;"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),s=jI.contains(FO,t)?GO:jI.contains(BO,t)?jO:qO;var o=WO(t,e,s,r);return"small"===o.type?EO(t,o.style,n,r,i,a):"large"===o.type?SO(t,o.size,n,r,i,a):RO(t,e,n,r,i,a)}),"makeCustomSizedDelim"),VO=o((function(t,e,n,r,i,a){var s=r.fontMetrics().axisHeight*r.sizeMultiplier,o=5/r.fontMetrics().ptPerEm,l=Math.max(e-s,n+s),c=Math.max(l/500*901,2*l-o);return HO(t,c,!0,r,i,a)}),"makeLeftRightDelim"),XO={sqrtImage:PO,sizedDelim:UO,sizeToMaxHeight:zO,customSizedDelim:HO,leftRightDelim:VO},KO={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},ZO=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function QO(t,e){var n=eO(t);if(n&&jI.contains(ZO,n.text))return n;throw new RI(n?"Invalid delimiter '"+n.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function JO(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}o(QO,"checkDelimiter"),dD({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:o(((t,e)=>{var n=QO(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:KO[t.funcName].size,mclass:KO[t.funcName].mclass,delim:n.text}}),"handler"),htmlBuilder:o(((t,e)=>"."===t.delim?rD.makeSpan([t.mclass]):XO.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass])),"htmlBuilder"),mathmlBuilder:o((t=>{var e=[];"."!==t.delim&&e.push(OD(t.delim,t.mode));var n=new DD.MathNode("mo",e);"mopen"===t.mclass||"mclose"===t.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=OM(XO.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}),"mathmlBuilder")}),o(JO,"assertParsed"),dD({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:o(((t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new RI("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:QO(e[0],t).text,color:n}}),"handler")}),dD({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:o(((t,e)=>{var n=QO(e[0],t),r=t.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=JD(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}}),"handler"),htmlBuilder:o(((t,e)=>{JO(t);for(var n,r,i=wD(t.body,e,!0,["mopen","mclose"]),a=0,s=0,o=!1,l=0;l{JO(t);var n=$D(t.body,e);if("."!==t.left){var r=new DD.MathNode("mo",[OD(t.left,t.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==t.right){var i=new DD.MathNode("mo",[OD(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),n.push(i)}return PD(n)}),"mathmlBuilder")}),dD({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:o(((t,e)=>{var n=QO(e[0],t);if(!t.parser.leftrightDepth)throw new RI("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}}),"handler"),htmlBuilder:o(((t,e)=>{var n;if("."===t.delim)n=CD(e,[]);else{n=XO.sizedDelim(t.delim,1,e,t.mode,[]);var r={delim:t.delim,options:e};n.isMiddle=r}return n}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>{var n="\\vert"===t.delim||"|"===t.delim?OD("|","text"):OD(t.delim,t.mode),r=new DD.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}),"mathmlBuilder")});var tP=o(((t,e)=>{var n,r,i=rD.wrapFragment(SD(t.body,e),e),a=t.label.slice(1),s=e.sizeMultiplier,o=0,l=jI.isCharacterBox(t.body);if("sout"===a)(n=rD.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/s,o=-.5*e.fontMetrics().xHeight;else if("phase"===a){var c=DM({number:.6,unit:"pt"},e),h=DM({number:.35,unit:"ex"},e);s/=e.havingBaseSizing().sizeMultiplier;var u=i.height+i.depth+c+h;i.style.paddingLeft=OM(u/2+c);var d=Math.floor(1e3*u*s),p=pM(d),g=new YM([new WM("phase",p)],{width:"400em",height:OM(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(n=rD.makeSvgSpan(["hide-tail"],[g],e)).style.height=OM(u),o=i.depth+c+h}else{/cancel/.test(a)?l||i.classes.push("cancel-pad"):"angl"===a?i.classes.push("anglpad"):i.classes.push("boxpad");var f=0,m=0,y=0;/box/.test(a)?(y=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),m=f=e.fontMetrics().fboxsep+("colorbox"===a?0:y)):"angl"===a?(f=4*(y=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),m=Math.max(0,.25-i.depth)):m=f=l?.2:0,n=QD.encloseSpan(i,a,f,m,e),/fbox|boxed|fcolorbox/.test(a)?(n.style.borderStyle="solid",n.style.borderWidth=OM(y)):"angl"===a&&.049!==y&&(n.style.borderTopWidth=OM(y),n.style.borderRightWidth=OM(y)),o=i.depth+m,t.backgroundColor&&(n.style.backgroundColor=t.backgroundColor,t.borderColor&&(n.style.borderColor=t.borderColor))}if(t.backgroundColor)r=rD.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:o},{type:"elem",elem:i,shift:0}]},e);else{var v=/cancel|phase/.test(a)?["svg-align"]:[];r=rD.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:n,shift:o,wrapperClasses:v}]},e)}return/cancel/.test(a)&&(r.height=i.height,r.depth=i.depth),/cancel/.test(a)&&!l?rD.makeSpan(["mord","cancel-lap"],[r],e):rD.makeSpan(["mord"],[r],e)}),"htmlBuilder$7"),eP=o(((t,e)=>{var n=0,r=new DD.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[zD(t.body,e)]);switch(t.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===t.label){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r}),"mathmlBuilder$6");dD({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:r,funcName:i}=t,a=JD(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:tP,mathmlBuilder:eP}),dD({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:r,funcName:i}=t,a=JD(e[0],"color-token").color,s=JD(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:tP,mathmlBuilder:eP}),dD({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}}),dD({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t,i=e[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:tP,mathmlBuilder:eP}),dD({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var nP={};function rP(t){for(var{type:e,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{if(!t.parser.settings.displayMode)throw new RI("{"+t.envName+"} can be used only in display mode.")}),"validateAmsEnvironmentContext");function lP(t){if(-1===t.indexOf("ed"))return-1===t.indexOf("*")}function cP(t,e,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:s,colSeparationType:l,autoTag:c,singleRow:h,emptySingleRow:u,maxNumCols:d,leqno:p}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!s){var g=t.gullet.expandMacroAsText("\\arraystretch");if(null==g)s=1;else if(!(s=parseFloat(g))||s<0)throw new RI("Invalid \\arraystretch: "+g)}t.gullet.beginGroup();var f=[],m=[f],y=[],v=[],x=null!=c?[]:void 0;function b(){c&&t.gullet.macros.set("\\@eqnsw","1",!0)}function w(){x&&(t.gullet.macros.get("\\df@tag")?(x.push(t.subparse([new MI("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(c)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(o(b,"beginRow"),o(w,"endRow"),b(),v.push(sP(t));;){var k=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),k={type:"ordgroup",mode:t.mode,body:k},n&&(k={type:"styling",mode:t.mode,style:n,body:[k]}),f.push(k);var T=t.fetch().text;if("&"===T){if(d&&f.length===d){if(h||l)throw new RI("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===T){w(),1===f.length&&"styling"===k.type&&0===k.body[0].body.length&&(m.length>1||!u)&&m.pop(),v.length0&&(v+=.25),c.push({pos:v,isDashed:t[e]})}for(o(x,"setHLinePos"),x(a[0]),n=0;n0&&(k<(C+=y)&&(k=C),C=0),t.addJot&&(k+=g),T.height=w,T.depth=k,v+=w,T.pos=v,v+=k+C,l[n]=T,x(a[n+1])}var S,A,L=v/2+e.fontMetrics().axisHeight,N=t.cols||[],I=[],M=[];if(t.tags&&t.tags.some((t=>t)))for(n=0;n=s)){var G=void 0;(r>0||t.hskipBeforeAndAfter)&&0!==(G=jI.deflt(B.pregap,d))&&((S=rD.makeSpan(["arraycolsep"],[])).style.width=OM(G),I.push(S));var q=[];for(n=0;n0){for(var H=rD.makeLineSpan("hline",e,h),V=rD.makeLineSpan("hdashline",e,h),X=[{type:"elem",elem:l,shift:0}];c.length>0;){var K=c.pop(),Z=K.pos-L;K.isDashed?X.push({type:"elem",elem:V,shift:Z}):X.push({type:"elem",elem:H,shift:Z})}l=rD.makeVList({positionType:"individualShift",children:X},e)}if(0===M.length)return rD.makeSpan(["mord"],[l],e);var Q=rD.makeVList({positionType:"individualShift",children:M},e);return Q=rD.makeSpan(["tag"],[Q],e),rD.makeFragment([l,Q])}),"htmlBuilder"),dP={c:"center ",l:"left ",r:"right "},pP=o((function(t,e){for(var n=[],r=new DD.MathNode("mtd",[],["mtr-glue"]),i=new DD.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var p=t.cols,g="",f=!1,m=0,y=p.length;"separator"===p[0].type&&(u+="top ",m=1),"separator"===p[p.length-1].type&&(u+="bottom ",y-=1);for(var v=m;v0?"left ":"",u+=T[T.length-1].length>0?"right ":"";for(var _=1;_-1?"alignat":"align",a="split"===t.envName,s=cP(t.parser,{cols:r,addJot:!0,autoTag:a?void 0:lP(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),o=0,l={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&"ordgroup"===e[0].type){for(var c="",h=0;h0&&u&&(g=1),r[d]={type:"align",align:p,pregap:g,postgap:0}}return s.colSeparationType=u?"align":"alignat",s}),"alignedHandler");rP({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=(eO(e[0])?[e[0]]:JD(e[0],"ordgroup").body).map((function(t){var e=tO(t).text;if(-1!=="lcr".indexOf(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new RI("Unknown column alignment: "+e,t)})),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return cP(t.parser,r,hP(t.envName))},htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===t.envName.charAt(t.envName.length-1)){var i=t.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,-1==="lcr".indexOf(n))throw new RI("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var a=cP(t.parser,r,hP(t.envName)),s=Math.max(0,...a.body.map((t=>t.length)));return a.cols=new Array(s).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e=cP(t.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=(eO(e[0])?[e[0]]:JD(e[0],"ordgroup").body).map((function(t){var e=tO(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new RI("Unknown column alignment: "+e,t)}));if(n.length>1)throw new RI("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=cP(t.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new RI("{subarray} can contain only one column");return r},htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e=cP(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},hP(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:gP,htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){jI.contains(["gather","gather*"],t.envName)&&oP(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:lP(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return cP(t.parser,e,"display")},htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:gP,htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){oP(t);var e={autoTag:lP(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return cP(t.parser,e,"display")},htmlBuilder:uP,mathmlBuilder:pP}),rP({type:"array",names:["CD"],props:{numArgs:0},handler:t=>(oP(t),fO(t.parser)),htmlBuilder:uP,mathmlBuilder:pP}),aP("\\nonumber","\\gdef\\@eqnsw{0}"),aP("\\notag","\\nonumber"),dD({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new RI(t.funcName+" valid only within array environment")}});var fP=nP;dD({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:r}=t,i=e[0];if("ordgroup"!==i.type)throw new RI("Invalid environment name",i);for(var a="",s=0;s{var n=t.font,r=e.withFont(n);return SD(t.body,r)}),"htmlBuilder$5"),yP=o(((t,e)=>{var n=t.font,r=e.withFont(n);return zD(t.body,r)}),"mathmlBuilder$4"),vP={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};dD({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:o(((t,e)=>{var{parser:n,funcName:r}=t,i=gD(e[0]),a=r;return a in vP&&(a=vP[a]),{type:"font",mode:n.mode,font:a.slice(1),body:i}}),"handler"),htmlBuilder:mP,mathmlBuilder:yP}),dD({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:o(((t,e)=>{var{parser:n}=t,r=e[0],i=jI.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:cO(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}),"handler")}),dD({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:o(((t,e)=>{var{parser:n,funcName:r,breakOnTokenText:i}=t,{mode:a}=n,s=n.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:s}}}),"handler"),htmlBuilder:mP,mathmlBuilder:yP});var xP=o(((t,e)=>{var n=e;return"display"===t?n=n.id>=nM.SCRIPT.id?n.text():nM.DISPLAY:"text"===t&&n.size===nM.DISPLAY.size?n=nM.TEXT:"script"===t?n=nM.SCRIPT:"scriptscript"===t&&(n=nM.SCRIPTSCRIPT),n}),"adjustStyle"),bP=o(((t,e)=>{var n,r=xP(t.size,e.style),i=r.fracNum(),a=r.fracDen();n=e.havingStyle(i);var s=SD(t.numer,n,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height0?3*u:7*u,g=e.fontMetrics().denom1):(h>0?(d=e.fontMetrics().num2,p=u):(d=e.fontMetrics().num3,p=3*u),g=e.fontMetrics().denom2),c){var b=e.fontMetrics().axisHeight;d-s.depth-(b+.5*h){var n=new DD.MathNode("mfrac",[zD(t.numer,e),zD(t.denom,e)]);if(t.hasBarLine){if(t.barSize){var r=DM(t.barSize,e);n.setAttribute("linethickness",OM(r))}}else n.setAttribute("linethickness","0px");var i=xP(t.size,e.style);if(i.size!==e.style.size){n=new DD.MathNode("mstyle",[n]);var a=i.size===nM.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",a),n.setAttribute("scriptlevel","0")}if(null!=t.leftDelim||null!=t.rightDelim){var s=[];if(null!=t.leftDelim){var o=new DD.MathNode("mo",[new DD.TextNode(t.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(n),null!=t.rightDelim){var l=new DD.MathNode("mo",[new DD.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return PD(s)}return n}),"mathmlBuilder$3");dD({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:o(((t,e)=>{var n,{parser:r,funcName:i}=t,a=e[0],s=e[1],o=null,l=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,o="(",l=")";break;case"\\\\bracefrac":n=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:a,denom:s,hasBarLine:n,leftDelim:o,rightDelim:l,size:c,barSize:null}}),"handler"),htmlBuilder:bP,mathmlBuilder:wP}),dD({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:o(((t,e)=>{var{parser:n,funcName:r}=t,i=e[0],a=e[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}),"handler")}),dD({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:n,funcName:r,token:i}=t;switch(r){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:e,token:i}}});var kP=["display","text","script","scriptscript"],TP=o((function(t){var e=null;return t.length>0&&(e="."===(e=t)?null:e),e}),"delimFromValue");dD({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var n,{parser:r}=t,i=e[4],a=e[5],s=gD(e[0]),o="atom"===s.type&&"open"===s.family?TP(s.text):null,l=gD(e[1]),c="atom"===l.type&&"close"===l.family?TP(l.text):null,h=JD(e[2],"size"),u=null;n=!!h.isBlank||(u=h.value).number>0;var d="auto",p=e[3];if("ordgroup"===p.type){if(p.body.length>0){var g=JD(p.body[0],"textord");d=kP[Number(g.text)]}}else p=JD(p,"textord"),d=kP[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:n,barSize:u,leftDelim:o,rightDelim:c,size:d}},htmlBuilder:bP,mathmlBuilder:wP}),dD({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:r,token:i}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:JD(e[0],"size").value,token:i}}}),dD({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:o(((t,e)=>{var{parser:n,funcName:r}=t,i=e[0],a=qI(JD(e[1],"infix").size),s=e[2],o=a.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}}),"handler"),htmlBuilder:bP,mathmlBuilder:wP});var _P=o(((t,e)=>{var n,r,i=e.style;"supsub"===t.type?(n=t.sup?SD(t.sup,e.havingStyle(i.sup()),e):SD(t.sub,e.havingStyle(i.sub()),e),r=JD(t.base,"horizBrace")):r=JD(t,"horizBrace");var a,s=SD(r.base,e.havingBaseStyle(nM.DISPLAY)),o=QD.svgSpan(r,e);if(r.isOver?(a=rD.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e)).children[0].children[0].children[1].classes.push("svg-align"):(a=rD.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=rD.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e);a=r.isOver?rD.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):rD.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return rD.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e)}),"htmlBuilder$3");dD({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:_P,mathmlBuilder:o(((t,e)=>{var n=QD.mathMLnode(t.label);return new DD.MathNode(t.isOver?"mover":"munder",[zD(t.base,e),n])}),"mathmlBuilder$2")}),dD({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:o(((t,e)=>{var{parser:n}=t,r=e[1],i=JD(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:fD(r)}:n.formatUnsupportedCmd("\\href")}),"handler"),htmlBuilder:o(((t,e)=>{var n=wD(t.body,e,!1);return rD.makeAnchor(t.href,[],n,e)}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>{var n=FD(t.body,e);return n instanceof ID||(n=new ID("mrow",[n])),n.setAttribute("href",t.href),n}),"mathmlBuilder")}),dD({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:o(((t,e)=>{var{parser:n}=t,r=JD(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],a=0;anew DD.MathNode("mrow",$D(t.body,e))}),dD({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:o(((t,e)=>{var n,{parser:r,funcName:i,token:a}=t,s=JD(e[0],"raw").string,o=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(i){case"\\htmlClass":l.class=s,n={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,n={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,n={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var c=s.split(","),h=0;h{var n=wD(t.body,e,!1),r=["enclosing"];t.attributes.class&&r.push(...t.attributes.class.trim().split(/\s+/));var i=rD.makeSpan(r,n,e);for(var a in t.attributes)"class"!==a&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>FD(t.body,e)),"mathmlBuilder")}),dD({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:o(((t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:fD(e[0]),mathml:fD(e[1])}}),"handler"),htmlBuilder:o(((t,e)=>{var n=wD(t.html,e,!1);return rD.makeFragment(n)}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>FD(t.mathml,e)),"mathmlBuilder")});var EP=o((function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new RI("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(e[1]+e[2]),unit:e[3]};if(!RM(n))throw new RI("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n}),"sizeData");dD({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:o(((t,e,n)=>{var{parser:r}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(n[0])for(var l=JD(n[0],"raw").string.split(","),c=0;c{var n=DM(t.height,e),r=0;t.totalheight.number>0&&(r=DM(t.totalheight,e)-n);var i=0;t.width.number>0&&(i=DM(t.width,e));var a={height:OM(n+r)};i>0&&(a.width=OM(i)),r>0&&(a.verticalAlign=OM(-r));var s=new GM(t.src,t.alt,a);return s.height=n,s.depth=r,s}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>{var n=new DD.MathNode("mglyph",[]);n.setAttribute("alt",t.alt);var r=DM(t.height,e),i=0;if(t.totalheight.number>0&&(i=DM(t.totalheight,e)-r,n.setAttribute("valign",OM(-i))),n.setAttribute("height",OM(r+i)),t.width.number>0){var a=DM(t.width,e);n.setAttribute("width",OM(a))}return n.setAttribute("src",t.src),n}),"mathmlBuilder")}),dD({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,i=JD(e[0],"size");if(n.settings.strict){var a="m"===r[1],s="mu"===i.value.unit;a?(s||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:(t,e)=>rD.makeGlue(t.dimension,e),mathmlBuilder(t,e){var n=DM(t.dimension,e);return new DD.SpaceNode(n)}}),dD({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:o(((t,e)=>{var{parser:n,funcName:r}=t,i=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}}),"handler"),htmlBuilder:o(((t,e)=>{var n;"clap"===t.alignment?(n=rD.makeSpan([],[SD(t.body,e)]),n=rD.makeSpan(["inner"],[n],e)):n=rD.makeSpan(["inner"],[SD(t.body,e)]);var r=rD.makeSpan(["fix"],[]),i=rD.makeSpan([t.alignment],[n,r],e),a=rD.makeSpan(["strut"]);return a.style.height=OM(i.height+i.depth),i.depth&&(a.style.verticalAlign=OM(-i.depth)),i.children.unshift(a),i=rD.makeSpan(["thinbox"],[i],e),rD.makeSpan(["mord","vbox"],[i],e)}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>{var n=new DD.MathNode("mpadded",[zD(t.body,e)]);if("rlap"!==t.alignment){var r="llap"===t.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}),"mathmlBuilder")}),dD({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:r}=t,i=r.mode;r.switchMode("math");var a="\\("===n?"\\)":"$",s=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:s}}}),dD({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new RI("Mismatched "+t.funcName)}});var CP=o(((t,e)=>{switch(e.style.size){case nM.DISPLAY.size:return t.display;case nM.TEXT.size:return t.text;case nM.SCRIPT.size:return t.script;case nM.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}}),"chooseMathStyle");dD({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:o(((t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:fD(e[0]),text:fD(e[1]),script:fD(e[2]),scriptscript:fD(e[3])}}),"handler"),htmlBuilder:o(((t,e)=>{var n=CP(t,e),r=wD(n,e,!1);return rD.makeFragment(r)}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>{var n=CP(t,e);return FD(n,e)}),"mathmlBuilder")});var SP=o(((t,e,n,r,i,a,s)=>{t=rD.makeSpan([],[t]);var o,l,c,h=n&&jI.isCharacterBox(n);if(e){var u=SD(e,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=SD(n,r.havingStyle(i.sub()),r);o={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(l&&o){var p=r.fontMetrics().bigOpSpacing5+o.elem.height+o.elem.depth+o.kern+t.depth+s;c=rD.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:OM(-a)},{type:"kern",size:o.kern},{type:"elem",elem:t},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:OM(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(o){var g=t.height-s;c=rD.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:OM(-a)},{type:"kern",size:o.kern},{type:"elem",elem:t}]},r)}else{if(!l)return t;var f=t.depth+s;c=rD.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:t},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:OM(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var m=[c];if(o&&0!==a&&!h){var y=rD.makeSpan(["mspace"],[],r);y.style.marginRight=OM(a),m.unshift(y)}return rD.makeSpan(["mop","op-limits"],m,r)}),"assembleSupSub"),AP=["\\smallint"],LP=o(((t,e)=>{var n,r,i,a=!1;"supsub"===t.type?(n=t.sup,r=t.sub,i=JD(t.base,"op"),a=!0):i=JD(t,"op");var s,o=e.style,l=!1;if(o.size===nM.DISPLAY.size&&i.symbol&&!jI.contains(AP,i.name)&&(l=!0),i.symbol){var c=l?"Size2-Regular":"Size1-Regular",h="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(h=i.name.slice(1),i.name="oiint"===h?"\\iint":"\\iiint"),s=rD.makeSymbol(i.name,c,"math",e,["mop","op-symbol",l?"large-op":"small-op"]),h.length>0){var u=s.italic,d=rD.staticSvg(h+"Size"+(l?"2":"1"),e);s=rD.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:d,shift:l?.08:0}]},e),i.name="\\"+h,s.classes.unshift("mop"),s.italic=u}}else if(i.body){var p=wD(i.body,e,!0);1===p.length&&p[0]instanceof jM?(s=p[0]).classes[0]="mop":s=rD.makeSpan(["mop"],p,e)}else{for(var g=[],f=1;f{var n;if(t.symbol)n=new ID("mo",[OD(t.name,t.mode)]),jI.contains(AP,t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new ID("mo",$D(t.body,e));else{n=new ID("mi",[new MD(t.name.slice(1))]);var r=new ID("mo",[OD("⁡","text")]);n=t.parentIsSupSub?new ID("mrow",[n,r]):ND([n,r])}return n}),"mathmlBuilder$1"),IP={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};dD({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:o(((t,e)=>{var{parser:n,funcName:r}=t,i=r;return 1===i.length&&(i=IP[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}}),"handler"),htmlBuilder:LP,mathmlBuilder:NP}),dD({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:o(((t,e)=>{var{parser:n}=t,r=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:fD(r)}}),"handler"),htmlBuilder:LP,mathmlBuilder:NP});var MP={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};dD({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:LP,mathmlBuilder:NP}),dD({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:LP,mathmlBuilder:NP}),dD({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t,r=n;return 1===r.length&&(r=MP[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:LP,mathmlBuilder:NP});var RP=o(((t,e)=>{var n,r,i,a,s=!1;if("supsub"===t.type?(n=t.sup,r=t.sub,i=JD(t.base,"operatorname"),s=!0):i=JD(t,"operatorname"),i.body.length>0){for(var o=i.body.map((t=>{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t})),l=wD(o,e.withFont("mathrm"),!0),c=0;c{for(var n=$D(t.body,e.withFont("mathrm")),r=!0,i=0;it.toText())).join("");n=[new DD.TextNode(o)]}var l=new DD.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new DD.MathNode("mo",[OD("⁡","text")]);return t.parentIsSupSub?new DD.MathNode("mrow",[l,c]):DD.newDocumentFragment([l,c])}),"mathmlBuilder");function OP(t,e,n){for(var r=wD(t,e,!1),i=e.sizeMultiplier/n.sizeMultiplier,a=0;a{var{parser:n,funcName:r}=t,i=e[0];return{type:"operatorname",mode:n.mode,body:fD(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}}),"handler"),htmlBuilder:RP,mathmlBuilder:DP}),aP("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),pD({type:"ordgroup",htmlBuilder:(t,e)=>t.semisimple?rD.makeFragment(wD(t.body,e,!1)):rD.makeSpan(["mord"],wD(t.body,e,!0),e),mathmlBuilder:(t,e)=>FD(t.body,e,!0)}),dD({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,r=e[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(t,e){var n=SD(t.body,e.havingCrampedStyle()),r=rD.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=rD.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},e);return rD.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var n=new DD.MathNode("mo",[new DD.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new DD.MathNode("mover",[zD(t.body,e),n]);return r.setAttribute("accent","true"),r}}),dD({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:o(((t,e)=>{var{parser:n}=t,r=e[0];return{type:"phantom",mode:n.mode,body:fD(r)}}),"handler"),htmlBuilder:o(((t,e)=>{var n=wD(t.body,e.withPhantom(),!1);return rD.makeFragment(n)}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>{var n=$D(t.body,e);return new DD.MathNode("mphantom",n)}),"mathmlBuilder")}),dD({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:o(((t,e)=>{var{parser:n}=t,r=e[0];return{type:"hphantom",mode:n.mode,body:r}}),"handler"),htmlBuilder:o(((t,e)=>{var n=rD.makeSpan([],[SD(t.body,e.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=$D(fD(t.body),e),r=new DD.MathNode("mphantom",n),i=new DD.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}),"mathmlBuilder")}),dD({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:o(((t,e)=>{var{parser:n}=t,r=e[0];return{type:"vphantom",mode:n.mode,body:r}}),"handler"),htmlBuilder:o(((t,e)=>{var n=rD.makeSpan(["inner"],[SD(t.body,e.withPhantom())]),r=rD.makeSpan(["fix"],[]);return rD.makeSpan(["mord","rlap"],[n,r],e)}),"htmlBuilder"),mathmlBuilder:o(((t,e)=>{var n=$D(fD(t.body),e),r=new DD.MathNode("mphantom",n),i=new DD.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}),"mathmlBuilder")}),dD({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,r=JD(e[0],"size").value,i=e[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(t,e){var n=SD(t.body,e),r=DM(t.dy,e);return rD.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){var n=new DD.MathNode("mpadded",[zD(t.body,e)]),r=t.dy.number+t.dy.unit;return n.setAttribute("voffset",r),n}}),dD({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}}),dD({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,n){var{parser:r}=t,i=n[0],a=JD(e[0],"size"),s=JD(e[1],"size");return{type:"rule",mode:r.mode,shift:i&&JD(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var n=rD.makeSpan(["mord","rule"],[],e),r=DM(t.width,e),i=DM(t.height,e),a=t.shift?DM(t.shift,e):0;return n.style.borderRightWidth=OM(r),n.style.borderTopWidth=OM(i),n.style.bottom=OM(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=1.125*i*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=DM(t.width,e),r=DM(t.height,e),i=t.shift?DM(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new DD.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",OM(n)),s.setAttribute("height",OM(r));var o=new DD.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",OM(i)):(o.setAttribute("height",OM(i)),o.setAttribute("depth",OM(-i))),o.setAttribute("voffset",OM(i)),o}}),o(OP,"sizingGroup");var PP=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],BP=o(((t,e)=>{var n=e.havingSize(t.size);return OP(t.body,n,e)}),"htmlBuilder");dD({type:"sizing",names:PP,props:{numArgs:0,allowedInText:!0},handler:o(((t,e)=>{var{breakOnTokenText:n,funcName:r,parser:i}=t,a=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:PP.indexOf(r)+1,body:a}}),"handler"),htmlBuilder:BP,mathmlBuilder:o(((t,e)=>{var n=e.havingSize(t.size),r=$D(t.body,n),i=new DD.MathNode("mstyle",r);return i.setAttribute("mathsize",OM(n.sizeMultiplier)),i}),"mathmlBuilder")}),dD({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:o(((t,e,n)=>{var{parser:r}=t,i=!1,a=!1,s=n[0]&&JD(n[0],"ordgroup");if(s)for(var o="",l=0;l{var n=rD.makeSpan([],[SD(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new DD.MathNode("mpadded",[zD(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}),"mathmlBuilder")}),dD({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r}=t,i=n[0],a=e[0];return{type:"sqrt",mode:r.mode,body:a,index:i}},htmlBuilder(t,e){var n=SD(t.body,e.havingCrampedStyle());0===n.height&&(n.height=e.fontMetrics().xHeight),n=rD.wrapFragment(n,e);var r=e.fontMetrics().defaultRuleThickness,i=r;e.style.idn.height+n.depth+a&&(a=(a+h-n.height-n.depth)/2);var u=o.height-n.height-a-l;n.style.paddingLeft=OM(c);var d=rD.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:o},{type:"kern",size:l}]},e);if(t.index){var p=e.havingStyle(nM.SCRIPTSCRIPT),g=SD(t.index,p,e),f=.6*(d.height-d.depth),m=rD.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:g}]},e),y=rD.makeSpan(["root"],[m]);return rD.makeSpan(["mord","sqrt"],[y,d],e)}return rD.makeSpan(["mord","sqrt"],[d],e)},mathmlBuilder(t,e){var{body:n,index:r}=t;return r?new DD.MathNode("mroot",[zD(n,e),zD(r,e)]):new DD.MathNode("msqrt",[zD(n,e)])}});var $P={display:nM.DISPLAY,text:nM.TEXT,script:nM.SCRIPT,scriptscript:nM.SCRIPTSCRIPT};dD({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:r,parser:i}=t,a=i.parseExpression(!0,n),s=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var n=$P[t.style],r=e.havingStyle(n).withFont("");return OP(t.body,r,e)},mathmlBuilder(t,e){var n=$P[t.style],r=e.havingStyle(n),i=$D(t.body,r),a=new DD.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});var FP=o((function(t,e){var n=t.base;return n?"op"===n.type?n.limits&&(e.style.size===nM.DISPLAY.size||n.alwaysHandleSupSub)?LP:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(e.style.size===nM.DISPLAY.size||n.limits)?RP:null:"accent"===n.type?jI.isCharacterBox(n.base)?nO:null:"horizBrace"===n.type&&!t.sub===n.isOver?_P:null:null}),"htmlBuilderDelegate");pD({type:"supsub",htmlBuilder(t,e){var n=FP(t,e);if(n)return n(t,e);var r,i,a,{base:s,sup:o,sub:l}=t,c=SD(s,e),h=e.fontMetrics(),u=0,d=0,p=s&&jI.isCharacterBox(s);if(o){var g=e.havingStyle(e.style.sup());r=SD(o,g,e),p||(u=c.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(l){var f=e.havingStyle(e.style.sub());i=SD(l,f,e),p||(d=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/e.sizeMultiplier)}a=e.style===nM.DISPLAY?h.sup1:e.style.cramped?h.sup3:h.sup2;var m,y=e.sizeMultiplier,v=OM(.5/h.ptPerEm/y),x=null;if(i){var b=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name);(c instanceof jM||b)&&(x=OM(-c.italic))}if(r&&i){u=Math.max(u,a,r.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var w=4*h.defaultRuleThickness;if(u-r.depth-(i.height-d)0&&(u+=k,d-=k)}var T=[{type:"elem",elem:i,shift:d,marginRight:v,marginLeft:x},{type:"elem",elem:r,shift:-u,marginRight:v}];m=rD.makeVList({positionType:"individualShift",children:T},e)}else if(i){d=Math.max(d,h.sub1,i.height-.8*h.xHeight);var _=[{type:"elem",elem:i,marginLeft:x,marginRight:v}];m=rD.makeVList({positionType:"shift",positionData:d,children:_},e)}else{if(!r)throw new Error("supsub must have either sup or sub.");u=Math.max(u,a,r.depth+.25*h.xHeight),m=rD.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:r,marginRight:v}]},e)}var E=ED(c,"right")||"mord";return rD.makeSpan([E],[c,rD.makeSpan(["msupsub"],[m])],e)},mathmlBuilder(t,e){var n,r=!1;t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(r=!0,n=t.base.isOver),!t.base||"op"!==t.base.type&&"operatorname"!==t.base.type||(t.base.parentIsSupSub=!0);var i,a=[zD(t.base,e)];if(t.sub&&a.push(zD(t.sub,e)),t.sup&&a.push(zD(t.sup,e)),r)i=n?"mover":"munder";else if(t.sub)if(t.sup){var s=t.base;i=s&&"op"===s.type&&s.limits&&e.style===nM.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(e.style===nM.DISPLAY||s.limits)?"munderover":"msubsup"}else{var o=t.base;i=o&&"op"===o.type&&o.limits&&(e.style===nM.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||e.style===nM.DISPLAY)?"munder":"msub"}else{var l=t.base;i=l&&"op"===l.type&&l.limits&&(e.style===nM.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||e.style===nM.DISPLAY)?"mover":"msup"}return new DD.MathNode(i,a)}}),pD({type:"atom",htmlBuilder:(t,e)=>rD.mathsym(t.text,t.mode,e,["m"+t.family]),mathmlBuilder(t,e){var n=new DD.MathNode("mo",[OD(t.text,t.mode)]);if("bin"===t.family){var r=BD(t,e);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===t.family?n.setAttribute("separator","true"):"open"!==t.family&&"close"!==t.family||n.setAttribute("stretchy","false");return n}});var zP={mi:"italic",mn:"normal",mtext:"normal"};pD({type:"mathord",htmlBuilder:(t,e)=>rD.makeOrd(t,e,"mathord"),mathmlBuilder(t,e){var n=new DD.MathNode("mi",[OD(t.text,t.mode,e)]),r=BD(t,e)||"italic";return r!==zP[n.type]&&n.setAttribute("mathvariant",r),n}}),pD({type:"textord",htmlBuilder:(t,e)=>rD.makeOrd(t,e,"textord"),mathmlBuilder(t,e){var n,r=OD(t.text,t.mode,e),i=BD(t,e)||"normal";return n="text"===t.mode?new DD.MathNode("mtext",[r]):/[0-9]/.test(t.text)?new DD.MathNode("mn",[r]):"\\prime"===t.text?new DD.MathNode("mo",[r]):new DD.MathNode("mi",[r]),i!==zP[n.type]&&n.setAttribute("mathvariant",i),n}});var UP={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},GP={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};pD({type:"spacing",htmlBuilder(t,e){if(GP.hasOwnProperty(t.text)){var n=GP[t.text].className||"";if("text"===t.mode){var r=rD.makeOrd(t,e,"textord");return r.classes.push(n),r}return rD.makeSpan(["mspace",n],[rD.mathsym(t.text,t.mode,e)],e)}if(UP.hasOwnProperty(t.text))return rD.makeSpan(["mspace",UP[t.text]],[],e);throw new RI('Unknown type of space "'+t.text+'"')},mathmlBuilder(t,e){if(!GP.hasOwnProperty(t.text)){if(UP.hasOwnProperty(t.text))return new DD.MathNode("mspace");throw new RI('Unknown type of space "'+t.text+'"')}return new DD.MathNode("mtext",[new DD.TextNode(" ")])}});var qP=o((()=>{var t=new DD.MathNode("mtd",[]);return t.setAttribute("width","50%"),t}),"pad");pD({type:"tag",mathmlBuilder(t,e){var n=new DD.MathNode("mtable",[new DD.MathNode("mtr",[qP(),new DD.MathNode("mtd",[FD(t.body,e)]),qP(),new DD.MathNode("mtd",[FD(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var jP={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},YP={"\\textbf":"textbf","\\textmd":"textmd"},WP={"\\textit":"textit","\\textup":"textup"},HP=o(((t,e)=>{var n=t.font;return n?jP[n]?e.withTextFontFamily(jP[n]):YP[n]?e.withTextFontWeight(YP[n]):"\\emph"===n?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(WP[n]):e}),"optionsWithFont");dD({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,i=e[0];return{type:"text",mode:n.mode,body:fD(i),font:r}},htmlBuilder(t,e){var n=HP(t,e),r=wD(t.body,n,!0);return rD.makeSpan(["mord","text"],r,n)},mathmlBuilder(t,e){var n=HP(t,e);return FD(t.body,n)}}),dD({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=SD(t.body,e),r=rD.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=rD.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},e);return rD.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var n=new DD.MathNode("mo",[new DD.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new DD.MathNode("munder",[zD(t.body,e),n]);return r.setAttribute("accentunder","true"),r}}),dD({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=SD(t.body,e),r=e.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return rD.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},e)},mathmlBuilder:(t,e)=>new DD.MathNode("mpadded",[zD(t.body,e)],["vcenter"])}),dD({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new RI("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=VP(t),r=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" ")),"makeVerb"),XP=cD,KP=new RegExp("[̀-ͯ]+$"),ZP=class{static{o(this,"Lexer")}constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new MI("EOF",new II(this,e,e));var n=this.tokenRegex.exec(t);if(null===n||n.index!==e)throw new RI("Unexpected character: '"+t[e]+"'",new MI(t[e],new II(this,e,e+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var i=t.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new MI(r,new II(this,e,this.tokenRegex.lastIndex))}},QP=class{static{o(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new RI("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,e,n){if(void 0===n&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][t]=e)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e}},JP=iP;aP("\\noexpand",(function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}})),aP("\\expandafter",(function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}})),aP("\\@firstoftwo",(function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}})),aP("\\@secondoftwo",(function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}})),aP("\\@ifnextchar",(function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return 1===e[0].length&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}})),aP("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),aP("\\TextOrMath",(function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}}));var tB={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};aP("\\char",(function(t){var e,n=t.popToken(),r="";if("'"===n.text)e=8,n=t.popToken();else if('"'===n.text)e=16,n=t.popToken();else if("`"===n.text)if("\\"===(n=t.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new RI("\\char` missing argument");r=n.text.charCodeAt(0)}else e=10;if(e){if(null==(r=tB[n.text])||r>=e)throw new RI("Invalid base-"+e+" digit "+n.text);for(var i;null!=(i=tB[t.future().text])&&i{var r=t.consumeArg().tokens;if(1!==r.length)throw new RI("\\newcommand's first argument must be a macro name");var i=r[0].text,a=t.isDefined(i);if(a&&!e)throw new RI("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!n)throw new RI("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(1===(r=t.consumeArg().tokens).length&&"["===r[0].text){for(var o="",l=t.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)o+=l.text,l=t.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new RI("Invalid number of arguments: "+o);s=parseInt(o),r=t.consumeArg().tokens}return t.macros.set(i,{tokens:r,numArgs:s}),""}),"newcommand");aP("\\newcommand",(t=>eB(t,!1,!0))),aP("\\renewcommand",(t=>eB(t,!0,!1))),aP("\\providecommand",(t=>eB(t,!0,!0))),aP("\\message",(t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map((t=>t.text)).join("")),""})),aP("\\errmessage",(t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map((t=>t.text)).join("")),""})),aP("\\show",(t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),XP[n],QM.math[n],QM.text[n]),""})),aP("\\bgroup","{"),aP("\\egroup","}"),aP("~","\\nobreakspace"),aP("\\lq","`"),aP("\\rq","'"),aP("\\aa","\\r a"),aP("\\AA","\\r A"),aP("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),aP("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),aP("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),aP("ℬ","\\mathscr{B}"),aP("ℰ","\\mathscr{E}"),aP("ℱ","\\mathscr{F}"),aP("ℋ","\\mathscr{H}"),aP("ℐ","\\mathscr{I}"),aP("ℒ","\\mathscr{L}"),aP("ℳ","\\mathscr{M}"),aP("ℛ","\\mathscr{R}"),aP("ℭ","\\mathfrak{C}"),aP("ℌ","\\mathfrak{H}"),aP("ℨ","\\mathfrak{Z}"),aP("\\Bbbk","\\Bbb{k}"),aP("·","\\cdotp"),aP("\\llap","\\mathllap{\\textrm{#1}}"),aP("\\rlap","\\mathrlap{\\textrm{#1}}"),aP("\\clap","\\mathclap{\\textrm{#1}}"),aP("\\mathstrut","\\vphantom{(}"),aP("\\underbar","\\underline{\\text{#1}}"),aP("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),aP("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),aP("\\ne","\\neq"),aP("≠","\\neq"),aP("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),aP("∉","\\notin"),aP("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),aP("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),aP("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),aP("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),aP("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),aP("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),aP("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),aP("⟂","\\perp"),aP("‼","\\mathclose{!\\mkern-0.8mu!}"),aP("∌","\\notni"),aP("⌜","\\ulcorner"),aP("⌝","\\urcorner"),aP("⌞","\\llcorner"),aP("⌟","\\lrcorner"),aP("©","\\copyright"),aP("®","\\textregistered"),aP("️","\\textregistered"),aP("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),aP("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),aP("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),aP("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),aP("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),aP("⋮","\\vdots"),aP("\\varGamma","\\mathit{\\Gamma}"),aP("\\varDelta","\\mathit{\\Delta}"),aP("\\varTheta","\\mathit{\\Theta}"),aP("\\varLambda","\\mathit{\\Lambda}"),aP("\\varXi","\\mathit{\\Xi}"),aP("\\varPi","\\mathit{\\Pi}"),aP("\\varSigma","\\mathit{\\Sigma}"),aP("\\varUpsilon","\\mathit{\\Upsilon}"),aP("\\varPhi","\\mathit{\\Phi}"),aP("\\varPsi","\\mathit{\\Psi}"),aP("\\varOmega","\\mathit{\\Omega}"),aP("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),aP("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),aP("\\boxed","\\fbox{$\\displaystyle{#1}$}"),aP("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),aP("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),aP("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var nB={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};aP("\\dots",(function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in nB?e=nB[n]:("\\not"===n.slice(0,4)||n in QM.math&&jI.contains(["bin","rel"],QM.math[n].group))&&(e="\\dotsb"),e}));var rB={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};aP("\\dotso",(function(t){return t.future().text in rB?"\\ldots\\,":"\\ldots"})),aP("\\dotsc",(function(t){var e=t.future().text;return e in rB&&","!==e?"\\ldots\\,":"\\ldots"})),aP("\\cdots",(function(t){return t.future().text in rB?"\\@cdots\\,":"\\@cdots"})),aP("\\dotsb","\\cdots"),aP("\\dotsm","\\cdots"),aP("\\dotsi","\\!\\cdots"),aP("\\dotsx","\\ldots\\,"),aP("\\DOTSI","\\relax"),aP("\\DOTSB","\\relax"),aP("\\DOTSX","\\relax"),aP("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),aP("\\,","\\tmspace+{3mu}{.1667em}"),aP("\\thinspace","\\,"),aP("\\>","\\mskip{4mu}"),aP("\\:","\\tmspace+{4mu}{.2222em}"),aP("\\medspace","\\:"),aP("\\;","\\tmspace+{5mu}{.2777em}"),aP("\\thickspace","\\;"),aP("\\!","\\tmspace-{3mu}{.1667em}"),aP("\\negthinspace","\\!"),aP("\\negmedspace","\\tmspace-{4mu}{.2222em}"),aP("\\negthickspace","\\tmspace-{5mu}{.277em}"),aP("\\enspace","\\kern.5em "),aP("\\enskip","\\hskip.5em\\relax"),aP("\\quad","\\hskip1em\\relax"),aP("\\qquad","\\hskip2em\\relax"),aP("\\tag","\\@ifstar\\tag@literal\\tag@paren"),aP("\\tag@paren","\\tag@literal{({#1})}"),aP("\\tag@literal",(t=>{if(t.macros.get("\\df@tag"))throw new RI("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),aP("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),aP("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),aP("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),aP("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),aP("\\newline","\\\\\\relax"),aP("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var iB=OM(bM["Main-Regular"]["T".charCodeAt(0)][1]-.7*bM["Main-Regular"]["A".charCodeAt(0)][1]);aP("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+iB+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),aP("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+iB+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),aP("\\hspace","\\@ifstar\\@hspacer\\@hspace"),aP("\\@hspace","\\hskip #1\\relax"),aP("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),aP("\\ordinarycolon",":"),aP("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),aP("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),aP("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),aP("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),aP("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),aP("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),aP("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),aP("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),aP("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),aP("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),aP("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),aP("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),aP("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),aP("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),aP("∷","\\dblcolon"),aP("∹","\\eqcolon"),aP("≔","\\coloneqq"),aP("≕","\\eqqcolon"),aP("⩴","\\Coloneqq"),aP("\\ratio","\\vcentcolon"),aP("\\coloncolon","\\dblcolon"),aP("\\colonequals","\\coloneqq"),aP("\\coloncolonequals","\\Coloneqq"),aP("\\equalscolon","\\eqqcolon"),aP("\\equalscoloncolon","\\Eqqcolon"),aP("\\colonminus","\\coloneq"),aP("\\coloncolonminus","\\Coloneq"),aP("\\minuscolon","\\eqcolon"),aP("\\minuscoloncolon","\\Eqcolon"),aP("\\coloncolonapprox","\\Colonapprox"),aP("\\coloncolonsim","\\Colonsim"),aP("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),aP("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),aP("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),aP("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),aP("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),aP("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),aP("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),aP("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),aP("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),aP("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),aP("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),aP("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),aP("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),aP("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),aP("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),aP("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),aP("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),aP("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),aP("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),aP("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),aP("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),aP("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),aP("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),aP("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),aP("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),aP("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),aP("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),aP("\\imath","\\html@mathml{\\@imath}{ı}"),aP("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),aP("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),aP("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),aP("⟦","\\llbracket"),aP("⟧","\\rrbracket"),aP("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),aP("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),aP("⦃","\\lBrace"),aP("⦄","\\rBrace"),aP("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),aP("⦵","\\minuso"),aP("\\darr","\\downarrow"),aP("\\dArr","\\Downarrow"),aP("\\Darr","\\Downarrow"),aP("\\lang","\\langle"),aP("\\rang","\\rangle"),aP("\\uarr","\\uparrow"),aP("\\uArr","\\Uparrow"),aP("\\Uarr","\\Uparrow"),aP("\\N","\\mathbb{N}"),aP("\\R","\\mathbb{R}"),aP("\\Z","\\mathbb{Z}"),aP("\\alef","\\aleph"),aP("\\alefsym","\\aleph"),aP("\\Alpha","\\mathrm{A}"),aP("\\Beta","\\mathrm{B}"),aP("\\bull","\\bullet"),aP("\\Chi","\\mathrm{X}"),aP("\\clubs","\\clubsuit"),aP("\\cnums","\\mathbb{C}"),aP("\\Complex","\\mathbb{C}"),aP("\\Dagger","\\ddagger"),aP("\\diamonds","\\diamondsuit"),aP("\\empty","\\emptyset"),aP("\\Epsilon","\\mathrm{E}"),aP("\\Eta","\\mathrm{H}"),aP("\\exist","\\exists"),aP("\\harr","\\leftrightarrow"),aP("\\hArr","\\Leftrightarrow"),aP("\\Harr","\\Leftrightarrow"),aP("\\hearts","\\heartsuit"),aP("\\image","\\Im"),aP("\\infin","\\infty"),aP("\\Iota","\\mathrm{I}"),aP("\\isin","\\in"),aP("\\Kappa","\\mathrm{K}"),aP("\\larr","\\leftarrow"),aP("\\lArr","\\Leftarrow"),aP("\\Larr","\\Leftarrow"),aP("\\lrarr","\\leftrightarrow"),aP("\\lrArr","\\Leftrightarrow"),aP("\\Lrarr","\\Leftrightarrow"),aP("\\Mu","\\mathrm{M}"),aP("\\natnums","\\mathbb{N}"),aP("\\Nu","\\mathrm{N}"),aP("\\Omicron","\\mathrm{O}"),aP("\\plusmn","\\pm"),aP("\\rarr","\\rightarrow"),aP("\\rArr","\\Rightarrow"),aP("\\Rarr","\\Rightarrow"),aP("\\real","\\Re"),aP("\\reals","\\mathbb{R}"),aP("\\Reals","\\mathbb{R}"),aP("\\Rho","\\mathrm{P}"),aP("\\sdot","\\cdot"),aP("\\sect","\\S"),aP("\\spades","\\spadesuit"),aP("\\sub","\\subset"),aP("\\sube","\\subseteq"),aP("\\supe","\\supseteq"),aP("\\Tau","\\mathrm{T}"),aP("\\thetasym","\\vartheta"),aP("\\weierp","\\wp"),aP("\\Zeta","\\mathrm{Z}"),aP("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),aP("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),aP("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),aP("\\bra","\\mathinner{\\langle{#1}|}"),aP("\\ket","\\mathinner{|{#1}\\rangle}"),aP("\\braket","\\mathinner{\\langle{#1}\\rangle}"),aP("\\Bra","\\left\\langle#1\\right|"),aP("\\Ket","\\left|#1\\right\\rangle");var aB=o((t=>e=>{var n=e.consumeArg().tokens,r=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),l=e.macros.get("\\|");e.macros.beginGroup();var c=o((e=>n=>{t&&(n.macros.set("|",s),i.length&&n.macros.set("\\|",l));var a=e;!e&&i.length&&("|"===n.future().text&&(n.popToken(),a=!0));return{tokens:a?i:r,numArgs:0}}),"midMacro");e.macros.set("|",c(!1)),i.length&&e.macros.set("\\|",c(!0));var h=e.consumeArg().tokens,u=e.expandTokens([...a,...h,...n]);return e.macros.endGroup(),{tokens:u.reverse(),numArgs:0}}),"braketHelper");aP("\\bra@ket",aB(!1)),aP("\\bra@set",aB(!0)),aP("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),aP("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),aP("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),aP("\\angln","{\\angl n}"),aP("\\blue","\\textcolor{##6495ed}{#1}"),aP("\\orange","\\textcolor{##ffa500}{#1}"),aP("\\pink","\\textcolor{##ff00af}{#1}"),aP("\\red","\\textcolor{##df0030}{#1}"),aP("\\green","\\textcolor{##28ae7b}{#1}"),aP("\\gray","\\textcolor{gray}{#1}"),aP("\\purple","\\textcolor{##9d38bd}{#1}"),aP("\\blueA","\\textcolor{##ccfaff}{#1}"),aP("\\blueB","\\textcolor{##80f6ff}{#1}"),aP("\\blueC","\\textcolor{##63d9ea}{#1}"),aP("\\blueD","\\textcolor{##11accd}{#1}"),aP("\\blueE","\\textcolor{##0c7f99}{#1}"),aP("\\tealA","\\textcolor{##94fff5}{#1}"),aP("\\tealB","\\textcolor{##26edd5}{#1}"),aP("\\tealC","\\textcolor{##01d1c1}{#1}"),aP("\\tealD","\\textcolor{##01a995}{#1}"),aP("\\tealE","\\textcolor{##208170}{#1}"),aP("\\greenA","\\textcolor{##b6ffb0}{#1}"),aP("\\greenB","\\textcolor{##8af281}{#1}"),aP("\\greenC","\\textcolor{##74cf70}{#1}"),aP("\\greenD","\\textcolor{##1fab54}{#1}"),aP("\\greenE","\\textcolor{##0d923f}{#1}"),aP("\\goldA","\\textcolor{##ffd0a9}{#1}"),aP("\\goldB","\\textcolor{##ffbb71}{#1}"),aP("\\goldC","\\textcolor{##ff9c39}{#1}"),aP("\\goldD","\\textcolor{##e07d10}{#1}"),aP("\\goldE","\\textcolor{##a75a05}{#1}"),aP("\\redA","\\textcolor{##fca9a9}{#1}"),aP("\\redB","\\textcolor{##ff8482}{#1}"),aP("\\redC","\\textcolor{##f9685d}{#1}"),aP("\\redD","\\textcolor{##e84d39}{#1}"),aP("\\redE","\\textcolor{##bc2612}{#1}"),aP("\\maroonA","\\textcolor{##ffbde0}{#1}"),aP("\\maroonB","\\textcolor{##ff92c6}{#1}"),aP("\\maroonC","\\textcolor{##ed5fa6}{#1}"),aP("\\maroonD","\\textcolor{##ca337c}{#1}"),aP("\\maroonE","\\textcolor{##9e034e}{#1}"),aP("\\purpleA","\\textcolor{##ddd7ff}{#1}"),aP("\\purpleB","\\textcolor{##c6b9fc}{#1}"),aP("\\purpleC","\\textcolor{##aa87ff}{#1}"),aP("\\purpleD","\\textcolor{##7854ab}{#1}"),aP("\\purpleE","\\textcolor{##543b78}{#1}"),aP("\\mintA","\\textcolor{##f5f9e8}{#1}"),aP("\\mintB","\\textcolor{##edf2df}{#1}"),aP("\\mintC","\\textcolor{##e0e5cc}{#1}"),aP("\\grayA","\\textcolor{##f6f7f7}{#1}"),aP("\\grayB","\\textcolor{##f0f1f2}{#1}"),aP("\\grayC","\\textcolor{##e3e5e6}{#1}"),aP("\\grayD","\\textcolor{##d6d8da}{#1}"),aP("\\grayE","\\textcolor{##babec2}{#1}"),aP("\\grayF","\\textcolor{##888d93}{#1}"),aP("\\grayG","\\textcolor{##626569}{#1}"),aP("\\grayH","\\textcolor{##3b3e40}{#1}"),aP("\\grayI","\\textcolor{##21242c}{#1}"),aP("\\kaBlue","\\textcolor{##314453}{#1}"),aP("\\kaGreen","\\textcolor{##71B307}{#1}");var sB={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},oB=class{static{o(this,"MacroExpander")}constructor(t,e,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=e,this.expansionCount=0,this.feed(t),this.macros=new QP(JP,e.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new ZP(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,n,r;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:e,end:n}=this.consumeArg());return this.pushToken(new MI("EOF",n.loc)),this.pushTokens(r),e.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(t){var e=[],n=t&&t.length>0;n||this.consumeSpaces();var r,i=this.future(),a=0,s=0;do{if(r=this.popToken(),e.push(r),"{"===r.text)++a;else if("}"===r.text){if(-1===--a)throw new RI("Extra }",r)}else if("EOF"===r.text)throw new RI("Unexpected end of input in a macro argument, expected '"+(t&&n?t[s]:"}")+"'",r);if(t&&n)if((0===a||1===a&&"{"===t[s])&&r.text===t[s]){if(++s===t.length){e.splice(-s,s);break}}else s=0}while(0!==a||n);return"{"===i.text&&"}"===e[e.length-1].text&&(e.pop(),e.shift()),e.reverse(),{tokens:e,start:i,end:r}}consumeArgs(t,e){if(e){if(e.length!==t+1)throw new RI("The length of delimiters doesn't match the number of args!");for(var n=e[0],r=0;rthis.settings.maxExpand)throw new RI("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),n=e.text,r=e.noexpand?null:this._getExpansion(n);if(null==r||t&&r.unexpandable){if(t&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new RI("Undefined control sequence: "+n);return this.pushToken(e),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var o=i[s];if("#"===o.text){if(0===s)throw new RI("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new RI("Not a valid argument number",o);i.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new MI(t)]):void 0}expandTokens(t){var e=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),e.push(r)}return this.countExpansion(e.length),e}expandMacroAsText(t){var e=this.expandMacro(t);return e?e.map((t=>t.text)).join(""):e}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1===t.length){var n=this.lexer.catcodes[t];if(null!=n&&13!==n)return}var r="function"==typeof e?e(this):e;if("string"==typeof r){var i=0;if(-1!==r.indexOf("#"))for(var a=r.replace(/##/g,"");-1!==a.indexOf("#"+(i+1));)++i;for(var s=new ZP(r,this.settings),o=[],l=s.lex();"EOF"!==l.text;)o.push(l),l=s.lex();return o.reverse(),{tokens:o,numArgs:i}}return r}isDefined(t){return this.macros.has(t)||XP.hasOwnProperty(t)||QM.math.hasOwnProperty(t)||QM.text.hasOwnProperty(t)||sB.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:XP.hasOwnProperty(t)&&!XP[t].primitive}},lB=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,cB=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),hB={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},uB={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},dB=class t{static{o(this,"Parser")}constructor(t,e){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new oB(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new RI("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken;this.consume(),this.gullet.pushToken(new MI("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=e,n}parseExpression(e,n){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==t.endOfExpression.indexOf(i.text))break;if(n&&i.text===n)break;if(e&&XP[i.text]&&XP[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;"internal"!==a.type&&r.push(a)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,n=-1,r=0;r=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var s,o=QM[this.mode][e].group,l=II.range(t);if(KM.hasOwnProperty(o)){var c=o;s={type:"atom",mode:this.mode,family:c,loc:l,text:e}}else s={type:o,mode:this.mode,loc:l,text:e};i=s}else{if(!(e.charCodeAt(0)>=128))return null;this.settings.strict&&(sM(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),i={type:"textord",mode:"text",loc:II.range(t),text:e}}if(this.consume(),a)for(var h=0;h2?e[2]:void 0;for(i&&Hw(e[0],e[1],i)&&(r=1);++no))return!1;var c=a.get(t),h=a.get(e);if(c&&h)return c==e&&h==t;var u=-1,d=!0,p=2&n?new X$:void 0;for(a.set(t,e),a.set(e,t);++ue}o(Pz,"baseGt");var Bz=Pz;function $z(t){return t&&t.length?Oz(t,Rw,Bz):void 0}o($z,"max");var Fz=$z;function zz(t,e,n,r){if(!ov(t))return t;for(var i=-1,a=(e=ZF(e,t)).length,s=a-1,o=t;null!=o&&++i0&&n(o)?e>1?Xz(o,e-1,n,r,i):UB(i,o):r||(i[i.length]=o)}return i}o(Xz,"baseFlatten");var Kz=Xz;function Zz(t){return(null==t?0:t.length)?Kz(t,1):[]}o(Zz,"flatten");var Qz=Zz;function Jz(t){return qw($w(t,void 0,Qz),t+"")}o(Jz,"flatRest");var tU=Jz((function(t,e){return null==t?{}:Yz(t,e)})),eU=tU;function nU(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i-1}o(mU,"arrayIncludes");var yU=mU;function vU(t,e,n){for(var r=-1,i=null==t?0:t.length;++r=200){var c=e?null:kU(t);if(c)return aF(c);s=!1,i=J$,l=new X$}else l=e?[]:o;t:for(;++ri?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r=200&&(a=J$,s=!1,e=new X$(e));t:for(;++i-1?i[a?e[s]:s]:void 0}}o(kG,"createFind");var TG=kG,_G=Math.max;function EG(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:GU(n);return i<0&&(i=_G(r+i,0)),cU(t,xz(e),i)}o(EG,"findIndex");var CG=TG(EG);function SG(t){return t&&t.length?t[0]:void 0}o(SG,"head");var AG=SG;function LG(t,e){return Kz(Ez(t,e),1)}o(LG,"flatMap");var NG=LG;function IG(t,e){return null==t?t:Hx(t,F$(e),Ew)}o(IG,"forIn");var MG=IG;function RG(t,e){return t&&O$(t,F$(e))}o(RG,"forOwn");var DG=RG,OG=Object.prototype.hasOwnProperty,PG=sG((function(t,e,n){OG.call(t,n)?t[n].push(e):qx(t,n,[e])})),BG=PG,$G=Object.prototype.hasOwnProperty;function FG(t,e){return null!=t&&$G.call(t,e)}o(FG,"baseHas");var zG=FG;function UG(t,e){return null!=t&&oz(t,e,zG)}o(UG,"has");var GG=UG;function qG(t){return"string"==typeof t||!Sb(t)&&xb(t)&&"[object String]"==av(t)}o(qG,"isString");var jG=qG,YG=Math.max;function WG(t,e,n,r){t=Ib(t)?t:Lz(t),n=n&&!r?GU(n):0;var i=t.length;return n<0&&(n=YG(i+n,0)),jG(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&fU(t,e,n)>-1}o(WG,"includes");var HG=WG,VG=Math.max;function XG(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:GU(n);return i<0&&(i=VG(r+i,0)),fU(t,e,i)}o(XG,"indexOf");var KG=XG;function ZG(t){return xb(t)&&"[object RegExp]"==av(t)}o(ZG,"baseIsRegExp");var QG=ZG,JG=ew&&ew.isRegExp,tq=JG?Zb(JG):QG;function eq(t,e){return te||a&&s&&l&&!o&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&t=o?l:l*("desc"==n[r]?-1:1)}return t.index-e.index}o(fq,"compareMultiple");var mq=fq;function yq(t,e,n){e=e.length?qF(e,(function(t){return Sb(t)?function(e){return ez(e,1===t.length?t[0]:t)}:t})):[Rw];var r=-1;e=qF(e,Zb(xz));var i=Tz(t,(function(t,n,i){return{criteria:qF(e,(function(e){return e(t)})),index:++r,value:t}}));return dq(i,(function(t,e){return mq(t,e,n)}))}o(yq,"baseOrderBy");var vq=yq,xq=pz("length"),bq="[\\ud800-\\udfff]",wq="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",kq="\\ud83c[\\udffb-\\udfff]",Tq="[^\\ud800-\\udfff]",_q="(?:\\ud83c[\\udde6-\\uddff]){2}",Eq="[\\ud800-\\udbff][\\udc00-\\udfff]",Cq="(?:"+wq+"|"+kq+")"+"?",Sq="[\\ufe0e\\ufe0f]?",Aq=Sq+Cq+("(?:\\u200d(?:"+[Tq,_q,Eq].join("|")+")"+Sq+Cq+")*"),Lq="(?:"+[Tq+wq+"?",wq,_q,Eq,bq].join("|")+")",Nq=RegExp(kq+"(?="+kq+")|"+Lq+Aq,"g");function Iq(t){for(var e=Nq.lastIndex=0;Nq.test(t);)++e;return e}o(Iq,"unicodeSize");var Mq=Iq;function Rq(t){return KU(t)?Mq(t):xq(t)}o(Rq,"stringSize");var Dq=Rq,Oq=Math.ceil,Pq=Math.max;function Bq(t,e,n,r){for(var i=-1,a=Pq(Oq((e-t)/(n||1)),0),s=Array(a);a--;)s[r?a:++i]=t,t+=n;return s}o(Bq,"baseRange");var $q=Bq;function Fq(t){return function(e,n,r){return r&&"number"!=typeof r&&Hw(e,n,r)&&(n=r=void 0),e=zU(e),void 0===n?(n=e,e=0):n=zU(n),r=void 0===r?e1&&Hw(t,e[0],e[1])?e=[]:n>2&&Hw(e[0],e[1],e[2])&&(e=[e[0]]),vq(t,Kz(e,1),[])})),Kq=Xq;function Zq(t){return t&&t.length?_U(t):[]}o(Zq,"uniq");var Qq=Zq;function Jq(t,e){return t&&t.length?_U(t,xz(e)):[]}o(Jq,"uniqBy");var tj=Jq,ej=0;function nj(t){var e=++ej;return XF(t)+e}o(nj,"uniqueId");var rj=nj;function ij(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r1?r.setNode(t,e):r.setNode(t)})),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=lj,this._children[t]={},this._children["\0"][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 e=o((t=>this.removeEdge(this._edgeObjs[t])),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],U$(this.children(t),(t=>{this.setParent(t)})),delete this._children[t]),U$(TB(this._in[t]),e),delete this._in[t],delete this._preds[t],U$(TB(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Iz(e))e=lj;else{for(var n=e+="";!Iz(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==lj)return e}}children(t){if(Iz(t)&&(t=lj),this._isCompound){var e=this._children[t];if(e)return TB(e)}else{if(t===lj)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return TB(e)}successors(t){var e=this._sucs[t];if(e)return TB(e)}neighbors(t){var e=this.predecessors(t);if(e)return EU(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;U$(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),U$(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var a=n.parent(t);return void 0===a||e.hasNode(a)?(r[t]=a,a):a in r?r[a]:i(a)}return o(i,"findParent"),this._isCompound&&U$(e.nodes(),(function(t){e.setParent(t,i(t))})),e}setDefaultEdgeLabel(t){return hv(t)||(t=Ax(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Lz(this._edgeObjs)}setPath(t,e){var n=this,r=arguments;return oU(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this}setEdge(){var t,e,n,r,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,e=""+e,Iz(n)||(n=""+n);var s=dj(this._isDirected,t,e,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return i&&(this._edgeLabels[s]=r),this;if(!Iz(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=i?r:this._defaultEdgeLabelFn(t,e,n);var o=pj(this._isDirected,t,e,n);return t=o.v,e=o.w,Object.freeze(o),this._edgeObjs[s]=o,hj(this._preds[e],t),hj(this._sucs[t],e),this._in[e][s]=o,this._out[t][s]=o,this._edgeCount++,this}edge(t,e,n){var r=1===arguments.length?gj(this._isDirected,arguments[0]):dj(this._isDirected,t,e,n);return this._edgeLabels[r]}hasEdge(t,e,n){var r=1===arguments.length?gj(this._isDirected,arguments[0]):dj(this._isDirected,t,e,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(t,e,n){var r=1===arguments.length?gj(this._isDirected,arguments[0]):dj(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],uj(this._preds[e],t),uj(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var r=Lz(n);return e?wz(r,(function(t){return t.v===e})):r}}outEdges(t,e){var n=this._out[t];if(n){var r=Lz(n);return e?wz(r,(function(t){return t.w===e})):r}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}; /*! Bundled license information: 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 *) */function hj(t,e){t[e]?t[e]++:t[e]=1}function uj(t,e){--t[e]||delete t[e]}function dj(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var s=i;i=a,a=s}return i+""+a+""+(Iz(r)?"\0":r)}function pj(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};return r&&(o.name=r),o}function gj(t,e){return dj(t,e.v,e.w,e.name)}function fj(t,e,n,r){var i;do{i=rj(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function mj(t){var e=(new cj).setGraph(t.graph());return U$(t.nodes(),(function(n){e.setNode(n,t.node(n))})),U$(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e}function yj(t){var e=new cj({multigraph:t.isMultigraph()}).setGraph(t.graph());return U$(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),U$(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e}function vj(t,e){var n,r,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;if(!s&&!o)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),n=c*s/o,r=c):(s<0&&(l=-l),n=l,r=l*o/s),{x:i+n,y:a+r}}function xj(t){var e=Ez(zq(Tj(t)+1),(function(){return[]}));return U$(t.nodes(),(function(n){var r=t.node(n),i=r.rank;Iz(i)||(e[i][r.order]=n)})),e}function bj(t){var e=iq(Ez(t.nodes(),(function(e){return t.node(e).rank})));U$(t.nodes(),(function(n){var r=t.node(n);GG(r,"rank")&&(r.rank-=e)}))}function wj(t){var e=iq(Ez(t.nodes(),(function(e){return t.node(e).rank}))),n=[];U$(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var r=0,i=t.graph().nodeRankFactor;U$(n,(function(e,n){Iz(e)&&n%i!=0?--r:r&&U$(e,(function(e){t.node(e).rank+=r}))}))}function kj(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),fj(t,"border",i,e)}function Tj(t){return Fz(Ez(t.nodes(),(function(e){var n=t.node(e).rank;if(!Iz(n))return n})))}function _j(t,e){var n={lhs:[],rhs:[]};return U$(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n}function Ej(t,e){var n=oG();try{return e()}finally{console.log(t+" time: "+(oG()-n)+"ms")}}function Cj(t,e){return e()}function Sj(t){function e(n){var r=t.children(n),i=t.node(n);if(r.length&&U$(r,e),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a0;--o)if(r=e[o].dequeue()){i=i.concat(qj(t,e,n,r,!0));break}}return i}function qj(t,e,n,r,i){var a=i?[]:void 0;return U$(t.inEdges(r.v),(function(r){var s=t.edge(r),o=t.node(r.v);i&&a.push({v:r.v,w:r.w}),o.out-=s,Yj(e,n,o)})),U$(t.outEdges(r.v),(function(r){var i=t.edge(r),a=r.w,s=t.node(a);s.in-=i,Yj(e,n,s)})),t.removeNode(r.v),a}function jj(t,e){var n=new cj,r=0,i=0;U$(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),U$(t.edges(),(function(t){var a=n.edge(t.v,t.w)||0,s=e(t),o=a+s;n.setEdge(t.v,t.w,o),i=Math.max(i,n.node(t.v).out+=s),r=Math.max(r,n.node(t.w).in+=s)}));var a=zq(i+r+3).map((function(){return new Bj})),s=r+1;return U$(n.nodes(),(function(t){Yj(a,s,n.node(t))})),{graph:n,buckets:a,zeroIdx:s}}function Yj(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}function Wj(t){var e="greedy"===t.graph().acyclicer?Uj(t,n(t)):Hj(t);function n(t){return function(e){return t.edge(e).weight}}U$(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,rj("rev"))})),o(n,"weightFn")}function Hj(t){var e=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,U$(t.outEdges(a),(function(t){Object.prototype.hasOwnProperty.call(n,t.w)?e.push(t):i(t.w)})),delete n[a])}return o(i,"dfs"),U$(t.nodes(),i),e}function Vj(t){U$(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}function Xj(t){t.graph().dummyChains=[],U$(t.edges(),(function(e){Kj(t,e)}))}function Kj(t,e){var n=e.v,r=t.node(n).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==r+1){t.removeEdge(e);var c,h,u=void 0;for(h=0,++r;rs.lim&&(o=s,l=!0);var c=wz(e.edges(),(function(e){return l===wY(t,t.node(e.v),o)&&l!==wY(t,t.node(e.w),o)}));return sq(c,(function(t){return Jj(e,t)}))}function vY(t,e,n,r){var i=n.v,a=n.w;t.removeEdge(i,a),t.setEdge(r.v,r.w,{}),gY(t),uY(t,e),xY(t,e)}function xY(t,e){var n=CG(t.nodes(),(function(t){return!e.node(t).parent})),r=cY(t,n);r=r.slice(1),U$(r,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}function bY(t,e,n){return t.hasEdge(e,n)}function wY(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}function kY(t){switch(t.graph().ranker){case"network-simplex":default:EY(t);break;case"tight-tree":_Y(t);break;case"longest-path":TY(t)}}o(Uj,"greedyFAS"),o(Gj,"doGreedyFAS"),o(qj,"removeNode"),o(jj,"buildState"),o(Yj,"assignBucket"),o(Wj,"run"),o(Hj,"dfsFAS"),o(Vj,"undo"),o(Xj,"run"),o(Kj,"normalizeEdge"),o(Zj,"undo"),o(Qj,"longestPath"),o(Jj,"slack"),o(tY,"feasibleTree"),o(eY,"tightTree"),o(nY,"findMinSlackEdge"),o(rY,"shiftRanks"),iY.CycleException=aY,o(iY,"topsort"),o(aY,"CycleException"),aY.prototype=new Error,o(sY,"dfs"),o(oY,"doDfs"),o(lY,"postorder"),o(cY,"preorder"),hY.initLowLimValues=gY,hY.initCutValues=uY,hY.calcCutValue=pY,hY.leaveEdge=mY,hY.enterEdge=yY,hY.exchangeEdges=vY,o(hY,"networkSimplex"),o(uY,"initCutValues"),o(dY,"assignCutValue"),o(pY,"calcCutValue"),o(gY,"initLowLimValues"),o(fY,"dfsAssignLowLim"),o(mY,"leaveEdge"),o(yY,"enterEdge"),o(vY,"exchangeEdges"),o(xY,"updateRanks"),o(bY,"isTreeEdge"),o(wY,"isDescendant"),o(kY,"rank");var TY=Qj;function _Y(t){Qj(t),tY(t)}function EY(t){hY(t)}function CY(t){var e=fj(t,"root",{},"_root"),n=AY(t),r=Fz(Lz(n))-1,i=2*r+1;t.graph().nestingRoot=e,U$(t.edges(),(function(e){t.edge(e).minlen*=i}));var a=LY(t)+1;U$(t.children(),(function(s){SY(t,e,i,a,r,n,s)})),t.graph().nodeRankFactor=i}function SY(t,e,n,r,i,a,s){var o=t.children(s);if(o.length){var l=kj(t,"_bt"),c=kj(t,"_bb"),h=t.node(s);t.setParent(l,s),h.borderTop=l,t.setParent(c,s),h.borderBottom=c,U$(o,(function(o){SY(t,e,n,r,i,a,o);var h=t.node(o),u=h.borderTop?h.borderTop:o,d=h.borderBottom?h.borderBottom:o,p=h.borderTop?r:2*r,g=u!==d?1:i-a[s]+1;t.setEdge(l,u,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,c,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(s)||t.setEdge(e,l,{weight:0,minlen:i+a[s]})}else s!==e&&t.setEdge(e,s,{weight:0,minlen:n})}function AY(t){var e={};function n(r,i){var a=t.children(r);a&&a.length&&U$(a,(function(t){n(t,i+1)})),e[r]=i}return o(n,"dfs"),U$(t.children(),(function(t){n(t,1)})),e}function LY(t){return oU(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}function NY(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,U$(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}function IY(t,e,n){var r,i={};U$(n,(function(n){for(var a,s,o=t.parent(n);o;){if((a=t.parent(o))?(s=i[a],i[a]=o):(s=r,r=o),s&&s!==o)return void e.setEdge(s,o);o=a}}))}function MY(t,e,n){var r=RY(t),i=new cj({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((function(e){return t.node(e)}));return U$(t.nodes(),(function(a){var s=t.node(a),o=t.parent(a);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(i.setNode(a),i.setParent(a,o||r),U$(t[n](a),(function(e){var n=e.v===a?e.w:e.v,r=i.edge(n,a),s=Iz(r)?0:r.weight;i.setEdge(n,a,{weight:t.edge(e).weight+s})})),Object.prototype.hasOwnProperty.call(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),i}function RY(t){for(var e;t.hasNode(e=rj("_root")););return e}function DY(t,e){for(var n=0,r=1;r0;)e%2&&(n+=o[e+1]),o[e=e-1>>1]+=t.weight;l+=t.weight*n}))),l}function PY(t){var e={},n=wz(t.nodes(),(function(e){return!t.children(e).length})),r=Fz(Ez(n,(function(e){return t.node(e).rank}))),i=Ez(zq(r+1),(function(){return[]}));function a(n){if(!GG(e,n)){e[n]=!0;var r=t.node(n);i[r.rank].push(n),U$(t.successors(n),a)}}o(a,"dfs");var s=Kq(n,(function(e){return t.node(e).rank}));return U$(s,a),i}function BY(t,e){return Ez(e,(function(e){var n=t.inEdges(e);if(n.length){var r=oU(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))}function $Y(t,e){var n={};return U$(t,(function(t,e){var r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};Iz(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)})),U$(e.edges(),(function(t){var e=n[t.v],r=n[t.w];Iz(e)||Iz(r)||(r.indegree++,e.out.push(n[t.w]))})),FY(wz(n,(function(t){return!t.indegree})))}function FY(t){var e=[];function n(t){return function(e){e.merged||(Iz(e.barycenter)||Iz(t.barycenter)||e.barycenter>=t.barycenter)&&zY(t,e)}}function r(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(o(n,"handleIn"),o(r,"handleOut");t.length;){var i=t.pop();e.push(i),U$(i.in.reverse(),n(i)),U$(i.out,r(i))}return Ez(wz(e,(function(t){return!t.merged})),(function(t){return eU(t,["vs","i","barycenter","weight"])}))}function zY(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}function UY(t,e){var n=_j(t,(function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")})),r=n.lhs,i=Kq(n.rhs,(function(t){return-t.i})),a=[],s=0,o=0,l=0;r.sort(qY(!!e)),l=GY(a,i,l),U$(r,(function(t){l+=t.vs.length,a.push(t.vs),s+=t.barycenter*t.weight,o+=t.weight,l=GY(a,i,l)}));var c={vs:Qz(a)};return o&&(c.barycenter=s/o,c.weight=o),c}function GY(t,e,n){for(var r;e.length&&(r=R$(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}function qY(t){return function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i}}function jY(t,e,n,r){var i=t.children(e),a=t.node(e),s=a?a.borderLeft:void 0,o=a?a.borderRight:void 0,l={};s&&(i=wz(i,(function(t){return t!==s&&t!==o})));var c=BY(t,i);U$(c,(function(e){if(t.children(e.v).length){var i=jY(t,e.v,n,r);l[e.v]=i,Object.prototype.hasOwnProperty.call(i,"barycenter")&&WY(e,i)}}));var h=$Y(c,n);YY(h,l);var u=UY(h,r);if(s&&(u.vs=Qz([s,u.vs,o]),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(u,"barycenter")||(u.barycenter=0,u.weight=0),u.barycenter=(u.barycenter*u.weight+d.order+p.order)/(u.weight+2),u.weight+=2}return u}function YY(t,e){U$(t,(function(t){t.vs=Qz(t.vs.map((function(t){return e[t]?e[t].vs:t})))}))}function WY(t,e){Iz(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}function HY(t){var e=Tj(t),n=VY(t,zq(1,e+1),"inEdges"),r=VY(t,zq(e-1,-1,-1),"outEdges"),i=PY(t);KY(t,i);for(var a,s=Number.POSITIVE_INFINITY,o=0,l=0;l<4;++o,++l){XY(o%2?n:r,o%4>=2);var c=DY(t,i=xj(t));cl||c>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)o.push(i);return{path:s.concat(o.reverse()),lca:a}}function JY(t){var e={},n=0;function r(i){var a=n;U$(t.children(i),r),e[i]={low:a,lim:n++}}return o(r,"dfs"),U$(t.children(),r),e}function tW(t,e){var n={};function r(e,r){var i=0,a=0,s=e.length,o=R$(r);return U$(r,(function(e,l){var c=nW(t,e),h=c?t.node(c).order:s;(c||e===o)&&(U$(r.slice(a,l+1),(function(e){U$(t.predecessors(e),(function(r){var a=t.node(r),s=a.order;!(ss)&&rW(n,e,o)}))}))}function i(e,n){var i,a=-1,s=0;return U$(n,(function(o,l){if("border"===t.node(o).dummy){var c=t.predecessors(o);c.length&&(i=t.node(c[0]).order,r(n,s,l,a,i),s=l,a=i)}r(n,s,n.length,i,e.length)})),n}return o(r,"scan"),o(i,"visitLayer"),oU(e,i),n}function nW(t,e){if(t.node(e).dummy)return CG(t.predecessors(e),(function(e){return t.node(e).dummy}))}function rW(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function iW(t,e,n){if(e>n){var r=e;e=n,n=r}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],n)}function aW(t,e,n,r){var i={},a={},s={};return U$(e,(function(t){U$(t,(function(t,e){i[t]=t,a[t]=t,s[t]=e}))})),U$(e,(function(t){var e=-1;U$(t,(function(t){var o=r(t);if(o.length)for(var l=((o=Kq(o,(function(t){return s[t]}))).length-1)/2,c=Math.floor(l),h=Math.ceil(l);c<=h;++c){var u=o[c];a[t]===t&&e{var e=n(" buildLayoutGraph",(()=>SW(t)));n(" runLayout",(()=>yW(e,n))),n(" updateInputGraph",(()=>vW(t,e)))}))}function yW(t,e){e(" makeSpaceForEdgeLabels",(()=>AW(t))),e(" removeSelfEdges",(()=>BW(t))),e(" acyclic",(()=>Wj(t))),e(" nestingGraph.run",(()=>CY(t))),e(" rank",(()=>kY(yj(t)))),e(" injectEdgeLabelProxies",(()=>LW(t))),e(" removeEmptyRanks",(()=>wj(t))),e(" nestingGraph.cleanup",(()=>NY(t))),e(" normalizeRanks",(()=>bj(t))),e(" assignRankMinMax",(()=>NW(t))),e(" removeEdgeLabelProxies",(()=>IW(t))),e(" normalize.run",(()=>Xj(t))),e(" parentDummyChains",(()=>ZY(t))),e(" addBorderSegments",(()=>Sj(t))),e(" order",(()=>HY(t))),e(" insertSelfEdges",(()=>$W(t))),e(" adjustCoordinateSystem",(()=>Lj(t))),e(" position",(()=>gW(t))),e(" positionSelfEdges",(()=>FW(t))),e(" removeBorderNodes",(()=>PW(t))),e(" normalize.undo",(()=>Zj(t))),e(" fixupEdgeLabelCoords",(()=>DW(t))),e(" undoCoordinateSystem",(()=>Nj(t))),e(" translateGraph",(()=>MW(t))),e(" assignNodeIntersects",(()=>RW(t))),e(" reversePoints",(()=>OW(t))),e(" acyclic.undo",(()=>Vj(t)))}function vW(t,e){U$(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),U$(t.edges(),(function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(r.x=i.x,r.y=i.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}o(_Y,"tightTreeRanker"),o(EY,"networkSimplexRanker"),o(CY,"run"),o(SY,"dfs"),o(AY,"treeDepths"),o(LY,"sumWeights"),o(NY,"cleanup"),o(IY,"addSubgraphConstraints"),o(MY,"buildLayerGraph"),o(RY,"createRootNode"),o(DY,"crossCount"),o(OY,"twoLayerCrossCount"),o(PY,"initOrder"),o(BY,"barycenter"),o($Y,"resolveConflicts"),o(FY,"doResolveConflicts"),o(zY,"mergeEntries"),o(UY,"sort"),o(GY,"consumeUnsortable"),o(qY,"compareWithBias"),o(jY,"sortSubgraph"),o(YY,"expandSubgraphs"),o(WY,"mergeBarycenters"),o(HY,"order"),o(VY,"buildLayerGraphs"),o(XY,"sweepLayerGraphs"),o(KY,"assignOrder"),o(ZY,"parentDummyChains"),o(QY,"findPath"),o(JY,"postorder"),o(tW,"findType1Conflicts"),o(eW,"findType2Conflicts"),o(nW,"findOtherInnerSegmentNode"),o(rW,"addConflict"),o(iW,"hasConflict"),o(aW,"verticalAlignment"),o(sW,"horizontalCompaction"),o(oW,"buildBlockGraph"),o(lW,"findSmallestWidthAlignment"),o(cW,"alignCoordinates"),o(hW,"balance"),o(uW,"positionX"),o(dW,"sep"),o(pW,"width"),o(gW,"position"),o(fW,"positionY"),o(mW,"layout"),o(yW,"runLayout"),o(vW,"updateInputGraph");var xW=["nodesep","edgesep","ranksep","marginx","marginy"],bW={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},wW=["acyclicer","ranker","rankdir","align"],kW=["width","height"],TW={width:0,height:0},_W=["minlen","weight","width","height","labeloffset"],EW={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},CW=["labelpos"];function SW(t){var e=new cj({multigraph:!0,compound:!0}),n=UW(t.graph());return e.setGraph(Zw({},bW,zW(n,xW),eU(n,wW))),U$(t.nodes(),(function(n){var r=UW(t.node(n));e.setNode(n,I$(zW(r,kW),TW)),e.setParent(n,t.parent(n))})),U$(t.edges(),(function(n){var r=UW(t.edge(n));e.setEdge(n,Zw({},EW,zW(r,_W),eU(r,CW)))})),e}function AW(t){var e=t.graph();e.ranksep/=2,U$(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}function LW(t){U$(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};fj(t,"edge-proxy",i,"_ep")}}))}function NW(t){var e=0;U$(t.nodes(),(function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=Fz(e,r.maxRank))})),t.graph().maxRank=e}function IW(t){U$(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}function MW(t){var e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,a=t.graph(),s=a.marginx||0,l=a.marginy||0;function c(t){var a=t.x,s=t.y,o=t.width,l=t.height;e=Math.min(e,a-o/2),n=Math.max(n,a+o/2),r=Math.min(r,s-l/2),i=Math.max(i,s+l/2)}o(c,"getExtremes"),U$(t.nodes(),(function(e){c(t.node(e))})),U$(t.edges(),(function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,"x")&&c(n)})),e-=s,r-=l,U$(t.nodes(),(function(n){var i=t.node(n);i.x-=e,i.y-=r})),U$(t.edges(),(function(n){var i=t.edge(n);U$(i.points,(function(t){t.x-=e,t.y-=r})),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=e),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=r)})),a.width=n-e+s,a.height=i-r+l}function RW(t){U$(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),s=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=s,r=a),i.points.unshift(vj(a,n)),i.points.push(vj(s,r))}))}function DW(t){U$(t.edges(),(function(e){var n=t.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}function OW(t){U$(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}function PW(t){U$(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(R$(n.borderLeft)),s=t.node(R$(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}})),U$(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}function BW(t){U$(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}function $W(t){var e=xj(t);U$(e,(function(e){var n=0;U$(e,(function(e,r){var i=t.node(e);i.order=r+n,U$(i.selfEdges,(function(e){fj(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}function FW(t){U$(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,s=n.x-i,o=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],n.label.x=n.x,n.label.y=n.y}}))}function zW(t,e){return Rz(eU(t,e),Number)}function UW(t){var e={};return U$(t,(function(t,n){e[n.toLowerCase()]=t})),e}function GW(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:qW(t),edges:jW(t)};return Iz(t.graph())||(e.value=S$(t.graph())),e}function qW(t){return Ez(t.nodes(),(function(e){var n=t.node(e),r=t.parent(e),i={v:e};return Iz(n)||(i.value=n),Iz(r)||(i.parent=r),i}))}function jW(t){return Ez(t.edges(),(function(e){var n=t.edge(e),r={v:e.v,w:e.w};return Iz(e.name)||(r.name=e.name),Iz(n)||(r.value=n),r}))}o(SW,"buildLayoutGraph"),o(AW,"makeSpaceForEdgeLabels"),o(LW,"injectEdgeLabelProxies"),o(NW,"assignRankMinMax"),o(IW,"removeEdgeLabelProxies"),o(MW,"translateGraph"),o(RW,"assignNodeIntersects"),o(DW,"fixupEdgeLabelCoords"),o(OW,"reversePointsForReversedEdges"),o(PW,"removeBorderNodes"),o(BW,"removeSelfEdges"),o($W,"insertSelfEdges"),o(FW,"positionSelfEdges"),o(zW,"selectNumberAttrs"),o(UW,"canonicalize"),o(GW,"write"),o(qW,"writeNodes"),o(jW,"writeEdges");var YW=new Map,WW=new Map,HW=new Map,VW=o((()=>{WW.clear(),HW.clear(),YW.clear()}),"clear"),XW=o(((t,e)=>{const n=WW.get(e)||[];return y.trace("In isDescendant",e," ",t," = ",n.includes(t)),n.includes(t)}),"isDescendant"),KW=o(((t,e)=>{const n=WW.get(e)||[];return y.info("Descendants of ",e," is ",n),y.info("Edge is ",t),t.v!==e&&t.w!==e&&(n?n.includes(t.v)||XW(t.v,e)||XW(t.w,e)||n.includes(t.w):(y.debug("Tilt, ",e,",not in descendants"),!1))}),"edgeInCluster"),ZW=o(((t,e,n,r)=>{y.warn("Copying children of ",t,"root",r,"data",e.node(t),r);const i=e.children(t)||[];t!==r&&i.push(t),y.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach((i=>{if(e.children(i).length>0)ZW(i,e,n,r);else{const a=e.node(i);y.info("cp ",i," to ",r," with parent ",t),n.setNode(i,a),r!==e.parent(i)&&(y.warn("Setting parent",i,e.parent(i)),n.setParent(i,e.parent(i))),t!==r&&i!==t?(y.debug("Setting parent",i,t),n.setParent(i,t)):(y.info("In copy ",t,"root",r,"data",e.node(t),r),y.debug("Not Setting parent for node=",i,"cluster!==rootId",t!==r,"node!==clusterId",i!==t));const s=e.edges(i);y.debug("Copying Edges",s),s.forEach((i=>{y.info("Edge",i);const a=e.edge(i.v,i.w,i.name);y.info("Edge data",a,r);try{KW(i,r)?(y.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),y.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):y.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",t)}catch(t){y.error(t)}}))}y.debug("Removing node",i),e.removeNode(i)}))}),"copy"),QW=o(((t,e)=>{const n=e.children(t);let r=[...n];for(const i of n)HW.set(i,t),r=[...r,...QW(i,e)];return r}),"extractDescendants"),JW=o(((t,e,n)=>{const r=t.edges().filter((t=>t.v===e||t.w===e)),i=t.edges().filter((t=>t.v===n||t.w===n)),a=r.map((t=>({v:t.v===e?n:t.v,w:t.w===e?e:t.w}))),s=i.map((t=>({v:t.v,w:t.w})));return a.filter((t=>s.some((e=>t.v===e.v&&t.w===e.w))))}),"findCommonEdges"),tH=o(((t,e,n)=>{const r=e.children(t);if(y.trace("Searching children of id ",t,r),r.length<1)return t;let i;for(const t of r){const r=tH(t,e,n),a=JW(e,n,r);if(r){if(!(a.length>0))return r;i=r}}return i}),"findNonClusterChild"),eH=o((t=>YW.has(t)&&YW.get(t).externalConnections&&YW.has(t)?YW.get(t).id:t),"getAnchorId"),nH=o(((t,e)=>{if(!t||e>10)y.debug("Opting out, no graph ");else{y.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(y.warn("Cluster identified",e," Replacement id in edges: ",tH(e,t,e)),WW.set(e,QW(e,t)),YW.set(e,{id:tH(e,t,e),clusterData:t.node(e)}))})),t.nodes().forEach((function(e){const n=t.children(e),r=t.edges();n.length>0?(y.debug("Cluster identified",e,WW),r.forEach((t=>{XW(t.v,e)^XW(t.w,e)&&(y.warn("Edge: ",t," leaves cluster ",e),y.warn("Descendants of XXX ",e,": ",WW.get(e)),YW.get(e).externalConnections=!0)}))):y.debug("Not a cluster ",e,WW)}));for(let e of YW.keys()){const n=YW.get(e).id,r=t.parent(n);r!==e&&YW.has(r)&&!YW.get(r).externalConnections&&(YW.get(e).id=r)}t.edges().forEach((function(e){const n=t.edge(e);y.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),y.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let r=e.v,i=e.w;if(y.warn("Fix XXX",YW,"ids:",e.v,e.w,"Translating: ",YW.get(e.v)," --- ",YW.get(e.w)),YW.get(e.v)||YW.get(e.w)){if(y.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),r=eH(e.v),i=eH(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v){const i=t.parent(r);YW.get(i).externalConnections=!0,n.fromCluster=e.v}if(i!==e.w){const r=t.parent(i);YW.get(r).externalConnections=!0,n.toCluster=e.w}y.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name)}})),y.warn("Adjusted Graph",GW(t)),rH(t,0),y.trace(YW)}}),"adjustClustersAndEdges"),rH=o(((t,e)=>{if(y.warn("extractor - ",e,GW(t),t.children("D")),e>10)return void y.error("Bailing out");let n=t.nodes(),r=!1;for(const e of n){const n=t.children(e);r=r||n.length>0}if(r){y.debug("Nodes = ",n,e);for(const r of n)if(y.debug("Extracting node",r,YW,YW.has(r)&&!YW.get(r).externalConnections,!t.parent(r),t.node(r),t.children("D")," Depth ",e),YW.has(r))if(!YW.get(r).externalConnections&&t.children(r)&&t.children(r).length>0){y.warn("Cluster without external connections, without a parent and with children",r,e);let n="TB"===t.graph().rankdir?"LR":"TB";YW.get(r)?.clusterData?.dir&&(n=YW.get(r).clusterData.dir,y.warn("Fixing dir",YW.get(r).clusterData.dir,n));const i=new cj({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));y.warn("Old graph before copy",GW(t)),ZW(r,t,i,r),t.setNode(r,{clusterNode:!0,id:r,clusterData:YW.get(r).clusterData,label:YW.get(r).label,graph:i}),y.warn("New graph after copy node: (",r,")",GW(i)),y.debug("Old graph after copy",GW(t))}else y.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!YW.get(r).externalConnections," no parent: ",!t.parent(r)," children ",t.children(r)&&t.children(r).length>0,t.children("D"),e),y.debug(YW);else y.debug("Not a cluster",r,e);n=t.nodes(),y.warn("New list of nodes",n);for(const r of n){const n=t.node(r);y.warn(" Now next level",r,n),n?.clusterNode&&rH(n.graph,e+1)}}else y.debug("Done, no node has children",t.nodes())}),"extractor"),iH=o(((t,e)=>{if(0===e.length)return[];let n=Object.assign([],e);return e.forEach((e=>{const r=t.children(e),i=iH(t,r);n=[...n,...i]})),n}),"sorter"),aH=o((t=>iH(t,t.children())),"sortNodesByHierarchy"),sH=o((async(t,e,n,r,i,a)=>{y.warn("Graph in recursive render:XAX",GW(e),i);const s=e.graph().rankdir;y.trace("Dir in recursive render - dir:",s);const l=t.insert("g").attr("class","root");e.nodes()?y.info("Recursive render XXX",e.nodes()):y.info("No nodes found for",e),e.edges().length>0&&y.info("Recursive edges",e.edge(e.edges()[0]));const c=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),u=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(e.nodes().map((async function(t){const o=e.node(t);if(void 0!==i){const n=JSON.parse(JSON.stringify(i.clusterData));y.trace("Setting data for parent cluster XXX\n Node.id = ",t,"\n data=",n.height,"\nParent cluster",i.height),e.setNode(i.id,n),e.parent(t)||(y.trace("Setting parent",t,i.id),e.setParent(t,i.id,n))}if(y.info("(Insert) Node XXX"+t+": "+JSON.stringify(e.node(t))),o?.clusterNode){y.info("Cluster identified XBX",t,o.width,e.node(t));const{ranksep:i,nodesep:s}=e.graph();o.graph.setGraph({...o.graph.graph(),ranksep:i+25,nodesep:s});const l=await sH(d,o.graph,n,r,e.node(t),a),c=l.elem;y_(o,c),o.diff=l.diff||0,y.info("New compound node after recursive render XAX",t,"width",o.width,"height",o.height),DS(c,o)}else e.children(t).length>0?(y.trace("Cluster - the non recursive path XBX",t,o.id,o,o.width,"Graph:",e),y.trace(tH(o.id,e)),YW.set(o.id,{id:tH(o.id,e),node:o})):(y.trace("Node - the non recursive path XAX",t,d,e.node(t),s),await RS(d,e.node(t),{config:a,dir:s}))})));const p=o((async()=>{const t=e.edges().map((async function(t){const n=e.edge(t.v,t.w,t.name);y.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),y.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(e.edge(t))),y.info("Fix",YW,"ids:",t.v,t.w,"Translating: ",YW.get(t.v),YW.get(t.w)),await VS(u,n)}));await Promise.all(t)}),"processEdges");await p(),y.info("Graph before layout:",JSON.stringify(GW(e))),y.info("############################################# XXX"),y.info("### Layout ### XXX"),y.info("############################################# XXX"),mW(e),y.info("Graph after layout:",JSON.stringify(GW(e)));let g=0,{subGraphTitleTotalMargin:f}=ay(a);return await Promise.all(aH(e).map((async function(t){const n=e.node(t);if(y.info("Position XBX => "+t+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=f,y.info("A tainted cluster node XBX1",t,n.id,n.width,n.height,n.x,n.y,e.parent(t)),YW.get(n.id).node=n,PS(n);else if(e.children(t).length>0){y.info("A pure cluster node XBX1",t,n.id,n.x,n.y,n.width,n.height,e.parent(t)),n.height+=f,e.node(n.parentId);const r=n?.padding/2||0,i=n?.labelBBox?.height||0,a=i-r||0;y.debug("OffsetY",a,"labelHeight",i,"halfPadding",r),await jE(c,n),YW.get(n.id).node=n}else{const t=e.node(n.parentId);n.y+=f/2,y.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",t,t?.offsetY,n),PS(n)}}))),e.edges().forEach((function(t){const i=e.edge(t);y.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i),i),i.points.forEach((t=>t.y+=f/2));const a=e.node(t.v);var s=e.node(t.w);const o=rA(h,i,YW,n,a,s,r);KS(i,o)})),e.nodes().forEach((function(t){const n=e.node(t);y.info(t,n.type,n.diff),n.isGroup&&(g=n.diff)})),y.warn("Returning from recursive render XAX",l,g),{elem:l,diff:g}}),"recursiveRender"),oH=o((async(t,e)=>{const n=new cj({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),r=e.select("g");fA(r,t.markers,t.type,t.diagramId),OS(),WS(),YE(),VW(),t.nodes.forEach((t=>{n.setNode(t.id,{...t}),t.parentId&&n.setParent(t.id,t.parentId)})),y.debug("Edges:",t.edges),t.edges.forEach((t=>{if(t.start===t.end){const e=t.start,r=e+"---"+e+"---1",i=e+"---"+e+"---2",a=n.node(e);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(i,a.parentId);const s=structuredClone(t),o=structuredClone(t),l=structuredClone(t);s.label="",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-1",o.arrowTypeEnd="none",o.id=e+"-cyclic-special-mid",l.label="",a.isGroup&&(s.fromCluster=e,l.toCluster=e),l.id=e+"-cyclic-special-2",n.setEdge(e,r,s,e+"-cyclic-special-0"),n.setEdge(r,i,o,e+"-cyclic-special-1"),n.setEdge(i,e,l,e+"-cyc{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)n.attr(t,e.attrs[t]);return e.class&&n.attr("class",e.class),n}),"drawRect"),uH=o(((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};hH(t,n).lower()}),"drawBackgroundRect"),dH=o(((t,e)=>{const n=e.text.replace(en," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);const i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r}),"drawText"),pH=o(((t,e,n,r)=>{const i=t.append("image");i.attr("x",e),i.attr("y",n);const a=(0,cH.sanitizeUrl)(r);i.attr("xlink:href",a)}),"drawImage"),gH=o(((t,e,n,r)=>{const i=t.append("use");i.attr("x",e),i.attr("y",n);const a=(0,cH.sanitizeUrl)(r);i.attr("xlink:href",`#${a}`)}),"drawEmbeddedImage"),fH=o((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),mH=o((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj"),yH=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,24],n=[1,25],r=[1,26],i=[1,27],a=[1,28],s=[1,63],l=[1,64],h=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],_=[1,38],E=[1,39],C=[1,40],S=[1,41],A=[1,42],L=[1,43],N=[1,44],I=[1,45],M=[1,46],R=[1,47],D=[1,48],O=[1,50],P=[1,51],B=[1,52],$=[1,53],F=[1,54],z=[1,55],U=[1,56],G=[1,57],q=[1,58],j=[1,59],Y=[1,60],W=[14,42],H=[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],V=[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],X=[1,82],K=[1,83],Z=[1,84],Q=[1,85],J=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],nt=[12,33],rt=[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],it={trace:o((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:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 3:r.setDirection("TB");break;case 4:r.setDirection("BT");break;case 5:r.setDirection("RL");break;case 6:r.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[o-3]);break;case 19:r.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:r.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),r.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),r.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:r.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),r.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:r.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:r.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:r.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:r.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:r.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:r.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:r.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:r.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:r.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:r.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:r.addContainer("container",...a[o]),this.$=a[o];break;case 48:r.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:r.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:r.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:r.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:r.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:r.addComponent("component",...a[o]),this.$=a[o];break;case 54:r.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:r.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:r.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:r.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:r.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:r.addRel("rel",...a[o]),this.$=a[o];break;case 61:r.addRel("birel",...a[o]),this.$=a[o];break;case 62:r.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:r.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:r.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:r.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:r.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),r.addRel("rel",...a[o]),this.$=a[o];break;case 68:r.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:r.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:r.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:let t={};t[a[o-1].trim()]=a[o].trim(),this.$=t;break;case 76:this.$=""}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:g,43:23,44:f,45:m,46:y,47:v,48:x,49:b,50:w,51:k,52:T,53:_,54:E,55:C,56:S,57:A,58:L,59:N,60:I,61:M,62:R,63:D,64:O,65:P,66:B,67:$,68:F,69:z,70:U,71:G,72:q,73:j,74:Y},{13:70,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:g,43:23,44:f,45:m,46:y,47:v,48:x,49:b,50:w,51:k,52:T,53:_,54:E,55:C,56:S,57:A,58:L,59:N,60:I,61:M,62:R,63:D,64:O,65:P,66:B,67:$,68:F,69:z,70:U,71:G,72:q,73:j,74:Y},{13:71,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:g,43:23,44:f,45:m,46:y,47:v,48:x,49:b,50:w,51:k,52:T,53:_,54:E,55:C,56:S,57:A,58:L,59:N,60:I,61:M,62:R,63:D,64:O,65:P,66:B,67:$,68:F,69:z,70:U,71:G,72:q,73:j,74:Y},{13:72,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:g,43:23,44:f,45:m,46:y,47:v,48:x,49:b,50:w,51:k,52:T,53:_,54:E,55:C,56:S,57:A,58:L,59:N,60:I,61:M,62:R,63:D,64:O,65:P,66:B,67:$,68:F,69:z,70:U,71:G,72:q,73:j,74:Y},{13:73,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:g,43:23,44:f,45:m,46:y,47:v,48:x,49:b,50:w,51:k,52:T,53:_,54:E,55:C,56:S,57:A,58:L,59:N,60:I,61:M,62:R,63:D,64:O,65:P,66:B,67:$,68:F,69:z,70:U,71:G,72:q,73:j,74:Y},{14:[1,74]},t(W,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:h,38:u,39:d,40:p,41:g,44:f,45:m,46:y,47:v,48:x,49:b,50:w,51:k,52:T,53:_,54:E,55:C,56:S,57:A,58:L,59:N,60:I,61:M,62:R,63:D,64:O,65:P,66:B,67:$,68:F,69:z,70:U,71:G,72:q,73:j,74:Y}),t(W,[2,14]),t(H,[2,16],{12:[1,76]}),t(W,[2,36],{12:[1,77]}),t(V,[2,19]),t(V,[2,20]),{25:[1,78]},{27:[1,79]},t(V,[2,23]),{35:80,75:81,76:X,77:K,79:Z,80:Q},{35:86,75:81,76:X,77:K,79:Z,80:Q},{35:87,75:81,76:X,77:K,79:Z,80:Q},{35:88,75:81,76:X,77:K,79:Z,80:Q},{35:89,75:81,76:X,77:K,79:Z,80:Q},{35:90,75:81,76:X,77:K,79:Z,80:Q},{35:91,75:81,76:X,77:K,79:Z,80:Q},{35:92,75:81,76:X,77:K,79:Z,80:Q},{35:93,75:81,76:X,77:K,79:Z,80:Q},{35:94,75:81,76:X,77:K,79:Z,80:Q},{35:95,75:81,76:X,77:K,79:Z,80:Q},{35:96,75:81,76:X,77:K,79:Z,80:Q},{35:97,75:81,76:X,77:K,79:Z,80:Q},{35:98,75:81,76:X,77:K,79:Z,80:Q},{35:99,75:81,76:X,77:K,79:Z,80:Q},{35:100,75:81,76:X,77:K,79:Z,80:Q},{35:101,75:81,76:X,77:K,79:Z,80:Q},{35:102,75:81,76:X,77:K,79:Z,80:Q},{35:103,75:81,76:X,77:K,79:Z,80:Q},{35:104,75:81,76:X,77:K,79:Z,80:Q},t(J,[2,59]),{35:105,75:81,76:X,77:K,79:Z,80:Q},{35:106,75:81,76:X,77:K,79:Z,80:Q},{35:107,75:81,76:X,77:K,79:Z,80:Q},{35:108,75:81,76:X,77:K,79:Z,80:Q},{35:109,75:81,76:X,77:K,79:Z,80:Q},{35:110,75:81,76:X,77:K,79:Z,80:Q},{35:111,75:81,76:X,77:K,79:Z,80:Q},{35:112,75:81,76:X,77:K,79:Z,80:Q},{35:113,75:81,76:X,77:K,79:Z,80:Q},{35:114,75:81,76:X,77:K,79:Z,80:Q},{35:115,75:81,76:X,77:K,79:Z,80:Q},{20:116,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:g,43:23,44:f,45:m,46:y,47:v,48:x,49:b,50:w,51:k,52:T,53:_,54:E,55:C,56:S,57:A,58:L,59:N,60:I,61:M,62:R,63:D,64:O,65:P,66:B,67:$,68:F,69:z,70:U,71:G,72:q,73:j,74:Y},{12:[1,118],33:[1,117]},{35:119,75:81,76:X,77:K,79:Z,80:Q},{35:120,75:81,76:X,77:K,79:Z,80:Q},{35:121,75:81,76:X,77:K,79:Z,80:Q},{35:122,75:81,76:X,77:K,79:Z,80:Q},{35:123,75:81,76:X,77:K,79:Z,80:Q},{35:124,75:81,76:X,77:K,79:Z,80:Q},{35:125,75:81,76:X,77:K,79:Z,80:Q},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(W,[2,15]),t(H,[2,17],{21:22,19:130,22:e,23:n,24:r,26:i,28:a}),t(W,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:r,26:i,28:a,34:s,36:l,37:h,38:u,39:d,40:p,41:g,44:f,45:m,46:y,47:v,48:x,49:b,50:w,51:k,52:T,53:_,54:E,55:C,56:S,57:A,58:L,59:N,60:I,61:M,62:R,63:D,64:O,65:P,66:B,67:$,68:F,69:z,70:U,71:G,72:q,73:j,74:Y}),t(V,[2,21]),t(V,[2,22]),t(J,[2,39]),t(tt,[2,71],{75:81,35:132,76:X,77:K,79:Z,80:Q}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(J,[2,40]),t(J,[2,41]),t(J,[2,42]),t(J,[2,43]),t(J,[2,44]),t(J,[2,45]),t(J,[2,46]),t(J,[2,47]),t(J,[2,48]),t(J,[2,49]),t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),t(J,[2,57]),t(J,[2,58]),t(J,[2,60]),t(J,[2,61]),t(J,[2,62]),t(J,[2,63]),t(J,[2,64]),t(J,[2,65]),t(J,[2,66]),t(J,[2,67]),t(J,[2,68]),t(J,[2,69]),t(J,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(nt,[2,28]),t(nt,[2,29]),t(nt,[2,30]),t(nt,[2,31]),t(nt,[2,32]),t(nt,[2,33]),t(nt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(H,[2,18]),t(W,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(J,[2,24]),t(J,[2,35]),t(rt,[2,25]),t(rt,[2,26],{12:[1,138]}),t(rt,[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:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},at=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:o((function(t,e,n,r){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return t}();function st(){this.yy={}}return it.lexer=at,o(st,"Parser"),st.prototype=it,it.Parser=st,new st}();yH.parser=yH;var vH,xH=yH,bH=[],wH=[""],kH="global",TH="",_H=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],EH=[],CH="",SH=!1,AH=4,LH=2,NH=o((function(){return vH}),"getC4Type"),IH=o((function(t){let e=ln(t,Kn());vH=e}),"setC4Type"),MH=o((function(t,e,n,r,i,a,s,o,l){if(null==t||null==e||null==n||null==r)return;let c={};const h=EH.find((t=>t.from===e&&t.to===n));if(h?c=h:EH.push(c),c.type=t,c.from=e,c.to=n,c.label={text:r},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==a)c.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]={text:e}}else c.descr={text:a};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.tags=o;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.link=l;c.wrap=eV()}),"addRel"),RH=o((function(t,e,n,r,i,a,s){if(null===e||null===n)return;let o={};const l=bH.find((t=>t.alias===e));if(l&&e===l.alias?o=l:(o.alias=e,bH.push(o)),o.label=null==n?{text:""}:{text:n},null==r)o.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]={text:e}}else o.descr={text:r};if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]=e}else o.sprite=i;if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=e}else o.tags=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=kH,o.wrap=eV()}),"addPersonOrSystem"),DH=o((function(t,e,n,r,i,a,s,o){if(null===e||null===n)return;let l={};const c=bH.find((t=>t.alias===e));if(c&&e===c.alias?l=c:(l.alias=e,bH.push(l)),l.label=null==n?{text:""}:{text:n},null==r)l.techn={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.techn={text:r};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.wrap=eV(),l.typeC4Shape={text:t},l.parentBoundary=kH}),"addContainer"),OH=o((function(t,e,n,r,i,a,s,o){if(null===e||null===n)return;let l={};const c=bH.find((t=>t.alias===e));if(c&&e===c.alias?l=c:(l.alias=e,bH.push(l)),l.label=null==n?{text:""}:{text:n},null==r)l.techn={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.techn={text:r};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.wrap=eV(),l.typeC4Shape={text:t},l.parentBoundary=kH}),"addComponent"),PH=o((function(t,e,n,r,i){if(null===t||null===e)return;let a={};const s=_H.find((e=>e.alias===t));if(s&&t===s.alias?a=s:(a.alias=t,_H.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]=e}else a.tags=r;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=kH,a.wrap=eV(),TH=kH,kH=t,wH.push(TH)}),"addPersonOrSystemBoundary"),BH=o((function(t,e,n,r,i){if(null===t||null===e)return;let a={};const s=_H.find((e=>e.alias===t));if(s&&t===s.alias?a=s:(a.alias=t,_H.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]=e}else a.tags=r;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=kH,a.wrap=eV(),TH=kH,kH=t,wH.push(TH)}),"addContainerBoundary"),$H=o((function(t,e,n,r,i,a,s,o){if(null===e||null===n)return;let l={};const c=_H.find((t=>t.alias===e));if(c&&e===c.alias?l=c:(l.alias=e,_H.push(l)),l.label=null==n?{text:""}:{text:n},null==r)l.type={text:"node"};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.type={text:r};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.nodeType=t,l.parentBoundary=kH,l.wrap=eV(),TH=kH,kH=e,wH.push(TH)}),"addDeploymentNode"),FH=o((function(){kH=TH,wH.pop(),TH=wH.pop(),wH.push(TH)}),"popBoundaryParseStack"),zH=o((function(t,e,n,r,i,a,s,o,l,c,h){let u=bH.find((t=>t.alias===e));if(void 0!==u||(u=_H.find((t=>t.alias===e)),void 0!==u)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];u[t]=e}else u.bgColor=n;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];u[t]=e}else u.fontColor=r;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];u[t]=e}else u.borderColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];u[t]=e}else u.shadowing=a;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];u[t]=e}else u.shape=s;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];u[t]=e}else u.sprite=o;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];u[t]=e}else u.techn=l;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];u[t]=e}else u.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];u[t]=e}else u.legendSprite=h}}),"updateElStyle"),UH=o((function(t,e,n,r,i,a,s){const o=EH.find((t=>t.from===e&&t.to===n));if(void 0!==o){if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.textColor=r;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]=e}else o.lineColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=parseInt(e)}else o.offsetX=parseInt(a);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=parseInt(e)}else o.offsetY=parseInt(s)}}),"updateRelStyle"),GH=o((function(t,e,n){let r=AH,i=LH;if("object"==typeof e){const t=Object.values(e)[0];r=parseInt(t)}else r=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];i=parseInt(t)}else i=parseInt(n);r>=1&&(AH=r),i>=1&&(LH=i)}),"updateLayoutConfig"),qH=o((function(){return AH}),"getC4ShapeInRow"),jH=o((function(){return LH}),"getC4BoundaryInRow"),YH=o((function(){return kH}),"getCurrentBoundaryParse"),WH=o((function(){return TH}),"getParentBoundaryParse"),HH=o((function(t){return null==t?bH:bH.filter((e=>e.parentBoundary===t))}),"getC4ShapeArray"),VH=o((function(t){return bH.find((e=>e.alias===t))}),"getC4Shape"),XH=o((function(t){return Object.keys(HH(t))}),"getC4ShapeKeys"),KH=o((function(t){return null==t?_H:_H.filter((e=>e.parentBoundary===t))}),"getBoundaries"),ZH=KH,QH=o((function(){return EH}),"getRels"),JH=o((function(){return CH}),"getTitle"),tV=o((function(t){SH=t}),"setWrap"),eV=o((function(){return SH}),"autoWrap"),nV=o((function(){bH=[],_H=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],TH="",kH="global",wH=[""],EH=[],wH=[""],CH="",SH=!1,AH=4,LH=2}),"clear"),rV=o((function(t){let e=ln(t,Kn());CH=e}),"setTitle"),iV={addPersonOrSystem:RH,addPersonOrSystemBoundary:PH,addContainer:DH,addContainerBoundary:BH,addComponent:OH,addDeploymentNode:$H,popBoundaryParseStack:FH,addRel:MH,updateElStyle:zH,updateRelStyle:UH,updateLayoutConfig:GH,autoWrap:eV,setWrap:tV,getC4ShapeArray:HH,getC4Shape:VH,getC4ShapeKeys:XH,getBoundaries:KH,getBoundarys:ZH,getCurrentBoundaryParse:YH,getParentBoundaryParse:WH,getRels:QH,getTitle:JH,getC4Type:NH,getC4ShapeInRow:qH,getC4BoundaryInRow:jH,setAccTitle:Gn,getAccTitle:qn,getAccDescription:Yn,setAccDescription:jn,getConfig:o((()=>Kn().c4),"getConfig"),clear:nV,LINETYPE:{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},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:rV,setC4Type:IH},aV=p(qy(),1),sV=o((function(t,e){return hH(t,e)}),"drawRect"),oV=o((function(t,e,n,r,i,a){const s=t.append("image");s.attr("width",e),s.attr("height",n),s.attr("x",r),s.attr("y",i);let o=a.startsWith("data:image/png;base64")?a:(0,aV.sanitizeUrl)(a);s.attr("xlink:href",o)}),"drawImage"),lV=o(((t,e,n)=>{const r=t.append("g");let i=0;for(let t of e){let e=t.textColor?t.textColor:"#444444",a=t.lineColor?t.lineColor:"#444444",s=t.offsetX?parseInt(t.offsetX):0,o=t.offsetY?parseInt(t.offsetY):0,l="";if(0===i){let e=r.append("line");e.attr("x1",t.startPoint.x),e.attr("y1",t.startPoint.y),e.attr("x2",t.endPoint.x),e.attr("y2",t.endPoint.y),e.attr("stroke-width","1"),e.attr("stroke",a),e.style("fill","none"),"rel_b"!==t.type&&e.attr("marker-end","url("+l+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+l+"#arrowend)"),i=-1}else{let e=r.append("path");e.attr("fill","none").attr("stroke-width","1").attr("stroke",a).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",t.startPoint.x).replaceAll("starty",t.startPoint.y).replaceAll("controlx",t.startPoint.x+(t.endPoint.x-t.startPoint.x)/2-(t.endPoint.x-t.startPoint.x)/4).replaceAll("controly",t.startPoint.y+(t.endPoint.y-t.startPoint.y)/2).replaceAll("stopx",t.endPoint.x).replaceAll("stopy",t.endPoint.y)),"rel_b"!==t.type&&e.attr("marker-end","url("+l+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+l+"#arrowend)")}let c=n.messageFont();bV(n)(t.label.text,r,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+o,t.label.width,t.label.height,{fill:e},c),t.techn&&""!==t.techn.text&&(c=n.messageFont(),bV(n)("["+t.techn.text+"]",r,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+n.messageFontSize+5+o,Math.max(t.label.width,t.techn.width),t.techn.height,{fill:e,"font-style":"italic"},c))}}),"drawRels"),cV=o((function(t,e,n){const r=t.append("g");let i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};sV(r,l);let c=n.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=s,bV(n)(e.label.text,r,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=n.boundaryFont(),c.fontColor=s,bV(n)(e.type.text,r,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=n.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=s,bV(n)(e.descr.text,r,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))}),"drawBoundary"),hV=o((function(t,e,n){let r=e.bgColor?e.bgColor:n[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:n[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const o=t.append("g");o.attr("class","person-man");const l=fH();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=r,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},sV(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let c=xV(n,e.typeC4Shape.text);switch(o.append("text").attr("fill",a).attr("font-family",c.fontFamily).attr("font-size",c.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":oV(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let h=n[e.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,bV(n)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},h),h=n[e.typeC4Shape.text+"Font"](),h.fontColor=a,e.techn&&""!==e.techn?.text?bV(n)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},h):e.type&&""!==e.type.text&&bV(n)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},h),e.descr&&""!==e.descr.text&&(h=n.personFont(),h.fontColor=a,bV(n)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},h)),e.height}),"drawC4Shape"),uV=o((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),dV=o((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),pV=o((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),gV=o((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")}),"insertArrowHead"),fV=o((function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")}),"insertArrowEnd"),mV=o((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),yV=o((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertDynamicNumber"),vV=o((function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")}),"insertArrowCrossHead"),xV=o(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"getC4ShapeFont"),bV=function(){function t(t,e,n,i,a,s,o){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,a,s,o,l){const{fontSize:c,fontFamily:h,fontWeight:u}=l,d=t.split(Sn.lineBreakRegex);for(let t=0;t=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>_V)&&(e=this.nextData.startx+t.margin+CV.nextLinePaddingX,r=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=r+t.height,this.nextData.cnt=1),t.x=e,t.y=r,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",r,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",r,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},AV(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},AV=o((function(t){N(CV,t),t.fontFamily&&(CV.personFontFamily=CV.systemFontFamily=CV.messageFontFamily=t.fontFamily),t.fontSize&&(CV.personFontSize=CV.systemFontSize=CV.messageFontSize=t.fontSize),t.fontWeight&&(CV.personFontWeight=CV.systemFontWeight=CV.messageFontWeight=t.fontWeight)}),"setConf"),LV=o(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"c4ShapeFont"),NV=o((t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight})),"boundaryFont"),IV=o((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont");function MV(t,e,n,r,i){if(!e[t].width)if(n)e[t].text=kk(e[t].text,i,r),e[t].textLines=e[t].text.split(Sn.lineBreakRegex).length,e[t].width=i,e[t].height=_k(e[t].text,r);else{let n=e[t].text.split(Sn.lineBreakRegex);e[t].textLines=n.length;let i=0;e[t].height=0,e[t].width=0;for(const a of n)e[t].width=Math.max(Ek(a,r),e[t].width),i=_k(a,r),e[t].height=e[t].height+i}}o(MV,"calcC4ShapeTextWH");var RV=o((function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=CV.c4ShapeMargin-35;let r=e.wrap&&CV.wrap,i=NV(CV);i.fontSize=i.fontSize+2,i.fontWeight="bold",MV("label",e,r,i,Ek(e.label.text,i)),wV.drawBoundary(t,e,CV)}),"drawBoundary"),DV=o((function(t,e,n,r){let i=0;for(const a of r){i=0;const r=n[a];let s=LV(CV,r.typeC4Shape.text);switch(s.fontSize=s.fontSize-2,r.typeC4Shape.width=Ek("«"+r.typeC4Shape.text+"»",s),r.typeC4Shape.height=s.fontSize+2,r.typeC4Shape.Y=CV.c4ShapePadding,i=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height);let o=r.wrap&&CV.wrap,l=CV.width-2*CV.c4ShapePadding,c=LV(CV,r.typeC4Shape.text);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",MV("label",r,o,c,l),r.label.Y=i+8,i=r.label.Y+r.label.height,r.type&&""!==r.type.text){r.type.text="["+r.type.text+"]",MV("type",r,o,LV(CV,r.typeC4Shape.text),l),r.type.Y=i+5,i=r.type.Y+r.type.height}else if(r.techn&&""!==r.techn.text){r.techn.text="["+r.techn.text+"]",MV("techn",r,o,LV(CV,r.techn.text),l),r.techn.Y=i+5,i=r.techn.Y+r.techn.height}let h=i,u=r.label.width;if(r.descr&&""!==r.descr.text){MV("descr",r,o,LV(CV,r.typeC4Shape.text),l),r.descr.Y=i+20,i=r.descr.Y+r.descr.height,u=Math.max(r.label.width,r.descr.width),h=i-5*r.descr.textLines}u+=CV.c4ShapePadding,r.width=Math.max(r.width||CV.width,u,CV.width),r.height=Math.max(r.height||CV.height,h,CV.height),r.margin=r.margin||CV.c4ShapeMargin,t.insert(r),wV.drawC4Shape(e,r,CV)}t.bumpLastMargin(CV.c4ShapeMargin)}),"drawC4ShapeArray"),OV=class{static{o(this,"Point")}constructor(t,e){this.x=t,this.y=e}},PV=o((function(t,e){let n=t.x,r=t.y,i=e.x,a=e.y,s=n+t.width/2,o=r+t.height/2,l=Math.abs(n-i),c=Math.abs(r-a),h=c/l,u=t.height/t.width,d=null;return r==a&&ni?d=new OV(n,o):n==i&&ra&&(d=new OV(s,r)),n>i&&r=h?new OV(n,o+h*t.width/2):new OV(s-l/c*t.height/2,r+t.height):n=h?new OV(n+t.width,o+h*t.width/2):new OV(s+l/c*t.height/2,r+t.height):na?d=u>=h?new OV(n+t.width,o-h*t.width/2):new OV(s+t.height/2*l/c,r):n>i&&r>a&&(d=u>=h?new OV(n,o-t.width/2*h):new OV(s-t.height/2*l/c,r)),d}),"getIntersectPoint"),BV=o((function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let r=PV(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:r,endPoint:PV(e,n)}}),"getIntersectPoints"),$V=o((function(t,e,n,r){let i=0;for(let t of e){i+=1;let e=t.wrap&&CV.wrap,a=IV(CV);"C4Dynamic"===r.db.getC4Type()&&(t.label.text=i+": "+t.label.text);let s=Ek(t.label.text,a);MV("label",t,e,a,s),t.techn&&""!==t.techn.text&&(s=Ek(t.techn.text,a),MV("techn",t,e,a,s)),t.descr&&""!==t.descr.text&&(s=Ek(t.descr.text,a),MV("descr",t,e,a,s));let o=n(t.from),l=n(t.to),c=BV(o,l);t.startPoint=c.startPoint,t.endPoint=c.endPoint}wV.drawRels(t,e,CV)}),"drawRels");function FV(t,e,n,r,i){let a=new SV(i);a.data.widthLimit=n.data.widthLimit/Math.min(EV,r.length);for(let[s,o]of r.entries()){let r=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=r,r=o.image.Y+o.image.height);let l=o.wrap&&CV.wrap,c=NV(CV);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",MV("label",o,l,c,a.data.widthLimit),o.label.Y=r+8,r=o.label.Y+o.label.height,o.type&&""!==o.type.text){o.type.text="["+o.type.text+"]",MV("type",o,l,NV(CV),a.data.widthLimit),o.type.Y=r+5,r=o.type.Y+o.type.height}if(o.descr&&""!==o.descr.text){let t=NV(CV);t.fontSize=t.fontSize-2,MV("descr",o,l,t,a.data.widthLimit),o.descr.Y=r+20,r=o.descr.Y+o.descr.height}if(0==s||s%EV==0){let t=n.data.startx+CV.diagramMarginX,e=n.data.stopy+CV.diagramMarginY+r;a.setData(t,t,e,e)}else{let t=a.data.stopx!==a.data.startx?a.data.stopx+CV.diagramMarginX:a.data.startx,e=a.data.starty;a.setData(t,t,e,e)}a.name=o.alias;let h=i.db.getC4ShapeArray(o.alias),u=i.db.getC4ShapeKeys(o.alias);u.length>0&&DV(a,t,h,u),e=o.alias;let d=i.db.getBoundarys(e);d.length>0&&FV(t,e,a,d,i),"global"!==o.alias&&RV(t,o,a),n.data.stopy=Math.max(a.data.stopy+CV.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+CV.c4ShapeMargin,n.data.stopx),kV=Math.max(kV,n.data.stopx),TV=Math.max(TV,n.data.stopy)}}o(FV,"drawInsideBoundary");var zV,UV,GV=o((function(t,e,n,r){CV=Kn().c4;const i=Kn().securityLevel;let a;"sandbox"===i&&(a=Fa("#i"+e));const s=Fa("sandbox"===i?a.nodes()[0].contentDocument.body:"body");let o=r.db;r.db.setWrap(CV.wrap),_V=o.getC4ShapeInRow(),EV=o.getC4BoundaryInRow(),y.debug(`C:${JSON.stringify(CV,null,2)}`);const l="sandbox"===i?s.select(`[id="${e}"]`):Fa(`[id="${e}"]`);wV.insertComputerIcon(l),wV.insertDatabaseIcon(l),wV.insertClockIcon(l);let c=new SV(r);c.setData(CV.diagramMarginX,CV.diagramMarginX,CV.diagramMarginY,CV.diagramMarginY),c.data.widthLimit=screen.availWidth,kV=CV.diagramMarginX,TV=CV.diagramMarginY;const h=r.db.getTitle();FV(l,"",c,r.db.getBoundarys(""),r),wV.insertArrowHead(l),wV.insertArrowEnd(l),wV.insertArrowCrossHead(l),wV.insertArrowFilledHead(l),$V(l,r.db.getRels(),r.db.getC4Shape,r),c.data.stopx=kV,c.data.stopy=TV;const u=c.data;let d=u.stopy-u.starty+2*CV.diagramMarginY;const p=u.stopx-u.startx+2*CV.diagramMarginX;h&&l.append("text").text(h).attr("x",(u.stopx-u.startx)/2-4*CV.diagramMarginX).attr("y",u.starty+CV.diagramMarginY),Nn(l,d,p,CV.useMaxWidth);const g=h?60:0;l.attr("viewBox",u.startx-CV.diagramMarginX+" -"+(CV.diagramMarginY+g)+" "+p+" "+(d+g)),y.debug("models:",u)}),"draw"),qV={drawPersonOrSystemArray:DV,drawBoundary:RV,setConf:AV,draw:GV},jV={parser:xH,db:iV,renderer:qV,styles:o((t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`),"getStyles"),init:o((({c4:t,wrap:e})=>{qV.setConf(t),iV.setWrap(e)}),"init")},YV=Object.freeze({__proto__:null,diagram:jV}),WV=o(((t,e)=>{let n;"sandbox"===e&&(n=Fa("#i"+t));return Fa("sandbox"===e?n.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)}),"getDiagramElement"),HV=o(((t,e,n,r)=>{t.attr("class",n);const{width:i,height:a,x:s,y:o}=VV(t,e);Nn(t,a,i,r);const l=XV(s,o,i,a,e);t.attr("viewBox",l),y.debug(`viewBox configured: ${l} with padding: ${e}`)}),"setupViewPortForSVG"),VV=o(((t,e)=>{const n=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*e,height:n.height+2*e,x:n.x,y:n.y}}),"calculateDimensionsWithPadding"),XV=o(((t,e,n,r,i)=>`${t-i} ${e-i} ${n} ${r}`),"createViewBox"),KV=0,ZV=Kn(),QV=new Map,JV=[],tX=new Map,eX=[],nX=new Map,rX=new Map,iX=0,aX=!0,sX=[],oX=o((t=>Sn.sanitizeText(t,ZV)),"sanitizeText"),lX=o((function(t){for(const e of QV.values())if(e.id===t)return e.domId;return t}),"lookUpDomId"),cX=o((function(t,e,n,r,i,a,s={},o){if(!t||0===t.trim().length)return;let l,c=QV.get(t);if(void 0===c&&(c={id:t,labelType:"text",domId:"flowchart-"+t+"-"+KV,styles:[],classes:[]},QV.set(t,c)),KV++,void 0!==e?(ZV=Kn(),l=oX(e.text.trim()),c.labelType=e.type,l.startsWith('"')&&l.endsWith('"')&&(l=l.substring(1,l.length-1)),c.text=l):void 0===c.text&&(c.text=t),void 0!==n&&(c.type=n),null!=r&&r.forEach((function(t){c.styles.push(t)})),null!=i&&i.forEach((function(t){c.classes.push(t)})),void 0!==a&&(c.dir=a),void 0===c.props?c.props=s:void 0!==s&&Object.assign(c.props,s),void 0!==o){let e;e=o.includes("\n")?o+"\n":"{\n"+o+"\n}";const n=iy(e,{schema:ry});if(n.shape){if(n.shape!==n.shape.toLowerCase()||n.shape.includes("_"))throw new Error(`No such shape: ${n.shape}. Shape names should be lowercase.`);if(!IS(n.shape))throw new Error(`No such shape: ${n.shape}.`);c.type=n?.shape}n?.label&&(c.text=n?.label),n?.icon&&(c.icon=n?.icon,n.label?.trim()||c.text!==t||(c.text="")),n?.form&&(c.form=n?.form),n?.pos&&(c.pos=n?.pos),n?.img&&(c.img=n?.img,n.label?.trim()||c.text!==t||(c.text="")),n?.constraint&&(c.constraint=n.constraint),n.w&&(c.assetWidth=Number(n.w)),n.h&&(c.assetHeight=Number(n.h))}}),"addVertex"),hX=o((function(t,e,n){const r={start:t,end:e,type:void 0,text:"",labelType:"text"};y.info("abc78 Got edge...",r);const i=n.text;if(void 0!==i&&(r.text=oX(i.text.trim()),r.text.startsWith('"')&&r.text.endsWith('"')&&(r.text=r.text.substring(1,r.text.length-1)),r.labelType=i.type),void 0!==n&&(r.type=n.type,r.stroke=n.stroke,r.length=n.length>10?10:n.length),!(JV.length<(ZV.maxEdges??500)))throw new Error(`Edge limit exceeded. ${JV.length} edges found, but the limit is ${ZV.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);y.info("Pushing edge..."),JV.push(r)}),"addSingleLink"),uX=o((function(t,e,n){y.info("addLink",t,e,n);for(const r of t)for(const t of e)hX(r,t,n)}),"addLink"),dX=o((function(t,e){t.forEach((function(t){"default"===t?JV.defaultInterpolate=e:JV[t].interpolate=e}))}),"updateLinkInterpolate"),pX=o((function(t,e){t.forEach((function(t){if("number"==typeof t&&t>=JV.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${JV.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?JV.defaultStyle=e:(JV[t].style=e,(JV[t]?.style?.length??0)>0&&!JV[t]?.style?.some((t=>t?.startsWith("fill")))&&JV[t]?.style?.push("fill:none"))}))}),"updateLink"),gX=o((function(t,e){t.split(",").forEach((function(t){let n=tX.get(t);void 0===n&&(n={id:t,styles:[],textStyles:[]},tX.set(t,n)),null!=e&&e.forEach((function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");n.textStyles.push(e)}n.styles.push(t)}))}))}),"addClass"),fX=o((function(t){/.*/.exec(zV)&&(zV="LR"),/.*v/.exec(zV)&&(zV="TB"),"TD"===zV&&(zV="TB")}),"setDirection"),mX=o((function(t,e){for(const n of t.split(",")){const t=QV.get(n);t&&t.classes.push(e);const r=nX.get(n);r&&r.classes.push(e)}}),"setClass"),yX=o((function(t,e){if(void 0!==e){e=oX(e);for(const n of t.split(","))rX.set("gen-1"===UV?lX(n):n,e)}}),"setTooltip"),vX=o((function(t,e,n){const r=lX(t);if("loose"!==Kn().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);Fa(this).classed("hover",!1)}))}),"setupToolTips");sX.push(SX);var AX=o((function(t="gen-1"){QV=new Map,tX=new Map,JV=[],sX=[SX],eX=[],nX=new Map,iX=0,rX=new Map,aX=!0,UV=t,ZV=Kn(),Un()}),"clear"),LX=o((t=>{UV=t||"gen-2"}),"setGen"),NX=o((function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}),"defaultStyle"),IX=o((function(t,e,n){let r=t.text.trim(),i=n.text;function a(t){const e={boolean:{},number:{},string:{}},n=[];let r;const i=t.filter((function(t){const i=typeof t;return t.stmt&&"dir"===t.stmt?(r=t.value,!1):""!==t.trim()&&(i in e?!e[i].hasOwnProperty(t)&&(e[i][t]=!0):!n.includes(t)&&n.push(t))}));return{nodeList:i,dir:r}}t===n&&/\s/.exec(n.text)&&(r=void 0),o(a,"uniq");const{nodeList:s,dir:l}=a(e.flat());if("gen-1"===UV)for(let t=0;t2e3)return{result:!1,count:0};if(DX[RX]=e,eX[e].id===t)return{result:!0,count:0};let r=0,i=1;for(;r=0){const n=OX(t,e);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}}),"indexNodes2"),PX=o((function(t){return DX[t]}),"getDepthFirstPos"),BX=o((function(){RX=-1,eX.length>0&&OX("none",eX.length-1)}),"indexNodes"),$X=o((function(){return eX}),"getSubGraphs"),FX=o((()=>!!aX&&(aX=!1,!0)),"firstGraph"),zX=o((t=>{let e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}let r="normal";return e.includes("=")&&(r="thick"),e.includes(".")&&(r="dotted"),{type:n,stroke:r}}),"destructStartLink"),UX=o(((t,e)=>{const n=e.length;let r=0;for(let i=0;i{const e=t.trim();let n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross",e.startsWith("x")&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point",e.startsWith("<")&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle",e.startsWith("o")&&(r="double_"+r,n=n.slice(1))}let i="normal",a=n.length-1;n.startsWith("=")&&(i="thick"),n.startsWith("~")&&(i="invisible");const s=UX(".",n);return s&&(i="dotted",a=s),{type:r,stroke:i,length:a}}),"destructEndLink"),qX=o(((t,e)=>{const n=GX(t);let r;if(e){if(r=zX(e),r.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===r.type)r.type=n.type;else{if(r.type!==n.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return"double_arrow"===r.type&&(r.type="double_arrow_point"),r.length=n.length,r}return n}),"destructLink"),jX=o(((t,e)=>{for(const n of t)if(n.nodes.includes(e))return!0;return!1}),"exists"),YX=o(((t,e)=>{const n=[];return t.nodes.forEach(((r,i)=>{jX(e,r)||n.push(t.nodes[i])})),{nodes:n}}),"makeUniq"),WX={firstGraph:FX},HX=o((t=>{if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}),"getTypeFromVertex"),VX=o(((t,e)=>t.find((t=>t.id===e))),"findNode"),XX=o((t=>{let e="none",n="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":n=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),n=e}return{arrowTypeStart:e,arrowTypeEnd:n}}),"destructEdgeType"),KX=o(((t,e,n,r,i,a)=>{const s=n.get(t.id),o=r.get(t.id)??!1,l=VX(e,t.id);if(l)l.cssStyles=t.styles,l.cssCompiledStyles=ZX(t.classes),l.cssClasses=t.classes.join(" ");else{const n={id:t.id,label:t.text,labelStyle:"",parentId:s,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:ZX(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:bX(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};o?e.push({...n,isGroup:!0,shape:"rect"}):e.push({...n,isGroup:!1,shape:HX(t)})}}),"addNodeFromVertex");function ZX(t){let e=[];for(const n of t){const t=tX.get(n);t?.styles&&(e=[...e,...t.styles??[]].map((t=>t.trim()))),t?.textStyles&&(e=[...e,...t.textStyles??[]].map((t=>t.trim())))}return e}o(ZX,"getCompiledStyles");var QX=o((()=>{const t=Kn(),e=[],n=[],r=$X(),i=new Map,a=new Map;for(let t=r.length-1;t>=0;t--){const e=r[t];e.nodes.length>0&&a.set(e.id,!0);for(const t of e.nodes)i.set(t,e.id)}for(let n=r.length-1;n>=0;n--){const a=r[n];e.push({id:a.id,label:a.title,labelStyle:"",parentId:i.get(a.id),padding:8,cssCompiledStyles:ZX(a.classes),cssClasses:a.classes.join(" "),shape:"rect",dir:a.dir,isGroup:!0,look:t.look})}_X().forEach((n=>{KX(n,e,i,a,t,t.look||"classic")}));const s=EX();return s.forEach(((e,r)=>{const{arrowTypeStart:i,arrowTypeEnd:a}=XX(e.type),o=[...s.defaultStyle??[]];e.style&&o.push(...e.style);const l={id:Bk(e.start,e.end,{counter:r,prefix:"L"}),start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke?"none":i,arrowTypeEnd:"invisible"===e?.stroke?"none":a,arrowheadStyle:"fill: #333",labelStyle:o,style:o,pattern:e.stroke,look:t.look};n.push(l)})),{nodes:e,edges:n,other:{},config:t}}),"getData"),JX={defaultConfig:o((()=>Qn.flowchart),"defaultConfig"),setAccTitle:Gn,getAccTitle:qn,getAccDescription:Yn,getData:QX,setAccDescription:jn,addVertex:cX,lookUpDomId:lX,addLink:uX,updateLinkInterpolate:dX,updateLink:pX,addClass:gX,setDirection:fX,setClass:mX,setTooltip:yX,getTooltip:bX,setClickEvent:wX,setLink:xX,bindFunctions:kX,getDirection:TX,getVertices:_X,getEdges:EX,getClasses:CX,clear:AX,setGen:LX,defaultStyle:NX,addSubGraph:IX,getDepthFirstPos:PX,indexNodes:BX,getSubGraphs:$X,destructLink:qX,lex:WX,exists:jX,makeUniq:YX,setDiagramTitle:Wn,getDiagramTitle:Hn},tK=o((function(t,e){return e.db.getClasses()}),"getClasses"),eK=o((async function(t,e,n,r){y.info("REF0:"),y.info("Drawing state diagram (v2)",e);const{securityLevel:i,flowchart:a,layout:s}=Kn();let o;"sandbox"===i&&(o=Fa("#i"+e));const l="sandbox"===i?o.nodes()[0].contentDocument:document;y.debug("Before getData: ");const c=r.db.getData();y.debug("Data: ",c);const h=WV(e,i),u=TX();c.type=r.type,c.layoutAlgorithm=bA(s),"dagre"===c.layoutAlgorithm&&"elk"===s&&y.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."),c.direction=u,c.nodeSpacing=a?.nodeSpacing||50,c.rankSpacing=a?.rankSpacing||50,c.markers=["point","circle","cross"],c.diagramId=e,y.debug("REF1:",c),await xA(c,h);const d=c.config.flowchart?.diagramPadding??8;Dk.insertTitle(h,"flowchartTitleText",a?.titleTopMargin||0,r.db.getDiagramTitle()),HV(h,d,"flowchart",a?.useMaxWidth||!1);for(const t of c.nodes){const n=Fa(`#${e} [id="${t.id}"]`);if(!n||!t.link)continue;const r=l.createElementNS("http://www.w3.org/2000/svg","a");r.setAttributeNS("http://www.w3.org/2000/svg","class",t.cssClasses),r.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?r.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):t.linkTarget&&r.setAttributeNS("http://www.w3.org/2000/svg","target",t.linkTarget);const a=n.insert((function(){return r}),":first-child"),s=n.select(".label-container");s&&a.append((function(){return s.node()}));const o=n.select(".label");o&&a.append((function(){return o.node()}))}}),"draw"),nK={getClasses:tK,draw:eK},rK=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,4],n=[1,3],r=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],a=[2,2],s=[1,13],l=[1,14],c=[1,15],h=[1,16],u=[1,23],d=[1,25],p=[1,26],g=[1,27],f=[1,49],m=[1,48],y=[1,29],v=[1,30],x=[1,31],b=[1,32],w=[1,33],k=[1,44],T=[1,46],_=[1,42],E=[1,47],C=[1,43],S=[1,50],A=[1,45],L=[1,51],N=[1,52],I=[1,34],M=[1,35],R=[1,36],D=[1,37],O=[1,57],P=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],B=[1,61],$=[1,60],F=[1,62],z=[8,9,11,75,77],U=[1,77],G=[1,90],q=[1,95],j=[1,94],Y=[1,91],W=[1,87],H=[1,93],V=[1,89],X=[1,96],K=[1,92],Z=[1,97],Q=[1,88],J=[8,9,10,11,40,75,77],tt=[8,9,10,11,40,46,75,77],et=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],nt=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],rt=[44,60,88,101,104,105,108,110,113,114,115],it=[1,123],at=[1,122],st=[1,130],ot=[1,144],lt=[1,145],ct=[1,146],ht=[1,147],ut=[1,132],dt=[1,134],pt=[1,138],gt=[1,139],ft=[1,140],mt=[1,141],yt=[1,142],vt=[1,143],xt=[1,148],bt=[1,149],wt=[1,128],kt=[1,129],Tt=[1,136],_t=[1,131],Et=[1,135],Ct=[1,133],St=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],At=[1,151],Lt=[1,153],Nt=[8,9,11],It=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],Mt=[1,173],Rt=[1,169],Dt=[1,170],Ot=[1,174],Pt=[1,171],Bt=[1,172],$t=[77,115,118],Ft=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],zt=[10,105],Ut=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],Gt=[1,242],qt=[1,240],jt=[1,244],Yt=[1,238],Wt=[1,239],Ht=[1,241],Vt=[1,243],Xt=[1,245],Kt=[1,263],Zt=[8,9,11,105],Qt=[8,9,10,11,60,83,104,105,108,109,110,111],Jt={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(a[o])||a[o].length>0)&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 181:case 44:case 54:case 76:case 179:this.$=a[o];break;case 11:r.setDirection("TB"),this.$="TB";break;case 12:r.setDirection(a[o-1]),this.$=a[o-1];break;case 27:this.$=a[o-1].nodes;break;case 33:this.$=r.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 34:this.$=r.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 35:this.$=r.addSubGraph(void 0,a[o-1],void 0);break;case 37:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 43:case 131:this.$=a[o-1]+a[o];break;case 45:r.addVertex(a[o-1][0],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),r.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 46:r.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 47:r.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 48:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 49:r.addVertex(a[o-1][0],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),this.$={stmt:a[o-1],nodes:a[o-1],shapeData:a[o]};break;case 50:this.$={stmt:a[o],nodes:a[o]};break;case 51:case 126:case 128:this.$=[a[o]];break;case 52:r.addVertex(a[o-5][0],void 0,void 0,void 0,void 0,void 0,void 0,a[o-4]),this.$=a[o-5].concat(a[o]);break;case 53:this.$=a[o-4].concat(a[o]);break;case 55:this.$=a[o-2],r.setClass(a[o-2],a[o]);break;case 56:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 57:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"doublecircle");break;case 58:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 59:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"ellipse");break;case 60:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"stadium");break;case 61:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"subroutine");break;case 62:this.$=a[o-7],r.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 63:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"cylinder");break;case 64:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 65:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 66:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"hexagon");break;case 67:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 68:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"trapezoid");break;case 69:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 70:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"lean_right");break;case 71:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"lean_left");break;case 72:this.$=a[o],r.addVertex(a[o]);break;case 73:a[o-1].text=a[o],this.$=a[o-1];break;case 74:case 75:a[o-2].text=a[o-1],this.$=a[o-2];break;case 77:var l=r.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1]};break;case 78:case 84:case 99:case 101:this.$={text:a[o],type:"text"};break;case 79:case 85:case 100:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 80:case 86:this.$={text:a[o],type:"string"};break;case 81:case 87:case 102:this.$={text:a[o],type:"markdown"};break;case 82:l=r.destructLink(a[o]);this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 83:this.$=a[o-1];break;case 103:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 104:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 105:case 113:this.$=a[o-1],r.setClickEvent(a[o-1],a[o]);break;case 106:case 114:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-2]),r.setTooltip(a[o-3],a[o]);break;case 107:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-4],a[o-3],a[o-2]),r.setTooltip(a[o-4],a[o]);break;case 109:this.$=a[o-2],r.setLink(a[o-2],a[o]);break;case 110:this.$=a[o-4],r.setLink(a[o-4],a[o-2]),r.setTooltip(a[o-4],a[o]);break;case 111:this.$=a[o-4],r.setLink(a[o-4],a[o-2],a[o]);break;case 112:this.$=a[o-6],r.setLink(a[o-6],a[o-4],a[o]),r.setTooltip(a[o-6],a[o-2]);break;case 115:this.$=a[o-1],r.setLink(a[o-1],a[o]);break;case 116:this.$=a[o-3],r.setLink(a[o-3],a[o-2]),r.setTooltip(a[o-3],a[o]);break;case 117:this.$=a[o-3],r.setLink(a[o-3],a[o-2],a[o]);break;case 118:this.$=a[o-5],r.setLink(a[o-5],a[o-4],a[o]),r.setTooltip(a[o-5],a[o-2]);break;case 119:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 120:this.$=a[o-4],r.updateLink([a[o-2]],a[o]);break;case 121:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 122:this.$=a[o-8],r.updateLinkInterpolate([a[o-6]],a[o-2]),r.updateLink([a[o-6]],a[o]);break;case 123:this.$=a[o-8],r.updateLinkInterpolate(a[o-6],a[o-2]),r.updateLink(a[o-6],a[o]);break;case 124:this.$=a[o-6],r.updateLinkInterpolate([a[o-4]],a[o]);break;case 125:this.$=a[o-6],r.updateLinkInterpolate(a[o-4],a[o]);break;case 127:case 129:a[o-2].push(a[o]),this.$=a[o-2];break;case 180:case 182:this.$=a[o-1]+""+a[o];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"}}}),"anonymous"),table:[{3:1,4:2,9:e,10:n,12:r},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:n,12:r},{4:8,9:e,10:n,12:r},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:l,10:c,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:u,33:24,34:d,36:p,38:g,42:28,43:38,44:f,45:39,47:40,60:m,83:y,84:v,85:x,86:b,87:w,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N,120:I,121:M,122:R,123:D},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:O,15:53,18:56},t(P,[2,3]),t(P,[2,4]),t(P,[2,5]),t(P,[2,6]),t(P,[2,7]),t(P,[2,8]),{8:B,9:$,11:F,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:B,9:$,11:F,21:66},{8:B,9:$,11:F,21:67},{8:B,9:$,11:F,21:68},{8:B,9:$,11:F,21:69},{8:B,9:$,11:F,21:70},{8:B,9:$,10:[1,71],11:F,21:72},t(P,[2,36]),{35:[1,73]},{37:[1,74]},t(P,[2,39]),t(z,[2,50],{18:75,39:76,10:O,40:U}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:G,44:q,60:j,79:[1,85],88:Y,94:[1,82],96:[1,83],100:84,104:W,105:H,108:V,110:X,113:K,114:Z,115:Q,119:86},t(P,[2,183]),t(P,[2,184]),t(P,[2,185]),t(P,[2,186]),t(J,[2,51]),t(J,[2,54],{46:[1,98]}),t(tt,[2,72],{112:111,29:[1,99],44:f,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:m,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:k,101:T,104:_,105:E,108:C,110:S,113:A,114:L,115:N}),t(et,[2,179]),t(et,[2,140]),t(et,[2,141]),t(et,[2,142]),t(et,[2,143]),t(et,[2,144]),t(et,[2,145]),t(et,[2,146]),t(et,[2,147]),t(et,[2,148]),t(et,[2,149]),t(et,[2,150]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,112]},t(nt,[2,26],{18:113,10:O}),t(P,[2,27]),{42:114,43:38,44:f,45:39,47:40,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N},t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(rt,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:it,118:at},t([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),t(P,[2,28]),t(P,[2,29]),t(P,[2,30]),t(P,[2,31]),t(P,[2,32]),{10:st,12:ot,14:lt,27:ct,28:124,32:ht,44:ut,60:dt,75:pt,79:[1,126],80:[1,127],82:137,83:gt,84:ft,85:mt,86:yt,87:vt,88:xt,89:bt,90:125,104:wt,108:kt,110:Tt,113:_t,114:Et,115:Ct},t(St,a,{5:150}),t(P,[2,37]),t(P,[2,38]),t(z,[2,48],{44:At}),t(z,[2,49],{18:152,10:O,40:Lt}),t(J,[2,44]),{44:f,47:154,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N},{101:[1,155],102:156,104:[1,157]},{44:f,47:158,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N},{44:f,47:159,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N},t(Nt,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},t(Nt,[2,113],{119:164,10:[1,163],14:G,44:q,60:j,88:Y,104:W,105:H,108:V,110:X,113:K,114:Z,115:Q}),t(Nt,[2,115],{10:[1,165]}),t(It,[2,181]),t(It,[2,168]),t(It,[2,169]),t(It,[2,170]),t(It,[2,171]),t(It,[2,172]),t(It,[2,173]),t(It,[2,174]),t(It,[2,175]),t(It,[2,176]),t(It,[2,177]),t(It,[2,178]),{44:f,47:166,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N},{30:167,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:175,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:177,50:[1,176],67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:178,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:179,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:180,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{108:[1,181]},{30:182,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:183,65:[1,184],67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:185,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:186,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{30:187,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},t(et,[2,180]),t(i,[2,20]),t(nt,[2,25]),t(z,[2,46],{39:188,18:189,10:O,40:U}),t(rt,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{77:[1,193],78:194,115:it,118:at},t($t,[2,78]),t($t,[2,80]),t($t,[2,81]),t($t,[2,166]),t($t,[2,167]),{8:B,9:$,10:st,11:F,12:ot,14:lt,21:196,27:ct,29:[1,195],32:ht,44:ut,60:dt,75:pt,82:137,83:gt,84:ft,85:mt,86:yt,87:vt,88:xt,89:bt,90:197,104:wt,108:kt,110:Tt,113:_t,114:Et,115:Ct},t(Ft,[2,99]),t(Ft,[2,101]),t(Ft,[2,102]),t(Ft,[2,155]),t(Ft,[2,156]),t(Ft,[2,157]),t(Ft,[2,158]),t(Ft,[2,159]),t(Ft,[2,160]),t(Ft,[2,161]),t(Ft,[2,162]),t(Ft,[2,163]),t(Ft,[2,164]),t(Ft,[2,165]),t(Ft,[2,88]),t(Ft,[2,89]),t(Ft,[2,90]),t(Ft,[2,91]),t(Ft,[2,92]),t(Ft,[2,93]),t(Ft,[2,94]),t(Ft,[2,95]),t(Ft,[2,96]),t(Ft,[2,97]),t(Ft,[2,98]),{6:11,7:12,8:s,9:l,10:c,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:u,32:[1,198],33:24,34:d,36:p,38:g,42:28,43:38,44:f,45:39,47:40,60:m,83:y,84:v,85:x,86:b,87:w,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N,120:I,121:M,122:R,123:D},{10:O,18:199},{44:[1,200]},t(J,[2,43]),{10:[1,201],44:f,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:111,113:A,114:L,115:N},{10:[1,202]},{10:[1,203],105:[1,204]},t(zt,[2,126]),{10:[1,205],44:f,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:111,113:A,114:L,115:N},{10:[1,206],44:f,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:111,113:A,114:L,115:N},{79:[1,207]},t(Nt,[2,107],{10:[1,208]}),t(Nt,[2,109],{10:[1,209]}),{79:[1,210]},t(It,[2,182]),{79:[1,211],97:[1,212]},t(J,[2,55],{112:111,44:f,60:m,88:k,101:T,104:_,105:E,108:C,110:S,113:A,114:L,115:N}),{31:[1,213],67:Mt,81:214,115:Ot,116:Pt,117:Bt},t(Ut,[2,84]),t(Ut,[2,86]),t(Ut,[2,87]),t(Ut,[2,151]),t(Ut,[2,152]),t(Ut,[2,153]),t(Ut,[2,154]),{49:[1,215],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{30:216,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{51:[1,217],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{53:[1,218],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{55:[1,219],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{57:[1,220],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{60:[1,221]},{64:[1,222],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{66:[1,223],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{30:224,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},{31:[1,225],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{67:Mt,69:[1,226],71:[1,227],81:214,115:Ot,116:Pt,117:Bt},{67:Mt,69:[1,229],71:[1,228],81:214,115:Ot,116:Pt,117:Bt},t(z,[2,45],{18:152,10:O,40:Lt}),t(z,[2,47],{44:At}),t(rt,[2,75]),t(rt,[2,74]),{62:[1,230],67:Mt,81:214,115:Ot,116:Pt,117:Bt},t(rt,[2,77]),t($t,[2,79]),{30:231,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},t(St,a,{5:232}),t(Ft,[2,100]),t(P,[2,35]),{43:233,44:f,45:39,47:40,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N},{10:O,18:234},{10:Gt,60:qt,83:jt,91:235,104:Yt,106:236,107:237,108:Wt,109:Ht,110:Vt,111:Xt},{10:Gt,60:qt,83:jt,91:246,103:[1,247],104:Yt,106:236,107:237,108:Wt,109:Ht,110:Vt,111:Xt},{10:Gt,60:qt,83:jt,91:248,103:[1,249],104:Yt,106:236,107:237,108:Wt,109:Ht,110:Vt,111:Xt},{104:[1,250]},{10:Gt,60:qt,83:jt,91:251,104:Yt,106:236,107:237,108:Wt,109:Ht,110:Vt,111:Xt},{44:f,47:252,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N},t(Nt,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},t(Nt,[2,114]),t(Nt,[2,116],{10:[1,256]}),t(Nt,[2,117]),t(tt,[2,56]),t(Ut,[2,85]),t(tt,[2,57]),{51:[1,257],67:Mt,81:214,115:Ot,116:Pt,117:Bt},t(tt,[2,64]),t(tt,[2,59]),t(tt,[2,60]),t(tt,[2,61]),{108:[1,258]},t(tt,[2,63]),t(tt,[2,65]),{66:[1,259],67:Mt,81:214,115:Ot,116:Pt,117:Bt},t(tt,[2,67]),t(tt,[2,68]),t(tt,[2,70]),t(tt,[2,69]),t(tt,[2,71]),t([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{6:11,7:12,8:s,9:l,10:c,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:u,32:[1,261],33:24,34:d,36:p,38:g,42:28,43:38,44:f,45:39,47:40,60:m,83:y,84:v,85:x,86:b,87:w,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N,120:I,121:M,122:R,123:D},t(J,[2,53]),{43:262,44:f,45:39,47:40,60:m,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N},t(Nt,[2,119],{105:Kt}),t(Zt,[2,128],{107:264,10:Gt,60:qt,83:jt,104:Yt,108:Wt,109:Ht,110:Vt,111:Xt}),t(Qt,[2,130]),t(Qt,[2,132]),t(Qt,[2,133]),t(Qt,[2,134]),t(Qt,[2,135]),t(Qt,[2,136]),t(Qt,[2,137]),t(Qt,[2,138]),t(Qt,[2,139]),t(Nt,[2,120],{105:Kt}),{10:[1,265]},t(Nt,[2,121],{105:Kt}),{10:[1,266]},t(zt,[2,127]),t(Nt,[2,103],{105:Kt}),t(Nt,[2,104],{112:111,44:f,60:m,88:k,101:T,104:_,105:E,108:C,110:S,113:A,114:L,115:N}),t(Nt,[2,108]),t(Nt,[2,110],{10:[1,267]}),t(Nt,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:B,9:$,11:F,21:272},t(P,[2,34]),t(J,[2,52]),{10:Gt,60:qt,83:jt,104:Yt,106:273,107:237,108:Wt,109:Ht,110:Vt,111:Xt},t(Qt,[2,131]),{14:G,44:q,60:j,88:Y,100:274,104:W,105:H,108:V,110:X,113:K,114:Z,115:Q,119:86},{14:G,44:q,60:j,88:Y,100:275,104:W,105:H,108:V,110:X,113:K,114:Z,115:Q,119:86},{97:[1,276]},t(Nt,[2,118]),t(tt,[2,58]),{30:277,67:Mt,79:Rt,80:Dt,81:168,115:Ot,116:Pt,117:Bt},t(tt,[2,66]),t(St,a,{5:278}),t(Zt,[2,129],{107:264,10:Gt,60:qt,83:jt,104:Yt,108:Wt,109:Ht,110:Vt,111:Xt}),t(Nt,[2,124],{119:164,10:[1,279],14:G,44:q,60:j,88:Y,104:W,105:H,108:V,110:X,113:K,114:Z,115:Q}),t(Nt,[2,125],{119:164,10:[1,280],14:G,44:q,60:j,88:Y,104:W,105:H,108:V,110:X,113:K,114:Z,115:Q}),t(Nt,[2,112]),{31:[1,281],67:Mt,81:214,115:Ot,116:Pt,117:Bt},{6:11,7:12,8:s,9:l,10:c,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:u,32:[1,282],33:24,34:d,36:p,38:g,42:28,43:38,44:f,45:39,47:40,60:m,83:y,84:v,85:x,86:b,87:w,88:k,101:T,104:_,105:E,108:C,110:S,112:41,113:A,114:L,115:N,120:I,121:M,122:R,123:D},{10:Gt,60:qt,83:jt,91:283,104:Yt,106:236,107:237,108:Wt,109:Ht,110:Vt,111:Xt},{10:Gt,60:qt,83:jt,91:284,104:Yt,106:236,107:237,108:Wt,109:Ht,110:Vt,111:Xt},t(tt,[2,62]),t(P,[2,33]),t(Nt,[2,122],{105:Kt}),t(Nt,[2,123],{105:Kt})],defaultActions:{},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},te=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:o((function(t,e,n,r){switch(n){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"
    "),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 18:return 95;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 34:return 87;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 97;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:case 101:return 110;case 61:return 46;case 62:return 60;case 63:case 102:return 44;case 64:return 8;case 65:return 105;case 66:case 100:return 114;case 67:case 70:case 73:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:case 72:case 75:return 118;case 71:return this.pushState("thickEdgeText"),75;case 74:return this.pushState("dottedEdgeText"),75;case 76:return 77;case 77:return this.popState(),53;case 78:case 114:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};return t}();function ee(){this.yy={}}return Jt.lexer=te,o(ee,"Parser"),ee.prototype=Jt,Jt.Parser=ee,new ee}();rK.parser=rK;var iK=rK,aK=o(((t,e)=>{const n=tt,r=n(t,"r"),i=n(t,"g"),a=n(t,"b");return J(r,i,a,e)}),"fade"),sK={parser:iK,db:JX,renderer:nK,styles:o((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${aK(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n`),"getStyles"),init:o((t=>{t.flowchart||(t.flowchart={}),t.layout&&Zn({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Zn({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),JX.clear(),JX.setGen("gen-2")}),"init")},oK=Object.freeze({__proto__:null,diagram:sK}),lK=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[6,8,10,20,22,24,26,27,28],n=[1,10],r=[1,11],i=[1,12],a=[1,13],s=[1,14],l=[1,15],c=[1,21],h=[1,22],u=[1,23],d=[1,24],p=[1,25],g=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],f=[1,34],m=[27,28,46,47],y=[41,42,43,44,45],v=[17,34],x=[1,54],b=[1,53],w=[17,34,36,38],k={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=a[o];break;case 8:r.addEntity(a[o-4]),r.addEntity(a[o-2]),r.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:r.addEntity(a[o-3]),r.addAttributes(a[o-3],a[o-1]);break;case 10:r.addEntity(a[o-2]);break;case 11:r.addEntity(a[o]);break;case 12:r.addEntity(a[o-6],a[o-4]),r.addAttributes(a[o-6],a[o-1]);break;case 13:r.addEntity(a[o-5],a[o-3]);break;case 14:r.addEntity(a[o-3],a[o-1]);break;case 15:case 16:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=a[o].replace(/"/g,"");break;case 21:case 29:this.$=[a[o]];break;case 22:a[o].push(a[o-1]),this.$=a[o];break;case 23:this.$={attributeType:a[o-1],attributeName:a[o]};break;case 24:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeKeyTypeList:a[o]};break;case 25:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeComment:a[o]};break;case 26:this.$={attributeType:a[o-3],attributeName:a[o-2],attributeKeyTypeList:a[o-1],attributeComment:a[o]};break;case 30:a[o-2].push(a[o]),this.$=a[o-2];break;case 33:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 34:this.$=r.Cardinality.ZERO_OR_ONE;break;case 35:this.$=r.Cardinality.ZERO_OR_MORE;break;case 36:this.$=r.Cardinality.ONE_OR_MORE;break;case 37:this.$=r.Cardinality.ONLY_ONE;break;case 38:this.$=r.Cardinality.MD_PARENT;break;case 39:this.$=r.Identification.NON_IDENTIFYING;break;case 40:this.$=r.Identification.IDENTIFYING}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:n,22:r,24:i,26:a,27:s,28:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:n,22:r,24:i,26:a,27:s,28:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:c,42:h,43:u,44:d,45:p}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(g,[2,19]),t(g,[2,20]),t(e,[2,4]),{11:29,27:s,28:l},{16:30,17:[1,31],29:32,30:33,34:f},{11:35,27:s,28:l},{40:36,46:[1,37],47:[1,38]},t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),t(m,[2,37]),t(m,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:f},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:c,42:h,43:u,44:d,45:p},t(y,[2,39]),t(y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(v,[2,23],{32:50,33:51,35:52,37:x,38:b}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(v,[2,24],{33:56,36:[1,57],38:b}),t(v,[2,25]),t(w,[2,29]),t(v,[2,32]),t(w,[2,31]),{16:58,17:[1,59],29:32,30:33,34:f},t(v,[2,26]),{35:60,37:x},{17:[1,61]},t(e,[2,13]),t(w,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},T=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:case 15:case 20:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;case 55:return 6}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return t}();function _(){this.yy={}}return k.lexer=T,o(_,"Parser"),_.prototype=k,k.Parser=_,new _}();lK.parser=lK;var cK=lK,hK=new Map,uK=[],dK=o((function(t,e){return hK.has(t)?!hK.get(t).alias&&e&&(hK.get(t).alias=e,y.info(`Add alias '${e}' to entity '${t}'`)):(hK.set(t,{attributes:[],alias:e}),y.info("Added new entity :",t)),hK.get(t)}),"addEntity"),pK=o((()=>hK),"getEntities"),gK=o((function(t,e){let n,r=dK(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),y.debug("Added attribute ",e[n].attributeName)}),"addAttributes"),fK=o((function(t,e,n,r){let i={entityA:t,roleA:e,entityB:n,relSpec:r};uK.push(i),y.debug("Added new relationship :",i)}),"addRelationship"),mK=o((()=>uK),"getRelationships"),yK=o((function(){hK=new Map,uK=[],Un()}),"clear"),vK={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"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:o((()=>Kn().er),"getConfig"),addEntity:dK,addAttributes:gK,getEntities:pK,addRelationship:fK,getRelationships:mK,clear:yK,setAccTitle:Gn,getAccTitle:qn,setAccDescription:jn,getAccDescription:Yn,setDiagramTitle:Wn,getDiagramTitle:Hn},xK={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},bK={ERMarkers:xK,insertMarkers:o((function(t,e){let n;t.append("defs").append("marker").attr("id",xK.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",xK.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",xK.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",xK.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),n=t.append("defs").append("marker").attr("id",xK.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),n=t.append("defs").append("marker").attr("id",xK.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",xK.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",xK.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),n=t.append("defs").append("marker").attr("id",xK.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),n=t.append("defs").append("marker").attr("id",xK.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}),"insertMarkers")},wK=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function kK(t){return"string"==typeof t&&wK.test(t)}o(kK,"validate");var TK=kK,_K=[];for(let t=0;t<256;++t)_K.push((t+256).toString(16).slice(1));function EK(t,e=0){return _K[t[e+0]]+_K[t[e+1]]+_K[t[e+2]]+_K[t[e+3]]+"-"+_K[t[e+4]]+_K[t[e+5]]+"-"+_K[t[e+6]]+_K[t[e+7]]+"-"+_K[t[e+8]]+_K[t[e+9]]+"-"+_K[t[e+10]]+_K[t[e+11]]+_K[t[e+12]]+_K[t[e+13]]+_K[t[e+14]]+_K[t[e+15]]}function CK(t){if(!TK(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}o(EK,"unsafeStringify"),o(CK,"parse");var SK=CK;function AK(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n>>32-e}function MK(t){const e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n>>0;c=l,l=o,o=IK(s,30)>>>0,s=i,i=a}n[0]=n[0]+i>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+o>>>0,n[3]=n[3]+l>>>0,n[4]=n[4]+c>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}o(LK,"v35"),o(NK,"f"),o(IK,"ROTL"),o(MK,"sha1");var RK=LK("v5",80,MK),DK=/[^\dA-Za-z](\W)*/g,OK={},PK=new Map,BK=o((function(t){const e=Object.keys(t);for(const n of e)OK[n]=t[n]}),"setConf"),$K=o(((t,e,n)=>{const r=OK.entityPadding/3,i=OK.entityPadding/3,a=.85*OK.fontSize,s=e.node().getBBox(),o=[];let l=!1,c=!1,h=0,u=0,d=0,p=0,g=s.height+2*r,f=1;n.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(c=!0)})),n.forEach((n=>{const i=`${e.node().id}-attr-${f}`;let s=0;const m=vn(n.attributeType),y=t.append("text").classed("er entityLabel",!0).attr("id",`${i}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Kn().fontFamily).style("font-size",a+"px").text(m),v=t.append("text").classed("er entityLabel",!0).attr("id",`${i}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Kn().fontFamily).style("font-size",a+"px").text(n.attributeName),x={};x.tn=y,x.nn=v;const b=y.node().getBBox(),w=v.node().getBBox();if(h=Math.max(h,b.width),u=Math.max(u,w.width),s=Math.max(b.height,w.height),l){const e=void 0!==n.attributeKeyTypeList?n.attributeKeyTypeList.join(","):"",r=t.append("text").classed("er entityLabel",!0).attr("id",`${i}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Kn().fontFamily).style("font-size",a+"px").text(e);x.kn=r;const o=r.node().getBBox();d=Math.max(d,o.width),s=Math.max(s,o.height)}if(c){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${i}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Kn().fontFamily).style("font-size",a+"px").text(n.attributeComment||"");x.cn=e;const r=e.node().getBBox();p=Math.max(p,r.width),s=Math.max(s,r.height)}x.height=s,o.push(x),g+=s+2*r,f+=1}));let m=4;l&&(m+=2),c&&(m+=2);const y=h+u+d+p,v={width:Math.max(OK.minEntityWidth,Math.max(s.width+2*OK.entityPadding,y+i*m)),height:n.length>0?g:Math.max(OK.minEntityHeight,s.height+2*OK.entityPadding)};if(n.length>0){const n=Math.max(0,(v.width-y-i*m)/(m/2));e.attr("transform","translate("+v.width/2+","+(r+s.height/2)+")");let a=s.height+2*r,g="attributeBoxOdd";o.forEach((e=>{const s=a+r+e.height/2;e.tn.attr("transform","translate("+i+","+s+")");const o=t.insert("rect","#"+e.tn.node().id).classed(`er ${g}`,!0).attr("x",0).attr("y",a).attr("width",h+2*i+n).attr("height",e.height+2*r),f=parseFloat(o.attr("x"))+parseFloat(o.attr("width"));e.nn.attr("transform","translate("+(f+i)+","+s+")");const m=t.insert("rect","#"+e.nn.node().id).classed(`er ${g}`,!0).attr("x",f).attr("y",a).attr("width",u+2*i+n).attr("height",e.height+2*r);let y=parseFloat(m.attr("x"))+parseFloat(m.attr("width"));if(l){e.kn.attr("transform","translate("+(y+i)+","+s+")");const o=t.insert("rect","#"+e.kn.node().id).classed(`er ${g}`,!0).attr("x",y).attr("y",a).attr("width",d+2*i+n).attr("height",e.height+2*r);y=parseFloat(o.attr("x"))+parseFloat(o.attr("width"))}c&&(e.cn.attr("transform","translate("+(y+i)+","+s+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${g}`,"true").attr("x",y).attr("y",a).attr("width",p+2*i+n).attr("height",e.height+2*r)),a+=e.height+2*r,g="attributeBoxOdd"===g?"attributeBoxEven":"attributeBoxOdd"}))}else v.height=Math.max(OK.minEntityHeight,g),e.attr("transform","translate("+v.width/2+","+v.height/2+")");return v}),"drawAttributes"),FK=o((function(t,e,n){let r;return[...e.keys()].forEach((function(i){const a=WK(i,"entity");PK.set(i,a);const s=t.append("g").attr("id",a);r=void 0===r?a:r;const o="text-"+a,l=s.append("text").classed("er entityLabel",!0).attr("id",o).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",Kn().fontFamily).style("font-size",OK.fontSize+"px").text(e.get(i).alias??i),{width:c,height:h}=$K(s,l,e.get(i).attributes),u=s.insert("rect","#"+o).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",c).attr("height",h).node().getBBox();n.setNode(a,{width:u.width,height:u.height,shape:"rect",id:a})})),r}),"drawEntities"),zK=o((function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}),"adjustEntities"),UK=o((function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")}),"getEdgeName"),GK=o((function(t,e){return t.forEach((function(t){e.setEdge(PK.get(t.entityA),PK.get(t.entityB),{relationship:t},UK(t))})),t}),"addRelationships"),qK=0,jK=o((function(t,e,n,r,i){qK++;const a=n.edge(PK.get(e.entityA),PK.get(e.entityB),UK(e)),s=uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(bu),o=t.insert("path","#"+r).classed("er relationshipLine",!0).attr("d",s(a.points)).style("stroke",OK.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(OK.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+bK.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+bK.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+bK.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+bK.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+l+"#"+bK.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+bK.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+bK.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+bK.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+bK.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+l+"#"+bK.ERMarkers.MD_PARENT_START+")")}const c=o.node().getTotalLength(),h=o.node().getPointAtLength(.5*c),u="rel"+qK,d=e.roleA.split(/
    /g),p=t.append("text").classed("er relationshipLabel",!0).attr("id",u).attr("x",h.x).attr("y",h.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",Kn().fontFamily).style("font-size",OK.fontSize+"px");if(1==d.length)p.text(e.roleA);else{const t=.5*-(d.length-1);d.forEach(((e,n)=>{p.append("tspan").attr("x",h.x).attr("dy",`${0===n?t:1}em`).text(e)}))}const g=p.node().getBBox();t.insert("rect","#"+u).classed("er relationshipLabelBox",!0).attr("x",h.x-g.width/2).attr("y",h.y-g.height/2).attr("width",g.width).attr("height",g.height)}),"drawRelationshipFromLayout"),YK=o((function(t,e,n,r){OK=Kn().er,y.info("Drawing ER diagram");const i=Kn().securityLevel;let a;"sandbox"===i&&(a=Fa("#i"+e));const s=Fa("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);let o;bK.insertMarkers(s,OK),o=new cj({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:OK.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const l=FK(s,r.db.getEntities(),o),c=GK(r.db.getRelationships(),o);mW(o),zK(s,o),c.forEach((function(t){jK(s,t,o,l,r)}));const h=OK.diagramPadding;Dk.insertTitle(s,"entityTitleText",OK.titleTopMargin,r.db.getDiagramTitle());const u=s.node().getBBox(),d=u.width+2*h,p=u.height+2*h;Nn(s,p,d,OK.useMaxWidth),s.attr("viewBox",`${u.x-h} ${u.y-h} ${d} ${p}`)}),"draw");function WK(t="",e=""){const n=t.replace(DK,"");return`${HK(e)}${HK(n)}${RK(t,"28e9f9db-3c8d-5aa5-9faf-44286ae5937c")}`}function HK(t=""){return t.length>0?`${t}-`:""}o(WK,"generateId"),o(HK,"strWithHyphen");var VK={parser:cK,db:vK,renderer:{setConf:BK,draw:YK},styles:o((t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`),"getStyles")},XK=Object.freeze({__proto__:null,diagram:VK}),KK=class{constructor(t){this.init=t,this.records=this.init()}static{o(this,"ImperativeState")}reset(){this.records=this.init()}};function ZK(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}o(ZK,"populateCommonDb");var QK=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(t){var e;function n(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}Object.defineProperty(t,"__esModule",{value:!0}),o(n,"RAL"),function(t){function n(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}o(n,"install"),t.install=n}(n||(n={})),t.default=n}}),JK=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(t){function e(t){return!0===t||!1===t}function n(t){return"string"==typeof t||t instanceof String}function r(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function s(t){return Array.isArray(t)}function l(t){return s(t)&&t.every((t=>n(t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,o(e,"boolean"),t.boolean=e,o(n,"string"),t.string=n,o(r,"number"),t.number=r,o(i,"error"),t.error=i,o(a,"func"),t.func=a,o(s,"array"),t.array=s,o(l,"stringArray"),t.stringArray=l}}),tZ=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var e,n=QK();!function(t){const e={dispose(){}};t.None=function(){return e}}(e||(t.Event=e={}));var r=class{static{o(this,"CallbackList")}add(t,e=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(n)&&n.push({dispose:o((()=>this.remove(t,e)),"dispose")})}remove(t,e=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new r),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);const a={dispose:o((()=>{this._callbacks&&(this._callbacks.remove(e,n),a.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}),"dispose")};return Array.isArray(i)&&i.push(a),a}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};t.Emitter=i,i._noop=function(){}}}),eZ=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,n=QK(),r=JK(),i=tZ();!function(t){function e(e){const n=e;return n&&(n===t.None||n===t.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),o(e,"is"),t.is=e}(e||(t.CancellationToken=e={}));var a=Object.freeze((function(t,e){const r=(0,n.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}})),s=class{static{o(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?a:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},l=class{static{o(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=e.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=e.None}};t.CancellationTokenSource=l}}),nZ={};h(nZ,{AbstractAstReflection:()=>lZ,AbstractCstNode:()=>k8,AbstractLangiumParser:()=>N8,AbstractParserErrorMessageProvider:()=>M8,AbstractThreadedAsyncParser:()=>Xtt,AstUtils:()=>OJ,BiMap:()=>P9,Cancellation:()=>s9,CompositeCstNodeImpl:()=>_8,ContextCache:()=>q9,CstNodeBuilder:()=>w8,CstUtils:()=>rZ,DONE_RESULT:()=>mZ,DatatypeSymbol:()=>S8,DefaultAstNodeDescriptionProvider:()=>stt,DefaultAstNodeLocator:()=>ltt,DefaultAsyncParser:()=>Vtt,DefaultCommentProvider:()=>Ytt,DefaultConfigurationProvider:()=>ctt,DefaultDocumentBuilder:()=>htt,DefaultDocumentValidator:()=>ntt,DefaultHydrator:()=>Qtt,DefaultIndexManager:()=>utt,DefaultJsonSerializer:()=>K9,DefaultLangiumDocumentFactory:()=>L9,DefaultLangiumDocuments:()=>N9,DefaultLexer:()=>ptt,DefaultLinker:()=>I9,DefaultNameProvider:()=>R9,DefaultReferenceDescriptionProvider:()=>ott,DefaultReferences:()=>D9,DefaultScopeComputation:()=>B9,DefaultScopeProvider:()=>W9,DefaultServiceRegistry:()=>Z9,DefaultTokenBuilder:()=>i9,DefaultValueConverter:()=>a9,DefaultWorkspaceLock:()=>Ztt,DefaultWorkspaceManager:()=>dtt,Deferred:()=>y9,Disposable:()=>att,DisposableCache:()=>U9,DocumentCache:()=>j9,DocumentState:()=>E9,DocumentValidator:()=>J9,EMPTY_SCOPE:()=>z9,EMPTY_STREAM:()=>fZ,EmptyFileSystem:()=>uet,EmptyFileSystemProvider:()=>het,ErrorWithLocation:()=>qZ,GrammarAST:()=>YZ,GrammarUtils:()=>GZ,JSDocDocumentationProvider:()=>jtt,LangiumCompletionParser:()=>D8,LangiumParser:()=>I8,LangiumParserErrorMessageProvider:()=>R8,LeafCstNodeImpl:()=>T8,MapScope:()=>F9,Module:()=>Htt,MultiMap:()=>O9,OperationCancelled:()=>d9,ParserWorker:()=>Ktt,Reduction:()=>vZ,RegExpUtils:()=>KJ,RootCstNodeImpl:()=>C8,SimpleCache:()=>G9,StreamImpl:()=>dZ,StreamScope:()=>$9,TextDocument:()=>f9,TreeStreamImpl:()=>wZ,URI:()=>S9,UriUtils:()=>_9,ValidationCategory:()=>X9,ValidationRegistry:()=>ett,ValueConverter:()=>r9,WorkspaceCache:()=>Y9,assertUnreachable:()=>jZ,createCompletionParser:()=>t9,createDefaultCoreModule:()=>Jtt,createDefaultSharedCoreModule:()=>tet,createGrammarConfig:()=>a1,createLangiumParser:()=>e9,delayNextTick:()=>o9,diagnosticData:()=>Q9,eagerLoad:()=>ret,getDiagnosticRange:()=>rtt,inject:()=>eet,interruptAndCheck:()=>g9,isAstNode:()=>iZ,isAstNodeDescription:()=>sZ,isAstNodeWithComment:()=>H9,isCompositeCstNode:()=>cZ,isIMultiModeLexerDefinition:()=>ftt,isJSDoc:()=>vtt,isLeafCstNode:()=>hZ,isLinkingError:()=>oZ,isNamed:()=>M9,isOperationCancelled:()=>p9,isReference:()=>aZ,isRootCstNode:()=>uZ,isTokenTypeArray:()=>gtt,isTokenTypeDictionary:()=>mtt,loadGrammarFromJson:()=>fet,parseJSDoc:()=>ytt,prepareLangiumParser:()=>n9,setInterruptionPeriod:()=>u9,startCancelableOperation:()=>h9,stream:()=>yZ,toDiagnosticSeverity:()=>itt});var rZ={};function iZ(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function aZ(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function sZ(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function oZ(t){return"object"==typeof t&&null!==t&&iZ(t.container)&&aZ(t.reference)&&"string"==typeof t.message}h(rZ,{DefaultNameRegexp:()=>LZ,RangeComparison:()=>xZ,compareRange:()=>SZ,findCommentNode:()=>IZ,findDeclarationNodeAtOffset:()=>NZ,findLeafNodeAtOffset:()=>RZ,findLeafNodeBeforeOffset:()=>DZ,flattenCst:()=>TZ,getInteriorNodes:()=>FZ,getNextNode:()=>BZ,getPreviousNode:()=>PZ,getStartlineNode:()=>$Z,inRange:()=>AZ,isChildNode:()=>_Z,isCommentNode:()=>MZ,streamCst:()=>kZ,toDocumentSegment:()=>CZ,tokenToRange:()=>EZ}),o(iZ,"isAstNode"),o(aZ,"isReference"),o(sZ,"isAstNodeDescription"),o(oZ,"isLinkingError");var lZ=class{static{o(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return iZ(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){if(t===e)return!0;let n=this.subtypes[t];n||(n=this.subtypes[t]={});const r=n[e];if(void 0!==r)return r;{const r=this.computeIsSubtype(t,e);return n[e]=r,r}}getAllSubTypes(t){const e=this.allSubtypes[t];if(e)return e;{const e=this.getAllTypes(),n=[];for(const r of e)this.isSubtype(r,t)&&n.push(r);return this.allSubtypes[t]=n,n}}};function cZ(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function hZ(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function uZ(t){return cZ(t)&&"string"==typeof t.fullText}o(cZ,"isCompositeCstNode"),o(hZ,"isLeafCstNode"),o(uZ,"isRootCstNode");var dZ=class t{static{o(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){const t={state:this.startFn(),next:o((()=>this.nextFn(t.state)),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){const t=this.iterator();return Boolean(t.next().done)}count(){const t=this.iterator();let e=0,n=t.next();for(;!n.done;)e++,n=t.next();return e}toArray(){const t=[],e=this.iterator();let n;do{n=e.next(),void 0!==n.value&&t.push(n.value)}while(!n.done);return t}toSet(){return new Set(this)}toMap(t,e){const n=this.map((n=>[t?t(n):n,e?e(n):n]));return new Map(n)}toString(){return this.join()}concat(e){const n=e[Symbol.iterator]();return new t((()=>({first:this.startFn(),firstDone:!1})),(t=>{let e;if(!t.firstDone){do{if(e=this.nextFn(t.first),!e.done)return e}while(!e.done);t.firstDone=!0}do{if(e=n.next(),!e.done)return e}while(!e.done);return mZ}))}join(t=","){const e=this.iterator();let n,r="",i=!1;do{n=e.next(),n.done||(i&&(r+=t),r+=pZ(n.value)),i=!0}while(!n.done);return r}indexOf(t,e=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=e&&i.value===t)return r;i=n.next(),r++}return-1}every(t){const e=this.iterator();let n=e.next();for(;!n.done;){if(!t(n.value))return!1;n=e.next()}return!0}some(t){const e=this.iterator();let n=e.next();for(;!n.done;){if(t(n.value))return!0;n=e.next()}return!1}forEach(t){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)t(r.value,n),r=e.next(),n++}map(e){return new t(this.startFn,(t=>{const{done:n,value:r}=this.nextFn(t);return n?mZ:{done:!1,value:e(r)}}))}filter(e){return new t(this.startFn,(t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return mZ}))}nonNullable(){return this.filter((t=>null!=t))}reduce(t,e){const n=this.iterator();let r=e,i=n.next();for(;!i.done;)r=void 0===r?i.value:t(r,i.value),i=n.next();return r}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,n){const r=t.next();if(r.done)return n;const i=this.recursiveReduce(t,e,n);return void 0===i?r.value:e(i,r.value)}find(t){const e=this.iterator();let n=e.next();for(;!n.done;){if(t(n.value))return n.value;n=e.next()}}findIndex(t){const e=this.iterator();let n=0,r=e.next();for(;!r.done;){if(t(r.value))return n;r=e.next(),n++}return-1}includes(t){const e=this.iterator();let n=e.next();for(;!n.done;){if(n.value===t)return!0;n=e.next()}return!1}flatMap(e){return new t((()=>({this:this.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!gZ(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return mZ}))}flat(e){if(void 0===e&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new t((()=>({this:n.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:e,value:r}=n.nextFn(t.this);if(!e){if(!gZ(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return mZ}))}head(){const t=this.iterator().next();if(!t.done)return t.value}tail(e=1){return new t((()=>{const t=this.startFn();for(let n=0;n({size:0,state:this.startFn()})),(t=>(t.size++,t.size>e?mZ:this.nextFn(t.state))))}distinct(t){const e=new Set;return this.filter((n=>{const r=t?t(n):n;return!e.has(r)&&(e.add(r),!0)}))}exclude(t,e){const n=new Set;for(const r of t){const t=e?e(r):r;n.add(t)}return this.filter((t=>{const r=e?e(t):t;return!n.has(r)}))}};function pZ(t){return"string"==typeof t?t:void 0===t?"undefined":"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}function gZ(t){return!!t&&"function"==typeof t[Symbol.iterator]}o(pZ,"toString"),o(gZ,"isIterable");var fZ=new dZ((()=>{}),(()=>mZ)),mZ=Object.freeze({done:!0,value:void 0});function yZ(...t){if(1===t.length){const e=t[0];if(e instanceof dZ)return e;if(gZ(e))return new dZ((()=>e[Symbol.iterator]()),(t=>t.next()));if("number"==typeof e.length)return new dZ((()=>({index:0})),(t=>t.index1?new dZ((()=>({collIndex:0,arrIndex:0})),(e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex({iterators:(null==n?void 0:n.includeRoot)?[[t][Symbol.iterator]()]:[e(t)[Symbol.iterator]()],pruned:!1})),(t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);t.iterators.length>0;){const n=t.iterators[t.iterators.length-1].next();if(!n.done)return t.iterators.push(e(n.value)[Symbol.iterator]()),n;t.iterators.pop()}return mZ}))}iterator(){const t={state:this.startFn(),next:o((()=>this.nextFn(t.state)),"next"),prune:o((()=>{t.state.pruned=!0}),"prune"),[Symbol.iterator]:()=>t};return t}};function kZ(t){return new wZ(t,(t=>cZ(t)?t.content:[]),{includeRoot:!0})}function TZ(t){return kZ(t).filter(hZ)}function _Z(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function EZ(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function CZ(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}function SZ(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>e.end.character)return xZ.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.linexZ.After}!function(t){function e(t){return t.reduce(((t,e)=>t+e),0)}function n(t){return t.reduce(((t,e)=>t*e),0)}function r(t){return t.reduce(((t,e)=>Math.min(t,e)))}function i(t){return t.reduce(((t,e)=>Math.max(t,e)))}o(e,"sum"),t.sum=e,o(n,"product"),t.product=n,o(r,"min"),t.min=r,o(i,"max"),t.max=i}(vZ||(vZ={})),o(kZ,"streamCst"),o(TZ,"flattenCst"),o(_Z,"isChildNode"),o(EZ,"tokenToRange"),o(CZ,"toDocumentSegment"),(bZ=xZ||(xZ={}))[bZ.Before=0]="Before",bZ[bZ.After=1]="After",bZ[bZ.OverlapFront=2]="OverlapFront",bZ[bZ.OverlapBack=3]="OverlapBack",bZ[bZ.Inside=4]="Inside",o(SZ,"compareRange"),o(AZ,"inRange");var LZ=/^[\w\p{L}]$/u;function NZ(t,e,n=LZ){if(t){if(e>0){const r=e-t.offset,i=t.text.charAt(r);n.test(i)||e--}return RZ(t,e)}}function IZ(t,e){if(t){const n=PZ(t,!0);if(n&&MZ(n,e))return n;if(uZ(t)){const n=t.content.findIndex((t=>!t.hidden));for(let r=n-1;r>=0;r--){const n=t.content[r];if(MZ(n,e))return n}}}}function MZ(t,e){return hZ(t)&&e.includes(t.tokenType.name)}function RZ(t,e){if(hZ(t))return t;if(cZ(t)){const n=OZ(t,e,!1);if(n)return RZ(n,e)}}function DZ(t,e){if(hZ(t))return t;if(cZ(t)){const n=OZ(t,e,!0);if(n)return DZ(n,e)}}function OZ(t,e,n){let r,i=0,a=t.content.length-1;for(;i<=a;){const s=Math.floor((i+a)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(r=n?o:void 0,i=s+1):a=s-1}return r}function PZ(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const t=n.content[r];if(e||!t.hidden)return t}t=n}}function BZ(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);const i=n.content.length-1;for(;rD0,findNameAssignment:()=>O0,findNodeForKeyword:()=>M0,findNodeForProperty:()=>L0,findNodesForKeyword:()=>I0,findNodesForKeywordInternal:()=>R0,findNodesForProperty:()=>A0,getActionAtElement:()=>B0,getActionType:()=>H0,getAllReachableRules:()=>_0,getCrossReferenceTerminal:()=>C0,getEntryRule:()=>k0,getExplicitRuleType:()=>Y0,getHiddenRules:()=>T0,getRuleType:()=>V0,getTypeName:()=>W0,isArrayCardinality:()=>F0,isArrayOperator:()=>z0,isCommentTerminal:()=>S0,isDataType:()=>q0,isDataTypeRule:()=>U0,isOptionalCardinality:()=>$0,terminalRegex:()=>X0});var qZ=class extends Error{static{o(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:${t.range.start.character}`:e)}};function jZ(t){throw new Error("Error! The input value was not handled.")}o(jZ,"assertUnreachable");var YZ={};h(YZ,{AbstractElement:()=>aQ,AbstractRule:()=>HZ,AbstractType:()=>XZ,Action:()=>JQ,Alternatives:()=>eJ,ArrayLiteral:()=>oQ,ArrayType:()=>cQ,Assignment:()=>rJ,BooleanLiteral:()=>uQ,CharacterRange:()=>aJ,Condition:()=>ZZ,Conjunction:()=>pQ,CrossReference:()=>oJ,Disjunction:()=>fQ,EndOfFile:()=>cJ,Grammar:()=>yQ,GrammarImport:()=>xQ,Group:()=>uJ,InferredType:()=>wQ,Interface:()=>TQ,Keyword:()=>pJ,LangiumGrammarAstReflection:()=>RJ,LangiumGrammarTerminals:()=>WZ,NamedArgument:()=>EQ,NegatedToken:()=>fJ,Negation:()=>SQ,NumberLiteral:()=>LQ,Parameter:()=>IQ,ParameterReference:()=>RQ,ParserRule:()=>OQ,ReferenceType:()=>BQ,RegexToken:()=>yJ,ReturnType:()=>FQ,RuleCall:()=>xJ,SimpleType:()=>UQ,StringLiteral:()=>qQ,TerminalAlternatives:()=>wJ,TerminalGroup:()=>TJ,TerminalRule:()=>YQ,TerminalRuleCall:()=>EJ,Type:()=>HQ,TypeAttribute:()=>XQ,TypeDefinition:()=>eQ,UnionType:()=>ZQ,UnorderedGroup:()=>SJ,UntilToken:()=>LJ,ValueLiteral:()=>rQ,Wildcard:()=>IJ,isAbstractElement:()=>sQ,isAbstractRule:()=>VZ,isAbstractType:()=>KZ,isAction:()=>tJ,isAlternatives:()=>nJ,isArrayLiteral:()=>lQ,isArrayType:()=>hQ,isAssignment:()=>iJ,isBooleanLiteral:()=>dQ,isCharacterRange:()=>sJ,isCondition:()=>QZ,isConjunction:()=>gQ,isCrossReference:()=>lJ,isDisjunction:()=>mQ,isEndOfFile:()=>hJ,isFeatureName:()=>JZ,isGrammar:()=>vQ,isGrammarImport:()=>bQ,isGroup:()=>dJ,isInferredType:()=>kQ,isInterface:()=>_Q,isKeyword:()=>gJ,isNamedArgument:()=>CQ,isNegatedToken:()=>mJ,isNegation:()=>AQ,isNumberLiteral:()=>NQ,isParameter:()=>MQ,isParameterReference:()=>DQ,isParserRule:()=>PQ,isPrimitiveType:()=>tQ,isReferenceType:()=>$Q,isRegexToken:()=>vJ,isReturnType:()=>zQ,isRuleCall:()=>bJ,isSimpleType:()=>GQ,isStringLiteral:()=>jQ,isTerminalAlternatives:()=>kJ,isTerminalGroup:()=>_J,isTerminalRule:()=>WQ,isTerminalRuleCall:()=>CJ,isType:()=>VQ,isTypeAttribute:()=>KQ,isTypeDefinition:()=>nQ,isUnionType:()=>QQ,isUnorderedGroup:()=>AJ,isUntilToken:()=>NJ,isValueLiteral:()=>iQ,isWildcard:()=>MJ,reflection:()=>DJ});var WZ={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]*/},HZ="AbstractRule";function VZ(t){return DJ.isInstance(t,HZ)}o(VZ,"isAbstractRule");var XZ="AbstractType";function KZ(t){return DJ.isInstance(t,XZ)}o(KZ,"isAbstractType");var ZZ="Condition";function QZ(t){return DJ.isInstance(t,ZZ)}function JZ(t){return tQ(t)||"current"===t||"entry"===t||"extends"===t||"false"===t||"fragment"===t||"grammar"===t||"hidden"===t||"import"===t||"interface"===t||"returns"===t||"terminal"===t||"true"===t||"type"===t||"infer"===t||"infers"===t||"with"===t||"string"==typeof t&&/\^?[_a-zA-Z][\w_]*/.test(t)}function tQ(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}o(QZ,"isCondition"),o(JZ,"isFeatureName"),o(tQ,"isPrimitiveType");var eQ="TypeDefinition";function nQ(t){return DJ.isInstance(t,eQ)}o(nQ,"isTypeDefinition");var rQ="ValueLiteral";function iQ(t){return DJ.isInstance(t,rQ)}o(iQ,"isValueLiteral");var aQ="AbstractElement";function sQ(t){return DJ.isInstance(t,aQ)}o(sQ,"isAbstractElement");var oQ="ArrayLiteral";function lQ(t){return DJ.isInstance(t,oQ)}o(lQ,"isArrayLiteral");var cQ="ArrayType";function hQ(t){return DJ.isInstance(t,cQ)}o(hQ,"isArrayType");var uQ="BooleanLiteral";function dQ(t){return DJ.isInstance(t,uQ)}o(dQ,"isBooleanLiteral");var pQ="Conjunction";function gQ(t){return DJ.isInstance(t,pQ)}o(gQ,"isConjunction");var fQ="Disjunction";function mQ(t){return DJ.isInstance(t,fQ)}o(mQ,"isDisjunction");var yQ="Grammar";function vQ(t){return DJ.isInstance(t,yQ)}o(vQ,"isGrammar");var xQ="GrammarImport";function bQ(t){return DJ.isInstance(t,xQ)}o(bQ,"isGrammarImport");var wQ="InferredType";function kQ(t){return DJ.isInstance(t,wQ)}o(kQ,"isInferredType");var TQ="Interface";function _Q(t){return DJ.isInstance(t,TQ)}o(_Q,"isInterface");var EQ="NamedArgument";function CQ(t){return DJ.isInstance(t,EQ)}o(CQ,"isNamedArgument");var SQ="Negation";function AQ(t){return DJ.isInstance(t,SQ)}o(AQ,"isNegation");var LQ="NumberLiteral";function NQ(t){return DJ.isInstance(t,LQ)}o(NQ,"isNumberLiteral");var IQ="Parameter";function MQ(t){return DJ.isInstance(t,IQ)}o(MQ,"isParameter");var RQ="ParameterReference";function DQ(t){return DJ.isInstance(t,RQ)}o(DQ,"isParameterReference");var OQ="ParserRule";function PQ(t){return DJ.isInstance(t,OQ)}o(PQ,"isParserRule");var BQ="ReferenceType";function $Q(t){return DJ.isInstance(t,BQ)}o($Q,"isReferenceType");var FQ="ReturnType";function zQ(t){return DJ.isInstance(t,FQ)}o(zQ,"isReturnType");var UQ="SimpleType";function GQ(t){return DJ.isInstance(t,UQ)}o(GQ,"isSimpleType");var qQ="StringLiteral";function jQ(t){return DJ.isInstance(t,qQ)}o(jQ,"isStringLiteral");var YQ="TerminalRule";function WQ(t){return DJ.isInstance(t,YQ)}o(WQ,"isTerminalRule");var HQ="Type";function VQ(t){return DJ.isInstance(t,HQ)}o(VQ,"isType");var XQ="TypeAttribute";function KQ(t){return DJ.isInstance(t,XQ)}o(KQ,"isTypeAttribute");var ZQ="UnionType";function QQ(t){return DJ.isInstance(t,ZQ)}o(QQ,"isUnionType");var JQ="Action";function tJ(t){return DJ.isInstance(t,JQ)}o(tJ,"isAction");var eJ="Alternatives";function nJ(t){return DJ.isInstance(t,eJ)}o(nJ,"isAlternatives");var rJ="Assignment";function iJ(t){return DJ.isInstance(t,rJ)}o(iJ,"isAssignment");var aJ="CharacterRange";function sJ(t){return DJ.isInstance(t,aJ)}o(sJ,"isCharacterRange");var oJ="CrossReference";function lJ(t){return DJ.isInstance(t,oJ)}o(lJ,"isCrossReference");var cJ="EndOfFile";function hJ(t){return DJ.isInstance(t,cJ)}o(hJ,"isEndOfFile");var uJ="Group";function dJ(t){return DJ.isInstance(t,uJ)}o(dJ,"isGroup");var pJ="Keyword";function gJ(t){return DJ.isInstance(t,pJ)}o(gJ,"isKeyword");var fJ="NegatedToken";function mJ(t){return DJ.isInstance(t,fJ)}o(mJ,"isNegatedToken");var yJ="RegexToken";function vJ(t){return DJ.isInstance(t,yJ)}o(vJ,"isRegexToken");var xJ="RuleCall";function bJ(t){return DJ.isInstance(t,xJ)}o(bJ,"isRuleCall");var wJ="TerminalAlternatives";function kJ(t){return DJ.isInstance(t,wJ)}o(kJ,"isTerminalAlternatives");var TJ="TerminalGroup";function _J(t){return DJ.isInstance(t,TJ)}o(_J,"isTerminalGroup");var EJ="TerminalRuleCall";function CJ(t){return DJ.isInstance(t,EJ)}o(CJ,"isTerminalRuleCall");var SJ="UnorderedGroup";function AJ(t){return DJ.isInstance(t,SJ)}o(AJ,"isUnorderedGroup");var LJ="UntilToken";function NJ(t){return DJ.isInstance(t,LJ)}o(NJ,"isUntilToken");var IJ="Wildcard";function MJ(t){return DJ.isInstance(t,IJ)}o(MJ,"isWildcard");var RJ=class extends lZ{static{o(this,"LangiumGrammarAstReflection")}getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(t,e){switch(t){case JQ:case eJ:case rJ:case aJ:case oJ:case cJ:case uJ:case pJ:case fJ:case yJ:case xJ:case wJ:case TJ:case EJ:case SJ:case LJ:case IJ:return this.isSubtype(aQ,e);case oQ:case LQ:case qQ:return this.isSubtype(rQ,e);case cQ:case BQ:case UQ:case ZQ:return this.isSubtype(eQ,e);case uQ:return this.isSubtype(ZZ,e)||this.isSubtype(rQ,e);case pQ:case fQ:case SQ:case RQ:return this.isSubtype(ZZ,e);case wQ:case TQ:case HQ:return this.isSubtype(XZ,e);case OQ:return this.isSubtype(HZ,e)||this.isSubtype(XZ,e);case YQ:return this.isSubtype(HZ,e);default:return!1}}getReferenceType(t){const e=`${t.container.$type}:${t.property}`;switch(e){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return XZ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return HZ;case"Grammar:usedGrammars":return yQ;case"NamedArgument:parameter":case"ParameterReference:parameter":return IQ;case"TerminalRuleCall:rule":return YQ;default:throw new Error(`${e} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},DJ=new RJ,OJ={};function PJ(t){for(const[e,n]of Object.entries(t))e.startsWith("$")||(Array.isArray(n)?n.forEach(((n,r)=>{iZ(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=r)})):iZ(n)&&(n.$container=t,n.$containerProperty=e))}function BJ(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function $J(t,e){let n=t;for(;n;){if(e(n))return!0;n=n.$container}return!1}function FJ(t){const e=zJ(t).$document;if(!e)throw new Error("AST node has no document.");return e}function zJ(t){for(;t.$container;)t=t.$container;return t}function UJ(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=null==e?void 0:e.range;return new dZ((()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0})),(e=>{for(;e.keyIndexUJ(t,e)))}function qJ(t,e){if(!t)throw new Error("Root node must be an AstNode.");return(null==e?void 0:e.range)&&!jJ(t,e.range)?new wZ(t,(()=>[])):new wZ(t,(t=>UJ(t,e)),{includeRoot:!0})}function jJ(t,e){var n;if(!e)return!0;const r=null===(n=t.$cstNode)||void 0===n?void 0:n.range;return!!r&&AZ(r,e)}function YJ(t){return new dZ((()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0})),(e=>{for(;e.keyIndex{YJ(e).forEach((e=>{e.reference.ref===t&&n.push(e.reference)}))})),yZ(n)}function HJ(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const t of n.properties)void 0!==t.defaultValue&&void 0===r[t.name]&&(r[t.name]=VJ(t.defaultValue))}function VJ(t){return Array.isArray(t)?[...t.map(VJ)]:t}function XJ(t,e){const n={$type:t.$type};for(const[r,i]of Object.entries(t))if(!r.startsWith("$"))if(iZ(i))n[r]=XJ(i,e);else if(aZ(i))n[r]=e(n,r,i.$refNode,i.$refText);else if(Array.isArray(i)){const t=[];for(const a of i)iZ(a)?t.push(XJ(a,e)):aZ(a)?t.push(e(n,r,a.$refNode,a.$refText)):t.push(a);n[r]=t}else n[r]=i;return PJ(n),n}h(OJ,{assignMandatoryProperties:()=>HJ,copyAstNode:()=>XJ,findLocalReferences:()=>WJ,findRootNode:()=>zJ,getContainerOfType:()=>BJ,getDocument:()=>FJ,hasContainerOfType:()=>$J,linkContentToContainer:()=>PJ,streamAllContents:()=>GJ,streamAst:()=>qJ,streamContents:()=>UJ,streamReferences:()=>YJ}),o(PJ,"linkContentToContainer"),o(BJ,"getContainerOfType"),o($J,"hasContainerOfType"),o(FJ,"getDocument"),o(zJ,"findRootNode"),o(UJ,"streamContents"),o(GJ,"streamAllContents"),o(qJ,"streamAst"),o(jJ,"isAstNodeInRange"),o(YJ,"streamReferences"),o(WJ,"findLocalReferences"),o(HJ,"assignMandatoryProperties"),o(VJ,"copyDefaultValue"),o(XJ,"copyAstNode");var KJ={};function ZJ(t){return t.charCodeAt(0)}function QJ(t,e){Array.isArray(t)?t.forEach((function(t){e.push(t)})):e.push(t)}function JJ(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e],t[e]=!0}function t0(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function e0(){throw Error("Internal Error - Should never get here!")}function n0(t){return"Character"===t.type}h(KJ,{NEWLINE_REGEXP:()=>u0,escapeRegExp:()=>v0,getCaseInsensitivePattern:()=>x0,getTerminalParts:()=>f0,isMultilineComment:()=>m0,isWhitespace:()=>y0,partialMatches:()=>b0,partialRegExp:()=>w0}),o(ZJ,"cc"),o(QJ,"insertToSet"),o(JJ,"addFlag"),o(t0,"ASSERT_EXISTS"),o(e0,"ASSERT_NEVER_REACH_HERE"),o(n0,"isCharacter");var r0=[];for(let t=ZJ("0");t<=ZJ("9");t++)r0.push(t);var i0=[ZJ("_")].concat(r0);for(let t=ZJ("a");t<=ZJ("z");t++)i0.push(t);for(let t=ZJ("A");t<=ZJ("Z");t++)i0.push(t);var a0=[ZJ(" "),ZJ("\f"),ZJ("\n"),ZJ("\r"),ZJ("\t"),ZJ("\v"),ZJ("\t"),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ(" "),ZJ("\u2028"),ZJ("\u2029"),ZJ(" "),ZJ(" "),ZJ(" "),ZJ("\ufeff")],s0=/[0-9a-fA-F]/,o0=/[0-9]/,l0=/[1-9]/,c0=class{static{o(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("/");const e=this.disjunction();this.consumeChar("/");const n={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":JJ(n,"global");break;case"i":JJ(n,"ignoreCase");break;case"m":JJ(n,"multiLine");break;case"u":JJ(n,"unicode");break;case"y":JJ(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:e,loc:this.loc(0)}}disjunction(){const t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){const t=[],e=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const 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"(":let e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}t0(e);const n=this.disjunction();return this.consumeChar(")"),{type:e,value:n,loc:this.loc(t)}}return e0()}quantifier(t=!1){let e;const n=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":let t;this.isDigit()?(t=this.integerIncludingZero(),e={atLeast:n,atMost:t}):e={atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;t0(e)}if(!0!==t||void 0!==e)return t0(e)?("?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(n),e):void 0}atom(){let t;const e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}if(void 0===t&&this.isPatternCharacter()&&(t=this.patternCharacter()),t0(t))return t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[ZJ("\n"),ZJ("\r"),ZJ("\u2028"),ZJ("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=r0;break;case"D":t=r0,e=!0;break;case"s":t=a0;break;case"S":t=a0,e=!0;break;case"w":t=i0;break;case"W":t=i0,e=!0}if(t0(t))return{type:"Set",value:t,complement:e}}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=ZJ("\f");break;case"n":t=ZJ("\n");break;case"r":t=ZJ("\r");break;case"t":t=ZJ("\t");break;case"v":t=ZJ("\v")}if(t0(t))return{type:"Character",value:t}}controlLetterEscapeAtom(){this.consumeChar("c");const t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:ZJ("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:ZJ(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:ZJ(this.popChar())}}}characterClass(){const t=[];let e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){const e=this.classAtom();if(e.type,n0(e)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();if(n.type,n0(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}},h0=class{static{o(this,"BaseRegExpVisitor")}visitChildren(t){for(const e in t){const n=t[e];t.hasOwnProperty(e)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((t=>{this.visit(t)}),this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}},u0=/\r?\n/gm,d0=new c0,p0=class extends h0{static{o(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){const e=String.fromCharCode(t.value);if(this.multiline||"\n"!==e||(this.multiline=!0),t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=v0(e);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitSet(t){if(!this.multiline){const e=this.regex.substring(t.loc.begin,t.loc.end),n=new RegExp(e);this.multiline=Boolean("\n".match(n))}if(t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=this.regex.substring(t.loc.begin,t.loc.end);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitChildren(t){if("Group"===t.type){if(t.quantifier)return}super.visitChildren(t)}},g0=new p0;function f0(t){try{"string"!=typeof t&&(t=t.source),t=`/${t}/`;const e=d0.pattern(t),n=[];for(const r of e.value.value)g0.reset(t),g0.visit(r),n.push({start:g0.startRegexp,end:g0.endRegex});return n}catch(t){return[]}}function m0(t){try{return"string"==typeof t&&(t=new RegExp(t)),t=t.toString(),g0.reset(t),g0.visit(d0.pattern(t)),g0.multiline}catch(t){return!1}}function y0(t){return("string"==typeof t?new RegExp(t):t).test(" ")}function v0(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function x0(t){return Array.prototype.map.call(t,(t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:v0(t))).join("")}function b0(t,e){const n=w0(t),r=e.match(n);return!!r&&r[0].length>0}function w0(t){"string"==typeof t&&(t=new RegExp(t));const e=t,n=t.source;let r=0;function i(){let t,a="";function s(t){a+=n.substr(r,t),r+=t}function l(t){a+="(?:"+n.substr(r,t)+"|$)",r+=t}for(o(s,"appendRaw"),o(l,"appendOptional");r",r)-r+1);break;default:l(2)}break;case"[":t=/\[(?:\\.|.)*?\]/g,t.lastIndex=r,t=t.exec(n)||[],l(t[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":s(1);break;case"{":t=/\{\d+,?\d*\}/g,t.lastIndex=r,t=t.exec(n),t?s(t[0].length):l(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":a+="(?:",r+=3,a+=i()+"|$)";break;case"=":a+="(?=",r+=3,a+=i()+")";break;case"!":t=r,r+=3,i(),a+=n.substr(t,r-t);break;case"<":switch(n[r+3]){case"=":case"!":t=r,r+=4,i(),a+=n.substr(t,r-t);break;default:s(n.indexOf(">",r)-r+1),a+=i()+"|$)"}}else s(1),a+=i()+"|$)";break;case")":return++r,a;default:l(1)}return a}return o(i,"process"),new RegExp(i(),t.flags)}function k0(t){return t.rules.find((t=>PQ(t)&&t.entry))}function T0(t){return t.rules.filter((t=>WQ(t)&&t.hidden))}function _0(t,e){const n=new Set,r=k0(t);if(!r)return new Set(t.rules);const i=[r].concat(T0(t));for(const t of i)E0(t,n,e);const a=new Set;for(const e of t.rules)(n.has(e.name)||WQ(e)&&e.hidden)&&a.add(e);return a}function E0(t,e,n){e.add(t.name),GJ(t).forEach((t=>{if(bJ(t)||n&&CJ(t)){const r=t.rule.ref;r&&!e.has(r.name)&&E0(r,e,n)}}))}function C0(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=O0(t.type.ref);return null==e?void 0:e.terminal}}function S0(t){return t.hidden&&!X0(t).test(" ")}function A0(t,e){return t&&e?N0(t,e,t.astNode,!0):[]}function L0(t,e,n){if(!t||!e)return;const r=N0(t,e,t.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function N0(t,e,n,r){if(!r){const n=BJ(t.grammarSource,iJ);if(n&&n.feature===e)return[t]}return cZ(t)&&t.astNode===n?t.content.flatMap((t=>N0(t,e,n,!1))):[]}function I0(t,e){return t?R0(t,e,null==t?void 0:t.astNode):[]}function M0(t,e,n){if(!t)return;const r=R0(t,e,null==t?void 0:t.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function R0(t,e,n){if(t.astNode!==n)return[];if(gJ(t.grammarSource)&&t.grammarSource.value===e)return[t];const r=kZ(t).iterator();let i;const a=[];do{if(i=r.next(),!i.done){const t=i.value;t.astNode===n?gJ(t.grammarSource)&&t.grammarSource.value===e&&a.push(t):r.prune()}}while(!i.done);return a}function D0(t){var e;const n=t.astNode;for(;n===(null===(e=t.container)||void 0===e?void 0:e.astNode);){const e=BJ(t.grammarSource,iJ);if(e)return e;t=t.container}}function O0(t){let e=t;return kQ(e)&&(tJ(e.$container)?e=e.$container.$container:PQ(e.$container)?e=e.$container:jZ(e.$container)),P0(t,e,new Map)}function P0(t,e,n){var r;function i(e,r){let i;return BJ(e,iJ)||(i=P0(r,r,n)),n.set(t,i),i}if(o(i,"go"),n.has(t))return n.get(t);n.set(t,void 0);for(const a of GJ(e)){if(iJ(a)&&"name"===a.feature.toLowerCase())return n.set(t,a),a;if(bJ(a)&&PQ(a.rule.ref))return i(a,a.rule.ref);if(GQ(a)&&(null===(r=a.typeRef)||void 0===r?void 0:r.ref))return i(a,a.typeRef.ref)}}function B0(t){const e=t.$container;if(dJ(e)){const n=e.elements;for(let e=n.indexOf(t)-1;e>=0;e--){const t=n[e];if(tJ(t))return t;{const t=GJ(n[e]).find(tJ);if(t)return t}}}return sQ(e)?B0(e):void 0}function $0(t,e){return"?"===t||"*"===t||dJ(e)&&Boolean(e.guardCondition)}function F0(t){return"*"===t||"+"===t}function z0(t){return"+="===t}function U0(t){return G0(t,new Set)}function G0(t,e){if(e.has(t))return!0;e.add(t);for(const n of GJ(t))if(bJ(n)){if(!n.rule.ref)return!1;if(PQ(n.rule.ref)&&!G0(n.rule.ref,e))return!1}else{if(iJ(n))return!1;if(tJ(n))return!1}return Boolean(t.definition)}function q0(t){return j0(t.type,new Set)}function j0(t,e){if(e.has(t))return!0;if(e.add(t),hQ(t))return!1;if($Q(t))return!1;if(QQ(t))return t.types.every((t=>j0(t,e)));if(GQ(t)){if(void 0!==t.primitiveType)return!0;if(void 0!==t.stringType)return!0;if(void 0!==t.typeRef){const n=t.typeRef.ref;return!!VQ(n)&&j0(n.type,e)}return!1}return!1}function Y0(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e){if(PQ(e))return e.name;if(_Q(e)||VQ(e))return e.name}}}function W0(t){var e;if(PQ(t))return U0(t)?t.name:null!==(e=Y0(t))&&void 0!==e?e:t.name;if(_Q(t)||VQ(t)||zQ(t))return t.name;if(tJ(t)){const e=H0(t);if(e)return e}else if(kQ(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function H0(t){var e;return t.inferredType?t.inferredType.name:(null===(e=t.type)||void 0===e?void 0:e.ref)?W0(t.type.ref):void 0}function V0(t){var e,n,r;return WQ(t)?null!==(n=null===(e=t.type)||void 0===e?void 0:e.name)&&void 0!==n?n:"string":U0(t)?t.name:null!==(r=Y0(t))&&void 0!==r?r:t.name}function X0(t){const e={s:!1,i:!1,u:!1},n=Z0(t.definition,e),r=Object.entries(e).filter((([,t])=>t)).map((([t])=>t)).join("");return new RegExp(n,r)}o(f0,"getTerminalParts"),o(m0,"isMultilineComment"),o(y0,"isWhitespace"),o(v0,"escapeRegExp"),o(x0,"getCaseInsensitivePattern"),o(b0,"partialMatches"),o(w0,"partialRegExp"),o(k0,"getEntryRule"),o(T0,"getHiddenRules"),o(_0,"getAllReachableRules"),o(E0,"ruleDfs"),o(C0,"getCrossReferenceTerminal"),o(S0,"isCommentTerminal"),o(A0,"findNodesForProperty"),o(L0,"findNodeForProperty"),o(N0,"findNodesForPropertyInternal"),o(I0,"findNodesForKeyword"),o(M0,"findNodeForKeyword"),o(R0,"findNodesForKeywordInternal"),o(D0,"findAssignment"),o(O0,"findNameAssignment"),o(P0,"findNameAssignmentInternal"),o(B0,"getActionAtElement"),o($0,"isOptionalCardinality"),o(F0,"isArrayCardinality"),o(z0,"isArrayOperator"),o(U0,"isDataTypeRule"),o(G0,"isDataTypeRuleInternal"),o(q0,"isDataType"),o(j0,"isDataTypeInternal"),o(Y0,"getExplicitRuleType"),o(W0,"getTypeName"),o(H0,"getActionType"),o(V0,"getRuleType"),o(X0,"terminalRegex");var K0=/[\s\S]/.source;function Z0(t,e){if(kJ(t))return Q0(t);if(_J(t))return J0(t);if(sJ(t))return n1(t);if(CJ(t)){const e=t.rule.ref;if(!e)throw new Error("Missing rule reference.");return i1(Z0(e.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}if(mJ(t))return e1(t);if(NJ(t))return t1(t);if(vJ(t)){const n=t.regex.lastIndexOf("/"),r=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),i1(r,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}if(MJ(t))return i1(K0,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${null==t?void 0:t.$type}`)}function Q0(t){return i1(t.elements.map((t=>Z0(t))).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function J0(t){return i1(t.elements.map((t=>Z0(t))).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function t1(t){return i1(`${K0}*?${Z0(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function e1(t){return i1(`(?!${Z0(t.terminal)})${K0}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function n1(t){return t.right?i1(`[${r1(t.left)}-${r1(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):i1(r1(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function r1(t){return v0(t.value)}function i1(t,e){var n;return(!1!==e.wrap||e.lookahead)&&(t=`(${null!==(n=e.lookahead)&&void 0!==n?n:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}function a1(t){const e=[],n=t.Grammar;for(const t of n.rules)WQ(t)&&S0(t)&&m0(X0(t))&&e.push(t.name);return{multilineCommentRules:e,nameRegexp:LZ}}function s1(t){console&&console.error&&console.error(`Error: ${t}`)}function o1(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function l1(t){const e=(new Date).getTime(),n=t();return{time:(new Date).getTime()-e,value:n}}function c1(t){function e(){}o(e,"FakeConstructor"),e.prototype=t;const n=new e;function r(){return typeof n.bar}return o(r,"fakeAccess"),r(),r(),t}function h1(t){return u1(t)?t.LABEL:t.name}function u1(t){return jG(t.LABEL)&&""!==t.LABEL}o(Z0,"abstractElementToRegex"),o(Q0,"terminalAlternativesToRegex"),o(J0,"terminalGroupToRegex"),o(t1,"untilTokenToRegex"),o(e1,"negateTokenToRegex"),o(n1,"characterRangeToRegex"),o(r1,"keywordToRegex"),o(i1,"withCardinality"),o(a1,"createGrammarConfig"),o(s1,"PRINT_ERROR"),o(o1,"PRINT_WARNING"),o(l1,"timer"),o(c1,"toFastProperties"),o(h1,"tokenLabel"),o(u1,"hasTokenLabel");var d1=class{static{o(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),U$(this.definition,(e=>{e.accept(t)}))}},p1=class extends d1{static{o(this,"NonTerminal")}constructor(t){super([]),this.idx=1,YU(this,hq(t,(t=>void 0!==t)))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},g1=class extends d1{static{o(this,"Rule")}constructor(t){super(t.definition),this.orgText="",YU(this,hq(t,(t=>void 0!==t)))}},f1=class extends d1{static{o(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,YU(this,hq(t,(t=>void 0!==t)))}},m1=class extends d1{static{o(this,"Option")}constructor(t){super(t.definition),this.idx=1,YU(this,hq(t,(t=>void 0!==t)))}},y1=class extends d1{static{o(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,YU(this,hq(t,(t=>void 0!==t)))}},v1=class extends d1{static{o(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,YU(this,hq(t,(t=>void 0!==t)))}},x1=class extends d1{static{o(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,YU(this,hq(t,(t=>void 0!==t)))}},b1=class extends d1{static{o(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,YU(this,hq(t,(t=>void 0!==t)))}},w1=class extends d1{static{o(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,YU(this,hq(t,(t=>void 0!==t)))}},k1=class{static{o(this,"Terminal")}constructor(t){this.idx=1,YU(this,hq(t,(t=>void 0!==t)))}accept(t){t.visit(this)}};function T1(t){return Ez(t,_1)}function _1(t){function e(t){return Ez(t,_1)}if(o(e,"convertDefinition"),t instanceof p1){const e={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return jG(t.label)&&(e.label=t.label),e}if(t instanceof f1)return{type:"Alternative",definition:e(t.definition)};if(t instanceof m1)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof y1)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof v1)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:_1(new k1({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof b1)return{type:"RepetitionWithSeparator",idx:t.idx,separator:_1(new k1({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof x1)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof w1)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof k1){const e={type:"Terminal",name:t.terminalType.name,label:h1(t.terminalType),idx:t.idx};jG(t.label)&&(e.terminalLabel=t.label);const n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(e.pattern=tq(n)?n.source:n),e}if(t instanceof g1)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}o(T1,"serializeGrammar"),o(_1,"serializeProduction");var E1=class{static{o(this,"GAstVisitor")}visit(t){const e=t;switch(e.constructor){case p1:return this.visitNonTerminal(e);case f1:return this.visitAlternative(e);case m1:return this.visitOption(e);case y1:return this.visitRepetitionMandatory(e);case v1:return this.visitRepetitionMandatoryWithSeparator(e);case b1:return this.visitRepetitionWithSeparator(e);case x1:return this.visitRepetition(e);case w1:return this.visitAlternation(e);case k1:return this.visitTerminal(e);case g1:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}};function C1(t){return t instanceof f1||t instanceof m1||t instanceof x1||t instanceof y1||t instanceof v1||t instanceof b1||t instanceof k1||t instanceof g1}function S1(t,e=[]){return!!(t instanceof m1||t instanceof x1||t instanceof b1)||(t instanceof w1?Vq(t.definition,(t=>S1(t,e))):!(t instanceof p1&&HG(e,t))&&(t instanceof d1&&(t instanceof p1&&e.push(t),wG(t.definition,(t=>S1(t,e))))))}function A1(t){return t instanceof w1}function L1(t){if(t instanceof p1)return"SUBRULE";if(t instanceof m1)return"OPTION";if(t instanceof w1)return"OR";if(t instanceof y1)return"AT_LEAST_ONE";if(t instanceof v1)return"AT_LEAST_ONE_SEP";if(t instanceof b1)return"MANY_SEP";if(t instanceof x1)return"MANY";if(t instanceof k1)return"CONSUME";throw Error("non exhaustive match")}o(C1,"isSequenceProd"),o(S1,"isOptionalProd"),o(A1,"isBranchingProd"),o(L1,"getProductionDslName");var N1=class{static{o(this,"RestWalker")}walk(t,e=[]){U$(t.definition,((n,r)=>{const i=pG(t.definition,r+1);if(n instanceof p1)this.walkProdRef(n,i,e);else if(n instanceof k1)this.walkTerminal(n,i,e);else if(n instanceof f1)this.walkFlat(n,i,e);else if(n instanceof m1)this.walkOption(n,i,e);else if(n instanceof y1)this.walkAtLeastOne(n,i,e);else if(n instanceof v1)this.walkAtLeastOneSep(n,i,e);else if(n instanceof b1)this.walkManySep(n,i,e);else if(n instanceof x1)this.walkMany(n,i,e);else{if(!(n instanceof w1))throw Error("non exhaustive match");this.walkOr(n,i,e)}}))}walkTerminal(t,e,n){}walkProdRef(t,e,n){}walkFlat(t,e,n){const r=e.concat(n);this.walk(t,r)}walkOption(t,e,n){const r=e.concat(n);this.walk(t,r)}walkAtLeastOne(t,e,n){const r=[new m1({definition:t.definition})].concat(e,n);this.walk(t,r)}walkAtLeastOneSep(t,e,n){const r=I1(t,e,n);this.walk(t,r)}walkMany(t,e,n){const r=[new m1({definition:t.definition})].concat(e,n);this.walk(t,r)}walkManySep(t,e,n){const r=I1(t,e,n);this.walk(t,r)}walkOr(t,e,n){const r=e.concat(n);U$(t.definition,(t=>{const e=new f1({definition:[t]});this.walk(e,r)}))}};function I1(t,e,n){return[new m1({definition:[new k1({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function M1(t){if(t instanceof p1)return M1(t.referencedRule);if(t instanceof k1)return O1(t);if(C1(t))return R1(t);if(A1(t))return D1(t);throw Error("non exhaustive match")}function R1(t){let e=[];const n=t.definition;let r,i=0,a=n.length>i,s=!0;for(;a&&s;)r=n[i],s=S1(r),e=e.concat(M1(r)),i+=1,a=n.length>i;return Qq(e)}function D1(t){const e=Ez(t.definition,(t=>M1(t)));return Qq(Qz(e))}function O1(t){return[t.terminalType]}o(I1,"restForRepetitionWithSeparator"),o(M1,"first"),o(R1,"firstForSequence"),o(D1,"firstForBranching"),o(O1,"firstForTerminal");var P1="_~IN~_",B1=class extends N1{static{o(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,n){}walkProdRef(t,e,n){const r=F1(t.referencedRule,t.idx)+this.topProd.name,i=e.concat(n),a=M1(new f1({definition:i}));this.follows[r]=a}};function $1(t){const e={};return U$(t,(t=>{const n=new B1(t).startWalking();YU(e,n)})),e}function F1(t,e){return t.name+e+P1}o($1,"computeAllProdsFollows"),o(F1,"buildBetweenProdsFollowPrefix");var z1={},U1=new c0;function G1(t){const e=t.toString();if(z1.hasOwnProperty(e))return z1[e];{const t=U1.pattern(e);return z1[e]=t,t}}function q1(){z1={}}o(G1,"getRegExpAst"),o(q1,"clearRegExpParserCache");var j1="Complement Sets are not supported for first char optimization",Y1='Unable to use "first char" lexer optimizations:\n';function W1(t,e=!1){try{const e=G1(t);return H1(e.value,{},e.flags.ignoreCase)}catch(n){if(n.message===j1)e&&o1(`${Y1}\tUnable to optimize: < ${t.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),s1(`${Y1}\n\tFailed parsing: < ${t.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function H1(t,e,n){switch(t.type){case"Disjunction":for(let r=0;r{if("number"==typeof t)V1(t,e,n);else{const r=t;if(!0===n)for(let t=r.from;t<=r.to;t++)V1(t,e,n);else{for(let t=r.from;t<=r.to&&t=R2){const t=r.from>=R2?r.from:R2,n=r.to,i=O2(t),a=O2(n);for(let t=i;t<=a;t++)e[t]=t}}}}));break;case"Group":H1(a.value,e,n);break;default:throw Error("Non Exhaustive Match")}const s=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===Z1(a)||"Group"!==a.type&&!1===s)break}break;default:throw Error("non exhaustive match!")}return Lz(e)}function V1(t,e,n){const r=O2(t);e[r]=r,!0===n&&X1(t,e)}function X1(t,e){const n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){const t=O2(r.charCodeAt(0));e[t]=t}else{const t=n.toLowerCase();if(t!==n){const n=O2(t.charCodeAt(0));e[n]=n}}}function K1(t,e){return CG(t.value,(t=>{if("number"==typeof t)return HG(e,t);{const n=t;return void 0!==CG(e,(t=>n.from<=t&&t<=n.to))}}))}function Z1(t){const e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(Sb(t.value)?wG(t.value,Z1):Z1(t.value))}o(W1,"getOptimizedStartCodesIndices"),o(H1,"firstCharOptimizedIndices"),o(V1,"addOptimizedIdxToResult"),o(X1,"handleIgnoreCase"),o(K1,"findCode"),o(Z1,"isWholeOptional");var Q1=class extends h0{static{o(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){HG(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===K1(t,this.targetCharCodes)&&(this.found=!0):void 0!==K1(t,this.targetCharCodes)&&(this.found=!0)}};function J1(t,e){if(e instanceof RegExp){const n=G1(e),r=new Q1(t);return r.visit(n),r.found}return void 0!==CG(e,(e=>HG(t,e.charCodeAt(0))))}o(J1,"canMatchCharCode");var t2="PATTERN",e2="defaultMode",n2="modes",r2="boolean"==typeof new RegExp("(?:)").sticky;function i2(t,e){const n=(e=I$(e,{useSticky:r2,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:o(((t,e)=>e()),"tracer")})).tracer;let r;n("initCharCodeToOptimizedIndexMap",(()=>{P2()})),n("Reject Lexer.NA",(()=>{r=Gq(t,(t=>t.PATTERN===n4.NA))}));let i,a,s,l,c,h,u,d,p,g,f,m=!1;n("Transform Patterns",(()=>{m=!1,i=Ez(r,(t=>{const n=t.PATTERN;if(tq(n)){const t=n.source;return 1!==t.length||"^"===t||"$"===t||"."===t||n.ignoreCase?2!==t.length||"\\"!==t[0]||HG(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?e.useSticky?k2(n):w2(n):t[1]:t}if(hv(n))return m=!0,{exec:n};if("object"==typeof n)return m=!0,n;if("string"==typeof n){if(1===n.length)return n;{const t=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(t);return e.useSticky?k2(r):w2(r)}}throw Error("non exhaustive match")}))})),n("misc mapping",(()=>{a=Ez(r,(t=>t.tokenTypeIdx)),s=Ez(r,(t=>{const e=t.GROUP;if(e!==n4.SKIPPED){if(jG(e))return e;if(Iz(e))return!1;throw Error("non exhaustive match")}})),l=Ez(r,(t=>{const e=t.LONGER_ALT;if(e){const t=Sb(e)?Ez(e,(t=>KG(r,t))):[KG(r,e)];return t}})),c=Ez(r,(t=>t.PUSH_MODE)),h=Ez(r,(t=>GG(t,"POP_MODE")))})),n("Line Terminator Handling",(()=>{const t=I2(e.lineTerminatorCharacters);u=Ez(r,(t=>!1)),"onlyOffset"!==e.positionTracking&&(u=Ez(r,(e=>GG(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===L2(e,t)&&J1(t,e.PATTERN))))})),n("Misc Mapping #2",(()=>{d=Ez(r,C2),p=Ez(i,S2),g=oU(r,((t,e)=>{const n=e.GROUP;return jG(n)&&n!==n4.SKIPPED&&(t[n]=[]),t}),{}),f=Ez(i,((t,e)=>({pattern:i[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:s[e],push:c[e],pop:h[e],tokenTypeIdx:a[e],tokenType:r[e]})))}));let y=!0,v=[];return e.safeMode||n("First Char Optimization",(()=>{v=oU(r,((t,n,r)=>{if("string"==typeof n.PATTERN){const e=O2(n.PATTERN.charCodeAt(0));M2(t,e,f[r])}else if(Sb(n.START_CHARS_HINT)){let e;U$(n.START_CHARS_HINT,(n=>{const i=O2("string"==typeof n?n.charCodeAt(0):n);e!==i&&(e=i,M2(t,i,f[r]))}))}else if(tq(n.PATTERN))if(n.PATTERN.unicode)y=!1,e.ensureOptimizations&&s1(`${Y1}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const i=W1(n.PATTERN,e.ensureOptimizations);qA(i)&&(y=!1),U$(i,(e=>{M2(t,e,f[r])}))}else e.ensureOptimizations&&s1(`${Y1}\tTokenType: <${n.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return t}),[])})),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:v,hasCustom:m,canBeOptimized:y}}function a2(t,e){let n=[];const r=o2(t);n=n.concat(r.errors);const i=l2(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(s2(a)),n=n.concat(m2(a)),n=n.concat(y2(a,e)),n=n.concat(v2(a)),n}function s2(t){let e=[];const n=wz(t,(t=>tq(t.PATTERN)));return e=e.concat(h2(n)),e=e.concat(p2(n)),e=e.concat(g2(n)),e=e.concat(f2(n)),e=e.concat(u2(n)),e}function o2(t){const e=wz(t,(t=>!GG(t,t2)));return{errors:Ez(e,(t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:Q2.MISSING_PATTERN,tokenTypes:[t]}))),valid:uG(t,e)}}function l2(t){const e=wz(t,(t=>{const e=t.PATTERN;return!(tq(e)||hv(e)||GG(e,"exec")||jG(e))}));return{errors:Ez(e,(t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Q2.INVALID_PATTERN,tokenTypes:[t]}))),valid:uG(t,e)}}o(i2,"analyzeTokenTypes"),o(a2,"validatePatterns"),o(s2,"validateRegExpPattern"),o(o2,"findMissingPatterns"),o(l2,"findInvalidPatterns");var c2=/[^\\][$]/;function h2(t){class e extends h0{static{o(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}const n=wz(t,(t=>{const n=t.PATTERN;try{const t=G1(n),r=new e;return r.visit(t),r.found}catch(t){return c2.test(n.source)}}));return Ez(n,(t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Q2.EOI_ANCHOR_FOUND,tokenTypes:[t]})))}function u2(t){const e=wz(t,(t=>t.PATTERN.test("")));return Ez(e,(t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:Q2.EMPTY_MATCH_PATTERN,tokenTypes:[t]})))}o(h2,"findEndOfInputAnchor"),o(u2,"findEmptyMatchRegExps");var d2=/[^\\[][\^]|^\^/;function p2(t){class e extends h0{static{o(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}const n=wz(t,(t=>{const n=t.PATTERN;try{const t=G1(n),r=new e;return r.visit(t),r.found}catch(t){return d2.test(n.source)}}));return Ez(n,(t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Q2.SOI_ANCHOR_FOUND,tokenTypes:[t]})))}function g2(t){const e=wz(t,(t=>{const e=t.PATTERN;return e instanceof RegExp&&(e.multiline||e.global)}));return Ez(e,(t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Q2.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]})))}function f2(t){const e=[];let n=Ez(t,(n=>oU(t,((t,r)=>(n.PATTERN.source!==r.PATTERN.source||HG(e,r)||r.PATTERN===n4.NA||(e.push(r),t.push(r)),t)),[])));n=tG(n);const r=wz(n,(t=>t.length>1));return Ez(r,(t=>{const e=Ez(t,(t=>t.name));return{message:`The same RegExp pattern ->${AG(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:Q2.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}}))}function m2(t){const e=wz(t,(t=>{if(!GG(t,"GROUP"))return!1;const e=t.GROUP;return e!==n4.SKIPPED&&e!==n4.NA&&!jG(e)}));return Ez(e,(t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Q2.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]})))}function y2(t,e){const n=wz(t,(t=>void 0!==t.PUSH_MODE&&!HG(e,t.PUSH_MODE)));return Ez(n,(t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:Q2.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]})))}function v2(t){const e=[],n=oU(t,((t,e,n)=>{const r=e.PATTERN;return r===n4.NA||(jG(r)?t.push({str:r,idx:n,tokenType:e}):tq(r)&&b2(r)&&t.push({str:r.source,idx:n,tokenType:e})),t}),[]);return U$(t,((t,r)=>{U$(n,(({str:n,idx:i,tokenType:a})=>{if(r${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${t.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:n,type:Q2.UNREACHABLE_PATTERN,tokenTypes:[t,a]})}}))})),e}function x2(t,e){if(tq(e)){const n=e.exec(t);return null!==n&&0===n.index}if(hv(e))return e(t,0,[],{});if(GG(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function b2(t){return void 0===CG([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(e=>-1!==t.source.indexOf(e)))}function w2(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function k2(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function T2(t,e,n){const r=[];return GG(t,e2)||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:Q2.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),GG(t,n2)||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:Q2.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),GG(t,n2)&&GG(t,e2)&&!GG(t.modes,t.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a defaultMode: <${t.defaultMode}>which does not exist\n`,type:Q2.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),GG(t,n2)&&U$(t.modes,((t,e)=>{U$(t,((n,i)=>{if(Iz(n))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${e}> at index: <${i}>\n`,type:Q2.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(GG(n,"LONGER_ALT")){const i=Sb(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT];U$(i,(i=>{Iz(i)||HG(t,i)||r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${e}>\n`,type:Q2.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))}}))})),r}function _2(t,e,n){const r=[];let i=!1;const a=tG(Qz(Lz(t.modes))),s=Gq(a,(t=>t.PATTERN===n4.NA)),o=I2(n);return e&&U$(s,(t=>{const e=L2(t,o);if(!1!==e){const n={message:N2(t,e),type:e.issue,tokenType:t};r.push(n)}else GG(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):J1(o,t.PATTERN)&&(i=!0)})),e&&!i&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Q2.NO_LINE_BREAKS_FLAGS}),r}function E2(t){const e={},n=TB(t);return U$(n,(n=>{const r=t[n];if(!Sb(r))throw Error("non exhaustive match");e[n]=[]})),e}function C2(t){const e=t.PATTERN;if(tq(e))return!1;if(hv(e))return!0;if(GG(e,"exec"))return!0;if(jG(e))return!1;throw Error("non exhaustive match")}function S2(t){return!(!jG(t)||1!==t.length)&&t.charCodeAt(0)}o(p2,"findStartOfInputAnchor"),o(g2,"findUnsupportedFlags"),o(f2,"findDuplicatePatterns"),o(m2,"findInvalidGroupType"),o(y2,"findModesThatDoNotExist"),o(v2,"findUnreachablePatterns"),o(x2,"testTokenType"),o(b2,"noMetaChar"),o(w2,"addStartOfInput"),o(k2,"addStickyFlag"),o(T2,"performRuntimeChecks"),o(_2,"performWarningRuntimeChecks"),o(E2,"cloneEmptyGroups"),o(C2,"isCustomPattern"),o(S2,"isShortPattern");var A2={test:o((function(t){const e=t.length;for(let n=this.lastIndex;n Token Type\n\t Root cause: ${e.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Q2.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${t.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function I2(t){return Ez(t,(t=>jG(t)?t.charCodeAt(0):t))}function M2(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}o(L2,"checkLineBreaksIssues"),o(N2,"buildLineBreakIssueMessage"),o(I2,"getCharCodes"),o(M2,"addToMapOfArrays");var R2=256,D2=[];function O2(t){return t255?255+~~(t/255):t}}function B2(t,e){const n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function $2(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}o(O2,"charCodeToOptimizedIndex"),o(P2,"initCharCodeToOptimizedIndexMap"),o(B2,"tokenStructuredMatcher"),o($2,"tokenStructuredMatcherNoCategories");var F2=1,z2={};function U2(t){const e=G2(t);q2(e),Y2(e),j2(e),U$(e,(t=>{t.isParent=t.categoryMatches.length>0}))}function G2(t){let e=S$(t),n=t,r=!0;for(;r;){n=tG(Qz(Ez(n,(t=>t.CATEGORIES))));const t=uG(n,e);e=e.concat(t),qA(t)?r=!1:n=t}return e}function q2(t){U$(t,(t=>{H2(t)||(z2[F2]=t,t.tokenTypeIdx=F2++),V2(t)&&!Sb(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),V2(t)||(t.CATEGORIES=[]),X2(t)||(t.categoryMatches=[]),K2(t)||(t.categoryMatchesMap={})}))}function j2(t){U$(t,(t=>{t.categoryMatches=[],U$(t.categoryMatchesMap,((e,n)=>{t.categoryMatches.push(z2[n].tokenTypeIdx)}))}))}function Y2(t){U$(t,(t=>{W2([],t)}))}function W2(t,e){U$(t,(t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0})),U$(e.CATEGORIES,(n=>{const r=t.concat(e);HG(r,n)||W2(r,n)}))}function H2(t){return GG(t,"tokenTypeIdx")}function V2(t){return GG(t,"CATEGORIES")}function X2(t){return GG(t,"categoryMatches")}function K2(t){return GG(t,"categoryMatchesMap")}function Z2(t){return GG(t,"tokenTypeIdx")}o(U2,"augmentTokenTypes"),o(G2,"expandCategories"),o(q2,"assignTokenDefaultProps"),o(j2,"assignCategoriesTokensProp"),o(Y2,"assignCategoriesMapProp"),o(W2,"singleAssignCategoriesToksMap"),o(H2,"hasShortKeyProperty"),o(V2,"hasCategoriesProperty"),o(X2,"hasExtendingTokensTypesProperty"),o(K2,"hasExtendingTokensTypesMapProperty"),o(Z2,"isTokenType");var Q2,J2,t4={buildUnableToPopLexerModeMessage:t=>`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(t,e,n,r,i)=>`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${n} characters.`};(J2=Q2||(Q2={}))[J2.MISSING_PATTERN=0]="MISSING_PATTERN",J2[J2.INVALID_PATTERN=1]="INVALID_PATTERN",J2[J2.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",J2[J2.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",J2[J2.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",J2[J2.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",J2[J2.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",J2[J2.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",J2[J2.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",J2[J2.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",J2[J2.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",J2[J2.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",J2[J2.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",J2[J2.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",J2[J2.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",J2[J2.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",J2[J2.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",J2[J2.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";var e4={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:t4,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(e4);var n4=class{static{o(this,"Lexer")}constructor(t,e=e4){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=(t,e)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=l1(e),a=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return e()},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=YU({},e4,e);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(()=>{let n,r=!0;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===e4.lineTerminatorsPattern)this.config.lineTerminatorsPattern=A2;else if(this.config.lineTerminatorCharacters===e4.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.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),Sb(t)?n={modes:{defaultMode:S$(t)},defaultMode:e2}:(r=!1,n=S$(t))})),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(T2(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(_2(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},U$(n.modes,((t,e)=>{n.modes[e]=Gq(t,(t=>Iz(t)))}));const i=TB(n.modes);if(U$(n.modes,((t,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(a2(t,i))})),qA(this.lexerDefinitionErrors)){let r;U2(t),this.TRACE_INIT("analyzeTokenTypes",(()=>{r=i2(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:this.TRACE_INIT})})),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=YU({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}}))})),this.defaultMode=n.defaultMode,!qA(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const t=Ez(this.lexerDefinitionErrors,(t=>t.message)),e=t.join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}U$(this.lexerDefinitionWarning,(t=>{o1(t.message)})),this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(r2?(this.chopInput=Rw,this.match=this.matchWithTest):(this.updateLastIndex=wU,this.match=this.matchWithExec),r&&(this.handleModes=wU),!1===this.trackStartLines&&(this.computeNewColumn=Rw),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=wU),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)})),this.TRACE_INIT("Failed Optimization Warnings",(()=>{const t=oU(this.canModeBeOptimized,((t,e,n)=>(!1===e&&t.push(n),t)),[]);if(e.ensureOptimizations&&!qA(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)})),this.TRACE_INIT("clearRegExpParserCache",(()=>{q1()})),this.TRACE_INIT("toFastProperties",(()=>{c1(this)}))}))}tokenize(t,e=this.defaultMode){if(!qA(this.lexerDefinitionErrors)){const t=Ez(this.lexerDefinitionErrors,(t=>t.message)),e=t.join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(t,e)}tokenizeInternal(t,e){let n,r,i,a,s,l,c,h,u,d,p,g,f,m,y;const v=t,x=v.length;let b=0,w=0;const k=this.hasCustom?0:Math.floor(t.length/10),T=new Array(k),_=[];let E=this.trackStartLines?1:void 0,C=this.trackStartLines?1:void 0;const S=E2(this.emptyGroups),A=this.trackStartLines,L=this.config.lineTerminatorsPattern;let N=0,I=[],M=[];const R=[],D=[];let O;function P(){return I}function B(t){const e=O2(t),n=M[e];return void 0===n?D:n}Object.freeze(D),o(P,"getPossiblePatternsSlow"),o(B,"getPossiblePatternsOptimized");const $=o((t=>{if(1===R.length&&void 0===t.tokenType.PUSH_MODE){const e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);_.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})}else{R.pop();const t=R$(R);I=this.patternIdxToConfig[t],M=this.charCodeToPatternIdxToConfig[t],N=I.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;O=M&&e?B:P}}),"pop_mode");function F(t){R.push(t),M=this.charCodeToPatternIdxToConfig[t],I=this.patternIdxToConfig[t],N=I.length,N=I.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;O=M&&e?B:P}let z;o(F,"push_mode"),F.call(this,e);const U=this.config.recoveryEnabled;for(;bl.length){l=a,c=h,z=e;break}}}break}}if(null!==l){if(u=l.length,d=z.group,void 0!==d&&(p=z.tokenTypeIdx,g=this.createTokenInstance(l,b,p,z.tokenType,E,C,u),this.handlePayload(g,c),!1===d?w=this.addToken(T,w,g):S[d].push(g)),t=this.chopInput(t,u),b+=u,C=this.computeNewColumn(C,u),!0===A&&!0===z.canLineTerminator){let t,e,n=0;L.lastIndex=0;do{t=L.test(l),!0===t&&(e=L.lastIndex-1,n++)}while(!0===t);0!==n&&(E+=n,C=u-e,this.updateTokenEndLineColumnLocation(g,d,e,n,E,C,u))}this.handleModes(z,$,F,g)}else{const e=b,n=E,i=C;let a=!1===U;for(;!1===a&&b`Expecting ${i4(t)?`--\x3e ${r4(t)} <--`:`token of type --\x3e ${t.name} <--`} but found --\x3e '${e.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:t,ruleName:e})=>"Redundant input, expecting EOF but found: "+t.image,buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:n,customUserDescription:r,ruleName:i}){const a="Expecting: ",s="\nbut found: '"+AG(e).image+"'";if(r)return a+r+s;{const e=oU(t,((t,e)=>t.concat(e)),[]),n=Ez(e,(t=>`[${Ez(t,(t=>r4(t))).join(", ")}]`));return a+`one of these possible Token sequences:\n${Ez(n,((t,e)=>` ${e+1}. ${t}`)).join("\n")}`+s}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:n,ruleName:r}){const i="Expecting: ",a="\nbut found: '"+AG(e).image+"'";if(n)return i+n+a;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${Ez(t,(t=>`[${Ez(t,(t=>r4(t))).join(",")}]`)).join(" ,")}>`+a}};Object.freeze(v4);var x4={buildRuleNotFoundError:(t,e)=>"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"},b4={buildDuplicateFoundError(t,e){function n(t){return t instanceof k1?t.terminalType.name:t instanceof p1?t.nonTerminalName:""}o(n,"getExtraProductionArgument");const r=t.name,i=AG(e),a=i.idx,s=L1(i),l=n(i);let c=`->${s}${a>0?a:""}<- ${l?`with argument: ->${l}<-`:""}\n appears more than once (${e.length} times) in the top level rule: ->${r}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,"\n"),c},buildNamespaceConflictError:t=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(t){const e=Ez(t.prefixPath,(t=>r4(t))).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(t){const e=Ez(t.prefixPath,(t=>r4(t))).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(t){let e=L1(t.repetition);0!==t.repetition.idx&&(e+=t.repetition.idx);return`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:t=>"deprecated",buildEmptyAlternationError:t=>`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:t=>`An Alternation cannot have more than 256 alternatives:\n inside <${t.topLevelRule.name}> Rule.\n has ${t.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(t){const e=t.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${e}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${e} --\x3e ${Ez(t.leftRecursionPath,(t=>t.name)).concat([e]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:t=>"deprecated",buildDuplicateRuleNameError(t){let e;e=t.topLevelRule instanceof g1?t.topLevelRule.name:t.topLevelRule;return`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function w4(t,e){const n=new _4(t,e);return n.resolveRefs(),n.errors}o(w4,"resolveGrammar");var k4,T4,_4=class extends E1{static{o(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){U$(Lz(this.nameToTopRule),(t=>{this.currTopLevel=t,t.accept(this)}))}visitNonTerminal(t){const e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{const e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:e,type:w5.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}},E4=class extends N1{static{o(this,"AbstractNextPossibleTokensWalker")}constructor(t,e){super(),this.topProd=t,this.path=e,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=S$(this.path.ruleStack).reverse(),this.occurrenceStack=S$(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){const r=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,r)}}updateExpectedNext(){qA(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},C4=class extends E4{static{o(this,"NextAfterTokenWalker")}constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){const t=e.concat(n),r=new f1({definition:t});this.possibleTokTypes=M1(r),this.found=!0}}},S4=class extends N1{static{o(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},A4=class extends S4{static{o(this,"NextTerminalAfterManyWalker")}walkMany(t,e,n){if(t.idx===this.occurrence){const t=AG(e.concat(n));this.result.isEndOfRule=void 0===t,t instanceof k1&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkMany(t,e,n)}},L4=class extends S4{static{o(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,n){if(t.idx===this.occurrence){const t=AG(e.concat(n));this.result.isEndOfRule=void 0===t,t instanceof k1&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkManySep(t,e,n)}},N4=class extends S4{static{o(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,n){if(t.idx===this.occurrence){const t=AG(e.concat(n));this.result.isEndOfRule=void 0===t,t instanceof k1&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkAtLeastOne(t,e,n)}},I4=class extends S4{static{o(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,n){if(t.idx===this.occurrence){const t=AG(e.concat(n));this.result.isEndOfRule=void 0===t,t instanceof k1&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkAtLeastOneSep(t,e,n)}};function M4(t,e,n=[]){n=S$(n);let r=[],i=0;function a(e){return e.concat(pG(t,i+1))}function s(t){const i=M4(a(t),e,n);return r.concat(i)}for(o(a,"remainingPathWith"),o(s,"getAlternativesForProd");n.length{!1===qA(t.definition)&&(r=s(t.definition))})),r;if(!(e instanceof k1))throw Error("non exhaustive match");n.push(e.terminalType)}}i++}return r.push({partialPath:n,suffixDef:pG(t,i)}),r}function R4(t,e,n,r){const i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE";let o=!1;const l=e.length,c=l-r-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!qA(u);){const t=u.pop();if(t===s){o&&R$(u).idx<=c&&u.pop();continue}const r=t.def,d=t.idx,p=t.ruleStack,g=t.occurrenceStack;if(qA(r))continue;const f=r[0];if(f===i){const t={idx:d,def:pG(r),ruleStack:fG(p),occurrenceStack:fG(g)};u.push(t)}else if(f instanceof k1)if(d=0;t--){const e={idx:d,def:f.definition[t].definition.concat(pG(r)),ruleStack:p,occurrenceStack:g};u.push(e),u.push(s)}else if(f instanceof f1)u.push({idx:d,def:f.definition.concat(pG(r)),ruleStack:p,occurrenceStack:g});else{if(!(f instanceof g1))throw Error("non exhaustive match");u.push(D4(f,d,p,g))}}return h}function D4(t,e,n,r){const i=S$(n);i.push(t.name);const a=S$(r);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}function O4(t){if(t instanceof m1||"Option"===t)return k4.OPTION;if(t instanceof x1||"Repetition"===t)return k4.REPETITION;if(t instanceof y1||"RepetitionMandatory"===t)return k4.REPETITION_MANDATORY;if(t instanceof v1||"RepetitionMandatoryWithSeparator"===t)return k4.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof b1||"RepetitionWithSeparator"===t)return k4.REPETITION_WITH_SEPARATOR;if(t instanceof w1||"Alternation"===t)return k4.ALTERNATION;throw Error("non exhaustive match")}function P4(t){const{occurrence:e,rule:n,prodType:r,maxLookahead:i}=t,a=O4(r);return a===k4.ALTERNATION?H4(e,n,i):V4(e,n,a,i)}function B4(t,e,n,r,i,a){const s=H4(t,e,n);return a(s,r,Z4(s)?$2:B2,i)}function $4(t,e,n,r,i,a){const s=V4(t,e,i,n),o=Z4(s)?$2:B2;return a(s[0],o,r)}function F4(t,e,n,r){const i=t.length,a=wG(t,(t=>wG(t,(t=>1===t.length))));if(e)return function(e){const r=Ez(e,(t=>t.GATE));for(let e=0;eQz(t))),n=oU(e,((t,e,n)=>(U$(e,(e=>{GG(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=n),U$(e.categoryMatches,(e=>{GG(t,e)||(t[e]=n)}))})),t)),{});return function(){const t=this.LA(1);return n[t.tokenTypeIdx]}}return function(){for(let e=0;e1===t.length)),i=t.length;if(r&&!n){const e=Qz(t);if(1===e.length&&qA(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=oU(e,((t,e,n)=>(t[e.tokenTypeIdx]=!0,U$(e.categoryMatches,(e=>{t[e]=!0})),t)),[]);return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){t:for(let n=0;nM4([t],1))),r=q4(n.length),i=Ez(n,(t=>{const e={};return U$(t,(t=>{const n=j4(t.partialPath);U$(n,(t=>{e[t]=!0}))})),e}));let a=n;for(let t=1;t<=e;t++){const n=a;a=q4(n.length);for(let s=0;s{const e=j4(t.partialPath);U$(e,(t=>{i[s][t]=!0}))}))}}}}return r}function H4(t,e,n,r){const i=new G4(t,k4.ALTERNATION,r);return e.accept(i),W4(i.result,n)}function V4(t,e,n,r){const i=new G4(t,n);e.accept(i);const a=i.result,s=new U4(e,t,n).startWalking();return W4([new f1({definition:a}),new f1({definition:s})],r)}function X4(t,e){t:for(let n=0;n{const r=e[n];return t===r||r.categoryMatchesMap[t.tokenTypeIdx]}))}function Z4(t){return wG(t,(t=>wG(t,(t=>wG(t,(t=>qA(t.categoryMatches)))))))}function Q4(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return Ez(e,(t=>Object.assign({type:w5.CUSTOM_LOOKAHEAD_VALIDATION},t)))}function J4(t,e,n,r){const i=NG(t,(t=>t3(t,n))),a=m3(t,e,n),s=NG(t,(t=>d3(t,n))),o=NG(t,(e=>i3(e,t,r,n)));return i.concat(a,s,o)}function t3(t,e){const n=new r3;t.accept(n);const r=n.allProductions,i=BG(r,e3),a=hq(i,(t=>t.length>1));return Ez(Lz(a),(n=>{const r=AG(n),i=e.buildDuplicateFoundError(t,n),a=L1(r),s={message:i,type:w5.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:a,occurrence:r.idx},o=n3(r);return o&&(s.parameter=o),s}))}function e3(t){return`${L1(t)}_#_${t.idx}_#_${n3(t)}`}function n3(t){return t instanceof k1?t.terminalType.name:t instanceof p1?t.nonTerminalName:""}o(q4,"initializeArrayOfArrays"),o(j4,"pathToHashKeys"),o(Y4,"isUniquePrefixHash"),o(W4,"lookAheadSequenceFromAlternatives"),o(H4,"getLookaheadPathsForOr"),o(V4,"getLookaheadPathsForOptionalProd"),o(X4,"containsPath"),o(K4,"isStrictPrefixOfPath"),o(Z4,"areTokenCategoriesNotUsed"),o(Q4,"validateLookahead"),o(J4,"validateGrammar"),o(t3,"validateDuplicateProductions"),o(e3,"identifyProductionForDuplicates"),o(n3,"getExtraProductionArgument");var r3=class extends E1{static{o(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)}};function i3(t,e,n,r){const i=[];if(oU(e,((e,n)=>n.name===t.name?e+1:e),0)>1){const e=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});i.push({message:e,type:w5.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function a3(t,e,n){const r=[];let i;return HG(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:w5.INVALID_RULE_OVERRIDE,ruleName:t})),r}function s3(t,e,n,r=[]){const i=[],a=o3(e.definition);if(qA(a))return[];{const e=t.name;HG(a,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:w5.LEFT_RECURSION,ruleName:e});const s=uG(a,r.concat([t])),o=NG(s,(e=>{const i=S$(r);return i.push(e),s3(t,e,n,i)}));return i.concat(o)}}function o3(t){let e=[];if(qA(t))return e;const n=AG(t);if(n instanceof p1)e.push(n.referencedRule);else if(n instanceof f1||n instanceof m1||n instanceof y1||n instanceof v1||n instanceof b1||n instanceof x1)e=e.concat(o3(n.definition));else if(n instanceof w1)e=Qz(Ez(n.definition,(t=>o3(t.definition))));else if(!(n instanceof k1))throw Error("non exhaustive match");const r=S1(n),i=t.length>1;if(r&&i){const n=pG(t);return e.concat(o3(n))}return e}o(i3,"validateRuleDoesNotAlreadyExist"),o(a3,"validateRuleIsOverridden"),o(s3,"validateNoLeftRecursion"),o(o3,"getFirstNoneTerminal");var l3=class extends E1{static{o(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function c3(t,e){const n=new l3;t.accept(n);const r=n.alternations;return NG(r,(n=>{const r=fG(n.definition);return NG(r,((r,i)=>{const a=R4([r],[],B2,1);return qA(a)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:n,emptyChoiceIdx:i}),type:w5.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:n.idx,alternative:i+1}]:[]}))}))}function h3(t,e,n){const r=new l3;t.accept(r);let i=r.alternations;i=Gq(i,(t=>!0===t.ignoreAmbiguities));return NG(i,(r=>{const i=r.idx,a=r.maxLookahead||e,s=H4(i,t,a,r),o=g3(s,r,t,n),l=f3(s,r,t,n);return o.concat(l)}))}o(c3,"validateEmptyOrAlternative"),o(h3,"validateAmbiguousAlternationAlternatives");var u3=class extends E1{static{o(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)}};function d3(t,e){const n=new l3;t.accept(n);const r=n.alternations;return NG(r,(n=>n.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:n}),type:w5.TOO_MANY_ALTS,ruleName:t.name,occurrence:n.idx}]:[]))}function p3(t,e,n){const r=[];return U$(t,(t=>{const i=new u3;t.accept(i);const a=i.allProductions;U$(a,(i=>{const a=O4(i),s=i.maxLookahead||e,o=V4(i.idx,t,a,s)[0];if(qA(Qz(o))){const e=n.buildEmptyRepetitionError({topLevelRule:t,repetition:i});r.push({message:e,type:w5.NO_NON_EMPTY_LOOKAHEAD,ruleName:t.name})}}))})),r}function g3(t,e,n,r){const i=[],a=oU(t,((n,r,a)=>(!0===e.definition[a].ignoreAmbiguities||U$(r,(r=>{const s=[a];U$(t,((t,n)=>{a!==n&&X4(t,r)&&!0!==e.definition[n].ignoreAmbiguities&&s.push(n)})),s.length>1&&!X4(i,r)&&(i.push(r),n.push({alts:s,path:r}))})),n)),[]);return Ez(a,(t=>{const i=Ez(t.alts,(t=>t+1));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:i,prefixPath:t.path}),type:w5.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:t.alts}}))}function f3(t,e,n,r){const i=oU(t,((t,e,n)=>{const r=Ez(e,(t=>({idx:n,path:t})));return t.concat(r)}),[]);return tG(NG(i,(t=>{if(!0===e.definition[t.idx].ignoreAmbiguities)return[];const a=t.idx,s=t.path,o=wz(i,(t=>!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx{const i=[t.idx+1,a+1],s=0===e.idx?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:i,prefixPath:t.path}),type:w5.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:i}}))})))}function m3(t,e,n){const r=[],i=Ez(e,(t=>t.name));return U$(t,(t=>{const e=t.name;if(HG(i,e)){const i=n.buildNamespaceConflictError(t);r.push({message:i,type:w5.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e})}})),r}function y3(t){const e=I$(t,{errMsgProvider:x4}),n={};return U$(t.rules,(t=>{n[t.name]=t})),w4(n,e.errMsgProvider)}function v3(t){return J4((t=I$(t,{errMsgProvider:b4})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}o(d3,"validateTooManyAlts"),o(p3,"validateSomeNonEmptyLookaheadPath"),o(g3,"checkAlternativesAmbiguities"),o(f3,"checkPrefixAlternativesAmbiguities"),o(m3,"checkTerminalAndNoneTerminalsNameSpace"),o(y3,"resolveGrammar"),o(v3,"validateGrammar");var x3="MismatchedTokenException",b3="NoViableAltException",w3="EarlyExitException",k3="NotAllInputParsedException",T3=[x3,b3,w3,k3];function _3(t){return HG(T3,t.name)}Object.freeze(T3),o(_3,"isRecognitionException");var E3=class extends Error{static{o(this,"RecognitionException")}constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},C3=class extends E3{static{o(this,"MismatchedTokenException")}constructor(t,e,n){super(t,e),this.previousToken=n,this.name=x3}},S3=class extends E3{static{o(this,"NoViableAltException")}constructor(t,e,n){super(t,e),this.previousToken=n,this.name=b3}},A3=class extends E3{static{o(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name=k3}},L3=class extends E3{static{o(this,"EarlyExitException")}constructor(t,e,n){super(t,e),this.previousToken=n,this.name=w3}},N3={},I3="InRuleRecoveryException",M3=class extends Error{static{o(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=I3}},R3=class{static{o(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=GG(t,"recoveryEnabled")?t.recoveryEnabled:T5.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=D3)}getTokenToInsert(t){const e=m4(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,n,r){const i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[];let l=!1;const c=this.LA(1);let h=this.LA(1);const u=o((()=>{const t=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:t,ruleName:this.getCurrRuleFullName()}),n=new C3(e,c,this.LA(0));n.resyncedTokens=fG(s),this.SAVE_ERROR(n)}),"generateErrorMessage");for(;!l;){if(this.tokenMatcher(h,r))return void u();if(n.call(this))return u(),void t.apply(this,e);this.tokenMatcher(h,i)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,n){return!1!==n&&(!this.tokenMatcher(this.LA(1),t)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e))))}getFollowsForInRuleRecovery(t,e){const n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e)){return this.getTokenToInsert(t)}if(this.canRecoverWithSingleTokenDeletion(t)){const t=this.SKIP_TOKEN();return this.consumeToken(),t}throw new M3("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if(qA(e))return!1;const n=this.LA(1);return void 0!==CG(e,(t=>this.tokenMatcher(n,t)))}canRecoverWithSingleTokenDeletion(t){if(!this.canTokenTypeBeDeletedInRecovery(t))return!1;return this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){const e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return HG(n,t)}findReSyncTokenType(){const t=this.flattenFollowSet();let e=this.LA(1),n=2;for(;;){const r=CG(t,(t=>y4(e,t)));if(void 0!==r)return r;e=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return N3;const t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const t=this.RULE_STACK,e=this.RULE_OCCURRENCE_STACK;return Ez(t,((n,r)=>0===r?N3:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:e[r],inRule:this.shortRuleNameToFullName(t[r-1])}))}flattenFollowSet(){const t=Ez(this.buildFullFollowKeyStack(),(t=>this.getFollowSetFromFollowKey(t)));return Qz(t)}getFollowSetFromFollowKey(t){if(t===N3)return[f4];const e=t.ruleName+t.idxInCallingRule+P1+t.inRule;return this.resyncFollows[e]}addToResyncTokens(t,e){return this.tokenMatcher(t,f4)||e.push(t),e}reSyncTo(t){const e=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return fG(e)}attemptInRepetitionRecovery(t,e,n,r,i,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:S$(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return Ez(this.RULE_STACK,(t=>this.shortRuleNameToFullName(t)))}};function D3(t,e,n,r,i,a,s){const o=this.getKeyForAutomaticLookahead(r,i);let l=this.firstAfterRepMap[o];if(void 0===l){const t=this.getCurrRuleFullName();l=new a(this.getGAstProductions()[t],i).startWalking(),this.firstAfterRepMap[o]=l}let c=l.token,h=l.occurrence;const u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=f4,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,n,c)}o(D3,"attemptInRepetitionRecovery");var O3=1024,P3=1280,B3=1536;function $3(t,e,n){return n|e|t}o($3,"getKeyForAutomaticLookahead");var F3=class{static{o(this,"LLkLookaheadStrategy")}constructor(t){var e;this.maxLookahead=null!==(e=null==t?void 0:t.maxLookahead)&&void 0!==e?e:T5.maxLookahead}validate(t){const e=this.validateNoLeftRecursion(t.rules);if(qA(e)){const n=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...e,...n,...r,...i]}return e}validateNoLeftRecursion(t){return NG(t,(t=>s3(t,t,b4)))}validateEmptyOrAlternatives(t){return NG(t,(t=>c3(t,b4)))}validateAmbiguousAlternationAlternatives(t,e){return NG(t,(t=>h3(t,e,b4)))}validateSomeNonEmptyLookaheadPath(t,e){return p3(t,e,b4)}buildLookaheadForAlternation(t){return B4(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,F4)}buildLookaheadForOptional(t){return $4(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,O4(t.prodType),z4)}},z3=class{static{o(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=GG(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:T5.dynamicTokensEnabled,this.maxLookahead=GG(t,"maxLookahead")?t.maxLookahead:T5.maxLookahead,this.lookaheadStrategy=GG(t,"lookaheadStrategy")?t.lookaheadStrategy:new F3({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){U$(t,(t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,(()=>{const{alternation:e,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:s}=q3(t);U$(e,(e=>{const n=0===e.idx?"":e.idx;this.TRACE_INIT(`${L1(e)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:e.idx,rule:t,maxLookahead:e.maxLookahead||this.maxLookahead,hasPredicates:e.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=$3(this.fullRuleNameToShort[t.name],256,e.idx);this.setLaFuncCache(r,n)}))})),U$(n,(e=>{this.computeLookaheadFunc(t,e.idx,768,"Repetition",e.maxLookahead,L1(e))})),U$(r,(e=>{this.computeLookaheadFunc(t,e.idx,512,"Option",e.maxLookahead,L1(e))})),U$(i,(e=>{this.computeLookaheadFunc(t,e.idx,O3,"RepetitionMandatory",e.maxLookahead,L1(e))})),U$(a,(e=>{this.computeLookaheadFunc(t,e.idx,B3,"RepetitionMandatoryWithSeparator",e.maxLookahead,L1(e))})),U$(s,(e=>{this.computeLookaheadFunc(t,e.idx,P3,"RepetitionWithSeparator",e.maxLookahead,L1(e))}))}))}))}computeLookaheadFunc(t,e,n,r,i,a){this.TRACE_INIT(`${a}${0===e?"":e}`,(()=>{const a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:e,rule:t,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),s=$3(this.fullRuleNameToShort[t.name],n,e);this.setLaFuncCache(s,a)}))}getKeyForAutomaticLookahead(t,e){return $3(this.getLastExplicitRuleShortName(),t,e)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},U3=class extends E1{static{o(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)}},G3=new U3;function q3(t){G3.reset(),t.accept(G3);const e=G3.dslMethods;return G3.reset(),e}function j3(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffsett.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${e.join("\n\n").replace(/\n/g,"\n\t")}`)}}),"validateVisitor")};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=e,n}function J3(t,e,n){const r=o((function(){}),"derivedConstructor");K3(r,t+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return U$(e,(t=>{i[t]=Z3})),r.prototype=i,r.prototype.constructor=r,r}function t5(t,e){return e5(t,e)}function e5(t,e){const n=wz(e,(e=>!1===hv(t[e]))),r=Ez(n,(e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:V3.MISSING_METHOD,methodName:e})));return tG(r)}o(K3,"defineNameProp"),o(Z3,"defaultVisit"),o(Q3,"createBaseSemanticVisitorConstructor"),o(J3,"createBaseVisitorConstructorWithDefaults"),(X3=V3||(V3={}))[X3.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",X3[X3.MISSING_METHOD=1]="MISSING_METHOD",o(t5,"validateVisitor"),o(e5,"validateMissingCstMethods");var n5=class{static{o(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=GG(t,"nodeLocationTracking")?t.nodeLocationTracking:T5.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Y3,this.setNodeLocationFromNode=Y3,this.cstPostRule=wU,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=wU,this.setNodeLocationFromNode=wU,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=j3,this.setNodeLocationFromNode=j3,this.cstPostRule=wU,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=wU,this.setNodeLocationFromNode=wU,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=wU,this.setNodeLocationFromNode=wU,this.cstPostRule=wU,this.setInitialNodeLocation=wU}else this.cstInvocationStateUpdate=wU,this.cstFinallyStateUpdate=wU,this.cstPostTerminal=wU,this.cstPostNonTerminal=wU,this.cstPostRule=wU}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){const e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){const e={name:t,children:Object.create(null)};this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){const e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(t){const e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?n.endOffset=e.endOffset:n.startOffset=NaN}cstPostTerminal(t,e){const n=this.CST_STACK[this.CST_STACK.length-1];W3(n,e,t),this.setNodeLocationFromToken(n.location,e)}cstPostNonTerminal(t,e){const n=this.CST_STACK[this.CST_STACK.length-1];H3(n,e,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(Iz(this.baseCstVisitorConstructor)){const t=Q3(this.className,TB(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Iz(this.baseCstVisitorWithDefaultsConstructor)){const t=J3(this.className,TB(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){const t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}},r5=class{static{o(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):b5}LA(t){const e=this.currIdx+t;return e<0||this.tokVectorLength<=e?b5:this.tokVector[e]}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()}},i5=class{static{o(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,e,n){return this.consumeInternal(e,t,n)}subrule(t,e,n){return this.subruleInternal(e,t,n)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,n=_5){if(HG(this.definedRulesNames,t)){const e={message:b4.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:w5.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(e)}this.definedRulesNames.push(t);const r=this.defineRule(t,e,n);return this[t]=r,r}OVERRIDE_RULE(t,e,n=_5){const r=a3(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(t,e,n);return this[t]=i,i}BACKTRACK(t,e){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return t.apply(this,e),!0}catch(t){if(_3(t))return!1;throw t}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return T1(Lz(this.gastProductionsCache))}},a5=class{static{o(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=$2,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},GG(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Sb(t)){if(qA(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Sb(t))this.tokensMap=oU(t,((t,e)=>(t[e.name]=e,t)),{});else if(GG(t,"modes")&&wG(Qz(Lz(t.modes)),Z2)){const e=Qz(Lz(t.modes)),n=Qq(e);this.tokensMap=oU(n,((t,e)=>(t[e.name]=e,t)),{})}else{if(!ov(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=S$(t)}this.tokensMap.EOF=f4;const n=GG(t,"modes")?Qz(Lz(t.modes)):Lz(t),r=wG(n,(t=>qA(t.categoryMatches)));this.tokenMatcher=r?$2:B2,U2(Lz(this.tokensMap))}defineRule(t,e,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const r=GG(n,"resyncEnabled")?n.resyncEnabled:_5.resyncEnabled,i=GG(n,"recoveryValueFunc")?n.recoveryValueFunc:_5.recoveryValueFunc,a=this.ruleShortNameIdx<<12;let s;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a,s=!0===this.outputCst?o((function(...n){try{this.ruleInvocationStateUpdate(a,t,this.subruleIdx),e.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(t){return this.invokeRuleCatch(t,r,i)}finally{this.ruleFinallyStateUpdate()}}),"invokeRuleWithTry"):o((function(...n){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),e.apply(this,n)}catch(t){return this.invokeRuleCatch(t,r,i)}finally{this.ruleFinallyStateUpdate()}}),"invokeRuleWithTryCst");return Object.assign(s,{ruleName:t,originalGrammarAction:e})}invokeRuleCatch(t,e,n){const r=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(_3(t)){const e=t;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(e.resyncedTokens=this.reSyncTo(r),this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];return t.recoveredNode=!0,t}return n(t)}if(this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];t.recoveredNode=!0,e.partialCstResult=t}throw e}if(r)return this.moveToTerminatedState(),n(t);throw e}throw t}optionInternal(t,e){const n=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,n)}optionInternalLogic(t,e,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=o((()=>e.call(this)&&t.call(this)),"lookAheadFunc")}}else r=t;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(t,e){const n=this.getKeyForAutomaticLookahead(O3,t);return this.atLeastOneInternalLogic(t,e,n)}atLeastOneInternalLogic(t,e,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=o((()=>t.call(this)&&e.call(this)),"lookAheadFunc")}}else r=e;if(!0!==i.call(this))throw this.raiseEarlyExitException(t,k4.REPETITION_MANDATORY,e.ERR_MSG);{let t=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===t;)t=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],i,O3,t,N4)}atLeastOneSepFirstInternal(t,e){const n=this.getKeyForAutomaticLookahead(B3,t);this.atLeastOneSepFirstInternalLogic(t,e,n)}atLeastOneSepFirstInternalLogic(t,e,n){const r=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,k4.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);{r.call(this);const e=o((()=>this.tokenMatcher(this.LA(1),i)),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,r,I4],e,B3,t,I4)}}manyInternal(t,e){const n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,n)}manyInternalLogic(t,e,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=o((()=>t.call(this)&&e.call(this)),"lookaheadFunction")}}else r=e;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],i,768,t,A4,a)}manySepFirstInternal(t,e){const n=this.getKeyForAutomaticLookahead(P3,t);this.manySepFirstInternalLogic(t,e,n)}manySepFirstInternalLogic(t,e,n){const r=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const e=o((()=>this.tokenMatcher(this.LA(1),i)),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,r,L4],e,P3,t,L4)}}repetitionSepSecondInternal(t,e,n,r,i){for(;n();)this.CONSUME(e),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,r,i],n,B3,t,i)}doSingleRepetition(t){const e=this.getLexerPosition();t.call(this);return this.getLexerPosition()>e}orInternal(t,e){const n=this.getKeyForAutomaticLookahead(256,e),r=Sb(t)?t:t.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i){return r[i].ALT.call(this)}this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new A3(e,t))}}subruleInternal(t,e,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=e,r=t.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),r}catch(e){throw this.subruleInternalError(e,n,t.ruleName)}}subruleInternalError(t,e,n){throw _3(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,e,n){let r;try{const e=this.LA(1);!0===this.tokenMatcher(e,t)?(this.consumeToken(),r=e):this.consumeInternalError(t,e,n)}catch(n){r=this.consumeInternalRecovery(t,e,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,r),r}consumeInternalError(t,e,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new C3(r,e,i))}consumeInternalRecovery(t,e,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const r=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,r)}catch(t){throw t.name===I3?n:t}}}saveRecogState(){const t=this.errors,e=S$(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),f4)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},s5=class{static{o(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=GG(t,"errorMessageProvider")?t.errorMessageProvider:T5.errorMessageProvider}SAVE_ERROR(t){if(_3(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:S$(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return S$(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,n){const r=this.getCurrRuleFullName(),i=V4(t,this.getGAstProductions()[r],e,this.maxLookahead)[0],a=[];for(let t=1;t<=this.maxLookahead;t++)a.push(this.LA(t));const s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:a,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new L3(s,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){const n=this.getCurrRuleFullName(),r=H4(t,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let t=1;t<=this.maxLookahead;t++)i.push(this.LA(t));const a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:a,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new S3(s,this.LA(1),a))}},o5=class{static{o(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){const n=this.gastProductionsCache[t];if(Iz(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return R4([n],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){const e=AG(t.ruleStack),n=this.getGAstProductions()[e];return new C4(n,t).startWalking()}},l5={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(l5);var c5=Math.pow(2,8)-1,h5=p4({name:"RECORDING_PHASE_TOKEN",pattern:n4.NA});U2([h5]);var u5=m4(h5,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(u5);var d5={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}},p5=class{static{o(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++){const e=t>0?t:"";this[`CONSUME${e}`]=function(e,n){return this.consumeInternalRecord(e,t,n)},this[`SUBRULE${e}`]=function(e,n){return this.subruleInternalRecord(e,t,n)},this[`OPTION${e}`]=function(e){return this.optionInternalRecord(e,t)},this[`OR${e}`]=function(e){return this.orInternalRecord(e,t)},this[`MANY${e}`]=function(e){this.manyInternalRecord(t,e)},this[`MANY_SEP${e}`]=function(e){this.manySepFirstInternalRecord(t,e)},this[`AT_LEAST_ONE${e}`]=function(e){this.atLeastOneInternalRecord(t,e)},this[`AT_LEAST_ONE_SEP${e}`]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}}this.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},this.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(()=>{const t=this;for(let e=0;e<10;e++){const n=e>0?e:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}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,e){return()=>!0}LA_RECORD(t){return b5}topLevelRuleRecord(t,e){try{const n=new g1({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(e){throw t}throw t}}optionInternalRecord(t,e){return g5.call(this,m1,t,e)}atLeastOneInternalRecord(t,e){g5.call(this,y1,e,t)}atLeastOneSepFirstInternalRecord(t,e){g5.call(this,v1,e,t,true)}manyInternalRecord(t,e){g5.call(this,x1,e,t)}manySepFirstInternalRecord(t,e){g5.call(this,b1,e,t,true)}orInternalRecord(t,e){return f5.call(this,t,e)}subruleInternalRecord(t,e,n){if(y5(e),!t||!1===GG(t,"ruleName")){const n=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=R$(this.recordingProdStack),i=t.ruleName,a=new p1({idx:e,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?d5:l5}consumeInternalRecord(t,e,n){if(y5(e),!H2(t)){const n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=R$(this.recordingProdStack),i=new k1({idx:e,terminalType:t,label:null==n?void 0:n.LABEL});return r.definition.push(i),u5}};function g5(t,e,n,r=!1){y5(n);const i=R$(this.recordingProdStack),a=hv(e)?e:e.DEF,s=new t({definition:[],idx:n});return r&&(s.separator=e.SEP),GG(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),l5}function f5(t,e){y5(e);const n=R$(this.recordingProdStack),r=!1===Sb(t),i=!1===r?t:t.DEF,a=new w1({definition:[],idx:e,ignoreAmbiguities:r&&!0===t.IGNORE_AMBIGUITIES});GG(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);const s=Vq(i,(t=>hv(t.GATE)));return a.hasPredicates=s,n.definition.push(a),U$(i,(t=>{const e=new f1({definition:[]});a.definition.push(e),GG(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:GG(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()})),l5}function m5(t){return 0===t?"":`${t}`}function y5(t){if(t<0||t>c5){const e=new Error(`Invalid DSL Method idx value: <${t}>\n\tIdx value must be a none negative value smaller than ${c5+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}o(g5,"recordProd"),o(f5,"recordOrProd"),o(m5,"getIdxSuffix"),o(y5,"assertMethodIdxIsValid");var v5=class{static{o(this,"PerformanceTracer")}initPerformanceTracer(t){if(GG(t,"traceInitPerf")){const e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=T5.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=l1(e),a=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return e()}};function x5(t,e){e.forEach((e=>{const n=e.prototype;Object.getOwnPropertyNames(n).forEach((r=>{if("constructor"===r)return;const i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(t.prototype,r,i):t.prototype[r]=e.prototype[r]}))}))}o(x5,"applyMixins");var b5=m4(f4,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(b5);var w5,k5,T5=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:v4,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),_5=Object.freeze({recoveryValueFunc:o((()=>{}),"recoveryValueFunc"),resyncEnabled:!0});function E5(t){return function(){return t}}(k5=w5||(w5={}))[k5.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",k5[k5.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",k5[k5.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",k5[k5.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",k5[k5.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",k5[k5.LEFT_RECURSION=5]="LEFT_RECURSION",k5[k5.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",k5[k5.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",k5[k5.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",k5[k5.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",k5[k5.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",k5[k5.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",k5[k5.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",k5[k5.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",o(E5,"EMPTY_ALT");var C5=class t{static{o(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let e;this.selfAnalysisDone=!0;const n=this.className;this.TRACE_INIT("toFastProps",(()=>{c1(this)})),this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording(),U$(this.definedRulesNames,(t=>{const e=this[t].originalGrammarAction;let n;this.TRACE_INIT(`${t} Rule`,(()=>{n=this.topLevelRuleRecord(t,e)})),this.gastProductionsCache[t]=n}))}finally{this.disableRecording()}}));let r=[];if(this.TRACE_INIT("Grammar Resolving",(()=>{r=y3({rules:Lz(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)})),this.TRACE_INIT("Grammar Validations",(()=>{if(qA(r)&&!1===this.skipValidations){const t=v3({rules:Lz(this.gastProductionsCache),tokenTypes:Lz(this.tokensMap),errMsgProvider:b4,grammarName:n}),e=Q4({lookaheadStrategy:this.lookaheadStrategy,rules:Lz(this.gastProductionsCache),tokenTypes:Lz(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(t,e)}})),qA(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",(()=>{const t=$1(Lz(this.gastProductionsCache));this.resyncFollows=t})),this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var t,e;null===(e=(t=this.lookaheadStrategy).initialize)||void 0===e||e.call(t,{rules:Lz(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Lz(this.gastProductionsCache))}))),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!qA(this.definitionErrors))throw e=Ez(this.definitionErrors,(t=>t.message)),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}))}constructor(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(e),n.initLexerAdapter(),n.initLooksAhead(e),n.initRecognizerEngine(t,e),n.initRecoverable(e),n.initTreeBuilder(e),n.initContentAssist(),n.initGastRecorder(e),n.initPerformanceTracer(e),GG(e,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=GG(e,"skipValidations")?e.skipValidations:T5.skipValidations}};C5.DEFER_DEFINITION_ERRORS_HANDLING=!1,x5(C5,[R3,z3,n5,r5,a5,i5,s5,o5,p5,v5]);var S5=class extends C5{static{o(this,"EmbeddedActionsParser")}constructor(t,e=T5){const n=S$(e);n.outputCst=!1,super(t,n)}};function A5(t,e,n){return`${t.name}_${e}_${n}`}o(A5,"buildATNKey");var L5=class{static{o(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},N5=class extends L5{static{o(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},I5=class extends L5{static{o(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},M5=class extends L5{static{o(this,"RuleTransition")}constructor(t,e,n){super(t),this.rule=e,this.followState=n}isEpsilon(){return!0}};function R5(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};D5(e,t);const n=t.length;for(let r=0;rO5(t,e,n)));return H5(t,e,r,n,...i)}function U5(t,e,n){const r=t6(t,e,n,{type:1});W5(t,r);return Y5(t,e,n,H5(t,e,r,n,G5(t,e,n)))}function G5(t,e,n){const r=wz(Ez(n.definition,(n=>O5(t,e,n))),(t=>void 0!==t));return 1===r.length?r[0]:0===r.length?void 0:X5(t,r)}function q5(t,e,n,r,i){const a=r.left,s=r.right,o=t6(t,e,n,{type:11});W5(t,o);const l=t6(t,e,n,{type:12});return a.loopback=o,l.loopback=o,t.decisionMap[A5(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o,J5(s,o),void 0===i?(J5(o,a),J5(o,l)):(J5(o,l),J5(o,i.left),J5(i.right,a)),{left:a,right:l}}function j5(t,e,n,r,i){const a=r.left,s=r.right,o=t6(t,e,n,{type:10});W5(t,o);const l=t6(t,e,n,{type:12}),c=t6(t,e,n,{type:9});return o.loopback=c,l.loopback=c,J5(o,a),J5(o,l),J5(s,c),void 0!==i?(J5(c,l),J5(c,i.left),J5(i.right,a)):J5(c,o),t.decisionMap[A5(e,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o,{left:o,right:l}}function Y5(t,e,n,r){const i=r.left;return J5(i,r.right),t.decisionMap[A5(e,"Option",n.idx)]=i,r}function W5(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function H5(t,e,n,r,...i){const a=t6(t,e,r,{type:8,start:n});n.end=a;for(const t of i)void 0!==t?(J5(n,t.left),J5(t.right,a)):J5(n,a);const s={left:n,right:a};return t.decisionMap[A5(e,V5(r),r.idx)]=n,s}function V5(t){if(t instanceof w1)return"Alternation";if(t instanceof m1)return"Option";if(t instanceof x1)return"Repetition";if(t instanceof b1)return"RepetitionWithSeparator";if(t instanceof y1)return"RepetitionMandatory";if(t instanceof v1)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function X5(t,e){const n=e.length;for(let r=0;rt.alt))}get key(){let t="";for(const e in this.map)t+=e+":";return t}};function a6(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map((t=>t.stateNumber.toString())).join("_")}`}function s6(t,e){const n={};return r=>{const i=r.toString();let a=n[i];return void 0!==a||(a={atnStartState:t,decision:e,states:{}},n[i]=a),a}}o(a6,"getATNConfigKey"),o(s6,"createDFACache");var o6,l6,c6,h6,u6,d6,p6,g6,f6,m6,y6,v6,x6,b6,w6,k6,T6,_6,E6,C6,S6,A6,L6,N6,I6,M6,R6,D6,O6,P6,B6,$6,F6,z6,U6,G6,q6,j6,Y6,W6,H6,V6,X6,K6,Z6,Q6,J6,t7,e7,n7,r7,i7,a7,s7,o7,l7,c7,h7,u7,d7,p7,g7,f7,m7,y7,v7,x7,b7,w7,k7,T7,_7,E7,C7,S7,A7,L7,N7,I7,M7,R7,D7,O7,P7,B7,$7,F7,z7,U7,G7,q7,j7,Y7=class{static{o(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let t="";const e=this.predicates.length;for(let n=0;nconsole.log(t)}initialize(t){this.atn=R5(t.rules),this.dfas=X7(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){const{prodOccurrence:e,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,o=A5(n,"Alternation",e),l=this.atn.decisionMap[o].decision,c=Ez(P4({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:n}),(t=>Ez(t,(t=>t[0]))));if(V7(c,!1)&&!i){const t=oU(c,((t,e,n)=>(U$(e,(e=>{e&&(t[e.tokenTypeIdx]=n,U$(e.categoryMatches,(e=>{t[e]=n})))})),t)),{});return r?function(e){var n;const r=this.LA(1),i=t[r.tokenTypeIdx];if(void 0!==e&&void 0!==i){const t=null===(n=e[i])||void 0===n?void 0:n.GATE;if(void 0!==t&&!1===t.call(this))return}return i}:function(){const e=this.LA(1);return t[e.tokenTypeIdx]}}return r?function(t){const e=new Y7,n=void 0===t?0:t.length;for(let r=0;rEz(t,(t=>t[0]))));if(V7(c)&&c[0][0]&&!i){const t=c[0],e=Qz(t);if(1===e.length&&qA(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=oU(e,((t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,U$(e.categoryMatches,(e=>{t[e]=!0}))),t)),{});return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){const t=K7.call(this,a,l,W7,s);return"object"!=typeof t&&0===t}}};function V7(t,e=!0){const n=new Set;for(const r of t){const t=new Set;for(const i of r){if(void 0===i){if(e)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const e of r)if(n.has(e)){if(!t.has(e))return!1}else n.add(e),t.add(e)}}return!0}function X7(t){const e=t.decisionStates.length,n=Array(e);for(let r=0;rr4(t))).join(", "),n=0===t.production.idx?"":t.production.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${e8(t.production)}${n}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}function e8(t){if(t instanceof p1)return"SUBRULE";if(t instanceof m1)return"OPTION";if(t instanceof w1)return"OR";if(t instanceof y1)return"AT_LEAST_ONE";if(t instanceof v1)return"AT_LEAST_ONE_SEP";if(t instanceof b1)return"MANY_SEP";if(t instanceof x1)return"MANY";if(t instanceof k1)return"CONSUME";throw Error("non exhaustive match")}function n8(t,e,n){const r=NG(e.configs.elements,(t=>t.state.transitions)),i=tj(r.filter((t=>t instanceof N5)).map((t=>t.tokenType)),(t=>t.tokenTypeIdx));return{actualToken:n,possibleTokenTypes:i,tokenPath:t}}function r8(t,e){return t.edges[e.tokenTypeIdx]}function i8(t,e,n){const r=new i6,i=[];for(const a of t.elements){if(!1===n.is(a.alt))continue;if(7===a.state.type){i.push(a);continue}const t=a.state.transitions.length;for(let n=0;n0&&!p8(a))for(const t of i)a.add(t);return a}function a8(t,e){if(t instanceof N5&&y4(e,t.tokenType))return t.target}function s8(t,e){let n;for(const r of t.elements)if(!0===e.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}function o8(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function l8(t,e,n,r){return r=c8(t,r),e.edges[n.tokenTypeIdx]=r,r}function c8(t,e){if(e===r6)return e;const n=e.configs.key,r=t.states[n];return void 0!==r?r:(e.configs.finalize(),t.states[n]=e,e)}function h8(t){const e=new i6,n=t.transitions.length;for(let r=0;r0){const n=[...t.stack];u8({state:n.pop(),alt:t.alt,stack:n},e)}else e.add(t);return}n.epsilonOnlyTransitions||e.add(t);const r=n.transitions.length;for(let i=0;i1)return!0;return!1}function v8(t){for(const e of Array.from(t.values()))if(1===Object.keys(e).length)return!0;return!1}o(V7,"isLL1Sequence"),o(X7,"initATNSimulator"),o(K7,"adaptivePredict"),o(Z7,"performLookahead"),o(Q7,"computeLookaheadTarget"),o(J7,"reportLookaheadAmbiguity"),o(t8,"buildAmbiguityError"),o(e8,"getProductionDslName"),o(n8,"buildAdaptivePredictError"),o(r8,"getExistingTargetState"),o(i8,"computeReachSet"),o(a8,"getReachableTarget"),o(s8,"getUniqueAlt"),o(o8,"newDFAState"),o(l8,"addDFAEdge"),o(c8,"addDFAState"),o(h8,"computeStartState"),o(u8,"closure"),o(d8,"getEpsilonTarget"),o(p8,"hasConfigInRuleStopState"),o(g8,"allConfigsInRuleStopStates"),o(f8,"hasConflictTerminatingPrediction"),o(m8,"getConflictingAltSets"),o(y8,"hasConflictingAltSet"),o(v8,"hasStateAssociatedWithOneAlt"),function(t){function e(t){return"string"==typeof t}o(e,"is"),t.is=e}(o6||(o6={})),function(t){function e(t){return"string"==typeof t}o(e,"is"),t.is=e}(l6||(l6={})),function(t){function e(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,o(e,"is"),t.is=e}(c6||(c6={})),function(t){function e(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}t.MIN_VALUE=0,t.MAX_VALUE=2147483647,o(e,"is"),t.is=e}(h6||(h6={})),function(t){function e(t,e){return t===Number.MAX_VALUE&&(t=h6.MAX_VALUE),e===Number.MAX_VALUE&&(e=h6.MAX_VALUE),{line:t,character:e}}function n(t){let e=t;return x8.objectLiteral(e)&&x8.uinteger(e.line)&&x8.uinteger(e.character)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(u6||(u6={})),function(t){function e(t,e,n,r){if(x8.uinteger(t)&&x8.uinteger(e)&&x8.uinteger(n)&&x8.uinteger(r))return{start:u6.create(t,e),end:u6.create(n,r)};if(u6.is(t)&&u6.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${n}, ${r}]`)}function n(t){let e=t;return x8.objectLiteral(e)&&u6.is(e.start)&&u6.is(e.end)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(d6||(d6={})),function(t){function e(t,e){return{uri:t,range:e}}function n(t){let e=t;return x8.objectLiteral(e)&&d6.is(e.range)&&(x8.string(e.uri)||x8.undefined(e.uri))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(p6||(p6={})),function(t){function e(t,e,n,r){return{targetUri:t,targetRange:e,targetSelectionRange:n,originSelectionRange:r}}function n(t){let e=t;return x8.objectLiteral(e)&&d6.is(e.targetRange)&&x8.string(e.targetUri)&&d6.is(e.targetSelectionRange)&&(d6.is(e.originSelectionRange)||x8.undefined(e.originSelectionRange))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(g6||(g6={})),function(t){function e(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}}function n(t){const e=t;return x8.objectLiteral(e)&&x8.numberRange(e.red,0,1)&&x8.numberRange(e.green,0,1)&&x8.numberRange(e.blue,0,1)&&x8.numberRange(e.alpha,0,1)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(f6||(f6={})),function(t){function e(t,e){return{range:t,color:e}}function n(t){const e=t;return x8.objectLiteral(e)&&d6.is(e.range)&&f6.is(e.color)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(m6||(m6={})),function(t){function e(t,e,n){return{label:t,textEdit:e,additionalTextEdits:n}}function n(t){const e=t;return x8.objectLiteral(e)&&x8.string(e.label)&&(x8.undefined(e.textEdit)||L6.is(e))&&(x8.undefined(e.additionalTextEdits)||x8.typedArray(e.additionalTextEdits,L6.is))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(y6||(y6={})),(x6=v6||(v6={})).Comment="comment",x6.Imports="imports",x6.Region="region",function(t){function e(t,e,n,r,i,a){const s={startLine:t,endLine:e};return x8.defined(n)&&(s.startCharacter=n),x8.defined(r)&&(s.endCharacter=r),x8.defined(i)&&(s.kind=i),x8.defined(a)&&(s.collapsedText=a),s}function n(t){const e=t;return x8.objectLiteral(e)&&x8.uinteger(e.startLine)&&x8.uinteger(e.startLine)&&(x8.undefined(e.startCharacter)||x8.uinteger(e.startCharacter))&&(x8.undefined(e.endCharacter)||x8.uinteger(e.endCharacter))&&(x8.undefined(e.kind)||x8.string(e.kind))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(b6||(b6={})),function(t){function e(t,e){return{location:t,message:e}}function n(t){let e=t;return x8.defined(e)&&p6.is(e.location)&&x8.string(e.message)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(w6||(w6={})),(T6=k6||(k6={})).Error=1,T6.Warning=2,T6.Information=3,T6.Hint=4,(E6=_6||(_6={})).Unnecessary=1,E6.Deprecated=2,function(t){function e(t){const e=t;return x8.objectLiteral(e)&&x8.string(e.href)}o(e,"is"),t.is=e}(C6||(C6={})),function(t){function e(t,e,n,r,i,a){let s={range:t,message:e};return x8.defined(n)&&(s.severity=n),x8.defined(r)&&(s.code=r),x8.defined(i)&&(s.source=i),x8.defined(a)&&(s.relatedInformation=a),s}function n(t){var e;let n=t;return x8.defined(n)&&d6.is(n.range)&&x8.string(n.message)&&(x8.number(n.severity)||x8.undefined(n.severity))&&(x8.integer(n.code)||x8.string(n.code)||x8.undefined(n.code))&&(x8.undefined(n.codeDescription)||x8.string(null===(e=n.codeDescription)||void 0===e?void 0:e.href))&&(x8.string(n.source)||x8.undefined(n.source))&&(x8.undefined(n.relatedInformation)||x8.typedArray(n.relatedInformation,w6.is))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(S6||(S6={})),function(t){function e(t,e,...n){let r={title:t,command:e};return x8.defined(n)&&n.length>0&&(r.arguments=n),r}function n(t){let e=t;return x8.defined(e)&&x8.string(e.title)&&x8.string(e.command)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(A6||(A6={})),function(t){function e(t,e){return{range:t,newText:e}}function n(t,e){return{range:{start:t,end:t},newText:e}}function r(t){return{range:t,newText:""}}function i(t){const e=t;return x8.objectLiteral(e)&&x8.string(e.newText)&&d6.is(e.range)}o(e,"replace"),t.replace=e,o(n,"insert"),t.insert=n,o(r,"del"),t.del=r,o(i,"is"),t.is=i}(L6||(L6={})),function(t){function e(t,e,n){const r={label:t};return void 0!==e&&(r.needsConfirmation=e),void 0!==n&&(r.description=n),r}function n(t){const e=t;return x8.objectLiteral(e)&&x8.string(e.label)&&(x8.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(x8.string(e.description)||void 0===e.description)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(N6||(N6={})),function(t){function e(t){const e=t;return x8.string(e)}o(e,"is"),t.is=e}(I6||(I6={})),function(t){function e(t,e,n){return{range:t,newText:e,annotationId:n}}function n(t,e,n){return{range:{start:t,end:t},newText:e,annotationId:n}}function r(t,e){return{range:t,newText:"",annotationId:e}}function i(t){const e=t;return L6.is(e)&&(N6.is(e.annotationId)||I6.is(e.annotationId))}o(e,"replace"),t.replace=e,o(n,"insert"),t.insert=n,o(r,"del"),t.del=r,o(i,"is"),t.is=i}(M6||(M6={})),function(t){function e(t,e){return{textDocument:t,edits:e}}function n(t){let e=t;return x8.defined(e)&&z6.is(e.textDocument)&&Array.isArray(e.edits)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(R6||(R6={})),function(t){function e(t,e,n){let r={kind:"create",uri:t};return void 0===e||void 0===e.overwrite&&void 0===e.ignoreIfExists||(r.options=e),void 0!==n&&(r.annotationId=n),r}function n(t){let e=t;return e&&"create"===e.kind&&x8.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||x8.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||x8.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||I6.is(e.annotationId))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(D6||(D6={})),function(t){function e(t,e,n,r){let i={kind:"rename",oldUri:t,newUri:e};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i}function n(t){let e=t;return e&&"rename"===e.kind&&x8.string(e.oldUri)&&x8.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||x8.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||x8.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||I6.is(e.annotationId))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(O6||(O6={})),function(t){function e(t,e,n){let r={kind:"delete",uri:t};return void 0===e||void 0===e.recursive&&void 0===e.ignoreIfNotExists||(r.options=e),void 0!==n&&(r.annotationId=n),r}function n(t){let e=t;return e&&"delete"===e.kind&&x8.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||x8.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||x8.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||I6.is(e.annotationId))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(P6||(P6={})),function(t){function e(t){let e=t;return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every((t=>x8.string(t.kind)?D6.is(t)||O6.is(t)||P6.is(t):R6.is(t))))}o(e,"is"),t.is=e}(B6||(B6={})),function(t){function e(t){return{uri:t}}function n(t){let e=t;return x8.defined(e)&&x8.string(e.uri)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}($6||($6={})),function(t){function e(t,e){return{uri:t,version:e}}function n(t){let e=t;return x8.defined(e)&&x8.string(e.uri)&&x8.integer(e.version)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(F6||(F6={})),function(t){function e(t,e){return{uri:t,version:e}}function n(t){let e=t;return x8.defined(e)&&x8.string(e.uri)&&(null===e.version||x8.integer(e.version))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(z6||(z6={})),function(t){function e(t,e,n,r){return{uri:t,languageId:e,version:n,text:r}}function n(t){let e=t;return x8.defined(e)&&x8.string(e.uri)&&x8.string(e.languageId)&&x8.integer(e.version)&&x8.string(e.text)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(U6||(U6={})),function(t){function e(e){const n=e;return n===t.PlainText||n===t.Markdown}t.PlainText="plaintext",t.Markdown="markdown",o(e,"is"),t.is=e}(G6||(G6={})),function(t){function e(t){const e=t;return x8.objectLiteral(t)&&G6.is(e.kind)&&x8.string(e.value)}o(e,"is"),t.is=e}(q6||(q6={})),(Y6=j6||(j6={})).Text=1,Y6.Method=2,Y6.Function=3,Y6.Constructor=4,Y6.Field=5,Y6.Variable=6,Y6.Class=7,Y6.Interface=8,Y6.Module=9,Y6.Property=10,Y6.Unit=11,Y6.Value=12,Y6.Enum=13,Y6.Keyword=14,Y6.Snippet=15,Y6.Color=16,Y6.File=17,Y6.Reference=18,Y6.Folder=19,Y6.EnumMember=20,Y6.Constant=21,Y6.Struct=22,Y6.Event=23,Y6.Operator=24,Y6.TypeParameter=25,(H6=W6||(W6={})).PlainText=1,H6.Snippet=2,(V6||(V6={})).Deprecated=1,function(t){function e(t,e,n){return{newText:t,insert:e,replace:n}}function n(t){const e=t;return e&&x8.string(e.newText)&&d6.is(e.insert)&&d6.is(e.replace)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(X6||(X6={})),(Z6=K6||(K6={})).asIs=1,Z6.adjustIndentation=2,function(t){function e(t){const e=t;return e&&(x8.string(e.detail)||void 0===e.detail)&&(x8.string(e.description)||void 0===e.description)}o(e,"is"),t.is=e}(Q6||(Q6={})),function(t){function e(t){return{label:t}}o(e,"create"),t.create=e}(J6||(J6={})),function(t){function e(t,e){return{items:t||[],isIncomplete:!!e}}o(e,"create"),t.create=e}(t7||(t7={})),function(t){function e(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function n(t){const e=t;return x8.string(e)||x8.objectLiteral(e)&&x8.string(e.language)&&x8.string(e.value)}o(e,"fromPlainText"),t.fromPlainText=e,o(n,"is"),t.is=n}(e7||(e7={})),function(t){function e(t){let e=t;return!!e&&x8.objectLiteral(e)&&(q6.is(e.contents)||e7.is(e.contents)||x8.typedArray(e.contents,e7.is))&&(void 0===t.range||d6.is(t.range))}o(e,"is"),t.is=e}(n7||(n7={})),function(t){function e(t,e){return e?{label:t,documentation:e}:{label:t}}o(e,"create"),t.create=e}(r7||(r7={})),function(t){function e(t,e,...n){let r={label:t};return x8.defined(e)&&(r.documentation=e),x8.defined(n)?r.parameters=n:r.parameters=[],r}o(e,"create"),t.create=e}(i7||(i7={})),(s7=a7||(a7={})).Text=1,s7.Read=2,s7.Write=3,function(t){function e(t,e){let n={range:t};return x8.number(e)&&(n.kind=e),n}o(e,"create"),t.create=e}(o7||(o7={})),(c7=l7||(l7={})).File=1,c7.Module=2,c7.Namespace=3,c7.Package=4,c7.Class=5,c7.Method=6,c7.Property=7,c7.Field=8,c7.Constructor=9,c7.Enum=10,c7.Interface=11,c7.Function=12,c7.Variable=13,c7.Constant=14,c7.String=15,c7.Number=16,c7.Boolean=17,c7.Array=18,c7.Object=19,c7.Key=20,c7.Null=21,c7.EnumMember=22,c7.Struct=23,c7.Event=24,c7.Operator=25,c7.TypeParameter=26,(h7||(h7={})).Deprecated=1,function(t){function e(t,e,n,r,i){let a={name:t,kind:e,location:{uri:r,range:n}};return i&&(a.containerName=i),a}o(e,"create"),t.create=e}(u7||(u7={})),function(t){function e(t,e,n,r){return void 0!==r?{name:t,kind:e,location:{uri:n,range:r}}:{name:t,kind:e,location:{uri:n}}}o(e,"create"),t.create=e}(d7||(d7={})),function(t){function e(t,e,n,r,i,a){let s={name:t,detail:e,kind:n,range:r,selectionRange:i};return void 0!==a&&(s.children=a),s}function n(t){let e=t;return e&&x8.string(e.name)&&x8.number(e.kind)&&d6.is(e.range)&&d6.is(e.selectionRange)&&(void 0===e.detail||x8.string(e.detail))&&(void 0===e.deprecated||x8.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(p7||(p7={})),(f7=g7||(g7={})).Empty="",f7.QuickFix="quickfix",f7.Refactor="refactor",f7.RefactorExtract="refactor.extract",f7.RefactorInline="refactor.inline",f7.RefactorRewrite="refactor.rewrite",f7.Source="source",f7.SourceOrganizeImports="source.organizeImports",f7.SourceFixAll="source.fixAll",(y7=m7||(m7={})).Invoked=1,y7.Automatic=2,function(t){function e(t,e,n){let r={diagnostics:t};return null!=e&&(r.only=e),null!=n&&(r.triggerKind=n),r}function n(t){let e=t;return x8.defined(e)&&x8.typedArray(e.diagnostics,S6.is)&&(void 0===e.only||x8.typedArray(e.only,x8.string))&&(void 0===e.triggerKind||e.triggerKind===m7.Invoked||e.triggerKind===m7.Automatic)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(v7||(v7={})),function(t){function e(t,e,n){let r={title:t},i=!0;return"string"==typeof e?(i=!1,r.kind=e):A6.is(e)?r.command=e:r.edit=e,i&&void 0!==n&&(r.kind=n),r}function n(t){let e=t;return e&&x8.string(e.title)&&(void 0===e.diagnostics||x8.typedArray(e.diagnostics,S6.is))&&(void 0===e.kind||x8.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||A6.is(e.command))&&(void 0===e.isPreferred||x8.boolean(e.isPreferred))&&(void 0===e.edit||B6.is(e.edit))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(x7||(x7={})),function(t){function e(t,e){let n={range:t};return x8.defined(e)&&(n.data=e),n}function n(t){let e=t;return x8.defined(e)&&d6.is(e.range)&&(x8.undefined(e.command)||A6.is(e.command))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(b7||(b7={})),function(t){function e(t,e){return{tabSize:t,insertSpaces:e}}function n(t){let e=t;return x8.defined(e)&&x8.uinteger(e.tabSize)&&x8.boolean(e.insertSpaces)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(w7||(w7={})),function(t){function e(t,e,n){return{range:t,target:e,data:n}}function n(t){let e=t;return x8.defined(e)&&d6.is(e.range)&&(x8.undefined(e.target)||x8.string(e.target))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(k7||(k7={})),function(t){function e(t,e){return{range:t,parent:e}}function n(e){let n=e;return x8.objectLiteral(n)&&d6.is(n.range)&&(void 0===n.parent||t.is(n.parent))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(T7||(T7={})),(E7=_7||(_7={})).namespace="namespace",E7.type="type",E7.class="class",E7.enum="enum",E7.interface="interface",E7.struct="struct",E7.typeParameter="typeParameter",E7.parameter="parameter",E7.variable="variable",E7.property="property",E7.enumMember="enumMember",E7.event="event",E7.function="function",E7.method="method",E7.macro="macro",E7.keyword="keyword",E7.modifier="modifier",E7.comment="comment",E7.string="string",E7.number="number",E7.regexp="regexp",E7.operator="operator",E7.decorator="decorator",(S7=C7||(C7={})).declaration="declaration",S7.definition="definition",S7.readonly="readonly",S7.static="static",S7.deprecated="deprecated",S7.abstract="abstract",S7.async="async",S7.modification="modification",S7.documentation="documentation",S7.defaultLibrary="defaultLibrary",function(t){function e(t){const e=t;return x8.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}o(e,"is"),t.is=e}(A7||(A7={})),function(t){function e(t,e){return{range:t,text:e}}function n(t){const e=t;return null!=e&&d6.is(e.range)&&x8.string(e.text)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(L7||(L7={})),function(t){function e(t,e,n){return{range:t,variableName:e,caseSensitiveLookup:n}}function n(t){const e=t;return null!=e&&d6.is(e.range)&&x8.boolean(e.caseSensitiveLookup)&&(x8.string(e.variableName)||void 0===e.variableName)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(N7||(N7={})),function(t){function e(t,e){return{range:t,expression:e}}function n(t){const e=t;return null!=e&&d6.is(e.range)&&(x8.string(e.expression)||void 0===e.expression)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(I7||(I7={})),function(t){function e(t,e){return{frameId:t,stoppedLocation:e}}function n(t){const e=t;return x8.defined(e)&&d6.is(t.stoppedLocation)}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(M7||(M7={})),function(t){function e(t){return 1===t||2===t}t.Type=1,t.Parameter=2,o(e,"is"),t.is=e}(R7||(R7={})),function(t){function e(t){return{value:t}}function n(t){const e=t;return x8.objectLiteral(e)&&(void 0===e.tooltip||x8.string(e.tooltip)||q6.is(e.tooltip))&&(void 0===e.location||p6.is(e.location))&&(void 0===e.command||A6.is(e.command))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(D7||(D7={})),function(t){function e(t,e,n){const r={position:t,label:e};return void 0!==n&&(r.kind=n),r}function n(t){const e=t;return x8.objectLiteral(e)&&u6.is(e.position)&&(x8.string(e.label)||x8.typedArray(e.label,D7.is))&&(void 0===e.kind||R7.is(e.kind))&&void 0===e.textEdits||x8.typedArray(e.textEdits,L6.is)&&(void 0===e.tooltip||x8.string(e.tooltip)||q6.is(e.tooltip))&&(void 0===e.paddingLeft||x8.boolean(e.paddingLeft))&&(void 0===e.paddingRight||x8.boolean(e.paddingRight))}o(e,"create"),t.create=e,o(n,"is"),t.is=n}(O7||(O7={})),function(t){function e(t){return{kind:"snippet",value:t}}o(e,"createSnippet"),t.createSnippet=e}(P7||(P7={})),function(t){function e(t,e,n,r){return{insertText:t,filterText:e,range:n,command:r}}o(e,"create"),t.create=e}(B7||(B7={})),function(t){function e(t){return{items:t}}o(e,"create"),t.create=e}($7||($7={})),(z7=F7||(F7={})).Invoked=0,z7.Automatic=1,function(t){function e(t,e){return{range:t,text:e}}o(e,"create"),t.create=e}(U7||(U7={})),function(t){function e(t,e){return{triggerKind:t,selectedCompletionInfo:e}}o(e,"create"),t.create=e}(G7||(G7={})),function(t){function e(t){const e=t;return x8.objectLiteral(e)&&l6.is(e.uri)&&x8.string(e.name)}o(e,"is"),t.is=e}(q7||(q7={})),function(t){function e(t,e,n,r){return new b8(t,e,n,r)}function n(t){let e=t;return!!(x8.defined(e)&&x8.string(e.uri)&&(x8.undefined(e.languageId)||x8.string(e.languageId))&&x8.uinteger(e.lineCount)&&x8.func(e.getText)&&x8.func(e.positionAt)&&x8.func(e.offsetAt))}function r(t,e){let n=t.getText(),r=i(e,((t,e)=>{let n=t.range.start.line-e.range.start.line;return 0===n?t.range.start.character-e.range.start.character:n})),a=n.length;for(let e=r.length-1;e>=0;e--){let i=r[e],s=t.offsetAt(i.range.start),o=t.offsetAt(i.range.end);if(!(o<=a))throw new Error("Overlapping edit");n=n.substring(0,s)+i.newText+n.substring(o,n.length),a=s}return n}function i(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),a=t.slice(n);i(r,e),i(a,e);let s=0,o=0,l=0;for(;s0&&t.push(e.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),n=0,r=e.length;if(0===r)return u6.create(0,t);for(;nt?r=i:n=i+1}let i=n-1;return u6.create(i,t-e[i])}offsetAt(t){let e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;let n=e[t.line],r=t.line+1=0&&e.content.splice(n,1)}}construct(t){const e=this.current;"string"==typeof t.$type&&(this.current.astNode=t),t.$cstNode=e;const n=this.nodeStack.pop();0===(null==n?void 0:n.content.length)&&this.removeNode(n)}addHiddenTokens(t){for(const e of t){const t=new T8(e.startOffset,e.image.length,EZ(e),e.tokenType,!0);t.root=this.rootNode,this.addHiddenToken(this.rootNode,t)}}addHiddenToken(t,e){const{offset:n,end:r}=e;for(let i=0;is&&r=0;t--){const e=this.content[t];if(!e.hidden)return e}return this.content[this.content.length-1]}},E8=class t extends Array{static{o(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,e,...n){return this.addParents(n),super.splice(t,e,...n)}addParents(t){for(const e of t)e.container=this.parent}},C8=class extends _8{static{o(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text="",this._text=null!=t?t:""}},S8=Symbol("Datatype");function A8(t){return t.$type===S8}o(A8,"isDataTypeNode");var L8=o((t=>t.endsWith("​")?t:t+"​"),"withRuleSuffix"),N8=class{static{o(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.lexer=t.parser.Lexer;const e=this.lexer.definition;this.wrapper=new P8(e,Object.assign(Object.assign({},t.parser.ParserConfig),{errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},I8=class extends N8{static{o(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new w8,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){const n=t.fragment?void 0:U0(t)?S8:W0(t),r=this.wrapper.DEFINE_RULE(L8(t.name),this.startImplementation(n,e).bind(this));return t.entry&&(this.mainRule=r),r}parse(t){this.nodeBuilder.buildRootNode(t);const e=this.lexer.tokenize(t);this.wrapper.input=e.tokens;const n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(e.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:e.errors,parserErrors:this.wrapper.errors}}startImplementation(t,e){return n=>{if(!this.isRecording()){const e={$type:t};this.stack.push(e),t===S8&&(e.value="")}let r;try{r=e(n)}catch(t){r=void 0}return this.isRecording()||void 0!==r||(r=this.construct()),r}}consume(t,e,n){const r=this.wrapper.wrapConsume(t,e);if(!this.isRecording()&&this.isValidToken(r)){const t=this.nodeBuilder.buildLeafNode(r,n),{assignment:e,isCrossRef:i}=this.getAssignment(n),a=this.current;if(e){const a=gJ(n)?r.image:this.converter.convert(r.image,t);this.assign(e.operator,e.feature,a,t,i)}else if(A8(a)){let e=r.image;gJ(n)||(e=this.converter.convert(e,t).toString()),a.value+=e}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,n,r){let i;this.isRecording()||(i=this.nodeBuilder.buildCompositeNode(n));const a=this.wrapper.wrapSubrule(t,e,r);!this.isRecording()&&i&&i.length>0&&this.performSubruleAssignment(a,n,i)}performSubruleAssignment(t,e,n){const{assignment:r,isCrossRef:i}=this.getAssignment(e);if(r)this.assign(r.operator,r.feature,t,n,i);else if(!r){const e=this.current;if(A8(e))e.value+=t.toString();else if("object"==typeof t&&t){const n=t.$type,r=this.assignWithoutOverride(t,e);n&&(r.$type=n);const i=r;this.stack.pop(),this.stack.push(i)}}}action(t,e){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&e.feature&&e.operator){n=this.construct(!1);const t=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(t)}const r={$type:t};this.stack.pop(),this.stack.push(r),e.feature&&e.operator&&this.assign(e.operator,e.feature,n,n.$cstNode,!1)}}construct(t=!0){if(this.isRecording())return;const e=this.current;return PJ(e),this.nodeBuilder.construct(e),t&&this.stack.pop(),A8(e)?this.converter.convert(e.value,e.$cstNode):(HJ(this.astReflection,e),e)}getAssignment(t){if(!this.assignmentMap.has(t)){const e=BJ(t,iJ);this.assignmentMap.set(t,{assignment:e,isCrossRef:!!e&&lJ(e.terminal)})}return this.assignmentMap.get(t)}assign(t,e,n,r,i){const a=this.current;let s;switch(s=i&&"string"==typeof n?this.linker.buildReference(a,e,r,n):n,t){case"=":a[e]=s;break;case"?=":a[e]=!0;break;case"+=":Array.isArray(a[e])||(a[e]=[]),a[e].push(s)}}assignWithoutOverride(t,e){for(const[n,r]of Object.entries(e)){const e=t[n];void 0===e?t[n]=r:Array.isArray(e)&&Array.isArray(r)&&(r.push(...e),t[n]=r)}return t}get definitionErrors(){return this.wrapper.definitionErrors}},M8=class{static{o(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(t){return v4.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return v4.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return v4.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return v4.buildEarlyExitMessage(t)}},R8=class extends M8{static{o(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(":KW")?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${e.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}},D8=class extends N8{static{o(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){this.resetState();const e=this.lexer.tokenize(t);return this.tokens=e.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,e){const n=this.wrapper.DEFINE_RULE(L8(t.name),this.startImplementation(e).bind(this));return t.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(t){return e=>{const n=this.keepStackSize();try{t(e)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const t=this.elementStack.length;return this.stackSize=t,t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,n){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,n,r){this.before(n),this.wrapper.wrapSubrule(t,e,r),this.after(n)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){if(!this.isRecording()){const e=this.elementStack.lastIndexOf(t);e>=0&&this.elementStack.splice(e)}}get currIdx(){return this.wrapper.currIdx}},O8={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new R8},P8=class extends S5{static{o(this,"ChevrotainWrapper")}constructor(t,e){const n=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},O8),{lookaheadStrategy:n?new F3({maxLookahead:e.maxLookahead}):new H7}),e))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e){return this.RULE(t,e)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e)}wrapSubrule(t,e,n){return this.subrule(t,e,{ARGS:[n]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}};function B8(t,e,n){return $8({parser:e,tokens:n,rules:new Map,ruleNames:new Map},t),e}function $8(t,e){const n=_0(e,!1),r=yZ(e.rules).filter(PQ).filter((t=>n.has(t)));for(const e of r){const n=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});n.rules.set(e.name,t.parser.rule(e,F8(n,e.definition)))}}function F8(t,e,n=!1){let r;if(gJ(e))r=X8(t,e);else if(tJ(e))r=z8(t,e);else if(iJ(e))r=F8(t,e.terminal);else if(lJ(e))r=V8(t,e);else if(bJ(e))r=U8(t,e);else if(nJ(e))r=j8(t,e);else if(AJ(e))r=Y8(t,e);else if(dJ(e))r=W8(t,e);else{if(!hJ(e))throw new qZ(e.$cstNode,`Unexpected element type: ${e.$type}`);{const n=t.consume++;r=o((()=>t.parser.consume(n,f4,e)),"method")}}return K8(t,n?void 0:H8(e),r,e.cardinality)}function z8(t,e){const n=W0(e);return()=>t.parser.action(n,e)}function U8(t,e){const n=e.rule.ref;if(PQ(n)){const r=t.subrule++,i=e.arguments.length>0?G8(n,e.arguments):()=>({});return a=>t.parser.subrule(r,Z8(t,n),e,i(a))}if(WQ(n)){const r=t.consume++,i=J8(t,n.name);return()=>t.parser.consume(r,i,e)}if(!n)throw new qZ(e.$cstNode,`Undefined rule type: ${e.$type}`);jZ()}function G8(t,e){const n=e.map((t=>q8(t.value)));return e=>{const r={};for(let i=0;ie(t)||n(t)}if(gQ(t)){const e=q8(t.left),n=q8(t.right);return t=>e(t)&&n(t)}if(AQ(t)){const e=q8(t.value);return t=>!e(t)}if(DQ(t)){const e=t.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(dQ(t)){const e=Boolean(t.true);return()=>e}jZ()}function j8(t,e){if(1===e.elements.length)return F8(t,e.elements[0]);{const n=[];for(const r of e.elements){const e={ALT:F8(t,r,!0)},i=H8(r);i&&(e.GATE=q8(i)),n.push(e)}const r=t.or++;return e=>t.parser.alternatives(r,n.map((t=>{const n={ALT:o((()=>t.ALT(e)),"ALT")},r=t.GATE;return r&&(n.GATE=()=>r(e)),n})))}}function Y8(t,e){if(1===e.elements.length)return F8(t,e.elements[0]);const n=[];for(const r of e.elements){const e={ALT:F8(t,r,!0)},i=H8(r);i&&(e.GATE=q8(i)),n.push(e)}const r=t.or++,i=o(((t,e)=>`uGroup_${t}_${e.getRuleStack().join("-")}`),"idFunc"),a=o((e=>t.parser.alternatives(r,n.map(((n,a)=>{const s={ALT:o((()=>!0),"ALT")},l=t.parser;s.ALT=()=>{if(n.ALT(e),!l.isRecording()){const t=i(r,l);l.unorderedGroups.get(t)||l.unorderedGroups.set(t,[]);const e=l.unorderedGroups.get(t);void 0===(null==e?void 0:e[a])&&(e[a]=!0)}};const c=n.GATE;return s.GATE=c?()=>c(e):()=>{const t=l.unorderedGroups.get(i(r,l));return!(null==t?void 0:t[a])},s})))),"alternatives"),s=K8(t,H8(e),a,"*");return e=>{s(e),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(r,t.parser))}}function W8(t,e){const n=e.elements.map((e=>F8(t,e)));return t=>n.forEach((e=>e(t)))}function H8(t){if(dJ(t))return t.guardCondition}function V8(t,e,n=e.terminal){if(n){if(bJ(n)&&PQ(n.rule.ref)){const r=t.subrule++;return i=>t.parser.subrule(r,Z8(t,n.rule.ref),e,i)}if(bJ(n)&&WQ(n.rule.ref)){const r=t.consume++,i=J8(t,n.rule.ref.name);return()=>t.parser.consume(r,i,e)}if(gJ(n)){const r=t.consume++,i=J8(t,n.value);return()=>t.parser.consume(r,i,e)}throw new Error("Could not build cross reference parser")}{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const n=O0(e.type.ref),r=null==n?void 0:n.terminal;if(!r)throw new Error("Could not find name assignment for type: "+W0(e.type.ref));return V8(t,e,r)}}function X8(t,e){const n=t.consume++,r=t.tokens[e.value];if(!r)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(n,r,e)}function K8(t,e,n,r){const i=e&&q8(e);if(!r){if(i){const e=t.or++;return r=>t.parser.alternatives(e,[{ALT:o((()=>n(r)),"ALT"),GATE:o((()=>i(r)),"GATE")},{ALT:E5(),GATE:o((()=>!i(r)),"GATE")}])}return n}if("*"===r){const e=t.many++;return r=>t.parser.many(e,{DEF:o((()=>n(r)),"DEF"),GATE:i?()=>i(r):void 0})}if("+"===r){const e=t.many++;if(i){const r=t.or++;return a=>t.parser.alternatives(r,[{ALT:o((()=>t.parser.atLeastOne(e,{DEF:o((()=>n(a)),"DEF")})),"ALT"),GATE:o((()=>i(a)),"GATE")},{ALT:E5(),GATE:o((()=>!i(a)),"GATE")}])}return r=>t.parser.atLeastOne(e,{DEF:o((()=>n(r)),"DEF")})}if("?"===r){const e=t.optional++;return r=>t.parser.optional(e,{DEF:o((()=>n(r)),"DEF"),GATE:i?()=>i(r):void 0})}jZ()}function Z8(t,e){const n=Q8(t,e),r=t.rules.get(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function Q8(t,e){if(PQ(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let n=e,r=n.$container,i=e.$type;for(;!PQ(r);){if(dJ(r)||nJ(r)||AJ(r)){i=r.elements.indexOf(n).toString()+":"+i}n=r,r=r.$container}return i=r.name+":"+i,t.ruleNames.set(e,i),i}}function J8(t,e){const n=t.tokens[e];if(!n)throw new Error(`Token "${e}" not found."`);return n}function t9(t){const e=t.Grammar,n=t.parser.Lexer,r=new D8(t);return B8(e,r,n.definition),r.finalize(),r}function e9(t){const e=n9(t);return e.finalize(),e}function n9(t){const e=t.Grammar,n=t.parser.Lexer;return B8(e,new I8(t),n.definition)}o(B8,"createParser"),o($8,"buildRules"),o(F8,"buildElement"),o(z8,"buildAction"),o(U8,"buildRuleCall"),o(G8,"buildRuleCallPredicate"),o(q8,"buildPredicate"),o(j8,"buildAlternatives"),o(Y8,"buildUnorderedGroup"),o(W8,"buildGroup"),o(H8,"getGuardCondition"),o(V8,"buildCrossReference"),o(X8,"buildKeyword"),o(K8,"wrap"),o(Z8,"getRule"),o(Q8,"getRuleName"),o(J8,"getToken"),o(t9,"createCompletionParser"),o(e9,"createLangiumParser"),o(n9,"prepareLangiumParser");var r9,i9=class{static{o(this,"DefaultTokenBuilder")}buildTokens(t,e){const n=yZ(_0(t,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,e);return r.forEach((t=>{const e=t.PATTERN;"object"==typeof e&&e&&"test"in e&&y0(e)?i.unshift(t):i.push(t)})),i}buildTerminalTokens(t){return t.filter(WQ).filter((t=>!t.fragment)).map((t=>this.buildTerminalToken(t))).toArray()}buildTerminalToken(t){const e=X0(t),n=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,r={name:t.name,PATTERN:n,LINE_BREAKS:!0};return t.hidden&&(r.GROUP=y0(e)?n4.SKIPPED:"hidden"),r}requiresCustomPattern(t){return!!t.flags.includes("u")||!(!t.source.includes("?<=")&&!t.source.includes("?{e.lastIndex=n;return e.exec(t)}}buildKeywordTokens(t,e,n){return t.filter(PQ).flatMap((t=>GJ(t).filter(gJ))).distinct((t=>t.value)).toArray().sort(((t,e)=>e.value.length-t.value.length)).map((t=>this.buildKeywordToken(t,e,Boolean(null==n?void 0:n.caseInsensitive))))}buildKeywordToken(t,e,n){return{name:t.value,PATTERN:this.buildKeywordPattern(t,n),LONGER_ALT:this.findLongerAlt(t,e)}}buildKeywordPattern(t,e){return e?new RegExp(x0(t.value)):t.value}findLongerAlt(t,e){return e.reduce(((e,n)=>{const r=null==n?void 0:n.PATTERN;return(null==r?void 0:r.source)&&b0("^"+r.source+"$",t.value)&&e.push(n),e}),[])}},a9=class{static{o(this,"DefaultValueConverter")}convert(t,e){let n=e.grammarSource;if(lJ(n)&&(n=C0(n)),bJ(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,t,e)}return t}runConverter(t,e,n){var r;switch(t.name.toUpperCase()){case"INT":return r9.convertInt(e);case"STRING":return r9.convertString(e);case"ID":return r9.convertID(e)}switch(null===(r=V0(t))||void 0===r?void 0:r.toLowerCase()){case"number":return r9.convertNumber(e);case"boolean":return r9.convertBoolean(e);case"bigint":return r9.convertBigint(e);case"date":return r9.convertDate(e);default:return e}}};!function(t){function e(t){let e="";for(let r=1;r{"undefined"==typeof setImmediate?setTimeout(t,0):setImmediate(t)}))}d(s9,p(eZ(),1)),o(o9,"delayNextTick");var l9=0,c9=10;function h9(){return l9=Date.now(),new s9.CancellationTokenSource}function u9(t){c9=t}o(h9,"startCancelableOperation"),o(u9,"setInterruptionPeriod");var d9=Symbol("OperationCancelled");function p9(t){return t===d9}async function g9(t){if(t===s9.CancellationToken.None)return;const e=Date.now();if(e-l9>=c9&&(l9=e,await o9()),t.isCancellationRequested)throw d9}o(p9,"isOperationCancelled"),o(g9,"interruptAndCheck");var f9,m9,y9=class{static{o(this,"Deferred")}constructor(){this.promise=new Promise(((t,e)=>{this.resolve=e=>(t(e),this),this.reject=t=>(e(t),this)}))}},v9=class t{static{o(this,"FullTextDocument")}constructor(t,e,n,r){this._uri=t,this._languageId=e,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const e=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(e,n)}return this._content}update(e,n){for(const n of e)if(t.isIncremental(n)){const t=k9(n.range),e=this.offsetAt(t.start),r=this.offsetAt(t.end);this._content=this._content.substring(0,e)+n.text+this._content.substring(r,this._content.length);const i=Math.max(t.start.line,0),a=Math.max(t.end.line,0);let s=this._lineOffsets;const o=b9(n.text,!1,e);if(a-i===o.length)for(let t=0,e=o.length;tt?r=i:n=i+1}const i=n-1;return{line:i,character:(t=this.ensureBeforeEOL(t,e[i]))-e[i]}}offsetAt(t){const e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;const n=e[t.line];if(t.character<=0)return n;const r=t.line+1e&&w9(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){const e=t;return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(t){const e=t;return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}};function x9(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);x9(r,e),x9(i,e);let a=0,s=0,o=0;for(;an.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function T9(t){const e=k9(t.range);return e!==t.range?{newText:t.newText,range:e}:t}!function(t){function e(t,e,n,r){return new v9(t,e,n,r)}function n(t,e,n){if(t instanceof v9)return t.update(e,n),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(t,e){const n=t.getText(),r=x9(e.map(T9),((t,e)=>{const n=t.range.start.line-e.range.start.line;return 0===n?t.range.start.character-e.range.start.character:n}));let i=0;const a=[];for(const e of r){const r=t.offsetAt(e.range.start);if(ri&&a.push(n.substring(i,r)),e.newText.length&&a.push(e.newText),i=t.offsetAt(e.range.end)}return a.push(n.substr(i)),a.join("")}o(e,"create"),t.create=e,o(n,"update"),t.update=n,o(r,"applyEdits"),t.applyEdits=r}(f9||(f9={})),o(x9,"mergeSort"),o(b9,"computeLineOffsets"),o(w9,"isEOL"),o(k9,"getWellformedRange"),o(T9,"getWellformedEdit"),(()=>{var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var n,r="",i=0,a=-1,s=0,o=0;o<=t.length;++o){if(o2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),a=o,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=o,s=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(a+1,o):r=t.slice(a+1,o),i=o-a-1;a=o,s=0}else 46===n&&-1!==s?++s:s=-1}return r}o(e,"e"),o(n,"r");var r={resolve:o((function(){for(var t,r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(r=s+"/"+r,i=47===s.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."}),"resolve"),normalize:o((function(t){if(e(t),0===t.length)return".";var r=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t="."),t.length>0&&i&&(t+="/"),r?"/"+t:t}),"normalize"),isAbsolute:o((function(t){return e(t),t.length>0&&47===t.charCodeAt(0)}),"isAbsolute"),join:o((function(){if(0===arguments.length)return".";for(var t,n=0;n0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":r.normalize(t)}),"join"),relative:o((function(t,n){if(e(t),e(n),t===n)return"";if((t=r.resolve(t))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(o+u))return n.slice(o+u+1);if(0===u)return n.slice(o+u)}else s>c&&(47===t.charCodeAt(i+u)?h=u:0===u&&(h=0));break}var d=t.charCodeAt(i+u);if(d!==n.charCodeAt(o+u))break;47===d&&(h=u)}var p="";for(u=i+h+1;u<=a;++u)u!==a&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(o+h):(o+=h,47===n.charCodeAt(o)&&++o,n.slice(o))}),"relative"),_makeLong:o((function(t){return t}),"_makeLong"),dirname:o((function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,i=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(n=t.charCodeAt(s))){if(!a){i=s;break}}else a=!1;return-1===i?r?"/":".":r&&1===i?"//":t.slice(0,i)}),"dirname"),basename:o((function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var r,i=0,a=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var o=n.length-1,l=-1;for(r=t.length-1;r>=0;--r){var c=t.charCodeAt(r);if(47===c){if(!s){i=r+1;break}}else-1===l&&(s=!1,l=r+1),o>=0&&(c===n.charCodeAt(o)?-1==--o&&(a=r):(o=-1,a=l))}return i===a?a=l:-1===a&&(a=t.length),t.slice(i,a)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!s){i=r+1;break}}else-1===a&&(s=!1,a=r+1);return-1===a?"":t.slice(i,a)}),"basename"),extname:o((function(t){e(t);for(var n=-1,r=0,i=-1,a=!0,s=0,o=t.length-1;o>=0;--o){var l=t.charCodeAt(o);if(47!==l)-1===i&&(a=!1,i=o+1),46===l?-1===n?n=o:1!==s&&(s=1):-1!==n&&(s=-1);else if(!a){r=o+1;break}}return-1===n||-1===i||0===s||1===s&&n===i-1&&n===r+1?"":t.slice(n,i)}),"extname"),format:o((function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return n=(e=t).dir||e.root,r=e.base||(e.name||"")+(e.ext||""),n?n===e.root?n+r:n+"/"+r:r;var e,n,r}),"format"),parse:o((function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var r,i=t.charCodeAt(0),a=47===i;a?(n.root="/",r=1):r=0;for(var s=-1,o=0,l=-1,c=!0,h=t.length-1,u=0;h>=r;--h)if(47!==(i=t.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===i?-1===s?s=h:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){o=h+1;break}return-1===s||-1===l||0===u||1===u&&s===l-1&&s===o+1?-1!==l&&(n.base=n.name=0===o&&a?t.slice(1,l):t.slice(o,l)):(0===o&&a?(n.name=t.slice(1,s),n.base=t.slice(1,l)):(n.name=t.slice(o,s),n.base=t.slice(o,l)),n.ext=t.slice(s,l)),o>0?n.dir=t.slice(0,o-1):a&&(n.dir="/"),n}),"parse"),sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}o(n,"r"),n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{let t;if(n.r(r),n.d(r,{URI:o((()=>u),"URI"),Utils:o((()=>E),"Utils")}),"object"==typeof process)t="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;t=e.indexOf("Windows")>=0}const e=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function s(t,n){if(!t.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!e.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!i.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}o(s,"s");const l="",c="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static{o(this,"f")}static isUri(t){return t instanceof u||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,n,r,i,a=!1){"object"==typeof t?(this.scheme=t.scheme||l,this.authority=t.authority||l,this.path=t.path||l,this.query=t.query||l,this.fragment=t.fragment||l):(this.scheme=function(t,e){return t||e?t:"file"}(t,a),this.authority=e||l,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==c&&(e=c+e):e=c}return e}(this.scheme,n||l),this.query=r||l,this.fragment=i||l,s(this,a))}get fsPath(){return y(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:n,path:r,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=l),void 0===n?n=this.authority:null===n&&(n=l),void 0===r?r=this.path:null===r&&(r=l),void 0===i?i=this.query:null===i&&(i=l),void 0===a?a=this.fragment:null===a&&(a=l),e===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new p(e,n,r,i,a)}static parse(t,e=!1){const n=h.exec(t);return n?new p(n[2]||l,w(n[4]||l),w(n[5]||l),w(n[7]||l),w(n[9]||l),e):new p(l,l,l,l,l)}static file(e){let n=l;if(t&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const t=e.indexOf(c,2);-1===t?(n=e.substring(2),e=c):(n=e.substring(2,t),e=e.substring(t)||c)}return new p("file",n,e,l,l)}static from(t){const e=new p(t.scheme,t.authority,t.path,t.query,t.fragment);return s(e,!0),e}toString(t=!1){return v(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof u)return t;{const e=new p(t);return e._formatted=t.external,e._fsPath=t._sep===d?t.fsPath:null,e}}return t}}const d=t?1:void 0;class p extends u{static{o(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(t=!1){return t?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=d),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(t,e,n){let r,i=-1;for(let a=0;a=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==i&&(r+=encodeURIComponent(t.substring(i,a)),i=-1),void 0!==r&&(r+=t.charAt(a));else{void 0===r&&(r=t.substr(0,a));const e=g[s];void 0!==e?(-1!==i&&(r+=encodeURIComponent(t.substring(i,a)),i=-1),r+=e):-1===i&&(i=a)}}return-1!==i&&(r+=encodeURIComponent(t.substring(i))),void 0!==r?r:t}function m(t){let e;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?n?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,t&&(r=r.replace(/\//g,"\\")),r}function v(t,e){const n=e?m:f;let r="",{scheme:i,authority:a,path:s,query:o,fragment:l}=t;if(i&&(r+=i,r+=":"),(a||"file"===i)&&(r+=c,r+=c),a){let t=a.indexOf("@");if(-1!==t){const e=a.substr(0,t);a=a.substr(t+1),t=e.lastIndexOf(":"),-1===t?r+=n(e,!1,!1):(r+=n(e.substr(0,t),!1,!1),r+=":",r+=n(e.substr(t+1),!1,!0)),r+="@"}a=a.toLowerCase(),t=a.lastIndexOf(":"),-1===t?r+=n(a,!1,!0):(r+=n(a.substr(0,t),!1,!0),r+=a.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=e?l:f(l,!1,!1)),r}function x(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+x(t.substr(3)):t}}o(f,"d"),o(m,"p"),o(y,"m"),o(v,"y"),o(x,"v");const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(b)?t.replace(b,(t=>x(t))):t}o(w,"C");var k=n(470);const T=k.posix||k,_="/";var E;!function(t){t.joinPath=function(t,...e){return t.with({path:T.join(t.path,...e)})},t.resolvePath=function(t,...e){let n=t.path,r=!1;n[0]!==_&&(n=_+n,r=!0);let i=T.resolve(n,...e);return r&&i[0]===_&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===_)return t;let e=T.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return T.basename(t.path)},t.extname=function(t){return T.extname(t.path)}}(E||(E={}))})(),m9=r})();var _9,E9,C9,{URI:S9,Utils:A9}=m9;!function(t){function e(t,e){return(null==t?void 0:t.toString())===(null==e?void 0:e.toString())}function n(t,e){const n="string"==typeof t?t:t.path,r="string"==typeof e?e:e.path,i=n.split("/").filter((t=>t.length>0)),a=r.split("/").filter((t=>t.length>0));let s=0;for(;snull!=r?r:r=f9.create(t.toString(),n.getServices(t).LanguageMetaData.languageId,0,null!=e?e:"")}},N9=class{static{o(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory}get all(){return yZ(this.documentMap.values())}addDocument(t){const e=t.uri.toString();if(this.documentMap.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentMap.set(e,t)}getDocument(t){const e=t.toString();return this.documentMap.get(e)}async getOrCreateDocument(t,e){let n=this.getDocument(t);return n||(n=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(n),n)}createDocument(t,e,n){if(n)return this.langiumDocumentFactory.fromString(e,t,n).then((t=>(this.addDocument(t),t)));{const n=this.langiumDocumentFactory.fromString(e,t);return this.addDocument(n),n}}hasDocument(t){return this.documentMap.has(t.toString())}invalidateDocument(t){const e=t.toString(),n=this.documentMap.get(e);return n&&(n.state=E9.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(t){const e=t.toString(),n=this.documentMap.get(e);return n&&(n.state=E9.Changed,this.documentMap.delete(e)),n}},I9=class{static{o(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator}async link(t,e=s9.CancellationToken.None){for(const n of qJ(t.parseResult.value))await g9(e),YJ(n).forEach((e=>this.doLink(e,t)))}doLink(t,e){const n=t.reference;if(void 0===n._ref)try{const e=this.getCandidate(t);if(oZ(e))n._ref=e;else if(n._nodeDescription=e,this.langiumDocuments().hasDocument(e.documentUri)){const r=this.loadAstNode(e);n._ref=null!=r?r:this.createLinkingError(t,e)}}catch(e){n._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${n.$refText}': ${e}`})}e.references.push(n)}unlink(t){for(const e of t.references)delete e._ref,delete e._nodeDescription;t.references=[]}getCandidate(t){const e=this.scopeProvider.getScope(t).getElement(t.reference.$refText);return null!=e?e:this.createLinkingError(t)}buildReference(t,e,n,r){const i=this,a={$refNode:n,$refText:r,get ref(){var n;if(iZ(this._ref))return this._ref;if(sZ(this._nodeDescription)){const n=i.loadAstNode(this._nodeDescription);this._ref=null!=n?n:i.createLinkingError({reference:a,container:t,property:e},this._nodeDescription)}else if(void 0===this._ref){const r=i.getLinkedNode({reference:a,container:t,property:e});if(r.error&&FJ(t).state=t.end)return e.ref}if(n){const e=this.nameProvider.getNameNode(n);if(e&&(e===t||_Z(t,e)))return n}}}findDeclarationNode(t){const e=this.findDeclaration(t);if(null==e?void 0:e.$cstNode){const t=this.nameProvider.getNameNode(e);return null!=t?t:e.$cstNode}}findReferences(t,e){const n=[];if(e.includeDeclaration){const e=this.getReferenceToSelf(t);e&&n.push(e)}let r=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(r=r.filter((t=>_9.equals(t.sourceUri,e.documentUri)))),n.push(...r),yZ(n)}getReferenceToSelf(t){const e=this.nameProvider.getNameNode(t);if(e){const n=FJ(t),r=this.nodeLocator.getAstNodePath(t);return{sourceUri:n.uri,sourcePath:r,targetUri:n.uri,targetPath:r,segment:CZ(e),local:!0}}}},O9=class{static{o(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(const[e,n]of t)this.add(e,n)}get size(){return vZ.sum(yZ(this.map.values()).map((t=>t.length)))}clear(){this.map.clear()}delete(t,e){if(void 0===e)return this.map.delete(t);{const n=this.map.get(t);if(n){const r=n.indexOf(e);if(r>=0)return 1===n.length?this.map.delete(t):n.splice(r,1),!0}return!1}}get(t){var e;return null!==(e=this.map.get(t))&&void 0!==e?e:[]}has(t,e){if(void 0===e)return this.map.has(t);{const n=this.map.get(t);return!!n&&n.indexOf(e)>=0}}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(t){this.map.forEach(((e,n)=>e.forEach((e=>t(e,n,this)))))}[Symbol.iterator](){return this.entries().iterator()}entries(){return yZ(this.map.entries()).flatMap((([t,e])=>e.map((e=>[t,e]))))}keys(){return yZ(this.map.keys())}values(){return yZ(this.map.values()).flat()}entriesGroupedByKey(){return yZ(this.map.entries())}},P9=class{static{o(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(const[e,n]of t)this.set(e,n)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){const e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}},B9=class{static{o(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=s9.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,n=UJ,r=s9.CancellationToken.None){const i=[];this.exportNode(t,i,e);for(const a of n(t))await g9(r),this.exportNode(a,i,e);return i}exportNode(t,e,n){const r=this.nameProvider.getName(t);r&&e.push(this.descriptions.createDescription(t,r,n))}async computeLocalScopes(t,e=s9.CancellationToken.None){const n=t.parseResult.value,r=new O9;for(const i of GJ(n))await g9(e),this.processNode(i,t,r);return r}processNode(t,e,n){const r=t.$container;if(r){const i=this.nameProvider.getName(t);i&&n.add(r,this.descriptions.createDescription(t,i,e))}}},$9=class{static{o(this,"StreamScope")}constructor(t,e,n){var r;this.elements=t,this.outerScope=e,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){const e=this.caseInsensitive?this.elements.find((e=>e.name.toLowerCase()===t.toLowerCase())):this.elements.find((e=>e.name===t));return e||(this.outerScope?this.outerScope.getElement(t):void 0)}},F9=class{static{o(this,"MapScope")}constructor(t,e,n){var r;this.elements=new Map,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r;for(const e of t){const t=this.caseInsensitive?e.name.toLowerCase():e.name;this.elements.set(t,e)}this.outerScope=e}getElement(t){const e=this.caseInsensitive?t.toLowerCase():t,n=this.elements.get(e);return n||(this.outerScope?this.outerScope.getElement(t):void 0)}getAllElements(){let t=yZ(this.elements.values());return this.outerScope&&(t=t.concat(this.outerScope.getAllElements())),t}},z9={getElement(){},getAllElements:()=>fZ},U9=class{static{o(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")}},G9=class extends U9{static{o(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){if(this.throwIfDisposed(),this.cache.has(t))return this.cache.get(t);if(e){const n=e();return this.cache.set(t,n),n}}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},q9=class extends U9{static{o(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=null!=t?t:t=>t}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,n){this.throwIfDisposed(),this.cacheForContext(t).set(e,n)}get(t,e,n){this.throwIfDisposed();const r=this.cacheForContext(t);if(r.has(e))return r.get(e);if(n){const t=n();return r.set(e,t),t}}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){if(this.throwIfDisposed(),t){const e=this.converter(t);this.cache.delete(e)}else this.cache.clear()}cacheForContext(t){const e=this.converter(t);let n=this.cache.get(e);return n||(n=new Map,this.cache.set(e,n)),n}},j9=class extends q9{static{o(this,"DocumentCache")}constructor(t){super((t=>t.toString())),this.onDispose(t.workspace.DocumentBuilder.onUpdate(((t,e)=>{const n=t.concat(e);for(const t of n)this.clear(t)})))}},Y9=class extends G9{static{o(this,"WorkspaceCache")}constructor(t){super(),this.onDispose(t.workspace.DocumentBuilder.onUpdate((()=>{this.clear()})))}},W9=class{static{o(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 Y9(t.shared)}getScope(t){const e=[],n=this.reflection.getReferenceType(t),r=FJ(t.container).precomputedScopes;if(r){let i=t.container;do{const t=r.get(i);t.length>0&&e.push(yZ(t).filter((t=>this.reflection.isSubtype(t.type,n)))),i=i.$container}while(i)}let i=this.getGlobalScope(n,t);for(let t=e.length-1;t>=0;t--)i=this.createScope(e[t],i);return i}createScope(t,e,n){return new $9(yZ(t),e,n)}createScopeForNodes(t,e,n){const r=yZ(t).map((t=>{const e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)})).nonNullable();return new $9(r,e,n)}getGlobalScope(t,e){return this.globalScopeCache.get(t,(()=>new F9(this.indexManager.allElements(t))))}};function H9(t){return"string"==typeof t.$comment}function V9(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}o(H9,"isAstNodeWithComment"),o(V9,"isIntermediateReference");var X9,K9=class{static{o(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e={}){const n=null==e?void 0:e.replacer,r=o(((t,n)=>this.replacer(t,n,e)),"defaultReplacer"),i=n?(t,e)=>n(t,e,r):r;try{return this.currentDocument=FJ(t),JSON.stringify(t,i,null==e?void 0:e.space)}finally{this.currentDocument=void 0}}deserialize(t,e={}){const n=JSON.parse(t);return this.linkNode(n,n,e),n}replacer(t,e,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:s}){var o,l,c,h;if(!this.ignoreProperties.has(t)){if(aZ(e)){const t=e.ref,r=n?e.$refText:void 0;if(t){const n=FJ(t);let i="";this.currentDocument&&this.currentDocument!==n&&(i=s?s(n.uri,e):n.uri.toString());return{$ref:`${i}#${this.astNodeLocator.getAstNodePath(t)}`,$refText:r}}return{$error:null!==(l=null===(o=e.error)||void 0===o?void 0:o.message)&&void 0!==l?l:"Could not resolve reference",$refText:r}}if(iZ(e)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},e)),t&&!e.$document||!(null==n?void 0:n.$textRegion)||(n.$textRegion.documentURI=null===(c=this.currentDocument)||void 0===c?void 0:c.uri.toString())),r&&!t&&(null!=n||(n=Object.assign({},e)),n.$sourceText=null===(h=e.$cstNode)||void 0===h?void 0:h.text),a){null!=n||(n=Object.assign({},e));const t=this.commentProvider.getComment(e);t&&(n.$comment=t.replace(/\r/g,""))}return null!=n?n:e}return e}}addAstNodeRegionWithAssignmentsTo(t){const e=o((t=>({offset:t.offset,end:t.end,length:t.length,range:t.range})),"createDocumentSegment");if(t.$cstNode){const n=(t.$textRegion=e(t.$cstNode)).assignments={};return Object.keys(t).filter((t=>!t.startsWith("$"))).forEach((r=>{const i=A0(t.$cstNode,r).map(e);0!==i.length&&(n[r]=i)})),t}}linkNode(t,e,n,r,i,a){for(const[r,i]of Object.entries(t))if(Array.isArray(i))for(let a=0;a{try{await t.call(e,n,r,i)}catch(t){if(p9(t))throw t;console.error("An error occurred during validation:",t);const e=t instanceof Error?t.message:String(t);t instanceof Error&&t.stack&&console.error(t.stack),r("error","An error occurred during validation: "+e,{node:n})}}}addEntry(t,e){if("AstNode"!==t)for(const n of this.reflection.getAllSubTypes(t))this.entries.add(n,e);else this.entries.add("AstNode",e)}getChecks(t,e){let n=yZ(this.entries.get(t)).concat(this.entries.get("AstNode"));return e&&(n=n.filter((t=>e.includes(t.category)))),n.map((t=>t.check))}},ntt=class{static{o(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},n=s9.CancellationToken.None){const r=t.parseResult,i=[];if(await g9(n),!e.categories||e.categories.includes("built-in")){if(this.processLexingErrors(r,i,e),e.stopAfterLexingErrors&&i.some((t=>{var e;return(null===(e=t.data)||void 0===e?void 0:e.code)===J9.LexingError})))return i;if(this.processParsingErrors(r,i,e),e.stopAfterParsingErrors&&i.some((t=>{var e;return(null===(e=t.data)||void 0===e?void 0:e.code)===J9.ParsingError})))return i;if(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some((t=>{var e;return(null===(e=t.data)||void 0===e?void 0:e.code)===J9.LinkingError})))return i}try{i.push(...await this.validateAst(r.value,e,n))}catch(t){if(p9(t))throw t;console.error("An error occurred during validation:",t)}return await g9(n),i}processLexingErrors(t,e,n){for(const n of t.lexerErrors){const t={severity:itt("error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:Q9(J9.LexingError),source:this.getSource()};e.push(t)}}processParsingErrors(t,e,n){for(const n of t.parserErrors){let t;if(isNaN(n.token.startOffset)){if("previousToken"in n){const e=n.previousToken;if(isNaN(e.startOffset)){const e={line:0,character:0};t={start:e,end:e}}else{const n={line:e.endLine-1,character:e.endColumn};t={start:n,end:n}}}}else t=EZ(n.token);if(t){const r={severity:itt("error"),range:t,message:n.message,data:Q9(J9.ParsingError),source:this.getSource()};e.push(r)}}}processLinkingErrors(t,e,n){for(const n of t.references){const t=n.error;if(t){const n={node:t.container,property:t.property,index:t.index,data:{code:J9.LinkingError,containerType:t.container.$type,property:t.property,refText:t.reference.$refText}};e.push(this.toDiagnostic("error",t.message,n))}}}async validateAst(t,e,n=s9.CancellationToken.None){const r=[],i=o(((t,e,n)=>{r.push(this.toDiagnostic(t,e,n))}),"acceptor");return await Promise.all(qJ(t).map((async t=>{await g9(n);const r=this.validationRegistry.getChecks(t.$type,e.categories);for(const e of r)await e(t,i,n)}))),r}toDiagnostic(t,e,n){return{message:e,range:rtt(n),severity:itt(t),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function rtt(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=L0(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=M0(t.node.$cstNode,t.keyword,t.index)),null!=e||(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function itt(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}o(rtt,"getDiagnosticRange"),o(itt,"toDiagnosticSeverity"),(ttt=J9||(J9={})).LexingError="lexing-error",ttt.ParsingError="parsing-error",ttt.LinkingError="linking-error";var att,stt=class{static{o(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(t,e,n=FJ(t)){null!=e||(e=this.nameProvider.getName(t));const r=this.astNodeLocator.getAstNodePath(t);if(!e)throw new Error(`Node at path ${r} has no name.`);let i;const a=o((()=>{var e;return null!=i?i:i=CZ(null!==(e=this.nameProvider.getNameNode(t))&&void 0!==e?e:t.$cstNode)}),"nameSegmentGetter");return{node:t,name:e,get nameSegment(){return a()},selectionSegment:CZ(t.$cstNode),type:t.$type,documentUri:n.uri,path:r}}},ott=class{static{o(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=s9.CancellationToken.None){const n=[],r=t.parseResult.value;for(const t of qJ(r))await g9(e),YJ(t).filter((t=>!oZ(t))).forEach((t=>{const e=this.createDescription(t);e&&n.push(e)}));return n}createDescription(t){const e=t.reference.$nodeDescription,n=t.reference.$refNode;if(!e||!n)return;const r=FJ(t.container).uri;return{sourceUri:r,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:e.documentUri,targetPath:e.path,segment:CZ(n),local:_9.equals(e.documentUri,r)}}},ltt=class{static{o(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){if(t.$container){const e=this.getAstNodePath(t.$container),n=this.getPathSegment(t);return e+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(!t)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==e?t+this.indexSeparator+e:t}getAstNode(t,e){return e.split(this.segmentSeparator).reduce(((t,e)=>{if(!t||0===e.length)return t;const n=e.indexOf(this.indexSeparator);if(n>0){const r=e.substring(0,n),i=parseInt(e.substring(n+1)),a=t[r];return null==a?void 0:a[i]}return t[e]}),t)}},ctt=class{static{o(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new y9,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){var e,n;this.workspaceConfig=null!==(n=null===(e=t.capabilities.workspace)||void 0===e?void 0:e.configuration)&&void 0!==n&&n}async initialized(t){if(this.workspaceConfig){if(t.register){const e=this.serviceRegistry.all;t.register({section:e.map((t=>this.toSectionName(t.LanguageMetaData.languageId)))})}if(t.fetchConfiguration){const e=this.serviceRegistry.all.map((t=>({section:this.toSectionName(t.LanguageMetaData.languageId)}))),n=await t.fetchConfiguration(e);e.forEach(((t,e)=>{this.updateSectionConfiguration(t.section,n[e])}))}}this._ready.resolve()}updateConfiguration(t){t.settings&&Object.keys(t.settings).forEach((e=>{this.updateSectionConfiguration(e,t.settings[e])}))}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){await this.ready;const n=this.toSectionName(t);if(this.settings[n])return this.settings[n][e]}toSectionName(t){return`${t}`}};!function(t){function e(t){return{dispose:o((async()=>await t()),"dispose")}}o(e,"create"),t.create=e}(att||(att={}));var htt=class{static{o(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new O9,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=E9.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,e={},n=s9.CancellationToken.None){var r,i;for(const n of t){const t=n.uri.toString();if(n.state===E9.Validated){if("boolean"==typeof e.validation&&e.validation)n.state=E9.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(t);else if("object"==typeof e.validation){const a=this.buildState.get(t),s=null===(r=null==a?void 0:a.result)||void 0===r?void 0:r.validationChecks;if(s){const r=(null!==(i=e.validation.categories)&&void 0!==i?i:X9.all).filter((t=>!s.includes(t)));r.length>0&&(this.buildState.set(t,{completed:!1,options:{validation:Object.assign(Object.assign({},e.validation),{categories:r})},result:a.result}),n.state=E9.IndexedReferences)}}}else this.buildState.delete(t)}this.currentState=E9.Changed,await this.emitUpdate(t.map((t=>t.uri)),[]),await this.buildDocuments(t,e,n)}async update(t,e,n=s9.CancellationToken.None){this.currentState=E9.Changed;for(const t of e)this.langiumDocuments.deleteDocument(t),this.buildState.delete(t.toString()),this.indexManager.remove(t);for(const e of t){if(!this.langiumDocuments.invalidateDocument(e)){const t=this.langiumDocumentFactory.fromModel({$type:"INVALID"},e);t.state=E9.Changed,this.langiumDocuments.addDocument(t)}this.buildState.delete(e.toString())}const r=yZ(t).concat(e).map((t=>t.toString())).toSet();this.langiumDocuments.all.filter((t=>!r.has(t.uri.toString())&&this.shouldRelink(t,r))).forEach((t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,E9.ComputedScopes),t.diagnostics=void 0})),await this.emitUpdate(t,e),await g9(n);const i=this.langiumDocuments.all.filter((t=>{var e;return t.staten(t,e))))}shouldRelink(t,e){return!!t.references.some((t=>void 0!==t.error))||this.indexManager.isAffected(t,e)}onUpdate(t){return this.updateListeners.push(t),att.create((()=>{const e=this.updateListeners.indexOf(t);e>=0&&this.updateListeners.splice(e,1)}))}async buildDocuments(t,e,n){this.prepareBuild(t,e),await this.runCancelable(t,E9.Parsed,n,(t=>this.langiumDocumentFactory.update(t,n))),await this.runCancelable(t,E9.IndexedContent,n,(t=>this.indexManager.updateContent(t,n))),await this.runCancelable(t,E9.ComputedScopes,n,(async t=>{const e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,n)})),await this.runCancelable(t,E9.Linked,n,(t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,n))),await this.runCancelable(t,E9.IndexedReferences,n,(t=>this.indexManager.updateReferences(t,n)));const r=t.filter((t=>this.shouldValidate(t)));await this.runCancelable(r,E9.Validated,n,(t=>this.validate(t,n)));for(const e of t){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}}prepareBuild(t,e){for(const n of t){const t=n.uri.toString(),r=this.buildState.get(t);r&&!r.completed||this.buildState.set(t,{completed:!1,options:e,result:null==r?void 0:r.result})}}async runCancelable(t,e,n,r){const i=t.filter((t=>t.state{this.buildPhaseListeners.delete(t,e)}))}waitUntil(t,e,n){let r;if(e&&"path"in e?r=e:n=e,null!=n||(n=s9.CancellationToken.None),r){const e=this.langiumDocuments.getDocument(r);if(e&&e.state>t)return Promise.resolve(r)}return this.currentState>=t?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(d9):new Promise(((e,i)=>{const a=this.onBuildPhase(t,(()=>{if(a.dispose(),s.dispose(),r){const t=this.langiumDocuments.getDocument(r);e(null==t?void 0:t.uri)}else e(void 0)})),s=n.onCancellationRequested((()=>{a.dispose(),s.dispose(),i(d9)}))}))}async notifyBuildPhase(t,e,n){if(0===t.length)return;const r=this.buildPhaseListeners.get(e);for(const e of r)await g9(n),await e(t,n)}shouldValidate(t){return Boolean(this.getBuildOptions(t).validation)}async validate(t,e){var n,r;const i=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,a=this.getBuildOptions(t).validation,s="object"==typeof a?a:void 0,o=await i.validateDocument(t,s,e);t.diagnostics?t.diagnostics.push(...o):t.diagnostics=o;const l=this.buildState.get(t.uri.toString());if(l){null!==(n=l.result)&&void 0!==n||(l.result={});const t=null!==(r=null==s?void 0:s.categories)&&void 0!==r?r:X9.all;l.result.validationChecks?l.result.validationChecks.push(...t):l.result.validationChecks=[...t]}}getBuildOptions(t){var e,n;return null!==(n=null===(e=this.buildState.get(t.uri.toString()))||void 0===e?void 0:e.options)&&void 0!==n?n:{}}},utt=class{static{o(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new q9,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){const n=FJ(t).uri,r=[];return this.referenceIndex.forEach((t=>{t.forEach((t=>{_9.equals(t.targetUri,n)&&t.targetPath===e&&r.push(t)}))})),yZ(r)}allElements(t,e){let n=yZ(this.symbolIndex.keys());return e&&(n=n.filter((t=>!e||e.has(t)))),n.map((e=>this.getFileDescriptions(e,t))).flat()}getFileDescriptions(t,e){var n;if(!e)return null!==(n=this.symbolIndex.get(t))&&void 0!==n?n:[];const r=this.symbolByTypeIndex.get(t,e,(()=>{var n;return(null!==(n=this.symbolIndex.get(t))&&void 0!==n?n:[]).filter((t=>this.astReflection.isSubtype(t.type,e)))}));return r}remove(t){const e=t.toString();this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e),this.referenceIndex.delete(e)}async updateContent(t,e=s9.CancellationToken.None){const n=this.serviceRegistry.getServices(t.uri),r=await n.references.ScopeComputation.computeExports(t,e),i=t.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(t,e=s9.CancellationToken.None){const n=this.serviceRegistry.getServices(t.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(t,e);this.referenceIndex.set(t.uri.toString(),r)}isAffected(t,e){const n=this.referenceIndex.get(t.uri.toString());return!!n&&n.some((t=>!t.local&&e.has(t.targetUri.toString())))}},dtt=class{static{o(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new y9,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(t){var e;this.folders=null!==(e=t.workspaceFolders)&&void 0!==e?e:void 0}initialized(t){return this.mutex.write((t=>{var e;return this.initializeWorkspace(null!==(e=this.folders)&&void 0!==e?e:[],t)}))}async initializeWorkspace(t,e=s9.CancellationToken.None){const n=await this.performStartup(t);await g9(e),await this.documentBuilder.build(n,this.initialBuildOptions,e)}async performStartup(t){const e=this.serviceRegistry.all.flatMap((t=>t.LanguageMetaData.fileExtensions)),n=[],r=o((t=>{n.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)}),"collector");return await this.loadAdditionalDocuments(t,r),await Promise.all(t.map((t=>[t,this.getRootFolder(t)])).map((async t=>this.traverseFolder(...t,e,r)))),this._ready.resolve(),n}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return S9.parse(t.uri)}async traverseFolder(t,e,n,r){const i=await this.fileSystemProvider.readDirectory(e);await Promise.all(i.map((async e=>{if(this.includeEntry(t,e,n))if(e.isDirectory)await this.traverseFolder(t,e.uri,n,r);else if(e.isFile){const t=await this.langiumDocuments.getOrCreateDocument(e.uri);r(t)}})))}includeEntry(t,e,n){const r=_9.basename(e.uri);if(r.startsWith("."))return!1;if(e.isDirectory)return"node_modules"!==r&&"out"!==r;if(e.isFile){const t=_9.extname(e.uri);return n.includes(t)}return!1}},ptt=class{static{o(this,"DefaultLexer")}constructor(t){const e=t.parser.TokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(e);const n=mtt(e)?Object.values(e):e;this.chevrotainLexer=new n4(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(t){var e;const n=this.chevrotainLexer.tokenize(t);return{tokens:n.tokens,errors:n.errors,hidden:null!==(e=n.groups.hidden)&&void 0!==e?e:[]}}toTokenTypeDictionary(t){if(mtt(t))return t;const e=ftt(t)?Object.values(t.modes).flat():t,n={};return e.forEach((t=>n[t.name]=t)),n}};function gtt(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function ftt(t){return t&&"modes"in t&&"defaultMode"in t}function mtt(t){return!gtt(t)&&!ftt(t)}function ytt(t,e,n){let r,i;"string"==typeof t?(i=e,r=n):(i=t.range.start,r=e),i||(i=u6.create(0,0));return Att({index:0,tokens:ktt({lines:xtt(t),position:i,options:Ott(r)}),position:i})}function vtt(t,e){const n=Ott(e),r=xtt(t);if(0===r.length)return!1;const i=r[0],a=r[r.length-1],s=n.start,o=n.end;return Boolean(null==s?void 0:s.exec(i))&&Boolean(null==o?void 0:o.exec(a))}function xtt(t){let e="";e="string"==typeof t?t:t.text;return e.split(u0)}o(gtt,"isTokenTypeArray"),o(ftt,"isIMultiModeLexerDefinition"),o(mtt,"isTokenTypeDictionary"),o(ytt,"parseJSDoc"),o(vtt,"isJSDoc"),o(xtt,"getLines");var btt=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,wtt=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function ktt(t){var e,n,r;const i=[];let a=t.position.line,s=t.position.character;for(let o=0;o=h.length){if(i.length>0){const t=u6.create(a,s);i.push({type:"break",content:"",range:d6.create(t,t)})}}else{btt.lastIndex=u;const t=btt.exec(h);if(t){const e=t[0],n=t[1],r=u6.create(a,s+u),o=u6.create(a,s+u+e.length);i.push({type:"tag",content:n,range:d6.create(r,o)}),u+=e.length,u=Ctt(h,u)}if(u0&&"break"===i[i.length-1].type?i.slice(0,-1):i}function Ttt(t,e,n,r){const i=[];if(0===t.length){const t=u6.create(n,r),a=u6.create(n,r+e.length);i.push({type:"text",content:e,range:d6.create(t,a)})}else{let a=0;for(const s of t){const t=s.index,o=e.substring(a,t);o.length>0&&i.push({type:"text",content:e.substring(a,t),range:d6.create(u6.create(n,a+r),u6.create(n,t+r))});let l=o.length+1;const c=s[1];if(i.push({type:"inline-tag",content:c,range:d6.create(u6.create(n,a+l+r),u6.create(n,a+l+c.length+r))}),l+=c.length,4===s.length){l+=s[2].length;const t=s[3];i.push({type:"text",content:t,range:d6.create(u6.create(n,a+l+r),u6.create(n,a+l+t.length+r))})}else i.push({type:"text",content:"",range:d6.create(u6.create(n,a+l+r),u6.create(n,a+l+r))});a=t+s[0].length}const s=e.substring(a);s.length>0&&i.push({type:"text",content:s,range:d6.create(u6.create(n,a+r),u6.create(n,a+r+s.length))})}return i}o(ktt,"tokenize"),o(Ttt,"buildInlineTokens");var _tt=/\S/,Ett=/\s*$/;function Ctt(t,e){const n=t.substring(e).match(_tt);return n?e+n.index:t.length}function Stt(t){const e=t.match(Ett);if(e&&"number"==typeof e.index)return e.index}function Att(t){var e,n,r,i;const a=u6.create(t.position.line,t.position.character);if(0===t.tokens.length)return new Btt([],d6.create(a,a));const s=[];for(;t.indexe.name===t))}getTags(t){return this.getAllTags().filter((e=>e.name===t))}getAllTags(){return this.elements.filter((t=>"name"in t))}toString(){let t="";for(const e of this.elements)if(0===t.length)t=e.toString();else{const n=e.toString();t+=qtt(t)+n}return t.trim()}toMarkdown(t){let e="";for(const n of this.elements)if(0===e.length)e=n.toMarkdown(t);else{const r=n.toMarkdown(t);e+=qtt(e)+r}return e.trim()}},$tt=class{static{o(this,"JSDocTagImpl")}constructor(t,e,n,r){this.name=t,this.content=e,this.inline=n,this.range=r}toString(){let t=`@${this.name}`;const e=this.content.toString();return 1===this.content.inlines.length?t=`${t} ${e}`:this.content.inlines.length>1&&(t=`${t}\n${e}`),this.inline?`{${t}}`:t}toMarkdown(t){var e,n;return null!==(n=null===(e=null==t?void 0:t.renderTag)||void 0===e?void 0:e.call(t,this))&&void 0!==n?n:this.toMarkdownDefault(t)}toMarkdownDefault(t){const e=this.content.toMarkdown(t);if(this.inline){const n=Ftt(this.name,e,null!=t?t:{});if("string"==typeof n)return n}let n="";"italic"===(null==t?void 0:t.tag)||void 0===(null==t?void 0:t.tag)?n="*":"bold"===(null==t?void 0:t.tag)?n="**":"bold-italic"===(null==t?void 0:t.tag)&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} — ${e}`:this.content.inlines.length>1&&(r=`${r}\n${e}`),this.inline?`{${r}}`:r}};function Ftt(t,e,n){var r,i;if("linkplain"===t||"linkcode"===t||"link"===t){const a=e.indexOf(" ");let s=e;if(a>0){const t=Ctt(e,a);s=e.substring(t),e=e.substring(0,a)}("linkcode"===t||"link"===t&&"code"===n.link)&&(s=`\`${s}\``);return null!==(i=null===(r=n.renderLink)||void 0===r?void 0:r.call(n,e,s))&&void 0!==i?i:ztt(e,s)}}function ztt(t,e){try{return S9.parse(t,!0),`[${e}](${t})`}catch(e){return t}}o(Ftt,"renderInlineTag"),o(ztt,"renderLinkDefault");var Utt=class{static{o(this,"JSDocTextImpl")}constructor(t,e){this.inlines=t,this.range=e}toString(){let t="";for(let e=0;en.range.start.line&&(t+="\n")}return t}toMarkdown(t){let e="";for(let n=0;nr.range.start.line&&(e+="\n")}return e}},Gtt=class{static{o(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}};function qtt(t){return t.endsWith("\n")?"\n":"\n\n"}o(qtt,"fillNewlines");var jtt=class{static{o(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(t){const e=this.commentProvider.getComment(t);if(e&&vtt(e)){return ytt(e).toMarkdown({renderLink:o(((e,n)=>this.documentationLinkRenderer(t,e,n)),"renderLink"),renderTag:o((e=>this.documentationTagRenderer(t,e)),"renderTag")})}}documentationLinkRenderer(t,e,n){var r;const i=null!==(r=this.findNameInPrecomputedScopes(t,e))&&void 0!==r?r:this.findNameInGlobalScope(t,e);if(i&&i.nameSegment){const t=i.nameSegment.range.start.line+1,e=i.nameSegment.range.start.character+1;return`[${n}](${i.documentUri.with({fragment:`L${t},${e}`}).toString()})`}}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(t,e){const n=FJ(t).precomputedScopes;if(!n)return;let r=t;do{const t=n.get(r).find((t=>t.name===e));if(t)return t;r=r.$container}while(r)}findNameInGlobalScope(t,e){const n=this.indexManager.allElements().find((t=>t.name===e));return n}},Ytt=class{static{o(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){var e;return H9(t)?t.$comment:null===(e=IZ(t.$cstNode,this.grammarConfig().multilineCommentRules))||void 0===e?void 0:e.text}},Wtt={};d(Wtt,p(tZ(),1));var Htt,Vtt=class{static{o(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t){return Promise.resolve(this.syncParser.parse(t))}},Xtt=class{static{o(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){const e=this.queue.shift();e&&(t.lock(),e.resolve(t))}})),this.workerPool.push(t)}}async parse(t,e){const n=await this.acquireParserWorker(e),r=new y9;let i;const a=e.onCancellationRequested((()=>{i=setTimeout((()=>{this.terminateWorker(n)}),this.terminationDelay)}));return n.parse(t).then((t=>{const e=this.hydrator.hydrate(t);r.resolve(e)})).catch((t=>{r.reject(t)})).finally((()=>{a.dispose(),clearTimeout(i)})),r.promise}terminateWorker(t){t.terminate();const e=this.workerPool.indexOf(t);e>=0&&this.workerPool.splice(e,1)}async acquireParserWorker(t){this.initializeWorkers();for(const t of this.workerPool)if(t.ready)return t.lock(),t;const e=new y9;return t.onCancellationRequested((()=>{const t=this.queue.indexOf(e);t>=0&&this.queue.splice(t,1),e.reject(d9)})),this.queue.push(e),e.promise}},Ktt=class{static{o(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,n,r){this.onReadyEmitter=new Wtt.Emitter,this.deferred=new y9,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=r,e((t=>{const e=t;this.deferred.resolve(e),this.unlock()})),n((t=>{this.deferred.reject(t),this.unlock()}))}terminate(){this.deferred.reject(d9),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 y9,this.sendMessage(t),this.deferred.promise}},Ztt=class{static{o(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new s9.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();const e=new s9.CancellationTokenSource;return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,n){const r=new y9,i={action:e,deferred:r,cancellationToken:null!=n?n:s9.CancellationToken.None};return t.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const t=[];if(this.writeQueue.length>0)t.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;t.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(t.map((async({action:t,deferred:e,cancellationToken:n})=>{try{const r=await Promise.resolve().then((()=>t(n)));e.resolve(r)}catch(t){p9(t)?e.resolve(void 0):e.reject(t)}}))),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},Qtt=class{static{o(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new P9,this.tokenTypeIdMap=new P9,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors.map((t=>Object.assign({},t))),parserErrors:t.parserErrors.map((t=>Object.assign({},t))),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}createDehyrationContext(t){const e=new Map,n=new Map;for(const n of qJ(t))e.set(n,{});if(t.$cstNode)for(const e of kZ(t.$cstNode))n.set(e,{});return{astNodes:e,cstNodes:n}}dehydrateAstNode(t,e){const n=e.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(n.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for(const[r,i]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(i)){const t=[];n[r]=t;for(const n of i)iZ(n)?t.push(this.dehydrateAstNode(n,e)):aZ(n)?t.push(this.dehydrateReference(n,e)):t.push(n)}else iZ(i)?n[r]=this.dehydrateAstNode(i,e):aZ(i)?n[r]=this.dehydrateReference(i,e):void 0!==i&&(n[r]=i);return n}dehydrateReference(t,e){const n={};return n.$refText=t.$refText,t.$refNode&&(n.$refNode=e.cstNodes.get(t.$refNode)),n}dehydrateCstNode(t,e){const n=e.cstNodes.get(t);return uZ(t)?n.fullText=t.fullText:n.grammarSource=this.getGrammarElementId(t.grammarSource),n.hidden=t.hidden,n.astNode=e.astNodes.get(t.astNode),cZ(t)?n.content=t.content.map((t=>this.dehydrateCstNode(t,e))):hZ(t)&&(n.tokenType=t.tokenType.name,n.offset=t.offset,n.length=t.length,n.startLine=t.range.start.line,n.startColumn=t.range.start.character,n.endLine=t.range.end.line,n.endColumn=t.range.end.character),n}hydrate(t){const e=t.value,n=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,n),{lexerErrors:t.lexerErrors,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,n)}}createHydrationContext(t){const e=new Map,n=new Map;for(const n of qJ(t))e.set(n,{});let r;if(t.$cstNode)for(const e of kZ(t.$cstNode)){let t;"fullText"in e?(t=new C8(e.fullText),r=t):"content"in e?t=new _8:"tokenType"in e&&(t=this.hydrateCstLeafNode(e)),t&&(n.set(e,t),t.root=r)}return{astNodes:e,cstNodes:n}}hydrateAstNode(t,e){const n=e.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,t.$cstNode&&(n.$cstNode=e.cstNodes.get(t.$cstNode));for(const[r,i]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(i)){const t=[];n[r]=t;for(const a of i)iZ(a)?t.push(this.setParent(this.hydrateAstNode(a,e),n)):aZ(a)?t.push(this.hydrateReference(a,n,r,e)):t.push(a)}else iZ(i)?n[r]=this.setParent(this.hydrateAstNode(i,e),n):aZ(i)?n[r]=this.hydrateReference(i,n,r,e):void 0!==i&&(n[r]=i);return n}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,n,r){return this.linker.buildReference(e,n,r.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,n=0){const r=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(r.grammarSource=this.getGrammarElement(t.grammarSource)),r.astNode=e.astNodes.get(t.astNode),cZ(r))for(const i of t.content){const t=this.hydrateCstNode(i,e,n++);r.content.push(t)}return r}hydrateCstLeafNode(t){const e=this.getTokenType(t.tokenType),n=t.offset,r=t.length,i=t.startLine,a=t.startColumn,s=t.endLine,o=t.endColumn,l=t.hidden;return new T8(n,r,{start:{line:i,character:a},end:{line:s,character:o}},e,l)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();const e=this.grammarElementIdMap.getKey(t);if(e)return e;throw new Error("Invalid grammar element id: "+t)}createGrammarElementIdMap(){let t=0;for(const e of qJ(this.grammar))sQ(e)&&this.grammarElementIdMap.set(e,t++)}};function Jtt(t){return{documentation:{CommentProvider:o((t=>new Ytt(t)),"CommentProvider"),DocumentationProvider:o((t=>new jtt(t)),"DocumentationProvider")},parser:{AsyncParser:o((t=>new Vtt(t)),"AsyncParser"),GrammarConfig:o((t=>a1(t)),"GrammarConfig"),LangiumParser:o((t=>e9(t)),"LangiumParser"),CompletionParser:o((t=>t9(t)),"CompletionParser"),ValueConverter:o((()=>new a9),"ValueConverter"),TokenBuilder:o((()=>new i9),"TokenBuilder"),Lexer:o((t=>new ptt(t)),"Lexer"),ParserErrorMessageProvider:o((()=>new R8),"ParserErrorMessageProvider")},workspace:{AstNodeLocator:o((()=>new ltt),"AstNodeLocator"),AstNodeDescriptionProvider:o((t=>new stt(t)),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:o((t=>new ott(t)),"ReferenceDescriptionProvider")},references:{Linker:o((t=>new I9(t)),"Linker"),NameProvider:o((()=>new R9),"NameProvider"),ScopeProvider:o((t=>new W9(t)),"ScopeProvider"),ScopeComputation:o((t=>new B9(t)),"ScopeComputation"),References:o((t=>new D9(t)),"References")},serializer:{Hydrator:o((t=>new Qtt(t)),"Hydrator"),JsonSerializer:o((t=>new K9(t)),"JsonSerializer")},validation:{DocumentValidator:o((t=>new ntt(t)),"DocumentValidator"),ValidationRegistry:o((t=>new ett(t)),"ValidationRegistry")},shared:o((()=>t.shared),"shared")}}function tet(t){return{ServiceRegistry:o((()=>new Z9),"ServiceRegistry"),workspace:{LangiumDocuments:o((t=>new N9(t)),"LangiumDocuments"),LangiumDocumentFactory:o((t=>new L9(t)),"LangiumDocumentFactory"),DocumentBuilder:o((t=>new htt(t)),"DocumentBuilder"),IndexManager:o((t=>new utt(t)),"IndexManager"),WorkspaceManager:o((t=>new dtt(t)),"WorkspaceManager"),FileSystemProvider:o((e=>t.fileSystemProvider(e)),"FileSystemProvider"),WorkspaceLock:o((()=>new Ztt),"WorkspaceLock"),ConfigurationProvider:o((t=>new ctt(t)),"ConfigurationProvider")}}}function eet(t,e,n,r,i,a,s,o,l){return iet([t,e,n,r,i,a,s,o,l].reduce(oet,{}))}o(Jtt,"createDefaultCoreModule"),o(tet,"createDefaultSharedCoreModule"),(Htt||(Htt={})).merge=(t,e)=>oet(oet({},t),e),o(eet,"inject");var net=Symbol("isProxy");function ret(t){if(t&&t[net])for(const e of Object.values(t))ret(e);return t}function iet(t,e){const n=new Proxy({},{deleteProperty:o((()=>!1),"deleteProperty"),get:o(((r,i)=>set(r,i,t,e||n)),"get"),getOwnPropertyDescriptor:o(((r,i)=>(set(r,i,t,e||n),Object.getOwnPropertyDescriptor(r,i))),"getOwnPropertyDescriptor"),has:o(((e,n)=>n in t),"has"),ownKeys:o((()=>[...Reflect.ownKeys(t),net]),"ownKeys")});return n[net]=!0,n}o(ret,"eagerLoad"),o(iet,"_inject");var aet=Symbol();function set(t,e,n,r){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===aet)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in n){const i=n[e];t[e]=aet;try{t[e]="function"==typeof i?i(r):iet(i,r)}catch(n){throw t[e]=n instanceof Error?n:void 0,n}return t[e]}}function oet(t,e){if(e)for(const[n,r]of Object.entries(e))if(void 0!==r){const e=t[n];t[n]=null!==e&&null!==r&&"object"==typeof e&&"object"==typeof r?oet(e,r):r}return t}o(set,"_resolve"),o(oet,"_merge");var cet={};h(cet,{AstUtils:()=>OJ,BiMap:()=>P9,Cancellation:()=>s9,ContextCache:()=>q9,CstUtils:()=>rZ,DONE_RESULT:()=>mZ,Deferred:()=>y9,Disposable:()=>att,DisposableCache:()=>U9,DocumentCache:()=>j9,EMPTY_STREAM:()=>fZ,ErrorWithLocation:()=>qZ,GrammarUtils:()=>GZ,MultiMap:()=>O9,OperationCancelled:()=>d9,Reduction:()=>vZ,RegExpUtils:()=>KJ,SimpleCache:()=>G9,StreamImpl:()=>dZ,TreeStreamImpl:()=>wZ,URI:()=>S9,UriUtils:()=>_9,WorkspaceCache:()=>Y9,assertUnreachable:()=>jZ,delayNextTick:()=>o9,interruptAndCheck:()=>g9,isOperationCancelled:()=>p9,loadGrammarFromJson:()=>fet,setInterruptionPeriod:()=>u9,startCancelableOperation:()=>h9,stream:()=>yZ}),d(cet,Wtt);var het=class{static{o(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},uet={fileSystemProvider:o((()=>new het),"fileSystemProvider")},det={Grammar:o((()=>{}),"Grammar"),LanguageMetaData:o((()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})),"LanguageMetaData")},pet={AstReflection:o((()=>new RJ),"AstReflection")};function get(){const t=eet(tet(uet),pet),e=eet(Jtt({shared:t}),det);return t.ServiceRegistry.register(e),e}function fet(t){var e;const n=get(),r=n.serializer.JsonSerializer.deserialize(t);return n.shared.workspace.LangiumDocumentFactory.fromModel(r,S9.parse(`memory://${null!==(e=r.name)&&void 0!==e?e:"grammar"}.langium`)),r}o(get,"createMinimalGrammarServices"),o(fet,"loadGrammarFromJson"),d(nZ,cet);var met=Object.defineProperty,yet=o(((t,e)=>met(t,"name",{value:e,configurable:!0})),"__name");function vet(t){return zet.isInstance(t,"Architecture")}o(vet,"isArchitecture"),yet(vet,"isArchitecture");var xet="Branch";function bet(t){return zet.isInstance(t,xet)}o(bet,"isBranch"),yet(bet,"isBranch");var wet="Commit";function ket(t){return zet.isInstance(t,wet)}o(ket,"isCommit"),yet(ket,"isCommit");function Tet(t){return zet.isInstance(t,"Common")}o(Tet,"isCommon"),yet(Tet,"isCommon");var _et="GitGraph";function Eet(t){return zet.isInstance(t,_et)}o(Eet,"isGitGraph"),yet(Eet,"isGitGraph");function Cet(t){return zet.isInstance(t,"Info")}o(Cet,"isInfo"),yet(Cet,"isInfo");var Aet="Merge";function Let(t){return zet.isInstance(t,Aet)}o(Let,"isMerge"),yet(Let,"isMerge");function Net(t){return zet.isInstance(t,"Packet")}o(Net,"isPacket"),yet(Net,"isPacket");function Iet(t){return zet.isInstance(t,"PacketBlock")}o(Iet,"isPacketBlock"),yet(Iet,"isPacketBlock");function Met(t){return zet.isInstance(t,"Pie")}o(Met,"isPie"),yet(Met,"isPie");function Ret(t){return zet.isInstance(t,"PieSection")}o(Ret,"isPieSection"),yet(Ret,"isPieSection");var Det,Oet,Pet,Bet,$et,Fet=class extends lZ{static{o(this,"MermaidAstReflection")}static{yet(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(t,e){switch(t){case xet:case"Checkout":case"CherryPicking":case wet:case Aet:return this.isSubtype("Statement",e);case"Direction":return this.isSubtype(_et,e);default:return!1}}getReferenceType(t){const e=`${t.container.$type}:${t.property}`;throw new Error(`${e} is not a valid reference id.`)}getTypeMetaData(t){switch(t){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},zet=new Fet,Uet=yet((()=>Det??(Det=fet('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"InfoGrammar"),Get=yet((()=>Oet??(Oet=fet('{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PacketGrammar"),qet=yet((()=>Pet??(Pet=fet('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PieGrammar"),jet=yet((()=>Bet??(Bet=fet('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"ArchitectureGrammar"),Yet=yet((()=>$et??($et=fet('{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}'))),"GitGraphGrammar"),Wet={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Het={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Vet={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Xet={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Ket={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Zet={AstReflection:yet((()=>new Fet),"AstReflection")},Qet={Grammar:yet((()=>Uet()),"Grammar"),LanguageMetaData:yet((()=>Wet),"LanguageMetaData"),parser:{}},Jet={Grammar:yet((()=>Get()),"Grammar"),LanguageMetaData:yet((()=>Het),"LanguageMetaData"),parser:{}},tnt={Grammar:yet((()=>qet()),"Grammar"),LanguageMetaData:yet((()=>Vet),"LanguageMetaData"),parser:{}},ent={Grammar:yet((()=>jet()),"Grammar"),LanguageMetaData:yet((()=>Xet),"LanguageMetaData"),parser:{}},nnt={Grammar:yet((()=>Yet()),"Grammar"),LanguageMetaData:yet((()=>Ket),"LanguageMetaData"),parser:{}},rnt={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},int=class extends a9{static{o(this,"AbstractMermaidValueConverter")}static{yet(this,"AbstractMermaidValueConverter")}runConverter(t,e,n){let r=this.runCommonConverter(t,e,n);return void 0===r&&(r=this.runCustomConverter(t,e,n)),void 0===r?super.runConverter(t,e,n):r}runCommonConverter(t,e,n){const r=rnt[t.name];if(void 0===r)return;const i=r.exec(e);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},ant=class extends int{static{o(this,"CommonValueConverter")}static{yet(this,"CommonValueConverter")}runCustomConverter(t,e,n){}},snt=class extends i9{static{o(this,"AbstractMermaidTokenBuilder")}static{yet(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,n){const r=super.buildKeywordTokens(t,e,n);return r.forEach((t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))})),r}};(class extends snt{static{o(this,"CommonTokenBuilder")}static{yet(this,"CommonTokenBuilder")}});var ont={},lnt={info:yet((async()=>{const{createInfoServices:t}=await Promise.resolve().then((function(){return kDt})),e=t().Info.parser.LangiumParser;ont.info=e}),"info"),packet:yet((async()=>{const{createPacketServices:t}=await Promise.resolve().then((function(){return TDt})),e=t().Packet.parser.LangiumParser;ont.packet=e}),"packet"),pie:yet((async()=>{const{createPieServices:t}=await Promise.resolve().then((function(){return _Dt})),e=t().Pie.parser.LangiumParser;ont.pie=e}),"pie"),architecture:yet((async()=>{const{createArchitectureServices:t}=await Promise.resolve().then((function(){return EDt})),e=t().Architecture.parser.LangiumParser;ont.architecture=e}),"architecture"),gitGraph:yet((async()=>{const{createGitGraphServices:t}=await Promise.resolve().then((function(){return CDt})),e=t().GitGraph.parser.LangiumParser;ont.gitGraph=e}),"gitGraph")};async function cnt(t,e){const n=lnt[t];if(!n)throw new Error(`Unknown diagram type: ${t}`);ont[t]||await n();const r=ont[t].parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new hnt(r);return r.value}o(cnt,"parse"),yet(cnt,"parse");var hnt=class extends Error{static{o(this,"MermaidParseError")}constructor(t){super(`Parsing failed: ${t.lexerErrors.map((t=>t.message)).join("\n")} ${t.parserErrors.map((t=>t.message)).join("\n")}`),this.result=t}static{yet(this,"MermaidParseError")}},unt=class extends snt{static{o(this,"PieTokenBuilder")}static{yet(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},dnt=class extends int{static{o(this,"PieValueConverter")}static{yet(this,"PieValueConverter")}runCustomConverter(t,e,n){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},pnt={parser:{TokenBuilder:yet((()=>new unt),"TokenBuilder"),ValueConverter:yet((()=>new dnt),"ValueConverter")}};function gnt(t=uet){const e=eet(tet(t),Zet),n=eet(Jtt({shared:e}),tnt,pnt);return e.ServiceRegistry.register(n),{shared:e,Pie:n}}o(gnt,"createPieServices"),yet(gnt,"createPieServices");var fnt=class extends snt{static{o(this,"ArchitectureTokenBuilder")}static{yet(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},mnt=class extends int{static{o(this,"ArchitectureValueConverter")}static{yet(this,"ArchitectureValueConverter")}runCustomConverter(t,e,n){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},ynt={parser:{TokenBuilder:yet((()=>new fnt),"TokenBuilder"),ValueConverter:yet((()=>new mnt),"ValueConverter")}};function vnt(t=uet){const e=eet(tet(t),Zet),n=eet(Jtt({shared:e}),ent,ynt);return e.ServiceRegistry.register(n),{shared:e,Architecture:n}}o(vnt,"createArchitectureServices"),yet(vnt,"createArchitectureServices");var xnt=class extends snt{static{o(this,"GitGraphTokenBuilder")}static{yet(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},bnt={parser:{TokenBuilder:yet((()=>new xnt),"TokenBuilder"),ValueConverter:yet((()=>new ant),"ValueConverter")}};function wnt(t=uet){const e=eet(tet(t),Zet),n=eet(Jtt({shared:e}),nnt,bnt);return e.ServiceRegistry.register(n),{shared:e,GitGraph:n}}o(wnt,"createGitGraphServices"),yet(wnt,"createGitGraphServices");var knt=class extends snt{static{o(this,"InfoTokenBuilder")}static{yet(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Tnt={parser:{TokenBuilder:yet((()=>new knt),"TokenBuilder"),ValueConverter:yet((()=>new ant),"ValueConverter")}};function _nt(t=uet){const e=eet(tet(t),Zet),n=eet(Jtt({shared:e}),Qet,Tnt);return e.ServiceRegistry.register(n),{shared:e,Info:n}}o(_nt,"createInfoServices"),yet(_nt,"createInfoServices");var Ent=class extends snt{static{o(this,"PacketTokenBuilder")}static{yet(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},Cnt={parser:{TokenBuilder:yet((()=>new Ent),"TokenBuilder"),ValueConverter:yet((()=>new ant),"ValueConverter")}};function Snt(t=uet){const e=eet(tet(t),Zet),n=eet(Jtt({shared:e}),Jet,Cnt);return e.ServiceRegistry.register(n),{shared:e,Packet:n}}o(Snt,"createPacketServices"),yet(Snt,"createPacketServices");var Ant={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Lnt=Lt.gitGraph,Nnt=o((()=>Rk({...Lnt,...Gt().gitGraph})),"getConfig"),Int=new KK((()=>{const t=Nnt(),e=t.mainBranchName,n=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:n}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}}));function Mnt(){return xk({length:7})}function Rnt(t,e){const n=Object.create(null);return t.reduce(((t,r)=>{const i=e(r);return n[i]||(n[i]=!0,t.push(r)),t}),[])}o(Mnt,"getID"),o(Rnt,"uniqBy");var Dnt=o((function(t){Int.records.direction=t}),"setDirection"),Ont=o((function(t){y.debug("options str",t),t=t?.trim(),t=t||"{}";try{Int.records.options=JSON.parse(t)}catch(t){y.error("error while parsing gitGraph options",t.message)}}),"setOptions"),Pnt=o((function(){return Int.records.options}),"getOptions"),Bnt=o((function(t){let e=t.msg,n=t.id;const r=t.type;let i=t.tags;y.info("commit",e,n,r,i),y.debug("Entering commit:",e,n,r,i);const a=Nnt();n=Sn.sanitizeText(n,a),e=Sn.sanitizeText(e,a),i=i?.map((t=>Sn.sanitizeText(t,a)));const s={id:n||Int.records.seq+"-"+Mnt(),message:e,seq:Int.records.seq++,type:r??Ant.NORMAL,tags:i??[],parents:null==Int.records.head?[]:[Int.records.head.id],branch:Int.records.currBranch};Int.records.head=s,y.info("main branch",a.mainBranchName),Int.records.commits.set(s.id,s),Int.records.branches.set(Int.records.currBranch,s.id),y.debug("in pushCommit "+s.id)}),"commit"),$nt=o((function(t){let e=t.name;const n=t.order;if(e=Sn.sanitizeText(e,Nnt()),Int.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);Int.records.branches.set(e,null!=Int.records.head?Int.records.head.id:null),Int.records.branchConfig.set(e,{name:e,order:n}),Unt(e),y.debug("in createBranch")}),"branch"),Fnt=o((t=>{let e=t.branch,n=t.id;const r=t.type,i=t.tags,a=Nnt();e=Sn.sanitizeText(e,a),n&&(n=Sn.sanitizeText(n,a));const s=Int.records.branches.get(Int.records.currBranch),o=Int.records.branches.get(e),l=s?Int.records.commits.get(s):void 0,c=o?Int.records.commits.get(o):void 0;if(l&&c&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(Int.records.currBranch===e){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},t}if(void 0===l||!l){const t=new Error(`Incorrect usage of "merge". Current branch (${Int.records.currBranch})has no commits`);throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},t}if(!Int.records.branches.has(e)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},t}if(void 0===c||!c){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},t}if(l===c){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},t}if(n&&Int.records.commits.has(n)){const t=new Error('Incorrect usage of "merge". Commit with id:'+n+" already exists, use different custom Id");throw t.hash={text:`merge ${e} ${n} ${r} ${i?.join(" ")}`,token:`merge ${e} ${n} ${r} ${i?.join(" ")}`,expected:[`merge ${e} ${n}_UNIQUE ${r} ${i?.join(" ")}`]},t}const h=o||"",u={id:n||`${Int.records.seq}-${Mnt()}`,message:`merged branch ${e} into ${Int.records.currBranch}`,seq:Int.records.seq++,parents:null==Int.records.head?[]:[Int.records.head.id,h],branch:Int.records.currBranch,type:Ant.MERGE,customType:r,customId:!!n,tags:i??[]};Int.records.head=u,Int.records.commits.set(u.id,u),Int.records.branches.set(Int.records.currBranch,u.id),y.debug(Int.records.branches),y.debug("in mergeBranch")}),"merge"),znt=o((function(t){let e=t.id,n=t.targetId,r=t.tags,i=t.parent;y.debug("Entering cherryPick:",e,n,r);const a=Nnt();if(e=Sn.sanitizeText(e,a),n=Sn.sanitizeText(n,a),r=r?.map((t=>Sn.sanitizeText(t,a))),i=Sn.sanitizeText(i,a),!e||!Int.records.commits.has(e)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},t}const s=Int.records.commits.get(e);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(s.parents)||!s.parents.includes(i))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const o=s.branch;if(s.type===Ant.MERGE&&!i){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!n||!Int.records.commits.has(n)){if(o===Int.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},t}const t=Int.records.branches.get(Int.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${Int.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},t}const a=Int.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${Int.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},t}const l={id:Int.records.seq+"-"+Mnt(),message:`cherry-picked ${s?.message} into ${Int.records.currBranch}`,seq:Int.records.seq++,parents:null==Int.records.head?[]:[Int.records.head.id,s.id],branch:Int.records.currBranch,type:Ant.CHERRY_PICK,tags:r?r.filter(Boolean):[`cherry-pick:${s.id}${s.type===Ant.MERGE?`|parent:${i}`:""}`]};Int.records.head=l,Int.records.commits.set(l.id,l),Int.records.branches.set(Int.records.currBranch,l.id),y.debug(Int.records.branches),y.debug("in cherryPick")}}),"cherryPick"),Unt=o((function(t){if(t=Sn.sanitizeText(t,Nnt()),!Int.records.branches.has(t)){const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}{Int.records.currBranch=t;const e=Int.records.branches.get(Int.records.currBranch);Int.records.head=void 0!==e&&e?Int.records.commits.get(e)??null:null}}),"checkout");function Gnt(t,e,n){const r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function qnt(t){const e=t.reduce(((t,e)=>t.seq>e.seq?t:e),t[0]);let n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));const r=[n,e.id,e.seq];for(const t in Int.records.branches)Int.records.branches.get(t)===e.id&&r.push(t);if(y.debug(r.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){const n=Int.records.commits.get(e.parents[0]);Gnt(t,e,n),e.parents[1]&&t.push(Int.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;if(e.parents[0]){const n=Int.records.commits.get(e.parents[0]);Gnt(t,e,n)}}qnt(t=Rnt(t,(t=>t.id)))}o(Gnt,"upsert"),o(qnt,"prettyPrintCommitHistory");var jnt=o((function(){y.debug(Int.records.commits);qnt([Xnt()[0]])}),"prettyPrint"),Ynt=o((function(){Int.reset(),Un()}),"clear"),Wnt=o((function(){const t=[...Int.records.branchConfig.values()].map(((t,e)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${e}`)})).sort(((t,e)=>(t.order??0)-(e.order??0))).map((({name:t})=>({name:t})));return t}),"getBranchesAsObjArray"),Hnt=o((function(){return Int.records.branches}),"getBranches"),Vnt=o((function(){return Int.records.commits}),"getCommits"),Xnt=o((function(){const t=[...Int.records.commits.values()];return t.forEach((function(t){y.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t}),"getCommitsArray"),Knt={commitType:Ant,getConfig:Nnt,setDirection:Dnt,setOptions:Ont,getOptions:Pnt,commit:Bnt,branch:$nt,merge:Fnt,cherryPick:znt,checkout:Unt,prettyPrint:jnt,clear:Ynt,getBranchesAsObjArray:Wnt,getBranches:Hnt,getCommits:Vnt,getCommitsArray:Xnt,getCurrentBranch:o((function(){return Int.records.currBranch}),"getCurrentBranch"),getDirection:o((function(){return Int.records.direction}),"getDirection"),getHead:o((function(){return Int.records.head}),"getHead"),setAccTitle:Gn,getAccTitle:qn,getAccDescription:Yn,setAccDescription:jn,setDiagramTitle:Wn,getDiagramTitle:Hn},Znt=o(((t,e)=>{ZK(t,e),t.dir&&e.setDirection(t.dir);for(const n of t.statements)Qnt(n,e)}),"populate"),Qnt=o(((t,e)=>{const n={Commit:o((t=>e.commit(Jnt(t))),"Commit"),Branch:o((t=>e.branch(trt(t))),"Branch"),Merge:o((t=>e.merge(ert(t))),"Merge"),Checkout:o((t=>e.checkout(nrt(t))),"Checkout"),CherryPicking:o((t=>e.cherryPick(rrt(t))),"CherryPicking")}[t.$type];n?n(t):y.error(`Unknown statement type: ${t.$type}`)}),"parseStatement"),Jnt=o((t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?Ant[t.type]:Ant.NORMAL,tags:t.tags??void 0})),"parseCommit"),trt=o((t=>({name:t.name,order:t.order??0})),"parseBranch"),ert=o((t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?Ant[t.type]:void 0,tags:t.tags??void 0})),"parseMerge"),nrt=o((t=>t.branch),"parseCheckout"),rrt=o((t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent})),"parseCherryPicking"),irt={parse:o((async t=>{const e=await cnt("gitGraph",t);y.debug(e),Znt(e,Knt)}),"parse")},art=Kn()?.gitGraph,srt=10,ort=40,lrt=new Map,crt=new Map,hrt=new Map,urt=[],drt=0,prt="LR",grt=o((()=>{lrt.clear(),crt.clear(),hrt.clear(),drt=0,urt=[],prt="LR"}),"clear"),frt=o((t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach((t=>{const 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=t.trim(),e.appendChild(n)})),e}),"drawText"),mrt=o((t=>{let e,n,r;return"BT"===prt?(n=o(((t,e)=>t<=e),"comparisonFunc"),r=1/0):(n=o(((t,e)=>t>=e),"comparisonFunc"),r=0),t.forEach((t=>{const i="TB"===prt||"BT"==prt?crt.get(t)?.y:crt.get(t)?.x;void 0!==i&&n(i,r)&&(e=t,r=i)})),e}),"findClosestParent"),yrt=o((t=>{let e="",n=1/0;return t.forEach((t=>{const r=crt.get(t).y;r<=n&&(e=t,n=r)})),e||void 0}),"findClosestParentBT"),vrt=o(((t,e,n)=>{let r=n,i=n;const a=[];t.forEach((t=>{const n=e.get(t);if(!n)throw new Error(`Commit not found for key ${t}`);n.parents.length?(r=brt(n),i=Math.max(r,i)):a.push(n),wrt(n,r)})),r=i,a.forEach((t=>{krt(t,r,n)})),t.forEach((t=>{const n=e.get(t);if(n?.parents.length){const t=yrt(n.parents);r=crt.get(t).y-ort,r<=i&&(i=r);const e=lrt.get(n.branch).pos,a=r-srt;crt.set(n.id,{x:e,y:a})}}))}),"setParallelBTPos"),xrt=o((t=>{const e=mrt(t.parents.filter((t=>null!==t)));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const n=crt.get(e)?.y;if(void 0===n)throw new Error(`Closest parent position not found for commit ${t.id}`);return n}),"findClosestParentPos"),brt=o((t=>xrt(t)+ort),"calculateCommitPosition"),wrt=o(((t,e)=>{const n=lrt.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const r=n.pos,i=e+srt;return crt.set(t.id,{x:r,y:i}),{x:r,y:i}}),"setCommitPosition"),krt=o(((t,e,n)=>{const r=lrt.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);const i=e+n,a=r.pos;crt.set(t.id,{x:a,y:i})}),"setRootPosition"),Trt=o(((t,e,n,r,i,a)=>{if(a===Ant.HIGHLIGHT)t.append("rect").attr("x",n.x-10).attr("y",n.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%8} ${r}-outer`),t.append("rect").attr("x",n.x-6).attr("y",n.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%8} ${r}-inner`);else if(a===Ant.CHERRY_PICK)t.append("circle").attr("cx",n.x).attr("cy",n.y).attr("r",10).attr("class",`commit ${e.id} ${r}`),t.append("circle").attr("cx",n.x-3).attr("cy",n.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${r}`),t.append("circle").attr("cx",n.x+3).attr("cy",n.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${r}`),t.append("line").attr("x1",n.x+3).attr("y1",n.y+1).attr("x2",n.x).attr("y2",n.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${r}`),t.append("line").attr("x1",n.x-3).attr("y1",n.y+1).attr("x2",n.x).attr("y2",n.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${r}`);else{const s=t.append("circle");if(s.attr("cx",n.x),s.attr("cy",n.y),s.attr("r",e.type===Ant.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%8}`),a===Ant.MERGE){const a=t.append("circle");a.attr("cx",n.x),a.attr("cy",n.y),a.attr("r",6),a.attr("class",`commit ${r} ${e.id} commit${i%8}`)}if(a===Ant.REVERSE){t.append("path").attr("d",`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr("class",`commit ${r} ${e.id} commit${i%8}`)}}}),"drawCommitBullet"),_rt=o(((t,e,n,r)=>{if(e.type!==Ant.CHERRY_PICK&&(e.customId&&e.type===Ant.MERGE||e.type!==Ant.MERGE)&&art?.showCommitLabel){const i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),s=i.append("text").attr("x",r).attr("y",n.y+25).attr("class","commit-label").text(e.id),o=s.node()?.getBBox();if(o&&(a.attr("x",n.posWithOffset-o.width/2-2).attr("y",n.y+13.5).attr("width",o.width+4).attr("height",o.height+4),"TB"===prt||"BT"===prt?(a.attr("x",n.x-(o.width+16+5)).attr("y",n.y-12),s.attr("x",n.x-(o.width+16)).attr("y",n.y+o.height-12)):s.attr("x",n.posWithOffset-o.width/2),art.rotateCommitLabel))if("TB"===prt||"BT"===prt)s.attr("transform","rotate(-45, "+n.x+", "+n.y+")"),a.attr("transform","rotate(-45, "+n.x+", "+n.y+")");else{const t=-7.5-(o.width+10)/25*9.5,e=10+o.width/25*8.5;i.attr("transform","translate("+t+", "+e+") rotate(-45, "+r+", "+n.y+")")}}}),"drawCommitLabel"),Ert=o(((t,e,n,r)=>{if(e.tags.length>0){let i=0,a=0,s=0;const o=[];for(const r of e.tags.reverse()){const e=t.insert("polygon"),l=t.append("circle"),c=t.append("text").attr("y",n.y-16-i).attr("class","tag-label").text(r),h=c.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),c.attr("x",n.posWithOffset-h.width/2),o.push({tag:c,hole:l,rect:e,yOffset:i}),i+=20}for(const{tag:t,hole:e,rect:i,yOffset:l}of o){const o=s/2,c=n.y-19.2-l;if(i.attr("class","tag-label-bkg").attr("points",`\n ${r-a/2-2},${c+2} \n ${r-a/2-2},${c-2}\n ${n.posWithOffset-a/2-4},${c-o-2}\n ${n.posWithOffset+a/2+4},${c-o-2}\n ${n.posWithOffset+a/2+4},${c+o+2}\n ${n.posWithOffset-a/2-4},${c+o+2}`),e.attr("cy",c).attr("cx",r-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===prt||"BT"===prt){const s=r+l;i.attr("class","tag-label-bkg").attr("points",`\n ${n.x},${s+2}\n ${n.x},${s-2}\n ${n.x+srt},${s-o-2}\n ${n.x+srt+a+4},${s-o-2}\n ${n.x+srt+a+4},${s+o+2}\n ${n.x+srt},${s+o+2}`).attr("transform","translate(12,12) rotate(45, "+n.x+","+r+")"),e.attr("cx",n.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+n.x+","+r+")"),t.attr("x",n.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+n.x+","+r+")")}}}}),"drawCommitTags"),Crt=o((t=>{switch(t.customType??t.type){case Ant.NORMAL:return"commit-normal";case Ant.REVERSE:return"commit-reverse";case Ant.HIGHLIGHT:return"commit-highlight";case Ant.MERGE:return"commit-merge";case Ant.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}}),"getCommitClassType"),Srt=o(((t,e,n,r)=>{const i={x:0,y:0};if(!(t.parents.length>0)){if("TB"===e)return 30;if("BT"===e){return(r.get(t.id)??i).y-ort}return 0}{const n=mrt(t.parents);if(n){const a=r.get(n)??i;if("TB"===e)return a.y+ort;if("BT"===e){return(r.get(t.id)??i).y-ort}return a.x+ort}}return 0}),"calculatePosition"),Art=o(((t,e,n)=>{const r="BT"===prt&&n?e:e+srt,i="TB"===prt||"BT"===prt?r:lrt.get(t.branch)?.pos,a="TB"===prt||"BT"===prt?lrt.get(t.branch)?.pos:r;if(void 0===a||void 0===i)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:r}}),"getCommitPosition"),Lrt=o(((t,e,n)=>{if(!art)throw new Error("GitGraph config not found");const r=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels");let a="TB"===prt||"BT"===prt?30:0;const s=[...e.keys()],l=art?.parallelCommits??!1,c=o(((t,n)=>{const r=e.get(t)?.seq,i=e.get(n)?.seq;return void 0!==r&&void 0!==i?r-i:0}),"sortKeys");let h=s.sort(c);"BT"===prt&&(l&&vrt(h,e,a),h=h.reverse()),h.forEach((t=>{const s=e.get(t);if(!s)throw new Error(`Commit not found for key ${t}`);l&&(a=Srt(s,prt,a,crt));const o=Art(s,a,l);if(n){const t=Crt(s),e=s.customType??s.type,n=lrt.get(s.branch)?.index??0;Trt(r,s,o,t,n,e),_rt(i,s,o,a),Ert(i,s,o,a)}"TB"===prt||"BT"===prt?crt.set(s.id,{x:o.x,y:o.posWithOffset}):crt.set(s.id,{x:o.posWithOffset,y:o.y}),a="BT"===prt&&l?a+ort:a+ort+srt,a>drt&&(drt=a)}))}),"drawCommits"),Nrt=o(((t,e,n,r,i)=>{const a=("TB"===prt||"BT"===prt?n.xt.branch===a),"isOnBranchToGetCurve"),l=o((n=>n.seq>t.seq&&n.seql(t)&&s(t)))}),"shouldRerouteArrow"),Irt=o(((t,e,n=0)=>{const r=t+Math.abs(t-e)/2;if(n>5)return r;if(urt.every((t=>Math.abs(t-r)>=10)))return urt.push(r),r;const i=Math.abs(t-e);return Irt(t,e-i/5,n+1)}),"findLane"),Mrt=o(((t,e,n,r)=>{const i=crt.get(e.id),a=crt.get(n.id);if(void 0===i||void 0===a)throw new Error(`Commit positions not found for commits ${e.id} and ${n.id}`);const s=Nrt(e,n,i,a,r);let o,l="",c="",h=0,u=0,d=lrt.get(n.branch)?.index;if(n.type===Ant.MERGE&&e.id!==n.parents[0]&&(d=lrt.get(e.branch)?.index),s){l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10;const t=i.ya.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,o=n.type===Ant.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${c} ${i.x-u} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x+h} ${i.y} ${l} ${a.x} ${i.y+u} L ${a.x} ${a.y}`),i.x===a.x&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):"BT"===prt?(i.xa.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,o=n.type===Ant.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${l} ${i.x-u} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-u} L ${a.x} ${a.y}`),i.x===a.x&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.ya.y&&(o=n.type===Ant.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-u} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${c} ${i.x+u} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(void 0===o)throw new Error("Line definition not found");t.append("path").attr("d",o).attr("class","arrow arrow"+d%8)}),"drawArrow"),Rrt=o(((t,e)=>{const n=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach((t=>{const r=e.get(t);r.parents&&r.parents.length>0&&r.parents.forEach((t=>{Mrt(n,e.get(t),r,e)}))}))}),"drawArrows"),Drt=o(((t,e)=>{const n=t.append("g");e.forEach(((t,e)=>{const r=e%8,i=lrt.get(t.name)?.pos;if(void 0===i)throw new Error(`Position not found for branch ${t.name}`);const a=n.append("line");a.attr("x1",0),a.attr("y1",i),a.attr("x2",drt),a.attr("y2",i),a.attr("class","branch branch"+r),"TB"===prt?(a.attr("y1",30),a.attr("x1",i),a.attr("y2",drt),a.attr("x2",i)):"BT"===prt&&(a.attr("y1",drt),a.attr("x1",i),a.attr("y2",30),a.attr("x2",i)),urt.push(i);const s=t.name,o=frt(s),l=n.insert("rect"),c=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+r);c.node().appendChild(o);const h=o.getBBox();l.attr("class","branchLabelBkg label"+r).attr("rx",4).attr("ry",4).attr("x",-h.width-4-(!0===art?.rotateCommitLabel?30:0)).attr("y",-h.height/2+8).attr("width",h.width+18).attr("height",h.height+4),c.attr("transform","translate("+(-h.width-14-(!0===art?.rotateCommitLabel?30:0))+", "+(i-h.height/2-1)+")"),"TB"===prt?(l.attr("x",i-h.width/2-10).attr("y",0),c.attr("transform","translate("+(i-h.width/2-5)+", 0)")):"BT"===prt?(l.attr("x",i-h.width/2-10).attr("y",drt),c.attr("transform","translate("+(i-h.width/2-5)+", "+drt+")")):l.attr("transform","translate(-19, "+(i-h.height/2)+")")}))}),"drawBranches"),Ort=o((function(t,e,n,r,i){return lrt.set(t,{pos:e,index:n}),e+=50+(i?40:0)+("TB"===prt||"BT"===prt?r.width/2:0)}),"setBranchPosition"),Prt=o((function(t,e,n,r){if(grt(),y.debug("in gitgraph renderer",t+"\n","id:",e,n),!art)throw new Error("GitGraph config not found");const i=art.rotateCommitLabel??!1,a=r.db;hrt=a.getCommits();const s=a.getBranchesAsObjArray();prt=a.getDirection();const o=Fa(`[id="${e}"]`);let l=0;s.forEach(((t,e)=>{const n=frt(t.name),r=o.append("g"),a=r.insert("g").attr("class","branchLabel"),s=a.insert("g").attr("class","label branch-label");s.node()?.appendChild(n);const c=n.getBBox();l=Ort(t.name,l,e,c,i),s.remove(),a.remove(),r.remove()})),Lrt(o,hrt,!1),art.showBranches&&Drt(o,s),Rrt(o,hrt),Lrt(o,hrt,!0),Dk.insertTitle(o,"gitTitleText",art.titleTopMargin??0,a.getDiagramTitle()),tr(void 0,o,art.diagramPadding,art.useMaxWidth)}),"draw"),Brt={draw:Prt},$rt=o((t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles"),Frt={parser:irt,db:Knt,renderer:Brt,styles:$rt},zrt=Object.freeze({__proto__:null,diagram:Frt}),Urt=l({"../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/isoWeek.js"(t,e){!function(n,r){"object"==typeof t&&void 0!==e?e.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_isoWeek=r()}(t,(function(){var t="day";return function(e,n,r){var i=o((function(e){return e.add(4-e.isoWeekday(),t)}),"a"),a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,a,s,o=i(this),l=(n=this.isoWeekYear(),s=4-(a=(this.$u?r.utc:r)().year(n).startOf("year")).isoWeekday(),a.isoWeekday()>4&&(s+=7),a.add(s,t));return o.diff(l,"week")+1},a.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var s=a.startOf;a.startOf=function(t,e){var n=this.$utils(),r=!!n.u(e)||e;return"isoweek"===n.p(t)?r?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(t,e)}}}))}}),Grt=l({"../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/customParseFormat.js"(t,e){!function(n,r){"object"==typeof t&&void 0!==e?e.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_customParseFormat=r()}(t,(function(){var t={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"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},l=o((function(t){return(t=+t)+(t>68?1900:2e3)}),"a"),c=o((function(t){return function(e){this[t]=+e}}),"f"),h=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],u=o((function(t){var e=s[t];return e&&(e.indexOf?e:e.s.concat(e.f))}),"u"),d=o((function(t,e){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n}),"d"),p={A:[a,function(t){this.afternoon=d(t,!1)}],a:[a,function(t){this.afternoon=d(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[r,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,c("seconds")],ss:[i,c("seconds")],m:[i,c("minutes")],mm:[i,c("minutes")],H:[i,c("hours")],h:[i,c("hours")],HH:[i,c("hours")],hh:[i,c("hours")],D:[i,c("day")],DD:[r,c("day")],Do:[a,function(t){var e=s.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],w:[i,c("week")],ww:[r,c("week")],M:[i,c("month")],MM:[r,c("month")],MMM:[a,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[r,function(t){this.year=l(t)}],YYYY:[/\d{4}/,c("year")],Z:h,ZZ:h};function g(n){var r,i;r=n,i=s&&s.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var a=r&&r.toUpperCase();return n||i[r]||t[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=a.length,l=0;l-1)return new Date(("X"===e?1e3:1)*t);var i=g(e)(t),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,p=i.week,f=new Date,m=o||(a||s?1:f.getDate()),y=a||f.getFullYear(),v=0;a&&!s||(v=s>0?s-1:f.getMonth());var x,b=l||0,w=c||0,k=h||0,T=u||0;return d?new Date(Date.UTC(y,v,m,b,w,k,T+60*d.offset*1e3)):n?new Date(Date.UTC(y,v,m,b,w,k,T)):(x=new Date(y,v,m,b,w,k,T),p&&(x=r(x).week(p).toDate()),x)}catch(t){return new Date("")}}(e,o,r,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),h&&e!=this.format(o)&&(this.$d=new Date("")),s={}}else if(o instanceof Array)for(var d=o.length,p=1;p<=d;p+=1){a[1]=o[p-1];var f=n.apply(this,a);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}p===d&&(this.$d=new Date(""))}else i.call(this,t)}}}))}}),qrt=l({"../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/advancedFormat.js"(t,e){!function(n,r){"object"==typeof t&&void 0!==e?e.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_advancedFormat=r()}(t,(function(){return function(t,e){var n=e.prototype,r=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return r.bind(this)(t);var i=this.$utils(),a=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return i.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return i.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return i.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return r.bind(this)(a)}}}))}}),jrt=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],s=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],_=[1,23],E=[1,25],C=[1,35],S={trace:o((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:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:r.setWeekday("monday");break;case 9:r.setWeekday("tuesday");break;case 10:r.setWeekday("wednesday");break;case 11:r.setWeekday("thursday");break;case 12:r.setWeekday("friday");break;case 13:r.setWeekday("saturday");break;case 14:r.setWeekday("sunday");break;case 15:r.setWeekend("friday");break;case 16:r.setWeekend("saturday");break;case 17:r.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:r.TopAxis(),this.$=a[o].substr(8);break;case 20:r.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:r.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:r.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:r.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:r.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:r.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:r.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],r.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],null),r.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-2],a[o-1]),r.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],r.setClickEvent(a[o-2],a[o],null),r.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-1],a[o]),r.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],r.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:s,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:_,37:24,38:E,40:C},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:s,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:_,37:24,38:E,40:C},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},A=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");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 t}();function L(){this.yy={}}return S.lexer=A,o(L,"Parser"),L.prototype=S,S.Parser=L,new L}();jrt.parser=jrt;var Yrt=jrt,Wrt=p(qy(),1),Hrt=p(g(),1),Vrt=p(Urt(),1),Xrt=p(Grt(),1),Krt=p(qrt(),1);Hrt.default.extend(Vrt.default),Hrt.default.extend(Xrt.default),Hrt.default.extend(Krt.default);var Zrt,Qrt,Jrt={friday:5,saturday:6},tit="",eit="",nit=void 0,rit="",iit=[],ait=[],sit=new Map,oit=[],lit=[],cit="",hit="",uit=["active","done","crit","milestone"],dit=[],pit=!1,git=!1,fit="sunday",mit="saturday",yit=0,vit=o((function(){oit=[],lit=[],cit="",dit=[],Kit=0,Zrt=void 0,Qrt=void 0,tat=[],tit="",eit="",hit="",nit=void 0,rit="",iit=[],ait=[],pit=!1,git=!1,yit=0,sit=new Map,Un(),fit="sunday",mit="saturday"}),"clear"),xit=o((function(t){eit=t}),"setAxisFormat"),bit=o((function(){return eit}),"getAxisFormat"),wit=o((function(t){nit=t}),"setTickInterval"),kit=o((function(){return nit}),"getTickInterval"),Tit=o((function(t){rit=t}),"setTodayMarker"),_it=o((function(){return rit}),"getTodayMarker"),Eit=o((function(t){tit=t}),"setDateFormat"),Cit=o((function(){pit=!0}),"enableInclusiveEndDates"),Sit=o((function(){return pit}),"endDatesAreInclusive"),Ait=o((function(){git=!0}),"enableTopAxis"),Lit=o((function(){return git}),"topAxisEnabled"),Nit=o((function(t){hit=t}),"setDisplayMode"),Iit=o((function(){return hit}),"getDisplayMode"),Mit=o((function(){return tit}),"getDateFormat"),Rit=o((function(t){iit=t.toLowerCase().split(/[\s,]+/)}),"setIncludes"),Dit=o((function(){return iit}),"getIncludes"),Oit=o((function(t){ait=t.toLowerCase().split(/[\s,]+/)}),"setExcludes"),Pit=o((function(){return ait}),"getExcludes"),Bit=o((function(){return sit}),"getLinks"),$it=o((function(t){cit=t,oit.push(t)}),"addSection"),Fit=o((function(){return oit}),"getSections"),zit=o((function(){let t=aat();let e=0;for(;!t&&e<10;)t=aat(),e++;return lit=tat}),"getTasks"),Uit=o((function(t,e,n,r){return!r.includes(t.format(e.trim()))&&(!(!n.includes("weekends")||t.isoWeekday()!==Jrt[mit]&&t.isoWeekday()!==Jrt[mit]+1)||(!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim()))))}),"isInvalidDate"),Git=o((function(t){fit=t}),"setWeekday"),qit=o((function(){return fit}),"getWeekday"),jit=o((function(t){mit=t}),"setWeekend"),Yit=o((function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i,a;i=t.startTime instanceof Date?(0,Hrt.default)(t.startTime):(0,Hrt.default)(t.startTime,e,!0),i=i.add(1,"d"),a=t.endTime instanceof Date?(0,Hrt.default)(t.endTime):(0,Hrt.default)(t.endTime,e,!0);const[s,o]=Wit(i,a,e,n,r);t.endTime=s.toDate(),t.renderEndTime=o}),"checkTaskDates"),Wit=o((function(t,e,n,r,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=Uit(t,n,r,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]}),"fixTaskDates"),Hit=o((function(t,e,n){n=n.trim();const r=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==r){let t=null;for(const e of r.groups.ids.split(" ")){let n=rat(e);void 0!==n&&(!t||n.endTime>t.endTime)&&(t=n)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let i=(0,Hrt.default)(n,e.trim(),!0);if(i.isValid())return i.toDate();{y.debug("Invalid date:"+n),y.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}}),"getStartDate"),Vit=o((function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]}),"parseDuration"),Xit=o((function(t,e,n,r=!1){n=n.trim();const i=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const e of i.groups.ids.split(" ")){let n=rat(e);void 0!==n&&(!t||n.startTime{window.open(n,"_self")})),sit.set(t,n))})),oat(t,"clickable")}),"setLink"),oat=o((function(t,e){t.split(",").forEach((function(t){let n=rat(t);void 0!==n&&n.classes.push(e)}))}),"setClass"),lat=o((function(t,e,n){if("loose"!==Kn().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{Dk.runFunc(e,...r)}))}),"setClickFun"),cat=o((function(t,e){dit.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))}),"pushFun"),hat=o((function(t,e,n){t.split(",").forEach((function(t){lat(t,e,n)})),oat(t,"clickable")}),"setClickEvent"),uat=o((function(t){dit.forEach((function(e){e(t)}))}),"bindFunctions"),dat={getConfig:o((()=>Kn().gantt),"getConfig"),clear:vit,setDateFormat:Eit,getDateFormat:Mit,enableInclusiveEndDates:Cit,endDatesAreInclusive:Sit,enableTopAxis:Ait,topAxisEnabled:Lit,setAxisFormat:xit,getAxisFormat:bit,setTickInterval:wit,getTickInterval:kit,setTodayMarker:Tit,getTodayMarker:_it,setAccTitle:Gn,getAccTitle:qn,setDiagramTitle:Wn,getDiagramTitle:Hn,setDisplayMode:Nit,getDisplayMode:Iit,setAccDescription:jn,getAccDescription:Yn,addSection:$it,getSections:Fit,getTasks:zit,addTask:nat,findTaskById:rat,addTaskOrg:iat,setIncludes:Rit,getIncludes:Dit,setExcludes:Oit,getExcludes:Pit,setClickEvent:hat,setLink:sat,getLinks:Bit,bindFunctions:uat,parseDuration:Vit,isInvalidDate:Uit,setWeekday:Git,getWeekday:qit,setWeekend:jit};function pat(t,e,n){let r=!0;for(;r;)r=!1,n.forEach((function(n){const i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}o(pat,"getTaskTags");var gat,fat=p(g(),1),mat=o((function(){y.debug("Something is calling, setConf, remove the call")}),"setConf"),yat={monday:Nl,tuesday:Il,wednesday:Ml,thursday:Rl,friday:Dl,saturday:Ol,sunday:Ll},vat=o(((t,e)=>{let n=[...t].map((()=>-1/0)),r=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),i=0;for(const t of r)for(let r=0;r=n[r]){n[r]=t.endTime,t.order=r+e,r>i&&(i=r);break}return i}),"getMaxIntersections"),xat=o((function(t,e,n,r){const i=Kn().gantt,a=Kn().securityLevel;let s;"sandbox"===a&&(s=Fa("#i"+e));const l=Fa("sandbox"===a?s.nodes()[0].contentDocument.body:"body"),c="sandbox"===a?s.nodes()[0].contentDocument:document,h=c.getElementById(e);void 0===(gat=h.parentElement.offsetWidth)&&(gat=1200),void 0!==i.useWidth&&(gat=i.useWidth);const u=r.db.getTasks();let d=[];for(const t of u)d.push(t.type);d=E(d);const p={};let g=2*i.topPadding;if("compact"===r.db.getDisplayMode()||"compact"===i.displayMode){const t={};for(const e of u)void 0===t[e.section]?t[e.section]=[e]:t[e.section].push(e);let e=0;for(const n of Object.keys(t)){const r=vat(t[n],e)+1;e+=r,g+=r*(i.barHeight+i.barGap),p[n]=r}}else{g+=u.length*(i.barHeight+i.barGap);for(const t of d)p[t]=u.filter((e=>e.type===t)).length}h.setAttribute("viewBox","0 0 "+gat+" "+g);const f=l.select(`[id="${e}"]`),m=Eh().domain([or(u,(function(t){return t.startTime})),sr(u,(function(t){return t.endTime}))]).rangeRound([0,gat-i.leftPadding-i.rightPadding]);function v(t,e){const n=t.startTime,r=e.startTime;let i=0;return n>r?i=1:nt.order)))].map((e=>t.find((t=>t.order===e))));f.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+a-2})).attr("width",(function(){return c-i.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of d.entries())if(t.type===n)return"section section"+e%i.numberSectionStyles;return"section section0"}));const u=f.append("g").selectAll("rect").data(t).enter(),p=r.db.getLinks();u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?m(t.startTime)+s+.5*(m(t.endTime)-m(t.startTime))-.5*o:m(t.startTime)+s})).attr("y",(function(t,e){return t.order*n+a})).attr("width",(function(t){return t.milestone?o:m(t.renderEndTime||t.endTime)-m(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(m(t.startTime)+s+.5*(m(t.endTime)-m(t.startTime))).toString()+"px "+(e*n+a+.5*o).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[e,r]of d.entries())t.type===r&&(n=e%i.numberSectionStyles);let r="";return t.active?t.crit?r+=" activeCrit":r=" active":t.done?r=t.crit?" doneCrit":" done":t.crit&&(r+=" crit"),0===r.length&&(r=" task"),t.milestone&&(r=" milestone "+r),r+=n,r+=" "+e,"task"+r})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",i.fontSize).attr("x",(function(t){let e=m(t.startTime),n=m(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(m(t.endTime)-m(t.startTime))-.5*o),t.milestone&&(n=e+o);const r=this.getBBox().width;return r>n-e?n+r+1.5*i.leftPadding>c?e+s-5:n+s+5:(n-e)/2+e+s})).attr("y",(function(t,e){return t.order*n+i.barHeight/2+(i.fontSize/2-2)+a})).attr("text-height",o).attr("class",(function(t){const e=m(t.startTime);let n=m(t.endTime);t.milestone&&(n=e+o);const r=this.getBBox().width;let a="";t.classes.length>0&&(a=t.classes.join(" "));let s=0;for(const[e,n]of d.entries())t.type===n&&(s=e%i.numberSectionStyles);let l="";return t.active&&(l=t.crit?"activeCritText"+s:"activeText"+s),t.done?l=t.crit?l+" doneCritText"+s:l+" doneText"+s:t.crit&&(l=l+" critText"+s),t.milestone&&(l+=" milestoneText"),r>n-e?n+r+1.5*i.leftPadding>c?a+" taskTextOutsideLeft taskTextOutside"+s+" "+l:a+" taskTextOutsideRight taskTextOutside"+s+" "+l+" width-"+r:a+" taskText taskText"+s+" "+l+" width-"+r}));if("sandbox"===Kn().securityLevel){let t;t=Fa("#i"+e);const n=t.nodes()[0].contentDocument;u.filter((function(t){return p.has(t.id)})).each((function(t){var e=n.querySelector("#"+t.id),r=n.querySelector("#"+t.id+"-text");const i=e.parentNode;var a=n.createElement("a");a.setAttribute("xlink:href",p.get(t.id)),a.setAttribute("target","_top"),i.appendChild(a),a.appendChild(e),a.appendChild(r)}))}}function w(t,e,n,a,s,o,l,c){if(0===l.length&&0===c.length)return;let h,u;for(const{startTime:t,endTime:e}of o)(void 0===h||tu)&&(u=e);if(!h||!u)return;if((0,fat.default)(u).diff((0,fat.default)(h),"year")>5)return void y.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const d=r.db.getDateFormat(),p=[];let g=null,v=(0,fat.default)(h);for(;v.valueOf()<=u;)r.db.isInvalidDate(v,d,l,c)?g?g.end=v:g={start:v,end:v}:g&&(p.push(g),g=null),v=v.add(1,"d");f.append("g").selectAll("rect").data(p).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return m(t.start)+n})).attr("y",i.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return m(e)-m(t.start)})).attr("height",s-e-i.gridLineStartPadding).attr("transform-origin",(function(e,r){return(m(e.start)+n+.5*(m(e.end)-m(e.start))).toString()+"px "+(r*t+.5*s).toString()+"px"})).attr("class","exclude-range")}function k(t,e,n,a){let s=$r(m).tickSize(-a+e+i.gridLineStartPadding).tickFormat(nc(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(null!==o){const t=o[1],e=o[2],n=r.db.getWeekday()||i.weekday;switch(e){case"millisecond":s.ticks(dl.every(t));break;case"second":s.ticks(bl.every(t));break;case"minute":s.ticks(wl.every(t));break;case"hour":s.ticks(Tl.every(t));break;case"day":s.ticks(El.every(t));break;case"week":s.ticks(yat[n].every(t));break;case"month":s.ticks(jl.every(t))}}if(f.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(s).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let n=Br(m).tickSize(-a+e+i.gridLineStartPadding).tickFormat(nc(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],a=r.db.getWeekday()||i.weekday;switch(e){case"millisecond":n.ticks(dl.every(t));break;case"second":n.ticks(bl.every(t));break;case"minute":n.ticks(wl.every(t));break;case"hour":n.ticks(Tl.every(t));break;case"day":n.ticks(El.every(t));break;case"week":n.ticks(yat[a].every(t));break;case"month":n.ticks(jl.every(t))}}f.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function T(t,e){let n=0;const r=Object.keys(p).map((t=>[t,p[t]]));f.append("g").selectAll("text").data(r).enter().append((function(t){const e=t[0].split(Sn.lineBreakRegex),n=-(e.length-1)/2,r=c.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(const[t,n]of e.entries()){const e=c.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),t>0&&e.setAttribute("dy","1em"),e.textContent=n,r.appendChild(e)}return r})).attr("x",10).attr("y",(function(i,a){if(!(a>0))return i[1]*t/2+e;for(let s=0;s`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`),"getStyles")},wat=Object.freeze({__proto__:null,diagram:bat}),kat={parse:o((async t=>{const e=await cnt("info",t);y.debug(e)}),"parse")},Tat=t,_at={getVersion:o((()=>Tat),"getVersion")},Eat=o(((t,e,n)=>{y.debug("rendering info diagram\n"+t);const r=ng(e);Nn(r,100,400,!0);r.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)}),"draw"),Cat={parser:kat,db:_at,renderer:{draw:Eat}},Sat=Object.freeze({__proto__:null,diagram:Cat}),Aat=Lt.pie,Lat={sections:new Map,showData:!1,config:Aat},Nat=Lat.sections,Iat=Lat.showData,Mat=structuredClone(Aat),Rat=o((()=>structuredClone(Mat)),"getConfig"),Dat=o((()=>{Nat=new Map,Iat=Lat.showData,Un()}),"clear"),Oat=o((({label:t,value:e})=>{Nat.has(t)||(Nat.set(t,e),y.debug(`added new section: ${t}, with value: ${e}`))}),"addSection"),Pat={getConfig:Rat,clear:Dat,setDiagramTitle:Wn,getDiagramTitle:Hn,setAccTitle:Gn,getAccTitle:qn,setAccDescription:jn,getAccDescription:Yn,addSection:Oat,getSections:o((()=>Nat),"getSections"),setShowData:o((t=>{Iat=t}),"setShowData"),getShowData:o((()=>Iat),"getShowData")},Bat=o(((t,e)=>{ZK(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)}),"populateDb"),$at={parse:o((async t=>{const e=await cnt("pie",t);y.debug(e),Bat(e,Pat)}),"parse")},Fat=o((t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`),"getStyles"),zat=o((t=>{const e=[...t.entries()].map((t=>({label:t[0],value:t[1]}))).sort(((t,e)=>e.value-t.value));return gu().value((t=>t.value))(e)}),"createPieArcs"),Uat=o(((t,e,n,r)=>{y.debug("rendering pie chart\n"+t);const i=r.db,a=Kn(),s=Rk(i.getConfig(),a.pie),o=18,l=450,c=ng(e),h=c.append("g");h.attr("transform","translate(225,225)");const{themeVariables:u}=a;let[d]=Mk(u.pieOuterStrokeWidth);d??=2;const p=s.textPosition,g=Math.min(450,l)/2-40,f=au().innerRadius(0).outerRadius(g),m=au().innerRadius(g*p).outerRadius(g*p);h.append("circle").attr("cx",0).attr("cy",0).attr("r",g+d/2).attr("class","pieOuterCircle");const v=i.getSections(),x=zat(v),b=_o([u.pie1,u.pie2,u.pie3,u.pie4,u.pie5,u.pie6,u.pie7,u.pie8,u.pie9,u.pie10,u.pie11,u.pie12]);h.selectAll("mySlices").data(x).enter().append("path").attr("d",f).attr("fill",(t=>b(t.data.label))).attr("class","pieCircle");let w=0;v.forEach((t=>{w+=t})),h.selectAll("mySlices").data(x).enter().append("text").text((t=>(t.data.value/w*100).toFixed(0)+"%")).attr("transform",(t=>"translate("+m.centroid(t)+")")).style("text-anchor","middle").attr("class","slice"),h.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const k=h.selectAll(".legend").data(b.domain()).enter().append("g").attr("class","legend").attr("transform",((t,e)=>"translate(216,"+(22*e-22*b.domain().length/2)+")"));k.append("rect").attr("width",o).attr("height",o).style("fill",b).style("stroke",b),k.data(x).append("text").attr("x",22).attr("y",14).text((t=>{const{label:e,value:n}=t.data;return i.getShowData()?`${e} [${n}]`:e}));const T=Math.max(...k.selectAll("text").nodes().map((t=>t?.getBoundingClientRect().width??0))),_=512+T;c.attr("viewBox",`0 0 ${_} 450`),Nn(c,l,_,s.useMaxWidth)}),"draw"),Gat={parser:$at,db:Pat,renderer:{draw:Uat},styles:Fat},qat=Object.freeze({__proto__:null,diagram:Gat}),jat=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,3],n=[1,4],r=[1,5],i=[1,6],a=[1,7],s=[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],c=[55,56,57],h=[2,36],u=[1,37],d=[1,36],p=[1,38],g=[1,35],f=[1,43],m=[1,41],y=[1,14],v=[1,23],x=[1,18],b=[1,19],w=[1,20],k=[1,21],T=[1,22],_=[1,24],E=[1,25],C=[1,26],S=[1,27],A=[1,28],L=[1,29],N=[1,32],I=[1,33],M=[1,34],R=[1,39],D=[1,40],O=[1,42],P=[1,44],B=[1,62],$=[1,61],F=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],z=[1,65],U=[1,66],G=[1,67],q=[1,68],j=[1,69],Y=[1,70],W=[1,71],H=[1,72],V=[1,73],X=[1,74],K=[1,75],Z=[1,76],Q=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],nt=[1,99],rt=[1,93],it=[1,96],at=[1,94],st=[1,95],ot=[1,97],lt=[1,98],ct=[1,102],ht=[10,55,56,57],ut=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],dt={trace:o((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:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 23:case 68:this.$=a[o];break;case 24:case 69:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:r.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:r.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:r.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:r.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:r.setXAxisLeftText(a[o-2]),r.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",r.setXAxisLeftText(a[o-1]);break;case 53:r.setXAxisLeftText(a[o]);break;case 54:r.setYAxisBottomText(a[o-2]),r.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",r.setYAxisBottomText(a[o-1]);break;case 56:r.setYAxisBottomText(a[o]);break;case 57:r.setQuadrant1Text(a[o]);break;case 58:r.setQuadrant2Text(a[o]);break;case 59:r.setQuadrant3Text(a[o]);break;case 60:r.setQuadrant4Text(a[o]);break;case 64:case 66:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 67:this.$={text:a[o],type:"markdown"}}}),"anonymous"),table:[{18:e,26:1,27:2,28:n,55:r,56:i,57:a},{1:[3]},{18:e,26:8,27:2,28:n,55:r,56:i,57:a},{18:e,26:9,27:2,28:n,55:r,56:i,57:a},t(s,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(c,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:d,10:p,12:g,13:f,14:m,18:y,25:v,35:x,37:b,39:w,41:k,42:T,48:_,50:E,51:C,52:S,53:A,54:L,60:N,61:I,63:M,64:R,65:D,66:O,67:P}),t(s,[2,34]),{27:45,55:r,56:i,57:a},t(c,[2,37]),t(c,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:u,5:d,10:p,12:g,13:f,14:m,18:y,25:v,35:x,37:b,39:w,41:k,42:T,48:_,50:E,51:C,52:S,53:A,54:L,60:N,61:I,63:M,64:R,65:D,66:O,67:P}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(c,[2,45]),t(c,[2,46]),{18:[1,50]},{4:u,5:d,10:p,12:g,13:f,14:m,43:51,58:31,60:N,61:I,63:M,64:R,65:D,66:O,67:P},{4:u,5:d,10:p,12:g,13:f,14:m,43:52,58:31,60:N,61:I,63:M,64:R,65:D,66:O,67:P},{4:u,5:d,10:p,12:g,13:f,14:m,43:53,58:31,60:N,61:I,63:M,64:R,65:D,66:O,67:P},{4:u,5:d,10:p,12:g,13:f,14:m,43:54,58:31,60:N,61:I,63:M,64:R,65:D,66:O,67:P},{4:u,5:d,10:p,12:g,13:f,14:m,43:55,58:31,60:N,61:I,63:M,64:R,65:D,66:O,67:P},{4:u,5:d,10:p,12:g,13:f,14:m,43:56,58:31,60:N,61:I,63:M,64:R,65:D,66:O,67:P},{4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,44:[1,57],47:[1,58],58:60,59:59,63:M,64:R,65:D,66:O,67:P},t(F,[2,64]),t(F,[2,66]),t(F,[2,67]),t(F,[2,70]),t(F,[2,71]),t(F,[2,72]),t(F,[2,73]),t(F,[2,74]),t(F,[2,75]),t(F,[2,76]),t(F,[2,77]),t(F,[2,78]),t(F,[2,79]),t(F,[2,80]),t(s,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:64,4:z,5:U,6:G,7:q,8:j,9:Y,10:W,11:H,12:V,13:X,14:K,15:Z,21:63},t(c,[2,53],{59:59,58:60,4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,49:[1,77],63:M,64:R,65:D,66:O,67:P}),t(c,[2,56],{59:59,58:60,4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,49:[1,78],63:M,64:R,65:D,66:O,67:P}),t(c,[2,57],{59:59,58:60,4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,63:M,64:R,65:D,66:O,67:P}),t(c,[2,58],{59:59,58:60,4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,63:M,64:R,65:D,66:O,67:P}),t(c,[2,59],{59:59,58:60,4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,63:M,64:R,65:D,66:O,67:P}),t(c,[2,60],{59:59,58:60,4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,63:M,64:R,65:D,66:O,67:P}),{45:[1,79]},{44:[1,80]},t(F,[2,65]),t(F,[2,81]),t(F,[2,82]),t(F,[2,83]),{3:82,4:z,5:U,6:G,7:q,8:j,9:Y,10:W,11:H,12:V,13:X,14:K,15:Z,18:[1,81]},t(Q,[2,23]),t(Q,[2,1]),t(Q,[2,2]),t(Q,[2,3]),t(Q,[2,4]),t(Q,[2,5]),t(Q,[2,6]),t(Q,[2,7]),t(Q,[2,8]),t(Q,[2,9]),t(Q,[2,10]),t(Q,[2,11]),t(Q,[2,12]),t(c,[2,52],{58:31,43:83,4:u,5:d,10:p,12:g,13:f,14:m,60:N,61:I,63:M,64:R,65:D,66:O,67:P}),t(c,[2,55],{58:31,43:84,4:u,5:d,10:p,12:g,13:f,14:m,60:N,61:I,63:M,64:R,65:D,66:O,67:P}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:nt,11:rt,13:it,16:89,17:at,18:st,19:ot,20:lt,22:88,23:87},t(Q,[2,24]),t(c,[2,51],{59:59,58:60,4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,63:M,64:R,65:D,66:O,67:P}),t(c,[2,54],{59:59,58:60,4:u,5:d,8:B,10:p,12:g,13:f,14:m,18:$,63:M,64:R,65:D,66:O,67:P}),t(c,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:nt,11:rt,13:it,17:at,18:st,19:ot,20:lt}),{46:[1,101]},t(c,[2,29],{10:ct}),t(ht,[2,27],{16:103,4:J,5:tt,6:et,8:nt,11:rt,13:it,17:at,18:st,19:ot,20:lt}),t(ut,[2,25]),t(ut,[2,13]),t(ut,[2,14]),t(ut,[2,15]),t(ut,[2,16]),t(ut,[2,17]),t(ut,[2,18]),t(ut,[2,19]),t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(c,[2,49],{10:ct}),t(c,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:nt,11:rt,13:it,17:at,18:st,19:ot,20:lt}),{4:J,5:tt,6:et,8:nt,11:rt,13:it,16:89,17:at,18:st,19:ot,20:lt,22:105},t(ut,[2,26]),t(c,[2,50],{10:ct}),t(ht,[2,28],{16:103,4:J,5:tt,6:et,8:nt,11:rt,13:it,17:at,18:st,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},pt=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31: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 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return t}();function gt(){this.yy={}}return dt.lexer=pt,o(gt,"Parser"),gt.prototype=dt,dt.Parser=gt,new gt}();jat.parser=jat;var Yat=jat,Wat=bt(),Hat=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{o(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:Lt.quadrantChart?.chartWidth||500,chartWidth:Lt.quadrantChart?.chartHeight||500,titlePadding:Lt.quadrantChart?.titlePadding||10,titleFontSize:Lt.quadrantChart?.titleFontSize||20,quadrantPadding:Lt.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:Lt.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:Lt.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:Lt.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:Lt.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:Lt.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:Lt.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:Lt.quadrantChart?.pointTextPadding||5,pointLabelFontSize:Lt.quadrantChart?.pointLabelFontSize||12,pointRadius:Lt.quadrantChart?.pointRadius||5,xAxisPosition:Lt.quadrantChart?.xAxisPosition||"top",yAxisPosition:Lt.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:Lt.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:Lt.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Wat.quadrant1Fill,quadrant2Fill:Wat.quadrant2Fill,quadrant3Fill:Wat.quadrant3Fill,quadrant4Fill:Wat.quadrant4Fill,quadrant1TextFill:Wat.quadrant1TextFill,quadrant2TextFill:Wat.quadrant2TextFill,quadrant3TextFill:Wat.quadrant3TextFill,quadrant4TextFill:Wat.quadrant4TextFill,quadrantPointFill:Wat.quadrantPointFill,quadrantPointTextFill:Wat.quadrantPointTextFill,quadrantXAxisTextFill:Wat.quadrantXAxisTextFill,quadrantYAxisTextFill:Wat.quadrantYAxisTextFill,quadrantTitleFill:Wat.quadrantTitleFill,quadrantInternalBorderStrokeFill:Wat.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Wat.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,y.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){y.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){y.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,n,r){const i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,a={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},s=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&n?s:0,right:"right"===this.config.yAxisPosition&&n?s:0},l=this.config.titleFontSize+2*this.config.titlePadding,c={top:r?l:0},h=this.config.quadrantPadding+o.left,u=this.config.quadrantPadding+a.top+c.top,d=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,p=this.config.chartHeight-2*this.config.quadrantPadding-a.top-a.bottom-c.top;return{xAxisSpace:a,yAxisSpace:o,titleSpace:c,quadrantSpace:{quadrantLeft:h,quadrantTop:u,quadrantWidth:d,quadrantHalfWidth:d/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(t,e,n,r){const{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:s,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:c,quadrantTop:h,quadrantWidth:u}=i,d=Boolean(this.data.xAxisRightText),p=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?c/2:0),y:"top"===t?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+c+(d?c/2:0),y:"top"===t?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+u+this.config.quadrantPadding,y:h+o-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+u+this.config.quadrantPadding,y:h+s-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=e,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(const t of s)t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return s}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:n,quadrantLeft:r,quadrantTop:i,quadrantWidth:a}=e,s=ll().domain([0,1]).range([r,a+r]),o=ll().domain([0,1]).range([n+i,i]),l=this.data.points.map((t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:s(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}}));return l}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=t,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:o,quadrantWidth:l}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o,x2:a+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:o+e,x2:a+l,y2:o+i-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o+i,x2:a+l+e,y2:o+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:o+e,x2:a,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:o+e,x2:a+s,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+e,y1:o+r,x2:a+l-e,y2:o+r}]}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(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(r,t,e,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},Vat=class extends Error{static{o(this,"InvalidStyleError")}constructor(t,e,n){super(`value for ${t} ${e} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}};function Xat(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function Kat(t){return!/^\d+$/.test(t)}function Zat(t){return!/^\d+px$/.test(t)}o(Xat,"validateHexCode"),o(Kat,"validateNumber"),o(Zat,"validateSizeInPixels");var Qat=Kn();function Jat(t){return ln(t.trim(),Qat)}o(Jat,"textSanitizer");var tst=new Hat;function est(t){tst.setData({quadrant1Text:Jat(t.text)})}function nst(t){tst.setData({quadrant2Text:Jat(t.text)})}function rst(t){tst.setData({quadrant3Text:Jat(t.text)})}function ist(t){tst.setData({quadrant4Text:Jat(t.text)})}function ast(t){tst.setData({xAxisLeftText:Jat(t.text)})}function sst(t){tst.setData({xAxisRightText:Jat(t.text)})}function ost(t){tst.setData({yAxisTopText:Jat(t.text)})}function lst(t){tst.setData({yAxisBottomText:Jat(t.text)})}function cst(t){const e={};for(const n of t){const[t,r]=n.trim().split(/\s*:\s*/);if("radius"===t){if(Kat(r))throw new Vat(t,r,"number");e.radius=parseInt(r)}else if("color"===t){if(Xat(r))throw new Vat(t,r,"hex code");e.color=r}else if("stroke-color"===t){if(Xat(r))throw new Vat(t,r,"hex code");e.strokeColor=r}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(Zat(r))throw new Vat(t,r,"number of pixels (eg. 10px)");e.strokeWidth=r}}return e}function hst(t,e,n,r,i){const a=cst(i);tst.addPoints([{x:n,y:r,text:Jat(t.text),className:e,...a}])}function ust(t,e){tst.addClass(t,cst(e))}function dst(t){tst.setConfig({chartWidth:t})}function pst(t){tst.setConfig({chartHeight:t})}function gst(){const t=Kn(),{themeVariables:e,quadrantChart:n}=t;return n&&tst.setConfig(n),tst.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),tst.setData({titleText:Hn()}),tst.build()}o(est,"setQuadrant1Text"),o(nst,"setQuadrant2Text"),o(rst,"setQuadrant3Text"),o(ist,"setQuadrant4Text"),o(ast,"setXAxisLeftText"),o(sst,"setXAxisRightText"),o(ost,"setYAxisTopText"),o(lst,"setYAxisBottomText"),o(cst,"parseStyles"),o(hst,"addPoint"),o(ust,"addClass"),o(dst,"setWidth"),o(pst,"setHeight"),o(gst,"getQuadrantData");var fst={setWidth:dst,setHeight:pst,setQuadrant1Text:est,setQuadrant2Text:nst,setQuadrant3Text:rst,setQuadrant4Text:ist,setXAxisLeftText:ast,setXAxisRightText:sst,setYAxisTopText:ost,setYAxisBottomText:lst,parseStyles:cst,addPoint:hst,addClass:ust,getQuadrantData:gst,clear:o((function(){tst.clear(),Un()}),"clear"),setAccTitle:Gn,getAccTitle:qn,setDiagramTitle:Wn,getDiagramTitle:Hn,getAccDescription:Yn,setAccDescription:jn},mst=o(((t,e,n,r)=>{function i(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function s(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}o(i,"getDominantBaseLine"),o(a,"getTextAnchor"),o(s,"getTransformation");const l=Kn();y.debug("Rendering quadrant chart\n"+t);const c=l.securityLevel;let h;"sandbox"===c&&(h=Fa("#i"+e));const u=Fa("sandbox"===c?h.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`),d=u.append("g").attr("class","main"),p=l.quadrantChart?.chartWidth??500,g=l.quadrantChart?.chartHeight??500;Nn(u,g,p,l.quadrantChart?.useMaxWidth??!0),u.attr("viewBox","0 0 "+p+" "+g),r.db.setHeight(g),r.db.setWidth(p);const f=r.db.getQuadrantData(),m=d.append("g").attr("class","quadrants"),v=d.append("g").attr("class","border"),x=d.append("g").attr("class","data-points"),b=d.append("g").attr("class","labels"),w=d.append("g").attr("class","title");f.title&&w.append("text").attr("x",0).attr("y",0).attr("fill",f.title.fill).attr("font-size",f.title.fontSize).attr("dominant-baseline",i(f.title.horizontalPos)).attr("text-anchor",a(f.title.verticalPos)).attr("transform",s(f.title)).text(f.title.text),f.borderLines&&v.selectAll("line").data(f.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const k=m.selectAll("g.quadrant").data(f.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),k.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>i(t.text.horizontalPos))).attr("text-anchor",(t=>a(t.text.verticalPos))).attr("transform",(t=>s(t.text))).text((t=>t.text.text));b.selectAll("g.label").data(f.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>i(t.horizontalPos))).attr("text-anchor",(t=>a(t.verticalPos))).attr("transform",(t=>s(t)));const T=x.selectAll("g.data-point").data(f.points).enter().append("g").attr("class","data-point");T.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeColor)).attr("stroke-width",(t=>t.strokeWidth)),T.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>i(t.text.horizontalPos))).attr("text-anchor",(t=>a(t.text.verticalPos))).attr("transform",(t=>s(t.text)))}),"draw"),yst={parser:Yat,db:fst,renderer:{draw:mst},styles:o((()=>""),"styles")},vst=Object.freeze({__proto__:null,diagram:yst}),xst=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,10,12,14,16,18,19,21,23],n=[2,6],r=[1,3],i=[1,5],a=[1,6],s=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],_=[1,50],E=[1,10,12,14,16,18,19,21,23,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],L={trace:o((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:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 5:r.setOrientation(a[o]);break;case 9:r.setDiagramTitle(a[o].text.trim());break;case 12:r.setLineData({text:"",type:"text"},a[o]);break;case 13:r.setLineData(a[o-1],a[o]);break;case 14:r.setBarData({text:"",type:"text"},a[o]);break;case 15:r.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 19:case 27:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:r.setXAxisTitle(a[o]);break;case 23:r.setXAxisTitle(a[o-1]);break;case 24:r.setXAxisTitle({type:"text",text:""});break;case 25:r.setXAxisBand(a[o]);break;case 26:r.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:r.setYAxisTitle(a[o]);break;case 31:r.setYAxisTitle(a[o-1]);break;case 32:r.setYAxisTitle({type:"text",text:""});break;case 33:r.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}}),"anonymous"),table:[t(e,n,{3:1,4:2,7:4,5:r,34:i,35:a,36:s}),{1:[3]},t(e,n,{4:2,7:4,3:8,5:r,34:i,35:a,36:s}),t(e,n,{4:2,7:4,6:9,3:10,5:r,8:[1,11],34:i,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(e,n,{4:2,7:4,3:21,5:r,34:i,35:a,36:s}),{1:[2,3]},t(l,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:s}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:39,13:38,24:w,27:k,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:45,15:44,27:T,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:49,17:48,24:_,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:52,17:51,24:_,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{20:[1,53]},{22:[1,54]},t(E,[2,18]),{1:[2,2]},t(E,[2,8]),t(E,[2,9]),t(C,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),t(C,[2,38]),t(C,[2,39]),t(S,[2,40]),t(S,[2,42]),t(S,[2,43]),t(S,[2,44]),t(S,[2,45]),t(S,[2,46]),t(S,[2,47]),t(S,[2,48]),t(S,[2,49]),t(S,[2,50]),t(S,[2,51]),t(E,[2,10]),t(E,[2,22],{30:41,29:56,24:w,27:k}),t(E,[2,24]),t(E,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},t(E,[2,11]),t(E,[2,30],{33:60,27:T}),t(E,[2,32]),{31:[1,61]},t(E,[2,12]),{17:62,24:_},{25:63,27:A},t(E,[2,14]),{17:65,24:_},t(E,[2,16]),t(E,[2,17]),t(S,[2,41]),t(E,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(E,[2,31]),{27:[1,69]},t(E,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(E,[2,15]),t(E,[2,26]),t(E,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},t(E,[2,33]),t(E,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},N=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return t}();function I(){this.yy={}}return L.lexer=N,o(I,"Parser"),I.prototype=L,L.Parser=I,new I}();xst.parser=xst;var bst=xst;function wst(t){return"bar"===t.type}function kst(t){return"band"===t.type}function Tst(t){return"linear"===t.type}o(wst,"isBarPlot"),o(kst,"isBandAxisData"),o(Tst,"isLinearAxisData");var _st=class{constructor(t){this.parentGroup=t}static{o(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce(((t,e)=>Math.max(e.length,t)),0)*e,height:e};const n={width:0,height:0},r=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(const i of t){const t=h_(r,1,i),a=t?t.width:i.length*e,s=t?t.height:e;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return r.remove(),n}},Est=class{constructor(t,e,n,r){this.axisConfig=t,this.title=e,this.textDimensionCalculator=n,this.axisThemeConfig=r,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{o(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t=>t.toString())),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const n=this.getLabelDimension(),r=.2*t.width;this.outerPadding=Math.min(n.width/2,r);const i=n.height+2*this.axisConfig.labelPadding;this.labelTextHeight=n.height,i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const n=this.getLabelDimension(),r=.2*t.height;this.outerPadding=Math.min(n.height/2,r);const i=n.width+2*this.axisConfig.labelPadding;i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"})))}),this.showTick){const e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&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(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&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(){const t=[];if(this.showAxisLine){const e=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},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&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("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},Cst=class extends Est{static{o(this,"BandAxis")}constructor(t,e,n,r,i){super(t,r,i,e),this.categories=n,this.scale=Ch().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Ch().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),y.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},Sst=class extends Est{static{o(this,"LinearAxis")}constructor(t,e,n,r,i){super(t,r,i,e),this.domain=n,this.scale=ll().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=ll().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function Ast(t,e,n,r){const i=new _st(r);return kst(t)?new Cst(e,n,t.categories,t.title,i):new Sst(e,n,[t.min,t.max],t.title,i)}o(Ast,"getAxis");var Lst=class{constructor(t,e,n,r){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{o(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(e.width,t.width),r=e.height+2*this.chartConfig.titlePadding;return e.width<=n&&e.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const 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}};function Nst(t,e,n,r){const i=new _st(r);return new Lst(i,t,e,n)}o(Nst,"getChartTitleComponent");var Ist=class{constructor(t,e,n,r,i){this.plotData=t,this.xAxis=e,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{o(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let e;return e="horizontal"===this.orientation?uu().y((t=>t[0])).x((t=>t[1]))(t):uu().x((t=>t[0])).y((t=>t[1]))(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},Mst=class{constructor(t,e,n,r,i,a){this.barData=t,this.boundingRect=e,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{o(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),n=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-n,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:t[0]-n,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}},Rst=class{constructor(t,e,n){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{o(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[e,n]of this.chartData.plots.entries())switch(n.type){case"line":{const r=new Ist(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...r.getDrawableElement())}break;case"bar":{const r=new Mst(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...r.getDrawableElement())}}return t}};function Dst(t,e,n){return new Rst(t,e,n)}o(Dst,"getPlotComponent");var Ost,Pst=class{constructor(t,e,n,r){this.chartConfig=t,this.chartData=e,this.componentStore={title:Nst(t,e,n,r),plot:Dst(t,e,n),xAxis:Ast(e.xAxis,t.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:Ast(e.yAxis,t.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{o(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,n=0,r=0,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,e-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),r=s.height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),s=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=s.height,this.componentStore.yAxis.setAxisPosition("left"),s=this.componentStore.yAxis.calculateSpace({width:t,height:e}),n=s.width,t-=s.width,t>0&&(i+=t,t=0),e>0&&(a+=e,e=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some((t=>wst(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,e-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=o.height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=o.width,r=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=o.height,i=n+o.height,t>0&&(a+=t,t=0),e>0&&(s+=e,e=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some((t=>wst(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},Bst=class{static{o(this,"XYChartBuilder")}static build(t,e,n,r){return new Pst(t,e,n,r).getDrawableElement()}},$st=0,Fst=Wst(),zst=Yst(),Ust=Hst(),Gst=zst.plotColorPalette.split(",").map((t=>t.trim())),qst=!1,jst=!1;function Yst(){const t=bt(),e=Gt();return Rk(t.xyChart,e.themeVariables.xyChart)}function Wst(){const t=Gt();return Rk(Lt.xyChart,t.xyChart)}function Hst(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Vst(t){const e=Gt();return ln(t.trim(),e)}function Xst(t){Ost=t}function Kst(t){Fst.chartOrientation="horizontal"===t?"horizontal":"vertical"}function Zst(t){Ust.xAxis.title=Vst(t.text)}function Qst(t,e){Ust.xAxis={type:"linear",title:Ust.xAxis.title,min:t,max:e},qst=!0}function Jst(t){Ust.xAxis={type:"band",title:Ust.xAxis.title,categories:t.map((t=>Vst(t.text)))},qst=!0}function tot(t){Ust.yAxis.title=Vst(t.text)}function eot(t,e){Ust.yAxis={type:"linear",title:Ust.yAxis.title,min:t,max:e},jst=!0}function not(t){const e=Math.min(...t),n=Math.max(...t),r=Tst(Ust.yAxis)?Ust.yAxis.min:1/0,i=Tst(Ust.yAxis)?Ust.yAxis.max:-1/0;Ust.yAxis={type:"linear",title:Ust.yAxis.title,min:Math.min(r,e),max:Math.max(i,n)}}function rot(t){let e=[];if(0===t.length)return e;if(!qst){const e=Tst(Ust.xAxis)?Ust.xAxis.min:1/0,n=Tst(Ust.xAxis)?Ust.xAxis.max:-1/0;Qst(Math.min(e,1),Math.max(n,t.length))}if(jst||not(t),kst(Ust.xAxis)&&(e=Ust.xAxis.categories.map(((e,n)=>[e,t[n]]))),Tst(Ust.xAxis)){const n=Ust.xAxis.min,r=Ust.xAxis.max,i=(r-n)/(t.length-1),a=[];for(let t=n;t<=r;t+=i)a.push(`${t}`);e=a.map(((e,n)=>[e,t[n]]))}return e}function iot(t){return Gst[0===t?0:t%Gst.length]}function aot(t,e){const n=rot(e);Ust.plots.push({type:"line",strokeFill:iot($st),strokeWidth:2,data:n}),$st++}function sot(t,e){const n=rot(e);Ust.plots.push({type:"bar",fill:iot($st),data:n}),$st++}function oot(){if(0===Ust.plots.length)throw Error("No Plot to render, please provide a plot with some data");return Ust.title=Hn(),Bst.build(Fst,Ust,zst,Ost)}function lot(){return zst}function cot(){return Fst}o(Yst,"getChartDefaultThemeConfig"),o(Wst,"getChartDefaultConfig"),o(Hst,"getChartDefaultData"),o(Vst,"textSanitizer"),o(Xst,"setTmpSVGG"),o(Kst,"setOrientation"),o(Zst,"setXAxisTitle"),o(Qst,"setXAxisRangeData"),o(Jst,"setXAxisBand"),o(tot,"setYAxisTitle"),o(eot,"setYAxisRangeData"),o(not,"setYAxisRangeFromPlotData"),o(rot,"transformDataWithoutCategory"),o(iot,"getPlotColorFromPalette"),o(aot,"setLineData"),o(sot,"setBarData"),o(oot,"getDrawableElem"),o(lot,"getChartThemeConfig"),o(cot,"getChartConfig");var hot=o((function(){Un(),$st=0,Fst=Wst(),Ust={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},zst=Yst(),Gst=zst.plotColorPalette.split(",").map((t=>t.trim())),qst=!1,jst=!1}),"clear"),uot={getDrawableElem:oot,clear:hot,setAccTitle:Gn,getAccTitle:qn,setDiagramTitle:Wn,getDiagramTitle:Hn,getAccDescription:Yn,setAccDescription:jn,setOrientation:Kst,setXAxisTitle:Zst,setXAxisRangeData:Qst,setXAxisBand:Jst,setYAxisTitle:tot,setYAxisRangeData:eot,setLineData:aot,setBarData:sot,setTmpSVGG:Xst,getChartThemeConfig:lot,getChartConfig:cot},dot=o(((t,e,n,r)=>{const i=r.db,a=i.getChartThemeConfig(),s=i.getChartConfig();function l(t){return"top"===t?"text-before-edge":"middle"}function c(t){return"left"===t?"start":"right"===t?"end":"middle"}function h(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}o(l,"getDominantBaseLine"),o(c,"getTextAnchor"),o(h,"getTextTransformation"),y.debug("Rendering xychart chart\n"+t);const u=ng(e),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");Nn(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} ${s.height}`),p.attr("fill",a.backgroundColor),i.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group"));const g=i.getDrawableElem(),f={};function m(t){let e=d,n="";for(const[r]of t.entries()){let i=d;r>0&&f[n]&&(i=f[n]),n+=t[r],e=f[n],e||(e=f[n]=i.append("g").attr("class",t[r]))}return e}o(m,"getGroup");for(const t of g){if(0===t.data.length)continue;const e=m(t.groupTexts);switch(t.type){case"rect":e.selectAll("rect").data(t.data).enter().append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth));break;case"text":e.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>l(t.verticalPos))).attr("text-anchor",(t=>c(t.horizontalPos))).attr("transform",(t=>h(t))).text((t=>t.text));break;case"path":e.selectAll("path").data(t.data).enter().append("path").attr("d",(t=>t.path)).attr("fill",(t=>t.fill?t.fill:"none")).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth))}}}),"draw"),pot={parser:bst,db:uot,renderer:{draw:dot}},got=Object.freeze({__proto__:null,diagram:pot}),fot=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,3],n=[1,4],r=[1,5],i=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],s=[1,18],l=[2,7],c=[1,22],h=[1,23],u=[1,24],d=[1,25],p=[1,26],g=[1,27],f=[1,20],m=[1,28],y=[1,29],v=[62,63],x=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],b=[1,47],w=[1,48],k=[1,49],T=[1,50],_=[1,51],E=[1,52],C=[1,53],S=[53,54],A=[1,64],L=[1,60],N=[1,61],I=[1,62],M=[1,63],R=[1,65],D=[1,69],O=[1,70],P=[1,67],B=[1,68],$=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],F={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:r.addRequirement(a[o-3],a[o-4]);break;case 14:r.setNewReqId(a[o-2]);break;case 15:r.setNewReqText(a[o-2]);break;case 16:r.setNewReqRisk(a[o-2]);break;case 17:r.setNewReqVerifyMethod(a[o-2]);break;case 20:this.$=r.RequirementType.REQUIREMENT;break;case 21:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=r.RiskLevel.LOW_RISK;break;case 27:this.$=r.RiskLevel.MED_RISK;break;case 28:this.$=r.RiskLevel.HIGH_RISK;break;case 29:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=r.VerifyType.VERIFY_TEST;break;case 33:r.addElement(a[o-3]);break;case 34:r.setNewElementType(a[o-2]);break;case 35:r.setNewElementDocRef(a[o-2]);break;case 38:r.addRelationship(a[o-2],a[o],a[o-4]);break;case 39:r.addRelationship(a[o-2],a[o-4],a[o]);break;case 40:this.$=r.Relationships.CONTAINS;break;case 41:this.$=r.Relationships.COPIES;break;case 42:this.$=r.Relationships.DERIVES;break;case 43:this.$=r.Relationships.SATISFIES;break;case 44:this.$=r.Relationships.VERIFIES;break;case 45:this.$=r.Relationships.REFINES;break;case 46:this.$=r.Relationships.TRACES}}),"anonymous"),table:[{3:1,4:2,6:e,9:n,11:r,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:n,11:r,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:n,11:r,13:i},{1:[2,2]},{4:17,5:s,7:13,8:l,9:n,11:r,13:i,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:s,7:31,8:l,9:n,11:r,13:i,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:s,7:32,8:l,9:n,11:r,13:i,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:s,7:33,8:l,9:n,11:r,13:i,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:s,7:34,8:l,9:n,11:r,13:i,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:s,7:35,8:l,9:n,11:r,13:i,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},t(v,[2,20]),t(v,[2,21]),t(v,[2,22]),t(v,[2,23]),t(v,[2,24]),t(v,[2,25]),t(x,[2,49]),t(x,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:b,56:w,57:k,58:T,59:_,60:E,61:C},{52:54,55:b,56:w,57:k,58:T,59:_,60:E,61:C},{5:[1,55]},{5:[1,56]},{53:[1,57]},t(S,[2,40]),t(S,[2,41]),t(S,[2,42]),t(S,[2,43]),t(S,[2,44]),t(S,[2,45]),t(S,[2,46]),{54:[1,58]},{5:A,20:59,21:L,24:N,26:I,28:M,30:R},{5:D,30:O,46:66,47:P,49:B},{23:71,62:m,63:y},{23:72,62:m,63:y},t($,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:A,20:77,21:L,24:N,26:I,28:M,30:R},t($,[2,19]),t($,[2,33]),{22:[1,78]},{22:[1,79]},{5:D,30:O,46:80,47:P,49:B},t($,[2,37]),t($,[2,38]),t($,[2,39]),{23:81,62:m,63:y},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},t($,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},t($,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:A,20:106,21:L,24:N,26:I,28:M,30:R},{5:A,20:107,21:L,24:N,26:I,28:M,30:R},{5:A,20:108,21:L,24:N,26:I,28:M,30:R},{5:A,20:109,21:L,24:N,26:I,28:M,30:R},{5:D,30:O,46:110,47:P,49:B},{5:D,30:O,46:111,47:P,49:B},t($,[2,14]),t($,[2,15]),t($,[2,16]),t($,[2,17]),t($,[2,34]),t($,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},z=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return e.yytext=e.yytext.trim(),62}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return t}();function U(){this.yy={}}return F.lexer=z,o(U,"Parser"),U.prototype=F,F.Parser=U,new U}();fot.parser=fot;var mot=fot,yot=[],vot={},xot=new Map,bot={},wot=new Map,kot=o(((t,e)=>(xot.has(t)||xot.set(t,{name:t,type:e,id:vot.id,text:vot.text,risk:vot.risk,verifyMethod:vot.verifyMethod}),vot={},xot.get(t))),"addRequirement"),Tot=o((()=>xot),"getRequirements"),_ot=o((t=>{void 0!==vot&&(vot.id=t)}),"setNewReqId"),Eot=o((t=>{void 0!==vot&&(vot.text=t)}),"setNewReqText"),Cot=o((t=>{void 0!==vot&&(vot.risk=t)}),"setNewReqRisk"),Sot=o((t=>{void 0!==vot&&(vot.verifyMethod=t)}),"setNewReqVerifyMethod"),Aot=o((t=>(wot.has(t)||(wot.set(t,{name:t,type:bot.type,docRef:bot.docRef}),y.info("Added new requirement: ",t)),bot={},wot.get(t))),"addElement"),Lot=o((()=>wot),"getElements"),Not=o((t=>{void 0!==bot&&(bot.type=t)}),"setNewElementType"),Iot=o((t=>{void 0!==bot&&(bot.docRef=t)}),"setNewElementDocRef"),Mot=o(((t,e,n)=>{yot.push({type:t,src:e,dst:n})}),"addRelationship"),Rot=o((()=>yot),"getRelationships"),Dot=o((()=>{yot=[],vot={},xot=new Map,bot={},wot=new Map,Un()}),"clear"),Oot={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:o((()=>Kn().req),"getConfig"),addRequirement:kot,getRequirements:Tot,setNewReqId:_ot,setNewReqText:Eot,setNewReqRisk:Cot,setNewReqVerifyMethod:Sot,setAccTitle:Gn,getAccTitle:qn,setAccDescription:jn,getAccDescription:Yn,addElement:Aot,getElements:Lot,setNewElementType:Not,setNewElementDocRef:Iot,addRelationship:Mot,getRelationships:Rot,clear:Dot},Pot=o((t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`),"getStyles"),Bot={CONTAINS:"contains",ARROW:"arrow"},$ot={ReqMarkers:Bot,insertLineEndings:o(((t,e)=>{let n=t.append("defs").append("marker").attr("id",Bot.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Bot.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)}),"insertLineEndings")},Fot={},zot=0,Uot=o(((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Fot.rect_min_width+"px").attr("height",Fot.rect_min_height+"px")),"newRectNode"),Got=o(((t,e,n)=>{let r=Fot.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",Fot.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((t=>{0==a?i.append("tspan").attr("text-anchor","middle").attr("x",Fot.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",Fot.rect_min_width/2).attr("dy",.75*Fot.line_height).text(t),a++}));let s=1.5*Fot.rect_padding+a*Fot.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Fot.rect_min_width).attr("y1",s).attr("y2",s),{titleNode:i,y:s}}),"newTitleNode"),qot=o(((t,e,n,r)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Fot.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0;let s=[];return n.forEach((t=>{let e=t.length;for(;e>30&&a<3;){let n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,s[s.length]=n,a++}if(3==a){let t=s[s.length-1];s[s.length-1]=t.substring(0,t.length-4)+"..."}else s[s.length]=t;a=0})),s.forEach((t=>{i.append("tspan").attr("x",Fot.rect_padding).attr("dy",Fot.line_height).text(t)})),i}),"newBodyNode"),jot=o(((t,e,n,r)=>{const i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),s="rel"+zot;zot++;const o=t.append("text").attr("class","req relationshipLabel").attr("id",s).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+s).attr("class","req reqLabelBox").attr("x",a.x-o.width/2).attr("y",a.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")}),"addEdgeLabel"),Yot=o((function(t,e,n,r,i){const a=n.edge(Kot(e.src),Kot(e.dst)),s=uu().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",s(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?o.attr("marker-start","url("+Sn.getUrl(Fot.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+Sn.getUrl(Fot.arrowMarkerAbsolute)+"#"+$ot.ReqMarkers.ARROW+"_line_ending)")),jot(t,o,Fot,`<<${e.type}>>`)}),"drawRelationshipFromLayout"),Wot=o(((t,e,n)=>{t.forEach(((t,r)=>{r=Kot(r),y.info("Added new requirement: ",r);const i=n.append("g").attr("id",r),a=Uot(i,"req-"+r);let s=[],o=Got(i,r+"_title",[`<<${t.type}>>`,`${t.name}`]);s.push(o.titleNode);let l=qot(i,r+"_body",[`Id: ${t.id}`,`Text: ${t.text}`,`Risk: ${t.risk}`,`Verification: ${t.verifyMethod}`],o.y);s.push(l);const c=a.node().getBBox();e.setNode(r,{width:c.width,height:c.height,shape:"rect",id:r})}))}),"drawReqs"),Hot=o(((t,e,n)=>{t.forEach(((t,r)=>{const i=Kot(r),a=n.append("g").attr("id",i),s="element-"+i,o=Uot(a,s);let l=[],c=Got(a,s+"_title",["<>",`${r}`]);l.push(c.titleNode);let h=qot(a,s+"_body",[`Type: ${t.type||"Not Specified"}`,`Doc Ref: ${t.docRef||"None"}`],c.y);l.push(h);const u=o.node().getBBox();e.setNode(i,{width:u.width,height:u.height,shape:"rect",id:i})}))}),"drawElements"),Vot=o(((t,e)=>(t.forEach((function(t){let n=Kot(t.src),r=Kot(t.dst);e.setEdge(n,r,{relationship:t})})),t)),"addRelationships"),Xot=o((function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}),"adjustEntities"),Kot=o((t=>t.replace(/\s/g,"").replace(/\./g,"_")),"elementString"),Zot=o(((t,e,n,r)=>{const i=(Fot=Kn().requirement).securityLevel;let a;"sandbox"===i&&(a=Fa("#i"+e));const s=Fa("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);$ot.insertLineEndings(s,Fot);const o=new cj({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Fot.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let l=r.db.getRequirements(),c=r.db.getElements(),h=r.db.getRelationships();Wot(l,o,s),Hot(c,o,s),Vot(h,o),mW(o),Xot(s,o),h.forEach((function(t){Yot(s,t,o,e,r)}));const u=Fot.rect_padding,d=s.node().getBBox(),p=d.width+2*u,g=d.height+2*u;Nn(s,g,p,Fot.useMaxWidth),s.attr("viewBox",`${d.x-u} ${d.y-u} ${p} ${g}`)}),"draw"),Qot={parser:mot,db:Oot,renderer:{draw:Zot},styles:Pot},Jot=Object.freeze({__proto__:null,diagram:Qot}),tlt=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],s=[1,11],l=[1,13],c=[1,14],h=[1,16],u=[1,17],d=[1,18],p=[1,24],g=[1,25],f=[1,26],m=[1,27],y=[1,28],v=[1,29],x=[1,30],b=[1,31],w=[1,32],k=[1,33],T=[1,34],_=[1,35],E=[1,36],C=[1,37],S=[1,38],A=[1,39],L=[1,41],N=[1,42],I=[1,43],M=[1,44],R=[1,45],D=[1,46],O=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],P=[4,5,16,50,52,53],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],F=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],U=[68,69,70],G=[1,122],q={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 3:return r.apply(a[o]),a[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=a[o];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:r.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:r.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:r.parseMessage(a[o-2]),signalType:r.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:r.parseMessage(a[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=r.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=r.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 54:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 55:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-2],a[o]];break;case 63:this.$=r.PLACEMENT.LEFTOF;break;case 64:this.$=r.PLACEMENT.RIGHTOF;break;case 65:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 66:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 67:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 68:this.$={type:"addParticipant",actor:a[o]};break;case 69:this.$=r.LINETYPE.SOLID_OPEN;break;case 70:this.$=r.LINETYPE.DOTTED_OPEN;break;case 71:this.$=r.LINETYPE.SOLID;break;case 72:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=r.LINETYPE.DOTTED;break;case 74:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=r.LINETYPE.SOLID_CROSS;break;case 76:this.$=r.LINETYPE.DOTTED_CROSS;break;case 77:this.$=r.LINETYPE.SOLID_POINT;break;case 78:this.$=r.LINETYPE.DOTTED_POINT;break;case 79:this.$=r.parseMessage(a[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,12:12,13:l,14:c,17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},t(O,[2,5]),{9:47,12:12,13:l,14:c,17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},t(O,[2,7]),t(O,[2,8]),t(O,[2,14]),{12:48,50:C,52:S,53:A},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:D},{22:55,70:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(O,[2,29]),t(O,[2,30]),{32:[1,61]},{34:[1,62]},t(O,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:D},{22:72,70:D},{22:73,70:D},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:D},{22:90,70:D},{22:91,70:D},{22:92,70:D},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(O,[2,6]),t(O,[2,15]),t(P,[2,9],{10:93}),t(O,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(O,[2,21]),{5:[1,97]},{5:[1,98]},t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,31]),t(O,[2,32]),t(B,i,{7:99}),t(B,i,{7:100}),t(B,i,{7:101}),t($,i,{40:102,7:103}),t(F,i,{42:104,7:105}),t(F,i,{7:105,42:106}),t(z,i,{45:107,7:108}),t(B,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:D},t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),{22:118,70:D},{22:120,58:119,70:D},{70:[2,63]},{70:[2,64]},{56:121,81:G},{56:123,81:G},{56:124,81:G},{56:125,81:G},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:C,52:S,53:A},{5:[1,131]},t(O,[2,19]),t(O,[2,20]),t(O,[2,22]),t(O,[2,23]),{4:a,5:s,8:8,9:10,12:12,13:l,14:c,16:[1,132],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},{4:a,5:s,8:8,9:10,12:12,13:l,14:c,16:[1,133],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},{4:a,5:s,8:8,9:10,12:12,13:l,14:c,16:[1,134],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},{16:[1,135]},{4:a,5:s,8:8,9:10,12:12,13:l,14:c,16:[2,46],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,49:[1,136],50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},{16:[1,137]},{4:a,5:s,8:8,9:10,12:12,13:l,14:c,16:[2,44],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,48:[1,138],50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},{16:[1,139]},{16:[1,140]},{4:a,5:s,8:8,9:10,12:12,13:l,14:c,16:[2,42],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,47:[1,141],50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},{4:a,5:s,8:8,9:10,12:12,13:l,14:c,16:[1,142],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:f,33:m,35:y,36:v,37:x,38:b,39:w,41:k,43:T,44:_,46:E,50:C,52:S,53:A,54:L,59:N,60:I,61:M,62:R,70:D},{15:[1,143]},t(O,[2,49]),{15:[1,144]},t(O,[2,51]),t(O,[2,52]),{22:145,70:D},{22:146,70:D},{56:147,81:G},{56:148,81:G},{56:149,81:G},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(O,[2,16]),t(P,[2,10]),{12:151,50:C,52:S,53:A},t(P,[2,12]),t(P,[2,13]),t(O,[2,18]),t(O,[2,34]),t(O,[2,35]),t(O,[2,36]),t(O,[2,37]),{15:[1,152]},t(O,[2,38]),{15:[1,153]},t(O,[2,39]),t(O,[2,40]),{15:[1,154]},t(O,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:G},{56:158,81:G},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:D},t(P,[2,11]),t($,i,{7:103,40:160}),t(F,i,{7:105,42:161}),t(z,i,{7:108,45:162}),t(O,[2,48]),t(O,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},j=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:case 51:case 66:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 67:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return t}();function Y(){this.yy={}}return q.lexer=j,o(Y,"Parser"),Y.prototype=q,q.Parser=Y,new Y}();tlt.parser=tlt;var elt=tlt,nlt=new KK((()=>({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}))),rlt=o((function(t){nlt.records.boxes.push({name:t.text,wrap:t.wrap??klt(),fill:t.color,actorKeys:[]}),nlt.records.currentBox=nlt.records.boxes.slice(-1)[0]}),"addBox"),ilt=o((function(t,e,n,r){let i=nlt.records.currentBox;const a=nlt.records.actors.get(t);if(a){if(nlt.records.currentBox&&a.box&&nlt.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${nlt.records.currentBox.name}' at the same time.`);if(i=a.box?a.box:nlt.records.currentBox,a.box=i,a&&e===a.name&&null==n)return}if(null==n?.text&&(n={text:e,type:r}),null!=r&&null!=n.text||(n={text:e,type:r}),nlt.records.actors.set(t,{box:i,name:e,description:n.text,wrap:n.wrap??klt(),prevActor:nlt.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),nlt.records.prevActor){const e=nlt.records.actors.get(nlt.records.prevActor);e&&(e.nextActor=t)}nlt.records.currentBox&&nlt.records.currentBox.actorKeys.push(t),nlt.records.prevActor=t}),"addActor"),alt=o((t=>{let e,n=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return nlt.records.messages.push({from:t,to:e,message:n?.text??"",wrap:n?.wrap??klt(),type:r,activate:i}),!0}),"addSignal"),llt=o((function(){return nlt.records.boxes.length>0}),"hasAtLeastOneBox"),clt=o((function(){return nlt.records.boxes.some((t=>t.name))}),"hasAtLeastOneBoxWithTitle"),hlt=o((function(){return nlt.records.messages}),"getMessages"),ult=o((function(){return nlt.records.boxes}),"getBoxes"),dlt=o((function(){return nlt.records.actors}),"getActors"),plt=o((function(){return nlt.records.createdActors}),"getCreatedActors"),glt=o((function(){return nlt.records.destroyedActors}),"getDestroyedActors"),flt=o((function(t){return nlt.records.actors.get(t)}),"getActor"),mlt=o((function(){return[...nlt.records.actors.keys()]}),"getActorKeys"),ylt=o((function(){nlt.records.sequenceNumbersEnabled=!0}),"enableSequenceNumbers"),vlt=o((function(){nlt.records.sequenceNumbersEnabled=!1}),"disableSequenceNumbers"),xlt=o((()=>nlt.records.sequenceNumbersEnabled),"showSequenceNumbers"),blt=o((function(t){nlt.records.wrapEnabled=t}),"setWrap"),wlt=o((t=>{if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}),"extractWrap"),klt=o((()=>void 0!==nlt.records.wrapEnabled?nlt.records.wrapEnabled:Kn().sequence?.wrap??!1),"autoWrap"),Tlt=o((function(){nlt.reset(),Un()}),"clear"),_lt=o((function(t){const e=t.trim(),{wrap:n,cleanedText:r}=wlt(e),i={text:r,wrap:n};return y.debug(`parseMessage: ${JSON.stringify(i)}`),i}),"parseMessage"),Elt=o((function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let n=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",n)||(n="transparent",r=t.trim());else{const e=(new Option).style;e.color=n,e.color!==n&&(n="transparent",r=t.trim())}const{wrap:i,cleanedText:a}=wlt(r);return{text:a?ln(a,Kn()):void 0,color:n,wrap:i}}),"parseBoxData"),Clt={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},Slt=o((function(t,e,n){const r={actor:t,placement:e,message:n.text,wrap:n.wrap??klt()},i=[].concat(t,t);nlt.records.notes.push(r),nlt.records.messages.push({from:i[0],to:i[1],message:n.text,wrap:n.wrap??klt(),type:Clt.NOTE,placement:e})}),"addNote"),Alt=o((function(t,e){const n=flt(t);try{let t=ln(e.text,Kn());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"=");Nlt(n,JSON.parse(t))}catch(t){y.error("error while parsing actor link text",t)}}),"addLinks"),Llt=o((function(t,e){const n=flt(t);try{const t={};let r=ln(e.text,Kn());const i=r.indexOf("@");r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const a=r.slice(0,i-1).trim(),s=r.slice(i+1).trim();t[a]=s,Nlt(n,t)}catch(t){y.error("error while parsing actor link text",t)}}),"addALink");function Nlt(t,e){if(null==t.links)t.links=e;else for(const n in e)t.links[n]=e[n]}o(Nlt,"insertLinks");var Ilt=o((function(t,e){const n=flt(t);try{const t=ln(e.text,Kn());Mlt(n,JSON.parse(t))}catch(t){y.error("error while parsing actor properties text",t)}}),"addProperties");function Mlt(t,e){if(null==t.properties)t.properties=e;else for(const n in e)t.properties[n]=e[n]}function Rlt(){nlt.records.currentBox=void 0}o(Mlt,"insertProperties"),o(Rlt,"boxEnd");var Dlt=o((function(t,e){const n=flt(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&Mlt(n,e.properties),e.links&&Nlt(n,e.links)}catch(t){y.error("error while parsing actor details text",t)}}),"addDetails"),Olt=o((function(t,e){if(void 0!==t?.properties)return t.properties[e]}),"getActorProperty"),Plt=o((function(t){if(Array.isArray(t))t.forEach((function(t){Plt(t)}));else switch(t.type){case"sequenceIndex":nlt.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":ilt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(nlt.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");nlt.records.lastCreated=t.actor,ilt(t.actor,t.actor,t.description,t.draw),nlt.records.createdActors.set(t.actor,nlt.records.messages.length);break;case"destroyParticipant":nlt.records.lastDestroyed=t.actor,nlt.records.destroyedActors.set(t.actor,nlt.records.messages.length);break;case"activeStart":case"activeEnd":olt(t.actor,void 0,void 0,t.signalType);break;case"addNote":Slt(t.actor,t.placement,t.text);break;case"addLinks":Alt(t.actor,t.text);break;case"addALink":Llt(t.actor,t.text);break;case"addProperties":Ilt(t.actor,t.text);break;case"addDetails":Dlt(t.actor,t.text);break;case"addMessage":if(nlt.records.lastCreated){if(t.to!==nlt.records.lastCreated)throw new Error("The created participant "+nlt.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");nlt.records.lastCreated=void 0}else if(nlt.records.lastDestroyed){if(t.to!==nlt.records.lastDestroyed&&t.from!==nlt.records.lastDestroyed)throw new Error("The destroyed participant "+nlt.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");nlt.records.lastDestroyed=void 0}olt(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":rlt(t.boxData);break;case"boxEnd":Rlt();break;case"loopStart":olt(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":olt(void 0,void 0,void 0,t.signalType);break;case"rectStart":olt(void 0,void 0,t.color,t.signalType);break;case"optStart":olt(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":olt(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":Gn(t.text);break;case"parStart":case"and":olt(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":olt(void 0,void 0,t.criticalText,t.signalType);break;case"option":olt(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":olt(void 0,void 0,t.breakText,t.signalType)}}),"apply"),Blt={addActor:ilt,addMessage:slt,addSignal:olt,addLinks:Alt,addDetails:Dlt,addProperties:Ilt,autoWrap:klt,setWrap:blt,enableSequenceNumbers:ylt,disableSequenceNumbers:vlt,showSequenceNumbers:xlt,getMessages:hlt,getActors:dlt,getCreatedActors:plt,getDestroyedActors:glt,getActor:flt,getActorKeys:mlt,getActorProperty:Olt,getAccTitle:qn,getBoxes:ult,getDiagramTitle:Hn,setDiagramTitle:Wn,getConfig:o((()=>Kn().sequence),"getConfig"),clear:Tlt,parseMessage:_lt,parseBoxData:Elt,LINETYPE:Clt,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:Slt,setAccTitle:Gn,apply:Plt,setAccDescription:jn,getAccDescription:Yn,hasAtLeastOneBox:llt,hasAtLeastOneBoxWithTitle:clt},$lt=o((t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`),"getStyles"),Flt=p(qy(),1),zlt="actor-man",Ult=o((function(t,e){return hH(t,e)}),"drawRect"),Glt=o((function(t,e,n,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const a=e.links,s=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");const c=t.append("g");c.attr("id","actor"+s+"_popup"),c.attr("class","actorPopupMenu"),c.attr("display",l);var h="";void 0!==o.class&&(h=" "+o.class);let u=o.width>n?o.width:n;const d=c.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",u),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),null!=a){var p=20;for(let t in a){var g=c.append("a"),f=(0,Flt.sanitizeUrl)(a[t]);g.attr("xlink:href",f),g.attr("target","_blank"),pct(r)(t,g,o.x+10,o.height+p,u,20,{class:"actor"},r),p+=30}}return d.attr("height",p),{height:o.height+p,width:u}}),"drawPopup"),qlt=o((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),jlt=o((async function(t,e,n=null){let r=t.append("foreignObject");const i=await Cn(e.text,Gt()),a=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(a.height)).attr("width",Math.round(a.width)),"noteText"===e.class){const n=t.node().firstChild;n.setAttribute("height",a.height+2*e.textMargin);const i=n.getBBox();r.attr("x",Math.round(i.x+i.width/2-a.width/2)).attr("y",Math.round(i.y+i.height/2-a.height/2))}else if(n){let{startx:t,stopx:i,starty:s}=n;if(t>i){const e=t;t=i,i=e}r.attr("x",Math.round(t+Math.abs(t-i)/2-a.width/2)),"loopText"===e.class?r.attr("y",Math.round(s)):r.attr("y",Math.round(s-a.height))}return[r]}),"drawKatex"),Ylt=o((function(t,e){let n=0,r=0;const i=e.text.split(Sn.lineBreakRegex),[a,s]=Mk(e.fontSize);let l=[],c=0,h=o((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":h=o((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":h=o((()=>Math.round(e.y+(n+r+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":h=o((()=>Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,u]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(c=o*a);const i=t.append("text");i.attr("x",e.x),i.attr("y",h()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==s&&i.style("font-size",s),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==c&&i.attr("dy",c);const d=u||"​";if(e.tspan){const t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(d)}else i.text(d);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,n=r),l.push(i)}return l}),"drawText"),Wlt=o((function(t,e){function n(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-i)+" "+(t+n-1.2*i)+","+(e+r)+" "+t+","+(e+r)}o(n,"genPoints");const r=t.append("polygon");return r.attr("points",n(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,Ylt(t,e),r}),"drawLabel"),Hlt=-1,Vlt=o(((t,e,n,r)=>{t.select&&n.forEach((n=>{const i=e.get(n),a=t.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr("y2",i.stopy+i.height/2):r.mirrorActors&&a.attr("y2",i.stopy)}))}),"fixLifeLineHeights"),Xlt=o((function(t,e,n,r){const i=r?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t.append("g").lower();var l=o;r||(Hlt++,Object.keys(e.links||{}).length&&!n.forceMenus&&l.attr("onclick",qlt(`actor${Hlt}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+Hlt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),l=o.append("g"),e.actorCnt=Hlt,null!=e.links&&l.attr("id","root-"+Hlt));const c=fH();var h="actor";e.properties?.class?h=e.properties.class:c.fill="#eaeaea",h+=r?" actor-bottom":" actor-top",c.x=e.x,c.y=i,c.width=e.width,c.height=e.height,c.class=h,c.rx=3,c.ry=3,c.name=e.name;const u=Ult(l,c);if(e.rectData=c,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?gH(l,c.x+c.width-20,c.y+10,t.substr(1)):pH(l,c.x+c.width-20,c.y+10,t)}dct(n,_n(e.description))(e.description,l,c.x,c.y,c.width,c.height,{class:"actor actor-box"},n);let d=e.height;if(u.node){const t=u.node().getBBox();e.height=t.height,d=t.height}return d}),"drawActorTypeParticipant"),Klt=o((function(t,e,n,r){const i=r?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower();r||(Hlt++,o.append("line").attr("id","actor"+Hlt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=Hlt);const l=t.append("g");let c=zlt;c+=r?" actor-bottom":" actor-top",l.attr("class",c),l.attr("name",e.name);const h=fH();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+Hlt).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+Hlt).attr("x1",a-18).attr("y1",i+33).attr("x2",a+18).attr("y2",i+33),l.append("line").attr("x1",a-18).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+18-2).attr("y2",i+60);const u=l.append("circle");u.attr("cx",e.x+e.width/2),u.attr("cy",i+10),u.attr("r",15),u.attr("width",e.width),u.attr("height",e.height);const d=l.node().getBBox();return e.height=d.height,dct(n,_n(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:"actor actor-man"},n),e.height}),"drawActorTypeActor"),Zlt=o((async function(t,e,n,r){switch(e.type){case"actor":return await Klt(t,e,n,r);case"participant":return await Xlt(t,e,n,r)}}),"drawActor"),Qlt=o((function(t,e,n){const r=t.append("g");nct(r,e),e.name&&dct(n)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},n),r.lower()}),"drawBox"),Jlt=o((function(t){return t.append("g")}),"anchorElement"),tct=o((function(t,e,n,r,i){const a=fH(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,Ult(s,a)}),"drawActivation"),ect=o((async function(t,e,n,r){const{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:l,messageFontFamily:c,messageFontSize:h,messageFontWeight:u}=r,d=t.append("g"),p=o((function(t,e,n,r){return d.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")}),"drawLoopLine");p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){p(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let g=mH();g.text=n,g.x=e.startx,g.y=e.starty,g.fontFamily=c,g.fontSize=h,g.fontWeight=u,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=l||50,g.height=s||20,g.textMargin=a,g.class="labelText",Wlt(d,g),g=hct(),g.text=e.title,g.x=e.startx+l/2+(e.stopx-e.startx)/2,g.y=e.starty+i+a,g.anchor="middle",g.valign="middle",g.textMargin=a,g.class="loopText",g.fontFamily=c,g.fontSize=h,g.fontWeight=u,g.wrap=!0;let f=_n(g.text)?await jlt(d,g,e):Ylt(d,g);if(void 0!==e.sectionTitles)for(const[t,n]of Object.entries(e.sectionTitles))if(n.message){g.text=n.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[t].y+i+a,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=c,g.fontSize=h,g.fontWeight=u,g.wrap=e.wrap,_n(g.text)?(e.starty=e.sections[t].y,await jlt(d,g,e)):Ylt(d,g);let r=Math.round(f.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[t].height+=r-(i+a)}return e.height=Math.round(e.stopy-e.starty),d}),"drawLoop"),nct=o((function(t,e){uH(t,e)}),"drawBackgroundRect"),rct=o((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),ict=o((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),act=o((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),sct=o((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")}),"insertArrowHead"),oct=o((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),lct=o((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertSequenceNumber"),cct=o((function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")}),"insertArrowCrossHead"),hct=o((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"),uct=o((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),dct=function(){function t(t,e,n,r,a,s,o){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,s,o,l){const{actorFontSize:c,actorFontFamily:h,actorFontWeight:u}=l,[d,p]=Mk(c),g=t.split(Sn.lineBreakRegex);for(let t=0;tt.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))}),"getHeight"),clear:o((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:o((function(t){this.boxes.push(t)}),"addBox"),addActor:o((function(t){this.actors.push(t)}),"addActor"),addLoop:o((function(t){this.loops.push(t)}),"addLoop"),addMessage:o((function(t){this.messages.push(t)}),"addMessage"),addNote:o((function(t){this.notes.push(t)}),"addNote"),lastActor:o((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:o((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:o((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:o((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:o((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,Cct(Kn())}),"init"),updateVal:o((function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])}),"updateVal"),updateBounds:o((function(t,e,n,r){const i=this;let a=0;function s(s){return o((function(o){a++;const l=i.sequenceItems.length-a+1;i.updateVal(o,"starty",e-l*fct.boxMargin,Math.min),i.updateVal(o,"stopy",r+l*fct.boxMargin,Math.max),i.updateVal(mct.data,"startx",t-l*fct.boxMargin,Math.min),i.updateVal(mct.data,"stopx",n+l*fct.boxMargin,Math.max),"activation"!==s&&(i.updateVal(o,"startx",t-l*fct.boxMargin,Math.min),i.updateVal(o,"stopx",n+l*fct.boxMargin,Math.max),i.updateVal(mct.data,"starty",e-l*fct.boxMargin,Math.min),i.updateVal(mct.data,"stopy",r+l*fct.boxMargin,Math.max))}),"updateItemBounds")}o(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))}),"updateBounds"),insert:o((function(t,e,n,r){const i=Sn.getMin(t,n),a=Sn.getMax(t,n),s=Sn.getMin(e,r),o=Sn.getMax(e,r);this.updateVal(mct.data,"startx",i,Math.min),this.updateVal(mct.data,"starty",s,Math.min),this.updateVal(mct.data,"stopx",a,Math.max),this.updateVal(mct.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)}),"insert"),newActivation:o((function(t,e,n){const r=n.get(t.from),i=Sct(t.from).length||0,a=r.x+r.width/2+(i-1)*fct.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+fct.activationWidth,stopy:void 0,actor:t.from,anchored:gct.anchorElement(e)})}),"newActivation"),endActivation:o((function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from);return this.activations.splice(e,1)[0]}),"endActivation"),createLoop:o((function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}}),"createLoop"),newLoop:o((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:o((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:o((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:o((function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:mct.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:o((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:o((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:o((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=Sn.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:o((function(){return this.verticalPos}),"getVerticalPos"),getBounds:o((function(){return{bounds:this.data,models:this.models}}),"getBounds")},yct=o((async function(t,e){mct.bumpVerticalPos(fct.boxMargin),e.height=fct.boxMargin,e.starty=mct.getVerticalPos();const n=fH();n.x=e.startx,n.y=e.starty,n.width=e.width||fct.width,n.class="note";const r=t.append("g"),i=gct.drawRect(r,n),a=mH();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=fct.noteFontFamily,a.fontSize=fct.noteFontSize,a.fontWeight=fct.noteFontWeight,a.anchor=fct.noteAlign,a.textMargin=fct.noteMargin,a.valign="center";const s=_n(a.text)?await jlt(r,a):Ylt(r,a),o=Math.round(s.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));i.attr("height",o+2*fct.noteMargin),e.height+=o+2*fct.noteMargin,mct.bumpVerticalPos(o+2*fct.noteMargin),e.stopy=e.starty+o+2*fct.noteMargin,e.stopx=e.startx+n.width,mct.insert(e.startx,e.starty,e.stopx,e.stopy),mct.models.addNote(e)}),"drawNote"),vct=o((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),xct=o((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),bct=o((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function wct(t,e){mct.bumpVerticalPos(10);const{startx:n,stopx:r,message:i}=e,a=Sn.splitBreaks(i).length,s=_n(i),o=s?await En(i,Kn()):Dk.calculateTextDimensions(i,vct(fct));if(!s){const t=o.height/a;e.height+=t,mct.bumpVerticalPos(t)}let l,c=o.height-10;const h=o.width;if(n===r){l=mct.getVerticalPos()+c,fct.rightAngles||(c+=fct.boxMargin,l=mct.getVerticalPos()+c),c+=30;const t=Sn.getMax(h/2,fct.width/2);mct.insert(n-t,mct.getVerticalPos()-10+c,r+t,mct.getVerticalPos()+30+c)}else c+=fct.boxMargin,l=mct.getVerticalPos()+c,mct.insert(n,l-10,r,l);return mct.bumpVerticalPos(c),e.height+=c,e.stopy=e.starty+e.height,mct.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}o(wct,"boundMessage");var kct=o((async function(t,e,n,r){const{startx:i,stopx:a,starty:s,message:o,type:l,sequenceIndex:c,sequenceVisible:h}=e,u=Dk.calculateTextDimensions(o,vct(fct)),d=mH();d.x=i,d.y=s+10,d.width=a-i,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=fct.messageFontFamily,d.fontSize=fct.messageFontSize,d.fontWeight=fct.messageFontWeight,d.anchor=fct.messageAlign,d.valign="center",d.textMargin=fct.wrapPadding,d.tspan=!1,_n(d.text)?await jlt(t,d,{startx:i,stopx:a,starty:n}):Ylt(t,d);const p=u.width;let g;i===a?g=fct.rightAngles?t.append("path").attr("d",`M ${i},${n} H ${i+Sn.getMax(fct.width/2,p/2)} V ${n+25} H ${i}`):t.append("path").attr("d","M "+i+","+n+" C "+(i+60)+","+(n-10)+" "+(i+60)+","+(n+30)+" "+i+","+(n+20)):(g=t.append("line"),g.attr("x1",i),g.attr("y1",n),g.attr("x2",a),g.attr("y2",n)),l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let f="";fct.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),l!==r.db.LINETYPE.SOLID&&l!==r.db.LINETYPE.DOTTED||g.attr("marker-end","url("+f+"#arrowhead)"),l!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&l!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(g.attr("marker-start","url("+f+"#arrowhead)"),g.attr("marker-end","url("+f+"#arrowhead)")),l!==r.db.LINETYPE.SOLID_POINT&&l!==r.db.LINETYPE.DOTTED_POINT||g.attr("marker-end","url("+f+"#filled-head)"),l!==r.db.LINETYPE.SOLID_CROSS&&l!==r.db.LINETYPE.DOTTED_CROSS||g.attr("marker-end","url("+f+"#crosshead)"),(h||fct.showSequenceNumbers)&&(g.attr("marker-start","url("+f+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(c))}),"drawMessage"),Tct=o((function(t,e,n,r,i,a,s){let o,l=0,c=0,h=0;for(const t of r){const r=e.get(t),a=r.box;o&&o!=a&&(s||mct.models.addBox(o),c+=fct.boxMargin+o.margin),a&&a!=o&&(s||(a.x=l+c,a.y=i),c+=a.margin),r.width=r.width||fct.width,r.height=Sn.getMax(r.height||fct.height,fct.height),r.margin=r.margin||fct.actorMargin,h=Sn.getMax(h,r.height),n.get(r.name)&&(c+=r.width/2),r.x=l+c,r.starty=mct.getVerticalPos(),mct.insert(r.x,i,r.x+r.width,r.height),l+=r.width+c,r.box&&(r.box.width=l+a.margin-r.box.x),c=r.margin,o=r.box,mct.models.addActor(r)}o&&!s&&mct.models.addBox(o),mct.bumpVerticalPos(h)}),"addActorRenderingData"),_ct=o((async function(t,e,n,r){if(r){let r=0;mct.bumpVerticalPos(2*fct.boxMargin);for(const i of n){const n=e.get(i);n.stopy||(n.stopy=mct.getVerticalPos());const a=await gct.drawActor(t,n,fct,!0);r=Sn.getMax(r,a)}mct.bumpVerticalPos(r+fct.boxMargin)}else for(const r of n){const n=e.get(r);await gct.drawActor(t,n,fct,!1)}}),"drawActors"),Ect=o((function(t,e,n,r){let i=0,a=0;for(const s of n){const n=e.get(s),o=Rct(n),l=gct.drawPopup(t,n,o,fct,fct.forceMenus,r);l.height>i&&(i=l.height),l.width+n.x>a&&(a=l.width+n.x)}return{maxHeight:i,maxWidth:a}}),"drawActorsPopup"),Cct=o((function(t){N(fct,t),t.fontFamily&&(fct.actorFontFamily=fct.noteFontFamily=fct.messageFontFamily=t.fontFamily),t.fontSize&&(fct.actorFontSize=fct.noteFontSize=fct.messageFontSize=t.fontSize),t.fontWeight&&(fct.actorFontWeight=fct.noteFontWeight=fct.messageFontWeight=t.fontWeight)}),"setConf"),Sct=o((function(t){return mct.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),Act=o((function(t,e){const n=e.get(t),r=Sct(t);return[r.reduce((function(t,e){return Sn.getMin(t,e.startx)}),n.x+n.width/2-1),r.reduce((function(t,e){return Sn.getMax(t,e.stopx)}),n.x+n.width/2+1)]}),"activationBounds");function Lct(t,e,n,r,i){mct.bumpVerticalPos(n);let a=r;if(e.id&&e.message&&t[e.id]){const n=t[e.id].width,i=vct(fct);e.message=Dk.wrapLabel(`[${e.message}]`,n-2*fct.wrapPadding,i),e.width=n,e.wrap=!0;const s=Dk.calculateTextDimensions(e.message,i),o=Sn.getMax(s.height,fct.labelBoxHeight);a=r+o,y.debug(`${o} - ${e.message}`)}i(e),mct.bumpVerticalPos(a)}function Nct(t,e,n,r,i,a,s){function l(n,r){n.x{t.add(e.from),t.add(e.to)})),f=f.filter((e=>t.has(e)))}Tct(h,u,d,f,0,m,!1);const k=await Bct(m,u,w,r);function T(t,e){const n=mct.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),gct.drawActivation(h,n,e,fct,Sct(t.from).length),mct.insert(n.startx,e-10,n.stopx,e)}gct.insertArrowHead(h),gct.insertArrowCrossHead(h),gct.insertArrowFilledHead(h),gct.insertSequenceNumber(h),o(T,"activeEnd");let _=1,E=1;const C=[],S=[];let A=0;for(const t of m){let e,n,i;switch(t.type){case r.db.LINETYPE.NOTE:mct.resetVerticalPos(),n=t.noteModel,await yct(h,n);break;case r.db.LINETYPE.ACTIVE_START:mct.newActivation(t,h,u);break;case r.db.LINETYPE.ACTIVE_END:T(t,mct.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Lct(k,t,fct.boxMargin,fct.boxMargin+fct.boxTextMargin,(t=>mct.newLoop(t)));break;case r.db.LINETYPE.LOOP_END:e=mct.endLoop(),await gct.drawLoop(h,e,"loop",fct),mct.bumpVerticalPos(e.stopy-mct.getVerticalPos()),mct.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:Lct(k,t,fct.boxMargin,fct.boxMargin,(t=>mct.newLoop(void 0,t.message)));break;case r.db.LINETYPE.RECT_END:e=mct.endLoop(),S.push(e),mct.models.addLoop(e),mct.bumpVerticalPos(e.stopy-mct.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Lct(k,t,fct.boxMargin,fct.boxMargin+fct.boxTextMargin,(t=>mct.newLoop(t)));break;case r.db.LINETYPE.OPT_END:e=mct.endLoop(),await gct.drawLoop(h,e,"opt",fct),mct.bumpVerticalPos(e.stopy-mct.getVerticalPos()),mct.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:Lct(k,t,fct.boxMargin,fct.boxMargin+fct.boxTextMargin,(t=>mct.newLoop(t)));break;case r.db.LINETYPE.ALT_ELSE:Lct(k,t,fct.boxMargin+fct.boxTextMargin,fct.boxMargin,(t=>mct.addSectionToLoop(t)));break;case r.db.LINETYPE.ALT_END:e=mct.endLoop(),await gct.drawLoop(h,e,"alt",fct),mct.bumpVerticalPos(e.stopy-mct.getVerticalPos()),mct.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:Lct(k,t,fct.boxMargin,fct.boxMargin+fct.boxTextMargin,(t=>mct.newLoop(t))),mct.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:Lct(k,t,fct.boxMargin+fct.boxTextMargin,fct.boxMargin,(t=>mct.addSectionToLoop(t)));break;case r.db.LINETYPE.PAR_END:e=mct.endLoop(),await gct.drawLoop(h,e,"par",fct),mct.bumpVerticalPos(e.stopy-mct.getVerticalPos()),mct.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:_=t.message.start||_,E=t.message.step||E,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Lct(k,t,fct.boxMargin,fct.boxMargin+fct.boxTextMargin,(t=>mct.newLoop(t)));break;case r.db.LINETYPE.CRITICAL_OPTION:Lct(k,t,fct.boxMargin+fct.boxTextMargin,fct.boxMargin,(t=>mct.addSectionToLoop(t)));break;case r.db.LINETYPE.CRITICAL_END:e=mct.endLoop(),await gct.drawLoop(h,e,"critical",fct),mct.bumpVerticalPos(e.stopy-mct.getVerticalPos()),mct.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:Lct(k,t,fct.boxMargin,fct.boxMargin+fct.boxTextMargin,(t=>mct.newLoop(t)));break;case r.db.LINETYPE.BREAK_END:e=mct.endLoop(),await gct.drawLoop(h,e,"break",fct),mct.bumpVerticalPos(e.stopy-mct.getVerticalPos()),mct.models.addLoop(e);break;default:try{i=t.msgModel,i.starty=mct.getVerticalPos(),i.sequenceIndex=_,i.sequenceVisible=r.db.showSequenceNumbers();const e=await wct(0,i);Nct(t,i,e,A,u,d,p),C.push({messageModel:i,lineStartY:e}),mct.models.addMessage(i)}catch(t){y.error("error while drawing message",t)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(_+=E),A++}y.debug("createdActors",d),y.debug("destroyedActors",p),await _ct(h,u,f,!1);for(const t of C)await kct(h,t.messageModel,t.lineStartY,r);fct.mirrorActors&&await _ct(h,u,f,!0),S.forEach((t=>gct.drawBackgroundRect(h,t))),Vlt(h,u,f,fct);for(const t of mct.models.boxes)t.height=mct.getVerticalPos()-t.y,mct.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",gct.drawBox(h,t,fct);x&&mct.bumpVerticalPos(fct.boxMargin);const L=Ect(h,u,f,c),{bounds:N}=mct.getBounds();void 0===N.startx&&(N.startx=0),void 0===N.starty&&(N.starty=0),void 0===N.stopx&&(N.stopx=0),void 0===N.stopy&&(N.stopy=0);let I=N.stopy-N.starty;I{const n=vct(fct);let r=e.actorKeys.reduce(((e,n)=>e+(t.get(n).width+(t.get(n).margin||0))),0);r-=2*fct.boxTextMargin,e.wrap&&(e.name=Dk.wrapLabel(e.name,r-2*fct.wrapPadding,n));const a=Dk.calculateTextDimensions(e.name,n);i=Sn.getMax(a.height,i);const s=Sn.getMax(r,a.width+2*fct.wrapPadding);if(e.margin=fct.boxTextMargin,rt.textMaxHeight=i)),Sn.getMax(r,fct.height)}o(Dct,"calculateActorMargins");var Oct=o((async function(t,e,n){const r=e.get(t.from),i=e.get(t.to),a=r.x,s=i.x,o=t.wrap&&t.message;let l=_n(t.message)?await En(t.message,Kn()):Dk.calculateTextDimensions(o?Dk.wrapLabel(t.message,fct.width,xct(fct)):t.message,xct(fct));const c={width:o?fct.width:Sn.getMax(fct.width,l.width+2*fct.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===n.db.PLACEMENT.RIGHTOF?(c.width=o?Sn.getMax(fct.width,l.width):Sn.getMax(r.width/2+i.width/2,l.width+2*fct.noteMargin),c.startx=a+(r.width+fct.actorMargin)/2):t.placement===n.db.PLACEMENT.LEFTOF?(c.width=o?Sn.getMax(fct.width,l.width+2*fct.noteMargin):Sn.getMax(r.width/2+i.width/2,l.width+2*fct.noteMargin),c.startx=a-c.width+(r.width-fct.actorMargin)/2):t.to===t.from?(l=Dk.calculateTextDimensions(o?Dk.wrapLabel(t.message,Sn.getMax(fct.width,r.width),xct(fct)):t.message,xct(fct)),c.width=o?Sn.getMax(fct.width,r.width):Sn.getMax(r.width,fct.width,l.width+2*fct.noteMargin),c.startx=a+(r.width-c.width)/2):(c.width=Math.abs(a+r.width/2-(s+i.width/2))+fct.actorMargin,c.startx=a2,d=o((t=>l?-t:t),"adjustValue");t.from===t.to?h=c:(t.activate&&!u&&(h+=d(fct.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=d(3)),[n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(c-=d(3)));const p=[r,i,a,s],g=Math.abs(c-h);t.wrap&&t.message&&(t.message=Dk.wrapLabel(t.message,Sn.getMax(g+2*fct.wrapPadding,fct.width),vct(fct)));const f=Dk.calculateTextDimensions(t.message,vct(fct));return{width:Sn.getMax(t.wrap?0:f.width+2*fct.wrapPadding,g+2*fct.wrapPadding,fct.width),height:0,startx:c,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}}),"buildMessageModel"),Bct=o((async function(t,e,n,r){const i={},a=[];let s,o,l;for(const n of t){switch(n.id=Dk.random({length:10}),n.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:n.id,msg:n.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:n.message&&(s=a.pop(),i[s.id]=s,i[n.id]=s,a.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(n.from?n.from:n.to.actor),r=Sct(n.from?n.from:n.to.actor).length,i=t.x+t.width/2+(r-1)*fct.activationWidth/2,a={startx:i,stopx:i+fct.activationWidth,actor:n.from,enabled:!0};mct.activations.push(a)}break;case r.db.LINETYPE.ACTIVE_END:{const t=mct.activations.map((t=>t.actor)).lastIndexOf(n.from);mct.activations.splice(t,1).splice(0,1)}}void 0!==n.placement?(o=await Oct(n,e,r),n.noteModel=o,a.forEach((t=>{s=t,s.from=Sn.getMin(s.from,o.startx),s.to=Sn.getMax(s.to,o.startx+o.width),s.width=Sn.getMax(s.width,Math.abs(s.from-s.to))-fct.labelBoxWidth}))):(l=Pct(n,e,r),n.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach((t=>{if(s=t,l.startx===l.stopx){const t=e.get(n.from),r=e.get(n.to);s.from=Sn.getMin(t.x-l.width/2,t.x-t.width/2,s.from),s.to=Sn.getMax(r.x+l.width/2,r.x+t.width/2,s.to),s.width=Sn.getMax(s.width,Math.abs(s.to-s.from))-fct.labelBoxWidth}else s.from=Sn.getMin(l.startx,s.from),s.to=Sn.getMax(l.stopx,s.to),s.width=Sn.getMax(s.width,l.width)-fct.labelBoxWidth})))}return mct.activations=[],y.debug("Loop type widths:",i),i}),"calculateLoopBounds"),$ct={parser:elt,db:Blt,renderer:{bounds:mct,drawActors:_ct,drawActorsPopup:Ect,setConf:Cct,draw:Ict},styles:$lt,init:o((({wrap:t})=>{Blt.setWrap(t)}),"init")},Fct=Object.freeze({__proto__:null,diagram:$ct}),zct=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,18],n=[1,19],r=[1,20],i=[1,41],a=[1,42],s=[1,26],l=[1,24],c=[1,25],h=[1,32],u=[1,33],d=[1,34],p=[1,45],g=[1,35],f=[1,36],m=[1,37],y=[1,38],v=[1,27],x=[1,28],b=[1,29],w=[1,30],k=[1,31],T=[1,44],_=[1,46],E=[1,43],C=[1,47],S=[1,9],A=[1,8,9],L=[1,58],N=[1,59],I=[1,60],M=[1,61],R=[1,62],D=[1,63],O=[1,64],P=[1,8,9,41],B=[1,76],$=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],F=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],z=[13,58,84,99,101,102],U=[13,58,71,72,84,99,101,102],G=[13,58,66,67,68,69,70,84,99,101,102],q=[1,98],j=[1,115],Y=[1,107],W=[1,113],H=[1,108],V=[1,109],X=[1,110],K=[1,111],Z=[1,112],Q=[1,114],J=[22,58,59,80,84,85,86,87,88,89],tt=[1,8,9,39,41,44],et=[1,8,9,22],nt=[1,143],rt=[1,8,9,59],it=[1,8,9,22,58,59,80,84,85,86,87,88,89],at={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 12:case 14:this.$=a[o];break;case 10:case 13:this.$=a[o-2]+"."+a[o];break;case 11:case 15:case 95:this.$=a[o-1]+a[o];break;case 16:case 17:this.$=a[o-1]+"~"+a[o]+"~";break;case 18:r.addRelation(a[o]);break;case 19:a[o-1].title=r.cleanupLabel(a[o]),r.addRelation(a[o-1]);break;case 30:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 33:r.addClassesToNamespace(a[o-3],a[o-1]);break;case 34:r.addClassesToNamespace(a[o-4],a[o-1]);break;case 35:this.$=a[o],r.addNamespace(a[o]);break;case 36:case 46:case 59:case 92:this.$=[a[o]];break;case 37:this.$=[a[o-1]];break;case 38:a[o].unshift(a[o-2]),this.$=a[o];break;case 40:r.setCssClass(a[o-2],a[o]);break;case 41:r.addMembers(a[o-3],a[o-1]);break;case 42:r.setCssClass(a[o-5],a[o-3]),r.addMembers(a[o-5],a[o-1]);break;case 43:this.$=a[o],r.addClass(a[o]);break;case 44:this.$=a[o-1],r.addClass(a[o-1]),r.setClassLabel(a[o-1],a[o]);break;case 45:r.addAnnotation(a[o],a[o-2]);break;case 47:a[o].push(a[o-1]),this.$=a[o];break;case 48:case 50:case 51:break;case 49:r.addMember(a[o-1],r.cleanupLabel(a[o]));break;case 52:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 54:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 55:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 56:r.addNote(a[o],a[o-1]);break;case 57:r.addNote(a[o]);break;case 58:this.$=a[o-2],r.defineClass(a[o-1],a[o]);break;case 60:this.$=a[o-2].concat([a[o]]);break;case 61:r.setDirection("TB");break;case 62:r.setDirection("BT");break;case 63:r.setDirection("RL");break;case 64:r.setDirection("LR");break;case 65:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 66:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 67:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 68:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 69:this.$=r.relationType.AGGREGATION;break;case 70:this.$=r.relationType.EXTENSION;break;case 71:this.$=r.relationType.COMPOSITION;break;case 72:this.$=r.relationType.DEPENDENCY;break;case 73:this.$=r.relationType.LOLLIPOP;break;case 74:this.$=r.lineType.LINE;break;case 75:this.$=r.lineType.DOTTED_LINE;break;case 76:case 82:this.$=a[o-2],r.setClickEvent(a[o-1],a[o]);break;case 77:case 83:this.$=a[o-3],r.setClickEvent(a[o-2],a[o-1]),r.setTooltip(a[o-2],a[o]);break;case 78:this.$=a[o-2],r.setLink(a[o-1],a[o]);break;case 79:this.$=a[o-3],r.setLink(a[o-2],a[o-1],a[o]);break;case 80:this.$=a[o-3],r.setLink(a[o-2],a[o-1]),r.setTooltip(a[o-2],a[o]);break;case 81:this.$=a[o-4],r.setLink(a[o-3],a[o-2],a[o]),r.setTooltip(a[o-3],a[o-1]);break;case 84:this.$=a[o-3],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-4],r.setClickEvent(a[o-3],a[o-2],a[o-1]),r.setTooltip(a[o-3],a[o]);break;case 86:this.$=a[o-3],r.setLink(a[o-2],a[o]);break;case 87:this.$=a[o-4],r.setLink(a[o-3],a[o-1],a[o]);break;case 88:this.$=a[o-4],r.setLink(a[o-3],a[o-1]),r.setTooltip(a[o-3],a[o]);break;case 89:this.$=a[o-5],r.setLink(a[o-4],a[o-2],a[o]),r.setTooltip(a[o-4],a[o-1]);break;case 90:this.$=a[o-2],r.setCssStyle(a[o-1],a[o]);break;case 91:r.setCssClass(a[o-1],a[o]);break;case 93:a[o-2].push(a[o]),this.$=a[o-2]}}),"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:n,37:r,38:22,42:i,43:23,46:a,47:s,49:l,50:c,52:h,54:u,55:d,58:p,60:g,61:f,62:m,63:y,73:v,74:x,76:b,80:w,81:k,84:T,99:_,101:E,102:C},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(S,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,18],{22:[1,50]}),t(A,[2,20]),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),{34:[1,51]},{36:[1,52]},t(A,[2,32]),t(A,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:L,67:N,68:I,69:M,70:R,71:D,72:O}),{39:[1,65]},t(P,[2,39],{39:[1,67],44:[1,66]}),t(A,[2,50]),t(A,[2,51]),{16:68,58:p,84:T,99:_,101:E},{16:39,18:69,19:40,58:p,84:T,99:_,101:E,102:C},{16:39,18:70,19:40,58:p,84:T,99:_,101:E,102:C},{16:39,18:71,19:40,58:p,84:T,99:_,101:E,102:C},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:p,84:T,99:_,101:E,102:C},{13:B,53:75},{56:77,58:[1,78]},t(A,[2,61]),t(A,[2,62]),t(A,[2,63]),t(A,[2,64]),t($,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:p,84:T,99:_,101:E,102:C}),t($,[2,14],{20:[1,82]}),{15:83,16:84,58:p,84:T,99:_,101:E},{16:39,18:85,19:40,58:p,84:T,99:_,101:E,102:C},t(F,[2,118]),t(F,[2,119]),t(F,[2,120]),t(F,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(S,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:e,35:n,37:r,42:i,46:a,47:s,49:l,50:c,52:h,54:u,55:d,58:p,60:g,61:f,62:m,63:y,73:v,74:x,76:b,80:w,81:k,84:T,99:_,101:E,102:C}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:n,37:r,38:22,42:i,43:23,46:a,47:s,49:l,50:c,52:h,54:u,55:d,58:p,60:g,61:f,62:m,63:y,73:v,74:x,76:b,80:w,81:k,84:T,99:_,101:E,102:C},t(A,[2,19]),t(A,[2,30]),t(A,[2,31]),{13:[1,89],16:39,18:88,19:40,58:p,84:T,99:_,101:E,102:C},{51:90,64:56,65:57,66:L,67:N,68:I,69:M,70:R,71:D,72:O},t(A,[2,49]),{65:91,71:D,72:O},t(z,[2,68],{64:92,66:L,67:N,68:I,69:M,70:R}),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(G,[2,74]),t(G,[2,75]),{8:[1,94],24:95,40:93,43:23,46:a},{16:96,58:p,84:T,99:_,101:E},{45:97,49:q},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:j,57:104,58:Y,80:W,82:105,83:106,84:H,85:V,86:X,87:K,88:Z,89:Q},{58:[1,116]},{13:B,53:117},t(A,[2,57]),t(A,[2,123]),{22:j,57:118,58:Y,59:[1,119],80:W,82:105,83:106,84:H,85:V,86:X,87:K,88:Z,89:Q},t(J,[2,59]),{16:39,18:120,19:40,58:p,84:T,99:_,101:E,102:C},t($,[2,15]),t($,[2,16]),t($,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:p,84:T,99:_,101:E},t(tt,[2,43],{11:123,12:[1,124]}),t(S,[2,7]),{9:[1,125]},t(et,[2,52]),{16:39,18:126,19:40,58:p,84:T,99:_,101:E,102:C},{13:[1,128],16:39,18:127,19:40,58:p,84:T,99:_,101:E,102:C},t(z,[2,67],{64:129,66:L,67:N,68:I,69:M,70:R}),t(z,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:a},{8:[1,132],41:[2,36]},t(P,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:q},{16:39,18:136,19:40,58:p,84:T,99:_,101:E,102:C},t(A,[2,76],{13:[1,137]}),t(A,[2,78],{13:[1,139],75:[1,138]}),t(A,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(A,[2,90],{59:nt}),t(rt,[2,92],{83:144,22:j,58:Y,80:W,84:H,85:V,86:X,87:K,88:Z,89:Q}),t(it,[2,94]),t(it,[2,96]),t(it,[2,97]),t(it,[2,98]),t(it,[2,99]),t(it,[2,100]),t(it,[2,101]),t(it,[2,102]),t(it,[2,103]),t(it,[2,104]),t(A,[2,91]),t(A,[2,56]),t(A,[2,58],{59:nt}),{58:[1,145]},t($,[2,13]),{15:146,16:84,58:p,84:T,99:_,101:E},{39:[2,11]},t(tt,[2,44]),{13:[1,147]},{1:[2,4]},t(et,[2,54]),t(et,[2,53]),{16:39,18:148,19:40,58:p,84:T,99:_,101:E,102:C},t(z,[2,65]),t(A,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:a},{45:151,49:q},t(P,[2,41]),{41:[2,47]},t(A,[2,45]),t(A,[2,77]),t(A,[2,79]),t(A,[2,80],{75:[1,152]}),t(A,[2,83]),t(A,[2,84],{13:[1,153]}),t(A,[2,86],{13:[1,155],75:[1,154]}),{22:j,58:Y,80:W,82:156,83:106,84:H,85:V,86:X,87:K,88:Z,89:Q},t(it,[2,95]),t(J,[2,60]),{39:[2,10]},{14:[1,157]},t(et,[2,55]),t(A,[2,34]),{41:[2,38]},{41:[1,158]},t(A,[2,81]),t(A,[2,85]),t(A,[2,87]),t(A,[2,88],{75:[1,159]}),t(rt,[2,93],{83:144,22:j,58:Y,80:W,84:H,85:V,86:X,87:K,88:Z,89:Q}),t(tt,[2,8]),t(P,[2,42]),t(A,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},st=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:o((function(t,e,n,r){switch(n){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:case 5:case 14:case 31:case 36:case 40:case 47:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 58:case 61:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 35:return 8;case 15:case 16:return 7;case 17:case 37:case 45:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 23:return 78;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:case 39:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:case 43:return this.popState(),41;case 34:case 44:return"EOF_IN_STRUCT";case 38:return this.begin("class"),46;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 46:return"OPEN_IN_STRUCT";case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 75;case 68:case 69:return 67;case 70:case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:case 85:return 88;case 86:return 89;case 87:case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:case 96:return 87;case 97:return 9}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return t}();function ot(){this.yy={}}return at.lexer=st,o(ot,"Parser"),ot.prototype=at,at.Parser=ot,new ot}();zct.parser=zct;var Uct=zct,Gct=["#","+","~","-",""],qct=class{static{o(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const n=ln(t,Kn());this.parseMember(n)}getDisplayDetails(){let t=this.visibility+vn(this.id);"method"===this.memberType&&(t+=`(${vn(this.parameters.trim())})`,this.returnType&&(t+=" : "+vn(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(n){const t=n[1]?n[1].trim():"";if(Gct.includes(t)&&(this.visibility=t),this.id=n[2],this.parameters=n[3]?n[3].trim():"",e=n[4]?n[4].trim():"",this.returnType=n[5]?n[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const n=t.length,r=t.substring(0,1),i=t.substring(n-1);Gct.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?n:n-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const n=`${this.visibility?"\\"+this.visibility:""}${vn(this.id)}${"method"===this.memberType?`(${vn(this.parameters)})${this.returnType?" : "+vn(this.returnType):""}`:""}`;this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},jct="classId-",Yct=[],Wct=new Map,Hct=new Map,Vct=[],Xct=[],Kct=0,Zct=new Map,Qct=0,Jct=[],tht=o((t=>Sn.sanitizeText(t,Kn())),"sanitizeText"),eht=o((function(t){const e=Sn.sanitizeText(t,Kn());let n="",r=e;if(e.indexOf("~")>0){const t=e.split("~");r=tht(t[0]),n=tht(t[1])}return{className:r,type:n}}),"splitClassNameAndType"),nht=o((function(t,e){const n=Sn.sanitizeText(t,Kn());e&&(e=tht(e));const{className:r}=eht(n);Wct.get(r).label=e,Wct.get(r).text=`${e}${Wct.get(r).type?`<${Wct.get(r).type}>`:""}`}),"setClassLabel"),rht=o((function(t){const e=Sn.sanitizeText(t,Kn()),{className:n,type:r}=eht(e);if(Wct.has(n))return;const i=Sn.sanitizeText(n,Kn());Wct.set(i,{id:i,type:r,label:i,text:`${i}${r?`<${r}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:jct+i+"-"+Kct}),Kct++}),"addClass"),iht=o((function(t,e){const n={id:`interface${Xct.length}`,label:t,classId:e};Xct.push(n)}),"addInterface"),aht=o((function(t){const e=Sn.sanitizeText(t,Kn());if(Wct.has(e))return Wct.get(e).domId;throw new Error("Class not found: "+e)}),"lookUpDomId"),sht=o((function(){Yct=[],Wct=new Map,Vct=[],Xct=[],(Jct=[]).push(Cht),Zct=new Map,Qct=0,Sht="TB",Un()}),"clear"),oht=o((function(t){return Wct.get(t)}),"getClass"),lht=o((function(){return Wct}),"getClasses"),cht=o((function(){return Yct}),"getRelations"),hht=o((function(){return Vct}),"getNotes"),uht=o((function(t){y.debug("Adding relation: "+JSON.stringify(t));const e=[Eht.LOLLIPOP,Eht.AGGREGATION,Eht.COMPOSITION,Eht.DEPENDENCY,Eht.EXTENSION];t.relation.type1!==Eht.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==Eht.LOLLIPOP||e.includes(t.relation.type1)?(rht(t.id1),rht(t.id2)):(rht(t.id1),iht(t.id2,t.id1),t.id2="interface"+(Xct.length-1)):(rht(t.id2),iht(t.id1,t.id2),t.id1="interface"+(Xct.length-1)),t.id1=eht(t.id1).className,t.id2=eht(t.id2).className,t.relationTitle1=Sn.sanitizeText(t.relationTitle1.trim(),Kn()),t.relationTitle2=Sn.sanitizeText(t.relationTitle2.trim(),Kn()),Yct.push(t)}),"addRelation"),dht=o((function(t,e){const n=eht(t).className;Wct.get(n).annotations.push(e)}),"addAnnotation"),pht=o((function(t,e){rht(t);const n=eht(t).className,r=Wct.get(n);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?r.annotations.push(tht(t.substring(2,t.length-2))):t.indexOf(")")>0?r.methods.push(new qct(t,"method")):t&&r.members.push(new qct(t,"attribute"))}}),"addMember"),ght=o((function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>pht(t,e))))}),"addMembers"),fht=o((function(t,e){const n={id:`note${Vct.length}`,class:e,text:t};Vct.push(n)}),"addNote"),mht=o((function(t){return t.startsWith(":")&&(t=t.substring(1)),tht(t.trim())}),"cleanupLabel"),yht=o((function(t,e){t.split(",").forEach((function(t){let n=t;/\d/.exec(t[0])&&(n=jct+n);const r=Wct.get(n);r&&(r.cssClasses+=" "+e)}))}),"setCssClass"),vht=o((function(t,e){for(const n of t){let t=Hct.get(n);void 0===t&&(t={id:n,styles:[],textStyles:[]},Hct.set(n,t)),e&&e.forEach((function(e){if(/color/.exec(e)){const n=e.replace("fill","bgFill");t.textStyles.push(n)}t.styles.push(e)})),Wct.forEach((t=>{t.cssClasses.includes(n)&&t.styles.push(...e.flatMap((t=>t.split(","))))}))}}),"defineClass"),xht=o((function(t,e){t.split(",").forEach((function(t){void 0!==e&&(Wct.get(t).tooltip=tht(e))}))}),"setTooltip"),bht=o((function(t,e){return e&&Zct.has(e)?Zct.get(e).classes.get(t).tooltip:Wct.get(t).tooltip}),"getTooltip"),wht=o((function(t,e,n){const r=Kn();t.split(",").forEach((function(t){let i=t;/\d/.exec(t[0])&&(i=jct+i);const a=Wct.get(i);a&&(a.link=Dk.formatUrl(e,r),"sandbox"===r.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof n?tht(n):"_blank")})),yht(t,"clickable")}),"setLink"),kht=o((function(t,e,n){t.split(",").forEach((function(t){Tht(t,e,n),Wct.get(t).haveCallback=!0})),yht(t,"clickable")}),"setClickEvent"),Tht=o((function(t,e,n){const r=Sn.sanitizeText(t,Kn());if("loose"!==Kn().securityLevel)return;if(void 0===e)return;const i=r;if(Wct.has(i)){const t=aht(i);let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);Fa(this).classed("hover",!1)}))}),"setupToolTips");Jct.push(Cht);var Sht="TB",Aht=o((()=>Sht),"getDirection"),Lht=o((t=>{Sht=t}),"setDirection"),Nht=o((function(t){Zct.has(t)||(Zct.set(t,{id:t,classes:new Map,children:{},domId:jct+t+"-"+Qct}),Qct++)}),"addNamespace"),Iht=o((function(t){return Zct.get(t)}),"getNamespace"),Mht=o((function(){return Zct}),"getNamespaces"),Rht=o((function(t,e){if(Zct.has(t))for(const n of e){const{className:e}=eht(n);Wct.get(e).parent=t,Zct.get(t).classes.set(e,Wct.get(e))}}),"addClassesToNamespace"),Dht=o((function(t,e){const n=Wct.get(t);if(e&&n)for(const t of e)t.includes(",")?n.styles.push(...t.split(",")):n.styles.push(t)}),"setCssStyle");function Oht(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}o(Oht,"getArrowMarker");var Pht=o((()=>{const t=[],e=[],n=Kn();for(const e of Zct.keys()){const r=Zct.get(e);if(r){const e={id:r.id,label:r.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:n.look};t.push(e)}}for(const e of Wct.keys()){const r=Wct.get(e);if(r){const e=r;e.parentId=r.parent,e.look=n.look,t.push(e)}}let r=0;for(const i of Vct){r++;const a={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look};t.push(a);const s=Wct.get(i.class)?.id??"";if(s){const t={id:`edgeNote${r}`,start:i.id,end:s,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};e.push(t)}}for(const e of Xct){const r={id:e.id,label:e.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};t.push(r)}r=0;for(const t of Yct){r++;const i={id:Bk(t.id1,t.id2,{prefix:"id",counter:r}),start:t.id1,end:t.id2,type:"normal",label:t.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:Oht(t.relation.type1),arrowTypeEnd:Oht(t.relation.type2),startLabelRight:"none"===t.relationTitle1?"":t.relationTitle1,endLabelLeft:"none"===t.relationTitle2?"":t.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:t.style||"",pattern:1==t.relation.lineType?"dashed":"solid",look:n.look};e.push(i)}return{nodes:t,edges:e,other:{},config:n,direction:Aht()}}),"getData"),Bht={setAccTitle:Gn,getAccTitle:qn,getAccDescription:Yn,setAccDescription:jn,getConfig:o((()=>Kn().class),"getConfig"),addClass:rht,bindFunctions:_ht,clear:sht,getClass:oht,getClasses:lht,getNotes:hht,addAnnotation:dht,addNote:fht,getRelations:cht,addRelation:uht,getDirection:Aht,setDirection:Lht,addMember:pht,addMembers:ght,cleanupLabel:mht,lineType:{LINE:0,DOTTED_LINE:1},relationType:Eht,setClickEvent:kht,setCssClass:yht,defineClass:vht,setLink:wht,getTooltip:bht,setTooltip:xht,lookUpDomId:aht,setDiagramTitle:Wn,getDiagramTitle:Hn,setClassLabel:nht,addNamespace:Nht,addClassesToNamespace:Rht,getNamespace:Iht,getNamespaces:Mht,setCssStyle:Dht,getData:Pht},$ht=o((t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles"),Fht=o(((t,e="TB")=>{if(!t.doc)return e;let n=e;for(const e of t.doc)"dir"===e.stmt&&(n=e.value);return n}),"getDir"),zht=o((function(t,e){return e.db.getClasses()}),"getClasses"),Uht=o((async function(t,e,n,r){y.info("REF0:"),y.info("Drawing class diagram (v3)",e);const{securityLevel:i,state:a,layout:s}=Kn(),o=r.db.getData(),l=WV(e,i);o.type=r.type,o.layoutAlgorithm=bA(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await xA(o,l);Dk.insertTitle(l,"classDiagramTitleText",a?.titleTopMargin??25,r.db.getDiagramTitle()),HV(l,8,"classDiagram",a?.useMaxWidth??!0)}),"draw"),Ght={getClasses:zht,draw:Uht,getDir:Fht},qht={parser:Uct,db:Bht,renderer:Ght,styles:$ht,init:o((t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Bht.clear()}),"init")},jht=Object.freeze({__proto__:null,diagram:qht}),Yht={parser:Uct,db:Bht,renderer:Ght,styles:$ht,init:o((t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Bht.clear()}),"init")},Wht=Object.freeze({__proto__:null,diagram:Yht}),Hht=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],s=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,32],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],_=[1,34],E=[1,35],C=[1,36],S=[1,37],A=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],M={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 3:return r.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:const t=a[o-1];t.description=r.trimColon(a[o]),this.$=t;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:const e=r.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:e};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l=a[o],c=a[o-2].trim();if(a[o].match(":")){var h=a[o].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 34:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 35:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 36:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}}),"anonymous"),table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,50:C,51:S,54:A},t(L,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,50:C,51:S,54:A},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,39],15:[1,40]}),t(L,[2,16]),{18:[1,41]},t(L,[2,18],{20:[1,42]}),{23:[1,43]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(L,[2,28]),{34:[1,48]},{36:[1,49]},t(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(N,[2,42],{55:[1,54]}),t(N,[2,43],{55:[1,55]}),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,6]),t(L,[2,13]),{13:56,24:d,54:A},t(L,[2,17]),t(I,i,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(L,[2,29]),t(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(L,[2,14],{14:[1,67]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,50:C,51:S,54:A},t(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(L,[2,32]),t(L,[2,33]),t(L,[2,34]),t(L,[2,35]),t(N,[2,44]),t(N,[2,45]),t(L,[2,15]),t(L,[2,19]),t(I,i,{7:72}),t(L,[2,26]),t(L,[2,27]),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,50:C,51:S,54:A},t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},R=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:return 41;case 1:case 42:return 48;case 2:case 43:return 49;case 3:case 44:return 50;case 4:case 45:return 51;case 5:case 6:case 8:case 9:case 10:case 11:case 54:case 56:case 62:break;case 7:case 77:return 5;case 12:case 32:return this.pushState("SCALE"),17;case 13:case 33:return 18;case 14:case 20:case 34:case 49:case 52:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 35:this.pushState("STATE");break;case 36:case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:case 64:return this.popState(),"ID";case 50:return"STATE_DESCR";case 51:return 19;case 53:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 63:return"NOTE_TEXT";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 78:return"INVALID"}}),"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return t}();function D(){this.yy={}}return M.lexer=R,o(D,"Parser"),D.prototype=M,M.Parser=D,new D}();Hht.parser=Hht;var Vht=Hht,Xht="state",Kht="relation",Zht="default",Qht="divider",Jht="fill:none",tut="fill: #333",eut="text",nut="normal",rut="rect",iut="rectWithTitle",aut="divider",sut="roundedWithTitle",out="statediagram",lut="transition",cut="parent",hut="note",uut="----parent",dut=o(((t,e="TB")=>{if(!t.doc)return e;let n=e;for(const e of t.doc)"dir"===e.stmt&&(n=e.value);return n}),"getDir"),put=o((function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}),"getClasses"),gut=o((async function(t,e,n,r){y.info("REF0:"),y.info("Drawing state diagram (v2)",e);const{securityLevel:i,state:a,layout:s}=Kn();r.db.extract(r.db.getRootDocV2());const o=r.db.getData(),l=WV(e,i);o.type=r.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await xA(o,l);Dk.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,r.db.getDiagramTitle()),HV(l,8,out,a?.useMaxWidth??!0)}),"draw"),fut={getClasses:put,draw:gut,getDir:dut},mut=new Map,yut=0;function vut(t="",e=0,n="",r="----"){return`state-${t}${null!==n&&n.length>0?`${r}${n}`:""}-${e}`}o(vut,"stateDomId");var xut=o(((t,e,n,r,i,a,s,o)=>{y.trace("items",e),e.forEach((e=>{switch(e.stmt){case Xht:case Zht:_ut(t,e,n,r,i,a,s,o);break;case Kht:{_ut(t,e.state1,n,r,i,a,s,o),_ut(t,e.state2,n,r,i,a,s,o);const l={id:"edge"+yut,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Jht,labelStyle:"",label:Sn.sanitizeText(e.description,Kn()),arrowheadStyle:tut,labelpos:"c",labelType:eut,thickness:nut,classes:lut,look:s};i.push(l),yut++}}}))}),"setupDoc"),but=o(((t,e="TB")=>{let n=e;if(t.doc)for(const e of t.doc)"dir"===e.stmt&&(n=e.value);return n}),"getDir");function wut(t,e,n){if(!e.id||""===e.id||""===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach((t=>{if(n.get(t)){const r=n.get(t);e.cssCompiledStyles=[...e.cssCompiledStyles,...r.styles]}})));const r=t.find((t=>t.id===e.id));r?Object.assign(r,e):t.push(e)}function kut(t){return t?.classes?.join(" ")??""}function Tut(t){return t?.styles??[]}o(wut,"insertOrUpdateNode"),o(kut,"getClassesFromDbInfo"),o(Tut,"getStylesFromDbInfo");var _ut=o(((t,e,n,r,i,a,s,o)=>{const l=e.id,c=n.get(l),h=kut(c),u=Tut(c);if(y.info("dataFetcher parsedItem",e,c,u),"root"!==l){let n=rut;!0===e.start?n="stateStart":!1===e.start&&(n="stateEnd"),e.type!==Zht&&(n=e.type),mut.get(l)||mut.set(l,{id:l,shape:n,description:Sn.sanitizeText(l,Kn()),cssClasses:`${h} statediagram-state`,cssStyles:u});const c=mut.get(l);e.description&&(Array.isArray(c.description)?(c.shape=iut,c.description.push(e.description)):c.description?.length>0?(c.shape=iut,c.description===l?c.description=[e.description]:c.description=[c.description,e.description]):(c.shape=rut,c.description=e.description),c.description=Sn.sanitizeTextOrArray(c.description,Kn())),1===c.description?.length&&c.shape===iut&&("group"===c.type?c.shape=sut:c.shape=rut),!c.type&&e.doc&&(y.info("Setting cluster for XCX",l,but(e)),c.type="group",c.isGroup=!0,c.dir=but(e),c.shape=e.type===Qht?aut:sut,c.cssClasses=`${c.cssClasses} statediagram-cluster ${a?"statediagram-cluster-alt":""}`);const d={labelStyle:"",shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:l,dir:c.dir,domId:vut(l,yut),type:c.type,isGroup:"group"===c.type,padding:8,rx:10,ry:10,look:s};if(d.shape===aut&&(d.label=""),t&&"root"!==t.id&&(y.trace("Setting node ",l," to be child of its parent ",t.id),d.parentId=t.id),d.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:"statediagram-note",cssStyles:[],cssCompilesStyles:[],id:l+"----note-"+yut,domId:vut(l,yut,hut),type:c.type,isGroup:"group"===c.type,padding:Kn().flowchart.padding,look:s,position:e.note.position},n=l+uut,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:c.cssClasses,cssStyles:[],id:l+uut,domId:vut(l,yut,cut),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};yut++,a.id=n,t.parentId=n,wut(r,a,o),wut(r,t,o),wut(r,d,o);let h=l,u=t.id;"left of"===e.note.position&&(h=t.id,u=l),i.push({id:h+"-"+u,start:h,end:u,arrowhead:"none",arrowTypeEnd:"",style:Jht,labelStyle:"",classes:"transition note-edge",arrowheadStyle:tut,labelpos:"c",labelType:eut,thickness:nut,look:s})}else wut(r,d,o)}e.doc&&(y.trace("Adding nodes children "),xut(e,e.doc,n,r,i,!a,s,o))}),"dataFetcher"),Eut=o((()=>{mut.clear(),yut=0}),"reset"),Cut="[*]",Sut="start",Aut="color",Lut="fill";function Nut(){return new Map}o(Nut,"newClassesList");var Iut=[],Mut=[],Rut="LR",Dut=[],Out=Nut(),Put=o((()=>({relations:[],states:new Map,documents:{}})),"newDoc"),But={root:Put()},$ut=But.root,Fut=0,zut=0,Uut=o((t=>JSON.parse(JSON.stringify(t))),"clone"),Gut=o((t=>{y.info("Setting root doc",t),Dut=t}),"setRootDoc"),qut=o((()=>Dut),"getRootDoc"),jut=o(((t,e,n)=>{if(e.stmt===Kht)jut(t,e.state1,!0),jut(t,e.state2,!1);else if(e.stmt===Xht&&("[*]"===e.id?(e.id=n?t.id+"_start":t.id+"_end",e.start=n):e.id=e.id.trim()),e.doc){const t=[];let n,r=[];for(n=0;n0&&r.length>0){const n={stmt:Xht,id:yk(),type:"divider",doc:Uut(r)};t.push(Uut(n)),e.doc=t}e.doc.forEach((t=>jut(e,t,!0)))}}),"docTranslator"),Yut=o((()=>(jut({id:"root"},{id:"root",doc:Dut},!0),{id:"root",doc:Dut})),"getRootDocV2"),Wut=o((t=>{let e;e=t.doc?t.doc:t,y.info(e),Vut(!0),y.info("Extract initial document:",e),e.forEach((t=>{switch(y.warn("Statement",t.stmt),t.stmt){case Xht:Hut(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case Kht:adt(t.state1,t.state2,t.description);break;case"classDef":cdt(t.id.trim(),t.classes);break;case"style":{const e=t.id.trim().split(","),n=t.styleClass.split(",");e.forEach((t=>{let e=Xut(t);if(void 0===e){const n=t.trim();Hut(n),e=Xut(n)}e.styles=n.map((t=>t.replace(/;/g,"")?.trim()))}))}break;case"applyClass":udt(t.id.trim(),t.styleClass)}}));const n=Kut(),r=Kn().look;Eut(),_ut(void 0,Yut(),n,Iut,Mut,!0,r,Out),Iut.forEach((t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+t.id+"]");t.label=t.label[0]}}))}),"extract"),Hut=o((function(t,e="default",n=null,r=null,i=null,a=null,s=null,o=null){const l=t?.trim();if($ut.states.has(l)?($ut.states.get(l).doc||($ut.states.get(l).doc=n),$ut.states.get(l).type||($ut.states.get(l).type=e)):(y.info("Adding state ",l,r),$ut.states.set(l,{id:l,descriptions:[],type:e,doc:n,note:i,classes:[],styles:[],textStyles:[]})),r&&(y.info("Setting state description",l,r),"string"==typeof r&&sdt(l,r.trim()),"object"==typeof r&&r.forEach((t=>sdt(l,t.trim())))),i){const t=$ut.states.get(l);t.note=i,t.note.text=Sn.sanitizeText(t.note.text,Kn())}if(a){y.info("Setting state classes",l,a);("string"==typeof a?[a]:a).forEach((t=>udt(l,t.trim())))}if(s){y.info("Setting state styles",l,s);("string"==typeof s?[s]:s).forEach((t=>ddt(l,t.trim())))}if(o){y.info("Setting state styles",l,s);("string"==typeof o?[o]:o).forEach((t=>pdt(l,t.trim())))}}),"addState"),Vut=o((function(t){Iut=[],Mut=[],But={root:Put()},$ut=But.root,Fut=0,Out=Nut(),t||Un()}),"clear"),Xut=o((function(t){return $ut.states.get(t)}),"getState"),Kut=o((function(){return $ut.states}),"getStates"),Zut=o((function(){y.info("Documents = ",But)}),"logDocuments"),Qut=o((function(){return $ut.relations}),"getRelations");function Jut(t=""){let e=t;return t===Cut&&(e=`start${++Fut}`),e}function tdt(t="",e="default"){return t===Cut?Sut:e}function edt(t=""){let e=t;return"[*]"===t&&(e=`end${++Fut}`),e}function ndt(t="",e="default"){return"[*]"===t?"end":e}function rdt(t,e,n){let r=Jut(t.id.trim()),i=tdt(t.id.trim(),t.type),a=Jut(e.id.trim()),s=tdt(e.id.trim(),e.type);Hut(r,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Hut(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),$ut.relations.push({id1:r,id2:a,relationTitle:Sn.sanitizeText(n,Kn())})}o(Jut,"startIdIfNeeded"),o(tdt,"startTypeIfNeeded"),o(edt,"endIdIfNeeded"),o(ndt,"endTypeIfNeeded"),o(rdt,"addRelationObjs");var idt,adt=o((function(t,e,n){if("object"==typeof t)rdt(t,e,n);else{const r=Jut(t.trim()),i=tdt(t),a=edt(e.trim()),s=ndt(e);Hut(r,i),Hut(a,s),$ut.relations.push({id1:r,id2:a,title:Sn.sanitizeText(n,Kn())})}}),"addRelation"),sdt=o((function(t,e){const n=$ut.states.get(t),r=e.startsWith(":")?e.replace(":","").trim():e;n.descriptions.push(Sn.sanitizeText(r,Kn()))}),"addDescription"),odt=o((function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()}),"cleanupLabel"),ldt=o((()=>"divider-id-"+ ++zut),"getDividerId"),cdt=o((function(t,e=""){Out.has(t)||Out.set(t,{id:t,styles:[],textStyles:[]});const n=Out.get(t);null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(Aut).exec(t)){const t=e.replace(Lut,"bgFill").replace(Aut,Lut);n.textStyles.push(t)}n.styles.push(e)}))}),"addStyleClass"),hdt=o((function(){return Out}),"getClasses"),udt=o((function(t,e){t.split(",").forEach((function(t){let n=Xut(t);if(void 0===n){const e=t.trim();Hut(e),n=Xut(e)}n.classes.push(e)}))}),"setCssClass"),ddt=o((function(t,e){const n=Xut(t);void 0!==n&&n.styles.push(e)}),"setStyle"),pdt=o((function(t,e){const n=Xut(t);void 0!==n&&n.textStyles.push(e)}),"setTextStyle"),gdt=o((()=>Rut),"getDirection"),fdt=o((t=>{Rut=t}),"setDirection"),mdt=o((t=>t&&":"===t[0]?t.substr(1).trim():t.trim()),"trimColon"),ydt=o((()=>{const t=Kn();return{nodes:Iut,edges:Mut,other:{},config:t,direction:dut(Yut())}}),"getData"),vdt={getConfig:o((()=>Kn().state),"getConfig"),getData:ydt,addState:Hut,clear:Vut,getState:Xut,getStates:Kut,getRelations:Qut,getClasses:hdt,getDirection:gdt,addRelation:adt,getDividerId:ldt,setDirection:fdt,cleanupLabel:odt,lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:Zut,getRootDoc:qut,setRootDoc:Gut,getRootDocV2:Yut,extract:Wut,trimColon:mdt,getAccTitle:qn,setAccTitle:Gn,getAccDescription:Yn,setAccDescription:jn,addStyleClass:cdt,setCssClass:udt,addDescription:sdt,setDiagramTitle:Wn,getDiagramTitle:Hn},xdt=o((t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles"),bdt={},wdt=o(((t,e)=>{bdt[t]=e}),"set"),kdt=o((t=>bdt[t]),"get"),Tdt=o((()=>Object.keys(bdt)),"keys"),_dt=o((()=>Tdt().length),"size"),Edt={get:kdt,set:wdt,keys:Tdt,size:_dt},Cdt=o((t=>t.append("circle").attr("class","start-state").attr("r",Kn().state.sizeUnit).attr("cx",Kn().state.padding+Kn().state.sizeUnit).attr("cy",Kn().state.padding+Kn().state.sizeUnit)),"drawStartState"),Sdt=o((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Kn().state.textHeight).attr("class","divider").attr("x2",2*Kn().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),Adt=o(((t,e)=>{const n=t.append("text").attr("x",2*Kn().state.padding).attr("y",Kn().state.textHeight+2*Kn().state.padding).attr("font-size",Kn().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();return t.insert("rect",":first-child").attr("x",Kn().state.padding).attr("y",Kn().state.padding).attr("width",r.width+2*Kn().state.padding).attr("height",r.height+2*Kn().state.padding).attr("rx",Kn().state.radius),n}),"drawSimpleState"),Ldt=o(((t,e)=>{const n=o((function(t,e,n){const r=t.append("tspan").attr("x",2*Kn().state.padding).text(e);n||r.attr("dy",Kn().state.textHeight)}),"addTspan"),r=t.append("text").attr("x",2*Kn().state.padding).attr("y",Kn().state.textHeight+1.3*Kn().state.padding).attr("font-size",Kn().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=r.height,a=t.append("text").attr("x",Kn().state.padding).attr("y",i+.4*Kn().state.padding+Kn().state.dividerMargin+Kn().state.textHeight).attr("class","state-description");let s=!0,l=!0;e.descriptions.forEach((function(t){s||(n(a,t,l),l=!1),s=!1}));const c=t.append("line").attr("x1",Kn().state.padding).attr("y1",Kn().state.padding+i+Kn().state.dividerMargin/2).attr("y2",Kn().state.padding+i+Kn().state.dividerMargin/2).attr("class","descr-divider"),h=a.node().getBBox(),u=Math.max(h.width,r.width);return c.attr("x2",u+3*Kn().state.padding),t.insert("rect",":first-child").attr("x",Kn().state.padding).attr("y",Kn().state.padding).attr("width",u+2*Kn().state.padding).attr("height",h.height+i+2*Kn().state.padding).attr("rx",Kn().state.radius),t}),"drawDescrState"),Ndt=o(((t,e,n)=>{const r=Kn().state.padding,i=2*Kn().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",Kn().state.titleShift).attr("font-size",Kn().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+i;let h,u=Math.max(c,s);u===s&&(u+=i);const d=t.node().getBBox();e.doc,h=o-r,c>s&&(h=(s-u)/2+r),Math.abs(o-d.x)s&&(h=o-(c-s)/2);const p=1-Kn().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",u).attr("height",d.height+Kn().state.textHeight+Kn().state.titleShift+1).attr("rx","0"),l.attr("x",h+r),c<=s&&l.attr("x",o+(u-i)/2-c/2+r),t.insert("rect",":first-child").attr("x",h).attr("y",Kn().state.titleShift-Kn().state.textHeight-Kn().state.padding).attr("width",u).attr("height",3*Kn().state.textHeight).attr("rx",Kn().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",Kn().state.titleShift-Kn().state.textHeight-Kn().state.padding).attr("width",u).attr("height",d.height+3+2*Kn().state.textHeight).attr("rx",Kn().state.radius),t}),"addTitleAndBox"),Idt=o((t=>(t.append("circle").attr("class","end-state-outer").attr("r",Kn().state.sizeUnit+Kn().state.miniPadding).attr("cx",Kn().state.padding+Kn().state.sizeUnit+Kn().state.miniPadding).attr("cy",Kn().state.padding+Kn().state.sizeUnit+Kn().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Kn().state.sizeUnit).attr("cx",Kn().state.padding+Kn().state.sizeUnit+2).attr("cy",Kn().state.padding+Kn().state.sizeUnit+2))),"drawEndState"),Mdt=o(((t,e)=>{let n=Kn().state.forkWidth,r=Kn().state.forkHeight;if(e.parentId){let t=n;n=r,r=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",Kn().state.padding).attr("y",Kn().state.padding)}),"drawForkJoinState"),Rdt=o(((t,e,n,r)=>{let i=0;const a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");const o=s.split(Sn.lineBreakRegex);let l=1.25*Kn().state.noteMargin;for(const t of o){const r=t.trim();if(r.length>0){const t=a.append("tspan");if(t.text(r),0===l){l+=t.node().getBBox().height}i+=l,t.attr("x",e+Kn().state.noteMargin),t.attr("y",n+i+1.25*Kn().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}}),"_drawLongText"),Ddt=o(((t,e)=>{e.attr("class","state-note");const n=e.append("rect").attr("x",0).attr("y",Kn().state.padding),r=e.append("g"),{textWidth:i,textHeight:a}=Rdt(t,0,0,r);return n.attr("height",a+2*Kn().state.noteMargin),n.attr("width",i+2*Kn().state.noteMargin),n}),"drawNote"),Odt=o((function(t,e){const n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&Cdt(i),"end"===e.type&&Idt(i),"fork"!==e.type&&"join"!==e.type||Mdt(i,e),"note"===e.type&&Ddt(e.note.text,i),"divider"===e.type&&Sdt(i),"default"===e.type&&0===e.descriptions.length&&Adt(i,e),"default"===e.type&&e.descriptions.length>0&&Ldt(i,e);const a=i.node().getBBox();return r.width=a.width+2*Kn().state.padding,r.height=a.height+2*Kn().state.padding,Edt.set(n,r),r}),"drawState"),Pdt=0,Bdt=o((function(t,e,n){const r=o((function(t){switch(t){case vdt.relationType.AGGREGATION:return"aggregation";case vdt.relationType.EXTENSION:return"extension";case vdt.relationType.COMPOSITION:return"composition";case vdt.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const i=e.points,a=uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(bu),s=t.append("path").attr("d",a(i)).attr("id","edge"+Pdt).attr("class","transition");let l="";if(Kn().state.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),s.attr("marker-end","url("+l+"#"+r(vdt.relationType.DEPENDENCY)+"End)"),void 0!==n.title){const r=t.append("g").attr("class","stateLabel"),{x:i,y:a}=Dk.calcLabelPosition(e.points),s=Sn.getRows(n.title);let o=0;const l=[];let c=0,h=0;for(let t=0;t<=s.length;t++){const e=r.append("text").attr("text-anchor","middle").text(s[t]).attr("x",i).attr("y",a+o),n=e.node().getBBox();if(c=Math.max(c,n.width),h=Math.min(h,n.x),y.info(n.x,i,a+o),0===o){const t=e.node().getBBox();o=t.height,y.info("Title height",o,a)}l.push(e)}let u=o*s.length;if(s.length>1){const t=(s.length-1)*o*.5;l.forEach(((e,n)=>e.attr("y",a+n*o-t))),u=o*s.length}const d=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",i-c/2-Kn().state.padding/2).attr("y",a-u/2-Kn().state.padding/2-3.5).attr("width",c+Kn().state.padding).attr("height",u+Kn().state.padding),y.info(d)}Pdt++}),"drawEdge"),$dt={},Fdt=o((function(){}),"setConf"),zdt=o((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),Udt=o((function(t,e,n,r){idt=Kn().state;const i=Kn().securityLevel;let a;"sandbox"===i&&(a=Fa("#i"+e));const s=Fa("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document;y.debug("Rendering diagram "+t);const l=s.select(`[id='${e}']`);zdt(l);const c=r.db.getRootDoc();qdt(c,l,void 0,!1,s,o,r);const h=idt.padding,u=l.node().getBBox(),d=u.width+2*h,p=u.height+2*h;Nn(l,p,1.75*d,idt.useMaxWidth),l.attr("viewBox",`${u.x-idt.padding} ${u.y-idt.padding} `+d+" "+p)}),"draw"),Gdt=o((t=>t?t.length*idt.fontSizeFactor:1),"getLabelWidth"),qdt=o(((t,e,n,r,i,a,s)=>{const o=new cj({compound:!0,multigraph:!0});let l,c=!0;for(l=0;l{const e=t.parentElement;let n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))}else y.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}));let f=g.getBBox();o.edges().forEach((function(t){void 0!==t&&void 0!==o.edge(t)&&(y.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),Bdt(e,o.edge(t),o.edge(t).relation))})),f=g.getBBox();const m={id:n||"root",label:n||"root",width:0,height:0};return m.width=f.width+2*idt.padding,m.height=f.height+2*idt.padding,y.debug("Doc rendered",m,o),m}),"renderDoc"),jdt={parser:Vht,db:vdt,renderer:{setConf:Fdt,draw:Udt},styles:xdt,init:o((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,vdt.clear()}),"init")},Ydt=Object.freeze({__proto__:null,diagram:jdt}),Wdt={parser:Vht,db:vdt,renderer:fut,styles:xdt,init:o((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,vdt.clear()}),"init")},Hdt=Object.freeze({__proto__:null,diagram:Wdt}),Vdt=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],r=[1,10],i=[1,11],a=[1,12],s=[1,13],l=[1,14],c={trace:o((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:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:r.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:r.addTask(a[o-1],a[o]),this.$="task"}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,14:i,16:a,17:s,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:r,14:i,16:a,17:s,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},h=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return t}();function u(){this.yy={}}return c.lexer=h,o(u,"Parser"),u.prototype=c,c.Parser=u,new u}();Vdt.parser=Vdt;var Xdt=Vdt,Kdt="",Zdt=[],Qdt=[],Jdt=[],tpt=o((function(){Zdt.length=0,Qdt.length=0,Kdt="",Jdt.length=0,Un()}),"clear"),ept=o((function(t){Kdt=t,Zdt.push(t)}),"addSection"),npt=o((function(){return Zdt}),"getSections"),rpt=o((function(){let t=opt();let e=0;for(;!t&&e<100;)t=opt(),e++;return Qdt.push(...Jdt),Qdt}),"getTasks"),ipt=o((function(){const t=[];Qdt.forEach((e=>{e.people&&t.push(...e.people)}));return[...new Set(t)].sort()}),"updateActors"),apt=o((function(t,e){const n=e.substr(1).split(":");let r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));const a=i.map((t=>t.trim())),s={section:Kdt,type:Kdt,people:a,task:t,score:r};Jdt.push(s)}),"addTask"),spt=o((function(t){const e={section:Kdt,type:Kdt,description:t,task:t,classes:[]};Qdt.push(e)}),"addTaskOrg"),opt=o((function(){const t=o((function(t){return Jdt[t].processed}),"compileTask");let e=!0;for(const[n,r]of Jdt.entries())t(n),e=e&&r.processed;return e}),"compileTasks"),lpt=o((function(){return ipt()}),"getActors"),cpt={getConfig:o((()=>Kn().journey),"getConfig"),clear:tpt,setDiagramTitle:Wn,getDiagramTitle:Hn,setAccTitle:Gn,getAccTitle:qn,setAccDescription:jn,getAccDescription:Yn,addSection:ept,getSections:npt,getTasks:rpt,addTask:apt,addTaskOrg:spt,getActors:lpt},hpt=o((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),upt=o((function(t,e){return hH(t,e)}),"drawRect"),dpt=o((function(t,e){const n=15,r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const r=au().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function s(t){const r=au().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o(a,"smile"),o(s,"sad"),o(l,"ambivalent"),e.score>3?a(i):e.score<3?s(i):l(i),r}),"drawFace"),ppt=o((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),gpt=o((function(t,e){return dH(t,e)}),"drawText"),fpt=o((function(t,e){function n(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-i)+" "+(t+n-1.2*i)+","+(e+r)+" "+t+","+(e+r)}o(n,"genPoints");const r=t.append("polygon");r.attr("points",n(e.x,e.y,50,20,7)),r.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,gpt(t,e)}),"drawLabel"),mpt=o((function(t,e,n){const r=t.append("g"),i=fH();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,upt(r,i),bpt(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),ypt=-1,vpt=o((function(t,e,n){const r=e.x+n.width/2,i=t.append("g");ypt++;i.append("line").attr("id","task"+ypt).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),dpt(i,{cx:r,cy:300+30*(5-e.score),score:e.score});const a=fH();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,upt(i,a);let s=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,r={cx:s,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};ppt(i,r),s+=10})),bpt(n)(e.task,i,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)}),"drawTask"),xpt=o((function(t,e){uH(t,e)}),"drawBackgroundRect"),bpt=function(){function t(t,e,n,i,a,s,o,l){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,a,s,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,d=t.split(//gi);for(let t=0;t{const i=Tpt[r].color,a={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:Tpt[r].position};wpt.drawCircle(t,a);const s={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};wpt.drawText(t,s),n+=20}))}o(_pt,"drawActorLegend");var Ept=Kn().journey,Cpt=Ept.leftMargin,Spt=o((function(t,e,n,r){const i=Kn().journey,a=Kn().securityLevel;let s;"sandbox"===a&&(s=Fa("#i"+e));const o=Fa("sandbox"===a?s.nodes()[0].contentDocument.body:"body");Apt.init();const l=o.select("#"+e);wpt.initGraphics(l);const c=r.db.getTasks(),h=r.db.getDiagramTitle(),u=r.db.getActors();for(const t in Tpt)delete Tpt[t];let d=0;u.forEach((t=>{Tpt[t]={color:i.actorColours[d%i.actorColours.length],position:d},d++})),_pt(l),Apt.insert(0,0,Cpt,50*Object.keys(Tpt).length),Ipt(l,c,0);const p=Apt.getBounds();h&&l.append("text").text(h).attr("x",Cpt).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=p.stopy-p.starty+2*i.diagramMarginY,f=Cpt+p.stopx+2*i.diagramMarginX;Nn(l,g,f,i.useMaxWidth),l.append("line").attr("x1",Cpt).attr("y1",4*i.height).attr("x2",f-Cpt-4).attr("y2",4*i.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=h?70:0;l.attr("viewBox",`${p.startx} -25 ${f} ${g+m}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",g+m+25)}),"draw"),Apt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:o((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:o((function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])}),"updateVal"),updateBounds:o((function(t,e,n,r){const i=Kn().journey,a=this;let s=0;function l(l){return o((function(o){s++;const c=a.sequenceItems.length-s+1;a.updateVal(o,"starty",e-c*i.boxMargin,Math.min),a.updateVal(o,"stopy",r+c*i.boxMargin,Math.max),a.updateVal(Apt.data,"startx",t-c*i.boxMargin,Math.min),a.updateVal(Apt.data,"stopx",n+c*i.boxMargin,Math.max),"activation"!==l&&(a.updateVal(o,"startx",t-c*i.boxMargin,Math.min),a.updateVal(o,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(Apt.data,"starty",e-c*i.boxMargin,Math.min),a.updateVal(Apt.data,"stopy",r+c*i.boxMargin,Math.max))}),"updateItemBounds")}o(l,"updateFn"),this.sequenceItems.forEach(l())}),"updateBounds"),insert:o((function(t,e,n,r){const i=Math.min(t,n),a=Math.max(t,n),s=Math.min(e,r),o=Math.max(e,r);this.updateVal(Apt.data,"startx",i,Math.min),this.updateVal(Apt.data,"starty",s,Math.min),this.updateVal(Apt.data,"stopx",a,Math.max),this.updateVal(Apt.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)}),"insert"),bumpVerticalPos:o((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:o((function(){return this.verticalPos}),"getVerticalPos"),getBounds:o((function(){return this.data}),"getBounds")},Lpt=Ept.sectionFills,Npt=Ept.sectionColours,Ipt=o((function(t,e,n){const r=Kn().journey;let i="";const a=n+(2*r.height+r.diagramMarginY);let s=0,o="#CCC",l="black",c=0;for(const[n,h]of e.entries()){if(i!==h.section){o=Lpt[s%Lpt.length],c=s%Lpt.length,l=Npt[s%Npt.length];let a=0;const u=h.section;for(let t=n;t(Tpt[e]&&(t[e]=Tpt[e]),t)),{});h.x=n*r.taskMargin+n*r.width+Cpt,h.y=a,h.width=r.diagramMarginX,h.height=r.diagramMarginY,h.colour=l,h.fill=o,h.num=c,h.actors=u,wpt.drawTask(t,h,r),Apt.insert(h.x,h.y,h.x+h.width+r.taskMargin,450)}}),"drawTasks"),Mpt={setConf:kpt,draw:Spt},Rpt={parser:Xdt,db:cpt,renderer:Mpt,styles:hpt,init:o((t=>{Mpt.setConf(t.journey),cpt.clear()}),"init")},Dpt=Object.freeze({__proto__:null,diagram:Rpt}),Opt=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],r=[1,10],i=[1,11],a=[1,12],s=[1,13],l=[1,16],c=[1,17],h={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:r.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),r.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),r.getCommonDb().setAccDescription(this.$);break;case 12:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:r.addTask(a[o],0,""),this.$=a[o];break;case 16:r.addEvent(a[o].substr(2)),this.$=a[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,14:i,16:a,17:s,18:14,19:15,20:l,21:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:r,14:i,16:a,17:s,18:14,19:15,20:l,21:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},u=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return t}();function d(){this.yy={}}return h.lexer=u,o(d,"Parser"),d.prototype=h,h.Parser=d,new d}();Opt.parser=Opt;var Ppt=Opt,Bpt={};h(Bpt,{addEvent:()=>Xpt,addSection:()=>Ypt,addTask:()=>Vpt,addTaskOrg:()=>Kpt,clear:()=>jpt,default:()=>Qpt,getCommonDb:()=>qpt,getSections:()=>Wpt,getTasks:()=>Hpt});var $pt="",Fpt=0,zpt=[],Upt=[],Gpt=[],qpt=o((()=>Pn),"getCommonDb"),jpt=o((function(){zpt.length=0,Upt.length=0,$pt="",Gpt.length=0,Un()}),"clear"),Ypt=o((function(t){$pt=t,zpt.push(t)}),"addSection"),Wpt=o((function(){return zpt}),"getSections"),Hpt=o((function(){let t=Zpt();let e=0;for(;!t&&e<100;)t=Zpt(),e++;return Upt.push(...Gpt),Upt}),"getTasks"),Vpt=o((function(t,e,n){const r={id:Fpt++,section:$pt,type:$pt,task:t,score:e||0,events:n?[n]:[]};Gpt.push(r)}),"addTask"),Xpt=o((function(t){Gpt.find((t=>t.id===Fpt-1)).events.push(t)}),"addEvent"),Kpt=o((function(t){const e={section:$pt,type:$pt,description:t,task:t,classes:[]};Upt.push(e)}),"addTaskOrg"),Zpt=o((function(){const t=o((function(t){return Gpt[t].processed}),"compileTask");let e=!0;for(const[n,r]of Gpt.entries())t(n),e=e&&r.processed;return e}),"compileTasks"),Qpt={clear:jpt,getCommonDb:qpt,addSection:Ypt,getSections:Wpt,getTasks:Hpt,addTask:Vpt,addTaskOrg:Kpt,addEvent:Xpt},Jpt=o((function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n}),"drawRect"),tgt=o((function(t,e){const n=15,r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const r=au().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function s(t){const r=au().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o(a,"smile"),o(s,"sad"),o(l,"ambivalent"),e.score>3?a(i):e.score<3?s(i):l(i),r}),"drawFace"),egt=o((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),ngt=o((function(t,e){const n=e.text.replace(//gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);const i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r}),"drawText"),rgt=o((function(t,e){function n(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-i)+" "+(t+n-1.2*i)+","+(e+r)+" "+t+","+(e+r)}o(n,"genPoints");const r=t.append("polygon");r.attr("points",n(e.x,e.y,50,20,7)),r.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ngt(t,e)}),"drawLabel"),igt=o((function(t,e,n){const r=t.append("g"),i=cgt();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,Jpt(r,i),hgt(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),agt=-1,sgt=o((function(t,e,n){const r=e.x+n.width/2,i=t.append("g");agt++;i.append("line").attr("id","task"+agt).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),tgt(i,{cx:r,cy:300+30*(5-e.score),score:e.score});const a=cgt();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Jpt(i,a),hgt(n)(e.task,i,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)}),"drawTask"),ogt=o((function(t,e){Jpt(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),lgt=o((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),cgt=o((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),hgt=function(){function t(t,e,n,i,a,s,o,l){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,a,s,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,d=t.split(//gi);for(let t=0;t)/).reverse(),i=[],a=n.attr("y"),s=parseFloat(n.attr("dy")),o=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",s+"em");for(let s=0;se||"
    "===t)&&(i.pop(),o.text(i.join(" ").trim()),i="
    "===t?[""]:[t],o=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}o(dgt,"wrap");var pgt=o((function(t,e,n,r){const i=n%12-1,a=t.append("g");e.section=i,a.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+i);const s=a.append("g"),o=a.append("g"),l=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(dgt,e.width).node().getBBox(),c=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return e.height=l.height+1.1*c*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),fgt(s,e,i,r),e}),"drawNode"),ggt=o((function(t,e,n){const r=t.append("g"),i=r.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(dgt,e.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return r.remove(),i.height+1.1*a*.5+e.padding}),"getVirtualNodeHeight"),fgt=o((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),mgt={drawRect:Jpt,drawCircle:egt,drawSection:igt,drawText:ngt,drawLabel:rgt,drawTask:sgt,drawBackgroundRect:ogt,getTextObj:lgt,getNoteRect:cgt,initGraphics:ugt,drawNode:pgt,getVirtualNodeHeight:ggt},ygt=o((function(t,e,n,r){const i=Kn(),a=i.leftMargin??50;y.debug("timeline",r.db);const s=i.securityLevel;let o;"sandbox"===s&&(o=Fa("#i"+e));const l=Fa("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+e);l.append("g");const c=r.db.getTasks(),h=r.db.getCommonDb().getDiagramTitle();y.debug("task",c),mgt.initGraphics(l);const u=r.db.getSections();y.debug("sections",u);let d=0,p=0,g=0,f=0,m=50+a,v=50;f=50;let x=0,b=!0;u.forEach((function(t){const e={number:x,descr:t,section:x,width:150,padding:20,maxHeight:d},n=mgt.getVirtualNodeHeight(l,e,i);y.debug("sectionHeight before draw",n),d=Math.max(d,n+20)}));let w=0,k=0;y.debug("tasks.length",c.length);for(const[t,e]of c.entries()){const n={number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:p},r=mgt.getVirtualNodeHeight(l,n,i);y.debug("taskHeight before draw",r),p=Math.max(p,r+20),w=Math.max(w,e.events.length);let a=0;for(const t of e.events){const n={descr:t,section:e.section,number:e.section,width:150,padding:20,maxHeight:50};a+=mgt.getVirtualNodeHeight(l,n,i)}k=Math.max(k,a)}y.debug("maxSectionHeight before draw",d),y.debug("maxTaskHeight before draw",p),u&&u.length>0?u.forEach((t=>{const e=c.filter((e=>e.section===t)),n={number:x,descr:t,section:x,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:d};y.debug("sectionNode",n);const r=l.append("g"),a=mgt.drawNode(r,n,x,i);y.debug("sectionNode output",a),r.attr("transform",`translate(${m}, 50)`),v+=d+50,e.length>0&&vgt(l,e,x,m,v,p,i,w,k,d,!1),m+=200*Math.max(e.length,1),v=50,x++})):(b=!1,vgt(l,c,x,m,v,p,i,w,k,d,!0));const T=l.node().getBBox();y.debug("bounds",T),h&&l.append("text").text(h).attr("x",T.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),g=b?d+p+150:p+100;l.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",g).attr("x2",T.width+3*a).attr("y2",g).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),In(void 0,l,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)}),"draw"),vgt=o((function(t,e,n,r,i,a,s,o,l,c,h){for(const o of e){const e={descr:o.task,section:n,number:n,width:150,padding:20,maxHeight:a};y.debug("taskNode",e);const u=t.append("g").attr("class","taskWrapper"),d=mgt.drawNode(u,e,n,s).height;if(y.debug("taskHeight after draw",d),u.attr("transform",`translate(${r}, ${i})`),a=Math.max(a,d),o.events){const e=t.append("g").attr("class","lineWrapper");let u=a;i+=100,u+=xgt(t,o.events,n,r,i,s),i-=100,e.append("line").attr("x1",r+95).attr("y1",i+a).attr("x2",r+95).attr("y2",i+a+(h?a:c)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}r+=200,h&&!s.timeline?.disableMulticolor&&n++}i-=10}),"drawTasks"),xgt=o((function(t,e,n,r,i,a){let s=0;const o=i;i+=100;for(const o of e){const e={descr:o,section:n,number:n,width:150,padding:20,maxHeight:50};y.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),c=mgt.drawNode(l,e,n,a).height;s+=c,l.attr("transform",`translate(${r}, ${i})`),i=i+10+c}return i=o,s}),"drawEvents"),bgt={setConf:o((()=>{}),"setConf"),draw:ygt},wgt=o((t=>{let e="";for(let e=0;e`\n .edge {\n stroke-width: 3;\n }\n ${wgt(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles")},Tgt=Object.freeze({__proto__:null,diagram:kgt});function _gt(t){return(_gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Egt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cgt(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}}),"n"),e:o((function(t){throw t}),"e"),f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:o((function(){n=n.call(t)}),"s"),n:o((function(){var t=n.next();return s=t.done,t}),"n"),e:o((function(t){l=!0,a=t}),"e"),f:o((function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}),"f")}}o(_gt,"_typeof"),o(Egt,"_classCallCheck"),o(Cgt,"_defineProperties"),o(Sgt,"_createClass"),o(Agt,"_defineProperty$1"),o(Lgt,"_slicedToArray"),o(Ngt,"_arrayWithHoles"),o(Igt,"_iterableToArrayLimit"),o(Mgt,"_unsupportedIterableToArray"),o(Rgt,"_arrayLikeToArray"),o(Dgt,"_nonIterableRest"),o(Ogt,"_createForOfIteratorHelper");var Pgt="undefined"==typeof window?null:window,Bgt=Pgt?Pgt.navigator:null;Pgt&&Pgt.document;var $gt=_gt(""),Fgt=_gt({}),zgt=_gt((function(){})),Ugt="undefined"==typeof HTMLElement?"undefined":_gt(HTMLElement),Ggt=o((function(t){return t&&t.instanceString&&jgt(t.instanceString)?t.instanceString():null}),"instanceStr"),qgt=o((function(t){return null!=t&&_gt(t)==$gt}),"string"),jgt=o((function(t){return null!=t&&_gt(t)===zgt}),"fn"),Ygt=o((function(t){return!Zgt(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)}),"array"),Wgt=o((function(t){return null!=t&&_gt(t)===Fgt&&!Ygt(t)&&t.constructor===Object}),"plainObject"),Hgt=o((function(t){return null!=t&&_gt(t)===Fgt}),"object"),Vgt=o((function(t){return null!=t&&_gt(t)===_gt(1)&&!isNaN(t)}),"number"),Xgt=o((function(t){return Vgt(t)&&Math.floor(t)===t}),"integer"),Kgt=o((function(t){return"undefined"===Ugt?void 0:null!=t&&t instanceof HTMLElement}),"htmlElement"),Zgt=o((function(t){return Qgt(t)||Jgt(t)}),"elementOrCollection"),Qgt=o((function(t){return"collection"===Ggt(t)&&t._private.single}),"element"),Jgt=o((function(t){return"collection"===Ggt(t)&&!t._private.single}),"collection"),tft=o((function(t){return"core"===Ggt(t)}),"core"),eft=o((function(t){return"stylesheet"===Ggt(t)}),"stylesheet"),nft=o((function(t){return"event"===Ggt(t)}),"event"),rft=o((function(t){return null==t||!(""!==t&&!t.match(/^\s+$/))}),"emptyString"),ift=o((function(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement}),"domElement"),aft=o((function(t){return Wgt(t)&&Vgt(t.x1)&&Vgt(t.x2)&&Vgt(t.y1)&&Vgt(t.y2)}),"boundingBox"),sft=o((function(t){return Hgt(t)&&jgt(t.then)}),"promise"),oft=o((function(){return Bgt&&Bgt.userAgent.match(/msie|trident|edge/i)}),"ms"),lft=o((function(t,e){e||(e=o((function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var t=[],e=0;ee?1:0}),"ascending"),fft=o((function(t,e){return-1*gft(t,e)}),"descending"),mft=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,n=1;n1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}o(h,"hue2rgb");var u=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(t);if(u){if((n=parseInt(u[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(u[2]))<0||r>100)return;if(r/=100,(i=parseFloat(u[3]))<0||i>100)return;if(i/=100,void 0!==(a=u[4])&&((a=parseFloat(a))<0||a>1))return;if(0===r)s=l=c=Math.round(255*i);else{var d=i<.5?i*(1+r):i+r-i*r,p=2*i-d;s=Math.round(255*h(p,d,n+1/3)),l=Math.round(255*h(p,d,n)),c=Math.round(255*h(p,d,n-1/3))}e=[s,l,c,a]}return e}),"hsl2tuple"),xft=o((function(t){var e,n=new RegExp("^rgb[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(t);if(n){e=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if("%"===a[a.length-1]&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;e.push(Math.floor(a))}var s=r[1]||r[2]||r[3],o=r[1]&&r[2]&&r[3];if(s&&!o)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;e.push(l)}}return e}),"rgb2tuple"),bft=o((function(t){return kft[t.toLowerCase()]}),"colorname2tuple"),wft=o((function(t){return(Ygt(t)?t:null)||bft(t)||yft(t)||xft(t)||vft(t)}),"color2tuple"),kft={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Tft=o((function(t){for(var e=t.map,n=t.keys,r=n.length,i=0;i=e||n<0||d&&t-h>=a}function v(){var t=Mft();if(y(t))return x(t);l=setTimeout(v,m(t))}function x(t){return l=void 0,p&&r?g(t):(r=i=void 0,s)}function b(){void 0!==l&&clearTimeout(l),h=0,r=c=i=l=void 0}function w(){return void 0===l?s:x(Mft())}function k(){var t=Mft(),n=y(t);if(r=arguments,i=this,c=t,n){if(void 0===l)return f(c);if(d)return clearTimeout(l),l=setTimeout(v,e),g(c)}return void 0===l&&(l=setTimeout(v,e)),s}return e=omt(e)||0,Cft(n)&&(u=!!n.leading,a=(d="maxWait"in n)?lmt(omt(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),o(g,"invokeFunc"),o(f,"leadingEdge"),o(m,"remainingWait"),o(y,"shouldInvoke"),o(v,"timerExpired"),o(x,"trailingEdge"),o(b,"cancel"),o(w,"flush"),o(k,"debounced"),k.cancel=b,k.flush=w,k}o(hmt,"debounce");var umt=hmt,dmt=Pgt?Pgt.performance:null,pmt=dmt&&dmt.now?function(){return dmt.now()}:function(){return Date.now()},gmt=function(){if(Pgt){if(Pgt.requestAnimationFrame)return function(t){Pgt.requestAnimationFrame(t)};if(Pgt.mozRequestAnimationFrame)return function(t){Pgt.mozRequestAnimationFrame(t)};if(Pgt.webkitRequestAnimationFrame)return function(t){Pgt.webkitRequestAnimationFrame(t)};if(Pgt.msRequestAnimationFrame)return function(t){Pgt.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout((function(){t(pmt())}),1e3/60)}}(),fmt=o((function(t){return gmt(t)}),"requestAnimationFrame"),mmt=pmt,ymt=9261,vmt=65599,xmt=5381,bmt=o((function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ymt,r=n;!(e=t.next()).done;)r=r*vmt+e.value|0;return r}),"hashIterableInts"),wmt=o((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ymt;return e*vmt+t|0}),"hashInt"),kmt=o((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xmt;return(e<<5)+e+t|0}),"hashIntAlt"),Tmt=o((function(t,e){return 2097152*t+e}),"combineHashes"),_mt=o((function(t){return 2097152*t[0]+t[1]}),"combineHashesArray"),Emt=o((function(t,e){return[wmt(t[0],e[0]),kmt(t[1],e[1])]}),"hashArrays"),Cmt=o((function(t,e){var n={value:0,done:!1},r=0,i=t.length;return bmt({next:o((function(){return r=0&&(t[r]!==e||(t.splice(r,1),!n));r--);}),"removeFromArray"),Xmt=o((function(t){t.splice(0,t.length)}),"clearArray"),Kmt=o((function(t,e){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&tft(t)){var r=e.group;if(null==r&&(r=e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:t,single:!0,data:e.data||{},position:e.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?"edges"===r:!!e.pannable,active:!1,classes:new eyt,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),e.renderedPosition){var a=e.renderedPosition,s=t.pan(),o=t.zoom();i.position={x:(a.x-s.x)/o,y:(a.y-s.y)/o}}var l=[];Ygt(e.classes)?l=e.classes:qgt(e.classes)&&(l=e.classes.split(/\s+/));for(var c=0,h=l.length;ce?1:0}),"defaultCmp"),h=o((function(t,e,i,a,s){var o;if(null==i&&(i=0),null==s&&(s=n),i<0)throw new Error("lo must be non-negative");for(null==a&&(a=t.length);in;0<=n?e++:e--)c.push(e);return c}.apply(this).reverse()).length;af;0<=f?++d:--d)m.push(a(t,r));return m}),"nsmallest"),f=o((function(t,e,r,i){var a,s,o;for(null==i&&(i=n),a=t[r];r>e&&i(a,s=t[o=r-1>>1])<0;)t[r]=s,r=o;return t[r]=a}),"_siftdown"),m=o((function(t,e,r){var i,a,s,o,l;for(null==r&&(r=n),a=t.length,l=e,s=t[e],i=2*e+1;i0;){var k=v.pop(),T=m(k),_=k.id();if(d[_]=T,T!==1/0)for(var E=k.neighborhood().intersect(g),C=0;C0)for(n.unshift(e);u[i];){var a=u[i];n.unshift(a.edge),n.unshift(a.node),i=(r=a.node).id()}return s.spawn(n)}),"pathTo")}}),"dijkstra")},cyt={kruskal:o((function(t){t=t||function(t){return 1};for(var e=this.byGroup(),n=e.nodes,r=e.edges,i=n.length,a=new Array(i),s=n,l=o((function(t){for(var e=0;e0;){if(w(),T++,h===d){for(var _=[],E=i,C=d,S=x[C];_.unshift(E),null!=S&&_.unshift(S),null!=(E=v[C]);)S=x[C=E.id()];return{found:!0,distance:p[h],path:this.spawn(_),steps:T}}f[h]=!0;for(var A=c._private.edges,L=0;LS&&(g[C]=S,v[C]=E,x[C]=w),!i){var A=E*h+_;!i&&g[A]>S&&(g[A]=S,v[A]=_,x[A]=w)}}}for(var L=0;L1&&void 0!==arguments[1]?arguments[1]:a,r=x(t),i=[],s=r;;){if(null==s)return e.spawn();var o=v(s),c=o.edge,h=o.pred;if(i.unshift(s[0]),s.same(n)&&i.length>0)break;null!=c&&i.unshift(c),s=h}return l.spawn(i)}),"pathTo"),k=0;k=0;c--){var h=l[c],u=h[1],d=h[2];(e[u]===s&&e[d]===o||e[u]===o&&e[d]===s)&&l.splice(c,1)}for(var p=0;pr;){var i=Math.floor(Math.random()*e.length);e=yyt(i,t,e),n--}return e}),"contractUntil"),xyt={kargerStein:o((function(){var t=this,e=this.byGroup(),n=e.nodes,r=e.edges;r.unmergeBy((function(t){return t.isLoop()}));var i=n.length,a=r.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/myt);if(!(i<2)){for(var c=[],h=0;h1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=1/0,i=e;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=-1/0,i=e;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=0,i=0,a=e;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];r?t=t.slice(e,n):(n0&&t.splice(0,e));for(var s=0,o=t.length-1;o>=0;o--){var l=t[o];a?isFinite(l)||(t[o]=-1/0,s++):t.splice(o,1)}i&&t.sort((function(t,e){return t-e}));var c=t.length,h=Math.floor(c/2);return c%2!=0?t[h+1+s]:(t[h-1+s]+t[h+s])/2}),"median"),Ayt=o((function(t){return Math.PI*t/180}),"deg2rad"),Lyt=o((function(t,e){return Math.atan2(e,t)-Math.PI/2}),"getAngleFromDisp"),Nyt=Math.log2||function(t){return Math.log(t)/Math.log(2)},Iyt=o((function(t){return t>0?1:t<0?-1:0}),"signum"),Myt=o((function(t,e){return Math.sqrt(Ryt(t,e))}),"dist"),Ryt=o((function(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r}),"sqdist"),Dyt=o((function(t){for(var e=t.length,n=0,r=0;r=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(null!=t.w&&null!=t.h&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}}),"makeBoundingBox"),zyt=o((function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}}),"copyBoundingBox"),Uyt=o((function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0}),"clearBoundingBox"),Gyt=o((function(t,e,n){return{x1:t.x1+e,x2:t.x2+e,y1:t.y1+n,y2:t.y2+n,w:t.w,h:t.h}}),"shiftBoundingBox"),qyt=o((function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1}),"updateBoundingBox"),jyt=o((function(t,e,n){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,n),t.y2=Math.max(t.y2,n),t.h=t.y2-t.y1}),"expandBoundingBoxByPoint"),Yyt=o((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t}),"expandBoundingBox"),Wyt=o((function(t){var e,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)e=n=r=i=a[0];else if(2===a.length)e=r=a[0],i=n=a[1];else if(4===a.length){var s=Lgt(a,4);e=s[0],n=s[1],r=s[2],i=s[3]}return t.x1-=i,t.x2+=n,t.y1-=e,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t}),"expandBoundingBoxSides"),Hyt=o((function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1}),"assignBoundingBox"),Vyt=o((function(t,e){return!(t.x1>e.x2)&&(!(e.x1>t.x2)&&(!(t.x2e.y2)&&!(e.y1>t.y2)))))))}),"boundingBoxesIntersect"),Xyt=o((function(t,e,n){return t.x1<=e&&e<=t.x2&&t.y1<=n&&n<=t.y2}),"inBoundingBox"),Kyt=o((function(t,e){return Xyt(t,e.x,e.y)}),"pointInBoundingBox"),Zyt=o((function(t,e){return Xyt(t,e.x1,e.y1)&&Xyt(t,e.x2,e.y2)}),"boundingBoxInBoundingBox"),Qyt=o((function(t,e,n,r,i,a,s){var o,l,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",h="auto"===c?wvt(i,a):c,u=i/2,d=a/2,p=(h=Math.min(h,u,d))!==u,g=h!==d;if(p){var f=n-u+h-s,m=r-d-s,y=n+u-h+s,v=m;if((o=gvt(t,e,n,r,f,m,y,v,!1)).length>0)return o}if(g){var x=n+u+s,b=r-d+h-s,w=x,k=r+d-h+s;if((o=gvt(t,e,n,r,x,b,w,k,!1)).length>0)return o}if(p){var T=n-u+h-s,_=r+d+s,E=n+u-h+s,C=_;if((o=gvt(t,e,n,r,T,_,E,C,!1)).length>0)return o}if(g){var S=n-u-s,A=r-d+h-s,L=S,N=r+d-h+s;if((o=gvt(t,e,n,r,S,A,L,N,!1)).length>0)return o}var I=n-u+h,M=r-d+h;if((l=dvt(t,e,n,r,I,M,h+s)).length>0&&l[0]<=I&&l[1]<=M)return[l[0],l[1]];var R=n+u-h,D=r-d+h;if((l=dvt(t,e,n,r,R,D,h+s)).length>0&&l[0]>=R&&l[1]<=D)return[l[0],l[1]];var O=n+u-h,P=r+d-h;if((l=dvt(t,e,n,r,O,P,h+s)).length>0&&l[0]>=O&&l[1]>=P)return[l[0],l[1]];var B=n-u+h,$=r+d-h;return(l=dvt(t,e,n,r,B,$,h+s)).length>0&&l[0]<=B&&l[1]>=$?[l[0],l[1]]:[]}),"roundRectangleIntersectLine"),Jyt=o((function(t,e,n,r,i,a,s){var o=s,l=Math.min(n,i),c=Math.max(n,i),h=Math.min(r,a),u=Math.max(r,a);return l-o<=t&&t<=c+o&&h-o<=e&&e<=u+o}),"inLineVicinity"),tvt=o((function(t,e,n,r,i,a,s,o,l){var c=Math.min(n,s,i)-l,h=Math.max(n,s,i)+l,u=Math.min(r,o,a)-l,d=Math.max(r,o,a)+l;return!(th||ed)}),"inBezierVicinity"),evt=o((function(t,e,n,r){var i=e*e-4*t*(n-=r);if(i<0)return[];var a=Math.sqrt(i),s=2*t;return[(-e+a)/s,(-e-a)/s]}),"solveQuadratic"),nvt=o((function(t,e,n,r,i){var a,s,o,l,c,h,u,d;return 0===t&&(t=1e-5),o=-27*(r/=t)+(e/=t)*(9*(n/=t)-e*e*2),a=(s=(3*n-e*e)/9)*s*s+(o/=54)*o,i[1]=0,u=e/3,a>0?(c=(c=o+Math.sqrt(a))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),h=(h=o-Math.sqrt(a))<0?-Math.pow(-h,1/3):Math.pow(h,1/3),i[0]=-u+c+h,u+=(c+h)/2,i[4]=i[2]=-u,u=Math.sqrt(3)*(-h+c)/2,i[3]=u,void(i[5]=-u)):(i[5]=i[3]=0,0===a?(d=o<0?-Math.pow(-o,1/3):Math.pow(o,1/3),i[0]=2*d-u,void(i[4]=i[2]=-(d+u))):(l=(s=-s)*s*s,l=Math.acos(o/Math.sqrt(l)),d=2*Math.sqrt(s),i[0]=-u+d*Math.cos(l/3),i[2]=-u+d*Math.cos((l+2*Math.PI)/3),void(i[4]=-u+d*Math.cos((l+4*Math.PI)/3))))}),"solveCubic"),rvt=o((function(t,e,n,r,i,a,s,o){var l=[];nvt(1*n*n-4*n*i+2*n*s+4*i*i-4*i*s+s*s+r*r-4*r*a+2*r*o+4*a*a-4*a*o+o*o,9*n*i-3*n*n-3*n*s-6*i*i+3*i*s+9*r*a-3*r*r-3*r*o-6*a*a+3*a*o,3*n*n-6*n*i+n*s-n*t+2*i*i+2*i*t-s*t+3*r*r-6*r*a+r*o-r*e+2*a*a+2*a*e-o*e,1*n*i-n*n+n*t-i*t+r*a-r*r+r*e-a*e,l);for(var c=[],h=0;h<6;h+=2)Math.abs(l[h+1])<1e-7&&l[h]>=0&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var u,d,p,g=-1,f=0;f=0?pl?(t-i)*(t-i)+(e-a)*(e-a):c-u}),"sqdistToFiniteLine"),avt=o((function(t,e,n){for(var r,i,a,s,o=0,l=0;l=t&&t>=a||r<=t&&t<=a))continue;(t-r)/(a-r)*(s-i)+i>e&&o++}return o%2!=0}),"pointInsidePolygonPoints"),svt=o((function(t,e,n,r,i,a,s,o,l){var c,h=new Array(n.length);null!=o[0]?(c=Math.atan(o[1]/o[0]),o[0]<0?c+=Math.PI/2:c=-c-Math.PI/2):c=o;for(var u,d=Math.cos(-c),p=Math.sin(-c),g=0;g0){var f=cvt(h,-l);u=lvt(f)}else u=h;return avt(t,e,u)}),"pointInsidePolygon"),ovt=o((function(t,e,n,r,i,a,s,o){for(var l=new Array(2*n.length),c=0;c=0&&g<=1&&m.push(g),f>=0&&f<=1&&m.push(f),0===m.length)return[];var y=m[0]*o[0]+t,v=m[0]*o[1]+e;return m.length>1?m[0]==m[1]?[y,v]:[y,v,m[1]*o[0]+t,m[1]*o[1]+e]:[y,v]}),"intersectLineCircle"),pvt=o((function(t,e,n){return e<=t&&t<=n||n<=t&&t<=e?t:t<=e&&e<=n||n<=e&&e<=t?e:n}),"midOfThree"),gvt=o((function(t,e,n,r,i,a,s,o,l){var c=t-i,h=n-t,u=s-i,d=e-a,p=r-e,g=o-a,f=u*d-g*c,m=h*d-p*c,y=g*h-u*p;if(0!==y){var v=f/y,x=m/y,b=-.001;return b<=v&&v<=1.001&&b<=x&&x<=1.001||l?[t+v*h,e+v*p]:[]}return 0===f||0===m?pvt(t,n,s)===s?[s,o]:pvt(t,n,i)===i?[i,a]:pvt(i,s,n)===n?[n,r]:[]:[]}),"finiteLinesIntersect"),fvt=o((function(t,e,n,r,i,a,s,o){var l,c,h,u,d,p,g=[],f=new Array(n.length),m=!0;if(null==a&&(m=!1),m){for(var y=0;y0){var v=cvt(f,-o);c=lvt(v)}else c=f}else c=n;for(var x=0;x2){for(var p=[h[0],h[1]],g=Math.pow(p[0]-t,2)+Math.pow(p[1]-e,2),f=1;fh&&(h=e)}),"set"),get:o((function(t){return c[t]}),"get")},d=0;d0?v.edgesTo(y)[0]:y.edgesTo(v)[0];var b=r(x);y=y.id(),h[y]>h[f]+b&&(h[y]=h[f]+b,d.nodes.indexOf(y)<0?d.push(y):d.updateItem(y),c[y]=0,o[y]=[]),h[y]==h[f]+b&&(c[y]=c[y]+c[f],o[y].push(f))}else for(var w=0;w0;){for(var E=n.pop(),C=0;C0&&s.push(n[o]);0!==s.length&&i.push(r.collection(s))}return i}),"assign"),jvt=o((function(t,e){for(var n=0;n5&&void 0!==arguments[5]?arguments[5]:Vvt,s=r,o=0;o=2?txt(t,e,n,0,Zvt,Qvt):txt(t,e,n,0,Kvt)}),"euclidean"),squaredEuclidean:o((function(t,e,n){return txt(t,e,n,0,Zvt)}),"squaredEuclidean"),manhattan:o((function(t,e,n){return txt(t,e,n,0,Kvt)}),"manhattan"),max:o((function(t,e,n){return txt(t,e,n,-1/0,Jvt)}),"max")};function nxt(t,e,n,r,i,a){var s;return s=jgt(t)?t:ext[t]||ext.euclidean,0===e&&jgt(t)?s(i,a):s(e,n,r,i,a)}ext["squared-euclidean"]=ext.squaredEuclidean,ext.squaredeuclidean=ext.squaredEuclidean,o(nxt,"clusteringDistance");var rxt=Hmt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),ixt=o((function(t){return rxt(t)}),"setOptions"),axt=o((function(t,e,n,r,i){var a="kMedoids"!==i?function(t){return n[t]}:function(t){return r[t](n)},s=o((function(t){return r[t](e)}),"getQ"),l=n,c=e;return nxt(t,r.length,a,s,l,c)}),"getDist"),sxt=o((function(t,e,n){for(var r=n.length,i=new Array(r),a=new Array(r),s=new Array(e),o=null,l=0;ln)return!1}return!0}),"haveMatricesConverged"),uxt=o((function(t,e,n){for(var r=0;ri&&(i=e[l][c],a=c);s[a].push(t[l])}for(var h=0;h=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var g,f=e[s],m=e[r[s]];g="dendrogram"===i.mode?{left:f,right:m,key:f.key}:{value:f.value.concat(m.value),key:f.key},t[f.index]=g,t.splice(m.index,1),e[f.key]=g;for(var y=0;yn[m.key][v.key]&&(a=n[m.key][v.key])):"max"===i.linkage?(a=n[f.key][v.key],n[f.key][v.key]0&&r.push(i);return r}),"findExemplars"),Oxt=o((function(t,e,n){for(var r=[],i=0;is&&(a=l,s=e[i*t+l])}a>0&&r.push(a)}for(var c=0;cl&&(o=c,l=h)}n[i]=a[o]}return r=Oxt(t,e,n)}),"assign"),Bxt=o((function(t){for(var e,n,r,i,a,s,o=this.cy(),l=this.nodes(),c=Ixt(t),h={},u=0;u=C?(S=C,C=L,A=N):L>S&&(S=L);for(var I=0;I0?1:0;T[k%c.minIterations*e+B]=$,P+=$}if(P>0&&(k>=c.minIterations-1||k==c.maxIterations-1)){for(var F=0,z=0;z1||s>1)&&(h=!0),u[e]=[],t.outgoers().forEach((function(t){t.isEdge()&&u[e].push(t.id())}))}else d[e]=[void 0,t.target().id()]})):c.forEach((function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(n?r?h=!0:r=e:n=e),u[e]=[],t.connectedEdges().forEach((function(t){return u[e].push(t.id())}))):d[e]=[t.source().id(),t.target().id()]}));var p={found:!1,trail:void 0};if(h)return p;if(r&&n)if(l){if(i&&r!=i)return p;i=r}else{if(i&&r!=i&&n!=i)return p;i||(i=r)}else i||(i=c[0].id());var g=o((function(t){for(var e,n,r,i=t,a=[t];u[i].length;)e=u[i].shift(),n=d[e][0],i!=(r=d[e][1])?(u[r]=u[r].filter((function(t){return t!=e})),i=r):l||i==n||(u[n]=u[n].filter((function(t){return t!=e})),i=n),a.unshift(e),a.unshift(i);return a}),"walk"),f=[],m=[];for(m=g(i);1!=m.length;)0==u[m[0]].length?(f.unshift(c.getElementById(m.shift())),f.unshift(c.getElementById(m.shift()))):m=g(m.shift()).concat(m);for(var y in f.unshift(c.getElementById(m.shift())),u)if(u[y].length)return p;return p.found=!0,p.trail=this.spawn(f,!0),p}),"hierholzer")},Uxt=o((function(){var t=this,e={},n=0,r=0,i=[],a=[],s={},l=o((function(n,r){for(var s=a.length-1,o=[],l=t.spawn();a[s].x!=n||a[s].y!=r;)o.push(a.pop().edge),s--;o.push(a.pop().edge),o.forEach((function(n){var r=n.connectedNodes().intersection(t);l.merge(n),r.forEach((function(n){var r=n.id(),i=n.connectedEdges().intersection(t);l.merge(n),e[r].cutVertex?l.merge(i.filter((function(t){return t.isLoop()}))):l.merge(i)}))})),i.push(l)}),"buildComponent"),c=o((function o(c,h,u){c===u&&(r+=1),e[h]={id:n,low:n++,cutVertex:!1};var d,p,g,f,m=t.getElementById(h).connectedEdges().intersection(t);0===m.size()?i.push(t.spawn(t.getElementById(h))):m.forEach((function(t){d=t.source().id(),p=t.target().id(),(g=d===h?p:d)!==u&&(f=t.id(),s[f]||(s[f]=!0,a.push({x:h,y:g,edge:t})),g in e?e[h].low=Math.min(e[h].low,e[g].id):(o(c,g,h),e[h].low=Math.min(e[h].low,e[g].low),e[h].id<=e[g].low&&(e[h].cutVertex=!0,l(h,g))))}))}),"biconnectedSearch");t.forEach((function(t){if(t.isNode()){var n=t.id();n in e||(r=0,c(n,n),e[n].cutVertex=r>1)}}));var h=Object.keys(e).filter((function(t){return e[t].cutVertex})).map((function(e){return t.getElementById(e)}));return{cut:t.spawn(h),components:i}}),"hopcroftTarjanBiconnected"),Gxt={hopcroftTarjanBiconnected:Uxt,htbc:Uxt,htb:Uxt,hopcroftTarjanBiconnectedComponents:Uxt},qxt=o((function(){var t=this,e={},n=0,r=[],i=[],a=t.spawn(t),s=o((function s(o){if(i.push(o),e[o]={index:n,low:n++,explored:!1},t.getElementById(o).connectedEdges().intersection(t).forEach((function(t){var n=t.target().id();n!==o&&(n in e||s(n),e[n].explored||(e[o].low=Math.min(e[o].low,e[n].low)))})),e[o].index===e[o].low){for(var l=t.spawn();;){var c=i.pop();if(l.merge(t.getElementById(c)),e[c].low=e[o].index,e[c].explored=!0,c===o)break}var h=l.edgesWith(l),u=l.merge(h);r.push(u),a=a.difference(u)}}),"stronglyConnectedSearch");return t.forEach((function(t){if(t.isNode()){var n=t.id();n in e||s(n)}})),{cut:a,components:r}}),"tarjanStronglyConnected"),jxt={};[iyt,lyt,cyt,uyt,pyt,fyt,xyt,Svt,Lvt,Ivt,Rvt,Hvt,bxt,Lxt,$xt,zxt,Gxt,{tarjanStronglyConnected:qxt,tsc:qxt,tscc:qxt,tarjanStronglyConnectedComponents:qxt}].forEach((function(t){mft(jxt,t)}));var Yxt=o((function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))}),"api");Yxt.prototype={fulfill:o((function(t){return Wxt(this,1,"fulfillValue",t)}),"fulfill"),reject:o((function(t){return Wxt(this,2,"rejectReason",t)}),"reject"),then:o((function(t,e){var n=this,r=new Yxt;return n.onFulfilled.push(Xxt(t,r,"fulfill")),n.onRejected.push(Xxt(e,r,"reject")),Hxt(n),r.proxy}),"then")};var Wxt=o((function(t,e,n,r){return 0===t.state&&(t.state=e,t[n]=r,Hxt(t)),t}),"deliver"),Hxt=o((function(t){1===t.state?Vxt(t,"onFulfilled",t.fulfillValue):2===t.state&&Vxt(t,"onRejected",t.rejectReason)}),"execute"),Vxt=o((function(t,e,n){if(0!==t[e].length){var r=t[e];t[e]=[];var i=o((function(){for(var t=0;t0:void 0}),"animatedImpl")}),"animated"),clearQueue:o((function(){return o((function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}o(Jbt,"listCacheHas");var twt=Jbt;function ewt(t,e){var n=this.__data__,r=Hbt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}o(ewt,"listCacheSet");var nwt=ewt;function rwt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t0&&this.spawn(r).updateStyle().emit("class"),e}),"classes"),addClass:o((function(t){return this.toggleClass(t,!0)}),"addClass"),hasClass:o((function(t){var e=this[0];return null!=e&&e._private.classes.has(t)}),"hasClass"),toggleClass:o((function(t,e){Ygt(t)||(t=t.match(/\S+/g)||[]);for(var n=this,r=void 0===e,i=[],a=0,s=n.length;a0&&this.spawn(i).updateStyle().emit("class"),n}),"toggleClass"),removeClass:o((function(t){return this.toggleClass(t,!1)}),"removeClass"),flashClass:o((function(t,e){var n=this;if(null==e)e=250;else if(0===e)return n;return n.addClass(t),setTimeout((function(){n.removeClass(t)}),e),n}),"flashClass")};dkt.className=dkt.classNames=dkt.classes;var pkt={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:pft,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};pkt.variable="(?:[\\w-.]|(?:\\\\"+pkt.metaChar+"))+",pkt.className="(?:[\\w-]|(?:\\\\"+pkt.metaChar+"))+",pkt.value=pkt.string+"|"+pkt.number,pkt.id=pkt.variable,function(){var t,e,n;for(t=pkt.comparatorOp.split("|"),n=0;n=0||"="!==e&&(pkt.comparatorOp+="|\\!"+e)}();var gkt=o((function(){return{checks:[]}}),"newQuery"),fkt=0,mkt=1,ykt=2,vkt=3,xkt=4,bkt=5,wkt=6,kkt=7,Tkt=8,_kt=9,Ekt=10,Ckt=11,Skt=12,Akt=13,Lkt=14,Nkt=15,Ikt=16,Mkt=17,Rkt=18,Dkt=19,Okt=20,Pkt=[{selector:":selected",matches:o((function(t){return t.selected()}),"matches")},{selector:":unselected",matches:o((function(t){return!t.selected()}),"matches")},{selector:":selectable",matches:o((function(t){return t.selectable()}),"matches")},{selector:":unselectable",matches:o((function(t){return!t.selectable()}),"matches")},{selector:":locked",matches:o((function(t){return t.locked()}),"matches")},{selector:":unlocked",matches:o((function(t){return!t.locked()}),"matches")},{selector:":visible",matches:o((function(t){return t.visible()}),"matches")},{selector:":hidden",matches:o((function(t){return!t.visible()}),"matches")},{selector:":transparent",matches:o((function(t){return t.transparent()}),"matches")},{selector:":grabbed",matches:o((function(t){return t.grabbed()}),"matches")},{selector:":free",matches:o((function(t){return!t.grabbed()}),"matches")},{selector:":removed",matches:o((function(t){return t.removed()}),"matches")},{selector:":inside",matches:o((function(t){return!t.removed()}),"matches")},{selector:":grabbable",matches:o((function(t){return t.grabbable()}),"matches")},{selector:":ungrabbable",matches:o((function(t){return!t.grabbable()}),"matches")},{selector:":animated",matches:o((function(t){return t.animated()}),"matches")},{selector:":unanimated",matches:o((function(t){return!t.animated()}),"matches")},{selector:":parent",matches:o((function(t){return t.isParent()}),"matches")},{selector:":childless",matches:o((function(t){return t.isChildless()}),"matches")},{selector:":child",matches:o((function(t){return t.isChild()}),"matches")},{selector:":orphan",matches:o((function(t){return t.isOrphan()}),"matches")},{selector:":nonorphan",matches:o((function(t){return t.isChild()}),"matches")},{selector:":compound",matches:o((function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}),"matches")},{selector:":loop",matches:o((function(t){return t.isLoop()}),"matches")},{selector:":simple",matches:o((function(t){return t.isSimple()}),"matches")},{selector:":active",matches:o((function(t){return t.active()}),"matches")},{selector:":inactive",matches:o((function(t){return!t.active()}),"matches")},{selector:":backgrounding",matches:o((function(t){return t.backgrounding()}),"matches")},{selector:":nonbackgrounding",matches:o((function(t){return!t.backgrounding()}),"matches")}].sort((function(t,e){return fft(t.selector,e.selector)})),Bkt=function(){for(var t,e={},n=0;n0&&c.edgeCount>0)return zmt("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return zmt("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===c.edgeCount&&zmt("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0}),"parse"),Wkt=o((function(){if(null!=this.toStringCache)return this.toStringCache;for(var t=o((function(t){return null==t?"":t}),"clean"),e=o((function(e){return qgt(e)?'"'+e+'"':t(e)}),"cleanVal"),n=o((function(t){return" "+t+" "}),"space"),r=o((function(r,a){var s=r.type,o=r.value;switch(s){case fkt:var l=t(o);return l.substring(0,l.length-1);case vkt:var c=r.field,h=r.operator;return"["+c+n(t(h))+e(o)+"]";case bkt:var u=r.operator,d=r.field;return"["+t(u)+d+"]";case xkt:return"["+r.field+"]";case wkt:var p=r.operator;return"[["+r.field+n(t(p))+e(o)+"]]";case kkt:return o;case Tkt:return"#"+o;case _kt:return"."+o;case Mkt:case Nkt:return i(r.parent,a)+n(">")+i(r.child,a);case Rkt:case Ikt:return i(r.ancestor,a)+" "+i(r.descendant,a);case Dkt:var g=i(r.left,a),f=i(r.subject,a),m=i(r.right,a);return g+(g.length>0?" ":"")+f+m;case Okt:return""}}),"checkToString"),i=o((function(t,e){return t.checks.reduce((function(n,i,a){return n+(e===t&&0===a?"$":"")+r(i,e)}),"")}),"queryToString"),a="",s=0;s1&&s=0&&(e=e.replace("!",""),h=!0),e.indexOf("@")>=0&&(e=e.replace("@",""),c=!0),(s||l||c)&&(i=s||o?""+t:"",a=""+n),c&&(t=i=i.toLowerCase(),n=a=a.toLowerCase()),e){case"*=":r=i.indexOf(a)>=0;break;case"$=":r=i.indexOf(a,i.length-a.length)>=0;break;case"^=":r=0===i.indexOf(a);break;case"=":r=t===n;break;case">":u=!0,r=t>n;break;case">=":u=!0,r=t>=n;break;case"<":u=!0,r=t0;){var c=i.shift();e(c),a.add(c.id()),s&&r(i,a,c)}return t}function dTt(t,e,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1];return uTt(this,t,e,dTt)},o(pTt,"addParent"),hTt.forEachUp=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return uTt(this,t,e,pTt)},o(gTt,"addParentAndChildren"),hTt.forEachUpAndDown=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return uTt(this,t,e,gTt)},hTt.ancestors=hTt.parents,(oTt=lTt={data:hkt.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:hkt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:hkt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:hkt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:hkt.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:hkt.removeData({field:"rscratch",triggerEvent:!1}),id:o((function(){var t=this[0];if(t)return t._private.data.id}),"id")}).attr=oTt.data,oTt.removeAttr=oTt.removeData;var fTt,mTt,yTt=lTt,vTt={};function xTt(t){return function(e){var n=this;if(void 0===e&&(e=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,s=0;se})),minIndegree:bTt("indegree",(function(t,e){return te})),minOutdegree:bTt("outdegree",(function(t,e){return te}))}),mft(vTt,{totalDegree:o((function(t){for(var e=0,n=this.nodes(),r=0;r0,h=c;c&&(l=l[0]);var u=h?l.position():{x:0,y:0};return i={x:o.x-u.x,y:o.y-u.y},void 0===t?i:i[t]}for(var d=0;d0,m=f;f&&(g=g[0]);var y=m?g.position():{x:0,y:0};void 0!==e?p.position(t,e+y[t]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}),"relativePosition")},fTt.modelPosition=fTt.point=fTt.position,fTt.modelPositions=fTt.points=fTt.positions,fTt.renderedPoint=fTt.renderedPosition,fTt.relativePoint=fTt.relativePosition;var TTt,_Tt,ETt=mTt;TTt=_Tt={},_Tt.renderedBoundingBox=function(t){var e=this.boundingBox(t),n=this.cy(),r=n.zoom(),i=n.pan(),a=e.x1*r+i.x,s=e.x2*r+i.x,o=e.y1*r+i.y,l=e.y2*r+i.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}},_Tt.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp((function(e){if(e.isParent()){var n=e._private;n.compoundBoundsClean=!1,n.bbCache=null,t||e.emitAndNotify("bounds")}})),this):this},_Tt.updateCompoundBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function n(t){if(t.isParent()){var e=t._private,n=t.children(),r="include"===t.pstyle("compound-sizing-wrt-labels").value,i={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),s=e.position;0!==a.w&&0!==a.h||((a={w:t.pstyle("width").pfValue,h:t.pstyle("height").pfValue}).x1=s.x-a.w/2,a.x2=s.x+a.w/2,a.y1=s.y-a.h/2,a.y2=s.y+a.h/2),o(v,"computeBiasValues"),o(x,"computePaddingValues");var l=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(l=100*l/i.width.val);var c=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(c=100*c/i.width.val);var h=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(h=100*h/i.height.val);var u=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(u=100*u/i.height.val);var d=v(i.width.val-a.w,l,c),p=d.biasDiff,g=d.biasComplementDiff,f=v(i.height.val-a.h,h,u),m=f.biasDiff,y=f.biasComplementDiff;e.autoPadding=x(a.w,a.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(a.w,i.width.val),s.x=(-p+a.x1+a.x2+g)/2,e.autoHeight=Math.max(a.h,i.height.val),s.y=(-m+a.y1+a.y2+y)/2}function v(t,e,n){var r=0,i=0,a=e+n;return t>0&&a>0&&(r=e/a*t,i=n/a*t),{biasDiff:r,biasComplementDiff:i}}function x(t,e,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return t>0?n.pfValue*t:0;case"height":return e>0?n.pfValue*e:0;case"average":return t>0&&e>0?n.pfValue*(t+e)/2:0;case"min":return t>0&&e>0?t>e?n.pfValue*e:n.pfValue*t:0;case"max":return t>0&&e>0?t>e?n.pfValue*t:n.pfValue*e:0;default:return 0}}}o(n,"update");for(var r=0;rt.x2?r:t.x2,t.y1=nt.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)}),"updateBounds"),ATt=o((function(t,e){return null==e?t:STt(t,e.x1,e.y1,e.x2,e.y2)}),"updateBoundsFromBox"),LTt=o((function(t,e,n){return Zmt(t,e,n)}),"prefixedProperty"),NTt=o((function(t,e,n){if(!e.cy().headless()){var r,i,a=e._private,s=a.rstyle,o=s.arrowWidth/2;if("none"!==e.pstyle(n+"-arrow-shape").value){"source"===n?(r=s.srcX,i=s.srcY):"target"===n?(r=s.tgtX,i=s.tgtY):(r=s.midX,i=s.midY);var l=a.arrowBounds=a.arrowBounds||{},c=l[n]=l[n]||{};c.x1=r-o,c.y1=i-o,c.x2=r+o,c.y2=i+o,c.w=c.x2-c.x1,c.h=c.y2-c.y1,Yyt(c,1),STt(t,c.x1,c.y1,c.x2,c.y2)}}}),"updateBoundsFromArrow"),ITt=o((function(t,e,n){if(!e.cy().headless()){var r;r=n?n+"-":"";var i=e._private,a=i.rstyle;if(e.pstyle(r+"label").strValue){var s,l,c,h,u=e.pstyle("text-halign"),d=e.pstyle("text-valign"),p=LTt(a,"labelWidth",n),g=LTt(a,"labelHeight",n),f=LTt(a,"labelX",n),m=LTt(a,"labelY",n),y=e.pstyle(r+"text-margin-x").pfValue,v=e.pstyle(r+"text-margin-y").pfValue,x=e.isEdge(),b=e.pstyle(r+"text-rotation"),w=e.pstyle("text-outline-width").pfValue,k=e.pstyle("text-border-width").pfValue/2,T=e.pstyle("text-background-padding").pfValue,_=g,E=p,C=E/2,S=_/2;if(x)s=f-C,l=f+C,c=m-S,h=m+S;else{switch(u.value){case"left":s=f-E,l=f;break;case"center":s=f-C,l=f+C;break;case"right":s=f,l=f+E}switch(d.value){case"top":c=m-_,h=m;break;case"center":c=m-S,h=m+S;break;case"bottom":c=m,h=m+_}}s+=y-Math.max(w,k)-T-2,l+=y+Math.max(w,k)+T+2,c+=v-Math.max(w,k)-T-2,h+=v+Math.max(w,k)+T+2;var A=n||"main",L=i.labelBounds,N=L[A]=L[A]||{};N.x1=s,N.y1=c,N.x2=l,N.y2=h,N.w=l-s,N.h=h-c;var I=x&&"autorotate"===b.strValue,M=null!=b.pfValue&&0!==b.pfValue;if(I||M){var R=I?LTt(i.rstyle,"labelAngle",n):b.pfValue,D=Math.cos(R),O=Math.sin(R),P=(s+l)/2,B=(c+h)/2;if(!x){switch(u.value){case"left":P=l;break;case"right":P=s}switch(d.value){case"top":B=h;break;case"bottom":B=c}}var $=o((function(t,e){return{x:(t-=P)*D-(e-=B)*O+P,y:t*O+e*D+B}}),"rotate"),F=$(s,c),z=$(s,h),U=$(l,c),G=$(l,h);s=Math.min(F.x,z.x,U.x,G.x),l=Math.max(F.x,z.x,U.x,G.x),c=Math.min(F.y,z.y,U.y,G.y),h=Math.max(F.y,z.y,U.y,G.y)}var q=A+"Rot",j=L[q]=L[q]||{};j.x1=s,j.y1=c,j.x2=l,j.y2=h,j.w=l-s,j.h=h-c,STt(t,s,c,l,h),STt(i.labelBounds.all,s,c,l,h)}return t}}),"updateBoundsFromLabel"),MTt=o((function(t,e){if(!e.cy().headless()){var n=e.pstyle("outline-opacity").value,r=e.pstyle("outline-width").value;if(n>0&&r>0){var i=e.pstyle("outline-offset").value,a=e.pstyle("shape").value,s=r+i,o=(t.w+2*s)/t.w,l=(t.h+2*s)/t.h,c=0;["diamond","pentagon","round-triangle"].includes(a)?(o=(t.w+2.4*s)/t.w,c=-s/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(a)?o=(t.w+2.4*s)/t.w:"star"===a?(o=(t.w+2.8*s)/t.w,l=(t.h+2.6*s)/t.h,c=-s/3.8):"triangle"===a?(o=(t.w+2.8*s)/t.w,l=(t.h+2.4*s)/t.h,c=-s/1.4):"vee"===a&&(o=(t.w+4.4*s)/t.w,l=(t.h+3.8*s)/t.h,c=.5*-s);var h=t.h*l-t.h,u=t.w*o-t.w;if(Wyt(t,[Math.ceil(h/2),Math.ceil(u/2)]),0!==c){var d=Gyt(t,0,c);qyt(t,d)}}}}),"updateBoundsFromOutline"),RTt=o((function(t,e){var n,r,i,a,s,l,c=t._private.cy,h=c.styleEnabled(),u=c.headless(),d=Fyt(),p=t._private,g=t.isNode(),f=t.isEdge(),m=p.rstyle,y=g&&h?t.pstyle("bounds-expansion").pfValue:[0],v=o((function(t){return"none"!==t.pstyle("display").value}),"isDisplayed"),x=!h||v(t)&&(!f||v(t.source())&&v(t.target()));if(x){var b=0;h&&e.includeOverlays&&0!==t.pstyle("overlay-opacity").value&&(b=t.pstyle("overlay-padding").value);var w=0;h&&e.includeUnderlays&&0!==t.pstyle("underlay-opacity").value&&(w=t.pstyle("underlay-padding").value);var k=Math.max(b,w),T=0;if(h&&(T=t.pstyle("width").pfValue/2),g&&e.includeNodes){var _=t.position();s=_.x,l=_.y;var E=t.outerWidth()/2,C=t.outerHeight()/2;STt(d,n=s-E,i=l-C,r=s+E,a=l+C),h&&e.includeOutlines&&MTt(d,t)}else if(f&&e.includeEdges)if(h&&!u){var S=t.pstyle("curve-style").strValue;if(n=Math.min(m.srcX,m.midX,m.tgtX),r=Math.max(m.srcX,m.midX,m.tgtX),i=Math.min(m.srcY,m.midY,m.tgtY),a=Math.max(m.srcY,m.midY,m.tgtY),STt(d,n-=T,i-=T,r+=T,a+=T),"haystack"===S){var A=m.haystackPts;if(A&&2===A.length){if(n=A[0].x,i=A[0].y,n>(r=A[1].x)){var L=n;n=r,r=L}if(i>(a=A[1].y)){var N=i;i=a,a=N}STt(d,n-T,i-T,r+T,a+T)}}else if("bezier"===S||"unbundled-bezier"===S||S.endsWith("segments")||S.endsWith("taxi")){var I;switch(S){case"bezier":case"unbundled-bezier":I=m.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":I=m.linePts}if(null!=I)for(var M=0;M(r=O.x)){var P=n;n=r,r=P}if((i=D.y)>(a=O.y)){var B=i;i=a,a=B}STt(d,n-=T,i-=T,r+=T,a+=T)}if(h&&e.includeEdges&&f&&(NTt(d,t,"mid-source"),NTt(d,t,"mid-target"),NTt(d,t,"source"),NTt(d,t,"target")),h)if("yes"===t.pstyle("ghost").value){var $=t.pstyle("ghost-offset-x").pfValue,F=t.pstyle("ghost-offset-y").pfValue;STt(d,d.x1+$,d.y1+F,d.x2+$,d.y2+F)}var z=p.bodyBounds=p.bodyBounds||{};Hyt(z,d),Wyt(z,y),Yyt(z,1),h&&(n=d.x1,r=d.x2,i=d.y1,a=d.y2,STt(d,n-k,i-k,r+k,a+k));var U=p.overlayBounds=p.overlayBounds||{};Hyt(U,d),Wyt(U,y),Yyt(U,1);var G=p.labelBounds=p.labelBounds||{};null!=G.all?Uyt(G.all):G.all=Fyt(),h&&e.includeLabels&&(e.includeMainLabels&&ITt(d,t,null),f&&(e.includeSourceLabels&&ITt(d,t,"source"),e.includeTargetLabels&&ITt(d,t,"target")))}return d.x1=CTt(d.x1),d.y1=CTt(d.y1),d.x2=CTt(d.x2),d.y2=CTt(d.y2),d.w=CTt(d.x2-d.x1),d.h=CTt(d.y2-d.y1),d.w>0&&d.h>0&&x&&(Wyt(d,y),Yyt(d,1)),d}),"boundingBoxImpl"),DTt=o((function(t){var e=0,n=o((function(t){return(t?1:0)<0&&void 0!==arguments[0]?arguments[0]:i_t,e=arguments.length>1?arguments[1]:void 0,n=0;n=0;l--)s(l);return this},s_t.removeAllListeners=function(){return this.removeListener("*")},s_t.emit=s_t.trigger=function(t,e,n){var r=this.listeners,i=r.length;return this.emitting++,Ygt(e)||(e=[e]),c_t(this,(function(t,a){null!=n&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var s=o((function(n){var i=r[n];if(i.type===a.type&&(!i.namespace||i.namespace===a.namespace||".*"===i.namespace)&&t.eventMatches(t.context,i,a)){var s=[a];null!=e&&Kmt(s,e),t.beforeEmit(t.context,i,a),i.conf&&i.conf.one&&(t.listeners=t.listeners.filter((function(t){return t!==i})));var o=t.callbackContext(t.context,i,a),l=i.callback.apply(o,s);t.afterEmit(t.context,i,a),!1===l&&(a.stopPropagation(),a.preventDefault())}}),"_loop2"),l=0;l1&&!r){var i=this.length-1,a=this[i],s=a._private.data.id;this[i]=void 0,this[t]=a,n.set(s,{ele:a,index:t})}return this.length--,this}),"unmergeAt"),unmergeOne:o((function(t){t=t[0];var e=this._private,n=t._private.data.id,r=e.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this}),"unmergeOne"),unmerge:o((function(t){var e=this._private.cy;if(!t)return this;if(t&&qgt(t)){var n=t;t=e.mutableElements().filter(n)}for(var r=0;r=0;e--){t(this[e])&&this.unmergeAt(e)}return this}),"unmergeBy"),map:o((function(t,e){for(var n=[],r=this,i=0;ir&&(r=o,n=s)}return{value:r,ele:n}}),"max"),min:o((function(t,e){for(var n,r=1/0,i=this,a=0;a=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[t];return null!=i?i:e?r.style().getDefaultProperty(t):null}}),"parsedStyle"),numericStyle:o((function(t){var e=this[0];if(e.cy().styleEnabled()&&e){var n=e.pstyle(t);return void 0!==n.pfValue?n.pfValue:n.value}}),"numericStyle"),numericStyleUnits:o((function(t){var e=this[0];if(e.cy().styleEnabled())return e?e.pstyle(t).units:void 0}),"numericStyleUnits"),renderedStyle:o((function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=this[0];return n?e.style().getRenderedStyle(n,t):void 0}),"renderedStyle"),style:o((function(t,e){var n=this.cy();if(!n.styleEnabled())return this;var r=n.style();if(Wgt(t)){var i=t;r.applyBypass(this,i,false),this.emitAndNotify("style")}else if(qgt(t)){if(void 0===e){var a=this[0];return a?r.getStylePropertyValue(a,t):void 0}r.applyBypass(this,t,e,false),this.emitAndNotify("style")}else if(void 0===t){var s=this[0];return s?r.getRawStyle(s):void 0}return this}),"style"),removeStyle:o((function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=e.style(),r=this;if(void 0===t)for(var i=0;i0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)}),"neighborhood"),closedNeighborhood:o((function(t){return this.neighborhood().add(this).filter(t)}),"closedNeighborhood"),openNeighborhood:o((function(t){return this.neighborhood(t)}),"openNeighborhood")}),O_t.neighbourhood=O_t.neighborhood,O_t.closedNeighbourhood=O_t.closedNeighborhood,O_t.openNeighbourhood=O_t.openNeighborhood,mft(O_t,{source:cTt(o((function(t){var e,n=this[0];return n&&(e=n._private.source||n.cy().collection()),e&&t?e.filter(t):e}),"sourceImpl"),"source"),target:cTt(o((function(t){var e,n=this[0];return n&&(e=n._private.target||n.cy().collection()),e&&t?e.filter(t):e}),"targetImpl"),"target"),sources:F_t({attr:"source"}),targets:F_t({attr:"target"})}),o(F_t,"defineSourceFunction"),mft(O_t,{edgesWith:cTt(z_t(),"edgesWith"),edgesTo:cTt(z_t({thisIsSrc:!0}),"edgesTo")}),o(z_t,"defineEdgesWithFunction"),mft(O_t,{connectedEdges:cTt((function(t){for(var e=[],n=0;n0);return a}),"components"),component:o((function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}),"component")}),O_t.componentsOf=O_t.components;var G_t=o((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==t){var i=new Jmt,a=!1;if(e){if(e.length>0&&Wgt(e[0])&&!Qgt(e[0])){a=!0;for(var s=[],l=new eyt,c=0,h=e.length;c0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),s=a._private,l=[],c=[],h=0,u=i.length;h0){for(var P=t.length===i.length?i:new G_t(a,t),B=0;B0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},a=n._private.cy;function s(t){for(var e=t._private.edges,n=0;n0&&(t?A.emitAndNotify("remove"):e&&A.emit("remove"));for(var L=0;L0?i=o:r=o}while(Math.abs(a)>s&&++c=a?x(e,o):0===l?o:w(e,r,r+h)}o(g,"A"),o(f,"B"),o(m,"C"),o(y,"calcBezier"),o(v,"getSlope"),o(x,"newtonRaphsonIterate"),o(b,"calcSampleValues"),o(w,"binarySubdivide"),o(k,"getTForX");var T=!1;function _(){T=!0,t===e&&n===r||b()}o(_,"precompute");var E=o((function(i){return T||_(),t===e&&n===r?i:0===i?0:1===i?1:y(k(i),e,r)}),"f");E.getControlPoints=function(){return[{x:t,y:e},{x:n,y:r}]};var C="generateBezier("+[t,e,n,r]+")";return E.toString=function(){return C},E}o(Y_t,"generateCubicBezier");var W_t=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,n,r){var i={x:e.x+r.dx*n,v:e.v+r.dv*n,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function n(n,r){var i={dx:n.v,dv:t(n)},a=e(n,.5*r,i),s=e(n,.5*r,a),o=e(n,r,s),l=1/6*(i.dx+2*(a.dx+s.dx)+o.dx),c=1/6*(i.dv+2*(a.dv+s.dv)+o.dv);return n.x=n.x+l*r,n.v=n.v+c*r,n}return o(t,"springAccelerationForState"),o(e,"springEvaluateStateWithDerivative"),o(n,"springIntegrateState"),o((function t(e,r,i){var a,s,o,l={x:-1,v:0,tension:null,friction:null},c=[0],h=0,u=1e-4;for(e=parseFloat(e)||500,r=parseFloat(r)||20,i=i||null,l.tension=e,l.friction=r,s=(a=null!==i)?(h=t(e,r))/i*.016:.016;o=n(o||l,s),c.push(1+o.x),h+=16,Math.abs(o.x)>u&&Math.abs(o.v)>u;);return a?function(t){return c[t*(c.length-1)|0]}:h}),"springRK4Factory")}(),H_t=o((function(t,e,n,r){var i=Y_t(t,e,n,r);return function(t,e,n){return t+(e-t)*i(n)}}),"cubicBezier"),V_t={linear:o((function(t,e,n){return t+(e-t)*n}),"linear"),ease:H_t(.25,.1,.25,1),"ease-in":H_t(.42,0,1,1),"ease-out":H_t(0,0,.58,1),"ease-in-out":H_t(.42,0,.58,1),"ease-in-sine":H_t(.47,0,.745,.715),"ease-out-sine":H_t(.39,.575,.565,1),"ease-in-out-sine":H_t(.445,.05,.55,.95),"ease-in-quad":H_t(.55,.085,.68,.53),"ease-out-quad":H_t(.25,.46,.45,.94),"ease-in-out-quad":H_t(.455,.03,.515,.955),"ease-in-cubic":H_t(.55,.055,.675,.19),"ease-out-cubic":H_t(.215,.61,.355,1),"ease-in-out-cubic":H_t(.645,.045,.355,1),"ease-in-quart":H_t(.895,.03,.685,.22),"ease-out-quart":H_t(.165,.84,.44,1),"ease-in-out-quart":H_t(.77,0,.175,1),"ease-in-quint":H_t(.755,.05,.855,.06),"ease-out-quint":H_t(.23,1,.32,1),"ease-in-out-quint":H_t(.86,0,.07,1),"ease-in-expo":H_t(.95,.05,.795,.035),"ease-out-expo":H_t(.19,1,.22,1),"ease-in-out-expo":H_t(1,0,0,1),"ease-in-circ":H_t(.6,.04,.98,.335),"ease-out-circ":H_t(.075,.82,.165,1),"ease-in-out-circ":H_t(.785,.135,.15,.86),spring:o((function(t,e,n){if(0===n)return V_t.linear;var r=W_t(t,e,n);return function(t,e,n){return t+(e-t)*r(n)}}),"spring"),"cubic-bezier":H_t};function X_t(t,e,n,r,i){if(1===r)return n;if(e===n)return n;var a=i(e,n,r);return null==t||((t.roundValue||t.color)&&(a=Math.round(a)),void 0!==t.min&&(a=Math.max(a,t.min)),void 0!==t.max&&(a=Math.min(a,t.max))),a}function K_t(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function Z_t(t,e,n,r,i){var a=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var s=K_t(t,i),o=K_t(e,i);if(Vgt(s)&&Vgt(o))return X_t(a,s,o,n,r);if(Ygt(s)&&Ygt(o)){for(var l=[],c=0;c0?("spring"===u&&d.push(s.duration),s.easingImpl=V_t[u].apply(null,d)):s.easingImpl=V_t[u]}var p,g=s.easingImpl;if(p=0===s.duration?1:(n-l)/s.duration,s.applying&&(p=s.progress),p<0?p=0:p>1&&(p=1),null==s.delay){var f=s.startPosition,m=s.position;if(m&&i&&!t.locked()){var y={};J_t(f.x,m.x)&&(y.x=Z_t(f.x,m.x,p,g)),J_t(f.y,m.y)&&(y.y=Z_t(f.y,m.y,p,g)),t.position(y)}var v=s.startPan,x=s.pan,b=a.pan,w=null!=x&&r;w&&(J_t(v.x,x.x)&&(b.x=Z_t(v.x,x.x,p,g)),J_t(v.y,x.y)&&(b.y=Z_t(v.y,x.y,p,g)),t.emit("pan"));var k=s.startZoom,T=s.zoom,_=null!=T&&r;_&&(J_t(k,T)&&(a.zoom=$yt(a.minZoom,Z_t(k,T,p,g),a.maxZoom)),t.emit("zoom")),(w||_)&&t.emit("viewport");var E=s.style;if(E&&E.length>0&&i){for(var C=0;C=0;e--){(0,t[e])()}t.splice(0,t.length)}),"callbacks"),u=a.length-1;u>=0;u--){var d=a[u],p=d._private;p.stopped?(a.splice(u,1),p.hooked=!1,p.playing=!1,p.started=!1,h(p.frames)):(p.playing||p.applying)&&(p.playing&&p.applying&&(p.applying=!1),p.started||tEt(0,d,t),Q_t(e,d,t,n),p.applying&&(p.applying=!1),h(p.frames),null!=p.step&&p.step(t),d.completed()&&(a.splice(u,1),p.hooked=!1,p.playing=!1,p.started=!1,h(p.completes)),l=!0)}return n||0!==a.length||0!==s.length||r.push(e),l}o(i,"stepOne");for(var a=!1,s=0;s0?e.notify("draw",n):e.notify("draw")),n.unmerge(r),e.emit("step")}o(X_t,"getEasedValue"),o(K_t,"getValue"),o(Z_t,"ease"),o(Q_t,"step$1"),o(J_t,"valid"),o(tEt,"startAnimation"),o(eEt,"stepAll");var nEt={animate:hkt.animate(),animation:hkt.animation(),animated:hkt.animated(),clearQueue:hkt.clearQueue(),delay:hkt.delay(),delayAnimation:hkt.delayAnimation(),stop:hkt.stop(),addToAnimationPool:o((function(t){this.styleEnabled()&&this._private.aniEles.merge(t)}),"addToAnimationPool"),stopAnimationLoop:o((function(){this._private.animationsRunning=!1}),"stopAnimationLoop"),startAnimationLoop:o((function(){var t=this;if(t._private.animationsRunning=!0,t.styleEnabled()){o(n,"headlessStep");var e=t.renderer();e&&e.beforeRender?e.beforeRender(o((function(e,n){eEt(n,t)}),"rendererAnimationStep"),e.beforeRenderPriorities.animations):n()}function n(){t._private.animationsRunning&&fmt(o((function(e){eEt(e,t),n()}),"animationStep"))}}),"startAnimationLoop")},rEt={qualifierCompare:o((function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)}),"qualifierCompare"),eventMatches:o((function(t,e,n){var r=e.qualifier;return null==r||t!==n.target&&Qgt(n.target)&&r.matches(n.target)}),"eventMatches"),addEventFields:o((function(t,e){e.cy=t,e.target=t}),"addEventFields"),callbackContext:o((function(t,e,n){return null!=e.qualifier?n.target:t}),"callbackContext")},iEt=o((function(t){return qgt(t)?new iTt(t):t}),"argSelector"),aEt={createEmitter:o((function(){var t=this._private;return t.emitter||(t.emitter=new a_t(rEt,this)),this}),"createEmitter"),emitter:o((function(){return this._private.emitter}),"emitter"),on:o((function(t,e,n){return this.emitter().on(t,iEt(e),n),this}),"on"),removeListener:o((function(t,e,n){return this.emitter().removeListener(t,iEt(e),n),this}),"removeListener"),removeAllListeners:o((function(){return this.emitter().removeAllListeners(),this}),"removeAllListeners"),one:o((function(t,e,n){return this.emitter().one(t,iEt(e),n),this}),"one"),once:o((function(t,e,n){return this.emitter().one(t,iEt(e),n),this}),"once"),emit:o((function(t,e){return this.emitter().emit(t,e),this}),"emit"),emitAndNotify:o((function(t,e){return this.emit(t),this.notify(t,e),this}),"emitAndNotify")};hkt.eventAliasesOn(aEt);var sEt={png:o((function(t){return t=t||{},this._private.renderer.png(t)}),"png"),jpg:o((function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)}),"jpg")};sEt.jpeg=sEt.jpg;var oEt={layout:o((function(t){var e=this;if(null!=t)if(null!=t.name){var n,r=t.name,i=e.extension("layout",r);if(null!=i)return n=qgt(t.eles)?e.$(t.eles):null!=t.eles?t.eles:e.$(),new i(mft({},t,{cy:e,eles:n}));$mt("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else $mt("A `name` must be specified to make a layout");else $mt("Layout options must be specified to make a layout")}),"layout")};oEt.createLayout=oEt.makeLayout=oEt.layout;var lEt={notify:o((function(t,e){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[t]=n.batchNotifications[t]||this.collection();null!=e&&r.merge(e)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(t,e)}}),"notify"),notifications:o((function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)}),"notifications"),noNotifications:o((function(t){this.notifications(!1),t(),this.notifications(!0)}),"noNotifications"),batching:o((function(){return this._private.batchCount>0}),"batching"),startBatch:o((function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this}),"startBatch"),endBatch:o((function(){var t=this._private;if(0===t.batchCount)return this;if(t.batchCount--,0===t.batchCount){t.batchStyleEles.updateStyle();var e=this.renderer();Object.keys(t.batchNotifications).forEach((function(n){var r=t.batchNotifications[n];r.empty()?e.notify(n):e.notify(n,r)}))}return this}),"endBatch"),batch:o((function(t){return this.startBatch(),t(),this.endBatch(),this}),"batch"),batchData:o((function(t){var e=this;return this.batch((function(){for(var n=Object.keys(t),r=0;r0;)e.removeChild(e.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach((function(t){var e=t._private;e.rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]}))}),"destroyRenderer"),onRender:o((function(t){return this.on("render",t)}),"onRender"),offRender:o((function(t){return this.off("render",t)}),"offRender")};hEt.invalidateDimensions=hEt.resize;var uEt={collection:o((function(t,e){return qgt(t)?this.$(t):Zgt(t)?t.collection():Ygt(t)?(e||(e={}),new G_t(this,t,e.unique,e.removed)):new G_t(this)}),"collection"),nodes:o((function(t){var e=this.$((function(t){return t.isNode()}));return t?e.filter(t):e}),"nodes"),edges:o((function(t){var e=this.$((function(t){return t.isEdge()}));return t?e.filter(t):e}),"edges"),$:o((function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()}),"$"),mutableElements:o((function(){return this._private.elements}),"mutableElements")};uEt.elements=uEt.filter=uEt.$;var dEt={},pEt="t";dEt.apply=function(t){for(var e=this,n=e._private.cy.collection(),r=0;r0;if(d||u&&p){var g=void 0;d&&p||d?g=c.properties:p&&(g=c.mappedProperties);for(var f=0;f1&&(y=1),l.color){var k=i.valueMin[0],T=i.valueMax[0],_=i.valueMin[1],E=i.valueMax[1],C=i.valueMin[2],S=i.valueMax[2],A=null==i.valueMin[3]?1:i.valueMin[3],L=null==i.valueMax[3]?1:i.valueMax[3],N=[Math.round(k+(T-k)*y),Math.round(_+(E-_)*y),Math.round(C+(S-C)*y),Math.round(A+(L-A)*y)];n={bypass:i.bypass,name:i.name,value:N,strValue:"rgb("+N[0]+", "+N[1]+", "+N[2]+")"}}else{if(!l.number)return!1;var I=i.valueMin+(i.valueMax-i.valueMin)*y;n=this.parse(i.name,I,i.bypass,p)}if(!n)return m(),!1;n.mapping=i,i=n;break;case s.data:for(var M=i.field.split("."),R=d.data,D=0;D0&&a>0){for(var o={},l=!1,c=0;c0?t.delayAnimation(s).play().promise().then(e):e()})).then((function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1)},dEt.checkTrigger=function(t,e,n,r,i,a){var s=this.properties[e],o=i(s);null!=o&&o(n,r)&&a(s)},dEt.checkZOrderTrigger=function(t,e,n,r){var i=this;this.checkTrigger(t,e,n,r,(function(t){return t.triggersZOrder}),(function(){i._private.cy.notify("zorder",t)}))},dEt.checkBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,(function(t){return t.triggersBounds}),(function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),!i.triggersBoundsOfParallelBeziers||"curve-style"!==e||"bezier"!==n&&"bezier"!==r||t.parallelEdges().forEach((function(t){t.isBundledBezier()&&t.dirtyBoundingBoxCache()})),!i.triggersBoundsOfConnectedEdges||"display"!==e||"none"!==n&&"none"!==r||t.connectedEdges().forEach((function(t){t.dirtyBoundingBoxCache()}))}))},dEt.checkTriggers=function(t,e,n,r){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,n,r),this.checkBoundsTrigger(t,e,n,r)};var gEt={applyBypass:function(t,e,n,r){var i=[];if("*"===e||"**"===e){if(void 0!==n)for(var a=0;ae.length?a.substr(e.length):""}function l(){n=n.length>r.length?n.substr(r.length):""}for(a=a.replace(/[/][*](\s|.)+?[*][/]/g,""),o(s,"removeSelAndBlockFromRemaining"),o(l,"removePropAndValFromRem");;){if(a.match(/^\s*$/))break;var c=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){zmt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}e=c[0];var h=c[1];if("core"!==h)if(new iTt(h).invalid){zmt("Skipping parsing of block: Invalid selector found in string stylesheet: "+h),s();continue}var u=c[2],d=!1;n=u;for(var p=[];;){if(n.match(/^\s*$/))break;var g=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!g){zmt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+u),d=!0;break}r=g[0];var f=g[1],m=g[2];if(this.properties[f])i.parse(f,m)?(p.push({name:f,val:m}),l()):(zmt("Skipping property: Invalid property definition in: "+r),l());else zmt("Skipping property: Invalid property name in: "+r),l()}if(d){s();break}i.selector(h);for(var y=0;y=7&&"d"===e[0]&&(h=new RegExp(l.data.regex).exec(e))){if(n)return!1;var p=l.data;return{name:t,value:h,strValue:""+e,mapped:p,field:h[1],bypass:n}}if(e.length>=10&&"m"===e[0]&&(u=new RegExp(l.mapData.regex).exec(e))){if(n)return!1;if(d.multiple)return!1;var g=l.mapData;if(!d.color&&!d.number)return!1;var f=this.parse(t,u[4]);if(!f||f.mapped)return!1;var m=this.parse(t,u[5]);if(!m||m.mapped)return!1;if(f.pfValue===m.pfValue||f.strValue===m.strValue)return zmt("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+f.strValue+"`"),this.parse(t,f.strValue);if(d.color){var y=f.value,v=m.value;if(!(y[0]!==v[0]||y[1]!==v[1]||y[2]!==v[2]||y[3]!==v[3]&&(null!=y[3]&&1!==y[3]||null!=v[3]&&1!==v[3])))return!1}return{name:t,value:u,strValue:""+e,mapped:g,field:u[1],fieldMin:parseFloat(u[2]),fieldMax:parseFloat(u[3]),valueMin:f.value,valueMax:m.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var x;if(x=c?e.split(/\s+/):Ygt(e)?e:[e],d.evenMultiple&&x.length%2!=0)return null;for(var b=[],w=[],k=[],T="",_=!1,E=0;E0?" ":"")+C.strValue}return d.validate&&!d.validate(b,w)?null:d.singleEnum&&_?1===b.length&&qgt(b[0])?{name:t,value:b[0],strValue:b[0],bypass:n}:null:{name:t,value:b,pfValue:k,strValue:T,bypass:n,units:w}}var S=o((function(){for(var r=0;rd.max||d.strictMax&&e===d.max))return null;var M={name:t,value:e,strValue:""+e+(A||""),units:A,bypass:n};return d.unitless||"px"!==A&&"em"!==A?M.pfValue=e:M.pfValue="px"!==A&&A?this.getEmSizeInPixels()*e:e,"ms"!==A&&"s"!==A||(M.pfValue="ms"===A?e:1e3*e),"deg"!==A&&"rad"!==A||(M.pfValue="rad"===A?e:Ayt(e)),"%"===A&&(M.pfValue=e/100),M}if(d.propList){var R=[],D=""+e;if("none"===D);else{for(var O=D.split(/\s*,\s*|\s+/),P=0;P0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*e)/n.w,(o-2*e)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=e),this}),"zoomRange"),minZoom:o((function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})}),"minZoom"),maxZoom:o((function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})}),"maxZoom"),getZoomedViewport:o((function(t){var e,n,r=this._private,i=r.pan,a=r.zoom,s=!1;if(r.zoomingEnabled||(s=!0),Vgt(t)?n=t:Wgt(t)&&(n=t.level,null!=t.position?e=wyt(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null==e||r.panningEnabled||(s=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=o,i.push("zoom"))}if(r&&(!a||!t.cancelOnFailedZoom)&&e.panningEnabled){var l=t.pan;Vgt(l.x)&&(e.pan.x=l.x,s=!1),Vgt(l.y)&&(e.pan.y=l.y,s=!1),s||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this}),"viewport"),center:o((function(t){var e=this.getCenterPan(t);return e&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this}),"center"),getCenterPan:o((function(t,e){if(this._private.panningEnabled){if(qgt(t)){var n=t;t=this.mutableElements().filter(n)}else Zgt(t)||(t=this.mutableElements());if(0!==t.length){var r=t.boundingBox(),i=this.width(),a=this.height();return{x:(i-(e=void 0===e?this._private.zoom:e)*(r.x1+r.x2))/2,y:(a-e*(r.y1+r.y2))/2}}}}),"getCenterPan"),reset:o((function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this}),"reset"),invalidateSize:o((function(){this._private.sizeCache=null}),"invalidateSize"),size:o((function(){var t,e,n=this._private,r=n.container,i=this;return n.sizeCache=n.sizeCache||(r?(t=i.window().getComputedStyle(r),e=o((function(e){return parseFloat(t.getPropertyValue(e))}),"val"),{width:r.clientWidth-e("padding-left")-e("padding-right"),height:r.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})}),"size"),width:o((function(){return this.size().width}),"width"),height:o((function(){return this.size().height}),"height"),extent:o((function(){var t=this._private.pan,e=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-t.x)/e,x2:(n.x2-t.x)/e,y1:(n.y1-t.y)/e,y2:(n.y2-t.y)/e};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r}),"extent"),renderedExtent:o((function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}}),"renderedExtent"),multiClickDebounceTime:o((function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime}),"multiClickDebounceTime")};_Et.centre=_Et.center,_Et.autolockNodes=_Et.autolock,_Et.autoungrabifyNodes=_Et.autoungrabify;var EEt={data:hkt.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:hkt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:hkt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:hkt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};EEt.attr=EEt.data,EEt.removeAttr=EEt.removeData;var CEt=o((function(t){var e=this,n=(t=mft({},t)).container;n&&!Kgt(n)&&Kgt(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=e;var a=void 0!==Pgt&&void 0!==n&&!t.headless,s=t;s.layout=mft({name:a?"grid":"null"},s.layout),s.renderer=mft({name:a?"canvas":"null"},s.renderer);var l=o((function(t,e,n){return void 0!==e?e:void 0!==n?n:t}),"defVal"),c=this._private={container:n,ready:!1,options:s,elements:new G_t(this),listeners:[],aniEles:new G_t(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,s.zoomingEnabled),userZoomingEnabled:l(!0,s.userZoomingEnabled),panningEnabled:l(!0,s.panningEnabled),userPanningEnabled:l(!0,s.userPanningEnabled),boxSelectionEnabled:l(!0,s.boxSelectionEnabled),autolock:l(!1,s.autolock,s.autolockNodes),autoungrabify:l(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:l(!1,s.autounselectify),styleEnabled:void 0===s.styleEnabled?a:s.styleEnabled,zoom:Vgt(s.zoom)?s.zoom:1,pan:{x:Wgt(s.pan)&&Vgt(s.pan.x)?s.pan.x:0,y:Wgt(s.pan)&&Vgt(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});var h=o((function(t,e){if(t.some(sft))return Zxt.all(t).then(e);e(t)}),"loadExtData");c.styleEnabled&&e.setStyle([]);var u=mft({},s,s.renderer);e.initRenderer(u);var d=o((function(t,n,r){e.notifications(!1);var i=e.mutableElements();i.length>0&&i.remove(),null!=t&&(Wgt(t)||Ygt(t))&&e.add(t),e.one("layoutready",(function(t){e.notifications(!0),e.emit(t),e.one("load",n),e.emitAndNotify("load")})).one("layoutstop",(function(){e.one("done",r),e.emit("done")}));var a=mft({},e._private.options.layout);a.eles=e.elements(),e.layout(a).run()}),"setElesAndLayout");h([s.style,s.elements],(function(t){var n=t[0],a=t[1];c.styleEnabled&&e.style().append(n),d(a,(function(){e.startAnimationLoop(),c.ready=!0,jgt(s.ready)&&e.on("ready",s.ready);for(var t=0;t0,h=Fyt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(Zgt(n.roots))t=n.roots;else if(Ygt(n.roots)){for(var u=[],d=0;d0;){var M=I(),R=S(M,L);if(R)M.outgoers().filter((function(t){return t.isNode()&&i.has(t)})).forEach(N);else if(null===R){zmt("Detected double maximal shift for node `"+M.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}C();var D=0;if(n.avoidOverlap)for(var O=0;O0&&v[0].length<=3?l/2:0),u=2*Math.PI/v[r].length*i;return 0===r&&1===v[0].length&&(c=1),{x:H+c*Math.cos(u),y:V+c*Math.sin(u)}}return{x:H+(i+1-(a+1)/2)*s,y:(r+1)*o}}),"getPosition");return i.nodes().layoutPositions(this,n,K),this};var REt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o((function(t,e){return!0}),"animateFilter"),ready:void 0,stop:void 0,transform:o((function(t,e){return e}),"transform")};function DEt(t){this.options=mft({},REt,t)}o(DEt,"CircleLayout"),DEt.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,a=r.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var s,l=Fyt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),c=l.x1+l.w/2,h=l.y1+l.h/2,u=(void 0===e.sweep?2*Math.PI-2*Math.PI/a.length:e.sweep)/Math.max(1,a.length-1),d=0,p=0;p1&&e.avoidOverlap){d*=1.75;var y=Math.cos(u)-Math.cos(0),v=Math.sin(u)-Math.sin(0),x=Math.sqrt(d*d/(y*y+v*v));s=Math.max(x,s)}var b=o((function(t,n){var r=e.startAngle+n*u*(i?1:-1),a=s*Math.cos(r),o=s*Math.sin(r);return{x:c+a,y:h+o}}),"getPos");return r.nodes().layoutPositions(this,e,b),this};var OEt,PEt={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:o((function(t){return t.degree()}),"concentric"),levelWidth:o((function(t){return t.maxDegree()/4}),"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o((function(t,e){return!0}),"animateFilter"),ready:void 0,stop:void 0,transform:o((function(t,e){return e}),"transform")};function BEt(t){this.options=mft({},PEt,t)}o(BEt,"ConcentricLayout"),BEt.prototype.run=function(){for(var t=this.options,e=t,n=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=t.cy,i=e.eles,a=i.nodes().not(":parent"),s=Fyt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o=s.x1+s.w/2,l=s.y1+s.h/2,c=[],h=0,u=0;u0)Math.abs(v[0].value-b.value)>=m&&(v=[],y.push(v));v.push(b)}var w=h+e.minNodeSpacing;if(!e.avoidOverlap){var k=y.length>0&&y[0].length>1,T=(Math.min(s.w,s.h)/2-w)/(y.length+k?1:0);w=Math.min(w,T)}for(var _=0,E=0;E1&&e.avoidOverlap){var L=Math.cos(A)-Math.cos(0),N=Math.sin(A)-Math.sin(0),I=Math.sqrt(w*w/(L*L+N*N));_=Math.max(I,_)}C.r=_,_+=w}if(e.equidistant){for(var M=0,R=0,D=0;D=t.numIter)&&(WEt(r,t),r.temperature=r.temperature*t.coolingFactor,!(r.temperature=t.animationThreshold&&a(),fmt(e)):(iCt(r,t),l())}),"frame");u()}else{for(;h;)h=s(c),c++;iCt(r,t),l()}return this},FEt.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},FEt.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var zEt=o((function(t,e,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=Fyt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=n.eles.components(),l={},c=0;c0){s.graphSet.push(w);for(c=0;cr.count?0:r.graph}),"findLCA"),GEt=o((function t(e,n,r,i){var a=i.graphSet[r];if(-10)var o=(c=r.nodeOverlap*s)*i/(f=Math.sqrt(i*i+a*a)),l=c*a/f;else{var c,h=ZEt(t,i,a),u=ZEt(e,-1*i,-1*a),d=u.x-h.x,p=u.y-h.y,g=d*d+p*p,f=Math.sqrt(g);o=(c=(t.nodeRepulsion+e.nodeRepulsion)/g)*d/f,l=c*p/f}t.isLocked||(t.offsetX-=o,t.offsetY-=l),e.isLocked||(e.offsetX+=o,e.offsetY+=l)}}),"nodeRepulsion"),KEt=o((function(t,e,n,r){if(n>0)var i=t.maxX-e.minX;else i=e.maxX-t.minX;if(r>0)var a=t.maxY-e.minY;else a=e.maxY-t.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0}),"nodesOverlap"),ZEt=o((function(t,e,n){var r=t.positionX,i=t.positionY,a=t.height||1,s=t.width||1,o=n/e,l=a/s,c={};return 0===e&&0n?(c.x=r,c.y=i+a/2,c):0e&&-1*l<=o&&o<=l?(c.x=r-s/2,c.y=i-s*n/2/e,c):0=l)?(c.x=r+a*e/2/n,c.y=i+a/2,c):0>n&&(o<=-1*l||o>=l)?(c.x=r-a*e/2/n,c.y=i-a/2,c):c}),"findClippingPoint"),QEt=o((function(t,e){for(var n=0;n1){var g=e.gravity*u/p,f=e.gravity*d/p;h.offsetX+=g,h.offsetY+=f}}}}}),"calculateGravityForces"),tCt=o((function(t,e){var n=[],r=0,i=-1;for(n.push.apply(n,t.graphSet[0]),i+=t.graphSet[0].length;r<=i;){var a=n[r++],s=t.idToIndex[a],o=t.layoutNodes[s],l=o.children;if(0n)var i={x:n*t/r,y:n*e/r};else i={x:t,y:e};return i}),"limitForce"),rCt=o((function t(e,n){var r=e.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],a=!1;return(null==i.maxX||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(null==i.minX||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(null==i.minY||e.minY-i.padTopg&&(u+=p+e.componentSpacing,h=0,d=0,p=0)}}}),"separateComponents"),aCt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:o((function(t){}),"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o((function(t,e){return!0}),"animateFilter"),ready:void 0,stop:void 0,transform:o((function(t,e){return e}),"transform")};function sCt(t){this.options=mft({},aCt,t)}o(sCt,"GridLayout"),sCt.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=r.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=Fyt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===a.h||0===a.w)r.nodes().layoutPositions(this,e,(function(t){return{x:a.x1,y:a.y1}}));else{var s=i.size(),l=Math.sqrt(s*a.h/a.w),c=Math.round(l),h=Math.round(a.w/a.h*l),u=o((function(t){if(null==t)return Math.min(c,h);Math.min(c,h)==c?c=t:h=t}),"small"),d=o((function(t){if(null==t)return Math.max(c,h);Math.max(c,h)==c?c=t:h=t}),"large"),p=e.rows,g=null!=e.cols?e.cols:e.columns;if(null!=p&&null!=g)c=p,h=g;else if(null!=p&&null==g)c=p,h=Math.ceil(s/c);else if(null==p&&null!=g)h=g,c=Math.ceil(s/h);else if(h*c>s){var f=u(),m=d();(f-1)*m>=s?u(f-1):(m-1)*f>=s&&d(m-1)}else for(;h*c=s?d(v+1):u(y+1)}var x=a.w/h,b=a.h/c;if(e.condense&&(x=0,b=0),e.avoidOverlap)for(var w=0;w=h&&(M=0,I++)}),"moveToNextCell"),D={},O=0;O(r=ivt(t,e,b[w],b[w+1],b[w+2],b[w+3])))return y(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(b=a.allpts,w=0;w+5(r=rvt(t,e,b[w],b[w+1],b[w+2],b[w+3],b[w+4],b[w+5])))return y(n,r),!0;m=m||i.source,x=x||i.target;var k=s.getArrowWidth(o,c),T=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(w=0;w0&&(v(m),v(x))}function b(t,e,n){return Zmt(t,e,n)}function w(n,r){var i,a=n._private,s=f;i=r?r+"-":"",n.boundingBox();var l=a.labelBounds[r||"main"],c=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&c){var h=b(a.rscratch,"labelX",r),u=b(a.rscratch,"labelY",r),d=b(a.rscratch,"labelAngle",r),p=n.pstyle(i+"text-margin-x").pfValue,g=n.pstyle(i+"text-margin-y").pfValue,m=l.x1-s-p,v=l.x2+s-p,x=l.y1-s-g,w=l.y2+s-g;if(d){var k=Math.cos(d),T=Math.sin(d),_=o((function(t,e){return{x:(t-=h)*k-(e-=u)*T+h,y:t*T+e*k+u}}),"rotate"),E=_(m,x),C=_(m,w),S=_(v,x),A=_(v,w),L=[E.x+p,E.y+g,S.x+p,S.y+g,A.x+p,A.y+g,C.x+p,C.y+g];if(avt(t,e,L))return y(n),!0}else if(Xyt(l,t,e))return y(n),!0}}n&&(c=c.interactive),o(y,"addEle"),o(v,"checkNode"),o(x,"checkEdge"),o(b,"preprop"),o(w,"checkLabel");for(var k=c.length-1;k>=0;k--){var T=c[k];T.isNode()?v(T)||w(T):x(T)||w(T)||w(T,"source")||w(T,"target")}return h},getAllInBox:function(t,e,n,r){for(var i=this.getCachedZSortedEles().interactive,a=[],s=Math.min(t,n),o=Math.max(t,n),l=Math.min(e,r),c=Math.max(e,r),h=Fyt({x1:t=s,y1:e=l,x2:n=o,y2:r=c}),u=0;u0?-(Math.PI-t.ang):Math.PI+t.ang}),"invertVec"),UCt=o((function(t,e,n,r,i){if(t!==PCt?FCt(e,t,BCt):zCt($Ct,BCt),FCt(e,n,$Ct),kCt=BCt.nx*$Ct.ny-BCt.ny*$Ct.nx,TCt=BCt.nx*$Ct.nx-BCt.ny*-$Ct.ny,CCt=Math.asin(Math.max(-1,Math.min(1,kCt))),Math.abs(CCt)<1e-6)return yCt=e.x,vCt=e.y,void(ACt=NCt=0);_Ct=1,ECt=!1,TCt<0?CCt<0?CCt=Math.PI+CCt:(CCt=Math.PI-CCt,_Ct=-1,ECt=!0):CCt>0&&(_Ct=-1,ECt=!0),NCt=void 0!==e.radius?e.radius:r,SCt=CCt/2,ICt=Math.min(BCt.len/2,$Ct.len/2),i?(LCt=Math.abs(Math.cos(SCt)*NCt/Math.sin(SCt)))>ICt?(LCt=ICt,ACt=Math.abs(LCt*Math.sin(SCt)/Math.cos(SCt))):ACt=NCt:(LCt=Math.min(ICt,NCt),ACt=Math.abs(LCt*Math.sin(SCt)/Math.cos(SCt))),DCt=e.x+$Ct.nx*LCt,OCt=e.y+$Ct.ny*LCt,yCt=DCt-$Ct.ny*ACt*_Ct,vCt=OCt+$Ct.nx*ACt*_Ct,MCt=e.x+BCt.nx*LCt,RCt=e.y+BCt.ny*LCt,PCt=e}),"calcCornerArc");function GCt(t,e){0===e.radius?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function qCt(t,e,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===r||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(UCt(t,e,n,r,i),{cx:yCt,cy:vCt,radius:ACt,startX:MCt,startY:RCt,stopX:DCt,stopY:OCt,startAngle:BCt.ang+Math.PI/2*_Ct,endAngle:$Ct.ang-Math.PI/2*_Ct,counterClockwise:ECt})}o(GCt,"drawPreparedRoundCorner"),o(qCt,"getRoundCorner");var jCt={};function YCt(t){var e=[];if(null!=t){for(var n=0;n0?Math.max(t-e,0):Math.min(t+e,0)}),"subDWH"),A=S(E,T),L=S(C,_),N=!1;"auto"===y?m=Math.abs(A)>Math.abs(L)?i:r:y===c||y===l?(m=r,N=!0):y!==a&&y!==s||(m=i,N=!0);var I,M=m===r,R=M?L:A,D=M?C:E,O=Iyt(D),P=!1;(N&&(x||w)||!(y===l&&D<0||y===c&&D>0||y===a&&D>0||y===s&&D<0)||(R=(O*=-1)*Math.abs(R),P=!0),x)?I=(b<0?1+b:b)*R:I=(b<0?R:0)+b*O;var B=o((function(t){return Math.abs(t)=Math.abs(R)}),"getIsTooClose"),$=B(I),F=B(Math.abs(R)-Math.abs(I));if(($||F)&&!P)if(M){var z=Math.abs(D)<=d/2,U=Math.abs(E)<=p/2;if(z){var G=(h.x1+h.x2)/2,q=h.y1,j=h.y2;n.segpts=[G,q,G,j]}else if(U){var Y=(h.y1+h.y2)/2,W=h.x1,H=h.x2;n.segpts=[W,Y,H,Y]}else n.segpts=[h.x1,h.y2]}else{var V=Math.abs(D)<=u/2,X=Math.abs(C)<=g/2;if(V){var K=(h.y1+h.y2)/2,Z=h.x1,Q=h.x2;n.segpts=[Z,K,Q,K]}else if(X){var J=(h.x1+h.x2)/2,tt=h.y1,et=h.y2;n.segpts=[J,tt,J,et]}else n.segpts=[h.x2,h.y1]}else if(M){var nt=h.y1+I+(f?d/2*O:0),rt=h.x1,it=h.x2;n.segpts=[rt,nt,it,nt]}else{var at=h.x1+I+(f?u/2*O:0),st=h.y1,ot=h.y2;n.segpts=[at,st,at,ot]}if(n.isRound){var lt=t.pstyle("taxi-radius").value,ct="arc-radius"===t.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(lt),n.isArcRadius=new Array(n.segpts.length/2).fill(ct)}},jCt.tryToCorrectInvalidPoints=function(t,e){var n=t._private.rscratch;if("bezier"===n.edgeType){var r=e.srcPos,i=e.tgtPos,a=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,c=e.srcShape,h=e.tgtShape,u=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,g=e.tgtRs,f=!Vgt(n.startX)||!Vgt(n.startY),m=!Vgt(n.arrowStartX)||!Vgt(n.arrowStartY),y=!Vgt(n.endX)||!Vgt(n.endY),v=!Vgt(n.arrowEndX)||!Vgt(n.arrowEndY),x=3*(this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth),b=Myt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=bd.poolIndex()){var p=u;u=d,d=p}var g=o.srcPos=u.position(),f=o.tgtPos=d.position(),m=o.srcW=u.outerWidth(),y=o.srcH=u.outerHeight(),v=o.tgtW=d.outerWidth(),x=o.tgtH=d.outerHeight(),b=o.srcShape=n.nodeShapes[e.getNodeShape(u)],w=o.tgtShape=n.nodeShapes[e.getNodeShape(d)],k=o.srcCornerRadius="auto"===u.pstyle("corner-radius").value?"auto":u.pstyle("corner-radius").pfValue,T=o.tgtCornerRadius="auto"===d.pstyle("corner-radius").value?"auto":d.pstyle("corner-radius").pfValue,_=o.tgtRs=d._private.rscratch,E=o.srcRs=u._private.rscratch;o.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var C=0;C0){var Y=c,W=Ryt(Y,Tyt(e)),H=Ryt(Y,Tyt(j)),V=W;if(H2)Ryt(Y,{x:j[2],y:j[3]})0){var ot=h,lt=Ryt(ot,Tyt(e)),ct=Ryt(ot,Tyt(st)),ht=lt;if(ct2)Ryt(ot,{x:st[2],y:st[3]})=l||v){h={cp:f,segment:y};break}}if(h)break}var x=h.cp,b=h.segment,w=(l-d)/b.length,k=b.t1-b.t0,T=o?b.t0+k*w:b.t1-k*w;T=$yt(0,T,1),e=Pyt(x.p0,x.p1,x.p2,T),i=QCt(x.p0,x.p1,x.p2,T);break;case"straight":case"segments":case"haystack":for(var _,E,C,S,A=0,L=r.allpts.length,N=0;N+3=l));N+=2);var I=(l-E)/_;I=$yt(0,I,1),e=Byt(C,S,I),i=ZCt(C,S)}s("labelX",n,e.x),s("labelY",n,e.y),s("labelAutoAngle",n,i)}}),"calculateEndProjection");h("source"),h("target"),this.applyLabelDimensions(t)}},XCt.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},XCt.applyPrefixedLabelDimensions=function(t,e){var n=t._private,r=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,r),a=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,o=Zmt(n.rscratch,"labelWrapCachedLines",e)||[],l="wrap"!==s?1:Math.max(o.length,1),c=i.height/l,h=c*a,u=i.width,d=i.height+(l-1)*(a-1)*c;Qmt(n.rstyle,"labelWidth",e,u),Qmt(n.rscratch,"labelWidth",e,u),Qmt(n.rstyle,"labelHeight",e,d),Qmt(n.rscratch,"labelHeight",e,d),Qmt(n.rscratch,"labelLineHeight",e,h)},XCt.getLabelText=function(t,e){var n=t._private,r=e?e+"-":"",i=t.pstyle(r+"label").strValue,a=t.pstyle("text-transform").value,s=o((function(t,r){return r?(Qmt(n.rscratch,t,e,r),r):Zmt(n.rscratch,t,e)}),"rscratch");if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var l=t.pstyle("text-wrap").value;if("wrap"===l){var c=s("labelKey");if(null!=c&&s("labelWrapKey")===c)return s("labelWrapCachedText");for(var h=i.split("\n"),u=t.pstyle("text-max-width").pfValue,d="anywhere"===t.pstyle("text-overflow-wrap").value,p=[],g=/[\s\u200b]+|$/g,f=0;fu){var x,b="",w=0,k=Ogt(m.matchAll(g));try{for(k.s();!(x=k.n()).done;){var T=x.value,_=T[0],E=m.substring(w,T.index);w=T.index+_.length;var C=0===b.length?E:b+E+_;this.calculateLabelDimensions(t,C).width<=u?b+=E+_:(b&&p.push(b),b=E+_)}}catch(t){k.e(t)}finally{k.f()}b.match(/^[\s\u200b]+$/)||p.push(b)}else p.push(m)}s("labelWrapCachedLines",p),i=s("labelWrapCachedText",p.join("\n")),s("labelWrapKey",c)}else if("ellipsis"===l){var S=t.pstyle("text-max-width").pfValue,A="",L=!1;if(this.calculateLabelDimensions(t,i).widthS)break;A+=i[N],N===i.length-1&&(L=!0)}return L||(A+="…"),A}return i},XCt.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,n=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},XCt.calculateLabelDimensions=function(t,e){var n=this,r=n.cy.window().document,i=Smt(e,t._private.labelDimsKey),a=n.labelDimCache||(n.labelDimCache=[]),s=a[i];if(null!=s)return s;var o=t.pstyle("font-style").strValue,l=t.pstyle("font-size").pfValue,c=t.pstyle("font-family").strValue,h=t.pstyle("font-weight").strValue,u=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=r.createElement("canvas"),d=this.labelCalcCanvasContext=u.getContext("2d");var p=u.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}d.font="".concat(o," ").concat(h," ").concat(l,"px ").concat(c);for(var g=0,f=0,m=e.split("\n"),y=0;y1&&void 0!==arguments[1])||arguments[1];if(e.merge(t),n)for(var r=0;r=t.desktopTapThreshold2}var C=i(e);m&&(t.hoverData.tapholdCancelled=!0);var S=o((function(){var e=t.hoverData.dragDelta=t.hoverData.dragDelta||[];0===e.length?(e.push(b[0]),e.push(b[1])):(e[0]+=b[0],e[1]+=b[1])}),"updateDragDelta");n=!0,r(g,["mousemove","vmousemove","tapdrag"],e,{x:h[0],y:h[1]});var A=o((function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||s.emit({originalEvent:e,type:"boxstart",position:{x:h[0],y:h[1]}}),p[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()}),"goIntoBoxMode");if(3===t.hoverData.which){if(m){var N={originalEvent:e,type:"cxtdrag",position:{x:h[0],y:h[1]}};x?x.emit(N):s.emit(N),t.hoverData.cxtDragged=!0,t.hoverData.cxtOver&&g===t.hoverData.cxtOver||(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:h[0],y:h[1]}}),t.hoverData.cxtOver=g,g&&g.emit({originalEvent:e,type:"cxtdragover",position:{x:h[0],y:h[1]}}))}}else if(t.hoverData.dragging){if(n=!0,s.panningEnabled()&&s.userPanningEnabled()){var I;if(t.hoverData.justStartedPan){var M=t.hoverData.mdownPos;I={x:(h[0]-M[0])*l,y:(h[1]-M[1])*l},t.hoverData.justStartedPan=!1}else I={x:b[0]*l,y:b[1]*l};s.panBy(I),s.emit("dragpan"),t.hoverData.dragged=!0}h=t.projectIntoViewport(e.clientX,e.clientY)}else if(1!=p[4]||null!=x&&!x.pannable()){if(x&&x.pannable()&&x.active()&&x.unactivate(),x&&x.grabbed()||g==v||(v&&r(v,["mouseout","tapdragout"],e,{x:h[0],y:h[1]}),g&&r(g,["mouseover","tapdragover"],e,{x:h[0],y:h[1]}),t.hoverData.last=g),x)if(m){if(s.boxSelectionEnabled()&&C)x&&x.grabbed()&&(y(w),x.emit("freeon"),w.emit("free"),t.dragData.didDrag&&(x.emit("dragfreeon"),w.emit("dragfree"))),A();else if(x&&x.grabbed()&&t.nodeIsDraggable(x)){var R=!t.dragData.didDrag;R&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||f(w,{inDragLayer:!0});var D={x:0,y:0};if(Vgt(b[0])&&Vgt(b[1])&&(D.x+=b[0],D.y+=b[1],R)){var O=t.hoverData.dragDelta;O&&Vgt(O[0])&&Vgt(O[1])&&(D.x+=O[0],D.y+=O[1])}t.hoverData.draggingEles=!0,w.silentShift(D).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else S();n=!0}else if(m){if(t.hoverData.dragging||!s.boxSelectionEnabled()||!C&&s.panningEnabled()&&s.userPanningEnabled()){if(!t.hoverData.selecting&&s.panningEnabled()&&s.userPanningEnabled()){a(x,t.hoverData.downs)&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,p[4]=0,t.data.bgActivePosistion=Tyt(u),t.redrawHint("select",!0),t.redraw())}}else A();x&&x.pannable()&&x.active()&&x.unactivate()}return p[2]=h[0],p[3]=h[1],n?(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1):void 0}}),"mousemoveHandler"),!1),t.registerBinding(e,"mouseup",o((function(e){if((1!==t.hoverData.which||1===e.which||!t.hoverData.capture)&&t.hoverData.capture){t.hoverData.capture=!1;var a=t.cy,s=t.projectIntoViewport(e.clientX,e.clientY),l=t.selection,c=t.findNearestElement(s[0],s[1],!0,!1),h=t.dragData.possibleDragElements,u=t.hoverData.down,d=i(e);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,u&&u.unactivate(),3===t.hoverData.which){var p={originalEvent:e,type:"cxttapend",position:{x:s[0],y:s[1]}};if(u?u.emit(p):a.emit(p),!t.hoverData.cxtDragged){var g={originalEvent:e,type:"cxttap",position:{x:s[0],y:s[1]}};u?u.emit(g):a.emit(g)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(1===t.hoverData.which){if(r(c,["mouseup","tapend","vmouseup"],e,{x:s[0],y:s[1]}),t.dragData.didDrag||t.hoverData.dragged||t.hoverData.selecting||t.hoverData.isOverThresholdDrag||(r(u,["click","tap","vclick"],e,{x:s[0],y:s[1]}),C=!1,e.timeStamp-S<=a.multiClickDebounceTime()?(E&&clearTimeout(E),C=!0,S=null,r(u,["dblclick","dbltap","vdblclick"],e,{x:s[0],y:s[1]})):(E=setTimeout((function(){C||r(u,["oneclick","onetap","voneclick"],e,{x:s[0],y:s[1]})}),a.multiClickDebounceTime()),S=e.timeStamp)),null!=u||t.dragData.didDrag||t.hoverData.selecting||t.hoverData.dragged||i(e)||(a.$(n).unselect(["tapunselect"]),h.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=h=a.collection()),c!=u||t.dragData.didDrag||t.hoverData.selecting||null!=c&&c._private.selectable&&(t.hoverData.dragging||("additive"===a.selectionType()||d?c.selected()?c.unselect(["tapunselect"]):c.select(["tapselect"]):d||(a.$(n).unmerge(c).unselect(["tapunselect"]),c.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var f=a.collection(t.getAllInBox(l[0],l[1],l[2],l[3]));t.redrawHint("select",!0),f.length>0&&t.redrawHint("eles",!0),a.emit({type:"boxend",originalEvent:e,position:{x:s[0],y:s[1]}});var m=o((function(t){return t.selectable()&&!t.selected()}),"eleWouldBeSelected");"additive"===a.selectionType()||d||a.$(n).unmerge(f).unselect(),f.emit("box").stdFilter(m).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!l[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var v=u&&u.grabbed();y(h),v&&(u.emit("freeon"),h.emit("free"),t.dragData.didDrag&&(u.emit("dragfreeon"),h.emit("dragfree")))}}l[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}),"mouseupHandler"),!1);var N,I,M,R,D,O,P,B,$,F,z,U,G,q=o((function(e){if(!t.scrollingPage){var n=t.cy,r=n.zoom(),i=n.pan(),a=t.projectIntoViewport(e.clientX,e.clientY),s=[a[0]*r+i.x,a[1]*r+i.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||A())e.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var o;e.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout((function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()}),150),o=null!=e.deltaY?e.deltaY/-250:null!=e.wheelDeltaY?e.wheelDeltaY/1e3:e.wheelDelta/1e3,o*=t.wheelSensitivity,1===e.deltaMode&&(o*=33);var l=n.zoom()*Math.pow(10,o);"gesturechange"===e.type&&(l=t.gestureStartZoom*e.scale),n.zoom({level:l,renderedPosition:{x:s[0],y:s[1]}}),n.emit("gesturechange"===e.type?"pinchzoom":"scrollzoom")}}}),"wheelHandler");t.registerBinding(t.container,"wheel",q,!0),t.registerBinding(e,"scroll",o((function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout((function(){t.scrollingPage=!1}),250)}),"scrollHandler"),!0),t.registerBinding(t.container,"gesturestart",o((function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()}),"gestureStartHandler"),!0),t.registerBinding(t.container,"gesturechange",(function(e){t.hasTouchStarted||q(e)}),!0),t.registerBinding(t.container,"mouseout",o((function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseout",position:{x:n[0],y:n[1]}})}),"mouseOutHandler"),!1),t.registerBinding(t.container,"mouseover",o((function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseover",position:{x:n[0],y:n[1]}})}),"mouseOverHandler"),!1);var j,Y,W,H,V,X,K,Z=o((function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}),"distance"),Q=o((function(t,e,n,r){return(n-t)*(n-t)+(r-e)*(r-e)}),"distanceSq");if(t.registerBinding(t.container,"touchstart",j=o((function(e){if(t.hasTouchStarted=!0,L(e)){x(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var n=t.cy,i=t.touchData.now,a=t.touchData.earlier;if(e.touches[0]){var s=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(e.touches[1]){s=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);i[2]=s[0],i[3]=s[1]}if(e.touches[2]){s=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);i[4]=s[0],i[5]=s[1]}if(e.touches[1]){t.touchData.singleTouchMoved=!0,y(t.dragData.touchDragEles);var l=t.findContainerClientCoords();$=l[0],F=l[1],z=l[2],U=l[3],N=e.touches[0].clientX-$,I=e.touches[0].clientY-F,M=e.touches[1].clientX-$,R=e.touches[1].clientY-F,G=0<=N&&N<=z&&0<=M&&M<=z&&0<=I&&I<=U&&0<=R&&R<=U;var c=n.pan(),h=n.zoom();D=Z(N,I,M,R),O=Q(N,I,M,R),B=[((P=[(N+M)/2,(I+R)/2])[0]-c.x)/h,(P[1]-c.y)/h];if(O<4e4&&!e.touches[2]){var d=t.findNearestElement(i[0],i[1],!0,!0),p=t.findNearestElement(i[2],i[3],!0,!0);return d&&d.isNode()?(d.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start=d):p&&p.isNode()?(p.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start=p):n.emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,void t.redraw()}}if(e.touches[2])n.boxSelectionEnabled()&&e.preventDefault();else if(e.touches[1]);else if(e.touches[0]){var g=t.findNearestElements(i[0],i[1],!0,!0),v=g[0];if(null!=v&&(v.activate(),t.touchData.start=v,t.touchData.starts=g,t.nodeIsGrabbable(v))){var b=t.dragData.touchDragEles=n.collection(),w=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),v.selected()?(w=n.$((function(e){return e.selected()&&t.nodeIsGrabbable(e)})),f(w,{addToList:b})):m(v,{addToList:b}),u(v);var k=o((function(t){return{originalEvent:e,type:t,position:{x:i[0],y:i[1]}}}),"makeEvent");v.emit(k("grabon")),w?w.forEach((function(t){t.emit(k("grab"))})):v.emit(k("grab"))}r(v,["touchstart","tapstart","vmousedown"],e,{x:i[0],y:i[1]}),null==v&&(t.data.bgActivePosistion={x:s[0],y:s[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout((function(){!1!==t.touchData.singleTouchMoved||t.pinching||t.touchData.selecting||r(t.touchData.start,["taphold"],e,{x:i[0],y:i[1]})}),t.tapholdDuration)}if(e.touches.length>=1){for(var T=t.touchData.startPosition=[null,null,null,null,null,null],_=0;_=t.touchTapThreshold2}if(n&&t.touchData.cxt){e.preventDefault();var b=e.touches[0].clientX-$,w=e.touches[0].clientY-F,k=e.touches[1].clientX-$,T=e.touches[1].clientY-F,_=Q(b,w,k,T);if(_/O>=2.25||_>=22500){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var E={originalEvent:e,type:"cxttapend",position:{x:o[0],y:o[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(E),t.touchData.start=null):s.emit(E)}}if(n&&t.touchData.cxt){E={originalEvent:e,type:"cxtdrag",position:{x:o[0],y:o[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(E):s.emit(E),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var C=t.findNearestElement(o[0],o[1],!0,!0);t.touchData.cxtOver&&C===t.touchData.cxtOver||(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:o[0],y:o[1]}}),t.touchData.cxtOver=C,C&&C.emit({originalEvent:e,type:"cxtdragover",position:{x:o[0],y:o[1]}}))}else if(n&&e.touches[2]&&s.boxSelectionEnabled())e.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||s.emit({originalEvent:e,type:"boxstart",position:{x:o[0],y:o[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(o[0]+o[2]+o[4])/3,i[3]=(o[1]+o[3]+o[5])/3):(i[0]=(o[0]+o[2]+o[4])/3,i[1]=(o[1]+o[3]+o[5])/3,i[2]=(o[0]+o[2]+o[4])/3+1,i[3]=(o[1]+o[3]+o[5])/3+1),t.redrawHint("select",!0),t.redraw();else if(n&&e.touches[1]&&!t.touchData.didSelect&&s.zoomingEnabled()&&s.panningEnabled()&&s.userZoomingEnabled()&&s.userPanningEnabled()){if(e.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),J=t.dragData.touchDragEles){t.redrawHint("drag",!0);for(var S=0;S0&&!t.hoverData.draggingEles&&!t.swipePanning&&null!=t.data.bgActivePosistion&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}}),"touchmoveHandler"),!1),t.registerBinding(e,"touchcancel",W=o((function(e){var n=t.touchData.start;t.touchData.capture=!1,n&&n.unactivate()}),"touchcancelHandler")),t.registerBinding(e,"touchend",H=o((function(e){var i=t.touchData.start;if(t.touchData.capture){0===e.touches.length&&(t.touchData.capture=!1),e.preventDefault();var a=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var s,l=t.cy,c=l.zoom(),h=t.touchData.now,u=t.touchData.earlier;if(e.touches[0]){var d=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);h[0]=d[0],h[1]=d[1]}if(e.touches[1]){d=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);h[2]=d[0],h[3]=d[1]}if(e.touches[2]){d=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);h[4]=d[0],h[5]=d[1]}if(i&&i.unactivate(),t.touchData.cxt){if(s={originalEvent:e,type:"cxttapend",position:{x:h[0],y:h[1]}},i?i.emit(s):l.emit(s),!t.touchData.cxtDragged){var p={originalEvent:e,type:"cxttap",position:{x:h[0],y:h[1]}};i?i.emit(p):l.emit(p)}return t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,void t.redraw()}if(!e.touches[2]&&l.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var g=l.collection(t.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,t.redrawHint("select",!0),l.emit({type:"boxend",originalEvent:e,position:{x:h[0],y:h[1]}});var f=o((function(t){return t.selectable()&&!t.selected()}),"eleWouldBeSelected");g.emit("box").stdFilter(f).select().emit("boxselect"),g.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(null!=i&&i.unactivate(),e.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(e.touches[1]);else if(e.touches[0]);else if(!e.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var m=t.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;y(m),t.redrawHint("drag",!0),t.redrawHint("eles",!0),v&&(i.emit("freeon"),m.emit("free"),t.dragData.didDrag&&(i.emit("dragfreeon"),m.emit("dragfree"))),r(i,["touchend","tapend","vmouseup","tapdragout"],e,{x:h[0],y:h[1]}),i.unactivate(),t.touchData.start=null}else{var x=t.findNearestElement(h[0],h[1],!0,!0);r(x,["touchend","tapend","vmouseup","tapdragout"],e,{x:h[0],y:h[1]})}var b=t.touchData.startPosition[0]-h[0],w=b*b,k=t.touchData.startPosition[1]-h[1],T=(w+k*k)*c*c;t.touchData.singleTouchMoved||(i||l.$(":selected").unselect(["tapunselect"]),r(i,["tap","vclick"],e,{x:h[0],y:h[1]}),V=!1,e.timeStamp-K<=l.multiClickDebounceTime()?(X&&clearTimeout(X),V=!0,K=null,r(i,["dbltap","vdblclick"],e,{x:h[0],y:h[1]})):(X=setTimeout((function(){V||r(i,["onetap","voneclick"],e,{x:h[0],y:h[1]})}),l.multiClickDebounceTime()),K=e.timeStamp)),null!=i&&!t.dragData.didDrag&&i._private.selectable&&T0)return p[0]}return null}),"getCurveT"),g=Object.keys(d),f=0;f0?c:Qyt(i,a,t,e,n,r,s,o)}),"intersectLine"),checkPoint:o((function(t,e,n,r,i,a,s,o){var l=2*(o="auto"===o?wvt(r,i):o);if(svt(t,e,this.points,a,s,r,i-l,[0,-1],n))return!0;if(svt(t,e,this.points,a,s,r-l,i,[0,-1],n))return!0;var c=r/2+2*n,h=i/2+2*n;return!!avt(t,e,[a-c,s-h,a-c,s,a+c,s,a+c,s-h])||(!!uvt(t,e,l,l,a+r/2-o,s+i/2-o,n)||!!uvt(t,e,l,l,a-r/2+o,s+i/2-o,n))}),"checkPoint")}},registerNodeShapes:function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",vvt(3,0)),this.generateRoundPolygon("round-triangle",vvt(3,0)),this.generatePolygon("rectangle",vvt(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",vvt(5,0)),this.generateRoundPolygon("round-pentagon",vvt(5,0)),this.generatePolygon("hexagon",vvt(6,0)),this.generateRoundPolygon("round-hexagon",vvt(6,0)),this.generatePolygon("heptagon",vvt(7,0)),this.generateRoundPolygon("round-heptagon",vvt(7,0)),this.generatePolygon("octagon",vvt(8,0)),this.generateRoundPolygon("round-octagon",vvt(8,0));var r=new Array(20),i=bvt(5,0),a=bvt(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=t.deqFastCost*f)break}else if(i){if(p>=t.deqCost*l||p>=t.deqAvgCost*o)break}else if(g>=t.deqNoDrawCost*uSt)break;var m=t.deq(e,u,h);if(!(m.length>0))break;for(var y=0;y0&&(t.onDeqd(e,c),!i&&t.shouldRedraw(e,c,u,h)&&r())}),"dequeue"),a=t.priority||Bmt;n.beforeRender(i,a(e))}}),"setupDequeueingImpl")}),"setupDequeueing")},pSt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Omt;Egt(this,t),this.idsByKey=new Jmt,this.keyForId=new Jmt,this.cachesByLvl=new Jmt,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=n}return o(t,"ElementTextureCacheLookup"),Sgt(t,[{key:"getIdsFor",value:o((function(t){null==t&&$mt("Can not get id list for null key");var e=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new eyt,e.set(t,n)),n}),"getIdsFor")},{key:"addIdForKey",value:o((function(t,e){null!=t&&this.getIdsFor(t).add(e)}),"addIdForKey")},{key:"deleteIdForKey",value:o((function(t,e){null!=t&&this.getIdsFor(t).delete(e)}),"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:o((function(t){return null==t?0:this.getIdsFor(t).size}),"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:o((function(t){var e=t.id(),n=this.keyForId.get(e),r=this.getKey(t);this.deleteIdForKey(n,e),this.addIdForKey(r,e),this.keyForId.set(e,r)}),"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:o((function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteIdForKey(n,e),this.keyForId.delete(e)}),"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:o((function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)}),"keyHasChangedFor")},{key:"isInvalid",value:o((function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}),"isInvalid")},{key:"getCachesAt",value:o((function(t){var e=this.cachesByLvl,n=this.lvls,r=e.get(t);return r||(r=new Jmt,e.set(t,r),n.push(t)),r}),"getCachesAt")},{key:"getCache",value:o((function(t,e){return this.getCachesAt(e).get(t)}),"getCache")},{key:"get",value:o((function(t,e){var n=this.getKey(t),r=this.getCache(n,e);return null!=r&&this.updateKeyMappingFor(t),r}),"get")},{key:"getForCachedKey",value:o((function(t,e){var n=this.keyForId.get(t.id());return this.getCache(n,e)}),"getForCachedKey")},{key:"hasCache",value:o((function(t,e){return this.getCachesAt(e).has(t)}),"hasCache")},{key:"has",value:o((function(t,e){var n=this.getKey(t);return this.hasCache(n,e)}),"has")},{key:"setCache",value:o((function(t,e,n){n.key=t,this.getCachesAt(e).set(t,n)}),"setCache")},{key:"set",value:o((function(t,e,n){var r=this.getKey(t);this.setCache(r,e,n),this.updateKeyMappingFor(t)}),"set")},{key:"deleteCache",value:o((function(t,e){this.getCachesAt(e).delete(t)}),"deleteCache")},{key:"delete",value:o((function(t,e){var n=this.getKey(t);this.deleteCache(n,e)}),"_delete")},{key:"invalidateKey",value:o((function(t){var e=this;this.lvls.forEach((function(n){return e.deleteCache(t,n)}))}),"invalidateKey")},{key:"invalidate",value:o((function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteKeyMappingFor(t);var r=this.doesEleInvalidateKey(t);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}),"invalidate")}]),t}(),gSt={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},fSt=Hmt({getKey:null,doesEleInvalidateKey:Omt,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Dmt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),mSt=o((function(t,e){var n=this;n.renderer=t,n.onDequeues=[];var r=fSt(e);mft(n,r),n.lookup=new pSt(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()}),"ElementTextureCache"),ySt=mSt.prototype;ySt.reasons=gSt,ySt.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},ySt.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},ySt.getElementQueue=function(){var t=this.eleCacheQueue=this.eleCacheQueue||new syt((function(t,e){return e.reqs-t.reqs}));return t},ySt.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},ySt.getElement=function(t,e,n,r,i){var a=this,s=this.renderer,l=s.cy.zoom(),c=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed())return null;if(!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(null==r&&(r=Math.ceil(Nyt(l*n))),r<-4)r=-4;else if(l>=7.99||r>3)return null;var h=Math.pow(2,r),u=e.h*h,d=e.w*h,p=s.eleTextBiggerThanMin(t,h);if(!this.isVisible(t,p))return null;var g,f=c.get(t,r);if(f&&f.invalidated&&(f.invalidated=!1,f.texture.invalidatedWidth-=f.width),f)return f;if(g=u<=25?25:u<=50?50:50*Math.ceil(u/50),u>1024||d>1024)return null;var m=a.getTextureQueue(g),y=m[m.length-2],v=o((function(){return a.recycleTexture(g,d)||a.addTexture(g,d)}),"addNewTxr");y||(y=m[m.length-1]),y||(y=v()),y.width-y.usedWidthr;A--)C=a.getElement(t,e,n,A,gSt.downscale);S()}else{var L;if(!w&&!k&&!T)for(var N=r-1;N>=-4;N--){var I=c.get(t,N);if(I){L=I;break}}if(b(L))return a.queueElement(t,r),L;y.context.translate(y.usedWidth,0),y.context.scale(h,h),this.drawElement(y.context,t,e,p,!1),y.context.scale(1/h,1/h),y.context.translate(-y.usedWidth,0)}return f={x:y.usedWidth,texture:y,level:r,scale:h,width:d,height:u,scaledLabelShown:p},y.usedWidth+=Math.ceil(d+8),y.eleCaches.push(f),c.set(t,r,f),a.checkTextureFullness(y),f},ySt.invalidateElements=function(t){for(var e=0;e=.2*t.width&&this.retireTexture(t)},ySt.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);t.usedWidth/t.width>.8&&t.fullnessChecks>=10?Vmt(e,t):t.fullnessChecks++},ySt.retireTexture=function(t){var e=t.height,n=this.getTextureQueue(e),r=this.lookup;Vmt(n,t),t.retired=!0;for(var i=t.eleCaches,a=0;a=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,Xmt(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),Vmt(r,a),n.push(a),a}},ySt.queueElement=function(t,e){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(t),a=r[i];if(a)a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,n.updateItem(a);else{var s={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(s),r[i]=s}},ySt.dequeue=function(t){for(var e=this,n=e.getElementQueue(),r=e.getElementKeyToQueue(),i=[],a=e.lookup,s=0;s<1&&n.size()>0;s++){var o=n.pop(),l=o.key,c=o.eles[0],h=a.hasCache(c,o.level);if(r[l]=null,!h){i.push(o);var u=e.getBoundingBox(c);e.getElement(c,u,t,o.level,gSt.dequeue)}}return i},ySt.removeFromQueue=function(t){var e=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(t),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=Rmt,e.updateItem(i),e.pop(),n[r]=null):i.eles.unmerge(t))},ySt.onDequeue=function(t){this.onDequeues.push(t)},ySt.offDequeue=function(t){Vmt(this.onDequeues,t)},ySt.setupDequeueing=dSt.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:o((function(t,e,n){return t.dequeue(e,n)}),"deq"),onDeqd:o((function(t,e){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,t);var s,l,c=r.layersByLevel,h=Math.pow(2,n),u=c[n]=c[n]||[],d=r.levelIsComplete(n,t),p=o((function(){var e=o((function(e){if(r.validateLayersElesOrdering(e,t),r.levelIsComplete(e,t))return l=c[e],!0}),"canUseAsTmpLvl"),i=o((function(t){if(!l)for(var r=n+t;-4<=r&&r<=2&&!e(r);r+=t);}),"checkLvls");i(1),i(-1);for(var a=u.length-1;a>=0;a--){var s=u[a];s.invalid&&Vmt(u,s)}}),"checkTempLevels");if(d)return u;p();var g=o((function(){if(!s){s=Fyt();for(var e=0;e16e6)return null;var i=r.makeLayer(s,n);if(null!=e){var a=u.indexOf(e)+1;u.splice(a,0,i)}else(void 0===t.insert||t.insert)&&u.unshift(i);return i}),"makeLayer");if(r.skipping&&!a)return null;for(var m=null,y=t.length/1,v=!a,x=0;x=y||!Zyt(m.bb,b.boundingBox()))&&!(m=f({insert:!0,after:m})))return null;l||v?r.queueLayer(m,b):r.drawEleInLayer(m,b,n,e),m.eles.push(b),k[n]=m}}return l||(v?null:u)},xSt.getEleLevelForLayerLevel=function(t,e){return t},xSt.drawEleInLayer=function(t,e,n,r){var i=this.renderer,a=t.context,s=e.boundingBox();0!==s.w&&0!==s.h&&e.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(a,!1),i.drawCachedElement(a,e,null,null,n,true),i.setImgSmoothing(a,!0))},xSt.levelIsComplete=function(t,e){var n=this.layersByLevel[t];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(a.invalid)return!1;r+=a.eles.length}return r===e.length},xSt.validateLayersElesOrdering=function(t,e){var n=this.layersByLevel[t];if(n)for(var r=0;r0){t=!0;break}}return t},xSt.invalidateElements=function(t){var e=this;0!==t.length&&(e.lastInvalidationTime=mmt(),0!==t.length&&e.haveLayers()&&e.updateElementsInLayers(t,o((function(t,n,r){e.invalidateLayer(t)}),"invalAssocLayers")))},xSt.invalidateLayer=function(t){if(this.lastInvalidationTime=mmt(),!t.invalid){var e=t.level,n=t.eles,r=this.layersByLevel[e];Vmt(r,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=this,l=e._private.rscratch;if((!a||e.visible())&&!l.badLine&&null!=l.allpts&&!isNaN(l.allpts[0])){var c;n&&(c=n,t.translate(-c.x1,-c.y1));var h=a?e.pstyle("opacity").value:1,u=a?e.pstyle("line-opacity").value:1,d=e.pstyle("curve-style").value,p=e.pstyle("line-style").value,g=e.pstyle("width").pfValue,f=e.pstyle("line-cap").value,m=e.pstyle("line-outline-width").value,y=e.pstyle("line-outline-color").value,v=h*u,x=h*u,b=o((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;"straight-triangle"===d?(s.eleStrokeStyle(t,e,n),s.drawEdgeTrianglePath(e,t,l.allpts)):(t.lineWidth=g,t.lineCap=f,s.eleStrokeStyle(t,e,n),s.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")}),"drawLine"),w=o((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;t.lineWidth=g+m,t.lineCap=f,m>0?(s.colorStrokeStyle(t,y[0],y[1],y[2],n),"straight-triangle"===d?s.drawEdgeTrianglePath(e,t,l.allpts):(s.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")):t.lineCap="butt"}),"drawLineOutline"),k=o((function(){i&&s.drawEdgeOverlay(t,e)}),"drawOverlay"),T=o((function(){i&&s.drawEdgeUnderlay(t,e)}),"drawUnderlay"),_=o((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;s.drawArrowheads(t,e,n)}),"drawArrows"),E=o((function(){s.drawElementText(t,e,null,r)}),"drawText");t.lineJoin="round";var C="yes"===e.pstyle("ghost").value;if(C){var S=e.pstyle("ghost-offset-x").pfValue,A=e.pstyle("ghost-offset-y").pfValue,L=e.pstyle("ghost-opacity").value,N=v*L;t.translate(S,A),b(N),_(N),t.translate(-S,-A)}else w();T(),b(),_(),k(),E(),n&&t.translate(c.x1,c.y1)}}},BSt=o((function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(e,n){if(n.visible()){var r=n.pstyle("".concat(t,"-opacity")).value;if(0!==r){var i=this,a=i.usePaths(),s=n._private.rscratch,o=2*n.pstyle("".concat(t,"-padding")).pfValue,l=n.pstyle("".concat(t,"-color")).value;e.lineWidth=o,"self"!==s.edgeType||a?e.lineCap="round":e.lineCap="butt",i.colorStrokeStyle(e,l[0],l[1],l[2],r),i.drawEdgePath(n,e,s.allpts,"solid")}}}}),"drawEdgeOverlayUnderlay");PSt.drawEdgeOverlay=BSt("overlay"),PSt.drawEdgeUnderlay=BSt("underlay"),PSt.drawEdgePath=function(t,e,n,r){var i,a=t._private.rscratch,s=e,o=!1,l=this.usePaths(),c=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l){var u=n.join("$");a.pathCacheKey&&a.pathCacheKey===u?(i=e=a.pathCache,o=!0):(i=e=new Path2D,a.pathCacheKey=u,a.pathCache=i)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=h;break;case"solid":s.setLineDash([])}if(!o&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&void 0!==arguments[5]?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,n),t.lineTo(e+r-a,n),t.quadraticCurveTo(e+r,n,e+r,n+a),t.lineTo(e+r,n+i-a),t.quadraticCurveTo(e+r,n+i,e+r-a,n+i),t.lineTo(e+a,n+i),t.quadraticCurveTo(e,n+i,e,n+i-a),t.lineTo(e,n+a),t.quadraticCurveTo(e,n,e+a,n),t.closePath(),s?t.stroke():t.fill()}FSt.eleTextBiggerThanMin=function(t,e){if(!e){var n=t.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(Nyt(n*r));e=Math.pow(2,i)}return!(t.pstyle("font-size").pfValue*e5&&void 0!==arguments[5])||arguments[5],s=this;if(null==r){if(a&&!s.eleTextBiggerThanMin(e))return}else if(!1===r)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var c=e.element()._private.rscratch.badLine,h=e.pstyle("label"),u=e.pstyle("source-label"),d=e.pstyle("target-label");if(c||(!h||!h.value)&&(!u||!u.value)&&(!d||!d.value))return;t.textAlign="center",t.textBaseline="bottom"}var p,g=!n;n&&(p=n,t.translate(-p.x1,-p.y1)),null==i?(s.drawText(t,e,null,g,a),e.isEdge()&&(s.drawText(t,e,"source",g,a),s.drawText(t,e,"target",g,a))):s.drawText(t,e,i,g,a),n&&t.translate(p.x1,p.y1)},FSt.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=n?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,c=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=r+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,c[0],c[1],c[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)},o(zSt,"roundRect"),FSt.getTextAngle=function(t,e){var n=t._private.rscratch,r=e?e+"-":"",i=t.pstyle(r+"text-rotation"),a=Zmt(n,"labelAngle",e);return"autorotate"===i.strValue?t.isEdge()?a:0:"none"===i.strValue?0:i.pfValue},FSt.drawText=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e._private,s=a.rscratch,o=i?e.effectiveOpacity():1;if(!i||0!==o&&0!==e.pstyle("text-opacity").value){"main"===n&&(n=null);var l,c,h=Zmt(s,"labelX",n),u=Zmt(s,"labelY",n),d=this.getLabelText(e,n);if(null!=d&&""!==d&&!isNaN(h)&&!isNaN(u)){this.setupTextStyle(t,e,i);var p,g=n?n+"-":"",f=Zmt(s,"labelWidth",n),m=Zmt(s,"labelHeight",n),y=e.pstyle(g+"text-margin-x").pfValue,v=e.pstyle(g+"text-margin-y").pfValue,x=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;switch(x&&(b="center",w="center"),h+=y,u+=v,0!==(p=r?this.getTextAngle(e,n):0)&&(l=h,c=u,t.translate(l,c),t.rotate(p),h=0,u=0),w){case"top":break;case"center":u+=m/2;break;case"bottom":u+=m}var k=e.pstyle("text-background-opacity").value,T=e.pstyle("text-border-opacity").value,_=e.pstyle("text-border-width").pfValue,E=e.pstyle("text-background-padding").pfValue,C=e.pstyle("text-background-shape").strValue,S=0===C.indexOf("round"),A=2;if(k>0||_>0&&T>0){var L=h-E;switch(b){case"left":L-=f;break;case"center":L-=f/2}var N=u-m-E,I=f+2*E,M=m+2*E;if(k>0){var R=t.fillStyle,D=e.pstyle("text-background-color").value;t.fillStyle="rgba("+D[0]+","+D[1]+","+D[2]+","+k*o+")",S?zSt(t,L,N,I,M,A):t.fillRect(L,N,I,M),t.fillStyle=R}if(_>0&&T>0){var O=t.strokeStyle,P=t.lineWidth,B=e.pstyle("text-border-color").value,$=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+T*o+")",t.lineWidth=_,t.setLineDash)switch($){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=_/4,t.setLineDash([]);break;case"solid":t.setLineDash([])}if(S?zSt(t,L,N,I,M,A,"stroke"):t.strokeRect(L,N,I,M),"double"===$){var F=_/2;S?zSt(t,L+F,N+F,I-2*F,M-2*F,A,"stroke"):t.strokeRect(L+F,N+F,I-2*F,M-2*F)}t.setLineDash&&t.setLineDash([]),t.lineWidth=P,t.strokeStyle=O}}var z=2*e.pstyle("text-outline-width").pfValue;if(z>0&&(t.lineWidth=z),"wrap"===e.pstyle("text-wrap").value){var U=Zmt(s,"labelWrapCachedLines",n),G=Zmt(s,"labelLineHeight",n),q=f/2,j=this.getLabelJustification(e);switch("auto"===j||("left"===b?"left"===j?h+=-f:"center"===j&&(h+=-q):"center"===b?"left"===j?h+=-q:"right"===j&&(h+=q):"right"===b&&("center"===j?h+=q:"right"===j&&(h+=f))),w){case"top":case"center":case"bottom":u-=(U.length-1)*G}for(var Y=0;Y0&&t.strokeText(U[Y],h,u),t.fillText(U[Y],h,u),u+=G}else z>0&&t.strokeText(d,h,u),t.fillText(d,h,u);0!==p&&(t.rotate(-p),t.translate(-l,-c))}}};var USt={drawNode:function(t,e,n){var r,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],c=this,h=e._private,u=h.rscratch,d=e.position();if(Vgt(d.x)&&Vgt(d.y)&&(!l||e.visible())){var p,g,f=l?e.effectiveOpacity():1,m=c.usePaths(),y=!1,v=e.padding();r=e.width()+2*v,i=e.height()+2*v,n&&(g=n,t.translate(-g.x1,-g.y1));for(var x=e.pstyle("background-image"),b=x.value,w=new Array(b.length),k=new Array(b.length),T=0,_=0;_0&&void 0!==arguments[0]?arguments[0]:N;c.eleFillStyle(t,e,n)}),"setupShapeColor"),W=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$;c.colorStrokeStyle(t,I[0],I[1],I[2],e)}),"setupBorderColor"),H=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G;c.colorStrokeStyle(t,z[0],z[1],z[2],e)}),"setupOutlineColor"),V=o((function(t,e,n,r){var i,a=c.nodePathCache=c.nodePathCache||[],s=Amt("polygon"===n?n+","+r.join(","):n,""+e,""+t,""+j),o=a[s],l=!1;return null!=o?(i=o,l=!0,u.pathCache=i):(i=new Path2D,a[s]=u.pathCache=i),{path:i,cacheHit:l}}),"getPath"),X=e.pstyle("shape").strValue,K=e.pstyle("shape-polygon-points").pfValue;if(m){t.translate(d.x,d.y);var Z=V(r,i,X,K);p=Z.path,y=Z.cacheHit}var Q=o((function(){if(!y){var n=d;m&&(n={x:0,y:0}),c.nodeShapes[c.getNodeShape(e)].draw(p||t,n.x,n.y,r,i,j,u)}m?t.fill(p):t.fill()}),"drawShape"),J=o((function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=h.backgrounding,a=0,s=0;s0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;c.hasPie(e)&&(c.drawPie(t,e,a),n&&(m||c.nodeShapes[c.getNodeShape(e)].draw(t,d.x,d.y,r,i,j,u)))}),"drawPie"),et=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=(A>0?A:-A)*e,r=A>0?0:255;0!==A&&(c.colorFillStyle(t,r,r,r,n),m?t.fill(p):t.fill())}),"darken"),nt=o((function(){if(L>0){if(t.lineWidth=L,t.lineCap=D,t.lineJoin=R,t.setLineDash)switch(M){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(P),t.lineDashOffset=B;break;case"solid":case"double":t.setLineDash([])}if("center"!==O){if(t.save(),t.lineWidth*=2,"inside"===O)m?t.clip(p):t.clip();else{var e=new Path2D;e.rect(-r/2-L,-i/2-L,r+2*L,i+2*L),e.addPath(p),t.clip(e,"evenodd")}m?t.stroke(p):t.stroke(),t.restore()}else m?t.stroke(p):t.stroke();if("double"===M){t.lineWidth=L/3;var n=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",m?t.stroke(p):t.stroke(),t.globalCompositeOperation=n}t.setLineDash&&t.setLineDash([])}}),"drawBorder"),rt=o((function(){if(F>0){if(t.lineWidth=F,t.lineCap="butt",t.setLineDash)switch(U){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([])}var n=d;m&&(n={x:0,y:0});var a=c.getNodeShape(e),s=L;"inside"===O&&(s=0),"outside"===O&&(s*=2);var o,l=(r+s+(F+q))/r,h=(i+s+(F+q))/i,u=r*l,p=i*h,g=c.nodeShapes[a].points;if(m)o=V(u,p,a,g).path;if("ellipse"===a)c.drawEllipsePath(o||t,n.x,n.y,u,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(a)){var f=0,y=0,v=0;"round-diamond"===a?f=1.4*(s+q+F):"round-heptagon"===a?(f=1.075*(s+q+F),v=-(s/2+q+F)/35):"round-hexagon"===a?f=1.12*(s+q+F):"round-pentagon"===a?(f=1.13*(s+q+F),v=-(s/2+q+F)/15):"round-tag"===a?(f=1.12*(s+q+F),y=.07*(s/2+F+q)):"round-triangle"===a&&(f=(s+q+F)*(Math.PI/2),v=-(s+q/2+F)/Math.PI),0!==f&&(u=r*(l=(r+f)/r),["round-hexagon","round-tag"].includes(a)||(p=i*(h=(i+f)/i)));for(var x=u/2,b=p/2,w=(j="auto"===j?kvt(u,p):j)+(s+F+q)/2,k=new Array(g.length/2),T=new Array(g.length/2),_=0;_0){if(r=r||n.position(),null==i||null==a){var u=n.padding();i=n.width()+2*u,a=n.height()+2*u}this.colorFillStyle(e,l[0],l[1],l[2],o),this.nodeShapes[c].draw(e,r.x,r.y,i+2*s,a+2*s,h),e.fill()}}}}),"drawNodeOverlayUnderlay");USt.drawNodeOverlay=GSt("overlay"),USt.drawNodeUnderlay=GSt("underlay"),USt.hasPie=function(t){return(t=t[0])._private.hasPie},USt.drawPie=function(t,e,n,r){e=e[0],r=r||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),s=r.x,o=r.y,l=e.width(),c=e.height(),h=Math.min(l,c)/2,u=0;this.usePaths()&&(s=0,o=0),"%"===a.units?h*=a.pfValue:void 0!==a.pfValue&&(h=a.pfValue/2);for(var d=1;d<=i.pieBackgroundN;d++){var p=e.pstyle("pie-"+d+"-background-size").value,g=e.pstyle("pie-"+d+"-background-color").value,f=e.pstyle("pie-"+d+"-background-opacity").value*n,m=p/100;m+u>1&&(m=1-u);var y=1.5*Math.PI+2*Math.PI*u,v=y+2*Math.PI*m;0===p||u>=1||u+m>1||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,h,y,v),t.closePath(),this.colorFillStyle(t,g[0],g[1],g[2],f),t.fill(),u+=m)}};var qSt={};qSt.getPixelRatio=function(){var t=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var e=this.cy.window(),n=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/n},qSt.paintCache=function(t){for(var e,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;is.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!d&&(u[s.NODE]=!0,u[s.SELECT_BOX]=!0);var x=c.style(),b=c.zoom(),w=void 0!==i?i:b,k=c.pan(),T={x:k.x,y:k.y},_={zoom:b,pan:{x:k.x,y:k.y}},E=s.prevViewport;void 0===E||_.zoom!==E.zoom||_.pan.x!==E.pan.x||_.pan.y!==E.pan.y||m&&!f||(s.motionBlurPxRatio=1),a&&(T=a),w*=l,T.x*=l,T.y*=l;var C=s.getCachedZSortedEles();function S(t,e,n,r,i){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",s.colorFillStyle(t,255,255,255,s.motionBlurTransparency),t.fillRect(e,n,r,i),t.globalCompositeOperation=a}function A(t,r){var o,l,c,u;s.clearingMotionBlur||t!==h.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&t!==h.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(o=T,l=w,c=s.canvasWidth,u=s.canvasHeight):(o={x:k.x*g,y:k.y*g},l=b*g,c=s.canvasWidth*g,u=s.canvasHeight*g),t.setTransform(1,0,0,1,0,0),"motionBlur"===r?S(t,0,0,c,u):e||void 0!==r&&!r||t.clearRect(0,0,c,u),n||(t.translate(o.x,o.y),t.scale(l,l)),a&&t.translate(a.x,a.y),i&&t.scale(i,i)}if(o(S,"mbclear"),o(A,"setContextTransform"),d||(s.textureDrawLastFrame=!1),d){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=c.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var L=s.data.bufferContexts[s.TEXTURE_BUFFER];L.setTransform(1,0,0,1,0,0),L.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:L,drawOnlyNodeLayer:!0,forcedPxRatio:l*s.textureMult}),(_=s.textureCache.viewport={zoom:c.zoom(),pan:c.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}u[s.DRAG]=!1,u[s.NODE]=!1;var N=h.contexts[s.NODE],I=s.textureCache.texture;_=s.textureCache.viewport;N.setTransform(1,0,0,1,0,0),p?S(N,0,0,_.width,_.height):N.clearRect(0,0,_.width,_.height);var M=x.core("outside-texture-bg-color").value,R=x.core("outside-texture-bg-opacity").value;s.colorFillStyle(N,M[0],M[1],M[2],R),N.fillRect(0,0,_.width,_.height);b=c.zoom();A(N,!1),N.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/l,_.height/_.zoom/l),N.drawImage(I,_.mpan.x,_.mpan.y,_.width/_.zoom/l,_.height/_.zoom/l)}else s.textureOnViewport&&!e&&(s.textureCache=null);var D=c.extent(),O=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),P=s.hideEdgesOnViewport&&O,B=[];if(B[s.NODE]=!u[s.NODE]&&p&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,B[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),B[s.DRAG]=!u[s.DRAG]&&p&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,B[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),u[s.NODE]||n||r||B[s.NODE]){var $=p&&!B[s.NODE]&&1!==g;A(N=e||($?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:h.contexts[s.NODE]),p&&!$?"motionBlur":void 0),P?s.drawCachedNodes(N,C.nondrag,l,D):s.drawLayeredElements(N,C.nondrag,l,D),s.debug&&s.drawDebugPoints(N,C.nondrag),n||p||(u[s.NODE]=!1)}if(!r&&(u[s.DRAG]||n||B[s.DRAG])){$=p&&!B[s.DRAG]&&1!==g;A(N=e||($?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:h.contexts[s.DRAG]),p&&!$?"motionBlur":void 0),P?s.drawCachedNodes(N,C.drag,l,D):s.drawCachedElements(N,C.drag,l,D),s.debug&&s.drawDebugPoints(N,C.drag),n||p||(u[s.DRAG]=!1)}if(s.showFps||!r&&u[s.SELECT_BOX]&&!n){if(A(N=e||h.contexts[s.SELECT_BOX]),1==s.selection[4]&&(s.hoverData.selecting||s.touchData.selecting)){b=s.cy.zoom();var F=x.core("selection-box-border-width").value/b;N.lineWidth=F,N.fillStyle="rgba("+x.core("selection-box-color").value[0]+","+x.core("selection-box-color").value[1]+","+x.core("selection-box-color").value[2]+","+x.core("selection-box-opacity").value+")",N.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),F>0&&(N.strokeStyle="rgba("+x.core("selection-box-border-color").value[0]+","+x.core("selection-box-border-color").value[1]+","+x.core("selection-box-border-color").value[2]+","+x.core("selection-box-opacity").value+")",N.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(h.bgActivePosistion&&!s.hoverData.selecting){b=s.cy.zoom();var z=h.bgActivePosistion;N.fillStyle="rgba("+x.core("active-bg-color").value[0]+","+x.core("active-bg-color").value[1]+","+x.core("active-bg-color").value[2]+","+x.core("active-bg-opacity").value+")",N.beginPath(),N.arc(z.x,z.y,x.core("active-bg-size").pfValue/b,0,2*Math.PI),N.fill()}var U=s.lastRedrawTime;if(s.showFps&&U){U=Math.round(U);var G=Math.round(1e3/U);N.setTransform(1,0,0,1,0,0),N.fillStyle="rgba(255, 0, 0, 0.75)",N.strokeStyle="rgba(255, 0, 0, 0.75)",N.lineWidth=1,N.fillText("1 frame = "+U+" ms = "+G+" fps",0,20);N.strokeRect(0,30,250,20),N.fillRect(0,30,250*Math.min(G/60,1),20)}n||(u[s.SELECT_BOX]=!1)}if(p&&1!==g){var q=h.contexts[s.NODE],j=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],Y=h.contexts[s.DRAG],W=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],H=o((function(t,e,n){t.setTransform(1,0,0,1,0,0),n||!v?t.clearRect(0,0,s.canvasWidth,s.canvasHeight):S(t,0,0,s.canvasWidth,s.canvasHeight);var r=g;t.drawImage(e,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)}),"drawMotionBlur");(u[s.NODE]||B[s.NODE])&&(H(q,j,B[s.NODE]),u[s.NODE]=!1),(u[s.DRAG]||B[s.DRAG])&&(H(Y,W,B[s.DRAG]),u[s.DRAG]=!1)}s.prevViewport=_,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),p&&(s.motionBlurTimeout=setTimeout((function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!d,s.mbFrames=0,u[s.NODE]=!0,u[s.DRAG]=!0,s.redraw()}),100)),e||c.emit("render")};var jSt,YSt={drawPolygonPath:function(t,e,n,r,i,a){var s=r/2,o=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],n+o*a[1]);for(var l=1;l0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(t.full)d.translate(-n.x1*l,-n.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(n.x1*l,n.y1*l);else{var g=e.pan(),f={x:g.x*l,y:g.y*l};l*=e.zoom(),d.translate(f.x,f.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-f.x,-f.y)}t.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=t.bg,d.rect(0,0,i,a),d.fill())}return u},o(QSt,"b64ToBlob"),o(JSt,"b64UriToB64"),o(tAt,"output"),ZSt.png=function(t){return tAt(t,this.bufferCanvasImage(t),"image/png")},ZSt.jpg=function(t){return tAt(t,this.bufferCanvasImage(t),"image/jpeg")};var eAt={nodeShapeImpl:function(t,e,n,r,i,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,n,r,i,a);case"polygon":return this.drawPolygonPath(e,n,r,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,n,r,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,n,r,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,n,r,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,n,r,i,a,o);case"barrel":return this.drawBarrelPath(e,n,r,i,a)}}},nAt=iAt,rAt=iAt.prototype;function iAt(t){var e=this,n=e.cy.window().document;e.data={canvases:new Array(rAt.CANVAS_LAYERS),contexts:new Array(rAt.CANVAS_LAYERS),canvasNeedsRedraw:new Array(rAt.CANVAS_LAYERS),bufferCanvases:new Array(rAt.BUFFER_COUNT),bufferContexts:new Array(rAt.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var a=e.data.canvasContainer.style;e.data.canvasContainer.style[r]=i,a.position="relative",a.zIndex="0",a.overflow="hidden";var s=t.cy.container();s.appendChild(e.data.canvasContainer),s.style[r]=i;var l={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};oft()&&(l["-ms-touch-action"]="none",l["touch-action"]="none");for(var c=0;ce&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var n=this.rect.y;n>s.WORLD_BOUNDARY?n=s.WORLD_BOUNDARY:n<-s.WORLD_BOUNDARY&&(n=-s.WORLD_BOUNDARY);var r=new c(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=h},function(t,e,n){function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}o(r,"PointD"),r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){var r=n(2),i=n(10),a=n(0),s=n(6),l=n(3),c=n(1),h=n(13),u=n(12),d=n(11);function p(t,e,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var g in o(p,"LGraph"),p.prototype=Object.create(r.prototype),r)p[g]=r[g];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},p.prototype.remove=function(t){var e=t;if(t instanceof l){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),r=n.length,i=0;i-1&&h>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(o,1),a.target!=a.source&&a.target.edges.splice(h,1),-1==(s=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(s,1)}},p.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,a=i.MAX_VALUE,s=this.getNodes(),o=s.length,l=0;l(t=c.getTop())&&(r=t),a>(e=c.getLeft())&&(a=e)}return r==i.MAX_VALUE?null:(n=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new u(this.left,this.top))},p.prototype.updateBounds=function(t){for(var e,n,r,a,s,o=i.MAX_VALUE,l=-i.MAX_VALUE,c=i.MAX_VALUE,u=-i.MAX_VALUE,d=this.nodes,p=d.length,g=0;g(e=f.getLeft())&&(o=e),l<(n=f.getRight())&&(l=n),c>(r=f.getTop())&&(c=r),u<(a=f.getBottom())&&(u=a)}var m=new h(o,c,l-o,u-c);o==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=m.x-s,this.right=m.x+m.width+s,this.top=m.y-s,this.bottom=m.y+m.height+s},p.calculateBounds=function(t){for(var e,n,r,a,s=i.MAX_VALUE,o=-i.MAX_VALUE,l=i.MAX_VALUE,c=-i.MAX_VALUE,u=t.length,d=0;d(e=p.getLeft())&&(s=e),o<(n=p.getRight())&&(o=n),l>(r=p.getTop())&&(l=r),c<(a=p.getBottom())&&(c=a)}return new h(s,l,o-s,c-l)},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},p.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r=this.nodes.length){var l=0;i.forEach((function(e){e.owner==t&&l++})),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=p},function(t,e,n){var r,i=n(1);function a(t){r=n(5),this.layout=t,this.graphs=[],this.edges=[]}o(a,"LGraphManager"),a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var a=(r=e).getOwner(),s=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==s)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],s=(a=a.concat(e.getEdges())).length,o=0;o=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var a=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(a=1);var s=a*n[0],o=n[1]/a;n[0]s)return n[0]=r,n[1]=l,n[2]=a,n[3]=x,!1;if(ia)return n[0]=o,n[1]=i,n[2]=y,n[3]=s,!1;if(ra?(n[0]=h,n[1]=u,T=!0):(n[0]=c,n[1]=l,T=!0):E===S&&(r>a?(n[0]=o,n[1]=l,T=!0):(n[0]=d,n[1]=u,T=!0)),-C===S?a>r?(n[2]=v,n[3]=x,_=!0):(n[2]=y,n[3]=m,_=!0):C===S&&(a>r?(n[2]=f,n[3]=m,_=!0):(n[2]=b,n[3]=x,_=!0)),T&&_)return!1;if(r>a?i>s?(A=this.getCardinalDirection(E,S,4),L=this.getCardinalDirection(C,S,2)):(A=this.getCardinalDirection(-E,S,3),L=this.getCardinalDirection(-C,S,1)):i>s?(A=this.getCardinalDirection(-E,S,1),L=this.getCardinalDirection(-C,S,3)):(A=this.getCardinalDirection(E,S,2),L=this.getCardinalDirection(C,S,4)),!T)switch(A){case 1:I=l,N=r+-g/S,n[0]=N,n[1]=I;break;case 2:N=d,I=i+p*S,n[0]=N,n[1]=I;break;case 3:I=u,N=r+g/S,n[0]=N,n[1]=I;break;case 4:N=h,I=i+-p*S,n[0]=N,n[1]=I}if(!_)switch(L){case 1:R=m,M=a+-k/S,n[2]=M,n[3]=R;break;case 2:M=b,R=s+w*S,n[2]=M,n[3]=R;break;case 3:R=x,M=a+k/S,n[2]=M,n[3]=R;break;case 4:M=v,R=s+-w*S,n[2]=M,n[3]=R}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var a,s,o,l,c,h,u,d=t.x,p=t.y,g=e.x,f=e.y,m=n.x,y=n.y,v=i.x,x=i.y;return 0===(u=(a=f-p)*(l=m-v)-(s=x-y)*(o=d-g))?null:new r((o*(h=v*y-m*x)-l*(c=g*p-d*f))/u,(s*c-a*h)/u)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){function r(){}o(r,"Integer"),r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){var r=function(){function t(t,e){for(var n=0;n0&&e;){for(o.push(c[0]);o.length>0&&e;){var h=o[0];o.splice(0,1),s.add(h);var u=h.getEdges();for(a=0;a-1&&c.splice(f,1)}s=new Set,l=new Map}else t=[]}return t},p.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&e.splice(u,1),h.getNeighborsList().forEach((function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&l.push(t),r.set(t,e)}}))}n=n.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},p.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=p},function(t,e,n){function r(){}o(r,"RandomSeed"),r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,n){var r=n(4);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);ea.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),i=new Set,t=0;t(l=e.getEstimatedSize()*this.gravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*a):(s>(l=e.getEstimatedSize()*this.compoundGravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=l.length||h>=l[0].length))for(var u=0;ut}),"_defaultCompareFunction")}]),t}();t.exports=s},function(t,e,n){var r=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;i(this,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=s,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var o=0;o=0;n--){var r=this.listeners[n];r.event===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;nt.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(t,e){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n1)for(o=0;or&&(r=Math.floor(s.y)),a=Math.floor(s.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},x.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(e,null,0,359,0,r);var i=y.calculateBounds(t),a=new v;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var s=0;s1;){var y=f[0];f.splice(0,1);var v=h.indexOf(y);v>=0&&h.splice(v,1),g--,u--}d=null!=e?(h.indexOf(f[0])+1)%g:0;for(var b=Math.abs(r-n)/u,w=d;p!=u;w=++w%g){var k=h[w].getOtherEnd(t);if(k!=e){var T=(n+p*b)%360,_=(T+b)%360;x.branchRadialLayout(k,t,T,_,i+a,a),p++}}},x.maxDiagonalInTree=function(t){for(var e=f.MIN_VALUE,n=0;ne&&(e=r)}return e},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),a=new s(t.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=a;var o=t.getGraphManager().add(t.newGraph(),a),l=i.getChild();l.add(a);for(var c=0;c=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i)}},x.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,a)}))},x.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var n=t.getChild();if(null==n)return this.toBeTiled[e]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[e]=!0,!0},x.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;rl&&(l=h.rect.height)}n+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(r){var i=e[r];n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},x.prototype.tileNodes=function(t,e){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};t.sort((function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(a+=t.horizontalPadding),t.rowWidth[n]=a,t.width0&&(s+=t.verticalPadding);var o=0;s>t.rowHeight[n]&&(o=t.rowHeight[n],t.rowHeight[n]=s,o=t.rowHeight[n]-o),t.height+=o,t.rows[n].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;rn&&(e=r,n=t.rowWidth[r]);return e},x.prototype.canAddHorizontal=function(t,e,n){var r=this.getShortestRowIndex(t);if(r<0)return!0;var i=t.rowWidth[r];if(i+t.horizontalPadding+e<=t.width)return!0;var a,s,o=0;return t.rowHeight[r]0&&(o=n+t.verticalPadding-t.rowHeight[r]),a=t.width-i>=e+t.horizontalPadding?(t.height+o)/(i+e+t.horizontalPadding):(t.height+o)/t.width,o=n+t.verticalPadding,(s=t.widtha&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[n]=t.rowWidth[n]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=r[o].height);e>0&&(s+=t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[n];t.rowHeight[e]=s,t.rowHeight[n]0)for(var c=i;c<=a;c++)l[0]+=this.grid[c][s-1].length+this.grid[c][s].length-1;if(a0)for(c=s;c<=o;c++)l[3]+=this.grid[i-1][c].length+this.grid[i][c].length-1;for(var u,d,p=f.MAX_VALUE,g=0;g0)s=n.getGraphManager().add(n.newGraph(),a),this.processChildrenList(s,u,n)}},p.prototype.stop=function(){return this.stopped=!0,this};var f=o((function(t){t("layout","cose-bilkent",p)}),"register");"undefined"!=typeof cytoscape&&f(cytoscape),t.exports=f}])}))}}),bAt=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],s=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],v={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",a[o].id),r.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:r.getLogger().trace("Icon: ",a[o]),r.decorateNode({icon:a[o]});break;case 17:case 21:r.decorateNode({class:a[o]});break;case 18:r.getLogger().trace("SPACELIST");break;case 19:r.getLogger().trace("Node: ",a[o].id),r.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:r.decorateNode({icon:a[o]});break;case 25:r.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:r.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:r.getType(a[o-2],a[o])}}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:s,22:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:s,22:l},{6:n,9:22,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:s,22:l},{6:h,7:u,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:s,22:l},t(g,[2,14],{7:f,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(g,[2,13],{7:f,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},x=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}}),"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return t}();function b(){this.yy={}}return v.lexer=x,o(b,"Parser"),b.prototype=v,v.Parser=b,new b}();bAt.parser=bAt;var wAt=bAt,kAt=[],TAt=0,_At={},EAt=o((()=>{kAt=[],TAt=0,_At={}}),"clear"),CAt=o((function(t){for(let e=kAt.length-1;e>=0;e--)if(kAt[e].levelkAt.length>0?kAt[0]:null),"getMindmap"),AAt=o(((t,e,n,r)=>{y.info("addNode",t,e,n,r);const i=Kn();let a=i.mindmap?.padding??Lt.mindmap.padding;switch(r){case LAt.ROUNDED_RECT:case LAt.RECT:case LAt.HEXAGON:a*=2}const s={id:TAt++,nodeId:ln(e,i),level:t,descr:ln(n,i),type:r,children:[],width:i.mindmap?.maxNodeWidth??Lt.mindmap.maxNodeWidth,padding:a},o=CAt(t);if(o)o.children.push(s),kAt.push(s);else{if(0!==kAt.length)throw new Error('There can be only one root. No parent could be found for ("'+s.descr+'")');kAt.push(s)}}),"addNode"),LAt={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},NAt=o(((t,e)=>{switch(y.debug("In get type",t,e),t){case"[":return LAt.RECT;case"(":return")"===e?LAt.ROUNDED_RECT:LAt.CLOUD;case"((":return LAt.CIRCLE;case")":return LAt.CLOUD;case"))":return LAt.BANG;case"{{":return LAt.HEXAGON;default:return LAt.DEFAULT}}),"getType"),IAt=o(((t,e)=>{_At[t]=e}),"setElementForId"),MAt=o((t=>{if(!t)return;const e=Kn(),n=kAt[kAt.length-1];t.icon&&(n.icon=ln(t.icon,e)),t.class&&(n.class=ln(t.class,e))}),"decorateNode"),RAt=o((t=>{switch(t){case LAt.DEFAULT:return"no-border";case LAt.RECT:return"rect";case LAt.ROUNDED_RECT:return"rounded-rect";case LAt.CIRCLE:return"circle";case LAt.CLOUD:return"cloud";case LAt.BANG:return"bang";case LAt.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),DAt=o((()=>y),"getLogger"),OAt=o((t=>_At[t]),"getElementById"),PAt={clear:EAt,addNode:AAt,getMindmap:SAt,nodeType:LAt,getType:NAt,setElementForId:IAt,decorateNode:MAt,type2Str:RAt,getLogger:DAt,getElementById:OAt},BAt=p(xAt(),1),$At=o((function(t,e,n,r){e.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("d",`M0 ${n.height-5} v${10-n.height} q0,-5 5,-5 h${n.width-10} q5,0 5,5 v${n.height-5} H0 Z`),e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",n.height).attr("x2",n.width).attr("y2",n.height)}),"defaultBkg"),FAt=o((function(t,e,n){e.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("height",n.height).attr("width",n.width)}),"rectBkg"),zAt=o((function(t,e,n){const r=n.width,i=n.height,a=.15*r,s=.25*r,o=.35*r,l=.2*r;e.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*r},${-1*r*.1}\n a${o},${o} 1 0,1 ${.4*r},${-1*r*.1}\n a${s},${s} 1 0,1 ${.35*r},${1*r*.2}\n\n a${a},${a} 1 0,1 ${.15*r},${1*i*.35}\n a${l},${l} 1 0,1 ${-1*r*.15},${1*i*.65}\n\n a${s},${a} 1 0,1 ${-1*r*.25},${.15*r}\n a${o},${o} 1 0,1 ${-1*r*.5},0\n a${a},${a} 1 0,1 ${-1*r*.25},${-1*r*.15}\n\n a${a},${a} 1 0,1 ${-1*r*.1},${-1*i*.35}\n a${l},${l} 1 0,1 ${.1*r},${-1*i*.65}\n\n H0 V0 Z`)}),"cloudBkg"),UAt=o((function(t,e,n){const r=n.width,i=n.height,a=.15*r;e.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*r},${-1*i*.1}\n a${a},${a} 1 0,0 ${.25*r},0\n a${a},${a} 1 0,0 ${.25*r},0\n a${a},${a} 1 0,0 ${.25*r},${1*i*.1}\n\n a${a},${a} 1 0,0 ${.15*r},${1*i*.33}\n a${.8*a},${.8*a} 1 0,0 0,${1*i*.34}\n a${a},${a} 1 0,0 ${-1*r*.15},${1*i*.33}\n\n a${a},${a} 1 0,0 ${-1*r*.25},${.15*i}\n a${a},${a} 1 0,0 ${-1*r*.25},0\n a${a},${a} 1 0,0 ${-1*r*.25},0\n a${a},${a} 1 0,0 ${-1*r*.25},${-1*i*.15}\n\n a${a},${a} 1 0,0 ${-1*r*.1},${-1*i*.33}\n a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34}\n a${a},${a} 1 0,0 ${.1*r},${-1*i*.33}\n\n H0 V0 Z`)}),"bangBkg"),GAt=o((function(t,e,n){e.append("circle").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("r",n.width/2)}),"circleBkg");function qAt(t,e,n,r,i){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+(i.width-e)/2+", "+n+")")}o(qAt,"insertPolygonShape");var jAt=o((function(t,e,n){const r=n.height,i=r/4,a=n.width-n.padding+2*i;qAt(e,a,r,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],n)}),"hexagonBkg"),YAt=o((function(t,e,n){e.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("height",n.height).attr("rx",n.padding).attr("ry",n.padding).attr("width",n.width)}),"roundedRectBkg"),WAt=o((async function(t,e,n,r,i){const a=i.htmlLabels,s=r%11,o=e.append("g");n.section=s;let l="section-"+s;s<0&&(l+=" section-root"),o.attr("class",(n.class?n.class+" ":"")+"mindmap-node "+l);const c=o.append("g"),h=o.append("g"),u=n.descr.replace(/()/g,"\n");await g_(h,u,{useHtmlLabels:a,width:n.width,classes:"mindmap-node-label"},i),a||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const d=h.node().getBBox(),[p]=Mk(i.fontSize);if(n.height=d.height+1.1*p*.5+n.padding,n.width=d.width+2*n.padding,n.icon)if(n.type===t.nodeType.CIRCLE){n.height+=50,n.width+=50;o.append("foreignObject").attr("height","50px").attr("width",n.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+n.icon),h.attr("transform","translate("+n.width/2+", "+(n.height/2-1.5*n.padding)+")")}else{n.width+=50;const t=n.height;n.height=Math.max(t,60);const e=Math.abs(n.height-t);o.append("foreignObject").attr("width","60px").attr("height",n.height).attr("style","text-align: center;margin-top:"+e/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+n.icon),h.attr("transform","translate("+(25+n.width/2)+", "+(e/2+n.padding/2)+")")}else if(a){const t=(n.width-d.width)/2,e=(n.height-d.height)/2;h.attr("transform","translate("+t+", "+e+")")}else{const t=n.width/2,e=n.padding/2;h.attr("transform","translate("+t+", "+e+")")}switch(n.type){case t.nodeType.DEFAULT:$At(t,c,n,s);break;case t.nodeType.ROUNDED_RECT:YAt(t,c,n,s);break;case t.nodeType.RECT:FAt(t,c,n,s);break;case t.nodeType.CIRCLE:c.attr("transform","translate("+n.width/2+", "+ +n.height/2+")"),GAt(t,c,n,s);break;case t.nodeType.CLOUD:zAt(t,c,n,s);break;case t.nodeType.BANG:UAt(t,c,n,s);break;case t.nodeType.HEXAGON:jAt(t,c,n,s)}return t.setElementForId(n.id,o),n.height}),"drawNode"),HAt=o((function(t,e){const n=t.getElementById(e.id),r=e.x||0,i=e.y||0;n.attr("transform","translate("+r+","+i+")")}),"positionNode");async function VAt(t,e,n,r,i){await WAt(t,e,n,r,i),n.children&&await Promise.all(n.children.map(((n,a)=>VAt(t,e,n,r<0?a:r,i))))}function XAt(t,e){e.edges().map(((e,n)=>{const r=e.data();if(e[0]._private.bodyBounds){const i=e[0]._private.rscratch;y.trace("Edge: ",n,r),t.insert("path").attr("d",`M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth)}}))}function KAt(t,e,n,r){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:r,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach((i=>{KAt(i,e,n,r+1),e.add({group:"edges",data:{id:`${t.id}_${i.id}`,source:t.id,target:i.id,depth:r,section:i.section}})}))}function ZAt(t,e){return new Promise((n=>{const r=Fa("body").append("div").attr("id","cy").attr("style","display:none"),i=mAt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),KAt(t,i,e,0),i.nodes().forEach((function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}})),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready((t=>{y.info("Ready",t),n(i)}))}))}function QAt(t,e){e.nodes().map(((e,n)=>{const r=e.data();r.x=e.position().x,r.y=e.position().y,HAt(t,r);const i=t.getElementById(r.nodeId);y.info("Id:",n,"Position: (",e.position().x,", ",e.position().y,")",r),i.attr("transform",`translate(${e.position().x-r.width/2}, ${e.position().y-r.height/2})`),i.attr("attr",`apa-${n})`)}))}mAt.use(BAt.default),o(VAt,"drawNodes"),o(XAt,"drawEdges"),o(KAt,"addNodes"),o(ZAt,"layoutMindmap"),o(QAt,"positionNodes");var JAt=o((async(t,e,n,r)=>{y.debug("Rendering mindmap diagram\n"+t);const i=r.db,a=i.getMindmap();if(!a)return;const s=Kn();s.htmlLabels=!1;const o=ng(e),l=o.append("g");l.attr("class","mindmap-edges");const c=o.append("g");c.attr("class","mindmap-nodes"),await VAt(i,c,a,-1,s);const h=await ZAt(a,s);XAt(l,h),QAt(i,h),In(void 0,o,s.mindmap?.padding??Lt.mindmap.padding,s.mindmap?.useMaxWidth??Lt.mindmap.useMaxWidth)}),"draw"),tLt={draw:JAt},eLt=o((t=>{let e="";for(let e=0;e`\n .edge {\n stroke-width: 3;\n }\n ${eLt(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")},rLt=Object.freeze({__proto__:null,diagram:nLt}),iLt=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],s=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,31],f=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],b=[1,38],w={trace:o((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:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",a[o-1].id),r.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:r.getLogger().info("Node: ",a[o].id),r.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:r.getLogger().trace("Icon: ",a[o]),r.decorateNode({icon:a[o]});break;case 18:case 23:r.decorateNode({class:a[o]});break;case 19:r.getLogger().trace("SPACELIST");break;case 20:r.getLogger().trace("Node: ",a[o-1].id),r.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:r.getLogger().trace("Node: ",a[o].id),r.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:r.decorateNode({icon:a[o]});break;case 27:r.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:r.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:r.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:r.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:s,23:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:s,23:l},{6:n,9:22,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:s,23:l},{6:h,7:u,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:l}),t(p,[2,19]),t(p,[2,21],{15:30,24:g}),t(p,[2,22]),t(p,[2,23]),t(f,[2,25]),t(f,[2,26]),t(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:s,23:l},t(m,[2,14],{7:y,11:v}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(f,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(x,[2,11]),t(x,[2,12]),t(p,[2,15],{24:b}),t(f,[2,30]),{22:[1,41]},t(f,[2,27]),t(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},k=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"
    "),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}}),"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return t}();function T(){this.yy={}}return w.lexer=k,o(T,"Parser"),T.prototype=w,w.Parser=T,new T}();iLt.parser=iLt;var aLt=iLt,sLt=[],oLt=[],lLt=0,cLt={},hLt=o((()=>{sLt=[],oLt=[],lLt=0,cLt={}}),"clear"),uLt=o((t=>{if(0===sLt.length)return null;const e=sLt[0].level;let n=null;for(let t=sLt.length-1;t>=0;t--)if(sLt[t].level!==e||n||(n=sLt[t]),sLt[t].levelt.parentId===r.id));for(const e of i){const i={id:e.id,parentId:r.id,label:ln(e.label??"",n),isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(i)}}return{nodes:t,edges:[],other:{},config:Kn()}}),"getData"),gLt=o(((t,e,n,r,i)=>{const a=Kn();let s=a.mindmap?.padding??Lt.mindmap.padding;switch(r){case fLt.ROUNDED_RECT:case fLt.RECT:case fLt.HEXAGON:s*=2}const o={id:ln(e,a)||"kbn"+lLt++,level:t,label:ln(n,a),width:a.mindmap?.maxNodeWidth??Lt.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}";const e=iy(t,{schema:ry});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(o.shape=e?.shape),e?.label&&(o.label=e?.label),e?.icon&&(o.icon=e?.icon.toString()),e?.assigned&&(o.assigned=e?.assigned.toString()),e?.ticket&&(o.ticket=e?.ticket.toString()),e?.priority&&(o.priority=e?.priority)}const l=uLt(t);l?o.parentId=l.id||"kbn"+lLt++:oLt.push(o),sLt.push(o)}),"addNode"),fLt={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},mLt=o(((t,e)=>{switch(y.debug("In get type",t,e),t){case"[":return fLt.RECT;case"(":return")"===e?fLt.ROUNDED_RECT:fLt.CLOUD;case"((":return fLt.CIRCLE;case")":return fLt.CLOUD;case"))":return fLt.BANG;case"{{":return fLt.HEXAGON;default:return fLt.DEFAULT}}),"getType"),yLt=o(((t,e)=>{cLt[t]=e}),"setElementForId"),vLt=o((t=>{if(!t)return;const e=Kn(),n=sLt[sLt.length-1];t.icon&&(n.icon=ln(t.icon,e)),t.class&&(n.cssClasses=ln(t.class,e))}),"decorateNode"),xLt=o((t=>{switch(t){case fLt.DEFAULT:return"no-border";case fLt.RECT:return"rect";case fLt.ROUNDED_RECT:return"rounded-rect";case fLt.CIRCLE:return"circle";case fLt.CLOUD:return"cloud";case fLt.BANG:return"bang";case fLt.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),bLt=o((()=>y),"getLogger"),wLt=o((t=>cLt[t]),"getElementById"),kLt={clear:hLt,addNode:gLt,getSections:dLt,getData:pLt,nodeType:fLt,getType:mLt,setElementForId:yLt,decorateNode:vLt,type2Str:xLt,getLogger:bLt,getElementById:wLt},TLt=o((async(t,e,n,r)=>{y.debug("Rendering kanban diagram\n"+t);const i=r.db.getData(),a=Kn();a.htmlLabels=!1;const s=ng(e),o=s.append("g");o.attr("class","sections");const l=s.append("g");l.attr("class","items");const c=i.nodes.filter((t=>t.isGroup));let h=0;const u=[];let d=25;for(const t of c){const e=a?.kanban?.sectionWidth||200;h+=1,t.x=e*h+10*(h-1)/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+h;const n=await jE(o,t);d=Math.max(d,n?.labelBBox?.height),u.push(n)}let p=0;for(const t of c){const e=u[p];p+=1;const n=a?.kanban?.sectionWidth||200,r=3*-n/2+d;let s=r;const o=i.nodes.filter((e=>e.parentId===t.id));for(const e of o){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=n-15;const r=(await RS(l,e,{config:a})).node().getBBox();e.y=s+r.height/2,await PS(e),s=e.y+r.height/2+5}const c=e.cluster.select("rect"),h=Math.max(s-r+30,50)+(d-25);c.attr("height",h)}In(void 0,s,a.mindmap?.padding??Lt.kanban.padding,a.mindmap?.useMaxWidth??Lt.kanban.useMaxWidth)}),"draw"),_Lt={draw:TLt},ELt=o((t=>{let e="";for(let e=0;et.darkMode?ot(e,n):st(e,n)),"adjuster");for(let r=0;r`\n .edge {\n stroke-width: 3;\n }\n ${ELt(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")},SLt=Object.freeze({__proto__:null,diagram:CLt}),ALt=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,9],n=[1,10],r=[1,5,10,12],i={trace:o((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:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 7:const t=r.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),e=r.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),n=parseFloat(a[o].trim());r.addLink(t,e,n);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:n},{1:[2,6],7:11,10:[1,12]},t(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(r,[2,8]),t(r,[2,9]),{19:[1,16]},t(r,[2,11]),{1:[2,1]},{1:[2,5]},t(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:n},{15:18,16:7,17:8,18:e,20:n},{18:[1,19]},t(n,[2,3]),{12:[1,20]},t(r,[2,10]),{15:21,16:7,17:8,18:e,20:n},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},a=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:o((function(t,e,n,r){switch(n){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return t}();function s(){this.yy={}}return i.lexer=a,o(s,"Parser"),s.prototype=i,i.Parser=s,new s}();ALt.parser=ALt;var LLt=ALt,NLt=[],ILt=[],MLt=new Map,RLt=o((()=>{NLt=[],ILt=[],MLt=new Map,Un()}),"clear"),DLt=class{constructor(t,e,n=0){this.source=t,this.target=e,this.value=n}static{o(this,"SankeyLink")}},OLt=o(((t,e,n)=>{NLt.push(new DLt(t,e,n))}),"addLink"),PLt=class{constructor(t){this.ID=t}static{o(this,"SankeyNode")}},BLt=o((t=>{t=Sn.sanitizeText(t,Kn());let e=MLt.get(t);return void 0===e&&(e=new PLt(t),MLt.set(t,e),ILt.push(e)),e}),"findOrCreateNode"),$Lt=o((()=>ILt),"getNodes"),FLt=o((()=>NLt),"getLinks"),zLt=o((()=>({nodes:ILt.map((t=>({id:t.ID}))),links:NLt.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),ULt={nodesMap:MLt,getConfig:o((()=>Kn().sankey),"getConfig"),getNodes:$Lt,getLinks:FLt,getGraph:zLt,addLink:OLt,findOrCreateNode:BLt,getAccTitle:qn,setAccTitle:Gn,getAccDescription:Yn,setAccDescription:jn,getDiagramTitle:Hn,setDiagramTitle:Wn,clear:RLt};function GLt(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function qLt(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function jLt(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function YLt(t){return t.target.depth}function WLt(t){return t.depth}function HLt(t,e){return e-1-t.height}function VLt(t,e){return t.sourceLinks.length?t.depth:e-1}function XLt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?qLt(t.sourceLinks,YLt)-1:0}function KLt(t){return function(){return t}}function ZLt(t,e){return JLt(t.source,e.source)||t.index-e.index}function QLt(t,e){return JLt(t.target,e.target)||t.index-e.index}function JLt(t,e){return t.y0-e.y0}function tNt(t){return t.value}function eNt(t){return t.index}function nNt(t){return t.nodes}function rNt(t){return t.links}function iNt(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function aNt({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function sNt(){let t,e,n,r=0,i=0,a=1,s=1,l=24,c=8,h=eNt,u=VLt,d=nNt,p=rNt,g=6;function f(){const t={nodes:d.apply(null,arguments),links:p.apply(null,arguments)};return m(t),y(t),v(t),x(t),k(t),aNt(t),t}function m({nodes:t,links:e}){for(const[e,n]of t.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];const r=new Map(t.map(((e,n)=>[h(e,n,t),e])));for(const[t,n]of e.entries()){n.index=t;let{source:e,target:i}=n;"object"!=typeof e&&(e=n.source=iNt(r,e)),"object"!=typeof i&&(i=n.target=iNt(r,i)),e.sourceLinks.push(n),i.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}function y({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(jLt(e.sourceLinks,tNt),jLt(e.targetLinks,tNt)):e.fixedValue}function v({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.depth=i;for(const{target:e}of t.sourceLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function x({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.height=i;for(const{source:e}of t.targetLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function b({nodes:t}){const n=GLt(t,(t=>t.depth))+1,i=(a-r-l)/(n-1),s=new Array(n);for(const e of t){const t=Math.max(0,Math.min(n-1,Math.floor(u.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+l,s[t]?s[t].push(e):s[t]=[e]}if(e)for(const t of s)t.sort(e);return s}function w(e){const n=qLt(e,(e=>(s-i-(e.length-1)*t)/jLt(e,tNt)));for(const r of e){let e=i;for(const i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*n}e=(s-e+t)/(r.length+1);for(let t=0;tt.length))-1)),w(n);for(let t=0;t0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,A(t)}void 0===e&&a.sort(JLt),E(a,r)}}function _(t,n,r){for(let i=t.length-2;i>=0;--i){const a=t[i];for(const t of a){let e=0,r=0;for(const{target:n,value:i}of t.sourceLinks){let a=i*(n.layer-t.layer);e+=I(t,n)*a,r+=a}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,A(t)}void 0===e&&a.sort(JLt),E(a,r)}}function E(e,n){const r=e.length>>1,a=e[r];S(e,a.y0-t,r-1,n),C(e,a.y1+t,r+1,n),S(e,s,e.length-1,n),C(e,i,0,n)}function C(e,n,r,i){for(;r1e-6&&(a.y0+=s,a.y1+=s),n=a.y1+t}}function S(e,n,r,i){for(;r>=0;--r){const a=e[r],s=(a.y1-n)*i;s>1e-6&&(a.y0-=s,a.y1-=s),n=a.y0-t}}function A({sourceLinks:t,targetLinks:e}){if(void 0===n){for(const{source:{sourceLinks:t}}of e)t.sort(QLt);for(const{target:{targetLinks:e}}of t)e.sort(ZLt)}}function L(t){if(void 0===n)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(QLt),n.sort(ZLt)}function N(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:a}of e.sourceLinks){if(i===n)break;r+=a+t}for(const{source:t,width:i}of n.targetLinks){if(t===e)break;r-=i}return r}function I(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:i,width:a}of n.targetLinks){if(i===e)break;r+=a+t}for(const{target:t,width:i}of e.sourceLinks){if(t===n)break;r-=i}return r}return o(f,"sankey"),f.update=function(t){return aNt(t),t},f.nodeId=function(t){return arguments.length?(h="function"==typeof t?t:KLt(t),f):h},f.nodeAlign=function(t){return arguments.length?(u="function"==typeof t?t:KLt(t),f):u},f.nodeSort=function(t){return arguments.length?(e=t,f):e},f.nodeWidth=function(t){return arguments.length?(l=+t,f):l},f.nodePadding=function(e){return arguments.length?(c=t=+e,f):c},f.nodes=function(t){return arguments.length?(d="function"==typeof t?t:KLt(t),f):d},f.links=function(t){return arguments.length?(p="function"==typeof t?t:KLt(t),f):p},f.linkSort=function(t){return arguments.length?(n=t,f):n},f.size=function(t){return arguments.length?(r=i=0,a=+t[0],s=+t[1],f):[a-r,s-i]},f.extent=function(t){return arguments.length?(r=+t[0][0],a=+t[1][0],i=+t[0][1],s=+t[1][1],f):[[r,i],[a,s]]},f.iterations=function(t){return arguments.length?(g=+t,f):g},o(m,"computeNodeLinks"),o(y,"computeNodeValues"),o(v,"computeNodeDepths"),o(x,"computeNodeHeights"),o(b,"computeNodeLayers"),o(w,"initializeNodeBreadths"),o(k,"computeNodeBreadths"),o(T,"relaxLeftToRight"),o(_,"relaxRightToLeft"),o(E,"resolveCollisions"),o(C,"resolveCollisionsTopToBottom"),o(S,"resolveCollisionsBottomToTop"),o(A,"reorderNodeLinks"),o(L,"reorderLinks"),o(N,"targetTop"),o(I,"sourceTop"),f}o(GLt,"max"),o(qLt,"min"),o(jLt,"sum"),o(YLt,"targetDepth"),o(WLt,"left"),o(HLt,"right"),o(VLt,"justify"),o(XLt,"center"),o(KLt,"constant"),o(ZLt,"ascendingSourceBreadth"),o(QLt,"ascendingTargetBreadth"),o(JLt,"ascendingBreadth"),o(tNt,"value"),o(eNt,"defaultId"),o(nNt,"defaultNodes"),o(rNt,"defaultLinks"),o(iNt,"find"),o(aNt,"computeLinkBreadths"),o(sNt,"Sankey");var oNt=Math.PI,lNt=2*oNt,cNt=1e-6,hNt=lNt-cNt;function uNt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dNt(){return new uNt}o(uNt,"Path"),o(dNt,"path"),uNt.prototype=dNt.prototype={constructor:uNt,moveTo:o((function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)}),"moveTo"),closePath:o((function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}),"closePath"),lineTo:o((function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)}),"lineTo"),quadraticCurveTo:o((function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)}),"quadraticCurveTo"),bezierCurveTo:o((function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)}),"bezierCurveTo"),arcTo:o((function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,s=this._y1,o=n-t,l=r-e,c=a-t,h=s-e,u=c*c+h*h;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(u>cNt)if(Math.abs(h*o-l*c)>cNt&&i){var d=n-a,p=r-s,g=o*o+l*l,f=d*d+p*p,m=Math.sqrt(g),y=Math.sqrt(u),v=i*Math.tan((oNt-Math.acos((g+u-f)/(2*m*y)))/2),x=v/y,b=v/m;Math.abs(x-1)>cNt&&(this._+="L"+(t+x*c)+","+(e+x*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>c*p)+","+(this._x1=t+b*o)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;}),"arcTo"),arc:o((function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var s=(n=+n)*Math.cos(r),o=n*Math.sin(r),l=t+s,c=e+o,h=1^a,u=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>cNt||Math.abs(this._y1-c)>cNt)&&(this._+="L"+l+","+c),n&&(u<0&&(u=u%lNt+lNt),u>hNt?this._+="A"+n+","+n+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+n+","+n+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):u>cNt&&(this._+="A"+n+","+n+",0,"+ +(u>=oNt)+","+h+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))}),"arc"),rect:o((function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"}),"rect"),toString:o((function(){return this._}),"toString")};var pNt=dNt;function gNt(t){return o((function(){return t}),"constant")}function fNt(t){return t[0]}function mNt(t){return t[1]}o(gNt,"default"),o(fNt,"x"),o(mNt,"y");var yNt=Array.prototype.slice;function vNt(t){return t.source}function xNt(t){return t.target}function bNt(t){var e=vNt,n=xNt,r=fNt,i=mNt,a=null;function s(){var s,o=yNt.call(arguments),l=e.apply(this,o),c=n.apply(this,o);if(a||(a=s=pNt()),t(a,+r.apply(this,(o[0]=l,o)),+i.apply(this,o),+r.apply(this,(o[0]=c,o)),+i.apply(this,o)),s)return a=null,s+""||null}return o(s,"link"),s.source=function(t){return arguments.length?(e=t,s):e},s.target=function(t){return arguments.length?(n=t,s):n},s.x=function(t){return arguments.length?(r="function"==typeof t?t:gNt(+t),s):r},s.y=function(t){return arguments.length?(i="function"==typeof t?t:gNt(+t),s):i},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}function wNt(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function kNt(){return bNt(wNt)}function TNt(t){return[t.source.x1,t.y0]}function _Nt(t){return[t.target.x0,t.y1]}function ENt(){return kNt().source(TNt).target(_Nt)}o(vNt,"linkSource"),o(xNt,"linkTarget"),o(bNt,"link"),o(wNt,"curveHorizontal"),o(kNt,"linkHorizontal"),o(TNt,"horizontalSource"),o(_Nt,"horizontalTarget"),o(ENt,"default");var CNt=class t{static{o(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},SNt={left:WLt,right:HLt,center:XLt,justify:VLt},ANt=o((function(t,e,n,r){const{securityLevel:i,sankey:a}=Kn(),s=Qn.sankey;let l;"sandbox"===i&&(l=Fa("#i"+e));const c=Fa("sandbox"===i?l.nodes()[0].contentDocument.body:"body"),h="sandbox"===i?c.select(`[id="${e}"]`):Fa(`[id="${e}"]`),u=a?.width??s.width,d=a?.height??s.width,p=a?.useMaxWidth??s.useMaxWidth,g=a?.nodeAlignment??s.nodeAlignment,f=a?.prefix??s.prefix,m=a?.suffix??s.suffix,y=a?.showValues??s.showValues,v=r.db.getGraph(),x=SNt[g],b=sNt().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(y?15:0)).nodeAlign(x).extent([[0,0],[u,d]]);b(v);const w=_o(Ah);h.append("g").attr("class","nodes").selectAll(".node").data(v.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=CNt.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>w(t.id)));const k=o((({id:t,value:e})=>y?`${t}\n${f}${Math.round(100*e)/100}${m}`:t),"getText");h.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(v.nodes).join("text").attr("x",(t=>t.x0(t.y1+t.y0)/2)).attr("dy",(y?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0(t.uid=CNt.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>w(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>w(t.target.id)))}let E;switch(_){case"gradient":E=o((t=>t.uid),"coloring");break;case"source":E=o((t=>w(t.source.id)),"coloring");break;case"target":E=o((t=>w(t.target.id)),"coloring");break;default:E=_}T.append("path").attr("d",ENt()).attr("stroke",E).attr("stroke-width",(t=>Math.max(1,t.width))),In(void 0,h,0,p)}),"draw"),LNt={draw:ANt},NNt=o((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),INt=LLt.parse.bind(LLt);LLt.parse=t=>INt(NNt(t));var MNt={parser:LLt,db:ULt,renderer:LNt},RNt=Object.freeze({__proto__:null,diagram:MNt}),DNt={packet:[]},ONt=structuredClone(DNt),PNt=Lt.packet,BNt=o((()=>{const t=Rk({...PNt,...Gt().packet});return t.showBits&&(t.paddingY+=10),t}),"getConfig"),$Nt=o((()=>ONt.packet),"getPacket"),FNt={pushWord:o((t=>{t.length>0&&ONt.packet.push(t)}),"pushWord"),getPacket:$Nt,getConfig:BNt,clear:o((()=>{Un(),ONt=structuredClone(DNt)}),"clear"),setAccTitle:Gn,getAccTitle:qn,setDiagramTitle:Wn,getDiagramTitle:Hn,getAccDescription:Yn,setAccDescription:jn},zNt=o((t=>{ZK(t,FNt);let e=-1,n=[],r=1;const{bitsPerRow:i}=FNt.getConfig();for(let{start:a,end:s,label:o}of t.blocks){if(s&&s{if(void 0===t.end&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*n?[t,void 0]:[{start:t.start,end:e*n-1,label:t.label},{start:e*n,end:t.end,label:t.label}]}),"getNextFittingBlock"),GNt={parse:o((async t=>{const e=await cnt("packet",t);y.debug(e),zNt(e)}),"parse")},qNt=o(((t,e,n,r)=>{const i=r.db,a=i.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:c}=a,h=i.getPacket(),u=i.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(u?0:s),g=l*c+2,f=ng(e);f.attr("viewbox",`0 0 ${g} ${p}`),Nn(f,p,g,a.useMaxWidth);for(const[t,e]of h.entries())jNt(f,e,t,a);f.append("text").text(u).attr("x",g/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")}),"draw"),jNt=o(((t,e,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{const c=t.append("g"),h=n*(r+a)+a;for(const t of e){const e=t.start%o*s+1,n=(t.end-t.start+1)*s-i;if(c.append("rect").attr("x",e).attr("y",h).attr("width",n).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",e+n/2).attr("y",h+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(t.label),!l)continue;const a=t.end===t.start,u=h-2;c.append("text").attr("x",e+(a?n/2:0)).attr("y",u).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",a?"middle":"start").text(t.start),a||c.append("text").attr("x",e+n).attr("y",u).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(t.end)}}),"drawWord"),YNt={draw:qNt},WNt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},HNt=o((({packet:t}={})=>{const e=Rk(WNt,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`}),"styles"),VNt={parser:GNt,db:FNt,renderer:YNt,styles:HNt},XNt=Object.freeze({__proto__:null,diagram:VNt}),KNt=function(){var t=o((function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n}),"o"),e=[1,7],n=[1,13],r=[1,14],i=[1,15],a=[1,19],s=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],y={trace:o((function(){}),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:o((function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 4:r.getLogger().debug("Rule: separator (NL) ");break;case 5:r.getLogger().debug("Rule: separator (Space) ");break;case 6:r.getLogger().debug("Rule: separator (EOF) ");break;case 7:r.getLogger().debug("Rule: hierarchy: ",a[o-1]),r.setHierarchy(a[o-1]);break;case 8:r.getLogger().debug("Stop NL ");break;case 9:r.getLogger().debug("Stop EOF ");break;case 10:r.getLogger().debug("Stop NL2 ");break;case 11:r.getLogger().debug("Stop EOF2 ");break;case 12:r.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:r.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:r.getLogger().debug("Rule: link: ",a[o],t),this.$={edgeTypeStr:a[o],label:""};break;case 15:r.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:const e=parseInt(a[o]),n=r.generateId();this.$={id:n,type:"space",label:"",width:e,children:[]};break;case 23:r.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr);const i=r.edgeStrToEdgeData(a[o-1].edgeTypeStr);this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:i,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:r.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:r.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:r.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:r.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:r.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:r.getLogger().debug("APA123",this?this:"na"),r.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:r.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),r.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:r.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]);const s=r.generateId();this.$={id:s,type:"composite",label:"",children:a[o-1]};break;case 29:r.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:r.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:r.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:r.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}}),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:n,29:r,31:i,32:a,40:s,44:l,47:c},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:n,29:r,31:i,32:a,40:s,44:l,47:c}),t(u,[2,16],{14:22,15:d,16:p}),t(u,[2,17]),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,22]),t(g,[2,25],{27:[1,25]}),t(u,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:n,29:r,31:i,32:a,40:s,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},t(g,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:n,29:r,31:i,32:a,40:s,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(f,[2,30]),{18:[1,43]},{18:[1,44]},t(g,[2,23]),{18:[1,45]},{30:[1,46]},t(u,[2,28]),t(u,[2,35]),t(u,[2,36]),t(u,[2,37]),t(u,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},t(u,[2,27]),t(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},t(f,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:o((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:o((function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=2,d=1,p=a.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;a.push(y);var v=g.options&&g.options.ranges;function x(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t}function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||d)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(x,"popStack"),o(b,"lex");for(var w,k,T,_,E,C,S,A,L={};;){if(k=n[n.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==w&&(w=b()),T=s[k]&&s[k][w]),void 0===T||!T.length||!T[0]){var N="";for(E in A=[],s[k])this.terminals_[E]&&E>u&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(c+1)+": Unexpected "+(w==d?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[w]||w,line:g.yylineno,loc:y,expected:A})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(T[0]){case 1:n.push(w),i.push(g.yytext),a.push(g.yylloc),n.push(T[1]),w=null,h=g.yyleng,l=g.yytext,c=g.yylineno,y=g.yylloc;break;case 2:if(C=this.productions_[T[1]][1],L.$=i[i.length-C],L._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},v&&(L._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(L,[l,h,c,f.yy,T[1],i,a].concat(p))))return _;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[T[1]][0]),i.push(L.$),a.push(L._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},v=function(){var t={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:o((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((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:o((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:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:o((function(){var t=this.next();return t||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((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:o((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:o((function(t,e,n,r){switch(n){case 0:return 10;case 1:return t.getLogger().debug("Found space-block"),31;case 2:return t.getLogger().debug("Found nl-block"),31;case 3:return t.getLogger().debug("Found space-block"),29;case 4:t.getLogger().debug(".",e.yytext);break;case 5:t.getLogger().debug("_",e.yytext);break;case 6:return 5;case 7:return e.yytext=-1,28;case 8:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 14:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 15:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 16:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 79:return"NODE_DESCR";case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}}),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return t}();function x(){this.yy={}}return y.lexer=v,o(x,"Parser"),x.prototype=y,y.Parser=x,new x}();KNt.parser=KNt;var ZNt=KNt,QNt=new Map,JNt=[],tIt=new Map,eIt="color",nIt="fill",rIt=Kn(),iIt=new Map,aIt=o((t=>Sn.sanitizeText(t,rIt)),"sanitizeText"),sIt=o((function(t,e=""){let n=iIt.get(t);n||(n={id:t,styles:[],textStyles:[]},iIt.set(t,n)),null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(eIt).exec(t)){const t=e.replace(nIt,"bgFill").replace(eIt,nIt);n.textStyles.push(t)}n.styles.push(e)}))}),"addStyleClass"),oIt=o((function(t,e=""){const n=QNt.get(t);null!=e&&(n.styles=e.split(","))}),"addStyle2Node"),lIt=o((function(t,e){t.split(",").forEach((function(t){let n=QNt.get(t);if(void 0===n){const e=t.trim();n={id:e,type:"na",children:[]},QNt.set(e,n)}n.classes||(n.classes=[]),n.classes.push(e)}))}),"setCssClass"),cIt=o(((t,e)=>{const n=t.flat(),r=[];for(const t of n)if(t.label&&(t.label=aIt(t.label)),"classDef"!==t.type)if("applyClass"!==t.type)if("applyStyles"!==t.type)if("column-setting"===t.type)e.columns=t.columns??-1;else if("edge"===t.type){const e=(tIt.get(t.id)??0)+1;tIt.set(t.id,e),t.id=e+"-"+t.id,JNt.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);const e=QNt.get(t.id);if(void 0===e?QNt.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&cIt(t.children,t),"space"===t.type){const e=t.width??1;for(let n=0;n{y.debug("Clear called"),Un(),uIt={id:"root",type:"composite",children:[],columns:-1},QNt=new Map([["root",uIt]]),hIt=[],iIt=new Map,JNt=[],tIt=new Map}),"clear");function pIt(t){switch(y.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return y.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 gIt(t){return y.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function fIt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}o(pIt,"typeStr2Type"),o(gIt,"edgeTypeStr2Type"),o(fIt,"edgeStrToEdgeData");var mIt=0,yIt=o((()=>(mIt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+mIt)),"generateId"),vIt=o((t=>{uIt.children=t,cIt(t,uIt),hIt=uIt.children}),"setHierarchy"),xIt=o((t=>{const e=QNt.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1}),"getColumns"),bIt=o((()=>[...QNt.values()]),"getBlocksFlat"),wIt=o((()=>hIt||[]),"getBlocks"),kIt=o((()=>JNt),"getEdges"),TIt=o((t=>QNt.get(t)),"getBlock"),_It=o((t=>{QNt.set(t.id,t)}),"setBlock"),EIt=o((()=>console),"getLogger"),CIt=o((function(){return iIt}),"getClasses"),SIt={getConfig:o((()=>Gt().block),"getConfig"),typeStr2Type:pIt,edgeTypeStr2Type:gIt,edgeStrToEdgeData:fIt,getLogger:EIt,getBlocksFlat:bIt,getBlocks:wIt,getEdges:kIt,setHierarchy:vIt,getBlock:TIt,setBlock:_It,getColumns:xIt,getClasses:CIt,clear:dIt,generateId:yIt},AIt=o(((t,e)=>{const n=tt,r=n(t,"r"),i=n(t,"g"),a=n(t,"b");return J(r,i,a,e)}),"fade"),LIt=o((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${AIt(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${AIt(t.mainBkg,.5)};\n fill: ${AIt(t.clusterBkg,.5)};\n stroke: ${AIt(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles"),NIt=o(((t,e,n,r)=>{e.forEach((e=>{zIt[e](t,n,r)}))}),"insertMarkers"),IIt=o(((t,e,n)=>{y.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),MIt=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),RIt=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),DIt=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"dependency"),OIt=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),PIt=o(((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),BIt=o(((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"circle"),$It=o(((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")}),"cross"),FIt=o(((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb"),zIt={extension:IIt,composition:MIt,aggregation:RIt,dependency:DIt,lollipop:OIt,point:PIt,circle:BIt,cross:$It,barb:FIt},UIt=NIt,GIt=Kn()?.block?.padding??8;function qIt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}o(qIt,"calculateBlockPosition");var jIt=o((t=>{let e=0,n=0;for(const r of t.children){const{width:i,height:a,x:s,y:o}=r.size??{width:0,height:0,x:0,y:0};y.debug("getMaxChildSize abc95 child:",r.id,"width:",i,"height:",a,"x:",s,"y:",o,r.type),"space"!==r.type&&(i>e&&(e=i/(t.widthInColumns??1)),a>n&&(n=a))}return{width:e,height:n}}),"getMaxChildSize");function YIt(t,e,n=0,r=0){y.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",n),t?.size?.width||(t.size={width:n,height:r,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(const n of t.children)YIt(n,e);const s=jIt(t);i=s.width,a=s.height,y.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(const e of t.children)e.size&&(y.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${i} ${a} ${JSON.stringify(e.size)}`),e.size.width=i*(e.widthInColumns??1)+GIt*((e.widthInColumns??1)-1),e.size.height=a,e.size.x=0,e.size.y=0,y.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${i} maxHeight:${a}`));for(const n of t.children)YIt(n,e,i,a);const o=t.columns??-1;let l=0;for(const e of t.children)l+=e.widthInColumns??1;let c=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(e>0){const n=(u-e*GIt-GIt)/e;y.debug("abc95 (growing to fit) width",t.id,u,t.size?.width,n);for(const e of t.children)e.size&&(e.size.width=n)}}t.size={width:u,height:d,x:0,y:0}}y.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function WIt(t,e){y.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const n=t.columns??-1;if(y.debug("layoutBlocks columns abc95",t.id,"=>",n,t),t.children&&t.children.length>0){const e=t?.children[0]?.size?.width??0,r=t.children.length*e+(t.children.length-1)*GIt;y.debug("widthOfChildren 88",r,"posX");let i=0;y.debug("abc91 block?.size?.x",t.id,t?.size?.x);let a=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-GIt,s=0;for(const e of t.children){const r=t;if(!e.size)continue;const{width:o,height:l}=e.size,{px:c,py:h}=qIt(n,i);if(h!=s&&(s=h,a=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-GIt,y.debug("New row in layout for block",t.id," and child ",e.id,s)),y.debug(`abc89 layout blocks (child) id: ${e.id} Pos: ${i} (px, py) ${c},${h} (${r?.size?.x},${r?.size?.y}) parent: ${r.id} width: ${o}${GIt}`),r.size){const t=o/2;e.size.x=a+GIt+t,y.debug(`abc91 layout blocks (calc) px, pyid:${e.id} startingPos=X${a} new startingPosX${e.size.x} ${t} padding=${GIt} width=${o} halfWidth=${t} => x:${e.size.x} y:${e.size.y} ${e.widthInColumns} (width * (child?.w || 1)) / 2 ${o*(e?.widthInColumns??1)/2}`),a=e.size.x+t,e.size.y=r.size.y-r.size.height/2+h*(l+GIt)+l/2+GIt,y.debug(`abc88 layout blocks (calc) px, pyid:${e.id}startingPosX${a}${GIt}${t}=>x:${e.size.x}y:${e.size.y}${e.widthInColumns}(width * (child?.w || 1)) / 2${o*(e?.widthInColumns??1)/2}`)}e.children&&WIt(e),i+=e?.widthInColumns??1,y.debug("abc88 columnsPos",e,i)}}y.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function HIt(t,{minX:e,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:a,y:s,width:o,height:l}=t.size;a-o/2r&&(r=a+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(const a of t.children)({minX:e,minY:n,maxX:r,maxY:i}=HIt(a,{minX:e,minY:n,maxX:r,maxY:i}));return{minX:e,minY:n,maxX:r,maxY:i}}function VIt(t){const e=t.getBlock("root");if(!e)return;YIt(e,t,0,0),WIt(e),y.debug("getBlocks",JSON.stringify(e,null,2));const{minX:n,minY:r,maxX:i,maxY:a}=HIt(e);return{x:n,y:r,width:i-n,height:a-r}}function XIt(t,e){e&&t.attr("style",e)}function KIt(t){const e=Fa(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div"),r=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=n.append("span");return a.html(r),XIt(a,t.labelStyle),a.attr("class",i),XIt(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}o(YIt,"setBlockSizes"),o(WIt,"layoutBlocks"),o(HIt,"findBounds"),o(VIt,"layout"),o(XIt,"applyStyle"),o(KIt,"addHtmlLabel");var ZIt=o(((t,e,n,r)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),fn(Kn().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),y.debug("vertexText"+i);return KIt({isNode:r,label:p_(Pk(i)),labelStyle:e.replace("fill:","color:")})}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[];for(const e of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),n?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}}),"createLabel"),QIt=o(((t,e,n,r,i)=>{e.arrowTypeStart&&tMt(t,"start",e.arrowTypeStart,n,r,i),e.arrowTypeEnd&&tMt(t,"end",e.arrowTypeEnd,n,r,i)}),"addEdgeMarkers"),JIt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},tMt=o(((t,e,n,r,i,a)=>{const s=JIt[n];if(!s)return void y.warn(`Unknown arrow type: ${n}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${r}#${i}_${a}-${s}${o})`)}),"addEdgeMarker"),eMt={},nMt={},rMt=o(((t,e)=>{const n=Kn(),r=fn(n.flowchart.htmlLabels),i="markdown"===e.labelType?g_(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0},n):ZIt(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o,l=i.getBBox();if(r){const t=i.children[0],e=Fa(i);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}if(s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),eMt[e.id]=a,e.width=l.width,e.height=l.height,e.startLabelLeft){const n=ZIt(e.startLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");o=i.node().appendChild(n);const a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),nMt[e.id]||(nMt[e.id]={}),nMt[e.id].startLeft=r,iMt(o,e.startLabelLeft)}if(e.startLabelRight){const n=ZIt(e.startLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");o=r.node().appendChild(n),i.node().appendChild(n);const a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),nMt[e.id]||(nMt[e.id]={}),nMt[e.id].startRight=r,iMt(o,e.startLabelRight)}if(e.endLabelLeft){const n=ZIt(e.endLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");o=i.node().appendChild(n);const a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),r.node().appendChild(n),nMt[e.id]||(nMt[e.id]={}),nMt[e.id].endLeft=r,iMt(o,e.endLabelLeft)}if(e.endLabelRight){const n=ZIt(e.endLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");o=i.node().appendChild(n);const a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),r.node().appendChild(n),nMt[e.id]||(nMt[e.id]={}),nMt[e.id].endRight=r,iMt(o,e.endLabelRight)}return i}),"insertEdgeLabel");function iMt(t,e){Kn().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}o(iMt,"setTerminalWidth");var aMt=o(((t,e)=>{y.debug("Moving label abc88 ",t.id,t.label,eMt[t.id],e);let n=e.updatedPath?e.updatedPath:e.originalPath;const r=Kn(),{subGraphTitleTotalMargin:i}=ay(r);if(t.label){const r=eMt[t.id];let a=t.x,s=t.y;if(n){const r=Dk.calcLabelPosition(n);y.debug("Moving label "+t.label+" from (",a,",",s,") to (",r.x,",",r.y,") abc88"),e.updatedPath&&(a=r.x,s=r.y)}r.attr("transform",`translate(${a}, ${s+i/2})`)}if(t.startLabelLeft){const e=nMt[t.id].startLeft;let r=t.x,i=t.y;if(n){const e=Dk.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){const e=nMt[t.id].startRight;let r=t.x,i=t.y;if(n){const e=Dk.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){const e=nMt[t.id].endLeft;let r=t.x,i=t.y;if(n){const e=Dk.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){const e=nMt[t.id].endRight;let r=t.x,i=t.y;if(n){const e=Dk.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}}),"positionEdgeLabel"),sMt=o(((t,e)=>{const n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),s=t.width/2,o=t.height/2;return i>=s||a>=o}),"outsideNode"),oMt=o(((t,e,n)=>{y.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,i=t.y,a=Math.abs(r-n.x),s=t.width/2;let o=n.xMath.abs(r-e.x)*l){let t=n.y{y.debug("abc88 cutPathAtIntersect",t,e);let n=[],r=t[0],i=!1;return t.forEach((t=>{if(sMt(e,t)||i)r=t,i||n.push(t);else{const a=oMt(e,r,t);let s=!1;n.forEach((t=>{s=s||t.x===a.x&&t.y===a.y})),n.some((t=>t.x===a.x&&t.y===a.y))||n.push(a),i=!0}})),n}),"cutPathAtIntersect"),cMt=o((function(t,e,n,r,i,a,s){let o=n.points;y.debug("abc88 InsertEdge: edge=",n,"e=",e);let l=!1;const c=a.node(e.v);var h=a.node(e.w);h?.intersect&&c?.intersect&&(o=o.slice(1,n.points.length-1),o.unshift(c.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),n.toCluster&&(y.debug("to cluster abc88",r[n.toCluster]),o=lMt(n.points,r[n.toCluster].node),l=!0),n.fromCluster&&(y.debug("from cluster abc88",r[n.fromCluster]),o=lMt(o.reverse(),r[n.fromCluster].node).reverse(),l=!0);const u=o.filter((t=>!Number.isNaN(t.y)));let d=bu;!n.curve||"graph"!==i&&"flowchart"!==i||(d=n.curve);const{x:p,y:g}=zS(n),f=uu().x(p).y(g).curve(d);let m;switch(n.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(n.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}const v=t.append("path").attr("d",f(u)).attr("id",n.id).attr("class"," "+m+(n.classes?" "+n.classes:"")).attr("style",n.style);let x="";(Kn().flowchart.arrowMarkerAbsolute||Kn().state.arrowMarkerAbsolute)&&(x=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,x=x.replace(/\(/g,"\\("),x=x.replace(/\)/g,"\\)")),QIt(v,n,x,s,i);let b={};return l&&(b.updatedPath=o),b.originalPath=n.points,b}),"insertEdge"),hMt=o((t=>{const e=new Set;for(const n of t)switch(n){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(n)}return e}),"expandAndDeduplicateDirections"),uMt=o(((t,e,n)=>{const r=hMt(t),i=e.height+2*n.padding,a=i/2,s=e.width+2*a+n.padding,o=n.padding/2;return r.has("right")&&r.has("left")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:a,y:0},{x:s/2,y:2*o},{x:s-a,y:0},{x:s,y:0},{x:s,y:-i/3},{x:s+2*o,y:-i/2},{x:s,y:-2*i/3},{x:s,y:-i},{x:s-a,y:-i},{x:s/2,y:-i-2*o},{x:a,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*o,y:-i/2},{x:0,y:-i/3}]:r.has("right")&&r.has("left")&&r.has("up")?[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}]:r.has("right")&&r.has("left")&&r.has("down")?[{x:0,y:0},{x:a,y:-i},{x:s-a,y:-i},{x:s,y:0}]:r.has("right")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:s,y:-a},{x:s,y:-i+a},{x:0,y:-i}]:r.has("left")&&r.has("up")&&r.has("down")?[{x:s,y:0},{x:0,y:-a},{x:0,y:-i+a},{x:s,y:-i}]:r.has("right")&&r.has("left")?[{x:a,y:0},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i},{x:0,y:-i/2}]:r.has("up")&&r.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:a,y:-o},{x:a,y:-i+o},{x:0,y:-i+o},{x:s/2,y:-i},{x:s,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o},{x:s,y:-o}]:r.has("right")&&r.has("up")?[{x:0,y:0},{x:s,y:-a},{x:0,y:-i}]:r.has("right")&&r.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-i}]:r.has("left")&&r.has("up")?[{x:s,y:0},{x:0,y:-a},{x:s,y:-i}]:r.has("left")&&r.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-i}]:r.has("right")?[{x:a,y:-o},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i+o}]:r.has("left")?[{x:a,y:0},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i},{x:0,y:-i/2}]:r.has("up")?[{x:a,y:-o},{x:a,y:-i+o},{x:0,y:-i+o},{x:s/2,y:-i},{x:s,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o}]:r.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:a,y:-o},{x:a,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o},{x:s,y:-o}]:[{x:0,y:0}]}),"getArrowPoints");function dMt(t,e){return t.intersect(e)}o(dMt,"intersectNode");var pMt=dMt;function gMt(t,e,n,r){var i=t.x,a=t.y,s=i-r.x,o=a-r.y,l=Math.sqrt(e*e*o*o+n*n*s*s),c=Math.abs(e*n*s/l);r.x0}o(vMt,"intersectLine"),o(xMt,"sameSign");var bMt=vMt,wMt=kMt;function kMt(t,e,n){var r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)})):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=i-t.height/2-o,h=0;h1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),s=e.x-n.x,o=e.y-n.y,l=Math.sqrt(s*s+o*o);return a{var n,r,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),n=0===o?0:c*s/o,r=c):(s<0&&(l=-l),n=l,r=0===s?0:l*o/s),{x:i+n,y:a+r}}),"intersectRect"),_Mt={node:pMt,circle:yMt,ellipse:fMt,polygon:wMt,rect:TMt},EMt=o((async(t,e,n,r)=>{const i=Kn();let a;const s=e.useHtmlLabels||fn(i.flowchart.htmlLabels);a=n||"node default";const l=t.insert("g").attr("class",a).attr("id",e.domId||e.id),c=l.insert("g").attr("class","label").attr("style",e.labelStyle);let h;h=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const u=c.node();let d;d="markdown"===e.labelType?g_(c,ln(Pk(h),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):u.appendChild(ZIt(ln(Pk(h),i),e.labelStyle,!1,r));let p=d.getBBox();const g=e.padding/2;if(fn(i.flowchart.htmlLabels)){const t=d.children[0],e=Fa(d),n=t.getElementsByTagName("img");if(n){const t=""===h.replace(/]*>/g,"").trim();await Promise.all([...n].map((e=>new Promise((n=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,n=5,r=parseInt(t,10)*n+"px";e.style.minWidth=r,e.style.maxWidth=r}else e.style.width="100%";n(e)}o(r,"setupImage"),setTimeout((()=>{e.complete&&r()})),e.addEventListener("error",r),e.addEventListener("load",r)})))))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return s?c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):c.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:p,halfPadding:g,label:c}}),"labelHelper"),CMt=o(((t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height}),"updateNodeBounds");function SMt(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}o(SMt,"insertPolygonShape");var AMt=o((async(t,e)=>{e.useHtmlLabels||Kn().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:n,bbox:r,halfPadding:i}=await EMt(t,e,"node "+e.classes,!0);y.info("Classes = ",e.classes);const a=n.insert("rect",":first-child");return a.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),CMt(e,a),e.intersect=function(t){return _Mt.rect(e,t)},n}),"note"),LMt=AMt,NMt=o((t=>t?" "+t:""),"formatClass"),IMt=o(((t,e)=>`${e||"node default"}${NMt(t.classes)} ${NMt(t.class)}`),"getClassesFromNode"),MMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.width+e.padding+(r.height+e.padding),a=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];y.info("Question main (Circle)");const s=SMt(n,i,i,a);return s.attr("style",e.style),CMt(e,s),e.intersect=function(t){return y.warn("Intersect called"),_Mt.polygon(e,a,t)},n}),"question"),RMt=o(((t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}],i=n.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" "));return i.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return _Mt.circle(e,14,t)},n}),"choice"),DMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.height+e.padding,a=i/4,s=r.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=SMt(n,s,i,o);return l.attr("style",e.style),CMt(e,l),e.intersect=function(t){return _Mt.polygon(e,o,t)},n}),"hexagon"),OMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,void 0,!0),i=r.height+2*e.padding,a=i/2,s=r.width+2*a+e.padding,o=uMt(e.directions,r,e),l=SMt(n,s,i,o);return l.attr("style",e.style),CMt(e,l),e.intersect=function(t){return _Mt.polygon(e,o,t)},n}),"block_arrow"),PMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return SMt(n,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return _Mt.polygon(e,s,t)},n}),"rect_left_inv_arrow"),BMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=SMt(n,i,a,s);return o.attr("style",e.style),CMt(e,o),e.intersect=function(t){return _Mt.polygon(e,s,t)},n}),"lean_right"),$Mt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=SMt(n,i,a,s);return o.attr("style",e.style),CMt(e,o),e.intersect=function(t){return _Mt.polygon(e,s,t)},n}),"lean_left"),FMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=SMt(n,i,a,s);return o.attr("style",e.style),CMt(e,o),e.intersect=function(t){return _Mt.polygon(e,s,t)},n}),"trapezoid"),zMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=SMt(n,i,a,s);return o.attr("style",e.style),CMt(e,o),e.intersect=function(t){return _Mt.polygon(e,s,t)},n}),"inv_trapezoid"),UMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=SMt(n,i,a,s);return o.attr("style",e.style),CMt(e,o),e.intersect=function(t){return _Mt.polygon(e,s,t)},n}),"rect_right_inv_arrow"),GMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.width+e.padding,a=i/2,s=a/(2.5+i/50),o=r.height+s+e.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,c=n.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return CMt(e,c),e.intersect=function(t){const n=_Mt.rect(e,t),r=n.x-e.x;if(0!=a&&(Math.abs(r)e.height/2-s)){let i=s*s*(1-r*r/(a*a));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},n}),"cylinder"),qMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=await EMt(t,e,"node "+e.classes+" "+e.class,!0),a=n.insert("rect",":first-child"),s=e.positioned?e.width:r.width+e.padding,o=e.positioned?e.height:r.height+e.padding,l=e.positioned?-s/2:-r.width/2-i,c=e.positioned?-o/2:-r.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",c).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(WMt(a,e.props.borders,s,o),t.delete("borders")),t.forEach((t=>{y.warn(`Unknown node property ${t}`)}))}return CMt(e,a),e.intersect=function(t){return _Mt.rect(e,t)},n}),"rect"),jMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=await EMt(t,e,"node "+e.classes,!0),a=n.insert("rect",":first-child"),s=e.positioned?e.width:r.width+e.padding,o=e.positioned?e.height:r.height+e.padding,l=e.positioned?-s/2:-r.width/2-i,c=e.positioned?-o/2:-r.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",c).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(WMt(a,e.props.borders,s,o),t.delete("borders")),t.forEach((t=>{y.warn(`Unknown node property ${t}`)}))}return CMt(e,a),e.intersect=function(t){return _Mt.rect(e,t)},n}),"composite"),YMt=o((async(t,e)=>{const{shapeSvg:n}=await EMt(t,e,"label",!0);y.trace("Classes = ",e.class);const r=n.insert("rect",":first-child");if(r.attr("width",0).attr("height",0),n.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(WMt(r,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{y.warn(`Unknown node property ${t}`)}))}return CMt(e,r),e.intersect=function(t){return _Mt.rect(e,t)},n}),"labelRect");function WMt(t,e,n,r){const i=[],a=o((t=>{i.push(t,0)}),"addBorder"),s=o((t=>{i.push(0,t)}),"skipBorder");e.includes("t")?(y.debug("add top border"),a(n)):s(n),e.includes("r")?(y.debug("add right border"),a(r)):s(r),e.includes("b")?(y.debug("add bottom border"),a(n)):s(n),e.includes("l")?(y.debug("add left border"),a(r)):s(r),t.attr("stroke-dasharray",i.join(" "))}o(WMt,"applyNodePropertyBorders");var HMt=o(((t,e)=>{let n;n=e.classes?"node "+e.classes:"node default";const r=t.insert("g").attr("class",n).attr("id",e.domId||e.id),i=r.insert("rect",":first-child"),a=r.insert("line"),s=r.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";l="object"==typeof o?o[0]:o,y.info("Label text abc79",l,o,"object"==typeof o);const c=s.node().appendChild(ZIt(l,e.labelStyle,!0,!0));let h={width:0,height:0};if(fn(Kn().flowchart.htmlLabels)){const t=c.children[0],e=Fa(c);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}y.info("Text 2",o);const u=o.slice(1,o.length);let d=c.getBBox();const p=s.node().appendChild(ZIt(u.join?u.join("
    "):u,e.labelStyle,!0,!0));if(fn(Kn().flowchart.htmlLabels)){const t=p.children[0],e=Fa(p);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}const g=e.padding/2;return Fa(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+g+5)+")"),Fa(c).attr("transform","translate( "+(h.width{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.height+e.padding,a=r.width+i/4+e.padding,s=n.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return CMt(e,s),e.intersect=function(t){return _Mt.rect(e,t)},n}),"stadium"),XMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=await EMt(t,e,IMt(e,void 0),!0),a=n.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),y.info("Circle main"),CMt(e,a),e.intersect=function(t){return y.info("Circle intersect",e,r.width/2+i,t),_Mt.circle(e,r.width/2+i,t)},n}),"circle"),KMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=await EMt(t,e,IMt(e,void 0),!0),a=n.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i+5).attr("width",r.width+e.padding+10).attr("height",r.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),y.info("DoubleCircle main"),CMt(e,s),e.intersect=function(t){return y.info("DoubleCircle intersect",e,r.width/2+i+5,t),_Mt.circle(e,r.width/2+i+5,t)},n}),"doublecircle"),ZMt=o((async(t,e)=>{const{shapeSvg:n,bbox:r}=await EMt(t,e,IMt(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=SMt(n,i,a,s);return o.attr("style",e.style),CMt(e,o),e.intersect=function(t){return _Mt.polygon(e,s,t)},n}),"subroutine"),QMt=o(((t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),CMt(e,r),e.intersect=function(t){return _Mt.circle(e,7,t)},n}),"start"),JMt=o(((t,e,n)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,a=10;"LR"===n&&(i=10,a=70);const s=r.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return CMt(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return _Mt.rect(e,t)},r}),"forkJoin"),tRt=o(((t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),CMt(e,i),e.intersect=function(t){return _Mt.circle(e,7,t)},n}),"end"),eRt=o(((t,e)=>{const n=e.padding/2;let r;r=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),s=i.insert("line"),o=i.insert("line");let l=0,c=4;const h=i.insert("g").attr("class","label");let u=0;const d=e.classData.annotations?.[0],p=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",g=h.node().appendChild(ZIt(p,e.labelStyle,!0,!0));let f=g.getBBox();if(fn(Kn().flowchart.htmlLabels)){const t=g.children[0],e=Fa(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}e.classData.annotations[0]&&(c+=f.height+4,l+=f.width);let m=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&(Kn().flowchart.htmlLabels?m+="<"+e.classData.type+">":m+="<"+e.classData.type+">");const y=h.node().appendChild(ZIt(m,e.labelStyle,!0,!0));Fa(y).attr("class","classTitle");let v=y.getBBox();if(fn(Kn().flowchart.htmlLabels)){const t=y.children[0],e=Fa(y);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}c+=v.height+4,v.width>l&&(l=v.width);const x=[];e.classData.members.forEach((t=>{const n=t.getDisplayDetails();let r=n.displayText;Kn().flowchart.htmlLabels&&(r=r.replace(//g,">"));const i=h.node().appendChild(ZIt(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let a=i.getBBox();if(fn(Kn().flowchart.htmlLabels)){const t=i.children[0],e=Fa(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>l&&(l=a.width),c+=a.height+4,x.push(i)})),c+=8;const b=[];if(e.classData.methods.forEach((t=>{const n=t.getDisplayDetails();let r=n.displayText;Kn().flowchart.htmlLabels&&(r=r.replace(//g,">"));const i=h.node().appendChild(ZIt(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let a=i.getBBox();if(fn(Kn().flowchart.htmlLabels)){const t=i.children[0],e=Fa(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>l&&(l=a.width),c+=a.height+4,b.push(i)})),c+=8,d){let t=(l-f.width)/2;Fa(g).attr("transform","translate( "+(-1*l/2+t)+", "+-1*c/2+")"),u=f.height+4}let w=(l-v.width)/2;return Fa(y).attr("transform","translate( "+(-1*l/2+w)+", "+(-1*c/2+u)+")"),u+=v.height+4,s.attr("class","divider").attr("x1",-l/2-n).attr("x2",l/2+n).attr("y1",-c/2-n+8+u).attr("y2",-c/2-n+8+u),u+=8,x.forEach((t=>{Fa(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")");const e=t?.getBBox();u+=(e?.height??0)+4})),u+=8,o.attr("class","divider").attr("x1",-l/2-n).attr("x2",l/2+n).attr("y1",-c/2-n+8+u).attr("y2",-c/2-n+8+u),u+=8,b.forEach((t=>{Fa(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")");const e=t?.getBBox();u+=(e?.height??0)+4})),a.attr("style",e.style).attr("class","outer title-state").attr("x",-l/2-n).attr("y",-c/2-n).attr("width",l+e.padding).attr("height",c+e.padding),CMt(e,a),e.intersect=function(t){return _Mt.rect(e,t)},i}),"class_box"),nRt={rhombus:MMt,composite:jMt,question:MMt,rect:qMt,labelRect:YMt,rectWithTitle:HMt,choice:RMt,circle:XMt,doublecircle:KMt,stadium:VMt,hexagon:DMt,block_arrow:OMt,rect_left_inv_arrow:PMt,lean_right:BMt,lean_left:$Mt,trapezoid:FMt,inv_trapezoid:zMt,rect_right_inv_arrow:UMt,cylinder:GMt,start:QMt,end:tRt,note:LMt,subroutine:ZMt,fork:JMt,join:JMt,class_box:eRt},rRt={},iRt=o((async(t,e,n)=>{let r,i;if(e.link){let a;"sandbox"===Kn().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await nRt[e.shape](r,e,n)}else i=await nRt[e.shape](t,e,n),r=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),rRt[e.id]=r,e.haveCallback&&rRt[e.id].attr("class",rRt[e.id].attr("class")+" clickable"),r}),"insertNode"),aRt=o((t=>{const e=rRt[t.id];y.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n}),"positionNode");function sRt(t,e,n=!1){const r=t;let i="default";(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(" ")),i+=" flowchart-label";let a,s=0,o="";switch(r.type){case"round":s=5,o="rect";break;case"composite":s=0,o="composite",a=0;break;case"square":case"group":default:o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":case"rect_left_inv_arrow":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"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"doublecircle":o="doublecircle"}const l=fk(r?.styles??[]),c=r.label,h=r.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:o,labelText:c,rx:s,ry:s,class:i,style:l.style,id:r.id,directions:r.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:n,intersect:void 0,type:r.type,padding:a??Gt()?.block?.padding??0}}async function oRt(t,e,n){const r=sRt(e,0,!1);if("group"===r.type)return;const i=Gt(),a=await iRt(t,r,{config:i}),s=a.node().getBBox(),o=n.getBlock(r.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},n.setBlock(o),a.remove()}async function lRt(t,e,n){const r=sRt(e,0,!0);if("space"!==n.getBlock(r.id).type){const n=Gt();await iRt(t,r,{config:n}),e.intersect=r?.intersect,aRt(r)}}async function cRt(t,e,n,r){for(const i of e)await r(t,i,n),i.children&&await cRt(t,i.children,n,r)}async function hRt(t,e,n){await cRt(t,e,n,oRt)}async function uRt(t,e,n){await cRt(t,e,n,lRt)}async function dRt(t,e,n,r,i){const a=new cj({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const t of n)t.size&&a.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(const n of e)if(n.start&&n.end){const e=r.getBlock(n.start),s=r.getBlock(n.end);if(e?.size&&s?.size){const r=e.size,o=s.size,l=[{x:r.x,y:r.y},{x:r.x+(o.x-r.x)/2,y:r.y+(o.y-r.y)/2},{x:o.x,y:o.y}];cMt(t,{v:n.start,w:n.end,name:n.id},{...n,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),n.label&&(await rMt(t,{...n,label:n.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),aMt({...n,x:l[1].x,y:l[1].y},{originalPath:l}))}}}o(sRt,"getNodeFromBlock"),o(oRt,"calculateBlockSize"),o(lRt,"insertBlockPositioned"),o(cRt,"performOperations"),o(hRt,"calculateBlockSizes"),o(uRt,"insertBlocks"),o(dRt,"insertEdges");var pRt=o((function(t,e){return e.db.getClasses()}),"getClasses"),gRt=o((async function(t,e,n,r){const{securityLevel:i,block:a}=Gt(),s=r.db;let o;"sandbox"===i&&(o=Fa("#i"+e));const l=Fa("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),c="sandbox"===i?l.select(`[id="${e}"]`):Fa(`[id="${e}"]`);UIt(c,["point","circle","cross"],r.type,e);const h=s.getBlocks(),u=s.getBlocksFlat(),d=s.getEdges(),p=c.insert("g").attr("class","block");await hRt(p,h,s);const g=VIt(s);if(await uRt(p,h,s),await dRt(p,d,u,s,e),g){const t=g,e=Math.max(1,Math.round(t.width/t.height*.125)),n=t.height+e+10,r=t.width+10,{useMaxWidth:i}=a;Nn(c,n,r,!!i),y.debug("Here Bounds",g,t),c.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}}),"draw"),fRt={parser:ZNt,db:SIt,renderer:{draw:gRt,getClasses:pRt},styles:LIt},mRt=Object.freeze({__proto__:null,diagram:fRt}),yRt=l({"../../node_modules/.pnpm/layout-base@2.0.1/node_modules/layout-base/layout-base.js"(t,e){o((function(n,r){"object"==typeof t&&"object"==typeof e?e.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof t?t.layoutBase=r():n.layoutBase=r()}),"webpackUniversalModuleDefinition")(t,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return o(n,"__webpack_require__"),n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?o((function(){return t.default}),"getDefault"):o((function(){return t}),"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=28)}([function(t,e,n){function r(){}o(r,"LayoutConstants"),r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,n){var r=n(2),i=n(8),a=n(9);function s(t,e,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=e}for(var l in o(s,"LEdge"),s.prototype=Object.create(r.prototype),r)s[l]=r[l];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var n=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(n.getOwner()==e)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,n){function r(t){this.vGraphObject=t}o(r,"LGraphObject"),t.exports=r},function(t,e,n){var r=n(2),i=n(10),a=n(13),s=n(0),l=n(16),c=n(5);function h(t,e,n,s){null==n&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=e?new a(e.x,e.y,n.width,n.height):new a}for(var u in o(h,"LNode"),h.prototype=Object.create(r.prototype),r)h[u]=r[u];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(t){var e=[],n=this;return n.edges.forEach((function(r){if(r.target==t){if(r.source!=n)throw"Incorrect edge source!";e.push(r)}})),e},h.prototype.getEdgesBetween=function(t){var e=[],n=this;return n.edges.forEach((function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)})),e},h.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(n){if(n.source==e)t.add(n.target);else{if(n.target!=e)throw"Incorrect incidency!";t.add(n.source)}})),t},h.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),n=0;ne?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(n+this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var n=this.rect.y;n>s.WORLD_BOUNDARY?n=s.WORLD_BOUNDARY:n<-s.WORLD_BOUNDARY&&(n=-s.WORLD_BOUNDARY);var r=new c(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=h},function(t,e,n){var r=n(0);function i(){}for(var a in o(i,"FDLayoutConstants"),r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,n){function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}o(r,"PointD"),r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){var r=n(2),i=n(10),a=n(0),s=n(7),l=n(3),c=n(1),h=n(13),u=n(12),d=n(11);function p(t,e,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var g in o(p,"LGraph"),p.prototype=Object.create(r.prototype),r)p[g]=r[g];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},p.prototype.remove=function(t){var e=t;if(t instanceof l){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),r=n.length,i=0;i-1&&h>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(o,1),a.target!=a.source&&a.target.edges.splice(h,1),-1==(s=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(s,1)}},p.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,a=i.MAX_VALUE,s=this.getNodes(),o=s.length,l=0;l(t=c.getTop())&&(r=t),a>(e=c.getLeft())&&(a=e)}return r==i.MAX_VALUE?null:(n=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new u(this.left,this.top))},p.prototype.updateBounds=function(t){for(var e,n,r,a,s,o=i.MAX_VALUE,l=-i.MAX_VALUE,c=i.MAX_VALUE,u=-i.MAX_VALUE,d=this.nodes,p=d.length,g=0;g(e=f.getLeft())&&(o=e),l<(n=f.getRight())&&(l=n),c>(r=f.getTop())&&(c=r),u<(a=f.getBottom())&&(u=a)}var m=new h(o,c,l-o,u-c);o==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=m.x-s,this.right=m.x+m.width+s,this.top=m.y-s,this.bottom=m.y+m.height+s},p.calculateBounds=function(t){for(var e,n,r,a,s=i.MAX_VALUE,o=-i.MAX_VALUE,l=i.MAX_VALUE,c=-i.MAX_VALUE,u=t.length,d=0;d(e=p.getLeft())&&(s=e),o<(n=p.getRight())&&(o=n),l>(r=p.getTop())&&(l=r),c<(a=p.getBottom())&&(c=a)}return new h(s,l,o-s,c-l)},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},p.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r=this.nodes.length){var l=0;i.forEach((function(e){e.owner==t&&l++})),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=p},function(t,e,n){var r,i=n(1);function a(t){r=n(6),this.layout=t,this.graphs=[],this.edges=[]}o(a,"LGraphManager"),a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var a=(r=e).getOwner(),s=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==s)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],s=(a=a.concat(e.getEdges())).length,o=0;o=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var a=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(a=1);var s=a*n[0],o=n[1]/a;n[0]s)return n[0]=r,n[1]=l,n[2]=a,n[3]=x,!1;if(ia)return n[0]=o,n[1]=i,n[2]=y,n[3]=s,!1;if(ra?(n[0]=h,n[1]=u,T=!0):(n[0]=c,n[1]=l,T=!0):E===S&&(r>a?(n[0]=o,n[1]=l,T=!0):(n[0]=d,n[1]=u,T=!0)),-C===S?a>r?(n[2]=v,n[3]=x,_=!0):(n[2]=y,n[3]=m,_=!0):C===S&&(a>r?(n[2]=f,n[3]=m,_=!0):(n[2]=b,n[3]=x,_=!0)),T&&_)return!1;if(r>a?i>s?(A=this.getCardinalDirection(E,S,4),L=this.getCardinalDirection(C,S,2)):(A=this.getCardinalDirection(-E,S,3),L=this.getCardinalDirection(-C,S,1)):i>s?(A=this.getCardinalDirection(-E,S,1),L=this.getCardinalDirection(-C,S,3)):(A=this.getCardinalDirection(E,S,2),L=this.getCardinalDirection(C,S,4)),!T)switch(A){case 1:I=l,N=r+-g/S,n[0]=N,n[1]=I;break;case 2:N=d,I=i+p*S,n[0]=N,n[1]=I;break;case 3:I=u,N=r+g/S,n[0]=N,n[1]=I;break;case 4:N=h,I=i+-p*S,n[0]=N,n[1]=I}if(!_)switch(L){case 1:R=m,M=a+-k/S,n[2]=M,n[3]=R;break;case 2:M=b,R=s+w*S,n[2]=M,n[3]=R;break;case 3:R=x,M=a+k/S,n[2]=M,n[3]=R;break;case 4:M=v,R=s+-w*S,n[2]=M,n[3]=R}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var a,s,o,l,c,h,u,d=t.x,p=t.y,g=e.x,f=e.y,m=n.x,y=n.y,v=i.x,x=i.y;return 0===(u=(a=f-p)*(l=m-v)-(s=x-y)*(o=d-g))?null:new r((o*(h=v*y-m*x)-l*(c=g*p-d*f))/u,(s*c-a*h)/u)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n=0){var h=(-l+Math.sqrt(l*l-4*o*c))/(2*o),u=(-l-Math.sqrt(l*l-4*o*c))/(2*o);return h>=0&&h<=1?[h]:u>=0&&u<=1?[u]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,n){function r(){}o(r,"IMath"),r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){function r(){}o(r,"Integer"),r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){var r=function(){function t(t,e){for(var n=0;n0&&e;){for(o.push(c[0]);o.length>0&&e;){var h=o[0];o.splice(0,1),s.add(h);var u=h.getEdges();for(a=0;a-1&&c.splice(f,1)}s=new Set,l=new Map}else t=[]}return t},p.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&e.splice(u,1),h.getNeighborsList().forEach((function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&l.push(t),r.set(t,e)}}))}n=n.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},p.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=p},function(t,e,n){function r(){}o(r,"RandomSeed"),r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,n){var r=n(5);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);ea.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),i=new Set,t=0;t(l=e.getEstimatedSize()*this.gravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*a):(s>(l=e.getEstimatedSize()*this.compoundGravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=l.length||h>=l[0].length))for(var u=0;ut}),"_defaultCompareFunction")}]),t}();t.exports=s},function(t,e,n){function r(){}o(r,"SVD"),r.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e,n,i=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=(e=[this.m,i],n=o((function t(e){if(0==e.length)return 0;for(var n=[],r=0;r0;)e.push(0);return e}(this.n),s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),l=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),h=0;h=0;N--)if(0!==this.s[N]){for(var I=N+1;I=0;$--){if(function(t,e){return t&&e}($0;){var H=void 0,V=void 0;for(H=S-2;H>=-1&&-1!==H;H--)if(Math.abs(a[H])<=W+Y*(Math.abs(this.s[H])+Math.abs(this.s[H+1]))){a[H]=0;break}if(H===S-2)V=4;else{var X=void 0;for(X=S-1;X>=H&&X!==H;X--){var K=(X!==S?Math.abs(a[X]):0)+(X!==H+1?Math.abs(a[X-1]):0);if(Math.abs(this.s[X])<=W+Y*K){this.s[X]=0;break}}X===H?V=3:X===S-1?V=1:(V=2,H=X)}switch(H++,V){case 1:var Z=a[S-2];a[S-2]=0;for(var Q=S-2;Q>=H;Q--){var J=r.hypot(this.s[Q],Z),tt=this.s[Q]/J,et=Z/J;this.s[Q]=J,Q!==H&&(Z=-et*a[Q-1],a[Q-1]=tt*a[Q-1]);for(var nt=0;nt=this.s[H+1]);){var St=this.s[H];if(this.s[H]=this.s[H+1],this.s[H+1]=St,HMath.abs(e)?(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)):0!=e?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):n=0,n},t.exports=r},function(t,e,n){var r=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;i(this,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=s,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var o=0;o=0;n--){var r=this.listeners[n];r.event===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;n{var e={45:(t,e,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),t.exports=r},806:(t,e,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in o(i,"CoSEConstants"),r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,t.exports=i},767:(t,e,n)=>{var r=n(551).FDLayoutEdge;function i(t,e,n){r.call(this,t,e,n)}for(var a in o(i,"CoSEEdge"),i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},880:(t,e,n)=>{var r=n(551).LGraph;function i(t,e,n){r.call(this,t,e,n)}for(var a in o(i,"CoSEGraph"),i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},578:(t,e,n)=>{var r=n(551).LGraphManager;function i(t){r.call(this,t)}for(var a in o(i,"CoSEGraphManager"),i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},765:(t,e,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),s=n(991),l=n(767),c=n(806),h=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,p=n(551).Point,g=n(551).PointD,f=n(551).DimensionD,m=n(551).Layout,y=n(551).Integer,v=n(551).IGeometry,x=n(551).LGraph,b=n(551).Transform,w=n(551).LinkedList;function k(){r.call(this),this.toBeTiled={},this.constraints={}}for(var T in o(k,"CoSELayout"),k.prototype=Object.create(r.prototype),r)k[T]=r[T];k.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t,t},k.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},k.prototype.newNode=function(t){return new s(this.graphManager,t)},k.prototype.newEdge=function(t){return new l(null,null,t)},k.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},k.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},k.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(n)}}else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(h.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},k.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n0&&this.updateDisplacements();for(e=0;e0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var s=new Map,l=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach((function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var h=this.constraints.alignmentConstraint.vertical;for(n=0;n=2*t.length/3;r--)e=Math.floor(Math.random()*(r+1)),n=t[r],t[r]=t[e],t[e]=n;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach((function(e){if(e.left){var n=s.has(e.left)?s.get(e.left):e.left,r=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodesInRelativeHorizontal.includes(r)||(t.nodesInRelativeHorizontal.push(r),t.nodeToRelativeConstraintMapHorizontal.set(r,[]),t.dummyToNodeForVerticalAlignment.has(r)?t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(r).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:e.gap})}else{var i=l.has(e.top)?l.get(e.top):e.top,a=l.has(e.bottom)?l.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(i)||(t.nodesInRelativeVertical.push(i),t.nodeToRelativeConstraintMapVertical.set(i,[]),t.dummyToNodeForHorizontalAlignment.has(i)?t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(i).getCenterY())),t.nodesInRelativeVertical.includes(a)||(t.nodesInRelativeVertical.push(a),t.nodeToRelativeConstraintMapVertical.set(a,[]),t.dummyToNodeForHorizontalAlignment.has(a)?t.nodeToTempPositionMapVertical.set(a,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(a,t.idToNodeMap.get(a).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:e.gap})}}));else{var d=new Map,p=new Map;this.constraints.relativePlacementConstraint.forEach((function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,n=s.has(t.right)?s.get(t.right):t.right;d.has(e)?d.get(e).push(n):d.set(e,[n]),d.has(n)?d.get(n).push(e):d.set(n,[e])}else{var r=l.has(t.top)?l.get(t.top):t.top,i=l.has(t.bottom)?l.get(t.bottom):t.bottom;p.has(r)?p.get(r).push(i):p.set(r,[i]),p.has(i)?p.get(i).push(r):p.set(i,[r])}}));var g=o((function(t,e){var n=[],r=[],i=new w,a=new Set,s=0;return t.forEach((function(o,l){if(!a.has(l)){n[s]=[],r[s]=!1;var c=l;for(i.push(c),a.add(c),n[s].push(c);0!=i.length;){c=i.shift(),e.has(c)&&(r[s]=!0),t.get(c).forEach((function(t){a.has(t)||(i.push(t),a.add(t),n[s].push(t))}))}s++}})),{components:n,isFixed:r}}),"constructComponents"),f=g(d,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var m=g(p,t.fixedNodesOnVertical);this.componentsOnVertical=m.components,this.fixedComponentsOnVertical=m.isFixed}}},k.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach((function(e){var n=t.idToNodeMap.get(e.nodeId);n.displacementX=0,n.displacementY=0})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,n=0;n1)for(o=0;or&&(r=Math.floor(s.y)),a=Math.floor(s.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},k.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);k.branchRadialLayout(e,null,0,359,0,r);var i=x.calculateBounds(t),a=new b;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var s=0;s1;){var m=f[0];f.splice(0,1);var y=h.indexOf(m);y>=0&&h.splice(y,1),g--,u--}d=null!=e?(h.indexOf(f[0])+1)%g:0;for(var x=Math.abs(r-n)/u,b=d;p!=u;b=++b%g){var w=h[b].getOtherEnd(t);if(w!=e){var T=(n+p*x)%360,_=(T+x)%360;k.branchRadialLayout(w,t,T,_,i+a,a),p++}}},k.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,n=0;ne&&(e=r)}return e},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),a=new s(t.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=a;var o=t.getGraphManager().add(t.newGraph(),a),l=i.getChild();l.add(a);for(var c=0;ci?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):"right"==r.labelPosHorizontal&&r.setWidth(i+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):"bottom"==r.labelPosVertical&&r.setHeight(a+r.labelHeight))}}))},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop,a=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i,a,s)}},k.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,s=r.labelMarginLeft,o=r.labelMarginTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,a,s,o)}))},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var n=t.getChild();if(null==n)return this.toBeTiled[e]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[e]=!0,!0},k.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;rh&&(h=d.rect.height)}n+=h+t.verticalPadding}},k.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(r){var i=e[r];if(n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,s=i.rect.height;i.labelWidth&&("left"==i.labelPosHorizontal?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):"center"==i.labelPosHorizontal&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):"right"==i.labelPosHorizontal&&i.setWidth(a+i.labelWidth)),i.labelHeight&&("top"==i.labelPosVertical?(i.rect.y-=i.labelHeight,i.setHeight(s+i.labelHeight),i.labelMarginTop=i.labelHeight):"center"==i.labelPosVertical&&i.labelHeight>s?(i.rect.y-=(i.labelHeight-s)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-s)/2):"bottom"==i.labelPosVertical&&i.setHeight(s+i.labelHeight))}}))},k.prototype.tileNodes=function(t,e){var n=this.tileNodesByFavoringDim(t,e,!0),r=this.tileNodesByFavoringDim(t,e,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)o&&(o=t.getWidth())}));var l,h=a/i,u=s/i,d=Math.pow(n-r,2)+4*(h+r)*(u+n)*i,p=(r-n+Math.sqrt(d))/(2*(h+r));e?(l=Math.ceil(p))==p&&l++:l=Math.floor(p);var g=l*(h+r)-r;return o>g&&(g=o),g+=2*r},k.prototype.tileNodesByFavoringDim=function(t,e,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(s.idealRowWidth=this.calcIdealRowWidth(t,n));var l=o((function(t){return t.rect.width*t.rect.height}),"getNodeArea"),h=o((function(t,e){return l(e)-l(t)}),"areaCompareFcn");t.sort((function(t,e){var n=h;return s.idealRowWidth?(n=a)(t.id,e.id):n(t,e)}));for(var u=0,d=0,p=0;p0&&(a+=t.horizontalPadding),t.rowWidth[n]=a,t.width0&&(s+=t.verticalPadding);var o=0;s>t.rowHeight[n]&&(o=t.rowHeight[n],t.rowHeight[n]=s,o=t.rowHeight[n]-o),t.height+=o,t.rows[n].push(e)},k.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;rn&&(e=r,n=t.rowWidth[r]);return e},k.prototype.canAddHorizontal=function(t,e,n){if(t.idealRowWidth){var r=t.rows.length-1;return t.rowWidth[r]+e+t.horizontalPadding<=t.idealRowWidth}var i=this.getShortestRowIndex(t);if(i<0)return!0;var a=t.rowWidth[i];if(a+t.horizontalPadding+e<=t.width)return!0;var s,o,l=0;return t.rowHeight[i]0&&(l=n+t.verticalPadding-t.rowHeight[i]),s=t.width-a>=e+t.horizontalPadding?(t.height+l)/(a+e+t.horizontalPadding):(t.height+l)/t.width,l=n+t.verticalPadding,(o=t.widtha&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[n]=t.rowWidth[n]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=r[o].height);e>0&&(s+=t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[n];t.rowHeight[e]=s,t.rowHeight[n]0)for(var h=i;h<=a;h++)l[0]+=this.grid[h][s-1].length+this.grid[h][s].length-1;if(a0)for(h=s;h<=o;h++)l[3]+=this.grid[i-1][h].length+this.grid[i][h].length-1;for(var d,p,g=y.MAX_VALUE,f=0;f{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(t,e,n,i){r.call(this,t,e,n,i)}for(var s in o(a,"CoSENode"),a.prototype=Object.create(r.prototype),r)a[s]=r[s];a.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(t,e){for(var n,r=this.getChild().getNodes(),i=0;i{function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0){var a=0;r.forEach((function(t){"horizontal"==e?(p.set(t,c.has(t)?h[c.get(t)]:i.get(t)),a+=p.get(t)):(p.set(t,c.has(t)?u[c.get(t)]:i.get(t)),a+=p.get(t))})),a/=r.length,t.forEach((function(t){n.has(t)||p.set(t,a)}))}else{var s=0;t.forEach((function(t){s+="horizontal"==e?c.has(t)?h[c.get(t)]:i.get(t):c.has(t)?u[c.get(t)]:i.get(t)})),s/=t.length,t.forEach((function(t){p.set(t,s)}))}}));for(var m=o((function(){var r=f.shift();t.get(r).forEach((function(t){if(p.get(t.id)s&&(s=v),xo&&(o=x)}}catch(t){d=!0,g=t}finally{try{!l&&m.return&&m.return()}finally{if(d)throw g}}var b=(r+s)/2-(a+o)/2,w=!0,k=!1,T=void 0;try{for(var _,E=t[Symbol.iterator]();!(w=(_=E.next()).done);w=!0){var C=_.value;p.set(C,p.get(C)+b)}}catch(t){k=!0,T=t}finally{try{!w&&E.return&&E.return()}finally{if(k)throw T}}}))}return p}),"findAppropriatePositionForRelativePlacement"),x=o((function(t){var e=0,n=0,r=0,i=0;if(t.forEach((function(t){t.left?h[c.get(t.left)]-h[c.get(t.right)]>=0?e++:n++:u[c.get(t.top)]-u[c.get(t.bottom)]>=0?r++:i++})),e>n&&r>i)for(var a=0;an)for(var s=0;si)for(var o=0;o1)e.fixedNodeConstraint.forEach((function(t,e){T[e]=[t.position.x,t.position.y],_[e]=[h[c.get(t.nodeId)],u[c.get(t.nodeId)]]})),E=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var n=e.alignmentConstraint.vertical,i=o((function(e){var i=new Set;n[e].forEach((function(t){i.add(t)}));var a=new Set([].concat(r(i)).filter((function(t){return S.has(t)}))),s=void 0;s=a.size>0?h[c.get(a.values().next().value)]:y(i).x,n[e].forEach((function(e){T[t]=[s,u[c.get(e)]],_[t]=[h[c.get(e)],u[c.get(e)]],t++}))}),"_loop2"),a=0;a0?h[c.get(i.values().next().value)]:y(n).y,s[e].forEach((function(e){T[t]=[h[c.get(e)],a],_[t]=[h[c.get(e)],u[c.get(e)]],t++}))}),"_loop3"),d=0;dI&&(I=N[R].length,M=R);if(I0){var X={x:0,y:0};e.fixedNodeConstraint.forEach((function(t,e){var n={x:h[c.get(t.nodeId)],y:u[c.get(t.nodeId)]},r=t.position,i=m(r,n);X.x+=i.x,X.y+=i.y})),X.x/=e.fixedNodeConstraint.length,X.y/=e.fixedNodeConstraint.length,h.forEach((function(t,e){h[e]+=X.x})),u.forEach((function(t,e){u[e]+=X.y})),e.fixedNodeConstraint.forEach((function(t){h[c.get(t.nodeId)]=t.position.x,u[c.get(t.nodeId)]=t.position.y}))}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var K=e.alignmentConstraint.vertical,Z=o((function(t){var e=new Set;K[t].forEach((function(t){e.add(t)}));var n=new Set([].concat(r(e)).filter((function(t){return S.has(t)}))),i=void 0;i=n.size>0?h[c.get(n.values().next().value)]:y(e).x,e.forEach((function(t){S.has(t)||(h[c.get(t)]=i)}))}),"_loop4"),Q=0;Q0?u[c.get(n.values().next().value)]:y(e).y,e.forEach((function(t){S.has(t)||(u[c.get(t)]=i)}))}),"_loop5"),et=0;et{e.exports=t}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var a=n[t]={exports:{}};return e[t](a,a.exports,r),a.exports}return o(r,"__webpack_require__"),r(45)})()}))}}),xRt=l({"../../node_modules/.pnpm/cytoscape-fcose@2.2.0_cytoscape@3.30.2/node_modules/cytoscape-fcose/cytoscape-fcose.js"(t,e){o((function(n,r){"object"==typeof t&&"object"==typeof e?e.exports=r(vRt()):"function"==typeof define&&define.amd?define(["cose-base"],r):"object"==typeof t?t.cytoscapeFcose=r(vRt()):n.cytoscapeFcose=r(n.coseBase)}),"webpackUniversalModuleDefinition")(t,(function(t){return(()=>{var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r{var r=function(){function t(t,e){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return o(t,"sliceIterator"),function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=n(140).layoutBase.LinkedList,a={getTopMostNodes:function(t){for(var e={},n=0;n0&&o.merge(t)}));for(var h=0;h1){h=l[0],u=h.connectedEdges().length,l.forEach((function(t){t.connectedEdges().length0&&r.set("dummy"+(r.size+1),g),f},relocateComponent:function(t,e,n){if(!n.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if("draft"==n.quality){var l=!0,c=!1,h=void 0;try{for(var u,d=e.nodeIndexes[Symbol.iterator]();!(l=(u=d.next()).done);l=!0){var p=u.value,g=r(p,2),f=g[0],m=g[1],y=n.cy.getElementById(f);if(y){var v=y.boundingBox(),x=e.xCoords[m]-v.w/2,b=e.xCoords[m]+v.w/2,w=e.yCoords[m]-v.h/2,k=e.yCoords[m]+v.h/2;xa&&(a=b),wo&&(o=k)}}}catch(t){c=!0,h=t}finally{try{!l&&d.return&&d.return()}finally{if(c)throw h}}var T=t.x-(a+i)/2,_=t.y-(o+s)/2;e.xCoords=e.xCoords.map((function(t){return t+T})),e.yCoords=e.yCoords.map((function(t){return t+_}))}else{Object.keys(e).forEach((function(t){var n=e[t],r=n.getRect().x,l=n.getRect().x+n.getRect().width,c=n.getRect().y,h=n.getRect().y+n.getRect().height;ra&&(a=l),co&&(o=h)}));var E=t.x-(a+i)/2,C=t.y-(o+s)/2;Object.keys(e).forEach((function(t){var n=e[t];n.setCenter(n.getCenterX()+E,n.getCenterY()+C)}))}}},calcBoundingBox:function(t,e,n,r){for(var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,l=void 0,c=void 0,h=void 0,u=void 0,d=t.descendants().not(":parent"),p=d.length,g=0;g(l=e[r.get(f.id())]-f.width()/2)&&(i=l),a<(c=e[r.get(f.id())]+f.width()/2)&&(a=c),s>(h=n[r.get(f.id())]-f.height()/2)&&(s=h),o<(u=n[r.get(f.id())]+f.height()/2)&&(o=u)}var m={};return m.topLeftX=i,m.topLeftY=s,m.width=a-i,m.height=o-s,m},calcParentsWithoutChildren:function(t,e){var n=t.collection();return e.nodes(":parent").forEach((function(t){var e=!1;t.children().forEach((function(t){"none"!=t.css("display")&&(e=!0)})),e||n.merge(t)})),n}};t.exports=a},816:(t,e,n)=>{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,s=n(140).layoutBase.PointD,l=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,h=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants,d=o((function(t,e){var n=t.cy,d=t.eles,p=d.nodes(),g=d.edges(),f=void 0,m=void 0,y=void 0,v={};t.randomize&&(f=e.nodeIndexes,m=e.xCoords,y=e.yCoords);var x=o((function(t){return"function"==typeof t}),"isFn"),b=o((function(t,e){return x(t)?t(e):t}),"optFn"),w=r.calcParentsWithoutChildren(n,d),k=o((function t(e,n,i,o){for(var c=n.length,h=0;h0){t(i.getGraphManager().add(i.newGraph(),p),d,i,o)}}}),"processChildrenList"),T=o((function(e,n,r){for(var i=0,a=0,s=0;s0?u.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=i/a:x(t.idealEdgeLength)?u.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=50:u.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,u.MIN_REPULSION_DIST=h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=h.DEFAULT_EDGE_LENGTH)}),"processEdges"),_=o((function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}),"processConstraints");null!=t.nestingFactor&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(u.DEFAULT_GRAVITY_STRENGTH=h.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(u.MAX_ITERATIONS=h.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=h.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=h.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(u.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?c.QUALITY=2:c.QUALITY=0,u.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!t.randomize,u.ANIMATE=h.ANIMATE=c.ANIMATE=t.animate,u.TILE=t.tile,u.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!t.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),"enforced"==t.step&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),"cose"==t.step&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?u.TREE_REDUCTION_ON_INCREMENTAL=!1:u.TREE_REDUCTION_ON_INCREMENTAL=!0;var E=new i,C=E.newGraphManager();return k(C.addRoot(),r.getTopMostNodes(p),E,t),T(E,C,g),_(E,t),E.runLayout(),v}),"coseLayout");t.exports={coseLayout:d}},212:(t,e,n)=>{var r=function(){function t(t,e){for(var n=0;n0)if(d){var p=s.getTopMostNodes(t.eles.nodes());if((a=s.connectComponents(e,t.eles,p)).forEach((function(t){var e=t.boundingBox();h.push({x:e.x1+e.w/2,y:e.y1+e.h/2})})),t.randomize&&a.forEach((function(e){t.eles=e,r.push(l(t))})),"default"==t.quality||"proof"==t.quality){var g=e.collection();if(t.tile){var f=0,m={nodeIndexes:new Map,xCoords:[],yCoords:[]},y=[];if(a.forEach((function(t,e){0==t.edges().length&&(t.nodes().forEach((function(e,n){g.merge(t.nodes()[n]),e.isParent()||(m.nodeIndexes.set(t.nodes()[n].id(),f++),m.xCoords.push(t.nodes()[0].position().x),m.yCoords.push(t.nodes()[0].position().y))})),y.push(e))})),g.length>1){var v=g.boundingBox();h.push({x:v.x1+v.w/2,y:v.y1+v.h/2}),a.push(g),r.push(m);for(var x=y.length-1;x>=0;x--)a.splice(y[x],1),r.splice(y[x],1),h.splice(y[x],1)}}a.forEach((function(e,n){t.eles=e,i.push(c(t,r[n])),s.relocateComponent(h[n],i[n],t)}))}else a.forEach((function(e,n){s.relocateComponent(h[n],r[n],t)}));var b=new Set;if(a.length>1){var w=[],k=n.filter((function(t){return"none"==t.css("display")}));a.forEach((function(e,n){var a=void 0;if("draft"==t.quality&&(a=r[n].nodeIndexes),e.nodes().not(k).length>0){var o={edges:[],nodes:[]},l=void 0;e.nodes().not(k).forEach((function(e){if("draft"==t.quality)if(e.isParent()){var c=s.calcBoundingBox(e,r[n].xCoords,r[n].yCoords,a);o.nodes.push({x:c.topLeftX,y:c.topLeftY,width:c.width,height:c.height})}else l=a.get(e.id()),o.nodes.push({x:r[n].xCoords[l]-e.boundingbox().w/2,y:r[n].yCoords[l]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else i[n][e.id()]&&o.nodes.push({x:i[n][e.id()].getLeft(),y:i[n][e.id()].getTop(),width:i[n][e.id()].getWidth(),height:i[n][e.id()].getHeight()})})),e.edges().forEach((function(e){var l=e.source(),c=e.target();if("none"!=l.css("display")&&"none"!=c.css("display"))if("draft"==t.quality){var h=a.get(l.id()),u=a.get(c.id()),d=[],p=[];if(l.isParent()){var g=s.calcBoundingBox(l,r[n].xCoords,r[n].yCoords,a);d.push(g.topLeftX+g.width/2),d.push(g.topLeftY+g.height/2)}else d.push(r[n].xCoords[h]),d.push(r[n].yCoords[h]);if(c.isParent()){var f=s.calcBoundingBox(c,r[n].xCoords,r[n].yCoords,a);p.push(f.topLeftX+f.width/2),p.push(f.topLeftY+f.height/2)}else p.push(r[n].xCoords[u]),p.push(r[n].yCoords[u]);o.edges.push({startX:d[0],startY:d[1],endX:p[0],endY:p[1]})}else i[n][l.id()]&&i[n][c.id()]&&o.edges.push({startX:i[n][l.id()].getCenterX(),startY:i[n][l.id()].getCenterY(),endX:i[n][c.id()].getCenterX(),endY:i[n][c.id()].getCenterY()})})),o.nodes.length>0&&(w.push(o),b.add(n))}}));var T=u.packComponents(w,t.randomize).shifts;if("draft"==t.quality)r.forEach((function(t,e){var n=t.xCoords.map((function(t){return t+T[e].dx})),r=t.yCoords.map((function(t){return t+T[e].dy}));t.xCoords=n,t.yCoords=r}));else{var _=0;b.forEach((function(t){Object.keys(i[t]).forEach((function(e){var n=i[t][e];n.setCenter(n.getCenterX()+T[_].dx,n.getCenterY()+T[_].dy)})),_++}))}}}else{var E=t.eles.boundingBox();if(h.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),t.randomize){var C=l(t);r.push(C)}"default"==t.quality||"proof"==t.quality?(i.push(c(t,r[0])),s.relocateComponent(h[0],i[0],t)):s.relocateComponent(h[0],r[0],t)}var S=o((function(e,n){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=n);var a=void 0,s=void 0,o=e.data("id");return i.forEach((function(t){o in t&&(a={x:t[o].getRect().getCenterX(),y:t[o].getRect().getCenterY()},s=t[o])})),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?a.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(a.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?a.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(a.y-=s.labelHeight/2))),null==a&&(a={x:e.position("x"),y:e.position("y")}),{x:a.x,y:a.y}}var l=void 0;return r.forEach((function(t){var n=t.nodeIndexes.get(e.id());null!=n&&(l={x:t.xCoords[n],y:t.yCoords[n]})})),null==l&&(l={x:e.position("x"),y:e.position("y")}),{x:l.x,y:l.y}}),"getPositions");if("default"==t.quality||"proof"==t.quality||t.randomize){var A=s.calcParentsWithoutChildren(e,n),L=n.filter((function(t){return"none"==t.css("display")}));t.eles=n.not(L),n.nodes().not(":parent").not(L).layoutPositions(this,t,S),A.length>0&&A.forEach((function(t){t.position(S(t))}))}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}),"run")}]),t}();t.exports=u},657:(t,e,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD,s=o((function(t){var e=t.cy,n=t.eles,s=n.nodes(),l=n.nodes(":parent"),c=new Map,h=new Map,u=new Map,d=[],p=[],g=[],f=[],m=[],y=[],v=[],x=[],b=void 0,w=1e8,k=1e-9,T=t.piTol,_=t.samplingType,E=t.nodeSeparation,C=void 0,S=o((function(){for(var t=0,e=0,n=!1;e=i;){s=r[i++];for(var g=d[s],f=0;fc&&(c=m[x],u=x)}return u}),"BFS"),L=o((function(t){var e=void 0;if(t){e=Math.floor(Math.random()*b);for(var n=0;n=1)break;c=l}for(var d=0;d=1)break;c=l}for(var m=0;m0&&(r.isParent()?d[e].push(u.get(r.id())):d[e].push(r.id()))}))}));var U=o((function(t){var n=h.get(t),r=void 0;c.get(t).forEach((function(i){r=e.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[h.get(r)].push(t)}))}),"_loop"),G=!0,q=!1,j=void 0;try{for(var Y,W=c.keys()[Symbol.iterator]();!(G=(Y=W.next()).done);G=!0){U(Y.value)}}catch(t){q=!0,j=t}finally{try{!G&&W.return&&W.return()}finally{if(q)throw j}}var H=void 0;if((b=h.size)>2){C=b{var r=n(212),i=o((function(t){t&&t("layout","fcose",r)}),"register");"undefined"!=typeof cytoscape&&i(cytoscape),t.exports=i},140:e=>{e.exports=t}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var a=n[t]={exports:{}};return e[t](a,a.exports,r),a.exports}return o(r,"__webpack_require__"),r(579)})()}))}}),bRt={L:"left",R:"right",T:"top",B:"bottom"},wRt={L:o((t=>`${t},${t/2} 0,${t} 0,0`),"L"),R:o((t=>`0,${t/2} ${t},0 ${t},${t}`),"R"),T:o((t=>`0,0 ${t},0 ${t/2},${t}`),"T"),B:o((t=>`${t/2},0 ${t},${t} 0,${t}`),"B")},kRt={L:o(((t,e)=>t-e+2),"L"),R:o(((t,e)=>t-2),"R"),T:o(((t,e)=>t-e+2),"T"),B:o(((t,e)=>t-2),"B")},TRt=o((function(t){return ERt(t)?"L"===t?"R":"L":"T"===t?"B":"T"}),"getOppositeArchitectureDirection"),_Rt=o((function(t){return"L"===t||"R"===t||"T"===t||"B"===t}),"isArchitectureDirection"),ERt=o((function(t){return"L"===t||"R"===t}),"isArchitectureDirectionX"),CRt=o((function(t){return"T"===t||"B"===t}),"isArchitectureDirectionY"),SRt=o((function(t,e){const n=ERt(t)&&CRt(e),r=CRt(t)&&ERt(e);return n||r}),"isArchitectureDirectionXY"),ARt=o((function(t){const e=t[0],n=t[1],r=ERt(e)&&CRt(n),i=CRt(e)&&ERt(n);return r||i}),"isArchitecturePairXY"),LRt=o((function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t}),"isValidArchitectureDirectionPair"),NRt=o((function(t,e){const n=`${t}${e}`;return LRt(n)?n:void 0}),"getArchitectureDirectionPair"),IRt=o((function([t,e],n){const r=n[0],i=n[1];return ERt(r)?CRt(i)?[t+("L"===r?-1:1),e+("T"===i?1:-1)]:[t+("L"===r?-1:1),e]:ERt(i)?[t+("L"===i?1:-1),e+("T"===r?1:-1)]:[t,e+("T"===r?1:-1)]}),"shiftPositionByArchitectureDirectionPair"),MRt=o((function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]}),"getArchitectureDirectionXYFactors"),RRt=o((function(t){return"service"===t.type}),"isArchitectureService"),DRt=o((function(t){return"junction"===t.type}),"isArchitectureJunction"),ORt=o((t=>t.data()),"edgeData"),PRt=o((t=>t.data()),"nodeData"),BRt=Lt.architecture,$Rt=new KK((()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:BRt,dataStructures:void 0,elements:{}}))),FRt=o((()=>{$Rt.reset(),Un()}),"clear"),zRt=o((function({id:t,icon:e,in:n,title:r,iconText:i}){if(void 0!==$Rt.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${$Rt.records.registeredIds[t]}`);if(void 0!==n){if(t===n)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===$Rt.records.registeredIds[n])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===$Rt.records.registeredIds[n])throw new Error(`The service [${t}]'s parent is not a group`)}$Rt.records.registeredIds[t]="node",$Rt.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:r,edges:[],in:n}}),"addService"),URt=o((()=>Object.values($Rt.records.nodes).filter(RRt)),"getServices"),GRt=o((function({id:t,in:e}){$Rt.records.registeredIds[t]="node",$Rt.records.nodes[t]={id:t,type:"junction",edges:[],in:e}}),"addJunction"),qRt=o((()=>Object.values($Rt.records.nodes).filter(DRt)),"getJunctions"),jRt=o((()=>Object.values($Rt.records.nodes)),"getNodes"),YRt=o((t=>$Rt.records.nodes[t]),"getNode"),WRt=o((function({id:t,icon:e,in:n,title:r}){if(void 0!==$Rt.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another ${$Rt.records.registeredIds[t]}`);if(void 0!==n){if(t===n)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===$Rt.records.registeredIds[n])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===$Rt.records.registeredIds[n])throw new Error(`The group [${t}]'s parent is not a group`)}$Rt.records.registeredIds[t]="group",$Rt.records.groups[t]={id:t,icon:e,title:r,in:n}}),"addGroup"),HRt=o((()=>Object.values($Rt.records.groups)),"getGroups"),VRt=o((function({lhsId:t,rhsId:e,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!_Rt(n))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${n}`);if(!_Rt(r))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(void 0===$Rt.records.nodes[t]&&void 0===$Rt.records.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===$Rt.records.nodes[e]&&void 0===$Rt.records.groups[t])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const c=$Rt.records.nodes[t].in,h=$Rt.records.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const u={lhsId:t,lhsDir:n,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:r,rhsInto:a,rhsGroup:o,title:l};$Rt.records.edges.push(u),$Rt.records.nodes[t]&&$Rt.records.nodes[e]&&($Rt.records.nodes[t].edges.push($Rt.records.edges[$Rt.records.edges.length-1]),$Rt.records.nodes[e].edges.push($Rt.records.edges[$Rt.records.edges.length-1]))}),"addEdge"),XRt=o((()=>$Rt.records.edges),"getEdges"),KRt=o((()=>{if(void 0===$Rt.records.dataStructures){const t=Object.entries($Rt.records.nodes).reduce(((t,[e,n])=>(t[e]=n.edges.reduce(((t,n)=>{if(n.lhsId===e){const e=NRt(n.lhsDir,n.rhsDir);e&&(t[e]=n.rhsId)}else{const e=NRt(n.rhsDir,n.lhsDir);e&&(t[e]=n.lhsId)}return t}),{}),t)),{}),e=Object.keys(t)[0],n={[e]:1},r=Object.keys(t).reduce(((t,n)=>n===e?t:{...t,[n]:1}),{}),i=o((e=>{const i={[e]:[0,0]},a=[e];for(;a.length>0;){const e=a.shift();if(e){n[e]=1,delete r[e];const s=t[e],[o,l]=i[e];Object.entries(s).forEach((([t,e])=>{n[e]||(i[e]=IRt([o,l],t),a.push(e))}))}}return i}),"BFS"),a=[i(e)];for(;Object.keys(r).length>0;)a.push(i(Object.keys(r)[0]));$Rt.records.dataStructures={adjList:t,spatialMaps:a}}return $Rt.records.dataStructures}),"getDataStructures"),ZRt=o(((t,e)=>{$Rt.records.elements[t]=e}),"setElementForId"),QRt=o((t=>$Rt.records.elements[t]),"getElementById"),JRt={clear:FRt,setDiagramTitle:Wn,getDiagramTitle:Hn,setAccTitle:Gn,getAccTitle:qn,setAccDescription:jn,getAccDescription:Yn,addService:zRt,getServices:URt,addJunction:GRt,getJunctions:qRt,getNodes:jRt,getNode:YRt,addGroup:WRt,getGroups:HRt,addEdge:VRt,getEdges:XRt,setElementForId:ZRt,getElementById:QRt,getDataStructures:KRt};function tDt(t){const e=Kn().architecture;return e?.[t]?e[t]:BRt[t]}o(tDt,"getConfigField");var eDt=o(((t,e)=>{ZK(t,e),t.groups.map(e.addGroup),t.services.map((t=>e.addService({...t,type:"service"}))),t.junctions.map((t=>e.addJunction({...t,type:"junction"}))),t.edges.map(e.addEdge)}),"populateDb"),nDt={parse:o((async t=>{const e=await cnt("architecture",t);y.debug(e),eDt(e,JRt)}),"parse")},rDt=o((t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`),"getStyles"),iDt=p(xRt(),1),aDt=o((t=>`${t}`),"wrapIcon"),sDt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:aDt('')},server:{body:aDt('')},disk:{body:aDt('')},internet:{body:aDt('')},cloud:{body:aDt('')},unknown:Py,blank:{body:aDt("")}}},oDt=o((async function(t,e){const n=tDt("padding"),r=tDt("iconSize"),i=r/2,a=r/6,s=a/2;await Promise.all(e.edges().map((async e=>{const{source:r,sourceDir:o,sourceArrow:l,sourceGroup:c,target:h,targetDir:u,targetArrow:d,targetGroup:p,label:g}=ORt(e);let{x:f,y:m}=e[0].sourceEndpoint();const{x:y,y:v}=e[0].midpoint();let{x:x,y:b}=e[0].targetEndpoint();const w=n+4;if(c&&(ERt(o)?f+="L"===o?-w:w:m+="T"===o?-w:w+18),p&&(ERt(u)?x+="L"===u?-w:w:b+="T"===u?-w:w+18),c||"junction"!==JRt.getNode(r)?.type||(ERt(o)?f+="L"===o?i:-i:m+="T"===o?i:-i),p||"junction"!==JRt.getNode(h)?.type||(ERt(u)?x+="L"===u?i:-i:b+="T"===u?i:-i),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${f},${m} L ${y},${v} L${x},${b} `).attr("class","edge"),l){const t=ERt(o)?kRt[o](f,a):f-s,n=CRt(o)?kRt[o](m,a):m-s;e.insert("polygon").attr("points",wRt[o](a)).attr("transform",`translate(${t},${n})`).attr("class","arrow")}if(d){const t=ERt(u)?kRt[u](x,a):x-s,n=CRt(u)?kRt[u](b,a):b-s;e.insert("polygon").attr("points",wRt[u](a)).attr("transform",`translate(${t},${n})`).attr("class","arrow")}if(g){const t=SRt(o,u)?"XY":ERt(o)?"X":"Y";let n=0;n="X"===t?Math.abs(f-x):"Y"===t?Math.abs(m-b)/1.5:Math.abs(f-x)/2;const r=e.append("g");if(await g_(r,g,{useHtmlLabels:!1,width:n,classes:"architecture-service-label"},Kn()),r.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)r.attr("transform","translate("+y+", "+v+")");else if("Y"===t)r.attr("transform","translate("+y+", "+v+") rotate(-90)");else if("XY"===t){const t=NRt(o,u);if(t&&ARt(t)){const e=r.node().getBoundingClientRect(),[n,i]=MRt(t);r.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*n*i*45})`);const a=r.node().getBoundingClientRect();r.attr("transform",`\n translate(${y}, ${v-e.height/2})\n translate(${n*a.width/2}, ${i*a.height/2})\n rotate(${-1*n*i*45}, 0, ${e.height/2})\n `)}}}}})))}),"drawEdges"),lDt=o((async function(t,e){const n=.75*tDt("padding"),r=tDt("fontSize"),i=tDt("iconSize")/2;await Promise.all(e.nodes().map((async e=>{const a=PRt(e);if("group"===a.type){const{h:s,w:o,x1:l,y1:c}=e.boundingBox();t.append("rect").attr("x",l+i).attr("y",c+i).attr("width",o).attr("height",s).attr("class","node-bkg");const h=t.append("g");let u=l,d=c;if(a.icon){const t=h.append("g");t.html(`${await Uy(a.icon,{height:n,width:n,fallbackPrefix:sDt.prefix})}`),t.attr("transform","translate("+(u+i+1)+", "+(d+i+1)+")"),u+=n,d+=r/2-1-2}if(a.label){const t=h.append("g");await g_(t,a.label,{useHtmlLabels:!1,width:o,classes:"architecture-service-label"},Kn()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(u+i+4)+", "+(d+i+2)+")")}}})))}),"drawGroups"),cDt=o((async function(t,e,n){for(const r of n){const n=e.append("g"),i=tDt("iconSize");if(r.title){const t=n.append("g");await g_(t,r.title,{useHtmlLabels:!1,width:1.5*i,classes:"architecture-service-label"},Kn()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+i/2+", "+i+")")}const a=n.append("g");if(r.icon)a.html(`${await Uy(r.icon,{height:i,width:i,fallbackPrefix:sDt.prefix})}`);else if(r.iconText){a.html(`${await Uy("blank",{height:i,width:i,fallbackPrefix:sDt.prefix})}`);const t=a.append("g").append("foreignObject").attr("width",i).attr("height",i).append("div").attr("class","node-icon-text").attr("style",`height: ${i}px;`).append("div").html(r.iconText),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((i-2)/e)};`)}else a.append("path").attr("class","node-bkg").attr("id","node-"+r.id).attr("d",`M0 ${i} v${-i} q0,-5 5,-5 h${i} q5,0 5,5 v${i} H0 Z`);n.attr("class","architecture-service");const{width:s,height:o}=n._groups[0][0].getBBox();r.width=s,r.height=o,t.setElementForId(r.id,n)}return 0}),"drawServices"),hDt=o((function(t,e,n){n.forEach((n=>{const r=e.append("g"),i=tDt("iconSize");r.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",i).attr("height",i),r.attr("class","architecture-junction");const{width:a,height:s}=r._groups[0][0].getBBox();r.width=a,r.height=s,t.setElementForId(n.id,r)}))}),"drawJunctions");function uDt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:tDt("iconSize"),height:tDt("iconSize")},classes:"node-service"})}))}function dDt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:tDt("iconSize"),height:tDt("iconSize")},classes:"node-junction"})}))}function pDt(t,e){e.nodes().map((e=>{const n=PRt(e);if("group"===n.type)return;n.x=e.position().x,n.y=e.position().y;t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")}))}function gDt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})}))}function fDt(t,e){t.forEach((t=>{const{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:s,lhsDir:o,rhsDir:l,rhsGroup:c,title:h}=t,u=SRt(t.lhsDir,t.rhsDir)?"segments":"straight",d={id:`${n}-${r}`,label:h,source:n,sourceDir:o,sourceArrow:i,sourceGroup:a,sourceEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%",target:r,targetDir:l,targetArrow:s,targetGroup:c,targetEndpoint:"L"===l?"0 50%":"R"===l?"100% 50%":"T"===l?"50% 0":"50% 100%"};e.add({group:"edges",data:d,classes:u})}))}function mDt(t){const e=t.map((t=>{const e={},n={};return Object.entries(t).forEach((([t,[r,i]])=>{e[i]||(e[i]=[]),n[r]||(n[r]=[]),e[i].push(t),n[r].push(t)})),{horiz:Object.values(e).filter((t=>t.length>1)),vert:Object.values(n).filter((t=>t.length>1))}})),[n,r]=e.reduce((([t,e],{horiz:n,vert:r})=>[[...t,...n],[...e,...r]]),[[],[]]);return{horizontal:n,vertical:r}}function yDt(t){const e=[],n=o((t=>`${t[0]},${t[1]}`),"posToStr"),r=o((t=>t.split(",").map((t=>parseInt(t)))),"strToPos");return t.forEach((t=>{const i=Object.fromEntries(Object.entries(t).map((([t,e])=>[n(e),t]))),a=[n([0,0])],s={},o={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){const t=a.shift();if(t){s[t]=1;const l=i[t];if(l){const c=r(t);Object.entries(o).forEach((([t,r])=>{const o=n([c[0]+r[0],c[1]+r[1]]),h=i[o];h&&!s[o]&&(a.push(o),e.push({[bRt[t]]:h,[bRt[TRt(t)]]:l,gap:1.5*tDt("iconSize")}))}))}}}})),e}function vDt(t,e,n,r,{spatialMaps:i}){return new Promise((a=>{const s=Fa("body").append("div").attr("id","cy").attr("style","display:none"),l=mAt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${tDt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${tDt("padding")}px`}}]});s.remove(),gDt(n,l),uDt(t,l),dDt(e,l),fDt(r,l);const c=mDt(i),h=yDt(i),u=l.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,n]=t.connectedNodes(),{parent:r}=PRt(e),{parent:i}=PRt(n);return r===i?1.5*tDt("iconSize"):.5*tDt("iconSize")},edgeElasticity(t){const[e,n]=t.connectedNodes(),{parent:r}=PRt(e),{parent:i}=PRt(n);return r===i?.45:.001},alignmentConstraint:c,relativePlacementConstraint:h});u.one("layoutstop",(()=>{function t(t,e,n,r){let i,a;const{x:s,y:o}=t,{x:l,y:c}=e;a=(r-o+(s-n)*(o-c)/(s-l))/Math.sqrt(1+Math.pow((o-c)/(s-l),2)),i=Math.sqrt(Math.pow(r-o,2)+Math.pow(n-s,2)-Math.pow(a,2));i/=Math.sqrt(Math.pow(l-s,2)+Math.pow(c-o,2));let h=(l-s)*(r-o)-(c-o)*(n-s);switch(!0){case h>=0:h=1;break;case h<0:h=-1}let u=(l-s)*(n-s)+(c-o)*(r-o);switch(!0){case u>=0:u=1;break;case u<0:u=-1}return a=Math.abs(a)*h,i*=u,{distances:a,weights:i}}o(t,"getSegmentWeights"),l.startBatch();for(const e of Object.values(l.edges()))if(e.data?.()){const{x:n,y:r}=e.source().position(),{x:i,y:a}=e.target().position();if(n!==i&&r!==a){const n=e.sourceEndpoint(),r=e.targetEndpoint(),{sourceDir:i}=ORt(e),[a,s]=CRt(i)?[n.x,r.y]:[r.x,n.y],{weights:o,distances:l}=t(n,r,a,s);e.style("segment-distances",l),e.style("segment-weights",o)}}l.endBatch(),u.run()})),u.run(),l.ready((t=>{y.info("Ready",t),a(l)}))}))}Fy([{name:sDt.prefix,icons:sDt}]),mAt.use(iDt.default),o(uDt,"addServices"),o(dDt,"addJunctions"),o(pDt,"positionNodes"),o(gDt,"addGroups"),o(fDt,"addEdges"),o(mDt,"getAlignments"),o(yDt,"getRelativeConstraints"),o(vDt,"layoutArchitecture");var xDt=o((async(t,e,n,r)=>{const i=r.db,a=i.getServices(),s=i.getJunctions(),o=i.getGroups(),l=i.getEdges(),c=i.getDataStructures(),h=ng(e),u=h.append("g");u.attr("class","architecture-edges");const d=h.append("g");d.attr("class","architecture-services");const p=h.append("g");p.attr("class","architecture-groups"),await cDt(i,d,a),hDt(i,d,s);const g=await vDt(a,s,o,l,c);await oDt(u,g),await lDt(p,g),pDt(i,g),In(void 0,h,tDt("padding"),tDt("useMaxWidth"))}),"draw"),bDt={parser:nDt,db:JRt,renderer:{draw:xDt},styles:rDt},wDt=Object.freeze({__proto__:null,diagram:bDt}),kDt=Object.freeze({__proto__:null,InfoModule:Tnt,createInfoServices:_nt}),TDt=Object.freeze({__proto__:null,PacketModule:Cnt,createPacketServices:Snt}),_Dt=Object.freeze({__proto__:null,PieModule:pnt,createPieServices:gnt}),EDt=Object.freeze({__proto__:null,ArchitectureModule:ynt,createArchitectureServices:vnt}),CDt=Object.freeze({__proto__:null,GitGraphModule:bnt,createGitGraphServices:wnt});return()=>NI}));