var Fy=Object.defineProperty,Oy=Object.defineProperties;var Ry=Object.getOwnPropertyDescriptors;var Df=Object.getOwnPropertySymbols;var Ny=Object.prototype.hasOwnProperty,zy=Object.prototype.propertyIsEnumerable;var Oi=Math.pow,D0=(e,t,r)=>t in e?Fy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qt=(e,t)=>{for(var r in t||(t={}))Ny.call(t,r)&&D0(e,r,t[r]);if(Df)for(var r of Df(t))zy.call(t,r)&&D0(e,r,t[r]);return e},de=(e,t)=>Oy(e,Ry(t));var ye=(e,t,r)=>(D0(e,typeof t!="symbol"?t+"":t,r),r);var ct=(e,t,r)=>new Promise((i,n)=>{var s=f=>{try{o(r.next(f))}catch(h){n(h)}},l=f=>{try{o(r.throw(f))}catch(h){n(h)}},o=f=>f.done?i(f.value):Promise.resolve(f.value).then(s,l);o((r=r.apply(e,t)).next())});import{c as Fd,g as Od}from"./utils-vendor-c35799af.js";function $y(e,t){for(var r=0;ri[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Iy="modulepreload",Py=function(e,t){return new URL(e,t).href},Ff={},pe=function(t,r,i){if(!r||r.length===0)return t();const n=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=Py(s,i),s in Ff)return;Ff[s]=!0;const l=s.endsWith(".css"),o=l?'[rel="stylesheet"]':"";if(!!i)for(let d=n.length-1;d>=0;d--){const m=n[d];if(m.href===s&&(!l||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${o}`))return;const h=document.createElement("link");if(h.rel=l?"stylesheet":Iy,l||(h.as="script",h.crossOrigin=""),h.href=s,document.head.appendChild(h),l)return new Promise((d,m)=>{h.addEventListener("load",d),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s})};var Rd={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Fd,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",l="second",o="minute",f="hour",h="day",d="week",m="month",y="quarter",g="year",w="date",S="Invalid Date",B=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={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:function(Z){var rt=["th","st","nd","rd"],nt=Z%100;return"["+Z+(rt[(nt-20)%10]||rt[nt]||rt[0])+"]"}},z=function(Z,rt,nt){var at=String(Z);return!at||at.length>=rt?Z:""+Array(rt+1-at.length).join(nt)+Z},R={s:z,z:function(Z){var rt=-Z.utcOffset(),nt=Math.abs(rt),at=Math.floor(nt/60),et=nt%60;return(rt<=0?"+":"-")+z(at,2,"0")+":"+z(et,2,"0")},m:function Z(rt,nt){if(rt.date()1)return Z(ot[0])}else{var J=rt.name;A[J]=rt,et=J}return!at&&et&&($=et),et||!at&&$},j=function(Z,rt){if(U(Z))return Z.clone();var nt=typeof rt=="object"?rt:{};return nt.date=Z,nt.args=arguments,new lt(nt)},P=R;P.l=X,P.i=U,P.w=function(Z,rt){return j(Z,{locale:rt.$L,utc:rt.$u,x:rt.$x,$offset:rt.$offset})};var lt=function(){function Z(nt){this.$L=X(nt.locale,null,!0),this.parse(nt),this.$x=this.$x||nt.x||{},this[N]=!0}var rt=Z.prototype;return rt.parse=function(nt){this.$d=function(at){var et=at.date,it=at.utc;if(et===null)return new Date(NaN);if(P.u(et))return new Date;if(et instanceof Date)return new Date(et);if(typeof et=="string"&&!/Z$/i.test(et)){var ot=et.match(B);if(ot){var J=ot[2]-1||0,xt=(ot[7]||"0").substring(0,3);return it?new Date(Date.UTC(ot[1],J,ot[3]||1,ot[4]||0,ot[5]||0,ot[6]||0,xt)):new Date(ot[1],J,ot[3]||1,ot[4]||0,ot[5]||0,ot[6]||0,xt)}}return new Date(et)}(nt),this.init()},rt.init=function(){var nt=this.$d;this.$y=nt.getFullYear(),this.$M=nt.getMonth(),this.$D=nt.getDate(),this.$W=nt.getDay(),this.$H=nt.getHours(),this.$m=nt.getMinutes(),this.$s=nt.getSeconds(),this.$ms=nt.getMilliseconds()},rt.$utils=function(){return P},rt.isValid=function(){return this.$d.toString()!==S},rt.isSame=function(nt,at){var et=j(nt);return this.startOf(at)<=et&&et<=this.endOf(at)},rt.isAfter=function(nt,at){return j(nt)e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;switch(i){case"r":return lo.hue2rgb(s,n,e+1/3)*255;case"g":return lo.hue2rgb(s,n,e)*255;case"b":return lo.hue2rgb(s,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),s=Math.min(e,t,r),l=(n+s)/2;if(i==="l")return l*100;if(n===s)return 0;const o=n-s,f=l>.5?o/(2-n-s):o/(n+s);if(i==="s")return f*100;switch(n){case e:return((t-r)/o+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Uy=Wy,jy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Yy=jy,Gy={channel:Hy,lang:Uy,unit:Yy},Wt=Gy,Ri={};for(let e=0;e<=255;e++)Ri[e]=Wt.unit.dec2hex(e);const Xe={ALL:0,RGB:1,HSL:2};class Vy{constructor(){this.type=Xe.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Xe.ALL}is(t){return this.type===t}}const Xy=Vy;class Zy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Xy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Xe.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=Wt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Wt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=Wt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=Wt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Wt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=Wt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Xe.HSL)&&r!==void 0?r:(this._ensureHSL(),Wt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Xe.HSL)&&r!==void 0?r:(this._ensureHSL(),Wt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Xe.HSL)&&r!==void 0?r:(this._ensureHSL(),Wt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Xe.RGB)&&r!==void 0?r:(this._ensureRGB(),Wt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Xe.RGB)&&r!==void 0?r:(this._ensureRGB(),Wt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Xe.RGB)&&r!==void 0?r:(this._ensureRGB(),Wt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Xe.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Xe.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Xe.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Xe.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Xe.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Xe.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ky=Zy,Qy=new Ky({r:0,g:0,b:0,a:0},"transparent"),bl=Qy,Nd={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Nd.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,s=n%4===0,l=n>4,o=l?1:17,f=l?8:4,h=s?0:-1,d=l?255:15;return bl.set({r:(i>>f*(h+3)&d)*o,g:(i>>f*(h+2)&d)*o,b:(i>>f*(h+1)&d)*o,a:s?(i&d)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Ri[Math.round(t)]}${Ri[Math.round(r)]}${Ri[Math.round(i)]}${Ri[Math.round(n*255)]}`:`#${Ri[Math.round(t)]}${Ri[Math.round(r)]}${Ri[Math.round(i)]}`}},Ws=Nd,co={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:e=>{const t=e.match(co.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Wt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Wt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Wt.channel.clamp.h(parseFloat(r)*360)}}return Wt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(co.re);if(!r)return;const[,i,n,s,l,o]=r;return bl.set({h:co._hue2deg(i),s:Wt.channel.clamp.s(parseFloat(n)),l:Wt.channel.clamp.l(parseFloat(s)),a:l?Wt.channel.clamp.a(o?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${Wt.lang.round(t)}, ${Wt.lang.round(r)}%, ${Wt.lang.round(i)}%, ${n})`:`hsl(${Wt.lang.round(t)}, ${Wt.lang.round(r)}%, ${Wt.lang.round(i)}%)`}},Ya=co,ho={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:e=>{e=e.toLowerCase();const t=ho.colors[e];if(t)return Ws.parse(t)},stringify:e=>{const t=Ws.stringify(e);for(const r in ho.colors)if(ho.colors[r]===t)return r}},Of=ho,zd={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:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(zd.re);if(!r)return;const[,i,n,s,l,o,f,h,d]=r;return bl.set({r:Wt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:Wt.channel.clamp.g(l?parseFloat(s)*2.55:parseFloat(s)),b:Wt.channel.clamp.b(f?parseFloat(o)*2.55:parseFloat(o)),a:h?Wt.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${Wt.lang.round(t)}, ${Wt.lang.round(r)}, ${Wt.lang.round(i)}, ${Wt.lang.round(n)})`:`rgb(${Wt.lang.round(t)}, ${Wt.lang.round(r)}, ${Wt.lang.round(i)})`}},Ga=zd,Jy={format:{keyword:Of,hex:Ws,rgb:Ga,rgba:Ga,hsl:Ya,hsla:Ya},parse:e=>{if(typeof e!="string")return e;const t=Ws.parse(e)||Ga.parse(e)||Ya.parse(e)||Of.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xe.HSL)||e.data.r===void 0?Ya.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ga.stringify(e):Ws.stringify(e)},Hr=Jy,t6=(e,t)=>{const r=Hr.parse(e);for(const i in t)r[i]=Wt.channel.clamp[i](t[i]);return Hr.stringify(r)},$d=t6,e6=(e,t,r=0,i=1)=>{if(typeof e!="number")return $d(e,{a:t});const n=bl.set({r:Wt.channel.clamp.r(e),g:Wt.channel.clamp.g(t),b:Wt.channel.clamp.b(r),a:Wt.channel.clamp.a(i)});return Hr.stringify(n)},Us=e6,r6=(e,t)=>Wt.lang.round(Hr.parse(e)[t]),oD=r6,i6=e=>{const{r:t,g:r,b:i}=Hr.parse(e),n=.2126*Wt.channel.toLinear(t)+.7152*Wt.channel.toLinear(r)+.0722*Wt.channel.toLinear(i);return Wt.lang.round(n)},n6=i6,s6=e=>n6(e)>=.5,a6=s6,o6=e=>!a6(e),ya=o6,l6=(e,t,r)=>{const i=Hr.parse(e),n=i[t],s=Wt.channel.clamp[t](n+r);return n!==s&&(i[t]=s),Hr.stringify(i)},Id=l6,c6=(e,t)=>Id(e,"l",t),At=c6,h6=(e,t)=>Id(e,"l",-t),zt=h6,u6=(e,t)=>{const r=Hr.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return $d(e,i)},G=u6,f6=(e,t,r=50)=>{const{r:i,g:n,b:s,a:l}=Hr.parse(e),{r:o,g:f,b:h,a:d}=Hr.parse(t),m=r/100,y=m*2-1,g=l-d,S=((y*g===-1?y:(y+g)/(1+y*g))+1)/2,B=1-S,T=i*S+o*B,L=n*S+f*B,z=s*S+h*B,R=l*m+d*(1-m);return Us(T,L,z,R)},d6=f6,p6=(e,t=100)=>{const r=Hr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,d6(r,e,t)},kt=p6;/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:Pd,setPrototypeOf:Rf,isFrozen:m6,getPrototypeOf:g6,getOwnPropertyDescriptor:y6}=Object;let{freeze:cr,seal:Or,create:qd}=Object,{apply:hc,construct:uc}=typeof Reflect!="undefined"&&Reflect;cr||(cr=function(t){return t});Or||(Or=function(t){return t});hc||(hc=function(t,r,i){return t.apply(r,i)});uc||(uc=function(t,r){return new t(...r)});const Va=hr(Array.prototype.forEach),b6=hr(Array.prototype.lastIndexOf),Nf=hr(Array.prototype.pop),vs=hr(Array.prototype.push),x6=hr(Array.prototype.splice),uo=hr(String.prototype.toLowerCase),F0=hr(String.prototype.toString),zf=hr(String.prototype.match),Cs=hr(String.prototype.replace),w6=hr(String.prototype.indexOf),k6=hr(String.prototype.trim),zr=hr(Object.prototype.hasOwnProperty),nr=hr(RegExp.prototype.test),Ss=v6(TypeError);function hr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:uo;Rf&&Rf(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const s=r(n);s!==n&&(m6(t)||(t[i]=s),n=s)}e[n]=!0}return e}function C6(e){for(let t=0;t/gm),A6=Or(/\$\{[\w\W]*/gm),B6=Or(/^data-[\-\w.\u00B7-\uFFFF]+$/),L6=Or(/^aria-[\-\w]+$/),Hd=Or(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),E6=Or(/^(?:\w+script|data):/i),D6=Or(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wd=Or(/^html$/i),F6=Or(/^[a-z][.\w]*(-[.\w]+)+$/i);var Hf=Object.freeze({__proto__:null,ARIA_ATTR:L6,ATTR_WHITESPACE:D6,CUSTOM_ELEMENT:F6,DATA_ATTR:B6,DOCTYPE_NAME:Wd,ERB_EXPR:M6,IS_ALLOWED_URI:Hd,IS_SCRIPT_OR_DATA:E6,MUSTACHE_EXPR:T6,TMPLIT_EXPR:A6});const Ts={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},O6=function(){return typeof window=="undefined"?null:window},R6=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch(l){return null}},Wf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ud(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O6();const t=vt=>Ud(vt);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Ts.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:o,Element:f,NodeFilter:h,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:m,DOMParser:y,trustedTypes:g}=e,w=f.prototype,S=_s(w,"cloneNode"),B=_s(w,"remove"),T=_s(w,"nextSibling"),L=_s(w,"childNodes"),z=_s(w,"parentNode");if(typeof l=="function"){const vt=r.createElement("template");vt.content&&vt.content.ownerDocument&&(r=vt.content.ownerDocument)}let R,$="";const{implementation:A,createNodeIterator:N,createDocumentFragment:U,getElementsByTagName:X}=r,{importNode:j}=i;let P=Wf();t.isSupported=typeof Pd=="function"&&typeof z=="function"&&A&&A.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:lt,ERB_EXPR:Q,TMPLIT_EXPR:Z,DATA_ATTR:rt,ARIA_ATTR:nt,IS_SCRIPT_OR_DATA:at,ATTR_WHITESPACE:et,CUSTOM_ELEMENT:it}=Hf;let{IS_ALLOWED_URI:ot}=Hf,J=null;const xt=Xt({},[...$f,...O0,...R0,...N0,...If]);let ft=null;const wt=Xt({},[...Pf,...z0,...qf,...Xa]);let st=Object.seal(qd(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}})),Nt=null,Ut=null,Vt=!0,yt=!0,_t=!1,It=!0,dt=!1,ue=!0,Zt=!1,Fe=!1,Le=!1,Ye=!1,yr=!1,er=!1,Ui=!0,ps=!1;const Xl="user-content-";let ji=!0,ai=!1,Li={},Ei=null;const ms=Xt({},["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 gs=null;const Sr=Xt({},["audio","video","img","source","image","track"]);let ys=null;const Mn=Xt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),An="http://www.w3.org/1998/Math/MathML",Yi="http://www.w3.org/2000/svg",re="http://www.w3.org/1999/xhtml";let bt=re,_r=!1,Bn=null;const Aa=Xt({},[An,Yi,re],F0);let Ln=Xt({},["mi","mo","mn","ms","mtext"]),Gi=Xt({},["annotation-xml"]);const Vi=Xt({},["title","style","font","a","script"]);let oi=null;const Zl=["application/xhtml+xml","text/html"],Kl="text/html";let ae=null,Ge=null;const Ur=r.createElement("form"),En=function(W){return W instanceof RegExp||W instanceof Function},Dn=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ge&&Ge===W)){if((!W||typeof W!="object")&&(W={}),W=en(W),oi=Zl.indexOf(W.PARSER_MEDIA_TYPE)===-1?Kl:W.PARSER_MEDIA_TYPE,ae=oi==="application/xhtml+xml"?F0:uo,J=zr(W,"ALLOWED_TAGS")?Xt({},W.ALLOWED_TAGS,ae):xt,ft=zr(W,"ALLOWED_ATTR")?Xt({},W.ALLOWED_ATTR,ae):wt,Bn=zr(W,"ALLOWED_NAMESPACES")?Xt({},W.ALLOWED_NAMESPACES,F0):Aa,ys=zr(W,"ADD_URI_SAFE_ATTR")?Xt(en(Mn),W.ADD_URI_SAFE_ATTR,ae):Mn,gs=zr(W,"ADD_DATA_URI_TAGS")?Xt(en(Sr),W.ADD_DATA_URI_TAGS,ae):Sr,Ei=zr(W,"FORBID_CONTENTS")?Xt({},W.FORBID_CONTENTS,ae):ms,Nt=zr(W,"FORBID_TAGS")?Xt({},W.FORBID_TAGS,ae):{},Ut=zr(W,"FORBID_ATTR")?Xt({},W.FORBID_ATTR,ae):{},Li=zr(W,"USE_PROFILES")?W.USE_PROFILES:!1,Vt=W.ALLOW_ARIA_ATTR!==!1,yt=W.ALLOW_DATA_ATTR!==!1,_t=W.ALLOW_UNKNOWN_PROTOCOLS||!1,It=W.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dt=W.SAFE_FOR_TEMPLATES||!1,ue=W.SAFE_FOR_XML!==!1,Zt=W.WHOLE_DOCUMENT||!1,Ye=W.RETURN_DOM||!1,yr=W.RETURN_DOM_FRAGMENT||!1,er=W.RETURN_TRUSTED_TYPE||!1,Le=W.FORCE_BODY||!1,Ui=W.SANITIZE_DOM!==!1,ps=W.SANITIZE_NAMED_PROPS||!1,ji=W.KEEP_CONTENT!==!1,ai=W.IN_PLACE||!1,ot=W.ALLOWED_URI_REGEXP||Hd,bt=W.NAMESPACE||re,Ln=W.MATHML_TEXT_INTEGRATION_POINTS||Ln,Gi=W.HTML_INTEGRATION_POINTS||Gi,st=W.CUSTOM_ELEMENT_HANDLING||{},W.CUSTOM_ELEMENT_HANDLING&&En(W.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=W.CUSTOM_ELEMENT_HANDLING.tagNameCheck),W.CUSTOM_ELEMENT_HANDLING&&En(W.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=W.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),W.CUSTOM_ELEMENT_HANDLING&&typeof W.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=W.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),dt&&(yt=!1),yr&&(Ye=!0),Li&&(J=Xt({},If),ft=[],Li.html===!0&&(Xt(J,$f),Xt(ft,Pf)),Li.svg===!0&&(Xt(J,O0),Xt(ft,z0),Xt(ft,Xa)),Li.svgFilters===!0&&(Xt(J,R0),Xt(ft,z0),Xt(ft,Xa)),Li.mathMl===!0&&(Xt(J,N0),Xt(ft,qf),Xt(ft,Xa))),W.ADD_TAGS&&(J===xt&&(J=en(J)),Xt(J,W.ADD_TAGS,ae)),W.ADD_ATTR&&(ft===wt&&(ft=en(ft)),Xt(ft,W.ADD_ATTR,ae)),W.ADD_URI_SAFE_ATTR&&Xt(ys,W.ADD_URI_SAFE_ATTR,ae),W.FORBID_CONTENTS&&(Ei===ms&&(Ei=en(Ei)),Xt(Ei,W.FORBID_CONTENTS,ae)),ji&&(J["#text"]=!0),Zt&&Xt(J,["html","head","body"]),J.table&&(Xt(J,["tbody"]),delete Nt.tbody),W.TRUSTED_TYPES_POLICY){if(typeof W.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ss('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof W.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ss('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');R=W.TRUSTED_TYPES_POLICY,$=R.createHTML("")}else R===void 0&&(R=R6(g,n)),R!==null&&typeof $=="string"&&($=R.createHTML(""));cr&&cr(W),Ge=W}},Ba=Xt({},[...O0,...R0,...S6]),La=Xt({},[...N0,..._6]),Ql=function(W){let gt=z(W);(!gt||!gt.tagName)&&(gt={namespaceURI:bt,tagName:"template"});const F=uo(W.tagName),Qt=uo(gt.tagName);return Bn[W.namespaceURI]?W.namespaceURI===Yi?gt.namespaceURI===re?F==="svg":gt.namespaceURI===An?F==="svg"&&(Qt==="annotation-xml"||Ln[Qt]):!!Ba[F]:W.namespaceURI===An?gt.namespaceURI===re?F==="math":gt.namespaceURI===Yi?F==="math"&&Gi[Qt]:!!La[F]:W.namespaceURI===re?gt.namespaceURI===Yi&&!Gi[Qt]||gt.namespaceURI===An&&!Ln[Qt]?!1:!La[F]&&(Vi[F]||!Ba[F]):!!(oi==="application/xhtml+xml"&&Bn[W.namespaceURI]):!1},rr=function(W){vs(t.removed,{element:W});try{z(W).removeChild(W)}catch(gt){B(W)}},be=function(W,gt){try{vs(t.removed,{attribute:gt.getAttributeNode(W),from:gt})}catch(F){vs(t.removed,{attribute:null,from:gt})}if(gt.removeAttribute(W),W==="is")if(Ye||yr)try{rr(gt)}catch(F){}else try{gt.setAttribute(W,"")}catch(F){}},x=function(W){let gt=null,F=null;if(Le)W=""+W;else{const Ee=zf(W,/^[\r\n\t ]+/);F=Ee&&Ee[0]}oi==="application/xhtml+xml"&&bt===re&&(W=''+W+"");const Qt=R?R.createHTML(W):W;if(bt===re)try{gt=new y().parseFromString(Qt,oi)}catch(Ee){}if(!gt||!gt.documentElement){gt=A.createDocument(bt,"template",null);try{gt.documentElement.innerHTML=_r?$:Qt}catch(Ee){}}const H=gt.body||gt.documentElement;return W&&F&&H.insertBefore(r.createTextNode(F),H.childNodes[0]||null),bt===re?X.call(gt,Zt?"html":"body")[0]:Zt?gt.documentElement:H},C=function(W){return N.call(W.ownerDocument||W,W,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},ut=function(W){return W instanceof m&&(typeof W.nodeName!="string"||typeof W.textContent!="string"||typeof W.removeChild!="function"||!(W.attributes instanceof d)||typeof W.removeAttribute!="function"||typeof W.setAttribute!="function"||typeof W.namespaceURI!="string"||typeof W.insertBefore!="function"||typeof W.hasChildNodes!="function")},M=function(W){return typeof o=="function"&&W instanceof o};function I(vt,W,gt){Va(vt,F=>{F.call(t,W,gt,Ge)})}const me=function(W){let gt=null;if(I(P.beforeSanitizeElements,W,null),ut(W))return rr(W),!0;const F=ae(W.nodeName);if(I(P.uponSanitizeElement,W,{tagName:F,allowedTags:J}),W.hasChildNodes()&&!M(W.firstElementChild)&&nr(/<[/\w!]/g,W.innerHTML)&&nr(/<[/\w!]/g,W.textContent)||W.nodeType===Ts.progressingInstruction||ue&&W.nodeType===Ts.comment&&nr(/<[/\w]/g,W.data))return rr(W),!0;if(!J[F]||Nt[F]){if(!Nt[F]&&Ie(F)&&(st.tagNameCheck instanceof RegExp&&nr(st.tagNameCheck,F)||st.tagNameCheck instanceof Function&&st.tagNameCheck(F)))return!1;if(ji&&!Ei[F]){const Qt=z(W)||W.parentNode,H=L(W)||W.childNodes;if(H&&Qt){const Ee=H.length;for(let He=Ee-1;He>=0;--He){const br=S(H[He],!0);br.__removalCount=(W.__removalCount||0)+1,Qt.insertBefore(br,T(W))}}}return rr(W),!0}return W instanceof f&&!Ql(W)||(F==="noscript"||F==="noembed"||F==="noframes")&&nr(/<\/no(script|embed|frames)/i,W.innerHTML)?(rr(W),!0):(dt&&W.nodeType===Ts.text&&(gt=W.textContent,Va([lt,Q,Z],Qt=>{gt=Cs(gt,Qt," ")}),W.textContent!==gt&&(vs(t.removed,{element:W.cloneNode()}),W.textContent=gt)),I(P.afterSanitizeElements,W,null),!1)},St=function(W,gt,F){if(Ui&&(gt==="id"||gt==="name")&&(F in r||F in Ur))return!1;if(!(yt&&!Ut[gt]&&nr(rt,gt))){if(!(Vt&&nr(nt,gt))){if(!ft[gt]||Ut[gt]){if(!(Ie(W)&&(st.tagNameCheck instanceof RegExp&&nr(st.tagNameCheck,W)||st.tagNameCheck instanceof Function&&st.tagNameCheck(W))&&(st.attributeNameCheck instanceof RegExp&&nr(st.attributeNameCheck,gt)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(gt))||gt==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&nr(st.tagNameCheck,F)||st.tagNameCheck instanceof Function&&st.tagNameCheck(F))))return!1}else if(!ys[gt]){if(!nr(ot,Cs(F,et,""))){if(!((gt==="src"||gt==="xlink:href"||gt==="href")&&W!=="script"&&w6(F,"data:")===0&&gs[W])){if(!(_t&&!nr(at,Cs(F,et,"")))){if(F)return!1}}}}}}return!0},Ie=function(W){return W!=="annotation-xml"&&zf(W,it)},li=function(W){I(P.beforeSanitizeAttributes,W,null);const{attributes:gt}=W;if(!gt||ut(W))return;const F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ft,forceKeepAttr:void 0};let Qt=gt.length;for(;Qt--;){const H=gt[Qt],{name:Ee,namespaceURI:He,value:br}=H,jr=ae(Ee);let Mt=Ee==="value"?br:k6(br);if(F.attrName=jr,F.attrValue=Mt,F.keepAttr=!0,F.forceKeepAttr=void 0,I(P.uponSanitizeAttribute,W,F),Mt=F.attrValue,ps&&(jr==="id"||jr==="name")&&(be(Ee,W),Mt=Xl+Mt),ue&&nr(/((--!?|])>)|<\/(style|title)/i,Mt)){be(Ee,W);continue}if(F.forceKeepAttr||(be(Ee,W),!F.keepAttr))continue;if(!It&&nr(/\/>/i,Mt)){be(Ee,W);continue}dt&&Va([lt,Q,Z],Xi=>{Mt=Cs(Mt,Xi," ")});const Fn=ae(W.nodeName);if(St(Fn,jr,Mt)){if(R&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!He)switch(g.getAttributeType(Fn,jr)){case"TrustedHTML":{Mt=R.createHTML(Mt);break}case"TrustedScriptURL":{Mt=R.createScriptURL(Mt);break}}try{He?W.setAttributeNS(He,Ee,Mt):W.setAttribute(Ee,Mt),ut(W)?rr(W):Nf(t.removed)}catch(Xi){}}}I(P.afterSanitizeAttributes,W,null)},$t=function vt(W){let gt=null;const F=C(W);for(I(P.beforeSanitizeShadowDOM,W,null);gt=F.nextNode();)I(P.uponSanitizeShadowNode,gt,null),me(gt),li(gt),gt.content instanceof s&&vt(gt.content);I(P.afterSanitizeShadowDOM,W,null)};return t.sanitize=function(vt){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},gt=null,F=null,Qt=null,H=null;if(_r=!vt,_r&&(vt=""),typeof vt!="string"&&!M(vt))if(typeof vt.toString=="function"){if(vt=vt.toString(),typeof vt!="string")throw Ss("dirty is not a string, aborting")}else throw Ss("toString is not a function");if(!t.isSupported)return vt;if(Fe||Dn(W),t.removed=[],typeof vt=="string"&&(ai=!1),ai){if(vt.nodeName){const br=ae(vt.nodeName);if(!J[br]||Nt[br])throw Ss("root node is forbidden and cannot be sanitized in-place")}}else if(vt instanceof o)gt=x(""),F=gt.ownerDocument.importNode(vt,!0),F.nodeType===Ts.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?gt=F:gt.appendChild(F);else{if(!Ye&&!dt&&!Zt&&vt.indexOf("<")===-1)return R&&er?R.createHTML(vt):vt;if(gt=x(vt),!gt)return Ye?null:er?$:""}gt&&Le&&rr(gt.firstChild);const Ee=C(ai?vt:gt);for(;Qt=Ee.nextNode();)me(Qt),li(Qt),Qt.content instanceof s&&$t(Qt.content);if(ai)return vt;if(Ye){if(yr)for(H=U.call(gt.ownerDocument);gt.firstChild;)H.appendChild(gt.firstChild);else H=gt;return(ft.shadowroot||ft.shadowrootmode)&&(H=j.call(i,H,!0)),H}let He=Zt?gt.outerHTML:gt.innerHTML;return Zt&&J["!doctype"]&>.ownerDocument&>.ownerDocument.doctype&>.ownerDocument.doctype.name&&nr(Wd,gt.ownerDocument.doctype.name)&&(He=" `+He),dt&&Va([lt,Q,Z],br=>{He=Cs(He,br," ")}),R&&er?R.createHTML(He):He},t.setConfig=function(){let vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dn(vt),Fe=!0},t.clearConfig=function(){Ge=null,Fe=!1},t.isValidAttribute=function(vt,W,gt){Ge||Dn({});const F=ae(vt),Qt=ae(W);return St(F,Qt,gt)},t.addHook=function(vt,W){typeof W=="function"&&vs(P[vt],W)},t.removeHook=function(vt,W){if(W!==void 0){const gt=b6(P[vt],W);return gt===-1?void 0:x6(P[vt],gt,1)[0]}return Nf(P[vt])},t.removeHooks=function(vt){P[vt]=[]},t.removeAllHooks=function(){P=Wf()},t}var Gn=Ud(),jd=Object.defineProperty,k=(e,t)=>jd(e,"name",{value:t,configurable:!0}),N6=(e,t)=>{for(var r in t)jd(e,r,{get:t[r],enumerable:!0})},di={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},ht={trace:k((...e)=>{},"trace"),debug:k((...e)=>{},"debug"),info:k((...e)=>{},"info"),warn:k((...e)=>{},"warn"),error:k((...e)=>{},"error"),fatal:k((...e)=>{},"fatal")},ch=k(function(e="fatal"){let t=di.fatal;typeof e=="string"?e.toLowerCase()in di&&(t=di[e]):typeof e=="number"&&(t=e),ht.trace=()=>{},ht.debug=()=>{},ht.info=()=>{},ht.warn=()=>{},ht.error=()=>{},ht.fatal=()=>{},t<=di.fatal&&(ht.fatal=void 0),t<=di.error&&(ht.error=void 0),t<=di.warn&&(ht.warn=void 0),t<=di.info&&(ht.info=void 0),t<=di.debug&&(ht.debug=void 0),t<=di.trace&&(ht.trace=void 0)},"setLogLevel");var Yd=new RegExp("^-{3}\\s*[\\n\\r](.*?)[\\n\\r]-{3}\\s*[\\n\\r]+","s"),js=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,z6=/\s*%%.*\n/gm,ca,Gd=(ca=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},k(ca,"UnknownDiagramError"),ca),Vn={},hh=k(function(e,t){e=e.replace(Yd,"").replace(js,"").replace(z6,` `);for(const[r,{detector:i}]of Object.entries(Vn))if(i(e,t))return r;throw new Gd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Vd=k((...e)=>{for(const{id:t,detector:r,loader:i}of e)Xd(t,r,i)},"registerLazyLoadedDiagrams"),Xd=k((e,t,r)=>{Vn[e]&&ht.warn(`Detector with key ${e} already exists. Overwriting.`),Vn[e]={detector:t,loader:r},ht.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),$6=k(e=>Vn[e].loader,"getDiagramLoader"),fc=k((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>fc(e,s,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=fc(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),je=fc,xl="#ffffff",wl="#f2f2f2",sr=k((e,t)=>t?G(e,{s:-40,l:10}):G(e,{s:-40,l:-10}),"mkBorder"),ha,I6=(ha=class{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(){var r,i,n,s,l,o,f,h,d,m,y,g,w,S,B,T,L,z,R,$,A;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||sr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||sr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||sr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||sr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||kt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||kt(this.tertiaryColor),this.lineColor=this.lineColor||kt(this.background),this.arrowheadColor=this.arrowheadColor||kt(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?zt(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||zt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||kt(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||At(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||zt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||zt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||At(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||At(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let N=0;N{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},k(ha,"Theme"),ha),P6=k(e=>{const t=new I6;return t.calculate(e),t},"getThemeVariables"),ua,q6=(ua=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=At(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=kt(this.background),this.secondaryBorderColor=sr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=sr(this.tertiaryColor,this.darkMode),this.primaryTextColor=kt(this.primaryColor),this.secondaryTextColor=kt(this.secondaryColor),this.tertiaryTextColor=kt(this.tertiaryColor),this.lineColor=kt(this.background),this.textColor=kt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=At(kt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Us(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=zt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=zt(this.sectionBkgColor,10),this.taskBorderColor=Us(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Us(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||At(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||zt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,n,s,l,o,f,h,d,m,y,g,w,S,B,T,L,z,R,$;this.secondBkg=At(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=At(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=At(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330});for(let A=0;A{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},k(ua,"Theme"),ua),H6=k(e=>{const t=new q6;return t.calculate(e),t},"getThemeVariables"),fa,W6=(fa=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=G(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=sr(this.primaryColor,this.darkMode),this.secondaryBorderColor=sr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=sr(this.tertiaryColor,this.darkMode),this.primaryTextColor=kt(this.primaryColor),this.secondaryTextColor=kt(this.secondaryColor),this.tertiaryTextColor=kt(this.tertiaryColor),this.lineColor=kt(this.background),this.textColor=kt(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=Us(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,n,s,l,o,f,h,d,m,y,g,w,S,B,T,L,z,R,$;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||zt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||zt(this.tertiaryColor,40);for(let A=0;A{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},k(fa,"Theme"),fa),U6=k(e=>{const t=new W6;return t.calculate(e),t},"getThemeVariables"),da,j6=(da=class{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=At("#cde498",10),this.primaryBorderColor=sr(this.primaryColor,this.darkMode),this.secondaryBorderColor=sr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=sr(this.tertiaryColor,this.darkMode),this.primaryTextColor=kt(this.primaryColor),this.secondaryTextColor=kt(this.secondaryColor),this.tertiaryTextColor=kt(this.primaryColor),this.lineColor=kt(this.background),this.textColor=kt(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(){var t,r,i,n,s,l,o,f,h,d,m,y,g,w,S,B,T,L,z,R,$;this.actorBorder=zt(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||zt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||zt(this.tertiaryColor,40);for(let A=0;A{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},k(da,"Theme"),da),Y6=k(e=>{const t=new j6;return t.calculate(e),t},"getThemeVariables"),pa,G6=(pa=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=At(this.contrast,55),this.background="#ffffff",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=sr(this.primaryColor,this.darkMode),this.secondaryBorderColor=sr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=sr(this.tertiaryColor,this.darkMode),this.primaryTextColor=kt(this.primaryColor),this.secondaryTextColor=kt(this.secondaryColor),this.tertiaryTextColor=kt(this.tertiaryColor),this.lineColor=kt(this.background),this.textColor=kt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||At(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,n,s,l,o,f,h,d,m,y,g,w,S,B,T,L,z,R,$;this.secondBkg=At(this.contrast,55),this.border2=this.contrast,this.actorBorder=At(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 A=0;A{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},k(pa,"Theme"),pa),V6=k(e=>{const t=new G6;return t.calculate(e),t},"getThemeVariables"),ki={base:{getThemeVariables:P6},dark:{getThemeVariables:H6},default:{getThemeVariables:U6},forest:{getThemeVariables:Y6},neutral:{getThemeVariables:V6}},pi={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Zd=de(qt({},pi),{deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:ki.default.getThemeVariables(),sequence:de(qt({},pi.sequence),{messageFont:k(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:k(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:k(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")}),class:{hideEmptyMembersBox:!1},gantt:de(qt({},pi.gantt),{tickInterval:void 0,useWidth:void 0}),c4:de(qt({},pi.c4),{useWidth:void 0,personFont:k(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:k(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:k(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:k(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:k(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:k(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:k(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:k(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:k(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:k(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:k(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:k(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:k(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:k(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:k(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:k(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:k(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:k(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:k(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:k(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:k(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:k(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")}),pie:de(qt({},pi.pie),{useWidth:984}),xyChart:de(qt({},pi.xyChart),{useWidth:void 0}),requirement:de(qt({},pi.requirement),{useWidth:void 0}),packet:qt({},pi.packet),radar:qt({},pi.radar)}),Kd=k((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Kd(e[i],"")]:[...r,t+i],[]),"keyify"),X6=new Set(Kd(Zd,"")),Qd=Zd,Ao=k(e=>{if(ht.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ao(t));return}for(const t of Object.keys(e)){if(ht.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!X6.has(t)||e[t]==null){ht.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){ht.debug("sanitizing object",t),Ao(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(ht.debug("sanitizing css option",t),e[t]=Z6(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}ht.debug("After sanitization",e)}},"sanitizeDirective"),Z6=k(e=>{let t=0,r=0;for(const i of e){if(t{let r=je({},e),i={};for(const n of t)rp(n),i=je(i,n);if(r=je(r,i),i.theme&&i.theme in ki){const n=je({},Jd),s=je(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in ki&&(r.themeVariables=ki[r.theme].getThemeVariables(s))}return Ys=r,ip(Ys),Ys},"updateCurrentConfig"),K6=k(e=>(pr=je({},Xn),pr=je(pr,e),e.theme&&ki[e.theme]&&(pr.themeVariables=ki[e.theme].getThemeVariables(e.themeVariables)),kl(pr,Zn),pr),"setSiteConfig"),Q6=k(e=>{Jd=je({},e)},"saveConfigFromInitialize"),J6=k(e=>(pr=je(pr,e),kl(pr,Zn),pr),"updateSiteConfig"),tp=k(()=>je({},pr),"getSiteConfig"),ep=k(e=>(ip(e),je(Ys,e),gr()),"setConfig"),gr=k(()=>je({},Ys),"getConfig"),rp=k(e=>{var t;e&&(["secure",...(t=pr.secure)!=null?t:[]].forEach(r=>{Object.hasOwn(e,r)&&(ht.debug(`Denied attempt to modify a secure key ${r}`,e[r]),delete e[r])}),Object.keys(e).forEach(r=>{r.startsWith("__")&&delete e[r]}),Object.keys(e).forEach(r=>{typeof e[r]=="string"&&(e[r].includes("<")||e[r].includes(">")||e[r].includes("url(data:"))&&delete e[r],typeof e[r]=="object"&&rp(e[r])}))},"sanitize"),t7=k(e=>{var t;Ao(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables=de(qt({},e.themeVariables),{fontFamily:e.fontFamily})),Zn.push(e),kl(pr,Zn)},"addDirective"),Bo=k((e=pr)=>{Zn=[],kl(e,Zn)},"reset"),e7={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Uf={},r7=k(e=>{Uf[e]||(ht.warn(e7[e]),Uf[e]=!0)},"issueWarning"),ip=k(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&r7("LAZY_LOAD_DEPRECATED")},"checkConfig"),ba=//gi,i7=k(e=>e?ap(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),n7=(()=>{let e=!1;return()=>{e||(np(),e=!0)}})();function np(){const e="data-temp-href-target";Gn.addHook("beforeSanitizeAttributes",t=>{var r;t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,(r=t.getAttribute("target"))!=null?r:"")}),Gn.addHook("afterSanitizeAttributes",t=>{var r;t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",(r=t.getAttribute(e))!=null?r:""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}k(np,"setupDompurifyHooks");var sp=k(e=>(n7(),Gn.sanitize(e)),"removeScript"),jf=k((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=sp(e):i!=="loose"&&(e=ap(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=l7(e))}return e},"sanitizeMore"),un=k((e,t)=>e&&(t.dompurifyConfig?e=Gn.sanitize(jf(e,t),t.dompurifyConfig).toString():e=Gn.sanitize(jf(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),s7=k((e,t)=>typeof e=="string"?un(e,t):e.flat().map(r=>un(r,t)),"sanitizeTextOrArray"),a7=k(e=>ba.test(e),"hasBreaks"),o7=k(e=>e.split(ba),"splitBreaks"),l7=k(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),ap=k(e=>e.replace(ba,"#br#"),"breakToPlaceholder"),c7=k(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},"getUrl"),ze=k(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),h7=k(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),u7=k(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Yf=k(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),f7=k((e,t)=>{const r=dc(e,"~"),i=dc(t,"~");return r===1&&i===1},"shouldCombineSets"),d7=k(e=>{const t=dc(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),s=i.lastIndexOf("~");for(;n!==-1&&s!==-1&&n!==s;)i[n]="<",i[s]=">",n=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Gf=k(()=>window.MathMLElement!==void 0,"isMathMLSupported"),pc=/\$\$(.*)\$\$/g,Kn=k(e=>{var t,r;return((r=(t=e.match(pc))==null?void 0:t.length)!=null?r:0)>0},"hasKatex"),lD=k((e,t)=>ct(void 0,null,function*(){e=yield uh(e,t);const r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n}),"calculateMathMLDimensions"),uh=k((e,t)=>ct(void 0,null,function*(){if(!Kn(e))return e;if(!(Gf()||t.legacyMathML||t.forceLegacyMathML))return e.replace(pc,"MathML is unsupported in this environment.");const{default:r}=yield pe(()=>Promise.resolve().then(()=>WE),void 0,import.meta.url),i=t.forceLegacyMathML||!Gf()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ba).map(n=>Kn(n)?`
${n}
`:`
${n}
`).join("").replace(pc,(n,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}),"renderKatex"),ls={getRows:i7,sanitizeText:un,sanitizeTextOrArray:s7,hasBreaks:a7,splitBreaks:o7,lineBreakRegex:ba,removeScript:sp,getUrl:c7,evaluate:ze,getMax:h7,getMin:u7},p7=k(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),m7=k(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),op=k(function(e,t,r,i){const n=m7(t,r,i);p7(e,n)},"configureSvgSize"),g7=k(function(e,t,r,i){const n=t.node().getBBox(),s=n.width,l=n.height;ht.info(`SVG bounds: ${s}x${l}`,n);let o=0,f=0;ht.info(`Graph bounds: ${o}x${f}`,e),o=s+r*2,f=l+r*2,ht.info(`Calculated bounds: ${o}x${f}`),op(t,f,o,i);const h=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),fo={},y7=k((e,t,r)=>{let i="";return e in fo&&fo[e]?i=fo[e](r):ht.warn(`No theme found for ${e}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${i} ${t} `},"getStyles"),b7=k((e,t)=>{t!==void 0&&(fo[e]=t)},"addStylesForDiagram"),x7=y7,lp={};N6(lp,{clear:()=>w7,getAccDescription:()=>S7,getAccTitle:()=>v7,getDiagramTitle:()=>T7,setAccDescription:()=>C7,setAccTitle:()=>k7,setDiagramTitle:()=>_7});var fh="",dh="",ph="",mh=k(e=>un(e,gr()),"sanitizeText"),w7=k(()=>{fh="",ph="",dh=""},"clear"),k7=k(e=>{fh=mh(e).replace(/^\s+/g,"")},"setAccTitle"),v7=k(()=>fh,"getAccTitle"),C7=k(e=>{ph=mh(e).replace(/\n\s+/g,` `)},"setAccDescription"),S7=k(()=>ph,"getAccDescription"),_7=k(e=>{dh=mh(e)},"setDiagramTitle"),T7=k(()=>dh,"getDiagramTitle"),Vf=ht,M7=ch,le=gr,cD=ep,hD=Xn,gh=k(e=>un(e,le()),"sanitizeText"),A7=g7,B7=k(()=>lp,"getCommonDb"),Lo={},Eo=k((e,t,r)=>{var i;Lo[e]&&Vf.warn(`Diagram with id ${e} already registered. Overwriting.`),Lo[e]=t,r&&Xd(e,r),b7(e,t.styles),(i=t.injectUtils)==null||i.call(t,Vf,M7,le,gh,A7,B7(),()=>{})},"registerDiagram"),mc=k(e=>{if(e in Lo)return Lo[e];throw new L7(e)},"getDiagram"),ma,L7=(ma=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},k(ma,"DiagramNotFoundError"),ma);function yh(e){return typeof e=="undefined"||e===null}k(yh,"isNothing");function cp(e){return typeof e=="object"&&e!==null}k(cp,"isObject");function hp(e){return Array.isArray(e)?e:yh(e)?[]:[e]}k(hp,"toArray");function up(e,t){var r,i,n,s;if(t)for(s=Object.keys(t),r=0,i=s.length;ro&&(s=" ... ",t=i-o+s.length),r-i>o&&(l=" ...",r=i+o-l.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+l,pos:i-t+s.length}}k(po,"getLine");function mo(e,t){return Ne.repeat(" ",t-e.length)+e}k(mo,"padStart");function pp(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,l=-1;s=r.exec(e.buffer);)n.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&l<0&&(l=i.length-2);l<0&&(l=i.length-1);var o="",f,h,d=Math.min(e.line+t.linesAfter,n.length).toString().length,m=t.maxLength-(t.indent+d+3);for(f=1;f<=t.linesBefore&&!(l-f<0);f++)h=po(e.buffer,i[l-f],n[l-f],e.position-(i[l]-i[l-f]),m),o=Ne.repeat(" ",t.indent)+mo((e.line-f+1).toString(),d)+" | "+h.str+` `+o;for(h=po(e.buffer,i[l],n[l],e.position,m),o+=Ne.repeat(" ",t.indent)+mo((e.line+1).toString(),d)+" | "+h.str+` `,o+=Ne.repeat("-",t.indent+d+3+h.pos)+`^ `,f=1;f<=t.linesAfter&&!(l+f>=n.length);f++)h=po(e.buffer,i[l+f],n[l+f],e.position-(i[l]-i[l+f]),m),o+=Ne.repeat(" ",t.indent)+mo((e.line+f+1).toString(),d)+" | "+h.str+` `;return o.replace(/\n$/,"")}k(pp,"makeSnippet");var z7=pp,$7=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],I7=["scalar","sequence","mapping"];function mp(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}k(mp,"compileStyleAliases");function gp(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if($7.indexOf(r)===-1)throw new mr('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=mp(t.styleAliases||null),I7.indexOf(this.kind)===-1)throw new mr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}k(gp,"Type$1");var Je=gp;function gc(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(s,l){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=l)}),r[n]=i}),r}k(gc,"compileList");function yp(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(k(i,"collectType"),t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:k(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:k(function(e){return e.toString(10)},"decimal"),hexadecimal:k(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),V7=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Lp(e){return!(e===null||!V7.test(e)||e[e.length-1]==="_")}k(Lp,"resolveYamlFloat");function Ep(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}k(Ep,"constructYamlFloat");var X7=/^[-+]?[0-9]+e/;function Dp(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ne.isNegativeZero(e))return"-0.0";return r=e.toString(10),X7.test(r)?r.replace("e",".e"):r}k(Dp,"representYamlFloat");function Fp(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ne.isNegativeZero(e))}k(Fp,"isFloat");var Z7=new Je("tag:yaml.org,2002:float",{kind:"scalar",resolve:Lp,construct:Ep,predicate:Fp,represent:Dp,defaultStyle:"lowercase"}),Op=U7.extend({implicit:[j7,Y7,G7,Z7]}),K7=Op,Rp=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Np=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 zp(e){return e===null?!1:Rp.exec(e)!==null||Np.exec(e)!==null}k(zp,"resolveYamlTimestamp");function $p(e){var t,r,i,n,s,l,o,f=0,h=null,d,m,y;if(t=Rp.exec(e),t===null&&(t=Np.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(s=+t[4],l=+t[5],o=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(d=+t[10],m=+(t[11]||0),h=(d*60+m)*6e4,t[9]==="-"&&(h=-h)),y=new Date(Date.UTC(r,i,n,s,l,o,f)),h&&y.setTime(y.getTime()-h),y}k($p,"constructYamlTimestamp");function Ip(e){return e.toISOString()}k(Ip,"representYamlTimestamp");var Q7=new Je("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:zp,construct:$p,instanceOf:Date,represent:Ip});function Pp(e){return e==="<<"||e===null}k(Pp,"resolveYamlMerge");var J7=new Je("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Pp}),xh=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function qp(e){if(e===null)return!1;var t,r,i=0,n=e.length,s=xh;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}k(qp,"resolveYamlBinary");function Hp(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,s=xh,l=0,o=[];for(t=0;t>16&255),o.push(l>>8&255),o.push(l&255)),l=l<<6|s.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(l>>16&255),o.push(l>>8&255),o.push(l&255)):r===18?(o.push(l>>10&255),o.push(l>>2&255)):r===12&&o.push(l>>4&255),new Uint8Array(o)}k(Hp,"constructYamlBinary");function Wp(e){var t="",r=0,i,n,s=e.length,l=xh;for(i=0;i>18&63],t+=l[r>>12&63],t+=l[r>>6&63],t+=l[r&63]),r=(r<<8)+e[i];return n=s%3,n===0?(t+=l[r>>18&63],t+=l[r>>12&63],t+=l[r>>6&63],t+=l[r&63]):n===2?(t+=l[r>>10&63],t+=l[r>>4&63],t+=l[r<<2&63],t+=l[64]):n===1&&(t+=l[r>>2&63],t+=l[r<<4&63],t+=l[64],t+=l[64]),t}k(Wp,"representYamlBinary");function Up(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}k(Up,"isBinary");var tb=new Je("tag:yaml.org,2002:binary",{kind:"scalar",resolve:qp,construct:Hp,predicate:Up,represent:Wp}),eb=Object.prototype.hasOwnProperty,rb=Object.prototype.toString;function jp(e){if(e===null)return!0;var t=[],r,i,n,s,l,o=e;for(r=0,i=o.length;r>10)+55296,(e-65536&1023)+56320)}k(sm,"charFromCodepoint");var am=new Array(256),om=new Array(256);for(Ji=0;Ji<256;Ji++)am[Ji]=bc(Ji)?1:0,om[Ji]=bc(Ji);var Ji;function lm(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Kp,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}k(lm,"State$1");function wh(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=z7(r),new mr(t,r)}k(wh,"generateError");function Rt(e,t){throw wh(e,t)}k(Rt,"throwError");function Ks(e,t){e.onWarning&&e.onWarning.call(null,wh(e,t))}k(Ks,"throwWarning");var Zf={YAML:k(function(t,r,i){var n,s,l;t.version!==null&&Rt(t,"duplication of %YAML directive"),i.length!==1&&Rt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Rt(t,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),l=parseInt(n[2],10),s!==1&&Rt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=l<2,l!==1&&l!==2&&Ks(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:k(function(t,r,i){var n,s;i.length!==2&&Rt(t,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],tm.test(n)||Rt(t,"ill-formed tag handle (first argument) of the TAG directive"),$i.call(t.tagMap,n)&&Rt(t,'there is a previously declared suffix for "'+n+'" tag handle'),em.test(s)||Rt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch(l){Rt(t,"tag prefix is malformed: "+s)}t.tagMap[n]=s},"handleTagDirective")};function vi(e,t,r,i){var n,s,l,o;if(t1&&(e.result+=Ne.repeat(` `,t-1))}k(Cl,"writeFoldedLines");function cm(e,t,r){var i,n,s,l,o,f,h,d,m=e.kind,y=e.result,g;if(g=e.input.charCodeAt(e.position),ar(g)||an(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(n=e.input.charCodeAt(e.position+1),ar(n)||r&&an(n)))return!1;for(e.kind="scalar",e.result="",s=l=e.position,o=!1;g!==0;){if(g===58){if(n=e.input.charCodeAt(e.position+1),ar(n)||r&&an(n))break}else if(g===35){if(i=e.input.charCodeAt(e.position-1),ar(i))break}else{if(e.position===e.lineStart&&xa(e)||r&&an(g))break;if(Pr(g))if(f=e.line,h=e.lineStart,d=e.lineIndent,Be(e,!1,-1),e.lineIndent>=t){o=!0,g=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=f,e.lineStart=h,e.lineIndent=d;break}}o&&(vi(e,s,l,!1),Cl(e,e.line-f),s=l=e.position,o=!1),zi(g)||(l=e.position+1),g=e.input.charCodeAt(++e.position)}return vi(e,s,l,!1),e.result?!0:(e.kind=m,e.result=y,!1)}k(cm,"readPlainScalar");function hm(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(vi(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Pr(r)?(vi(e,i,n,!0),Cl(e,Be(e,!1,t)),i=n=e.position):e.position===e.lineStart&&xa(e)?Rt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Rt(e,"unexpected end of the stream within a single quoted scalar")}k(hm,"readSingleQuotedScalar");function um(e,t){var r,i,n,s,l,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return vi(e,r,e.position,!0),e.position++,!0;if(o===92){if(vi(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Pr(o))Be(e,!1,t);else if(o<256&&am[o])e.result+=om[o],e.position++;else if((l=im(o))>0){for(n=l,s=0;n>0;n--)o=e.input.charCodeAt(++e.position),(l=rm(o))>=0?s=(s<<4)+l:Rt(e,"expected hexadecimal character");e.result+=sm(s),e.position++}else Rt(e,"unknown escape sequence");r=i=e.position}else Pr(o)?(vi(e,r,i,!0),Cl(e,Be(e,!1,t)),r=i=e.position):e.position===e.lineStart&&xa(e)?Rt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Rt(e,"unexpected end of the stream within a double quoted scalar")}k(um,"readDoubleQuotedScalar");function fm(e,t){var r=!0,i,n,s,l=e.tag,o,f=e.anchor,h,d,m,y,g,w=Object.create(null),S,B,T,L;if(L=e.input.charCodeAt(e.position),L===91)d=93,g=!1,o=[];else if(L===123)d=125,g=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),L=e.input.charCodeAt(++e.position);L!==0;){if(Be(e,!0,t),L=e.input.charCodeAt(e.position),L===d)return e.position++,e.tag=l,e.anchor=f,e.kind=g?"mapping":"sequence",e.result=o,!0;r?L===44&&Rt(e,"expected the node content, but found ','"):Rt(e,"missed comma between flow collection entries"),B=S=T=null,m=y=!1,L===63&&(h=e.input.charCodeAt(e.position+1),ar(h)&&(m=y=!0,e.position++,Be(e,!0,t))),i=e.line,n=e.lineStart,s=e.position,fn(e,t,Fo,!1,!0),B=e.tag,S=e.result,Be(e,!0,t),L=e.input.charCodeAt(e.position),(y||e.line===i)&&L===58&&(m=!0,L=e.input.charCodeAt(++e.position),Be(e,!0,t),fn(e,t,Fo,!1,!0),T=e.result),g?on(e,o,w,B,S,T,i,n,s):m?o.push(on(e,null,w,B,S,T,i,n,s)):o.push(S),Be(e,!0,t),L=e.input.charCodeAt(e.position),L===44?(r=!0,L=e.input.charCodeAt(++e.position)):r=!1}Rt(e,"unexpected end of the stream within a flow collection")}k(fm,"readFlowCollection");function dm(e,t){var r,i,n=$0,s=!1,l=!1,o=t,f=0,h=!1,d,m;if(m=e.input.charCodeAt(e.position),m===124)i=!1;else if(m===62)i=!0;else return!1;for(e.kind="scalar",e.result="";m!==0;)if(m=e.input.charCodeAt(++e.position),m===43||m===45)$0===n?n=m===43?Xf:lb:Rt(e,"repeat of a chomping mode identifier");else if((d=nm(m))>=0)d===0?Rt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Rt(e,"repeat of an indentation width identifier"):(o=t+d-1,l=!0);else break;if(zi(m)){do m=e.input.charCodeAt(++e.position);while(zi(m));if(m===35)do m=e.input.charCodeAt(++e.position);while(!Pr(m)&&m!==0)}for(;m!==0;){for(vl(e),e.lineIndent=0,m=e.input.charCodeAt(e.position);(!l||e.lineIndento&&(o=e.lineIndent),Pr(m)){f++;continue}if(e.lineIndentt)&&f!==0)Rt(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(B&&(l=e.line,o=e.lineStart,f=e.position),fn(e,t,Oo,!0,n)&&(B?w=e.result:S=e.result),B||(on(e,m,y,g,w,S,l,o,f),g=w=S=null),Be(e,!0,-1),L=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&L!==0)Rt(e,"bad indentation of a mapping entry");else if(e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),m=0,y=e.implicitTypes.length;m"),e.result!==null&&w.kind!==e.kind&&Rt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+w.kind+'", not "'+e.kind+'"'),w.resolve(e.result,e.tag)?(e.result=w.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Rt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}k(fn,"composeNode");function bm(e){var t=e.position,r,i,n,s=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(Be(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(s=!0,l=e.input.charCodeAt(++e.position),r=e.position;l!==0&&!ar(l);)l=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Rt(e,"directive name must not be less than one character in length");l!==0;){for(;zi(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!Pr(l));break}if(Pr(l))break;for(r=e.position;l!==0&&!ar(l);)l=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}l!==0&&vl(e),$i.call(Zf,i)?Zf[i](e,i,n):Ks(e,'unknown document directive "'+i+'"')}if(Be(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Be(e,!0,-1)):s&&Rt(e,"directives end mark is expected"),fn(e,e.lineIndent-1,Oo,!1,!0),Be(e,!0,-1),e.checkLineBreaks&&hb.test(e.input.slice(t,e.position))&&Ks(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&xa(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Be(e,!0,-1));return}if(e.position=55296&&r<=56319&&t+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}k(Pn,"codePointAt");function Ch(e){var t=/^\n* /;return t.test(e)}k(Ch,"needIndentIndicator");var Om=1,_c=2,Rm=3,Nm=4,$n=5;function zm(e,t,r,i,n,s,l,o){var f,h=0,d=null,m=!1,y=!1,g=i!==-1,w=-1,S=Dm(Pn(e,0))&&Fm(Pn(e,e.length-1));if(t||l)for(f=0;f=65536?f+=2:f++){if(h=Pn(e,f),!Jn(h))return $n;S=S&&Sc(h,d,o),d=h}else{for(f=0;f=65536?f+=2:f++){if(h=Pn(e,f),h===Qs)m=!0,g&&(y=y||f-w-1>i&&e[w+1]!==" ",w=f);else if(!Jn(h))return $n;S=S&&Sc(h,d,o),d=h}y=y||g&&f-w-1>i&&e[w+1]!==" "}return!m&&!y?S&&!l&&!n(e)?Om:s===Js?$n:_c:r>9&&Ch(e)?$n:l?s===Js?$n:_c:y?Nm:Rm}k(zm,"chooseScalarStyle");function $m(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===Js?'""':"''";if(!e.noCompatMode&&(Eb.indexOf(t)!==-1||Db.test(t)))return e.quotingType===Js?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=i||e.flowLevel>-1&&r>=e.flowLevel;function f(h){return Em(e,h)}switch(k(f,"testAmbiguity"),zm(t,o,e.indent,l,f,e.quotingType,e.forceQuotes&&!i,n)){case Om:return t;case _c:return"'"+t.replace(/'/g,"''")+"'";case Rm:return"|"+Tc(t,e.indent)+Mc(vc(t,s));case Nm:return">"+Tc(t,e.indent)+Mc(vc(Im(t,l),s));case $n:return'"'+Pm(t)+'"';default:throw new mr("impossible error: invalid scalar style")}}()}k($m,"writeScalar");function Tc(e,t){var r=Ch(e)?String(t):"",i=e[e.length-1]===` `,n=i&&(e[e.length-2]===` `||e===` `),s=n?"+":i?"":"-";return r+s+` `}k(Tc,"blockHeader");function Mc(e){return e[e.length-1]===` `?e.slice(0,-1):e}k(Mc,"dropEndingNewline");function Im(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var h=e.indexOf(` `);return h=h!==-1?h:e.length,r.lastIndex=h,Ac(e.slice(0,h),t)}(),n=e[0]===` `||e[0]===" ",s,l;l=r.exec(e);){var o=l[1],f=l[2];s=f[0]===" ",i+=o+(!n&&!s&&f!==""?` `:"")+Ac(f,t),n=s}return i}k(Im,"foldString");function Ac(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,s,l=0,o=0,f="";i=r.exec(e);)o=i.index,o-n>t&&(s=l>n?l:o,f+=` `+e.slice(n,s),n=s+1),l=o;return f+=` `,e.length-n>t&&l>n?f+=e.slice(n,l)+` `+e.slice(l+1):f+=e.slice(n),f.slice(1)}k(Ac,"foldLine");function Pm(e){for(var t="",r=0,i,n=0;n=65536?n+=2:n++)r=Pn(e,n),i=tr[r],!i&&Jn(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Bm(r);return t}k(Pm,"escapeString");function qm(e,t,r){var i="",n=e.tag,s,l,o;for(s=0,l=r.length;s1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ii(e,t,h,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}k(Hm,"writeFlowMapping");function Wm(e,t,r,i){var n="",s=e.tag,l=Object.keys(r),o,f,h,d,m,y;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new mr("sortKeys must be a boolean or a function");for(o=0,f=l.length;o1024,m&&(e.dump&&Qs===e.dump.charCodeAt(0)?y+="?":y+="? "),y+=e.dump,m&&(y+=No(e,t)),ii(e,t+1,d,!0,m)&&(e.dump&&Qs===e.dump.charCodeAt(0)?y+=":":y+=": ",y+=e.dump,n+=y));e.tag=s,e.dump=n||"{}"}k(Wm,"writeBlockMapping");function Lc(e,t,r){var i,n,s,l,o,f;for(n=r?e.explicitTypes:e.implicitTypes,s=0,l=n.length;s tag resolver accepts not "'+f+'" style');e.dump=i}return!0}return!1}k(Lc,"detectType");function ii(e,t,r,i,n,s,l){e.tag=null,e.dump=r,Lc(e,r,!1)||Lc(e,r,!0);var o=km.call(e.dump),f=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var d=o==="[object Object]"||o==="[object Array]",m,y;if(d&&(m=e.duplicates.indexOf(r),y=m!==-1),(e.tag!==null&&e.tag!=="?"||y||e.indent!==2&&t>0)&&(n=!1),y&&e.usedDuplicates[m])e.dump="*ref_"+m;else{if(d&&y&&!e.usedDuplicates[m]&&(e.usedDuplicates[m]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Wm(e,t,e.dump,n),y&&(e.dump="&ref_"+m+e.dump)):(Hm(e,t,e.dump),y&&(e.dump="&ref_"+m+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!l&&t>0?Bc(e,t-1,e.dump,n):Bc(e,t,e.dump,n),y&&(e.dump="&ref_"+m+e.dump)):(qm(e,t,e.dump),y&&(e.dump="&ref_"+m+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&$m(e,e.dump,t,s,f);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new mr("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}k(ii,"writeNode");function Um(e,t){var r=[],i=[],n,s;for(zo(e,r,i),n=0,s=i.length;nArray.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),$b=k(e=>({x:k(function(t,r,i){let n=0;const s=Ce(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Lr,e.arrowTypeEnd)){const{angle:g,deltaX:w}=zs(i[i.length-1],i[i.length-2]);n=Lr[e.arrowTypeEnd]*Math.cos(g)*(w>=0?1:-1)}const l=Math.abs(Ce(t).x-Ce(i[i.length-1]).x),o=Math.abs(Ce(t).y-Ce(i[i.length-1]).y),f=Math.abs(Ce(t).x-Ce(i[0]).x),h=Math.abs(Ce(t).y-Ce(i[0]).y),d=Lr[e.arrowTypeStart],m=Lr[e.arrowTypeEnd],y=1;if(l0&&o0&&h=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Lr,e.arrowTypeEnd)){const{angle:g,deltaY:w}=zs(i[i.length-1],i[i.length-2]);n=Lr[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(w>=0?1:-1)}const l=Math.abs(Ce(t).y-Ce(i[i.length-1]).y),o=Math.abs(Ce(t).x-Ce(i[i.length-1]).x),f=Math.abs(Ce(t).y-Ce(i[0]).y),h=Math.abs(Ce(t).x-Ce(i[0]).x),d=Lr[e.arrowTypeStart],m=Lr[e.arrowTypeEnd],y=1;if(l0&&o0&&h{var n,s,l,o;const t=(s=(n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)!=null?s:0,r=(o=(l=e==null?void 0:e.subGraphTitleMargin)==null?void 0:l.bottom)!=null?o:0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");const Ib=Object.freeze({left:0,top:0,width:16,height:16}),$o=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),jm=Object.freeze(qt(qt({},Ib),$o)),Pb=Object.freeze(de(qt({},jm),{body:"",hidden:!1})),qb=Object.freeze({width:null,height:null}),Hb=Object.freeze(qt(qt({},qb),$o)),Wb=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),f=n.pop(),h={provider:n.length>0?n[0]:i,prefix:f,name:o};return t&&!I0(h)?null:h}const s=n[0],l=s.split("-");if(l.length>1){const o={provider:i,prefix:l.shift(),name:l.join("-")};return t&&!I0(o)?null:o}if(r&&i===""){const o={provider:i,prefix:"",name:s};return t&&!I0(o,r)?null:o}return null},I0=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Ub(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Kf(e,t){const r=Ub(e,t);for(const i in Pb)i in $o?i in e&&!(i in r)&&(r[i]=$o[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function jb(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(l){if(r[l])return n[l]=[];if(!(l in n)){n[l]=null;const o=i[l]&&i[l].parent,f=o&&s(o);f&&(n[l]=[o].concat(f))}return n[l]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),n}function Qf(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let s={};function l(o){s=Kf(i[o]||n[o],s)}return l(t),r.forEach(l),Kf(e,s)}function Yb(e,t){if(e.icons[t])return Qf(e,t,[]);const r=jb(e,[t])[t];return r?Qf(e,t,r):null}const Gb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Vb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Jf(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Gb);if(i===null||!i.length)return e;const n=[];let s=i.shift(),l=Vb.test(s);for(;;){if(l){const o=parseFloat(s);isNaN(o)?n.push(s):n.push(Math.ceil(o*t*r)/r)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");l=!l}}function Xb(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),s=e.indexOf("",s);if(l===-1)break;r+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(l+1)}return{defs:r,content:e}}function Zb(e,t){return e?""+e+""+t:t}function Kb(e,t,r){const i=Xb(e);return Zb(i.defs,t+i.content+r)}const Qb=e=>e==="unset"||e==="undefined"||e==="none";function Jb(e,t){const r=qt(qt({},jm),e),i=qt(qt({},Hb),t),n={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(S=>{const B=[],T=S.hFlip,L=S.vFlip;let z=S.rotate;T?L?z+=2:(B.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),B.push("scale(-1 1)"),n.top=n.left=0):L&&(B.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),B.push("scale(1 -1)"),n.top=n.left=0);let R;switch(z<0&&(z-=Math.floor(z/4)*4),z=z%4,z){case 1:R=n.height/2+n.top,B.unshift("rotate(90 "+R.toString()+" "+R.toString()+")");break;case 2:B.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:R=n.width/2+n.left,B.unshift("rotate(-90 "+R.toString()+" "+R.toString()+")");break}z%2===1&&(n.left!==n.top&&(R=n.left,n.left=n.top,n.top=R),n.width!==n.height&&(R=n.width,n.width=n.height,n.height=R)),B.length&&(s=Kb(s,'',""))});const l=i.width,o=i.height,f=n.width,h=n.height;let d,m;l===null?(m=o===null?"1em":o==="auto"?h:o,d=Jf(m,f/h)):(d=l==="auto"?f:l,m=o===null?Jf(d,h/f):o==="auto"?h:o);const y={},g=(S,B)=>{Qb(B)||(y[S]=B.toString())};g("width",d),g("height",m);const w=[n.left,n.top,f,h];return y.viewBox=w.join(" "),{attributes:y,viewBox:w,body:s}}const tx=/\sid="(\S+)"/g,ex="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let rx=0;function ix(e,t=ex){const r=[];let i;for(;i=tx.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const l=typeof t=="function"?t(s):t+(rx++).toString(),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+l+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function nx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}var sx={body:'?',height:80,width:80},Ec=new Map,Ym=new Map,ax=k(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(ht.debug("Registering icon pack:",t.name),"loader"in t)Ym.set(t.name,t.loader);else if("icons"in t)Ec.set(t.name,t.icons);else throw ht.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),ox=k((e,t)=>ct(void 0,null,function*(){const r=Wb(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=Ec.get(i);if(!n){const l=Ym.get(i);if(!l)throw new Error(`Icon set not found: ${r.prefix}`);try{const o=yield l();n=de(qt({},o),{prefix:i}),Ec.set(i,n)}catch(o){throw ht.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=Yb(n,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s}),"getRegisteredIconData"),Sl=k((e,t)=>ct(void 0,null,function*(){let r;try{r=yield ox(e,t==null?void 0:t.fallbackPrefix)}catch(s){ht.error(s),r=sx}const i=Jb(r,t);return nx(ix(i.body),i.attributes)}),"getIconSVG"),_h={},Pe={};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.BLANK_URL=Pe.relativeFirstCharacters=Pe.whitespaceEscapeCharsRegex=Pe.urlSchemeRegex=Pe.ctrlCharactersRegex=Pe.htmlCtrlEntityRegex=Pe.htmlEntitiesRegex=Pe.invalidProtocolRegex=void 0;Pe.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Pe.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Pe.htmlCtrlEntityRegex=/&(newline|tab);/gi;Pe.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Pe.urlSchemeRegex=/^.+(:|:)/gim;Pe.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Pe.relativeFirstCharacters=[".","/"];Pe.BLANK_URL="about:blank";Object.defineProperty(_h,"__esModule",{value:!0});var Gm=_h.sanitizeUrl=void 0,Ze=Pe;function lx(e){return Ze.relativeFirstCharacters.indexOf(e[0])>-1}function cx(e){var t=e.replace(Ze.ctrlCharactersRegex,"");return t.replace(Ze.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function hx(e){return URL.canParse(e)}function t1(e){try{return decodeURIComponent(e)}catch(t){return e}}function ux(e){if(!e)return Ze.BLANK_URL;var t,r=t1(e.trim());do r=cx(r).replace(Ze.htmlCtrlEntityRegex,"").replace(Ze.ctrlCharactersRegex,"").replace(Ze.whitespaceEscapeCharsRegex,"").trim(),r=t1(r),t=r.match(Ze.ctrlCharactersRegex)||r.match(Ze.htmlEntitiesRegex)||r.match(Ze.htmlCtrlEntityRegex)||r.match(Ze.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Ze.BLANK_URL;if(lx(i))return i;var n=i.trimStart(),s=n.match(Ze.urlSchemeRegex);if(!s)return i;var l=s[0].toLowerCase().trim();if(Ze.invalidProtocolRegex.test(l))return Ze.BLANK_URL;var o=n.replace(/\\/g,"/");if(l==="mailto:"||l.includes("://"))return o;if(l==="http:"||l==="https:"){if(!hx(o))return Ze.BLANK_URL;var f=new URL(o);return f.protocol=f.protocol.toLowerCase(),f.hostname=f.hostname.toLowerCase(),f.toString()}return o}Gm=_h.sanitizeUrl=ux;function go(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function fx(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Th(e){let t,r,i;e.length!==2?(t=go,r=(o,f)=>go(e(o),f),i=(o,f)=>e(o)-f):(t=e===go||e===fx?e:dx,r=e,i=e);function n(o,f,h=0,d=o.length){if(h>>1;r(o[m],f)<0?h=m+1:d=m}while(h>>1;r(o[m],f)<=0?h=m+1:d=m}while(hh&&i(o[m-1],f)>-i(o[m],f)?m-1:m}return{left:n,center:l,right:s}}function dx(){return 0}function px(e){return e===null?NaN:+e}const mx=Th(go),gx=mx.right;Th(px).center;const yx=gx;class e1 extends Map{constructor(t,r=wx){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,n]of t)this.set(i,n)}get(t){return super.get(r1(this,t))}has(t){return super.has(r1(this,t))}set(t,r){return super.set(bx(this,t),r)}delete(t){return super.delete(xx(this,t))}}function r1({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function bx({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function xx({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function wx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const kx=Math.sqrt(50),vx=Math.sqrt(10),Cx=Math.sqrt(2);function Io(e,t,r){const i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),s=i/Math.pow(10,n),l=s>=kx?10:s>=vx?5:s>=Cx?2:1;let o,f,h;return n<0?(h=Math.pow(10,-n)/l,o=Math.round(e*h),f=Math.round(t*h),o/ht&&--f,h=-h):(h=Math.pow(10,n)*l,o=Math.round(e/h),f=Math.round(t/h),o*ht&&--f),f0))return[];if(e===t)return[e];const i=t=n))return[];const o=s-n+1,f=new Array(o);if(i)if(l<0)for(let h=0;h=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r=n)&&(r=n)}return r}function fD(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function _x(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(n);++i+e(t)}function Lx(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function Ex(){return!this.__axis}function Vm(e,t){var r=[],i=null,n=null,s=6,l=6,o=3,f=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,h=e===yo||e===Za?-1:1,d=e===Za||e===P0?"x":"y",m=e===yo||e===Oc?Mx:Ax;function y(g){var w=i==null?t.ticks?t.ticks.apply(t,r):t.domain():i,S=n==null?t.tickFormat?t.tickFormat.apply(t,r):Tx:n,B=Math.max(s,0)+o,T=t.range(),L=+T[0]+f,z=+T[T.length-1]+f,R=(t.bandwidth?Lx:Bx)(t.copy(),f),$=g.selection?g.selection():g,A=$.selectAll(".domain").data([null]),N=$.selectAll(".tick").data(w,t).order(),U=N.exit(),X=N.enter().append("g").attr("class","tick"),j=N.select("line"),P=N.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),N=N.merge(X),j=j.merge(X.append("line").attr("stroke","currentColor").attr(d+"2",h*s)),P=P.merge(X.append("text").attr("fill","currentColor").attr(d,h*B).attr("dy",e===yo?"0em":e===Oc?"0.71em":"0.32em")),g!==$&&(A=A.transition(g),N=N.transition(g),j=j.transition(g),P=P.transition(g),U=U.transition(g).attr("opacity",i1).attr("transform",function(lt){return isFinite(lt=R(lt))?m(lt+f):this.getAttribute("transform")}),X.attr("opacity",i1).attr("transform",function(lt){var Q=this.parentNode.__axis;return m((Q&&isFinite(Q=Q(lt))?Q:R(lt))+f)})),U.remove(),A.attr("d",e===Za||e===P0?l?"M"+h*l+","+L+"H"+f+"V"+z+"H"+h*l:"M"+f+","+L+"V"+z:l?"M"+L+","+h*l+"V"+f+"H"+z+"V"+h*l:"M"+L+","+f+"H"+z),N.attr("opacity",1).attr("transform",function(lt){return m(R(lt)+f)}),j.attr(d+"2",h*s),P.attr(d,h*B).text(S),$.filter(Ex).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===P0?"start":e===Za?"end":"middle"),$.each(function(){this.__axis=R})}return y.scale=function(g){return arguments.length?(t=g,y):t},y.ticks=function(){return r=Array.from(arguments),y},y.tickArguments=function(g){return arguments.length?(r=g==null?[]:Array.from(g),y):r.slice()},y.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),y):i&&i.slice()},y.tickFormat=function(g){return arguments.length?(n=g,y):n},y.tickSize=function(g){return arguments.length?(s=l=+g,y):s},y.tickSizeInner=function(g){return arguments.length?(s=+g,y):s},y.tickSizeOuter=function(g){return arguments.length?(l=+g,y):l},y.tickPadding=function(g){return arguments.length?(o=+g,y):o},y.offset=function(g){return arguments.length?(f=+g,y):f},y}function dD(e){return Vm(yo,e)}function pD(e){return Vm(Oc,e)}var Dx={value:()=>{}};function Xm(){for(var e=0,t=arguments.length,r={},i;e=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}bo.prototype=Xm.prototype={constructor:bo,on:function(e,t){var r=this._,i=Fx(e+"",r),n,s=-1,l=i.length;if(arguments.length<2){for(;++s0)for(var r=new Array(n),i=0,n,s;i=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),s1.hasOwnProperty(t)?{space:s1[t],local:e}:e}function Rx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Rc&&t.documentElement.namespaceURI===Rc?t.createElement(e):t.createElementNS(r,e)}}function Nx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Zm(e){var t=_l(e);return(t.local?Nx:Rx)(t)}function zx(){}function Mh(e){return e==null?zx:function(){return this.querySelector(e)}}function $x(e){typeof e!="function"&&(e=Mh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n=z&&(z=L+1);!($=B[z])&&++z=0;)(l=i[n])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function c8(e){e||(e=h8);function t(m,y){return m&&y?e(m.__data__,y.__data__):!m-!y}for(var r=this._groups,i=r.length,n=new Array(i),s=0;st?1:e>=t?0:NaN}function u8(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function f8(){return Array.from(this)}function d8(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?S8:typeof t=="function"?T8:_8)(e,t,r==null?"":r)):ts(this.node(),e)}function ts(e,t){return e.style.getPropertyValue(t)||eg(e).getComputedStyle(e,null).getPropertyValue(t)}function A8(e){return function(){delete this[e]}}function B8(e,t){return function(){this[e]=t}}function L8(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function E8(e,t){return arguments.length>1?this.each((t==null?A8:typeof t=="function"?L8:B8)(e,t)):this.node()[e]}function rg(e){return e.trim().split(/^|\s+/)}function Ah(e){return e.classList||new ig(e)}function ig(e){this._node=e,this._names=rg(e.getAttribute("class")||"")}ig.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ng(e,t){for(var r=Ah(e),i=-1,n=t.length;++i=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function s9(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,s;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ka(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ka(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=p9.exec(e))?new Qe(t[1],t[2],t[3],1):(t=m9.exec(e))?new Qe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=g9.exec(e))?Ka(t[1],t[2],t[3],t[4]):(t=y9.exec(e))?Ka(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=b9.exec(e))?f1(t[1],t[2]/100,t[3]/100,1):(t=x9.exec(e))?f1(t[1],t[2]/100,t[3]/100,t[4]):a1.hasOwnProperty(e)?c1(a1[e]):e==="transparent"?new Qe(NaN,NaN,NaN,0):null}function c1(e){return new Qe(e>>16&255,e>>8&255,e&255,1)}function Ka(e,t,r,i){return i<=0&&(e=t=r=NaN),new Qe(e,t,r,i)}function lg(e){return e instanceof xn||(e=dn(e)),e?(e=e.rgb(),new Qe(e.r,e.g,e.b,e.opacity)):new Qe}function Nc(e,t,r,i){return arguments.length===1?lg(e):new Qe(e,t,r,i==null?1:i)}function Qe(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}ka(Qe,Nc,Tl(xn,{brighter(e){return e=e==null?qo:Math.pow(qo,e),new Qe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ea:Math.pow(ea,e),new Qe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Qe(hn(this.r),hn(this.g),hn(this.b),Ho(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:h1,formatHex:h1,formatHex8:v9,formatRgb:u1,toString:u1}));function h1(){return`#${ln(this.r)}${ln(this.g)}${ln(this.b)}`}function v9(){return`#${ln(this.r)}${ln(this.g)}${ln(this.b)}${ln((isNaN(this.opacity)?1:this.opacity)*255)}`}function u1(){const e=Ho(this.opacity);return`${e===1?"rgb(":"rgba("}${hn(this.r)}, ${hn(this.g)}, ${hn(this.b)}${e===1?")":`, ${e})`}`}function Ho(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ln(e){return e=hn(e),(e<16?"0":"")+e.toString(16)}function f1(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ir(e,t,r,i)}function cg(e){if(e instanceof Ir)return new Ir(e.h,e.s,e.l,e.opacity);if(e instanceof xn||(e=dn(e)),!e)return new Ir;if(e instanceof Ir)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=Math.max(t,r,i),l=NaN,o=s-n,f=(s+n)/2;return o?(t===s?l=(r-i)/o+(r0&&f<1?0:l,new Ir(l,o,f,e.opacity)}function C9(e,t,r,i){return arguments.length===1?cg(e):new Ir(e,t,r,i==null?1:i)}function Ir(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}ka(Ir,C9,Tl(xn,{brighter(e){return e=e==null?qo:Math.pow(qo,e),new Ir(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ea:Math.pow(ea,e),new Ir(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Qe(q0(e>=240?e-240:e+120,n,i),q0(e,n,i),q0(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Ir(d1(this.h),Qa(this.s),Qa(this.l),Ho(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 e=Ho(this.opacity);return`${e===1?"hsl(":"hsla("}${d1(this.h)}, ${Qa(this.s)*100}%, ${Qa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function d1(e){return e=(e||0)%360,e<0?e+360:e}function Qa(e){return Math.max(0,Math.min(1,e||0))}function q0(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const S9=Math.PI/180,_9=180/Math.PI,Wo=18,hg=.96422,ug=1,fg=.82521,dg=4/29,jn=6/29,pg=3*jn*jn,T9=jn*jn*jn;function mg(e){if(e instanceof ri)return new ri(e.l,e.a,e.b,e.opacity);if(e instanceof bi)return gg(e);e instanceof Qe||(e=lg(e));var t=j0(e.r),r=j0(e.g),i=j0(e.b),n=H0((.2225045*t+.7168786*r+.0606169*i)/ug),s,l;return t===r&&r===i?s=l=n:(s=H0((.4360747*t+.3850649*r+.1430804*i)/hg),l=H0((.0139322*t+.0971045*r+.7141733*i)/fg)),new ri(116*n-16,500*(s-n),200*(n-l),e.opacity)}function M9(e,t,r,i){return arguments.length===1?mg(e):new ri(e,t,r,i==null?1:i)}function ri(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}ka(ri,M9,Tl(xn,{brighter(e){return new ri(this.l+Wo*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new ri(this.l-Wo*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=hg*W0(t),e=ug*W0(e),r=fg*W0(r),new Qe(U0(3.1338561*t-1.6168667*e-.4906146*r),U0(-.9787684*t+1.9161415*e+.033454*r),U0(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function H0(e){return e>T9?Math.pow(e,1/3):e/pg+dg}function W0(e){return e>jn?e*e*e:pg*(e-dg)}function U0(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function j0(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function A9(e){if(e instanceof bi)return new bi(e.h,e.c,e.l,e.opacity);if(e instanceof ri||(e=mg(e)),e.a===0&&e.b===0)return new bi(NaN,0()=>e;function yg(e,t){return function(r){return e+r*t}}function B9(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function L9(e,t){var r=t-e;return r?yg(e,r>180||r<-180?r-360*Math.round(r/360):r):Ml(isNaN(e)?t:e)}function E9(e){return(e=+e)==1?Gs:function(t,r){return r-t?B9(t,r,e):Ml(isNaN(t)?r:t)}}function Gs(e,t){var r=t-e;return r?yg(e,r):Ml(isNaN(e)?t:e)}const Uo=function e(t){var r=E9(t);function i(n,s){var l=r((n=Nc(n)).r,(s=Nc(s)).r),o=r(n.g,s.g),f=r(n.b,s.b),h=Gs(n.opacity,s.opacity);return function(d){return n.r=l(d),n.g=o(d),n.b=f(d),n.opacity=h(d),n+""}}return i.gamma=e,i}(1);function D9(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(s){for(n=0;nr&&(s=t.slice(r,s),o[l]?o[l]+=s:o[++l]=s),(i=i[0])===(n=n[0])?o[l]?o[l]+=n:o[++l]=n:(o[++l]=null,f.push({i:l,x:$r(i,n)})),r=Y0.lastIndex;return r180?d+=360:d-h>180&&(h+=360),y.push({i:m.push(n(m)+"rotate(",null,i)-2,x:$r(h,d)})):d&&m.push(n(m)+"rotate("+d+i)}function o(h,d,m,y){h!==d?y.push({i:m.push(n(m)+"skewX(",null,i)-2,x:$r(h,d)}):d&&m.push(n(m)+"skewX("+d+i)}function f(h,d,m,y,g,w){if(h!==m||d!==y){var S=g.push(n(g)+"scale(",null,",",null,")");w.push({i:S-4,x:$r(h,m)},{i:S-2,x:$r(d,y)})}else(m!==1||y!==1)&&g.push(n(g)+"scale("+m+","+y+")")}return function(h,d){var m=[],y=[];return h=e(h),d=e(d),s(h.translateX,h.translateY,d.translateX,d.translateY,m,y),l(h.rotate,d.rotate,m,y),o(h.skewX,d.skewX,m,y),f(h.scaleX,h.scaleY,d.scaleX,d.scaleY,m,y),h=d=null,function(g){for(var w=-1,S=y.length,B;++w=0&&e._call.call(void 0,t),e=e._next;--es}function m1(){pn=(Yo=ia.now())+Al,es=$s=0;try{Y9()}finally{es=0,V9(),pn=0}}function G9(){var e=ia.now(),t=e-Yo;t>kg&&(Al-=t,Yo=e)}function V9(){for(var e,t=jo,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:jo=r);Is=e,Pc(i)}function Pc(e){if(!es){$s&&($s=clearTimeout($s));var t=e-pn;t>24?(e<1/0&&($s=setTimeout(m1,e-ia.now()-Al)),Ms&&(Ms=clearInterval(Ms))):(Ms||(Yo=ia.now(),Ms=setInterval(G9,kg)),es=1,vg(m1))}}function g1(e,t,r){var i=new Go;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var X9=Xm("start","end","cancel","interrupt"),Z9=[],Sg=0,y1=1,qc=2,xo=3,b1=4,Hc=5,wo=6;function Bl(e,t,r,i,n,s){var l=e.__transition;if(!l)e.__transition={};else if(r in l)return;K9(e,r,{name:t,index:i,group:n,on:X9,tween:Z9,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Sg})}function Eh(e,t){var r=Wr(e,t);if(r.state>Sg)throw new Error("too late; already scheduled");return r}function ni(e,t){var r=Wr(e,t);if(r.state>xo)throw new Error("too late; already running");return r}function Wr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function K9(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Cg(s,0,r.time);function s(h){r.state=y1,r.timer.restart(l,r.delay,r.time),r.delay<=h&&l(h-r.delay)}function l(h){var d,m,y,g;if(r.state!==y1)return f();for(d in i)if(g=i[d],g.name===r.name){if(g.state===xo)return g1(l);g.state===b1?(g.state=wo,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete i[d]):+dqc&&i.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function Aw(e,t,r){var i,n,s=Mw(t)?Eh:ni;return function(){var l=s(this,e),o=l.on;o!==i&&(n=(i=o).copy()).on(t,r),l.on=n}}function Bw(e,t){var r=this._id;return arguments.length<2?Wr(this.node(),r).on.on(e):this.each(Aw(r,e,t))}function Lw(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Ew(){return this.on("end.remove",Lw(this._id))}function Dw(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Mh(e));for(var i=this._groups,n=i.length,s=new Array(n),l=0;l=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ag;const r=Oi(10,t);return function(i){this._+=i[0];for(let n=1,s=i.length;nrn)if(!(Math.abs(m*f-h*d)>rn)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let g=i-l,w=n-o,S=f*f+h*h,B=g*g+w*w,T=Math.sqrt(S),L=Math.sqrt(y),z=s*Math.tan((Wc-Math.acos((S+y-B)/(2*T*L)))/2),R=z/L,$=z/T;Math.abs(R-1)>rn&&this._append`L${t+R*d},${r+R*m}`,this._append`A${s},${s},0,0,${+(m*g>d*w)},${this._x1=t+$*f},${this._y1=r+$*h}`}}arc(t,r,i,n,s,l){if(t=+t,r=+r,i=+i,l=!!l,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),f=i*Math.sin(n),h=t+o,d=r+f,m=1^l,y=l?n-s:s-n;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>rn||Math.abs(this._y1-d)>rn)&&this._append`L${h},${d}`,i&&(y<0&&(y=y%Uc+Uc),y>ik?this._append`A${i},${i},0,1,${m},${t-o},${r-f}A${i},${i},0,1,${m},${this._x1=h},${this._y1=d}`:y>rn&&this._append`A${i},${i},0,${+(y>=Wc)},${m},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function ak(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Vo(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function rs(e){return e=Vo(Math.abs(e)),e?e[1]:NaN}function ok(e,t){return function(r,i){for(var n=r.length,s=[],l=0,o=e[0],f=0;n>0&&o>0&&(f+o+1>i&&(o=Math.max(1,i-f)),s.push(r.substring(n-=o,n+o)),!((f+=o+1)>i));)o=e[l=(l+1)%e.length];return s.reverse().join(t)}}function lk(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var ck=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xo(e){if(!(t=ck.exec(e)))throw new Error("invalid format: "+e);var t;return new Fh({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Xo.prototype=Fh.prototype;function Fh(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Fh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function hk(e){t:for(var t=e.length,r=1,i=-1,n;r0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var Bg;function uk(e,t){var r=Vo(e,t);if(!r)return e+"";var i=r[0],n=r[1],s=n-(Bg=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,l=i.length;return s===l?i:s>l?i+new Array(s-l+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+Vo(e,Math.max(0,t+s-1))[0]}function x1(e,t){var r=Vo(e,t);if(!r)return e+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const w1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ak,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>x1(e*100,t),r:x1,s:uk,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function k1(e){return e}var v1=Array.prototype.map,C1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function fk(e){var t=e.grouping===void 0||e.thousands===void 0?k1:ok(v1.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?k1:lk(v1.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(m){m=Xo(m);var y=m.fill,g=m.align,w=m.sign,S=m.symbol,B=m.zero,T=m.width,L=m.comma,z=m.precision,R=m.trim,$=m.type;$==="n"?(L=!0,$="g"):w1[$]||(z===void 0&&(z=12),R=!0,$="g"),(B||y==="0"&&g==="=")&&(B=!0,y="0",g="=");var A=S==="$"?r:S==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",N=S==="$"?i:/[%p]/.test($)?l:"",U=w1[$],X=/[defgprs%]/.test($);z=z===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,z)):Math.max(0,Math.min(20,z));function j(P){var lt=A,Q=N,Z,rt,nt;if($==="c")Q=U(P)+Q,P="";else{P=+P;var at=P<0||1/P<0;if(P=isNaN(P)?f:U(Math.abs(P),z),R&&(P=hk(P)),at&&+P==0&&w!=="+"&&(at=!1),lt=(at?w==="("?w:o:w==="-"||w==="("?"":w)+lt,Q=($==="s"?C1[8+Bg/3]:"")+Q+(at&&w==="("?")":""),X){for(Z=-1,rt=P.length;++Znt||nt>57){Q=(nt===46?n+P.slice(Z+1):P.slice(Z))+Q,P=P.slice(0,Z);break}}}L&&!B&&(P=t(P,1/0));var et=lt.length+P.length+Q.length,it=et>1)+lt+P+Q+it.slice(et);break;default:P=it+lt+P+Q;break}return s(P)}return j.toString=function(){return m+""},j}function d(m,y){var g=h((m=Xo(m),m.type="f",m)),w=Math.max(-8,Math.min(8,Math.floor(rs(y)/3)))*3,S=Math.pow(10,-w),B=C1[8+w/3];return function(T){return g(S*T)+B}}return{format:h,formatPrefix:d}}var to,Lg,Eg;dk({thousands:",",grouping:[3],currency:["$",""]});function dk(e){return to=fk(e),Lg=to.format,Eg=to.formatPrefix,to}function pk(e){return Math.max(0,-rs(Math.abs(e)))}function mk(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rs(t)/3)))*3-rs(Math.abs(e)))}function gk(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rs(t)-rs(e))+1}function Ll(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const S1=Symbol("implicit");function Dg(){var e=new e1,t=[],r=[],i=S1;function n(s){let l=e.get(s);if(l===void 0){if(i!==S1)return i;e.set(s,l=t.push(s)-1)}return r[l%r.length]}return n.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new e1;for(const l of s)e.has(l)||e.set(l,t.push(l)-1);return n},n.range=function(s){return arguments.length?(r=Array.from(s),n):r.slice()},n.unknown=function(s){return arguments.length?(i=s,n):i},n.copy=function(){return Dg(t,r).unknown(i)},Ll.apply(n,arguments),n}function yk(){var e=Dg().unknown(void 0),t=e.domain,r=e.range,i=0,n=1,s,l,o=!1,f=0,h=0,d=.5;delete e.unknown;function m(){var y=t().length,g=nt&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function kk(e,t,r){var i=e[0],n=e[1],s=t[0],l=t[1];return n2?vk:kk,f=h=null,m}function m(y){return y==null||isNaN(y=+y)?s:(f||(f=o(e.map(i),t,r)))(i(l(y)))}return m.invert=function(y){return l(n((h||(h=o(t,e.map(i),$r)))(y)))},m.domain=function(y){return arguments.length?(e=Array.from(y,xk),d()):e.slice()},m.range=function(y){return arguments.length?(t=Array.from(y),d()):t.slice()},m.rangeRound=function(y){return t=Array.from(y),r=I9,d()},m.clamp=function(y){return arguments.length?(l=y?!0:qn,d()):l!==qn},m.interpolate=function(y){return arguments.length?(r=y,d()):r},m.unknown=function(y){return arguments.length?(s=y,m):s},function(y,g){return i=y,n=g,d()}}function Og(){return Ck()(qn,qn)}function Sk(e,t,r,i){var n=Fc(e,t,r),s;switch(i=Xo(i==null?",f":i),i.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(s=mk(n,l))&&(i.precision=s),Eg(i,l)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=gk(n,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=pk(n))&&(i.precision=s-(i.type==="%")*2);break}}return Lg(i)}function _k(e){var t=e.domain;return e.ticks=function(r){var i=t();return Sx(i[0],i[i.length-1],r==null?10:r)},e.tickFormat=function(r,i){var n=t();return Sk(n[0],n[n.length-1],r==null?10:r,i)},e.nice=function(r){r==null&&(r=10);var i=t(),n=0,s=i.length-1,l=i[n],o=i[s],f,h,d=10;for(o0;){if(h=Dc(l,o,r),h===f)return i[n]=l,i[s]=o,t(i);if(h>0)l=Math.floor(l/h)*h,o=Math.ceil(o/h)*h;else if(h<0)l=Math.ceil(l*h)/h,o=Math.floor(o*h)/h;else break;f=h}return e},e}function Tk(){var e=Og();return e.copy=function(){return Fg(e,Tk())},Ll.apply(e,arguments),_k(e)}function Mk(e,t){e=e.slice();var r=0,i=e.length-1,n=e[r],s=e[i],l;return s(e(s=new Date(+s)),s),n.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),n.round=s=>{const l=n(s),o=n.ceil(s);return s-l(t(s=new Date(+s),l==null?1:Math.floor(l)),s),n.range=(s,l,o)=>{const f=[];if(s=n.ceil(s),o=o==null?1:Math.floor(o),!(s0))return f;let h;do f.push(h=new Date(+s)),t(s,o),e(s);while(h$e(l=>{if(l>=l)for(;e(l),!s(l);)l.setTime(l-1)},(l,o)=>{if(l>=l)if(o<0)for(;++o<=0;)for(;t(l,-1),!s(l););else for(;--o>=0;)for(;t(l,1),!s(l););}),r&&(n.count=(s,l)=>(G0.setTime(+s),V0.setTime(+l),e(G0),e(V0),Math.floor(r(G0,V0))),n.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?n.filter(i?l=>i(l)%s===0:l=>n.count(0,l)%s===0):n)),n}const Zo=$e(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Zo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?$e(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Zo);Zo.range;const xi=1e3,Er=xi*60,wi=Er*60,Si=wi*24,Oh=Si*7,T1=Si*30,X0=Si*365,Hn=$e(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xi)},(e,t)=>(t-e)/xi,e=>e.getUTCSeconds());Hn.range;const Rh=$e(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xi)},(e,t)=>{e.setTime(+e+t*Er)},(e,t)=>(t-e)/Er,e=>e.getMinutes());Rh.range;const Ak=$e(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Er)},(e,t)=>(t-e)/Er,e=>e.getUTCMinutes());Ak.range;const Nh=$e(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xi-e.getMinutes()*Er)},(e,t)=>{e.setTime(+e+t*wi)},(e,t)=>(t-e)/wi,e=>e.getHours());Nh.range;const Bk=$e(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*wi)},(e,t)=>(t-e)/wi,e=>e.getUTCHours());Bk.range;const va=$e(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Er)/Si,e=>e.getDate()-1);va.range;const zh=$e(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Si,e=>e.getUTCDate()-1);zh.range;const Lk=$e(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Si,e=>Math.floor(e/Si));Lk.range;function wn(e){return $e(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Er)/Oh)}const El=wn(0),Ko=wn(1),Ek=wn(2),Dk=wn(3),is=wn(4),Fk=wn(5),Ok=wn(6);El.range;Ko.range;Ek.range;Dk.range;is.range;Fk.range;Ok.range;function kn(e){return $e(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Oh)}const Rg=kn(0),Qo=kn(1),Rk=kn(2),Nk=kn(3),ns=kn(4),zk=kn(5),$k=kn(6);Rg.range;Qo.range;Rk.range;Nk.range;ns.range;zk.range;$k.range;const $h=$e(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());$h.range;const Ik=$e(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Ik.range;const _i=$e(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());_i.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$e(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});_i.range;const mn=$e(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());mn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$e(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});mn.range;function Pk(e,t,r,i,n,s){const l=[[Hn,1,xi],[Hn,5,5*xi],[Hn,15,15*xi],[Hn,30,30*xi],[s,1,Er],[s,5,5*Er],[s,15,15*Er],[s,30,30*Er],[n,1,wi],[n,3,3*wi],[n,6,6*wi],[n,12,12*wi],[i,1,Si],[i,2,2*Si],[r,1,Oh],[t,1,T1],[t,3,3*T1],[e,1,X0]];function o(h,d,m){const y=dB).right(l,y);if(g===l.length)return e.every(Fc(h/X0,d/X0,m));if(g===0)return Zo.every(Math.max(Fc(h,d,m),1));const[w,S]=l[y/l[g-1][2]53)return null;"w"in dt||(dt.w=1),"Z"in dt?(Zt=K0(As(dt.y,0,1)),Fe=Zt.getUTCDay(),Zt=Fe>4||Fe===0?Qo.ceil(Zt):Qo(Zt),Zt=zh.offset(Zt,(dt.V-1)*7),dt.y=Zt.getUTCFullYear(),dt.m=Zt.getUTCMonth(),dt.d=Zt.getUTCDate()+(dt.w+6)%7):(Zt=Z0(As(dt.y,0,1)),Fe=Zt.getDay(),Zt=Fe>4||Fe===0?Ko.ceil(Zt):Ko(Zt),Zt=va.offset(Zt,(dt.V-1)*7),dt.y=Zt.getFullYear(),dt.m=Zt.getMonth(),dt.d=Zt.getDate()+(dt.w+6)%7)}else("W"in dt||"U"in dt)&&("w"in dt||(dt.w="u"in dt?dt.u%7:"W"in dt?1:0),Fe="Z"in dt?K0(As(dt.y,0,1)).getUTCDay():Z0(As(dt.y,0,1)).getDay(),dt.m=0,dt.d="W"in dt?(dt.w+6)%7+dt.W*7-(Fe+5)%7:dt.w+dt.U*7-(Fe+6)%7);return"Z"in dt?(dt.H+=dt.Z/100|0,dt.M+=dt.Z%100,K0(dt)):Z0(dt)}}function U(yt,_t,It,dt){for(var ue=0,Zt=_t.length,Fe=It.length,Le,Ye;ue=Fe)return-1;if(Le=_t.charCodeAt(ue++),Le===37){if(Le=_t.charAt(ue++),Ye=$[Le in M1?_t.charAt(ue++):Le],!Ye||(dt=Ye(yt,It,dt))<0)return-1}else if(Le!=It.charCodeAt(dt++))return-1}return dt}function X(yt,_t,It){var dt=h.exec(_t.slice(It));return dt?(yt.p=d.get(dt[0].toLowerCase()),It+dt[0].length):-1}function j(yt,_t,It){var dt=g.exec(_t.slice(It));return dt?(yt.w=w.get(dt[0].toLowerCase()),It+dt[0].length):-1}function P(yt,_t,It){var dt=m.exec(_t.slice(It));return dt?(yt.w=y.get(dt[0].toLowerCase()),It+dt[0].length):-1}function lt(yt,_t,It){var dt=T.exec(_t.slice(It));return dt?(yt.m=L.get(dt[0].toLowerCase()),It+dt[0].length):-1}function Q(yt,_t,It){var dt=S.exec(_t.slice(It));return dt?(yt.m=B.get(dt[0].toLowerCase()),It+dt[0].length):-1}function Z(yt,_t,It){return U(yt,t,_t,It)}function rt(yt,_t,It){return U(yt,r,_t,It)}function nt(yt,_t,It){return U(yt,i,_t,It)}function at(yt){return l[yt.getDay()]}function et(yt){return s[yt.getDay()]}function it(yt){return f[yt.getMonth()]}function ot(yt){return o[yt.getMonth()]}function J(yt){return n[+(yt.getHours()>=12)]}function xt(yt){return 1+~~(yt.getMonth()/3)}function ft(yt){return l[yt.getUTCDay()]}function wt(yt){return s[yt.getUTCDay()]}function st(yt){return f[yt.getUTCMonth()]}function Nt(yt){return o[yt.getUTCMonth()]}function Ut(yt){return n[+(yt.getUTCHours()>=12)]}function Vt(yt){return 1+~~(yt.getUTCMonth()/3)}return{format:function(yt){var _t=A(yt+="",z);return _t.toString=function(){return yt},_t},parse:function(yt){var _t=N(yt+="",!1);return _t.toString=function(){return yt},_t},utcFormat:function(yt){var _t=A(yt+="",R);return _t.toString=function(){return yt},_t},utcParse:function(yt){var _t=N(yt+="",!0);return _t.toString=function(){return yt},_t}}}var M1={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Uk=/^%/,jk=/[\\^$*+?|[\]().{}]/g;function se(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",s=n.length;return i+(s[t.toLowerCase(),r]))}function Gk(e,t,r){var i=qe.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function Vk(e,t,r){var i=qe.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function Xk(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function Zk(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function Kk(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function A1(e,t,r){var i=qe.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function B1(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function Qk(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function Jk(e,t,r){var i=qe.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function tv(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function L1(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function ev(e,t,r){var i=qe.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function E1(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function rv(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function iv(e,t,r){var i=qe.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function nv(e,t,r){var i=qe.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function sv(e,t,r){var i=qe.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function av(e,t,r){var i=Uk.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function ov(e,t,r){var i=qe.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function lv(e,t,r){var i=qe.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function D1(e,t){return se(e.getDate(),t,2)}function cv(e,t){return se(e.getHours(),t,2)}function hv(e,t){return se(e.getHours()%12||12,t,2)}function uv(e,t){return se(1+va.count(_i(e),e),t,3)}function Ng(e,t){return se(e.getMilliseconds(),t,3)}function fv(e,t){return Ng(e,t)+"000"}function dv(e,t){return se(e.getMonth()+1,t,2)}function pv(e,t){return se(e.getMinutes(),t,2)}function mv(e,t){return se(e.getSeconds(),t,2)}function gv(e){var t=e.getDay();return t===0?7:t}function yv(e,t){return se(El.count(_i(e)-1,e),t,2)}function zg(e){var t=e.getDay();return t>=4||t===0?is(e):is.ceil(e)}function bv(e,t){return e=zg(e),se(is.count(_i(e),e)+(_i(e).getDay()===4),t,2)}function xv(e){return e.getDay()}function wv(e,t){return se(Ko.count(_i(e)-1,e),t,2)}function kv(e,t){return se(e.getFullYear()%100,t,2)}function vv(e,t){return e=zg(e),se(e.getFullYear()%100,t,2)}function Cv(e,t){return se(e.getFullYear()%1e4,t,4)}function Sv(e,t){var r=e.getDay();return e=r>=4||r===0?is(e):is.ceil(e),se(e.getFullYear()%1e4,t,4)}function _v(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+se(t/60|0,"0",2)+se(t%60,"0",2)}function F1(e,t){return se(e.getUTCDate(),t,2)}function Tv(e,t){return se(e.getUTCHours(),t,2)}function Mv(e,t){return se(e.getUTCHours()%12||12,t,2)}function Av(e,t){return se(1+zh.count(mn(e),e),t,3)}function $g(e,t){return se(e.getUTCMilliseconds(),t,3)}function Bv(e,t){return $g(e,t)+"000"}function Lv(e,t){return se(e.getUTCMonth()+1,t,2)}function Ev(e,t){return se(e.getUTCMinutes(),t,2)}function Dv(e,t){return se(e.getUTCSeconds(),t,2)}function Fv(e){var t=e.getUTCDay();return t===0?7:t}function Ov(e,t){return se(Rg.count(mn(e)-1,e),t,2)}function Ig(e){var t=e.getUTCDay();return t>=4||t===0?ns(e):ns.ceil(e)}function Rv(e,t){return e=Ig(e),se(ns.count(mn(e),e)+(mn(e).getUTCDay()===4),t,2)}function Nv(e){return e.getUTCDay()}function zv(e,t){return se(Qo.count(mn(e)-1,e),t,2)}function $v(e,t){return se(e.getUTCFullYear()%100,t,2)}function Iv(e,t){return e=Ig(e),se(e.getUTCFullYear()%100,t,2)}function Pv(e,t){return se(e.getUTCFullYear()%1e4,t,4)}function qv(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ns(e):ns.ceil(e),se(e.getUTCFullYear()%1e4,t,4)}function Hv(){return"+0000"}function O1(){return"%"}function R1(e){return+e}function N1(e){return Math.floor(+e/1e3)}var Nn,Pg;Wv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Wv(e){return Nn=Wk(e),Pg=Nn.format,Nn.parse,Nn.utcFormat,Nn.utcParse,Nn}function Uv(e){return new Date(e)}function jv(e){return e instanceof Date?+e:+new Date(+e)}function qg(e,t,r,i,n,s,l,o,f,h){var d=Og(),m=d.invert,y=d.domain,g=h(".%L"),w=h(":%S"),S=h("%I:%M"),B=h("%I %p"),T=h("%a %d"),L=h("%b %d"),z=h("%B"),R=h("%Y");function $(A){return(f(A)1?0:e<-1?na:Math.acos(e)}function $1(e){return e>=1?Jo:e<=-1?-Jo:Math.asin(e)}function Hg(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new sk(t)}function Xv(e){return e.innerRadius}function Zv(e){return e.outerRadius}function Kv(e){return e.startAngle}function Qv(e){return e.endAngle}function Jv(e){return e&&e.padAngle}function tC(e,t,r,i,n,s,l,o){var f=r-e,h=i-t,d=l-n,m=o-s,y=m*f-d*h;if(!(y*yZ*Z+rt*rt&&(U=j,X=P),{cx:U,cy:X,x01:-d,y01:-m,x11:U*(n/$-1),y11:X*(n/$-1)}}function bD(){var e=Xv,t=Zv,r=Ae(0),i=null,n=Kv,s=Qv,l=Jv,o=null,f=Hg(h);function h(){var d,m,y=+e.apply(this,arguments),g=+t.apply(this,arguments),w=n.apply(this,arguments)-Jo,S=s.apply(this,arguments)-Jo,B=z1(S-w),T=S>w;if(o||(o=d=f()),gKe))o.moveTo(0,0);else if(B>ko-Ke)o.moveTo(g*tn(w),g*Zr(w)),o.arc(0,0,g,w,S,!T),y>Ke&&(o.moveTo(y*tn(S),y*Zr(S)),o.arc(0,0,y,S,w,T));else{var L=w,z=S,R=w,$=S,A=B,N=B,U=l.apply(this,arguments)/2,X=U>Ke&&(i?+i.apply(this,arguments):Wn(y*y+g*g)),j=Q0(z1(g-y)/2,+r.apply(this,arguments)),P=j,lt=j,Q,Z;if(X>Ke){var rt=$1(X/y*Zr(U)),nt=$1(X/g*Zr(U));(A-=rt*2)>Ke?(rt*=T?1:-1,R+=rt,$-=rt):(A=0,R=$=(w+S)/2),(N-=nt*2)>Ke?(nt*=T?1:-1,L+=nt,z-=nt):(N=0,L=z=(w+S)/2)}var at=g*tn(L),et=g*Zr(L),it=y*tn($),ot=y*Zr($);if(j>Ke){var J=g*tn(z),xt=g*Zr(z),ft=y*tn(R),wt=y*Zr(R),st;if(BKe?lt>Ke?(Q=eo(ft,wt,at,et,g,lt,T),Z=eo(J,xt,it,ot,g,lt,T),o.moveTo(Q.cx+Q.x01,Q.cy+Q.y01),ltKe)||!(A>Ke)?o.lineTo(it,ot):P>Ke?(Q=eo(it,ot,J,xt,y,-P,T),Z=eo(at,et,ft,wt,y,-P,T),o.lineTo(Q.cx+Q.x01,Q.cy+Q.y01),Pe?1:t>=e?0:NaN}function sC(e){return e}function xD(){var e=sC,t=nC,r=null,i=Ae(0),n=Ae(ko),s=Ae(0);function l(o){var f,h=(o=Wg(o)).length,d,m,y=0,g=new Array(h),w=new Array(h),S=+i.apply(this,arguments),B=Math.min(ko,Math.max(-ko,n.apply(this,arguments)-S)),T,L=Math.min(Math.abs(B)/h,s.apply(this,arguments)),z=L*(B<0?-1:1),R;for(f=0;f0&&(y+=R);for(t!=null?g.sort(function($,A){return t(w[$],w[A])}):r!=null&&g.sort(function($,A){return r(o[$],o[A])}),f=0,m=y?(B-h*z)/y:0;f0?R*m:0)+z,w[d]={data:o[d],index:f,value:R,startAngle:S,endAngle:T,padAngle:L};return w}return l.value=function(o){return arguments.length?(e=typeof o=="function"?o:Ae(+o),l):e},l.sortValues=function(o){return arguments.length?(t=o,r=null,l):t},l.sort=function(o){return arguments.length?(r=o,t=null,l):r},l.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Ae(+o),l):i},l.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Ae(+o),l):n},l.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:Ae(+o),l):s},l}class jg{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Yg(e){return new jg(e,!0)}function Gg(e){return new jg(e,!1)}function Ii(){}function el(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Dl(e){this._context=e}Dl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:el(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:el(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vo(e){return new Dl(e)}function Vg(e){this._context=e}Vg.prototype={areaStart:Ii,areaEnd:Ii,lineStart: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},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:el(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aC(e){return new Vg(e)}function Xg(e){this._context=e}Xg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:el(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oC(e){return new Xg(e)}function Zg(e,t){this._basis=new Dl(e),this._beta=t}Zg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],s=e[r]-i,l=t[r]-n,o=-1,f;++o<=r;)f=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+f*s),this._beta*t[o]+(1-this._beta)*(n+f*l));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const lC=function e(t){function r(i){return t===1?new Dl(i):new Zg(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function rl(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Ih(e,t){this._context=e,this._k=(1-t)/6}Ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:rl(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:rl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Kg=function e(t){function r(i){return new Ih(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Ph(e,t){this._context=e,this._k=(1-t)/6}Ph.prototype={areaStart:Ii,areaEnd:Ii,lineStart: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},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:rl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cC=function e(t){function r(i){return new Ph(i,t)}return r.tension=function(i){return e(+i)},r}(0);function qh(e,t){this._context=e,this._k=(1-t)/6}qh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hC=function e(t){function r(i){return new qh(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Hh(e,t,r){var i=e._x1,n=e._y1,s=e._x2,l=e._y2;if(e._l01_a>Ke){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,f=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/f,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/f}if(e._l23_a>Ke){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*h+e._x1*e._l23_2a-t*e._l12_2a)/d,l=(l*h+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(i,n,s,l,e._x2,e._y2)}function Qg(e,t){this._context=e,this._alpha=t}Qg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart: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},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Hh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Jg=function e(t){function r(i){return t?new Qg(i,t):new Ih(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function t2(e,t){this._context=e,this._alpha=t}t2.prototype={areaStart:Ii,areaEnd:Ii,lineStart: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},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Hh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const uC=function e(t){function r(i){return t?new t2(i,t):new Ph(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function e2(e,t){this._context=e,this._alpha=t}e2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart: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},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Hh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const fC=function e(t){function r(i){return t?new e2(i,t):new qh(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function r2(e){this._context=e}r2.prototype={areaStart:Ii,areaEnd:Ii,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function dC(e){return new r2(e)}function I1(e){return e<0?-1:1}function P1(e,t,r){var i=e._x1-e._x0,n=t-e._x1,s=(e._y1-e._y0)/(i||n<0&&-0),l=(r-e._y1)/(n||i<0&&-0),o=(s*n+l*i)/(i+n);return(I1(s)+I1(l))*Math.min(Math.abs(s),Math.abs(l),.5*Math.abs(o))||0}function q1(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function J0(e,t,r){var i=e._x0,n=e._y0,s=e._x1,l=e._y1,o=(s-i)/3;e._context.bezierCurveTo(i+o,n+o*t,s-o,l-o*r,s,l)}function il(e){this._context=e}il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:J0(this,this._t0,q1(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,J0(this,q1(this,r=P1(this,e,t)),r);break;default:J0(this,this._t0,r=P1(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function i2(e){this._context=new n2(e)}(i2.prototype=Object.create(il.prototype)).point=function(e,t){il.prototype.point.call(this,t,e)};function n2(e){this._context=e}n2.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,s){this._context.bezierCurveTo(t,e,i,r,s,n)}};function s2(e){return new il(e)}function a2(e){return new i2(e)}function o2(e){this._context=e}o2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=H1(e),n=H1(t),s=0,l=1;l=0;--t)n[t]=(l[t]-n[t+1])/s[t];for(s[r-1]=(e[r]+n[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function c2(e){return new Fl(e,.5)}function h2(e){return new Fl(e,0)}function u2(e){return new Fl(e,1)}function Ps(e,t,r){this.k=e,this.x=t,this.y=r}Ps.prototype={constructor:Ps,scale:function(e){return e===1?this:new Ps(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ps(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Ps.prototype;var pC=typeof global=="object"&&global&&global.Object===Object&&global;const f2=pC;var mC=typeof self=="object"&&self&&self.Object===Object&&self,gC=f2||mC||Function("return this")();const si=gC;var yC=si.Symbol;const nl=yC;var d2=Object.prototype,bC=d2.hasOwnProperty,xC=d2.toString,Es=nl?nl.toStringTag:void 0;function wC(e){var t=bC.call(e,Es),r=e[Es];try{e[Es]=void 0;var i=!0}catch(s){}var n=xC.call(e);return i&&(t?e[Es]=r:delete e[Es]),n}var kC=Object.prototype,vC=kC.toString;function CC(e){return vC.call(e)}var SC="[object Null]",_C="[object Undefined]",W1=nl?nl.toStringTag:void 0;function cs(e){return e==null?e===void 0?_C:SC:W1&&W1 in Object(e)?wC(e):CC(e)}function vn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var TC="[object AsyncFunction]",MC="[object Function]",AC="[object GeneratorFunction]",BC="[object Proxy]";function Wh(e){if(!vn(e))return!1;var t=cs(e);return t==MC||t==AC||t==TC||t==BC}var LC=si["__core-js_shared__"];const tc=LC;var U1=function(){var e=/[^.]+$/.exec(tc&&tc.keys&&tc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function EC(e){return!!U1&&U1 in e}var DC=Function.prototype,FC=DC.toString;function Cn(e){if(e!=null){try{return FC.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var OC=/[\\^$.*+?()[\]{}|]/g,RC=/^\[object .+?Constructor\]$/,NC=Function.prototype,zC=Object.prototype,$C=NC.toString,IC=zC.hasOwnProperty,PC=RegExp("^"+$C.call(IC).replace(OC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qC(e){if(!vn(e)||EC(e))return!1;var t=Wh(e)?PC:RC;return t.test(Cn(e))}function HC(e,t){return e==null?void 0:e[t]}function Sn(e,t){var r=HC(e,t);return qC(r)?r:void 0}var WC=Sn(Object,"create");const sa=WC;function UC(){this.__data__=sa?sa(null):{},this.size=0}function jC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var YC="__lodash_hash_undefined__",GC=Object.prototype,VC=GC.hasOwnProperty;function XC(e){var t=this.__data__;if(sa){var r=t[e];return r===YC?void 0:r}return VC.call(t,e)?t[e]:void 0}var ZC=Object.prototype,KC=ZC.hasOwnProperty;function QC(e){var t=this.__data__;return sa?t[e]!==void 0:KC.call(t,e)}var JC="__lodash_hash_undefined__";function tS(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=sa&&t===void 0?JC:t,this}function gn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}function oS(e,t){var r=this.__data__,i=Rl(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=HS}function $l(e){return e!=null&&b2(e.length)&&!Wh(e)}function WS(e){return Sa(e)&&$l(e)}function US(){return!1}var x2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,K1=x2&&typeof module=="object"&&module&&!module.nodeType&&module,jS=K1&&K1.exports===x2,Q1=jS?si.Buffer:void 0,YS=Q1?Q1.isBuffer:void 0,GS=YS||US;const jh=GS;var VS="[object Object]",XS=Function.prototype,ZS=Object.prototype,w2=XS.toString,KS=ZS.hasOwnProperty,QS=w2.call(Object);function JS(e){if(!Sa(e)||cs(e)!=VS)return!1;var t=g2(e);if(t===null)return!0;var r=KS.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&w2.call(r)==QS}var t_="[object Arguments]",e_="[object Array]",r_="[object Boolean]",i_="[object Date]",n_="[object Error]",s_="[object Function]",a_="[object Map]",o_="[object Number]",l_="[object Object]",c_="[object RegExp]",h_="[object Set]",u_="[object String]",f_="[object WeakMap]",d_="[object ArrayBuffer]",p_="[object DataView]",m_="[object Float32Array]",g_="[object Float64Array]",y_="[object Int8Array]",b_="[object Int16Array]",x_="[object Int32Array]",w_="[object Uint8Array]",k_="[object Uint8ClampedArray]",v_="[object Uint16Array]",C_="[object Uint32Array]",ke={};ke[m_]=ke[g_]=ke[y_]=ke[b_]=ke[x_]=ke[w_]=ke[k_]=ke[v_]=ke[C_]=!0;ke[t_]=ke[e_]=ke[d_]=ke[r_]=ke[p_]=ke[i_]=ke[n_]=ke[s_]=ke[a_]=ke[o_]=ke[l_]=ke[c_]=ke[h_]=ke[u_]=ke[f_]=!1;function S_(e){return Sa(e)&&b2(e.length)&&!!ke[cs(e)]}function __(e){return function(t){return e(t)}}var k2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vs=k2&&typeof module=="object"&&module&&!module.nodeType&&module,T_=Vs&&Vs.exports===k2,ec=T_&&f2.process,M_=function(){try{var e=Vs&&Vs.require&&Vs.require("util").types;return e||ec&&ec.binding&&ec.binding("util")}catch(t){}}();const J1=M_;var td=J1&&J1.isTypedArray,A_=td?__(td):S_;const Yh=A_;function Gc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var B_=Object.prototype,L_=B_.hasOwnProperty;function E_(e,t,r){var i=e[t];(!(L_.call(e,t)&&Ol(i,r))||r===void 0&&!(t in e))&&Uh(e,t,r)}function D_(e,t,r,i){var n=!r;r||(r={});for(var s=-1,l=t.length;++s-1&&e%1==0&&e0){if(++t>=Z_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var tT=J_(X_);const eT=tT;function rT(e,t){return eT(Y_(e,t,_2),e+"")}function iT(e,t,r){if(!vn(r))return!1;var i=typeof t;return(i=="number"?$l(r)&&v2(t,r.length):i=="string"&&t in r)?Ol(r[t],e):!1}function nT(e){return rT(function(t,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,l=n>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(n--,s):void 0,l&&iT(r[0],r[1],l)&&(s=n<3?void 0:s,n=1),t=Object(t);++io.args);Ao(l),i=je(i,[...l])}else i=r.args;if(!i)return;let n=hh(e,t);const s="config";return i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s]),i},"detectInit"),T2=k(function(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${cT.source})(?=[}][%]{2}).* `,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),ht.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const l=[];for(;(s=js.exec(e))!==null;)if(s.index===js.lastIndex&&js.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const o=s[1]?s[1]:s[2],f=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;l.push({type:o,args:f})}return l.length===0?{type:e,args:null}:l.length===1?l[0]:l}catch(n){return ht.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),uT=k(function(e){return e.replace(js,"")},"removeDirectives"),fT=k(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Gh(e,t){var i;if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return(i=lT[r])!=null?i:t}k(Gh,"interpolateToCurve");function M2(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Gm(r):r}k(M2,"formatUrl");var dT=k((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let s=window;for(let l=0;l{r+=Vh(n,t),t=n});const i=r/2;return Xh(e,i)}k(A2,"traverseEdge");function B2(e){return e.length===1?e[0]:A2(e)}k(B2,"calcLabelPosition");var rd=k((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Xh=k((e,t)=>{let r,i=t;for(const n of e){if(r){const s=Vh(n,r);if(s===0)return r;if(s=1)return{x:n.x,y:n.y};if(l>0&&l<1)return{x:rd((1-l)*r.x+l*n.x,5),y:rd((1-l)*r.y+l*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),pT=k((e,t,r)=>{ht.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Xh(t,25),s=e?10:5,l=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(l)*s+(t[0].x+n.x)/2,o.y=-Math.cos(l)*s+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function L2(e,t,r){const i=structuredClone(r);ht.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,s=Xh(i,n),l=10+e*.5,o=Math.atan2(i[0].y-s.y,i[0].x-s.x),f={x:0,y:0};return t==="start_left"?(f.x=Math.sin(o+Math.PI)*l+(i[0].x+s.x)/2,f.y=-Math.cos(o+Math.PI)*l+(i[0].y+s.y)/2):t==="end_right"?(f.x=Math.sin(o-Math.PI)*l+(i[0].x+s.x)/2-5,f.y=-Math.cos(o-Math.PI)*l+(i[0].y+s.y)/2-5):t==="end_left"?(f.x=Math.sin(o)*l+(i[0].x+s.x)/2-5,f.y=-Math.cos(o)*l+(i[0].y+s.y)/2-5):(f.x=Math.sin(o)*l+(i[0].x+s.x)/2,f.y=-Math.cos(o)*l+(i[0].y+s.y)/2),f}k(L2,"calcTerminalLabelPosition");function E2(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}k(E2,"getStylesFromArray");var id=0,mT=k(()=>(id++,"id-"+Math.random().toString(36).substr(2,12)+"-"+id),"generateId");function D2(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;nD2(e.length),"random"),yT=k(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"),bT=k(function(e,t){const r=t.text.replace(ls.lineBreakRegex," "),[,i]=Il(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const s=n.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),n},"drawSimpleText"),xT=Ca((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),ls.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let s="";return i.forEach((l,o)=>{const f=Ti(`${l} `,r),h=Ti(s,r);if(f>t){const{hyphenatedStrings:y,remainingWord:g}=wT(l,t,"-",r);n.push(s,...y),s=g}else h+f>=t?(n.push(s),s=l):s=[s,l].filter(Boolean).join(" ");o+1===i.length&&n.push(s)}),n.filter(l=>l!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),wT=Ca((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],s=[];let l="";return n.forEach((o,f)=>{const h=`${l}${o}`;if(Ti(h,i)>=t){const m=f+1,y=n.length===m,g=`${h}${r}`;s.push(y?h:g),l=""}else l=h}),{hyphenatedStrings:s,remainingWord:l}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function F2(e,t){return Zh(e,t).height}k(F2,"calculateTextHeight");function Ti(e,t){return Zh(e,t).width}k(Ti,"calculateTextWidth");var Zh=Ca((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,s]=Il(r),l=["sans-serif",i],o=e.split(ls.lineBreakRegex),f=[],h=te("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const d=h.append("svg");for(const y of l){let g=0;const w={width:0,height:0,lineHeight:0};for(const S of o){const B=yT();B.text=S||oT;const T=bT(d,B).style("font-size",s).style("font-weight",n).style("font-family",y),L=(T._groups||T)[0][0].getBBox();if(L.width===0&&L.height===0)throw new Error("svg element not in render tree");w.width=Math.round(Math.max(w.width,L.width)),g=Math.round(L.height),w.height+=g,w.lineHeight=Math.round(Math.max(w.lineHeight,g))}f.push(w)}d.remove();const m=isNaN(f[1].height)||isNaN(f[1].width)||isNaN(f[1].lineHeight)||f[0].height>f[1].height&&f[0].width>f[1].width&&f[0].lineHeight>f[1].lineHeight?0:1;return f[m]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ga,kT=(ga=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},k(ga,"InitIDGenerator"),ga),ro,vT=k(function(e){return ro=ro||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ro.innerHTML=e,unescape(ro.textContent)},"entityDecode");function Kh(e){return"str"in e}k(Kh,"isDetailedError");var CT=k((e,t,r,i)=>{var s;if(!i)return;const n=(s=e.node())==null?void 0:s.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Il=k(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e!=null?e:"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Qh(e,t){return aT({},e,t)}k(Qh,"cleanAndMerge");var ti={assignWithDepth:je,wrapLabel:xT,calculateTextHeight:F2,calculateTextWidth:Ti,calculateTextDimensions:Zh,cleanAndMerge:Qh,detectInit:hT,detectDirective:T2,isSubstringInArray:fT,interpolateToCurve:Gh,calcLabelPosition:B2,calcCardinalityPosition:pT,calcTerminalLabelPosition:L2,formatUrl:M2,getStylesFromArray:E2,generateId:mT,random:gT,runFunc:dT,entityDecode:vT,insertTitle:CT,parseFontSize:Il,InitIDGenerator:kT},ST=k(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),_n=k(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),wD=k((e,t,{counter:r=0,prefix:i,suffix:n},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function lr(e){return e!=null?e:null}k(lr,"handleUndefinedAttr");function Jh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Tn=Jh();function O2(e){Tn=e}const Xs={exec:()=>null};function he(e,t=""){let r=typeof e=="string"?e:e.source;const i={replace:(n,s)=>{let l=typeof s=="string"?s:s.source;return l=l.replace(or.caret,"$1"),r=r.replace(n,l),i},getRegex:()=>new RegExp(r,t)};return i}const or={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},_T=/^(?:[ \t]*(?:\n|$))+/,TT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,MT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,AT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tu=/(?:[*+-]|\d{1,9}[.)])/,R2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,N2=he(R2).replace(/bull/g,tu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),BT=he(R2).replace(/bull/g,tu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),eu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,LT=/^[^\n]+/,ru=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ET=he(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ru).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DT=he(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tu).getRegex(),Pl="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",iu=/|$))/,FT=he("^ {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",iu).replace("tag",Pl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z2=he(eu).replace("hr",_a).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",Pl).getRegex(),OT=he(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",z2).getRegex(),nu={blockquote:OT,code:TT,def:ET,fences:MT,heading:AT,hr:_a,html:FT,lheading:N2,list:DT,newline:_T,paragraph:z2,table:Xs,text:LT},nd=he("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Pl).getRegex(),RT=de(qt({},nu),{lheading:BT,table:nd,paragraph:he(eu).replace("hr",_a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",nd).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",Pl).getRegex()}),NT=de(qt({},nu),{html:he(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",iu).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:Xs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:he(eu).replace("hr",_a).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",N2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),zT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$T=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$2=/^( {2,}|\\)\n(?!\s*$)/,IT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,q2=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,UT=he(q2,"u").replace(/punct/g,ql).getRegex(),jT=he(q2,"u").replace(/punct/g,P2).getRegex(),H2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",YT=he(H2,"gu").replace(/notPunctSpace/g,I2).replace(/punctSpace/g,su).replace(/punct/g,ql).getRegex(),GT=he(H2,"gu").replace(/notPunctSpace/g,HT).replace(/punctSpace/g,qT).replace(/punct/g,P2).getRegex(),VT=he("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,I2).replace(/punctSpace/g,su).replace(/punct/g,ql).getRegex(),XT=he(/\\(punct)/,"gu").replace(/punct/g,ql).getRegex(),ZT=he(/^<(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(),KT=he(iu).replace("(?:-->|$)","-->").getRegex(),QT=he("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",KT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ll=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,JT=he(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ll).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),W2=he(/^!?\[(label)\]\[(ref)\]/).replace("label",ll).replace("ref",ru).getRegex(),U2=he(/^!?\[(ref)\](?:\[\])?/).replace("ref",ru).getRegex(),tM=he("reflink|nolink(?!\\()","g").replace("reflink",W2).replace("nolink",U2).getRegex(),au={_backpedal:Xs,anyPunctuation:XT,autolink:ZT,blockSkip:WT,br:$2,code:$T,del:Xs,emStrongLDelim:UT,emStrongRDelimAst:YT,emStrongRDelimUnd:VT,escape:zT,link:JT,nolink:U2,punctuation:PT,reflink:W2,reflinkSearch:tM,tag:QT,text:IT,url:Xs},eM=de(qt({},au),{link:he(/^!?\[(label)\]\((.*?)\)/).replace("label",ll).getRegex(),reflink:he(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ll).getRegex()}),Vc=de(qt({},au),{emStrongRDelimAst:GT,emStrongLDelim:jT,url:he(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},sd=e=>iM[e];function Kr(e,t){if(t){if(or.escapeTest.test(e))return e.replace(or.escapeReplace,sd)}else if(or.escapeTestNoEncode.test(e))return e.replace(or.escapeReplaceNoEncode,sd);return e}function ad(e){try{e=encodeURI(e).replace(or.percentDecode,"%")}catch(t){return null}return e}function od(e,t){var s;const r=e.replace(or.findPipe,(l,o,f)=>{let h=!1,d=o;for(;--d>=0&&f[d]==="\\";)h=!h;return h?"|":" |"}),i=r.split(or.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length0?-2:-1}function ld(e,t,r,i,n){const s=t.href,l=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;const f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:l,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,f}function sM(e,t,r){const i=e.match(r.other.indentCodeCompensation);if(i===null)return t;const n=i[1];return t.split(` `).map(s=>{const l=s.match(r.other.beginningSpace);if(l===null)return s;const[o]=l;return o.length>=n.length?s.slice(n.length):s}).join(` `)}class cl{constructor(t){ye(this,"options");ye(this,"rules");ye(this,"lexer");this.options=t||Tn}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Fs(i,` `)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const i=r[0],n=sM(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){const n=Fs(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Fs(r[0],` `)}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){let i=Fs(r[0],` `).split(` `),n="",s="";const l=[];for(;i.length>0;){let o=!1;const f=[];let h;for(h=0;h1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const l=this.rules.other.listItemRegex(i);let o=!1;for(;t;){let h=!1,d="",m="";if(!(r=l.exec(t))||this.rules.block.hr.test(t))break;d=r[0],t=t.substring(d.length);let y=r[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,L=>" ".repeat(3*L.length)),g=t.split(` `,1)[0],w=!y.trim(),S=0;if(this.options.pedantic?(S=2,m=y.trimStart()):w?S=r[1].length+1:(S=r[2].search(this.rules.other.nonSpaceChar),S=S>4?1:S,m=y.slice(S),S+=r[1].length),w&&this.rules.other.blankLine.test(g)&&(d+=g+` `,t=t.substring(g.length+1),h=!0),!h){const L=this.rules.other.nextBulletRegex(S),z=this.rules.other.hrRegex(S),R=this.rules.other.fencesBeginRegex(S),$=this.rules.other.headingBeginRegex(S),A=this.rules.other.htmlBeginRegex(S);for(;t;){const N=t.split(` `,1)[0];let U;if(g=N,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),U=g):U=g.replace(this.rules.other.tabCharGlobal," "),R.test(g)||$.test(g)||A.test(g)||L.test(g)||z.test(g))break;if(U.search(this.rules.other.nonSpaceChar)>=S||!g.trim())m+=` `+U.slice(S);else{if(w||y.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(y)||$.test(y)||z.test(y))break;m+=` `+g}!w&&!g.trim()&&(w=!0),d+=N+` `,t=t.substring(N.length+1),y=U.slice(S)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(o=!0));let B=null,T;this.options.gfm&&(B=this.rules.other.listIsTask.exec(m),B&&(T=B[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:d,task:!!B,checked:T,loose:!1,text:m,tokens:[]}),s.raw+=d}const f=s.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h=0;hy.type==="space"),m=d.length>0&&d.some(y=>this.rules.other.anyLine.test(y.raw));s.loose=m}if(s.loose)for(let h=0;h({text:h,tokens:this.lexer.inline(h),header:!1,align:l.align[d]})));return l}}lheading(t){const r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){const r=this.rules.block.paragraph.exec(t);if(r){const i=r[1].charAt(r[1].length-1)===` `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){const r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){const r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){const r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const l=Fs(i.slice(0,-1),"\\");if((i.length-l.length)%2===0)return}else{const l=nM(r[2],"()");if(l===-2)return;if(l>-1){const f=(r[0].indexOf("!")===0?5:4)+r[1].length+l;r[2]=r[2].substring(0,l),r[0]=r[0].substring(0,f).trim(),r[3]=""}}let n=r[2],s="";if(this.options.pedantic){const l=this.rules.other.pedanticHrefTitle.exec(n);l&&(n=l[1],s=l[3])}else s=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),ld(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){const n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[n.toLowerCase()];if(!s){const l=i[0].charAt(0);return{type:"text",raw:l,text:l}}return ld(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const l=[...n[0]].length-1;let o,f,h=l,d=0;const m=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,r=r.slice(-1*t.length+l);(n=m.exec(r))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(f=[...o].length,n[3]||n[4]){h+=f;continue}else if((n[5]||n[6])&&l%3&&!((l+f)%3)){d+=f;continue}if(h-=f,h>0)continue;f=Math.min(f,f+h+d);const y=[...n[0]][0].length,g=t.slice(0,l+n.index+y+f);if(Math.min(l,f)%2){const S=g.slice(1,-1);return{type:"em",raw:g,text:S,tokens:this.lexer.inlineTokens(S)}}const w=g.slice(2,-2);return{type:"strong",raw:g,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){const r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i,n;let r;if(r=this.rules.inline.url.exec(t)){let s,l;if(r[2]==="@")s=r[0],l="mailto:"+s;else{let o;do o=r[0],r[0]=(n=(i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])!=null?n:"";while(o!==r[0]);s=r[0],r[1]==="www."?l="http://"+r[0]:l=r[0]}return{type:"link",raw:r[0],text:s,href:l,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){const r=this.rules.inline.text.exec(t);if(r){const i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}}class Dr{constructor(t){ye(this,"tokens");ye(this,"options");ye(this,"state");ye(this,"tokenizer");ye(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Tn,this.options.tokenizer=this.options.tokenizer||new cl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:or,block:io.normal,inline:Ds.normal};this.options.pedantic?(r.block=io.pedantic,r.inline=Ds.pedantic):this.options.gfm&&(r.block=io.gfm,this.options.breaks?r.inline=Ds.breaks:r.inline=Ds.gfm),this.tokenizer.rules=r}static get rules(){return{block:io,inline:Ds}}static lex(t,r){return new Dr(r).lex(t)}static lexInline(t,r){return new Dr(r).inlineTokens(t)}lex(t){t=t.replace(or.carriageReturn,` `),this.blockTokens(t,this.tokens);for(let r=0;r(o=h.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);const h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=` `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=` `+o.raw,h.text+=` `+o.text,this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=` `+o.raw,h.text+=` `+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let f=t;if((l=this.options.extensions)!=null&&l.startBlock){let h=1/0;const d=t.slice(1);let m;this.options.extensions.startBlock.forEach(y=>{m=y.call({lexer:this},d),typeof m=="number"&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(f=t.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(f))){const h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=` `+o.raw,h.text+=` `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),i=f.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=` `+o.raw,h.text+=` `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent)break;throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var o,f,h;let i=t,n=null;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,l="";for(;t;){s||(l=""),s=!1;let d;if((f=(o=this.options.extensions)==null?void 0:o.inline)!=null&&f.some(y=>(d=y.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);const y=r.at(-1);d.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,l)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((h=this.options.extensions)!=null&&h.startInline){let y=1/0;const g=t.slice(1);let w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},g),typeof w=="number"&&w>=0&&(y=Math.min(y,w))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(l=d.raw.slice(-1)),s=!0;const y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(t){const y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent)break;throw new Error(y)}}return r}}class hl{constructor(t){ye(this,"options");ye(this,"parser");this.options=t||Tn}space(t){return""}code({text:t,lang:r,escaped:i}){var l;const n=(l=(r||"").match(or.notSpaceStart))==null?void 0:l[0],s=t.replace(or.endingNewline,"")+` `;return n?'
'+(i?s:Kr(s,!0))+`
`:"
"+(i?s:Kr(s,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} `}hr(t){return`
`}list(t){const r=t.ordered,i=t.start;let n="";for(let o=0;o `+n+" `}listitem(t){var i;let r="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+Kr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`
  • ${r}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

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

    An error occurred:

    "+Kr(i.message+"",!0)+"
    ";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}}const yn=new aM;function ce(e,t){return yn.parse(e,t)}ce.options=ce.setOptions=function(e){return yn.setOptions(e),ce.defaults=yn.defaults,O2(ce.defaults),ce};ce.getDefaults=Jh;ce.defaults=Tn;ce.use=function(...e){return yn.use(...e),ce.defaults=yn.defaults,O2(ce.defaults),ce};ce.walkTokens=function(e,t){return yn.walkTokens(e,t)};ce.parseInline=yn.parseInline;ce.Parser=Fr;ce.parser=Fr.parse;ce.Renderer=hl;ce.TextRenderer=ou;ce.Lexer=Dr;ce.lexer=Dr.lex;ce.Tokenizer=cl;ce.Hooks=Zs;ce.parse=ce;ce.options;ce.setOptions;ce.use;ce.walkTokens;ce.parseInline;Fr.parse;Dr.lex;function j2(e){for(var t=[],r=1;r/g,` `).replace(/\n{2,}/g,` `),n=j2(i);return t===!1?n.replace(/ /g," "):n}k(Y2,"preprocessMarkdown");function G2(e,t={}){const r=Y2(e,t),i=ce.lexer(r),n=[[]];let s=0;function l(o,f="normal"){o.type==="text"?o.text.split(` `).forEach((d,m)=>{m!==0&&(s++,n.push([])),d.split(" ").forEach(y=>{y=y.replace(/'/g,"'"),y&&n[s].push({content:y,type:f})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{l(h,o.type)}):o.type==="html"&&n[s].push({content:o.text,type:"normal"})}return k(l,"processNode"),i.forEach(o=>{var f;o.type==="paragraph"?(f=o.tokens)==null||f.forEach(h=>{l(h)}):o.type==="html"&&n[s].push({content:o.text,type:"normal"})}),n}k(G2,"markdownToLines");function V2(e,{markdownAutoWrap:t}={}){const r=ce.lexer(e);function i(n){var s,l,o;return n.type==="text"?t===!1?n.text.replace(/\n */g,"
    ").replace(/ /g," "):n.text.replace(/\n */g,"
    "):n.type==="strong"?`${(s=n.tokens)==null?void 0:s.map(i).join("")}`:n.type==="em"?`${(l=n.tokens)==null?void 0:l.map(i).join("")}`:n.type==="paragraph"?`

    ${(o=n.tokens)==null?void 0:o.map(i).join("")}

    `:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:`Unsupported markdown: ${n.type}`}return k(i,"output"),r.map(i).join("")}k(V2,"markdownToHTML");function X2(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}k(X2,"splitTextToChars");function Z2(e,t){const r=X2(t.content);return lu(e,[],r,t.type)}k(Z2,"splitWordToFitWidth");function lu(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...s]=r,l=[...t,n];return e([{content:l.join(""),type:i}])?lu(e,l,s,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}k(lu,"splitWordToFitWidthRecursion");function K2(e,t){if(e.some(({content:r})=>r.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ul(e,t)}k(K2,"splitLineToFitWidth");function ul(e,t,r=[],i=[]){var o;if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const s=(o=e.shift())!=null?o:{content:" ",type:"normal"},l=[...i];if(n!==""&&l.push({content:n,type:"normal"}),l.push(s),t(l))return ul(e,t,r,l);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[f,h]=Z2(t,s);r.push([f]),h.content&&e.unshift(h)}return ul(e,t,r)}k(ul,"splitLineToFitWidthRecursion");function Xc(e,t){t&&e.attr("style",t)}k(Xc,"applyStyle");function Q2(e,t,r,i,n=!1){return ct(this,null,function*(){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const l=s.append("xhtml:div");let o=t.label;t.label&&Kn(t.label)&&(o=yield uh(t.label.replace(ls.lineBreakRegex,` `),le()));const f=t.isNode?"nodeLabel":"edgeLabel",h=l.append("span");h.html(o),Xc(h,t.labelStyle),h.attr("class",`${f} ${i}`),Xc(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node()})}k(Q2,"addHtmlSpan");function Hl(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}k(Hl,"createTspan");function J2(e,t,r){const i=e.append("text"),n=Hl(i,1,t);Wl(n,r);const s=n.node().getComputedTextLength();return i.remove(),s}k(J2,"computeWidthOfText");function oM(e,t,r){var l;const i=e.append("text"),n=Hl(i,1,t);Wl(n,[{content:r,type:"normal"}]);const s=(l=n.node())==null?void 0:l.getBoundingClientRect();return s&&i.remove(),s}k(oM,"computeDimensionOfText");function t4(e,t,r,i=!1){const s=t.append("g"),l=s.insert("rect").attr("class","background").attr("style","stroke: none"),o=s.append("text").attr("y","-10.1");let f=0;for(const h of r){const d=k(y=>J2(s,1.1,y)<=e,"checkWidth"),m=d(h)?[h]:K2(h,d);for(const y of m){const g=Hl(o,f,1.1);Wl(g,y),f++}}if(i){const h=o.node().getBBox(),d=2;return l.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),s.node()}else return o.node()}k(t4,"createFormattedText");function Wl(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}k(Wl,"updateTextContentAndStyles");function e4(e){return e.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}k(e4,"replaceIconSubstring");var Wi=k((d,...m)=>ct(void 0,[d,...m],function*(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:s=!0,isNode:l=!0,width:o=200,addSvgBackground:f=!1}={},h){if(ht.debug("XYZ createText",t,r,i,n,s,l,"addSvgBackground: ",f),s){const y=V2(t,h),g=e4(_n(y)),w=t.replace(/\\\\/g,"\\"),S={isNode:l,label:Kn(t)?w:g,labelStyle:r.replace("fill:","color:")};return yield Q2(e,S,o,n,f)}else{const y=t.replace(//g,"
    "),g=G2(y.replace("
    ","
    "),h),w=t4(o,e,g,t?f:!1);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const S=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");te(w).attr("style",S)}else{const S=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");te(w).select("rect").attr("style",S.replace(/background:/g,"fill:"));const B=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");te(w).select("text").attr("style",B)}return w}}),"createText");function rc(e,t,r){if(e&&e.length){const[i,n]=t,s=Math.PI/180*r,l=Math.cos(s),o=Math.sin(s);for(const f of e){const[h,d]=f;f[0]=(h-i)*l-(d-n)*o+i,f[1]=(h-i)*o+(d-n)*l+n}}}function lM(e,t){return e[0]===t[0]&&e[1]===t[1]}function cM(e,t,r,i=1){const n=r,s=Math.max(t,.1),l=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const h of l)rc(h,o,n);const f=function(h,d,m){const y=[];for(const L of h){const z=[...L];lM(z[0],z[z.length-1])||z.push([z[0][0],z[0][1]]),z.length>2&&y.push(z)}const g=[];d=Math.max(d,.1);const w=[];for(const L of y)for(let z=0;zL.yminz.ymin?1:L.xz.x?1:L.ymax===z.ymax?0:(L.ymax-z.ymax)/Math.abs(L.ymax-z.ymax)),!w.length)return g;let S=[],B=w[0].ymin,T=0;for(;S.length||w.length;){if(w.length){let L=-1;for(let z=0;zB);z++)L=z;w.splice(0,L+1).forEach(z=>{S.push({s:B,edge:z})})}if(S=S.filter(L=>!(L.edge.ymax<=B)),S.sort((L,z)=>L.edge.x===z.edge.x?0:(L.edge.x-z.edge.x)/Math.abs(L.edge.x-z.edge.x)),(m!==1||T%d==0)&&S.length>1)for(let L=0;L=S.length)break;const R=S[L].edge,$=S[z].edge;g.push([[Math.round(R.x),B],[Math.round($.x),B]])}B+=m,S.forEach(L=>{L.edge.x=L.edge.x+m*L.edge.islope}),T++}return g}(l,s,i);if(n){for(const h of l)rc(h,o,-n);(function(h,d,m){const y=[];h.forEach(g=>y.push(...g)),rc(y,d,m)})(f,o,-n)}return f}function Ta(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=n),cM(e,n,i,s||1)}class cu{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ta(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function Ul(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class hM extends cu{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Ta(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,l=[],o=.5*i*Math.cos(s),f=.5*i*Math.sin(s);for(const[h,d]of n)Ul([h,d])&&l.push([[h[0]-o,h[1]+f],[...d]],[[h[0]+o,h[1]-f],[...d]]);return{type:"fillSketch",ops:this.renderLines(l,r)}}}class uM extends cu{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,n);return i.ops=i.ops.concat(s.ops),i}}class fM{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ta(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const l=n/4;for(const o of t){const f=Ul(o),h=f/n,d=Math.ceil(h)-1,m=f-d*n,y=(o[0][0]+o[1][0])/2-n/4,g=Math.min(o[0][1],o[1][1]);for(let w=0;w{const o=Ul(l),f=Math.floor(o/(i+n)),h=(o+n-f*(i+n))/2;let d=l[0],m=l[1];d[0]>m[0]&&(d=l[1],m=l[0]);const y=Math.atan((m[1]-d[1])/(m[0]-d[0]));for(let g=0;g{const l=Ul(s),o=Math.round(l/(2*r));let f=s[0],h=s[1];f[0]>h[0]&&(f=s[1],h=s[0]);const d=Math.atan((h[1]-f[1])/(h[0]-f[0]));for(let m=0;md%2?h+r:h+t);s.push({key:"C",data:f}),t=f[4],r=f[5];break}case"Q":s.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const f=o.map((h,d)=>d%2?h+r:h+t);s.push({key:"Q",data:f}),t=f[2],r=f[3];break}case"A":s.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],s.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":s.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const f=o.map((h,d)=>d%2?h+r:h+t);s.push({key:"S",data:f}),t=f[2],r=f[3];break}case"T":s.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=n}return s}function i4(e){const t=[];let r="",i=0,n=0,s=0,l=0,o=0,f=0;for(const{key:h,data:d}of e){switch(h){case"M":t.push({key:"M",data:[...d]}),[i,n]=d,[s,l]=d;break;case"C":t.push({key:"C",data:[...d]}),i=d[4],n=d[5],o=d[2],f=d[3];break;case"L":t.push({key:"L",data:[...d]}),[i,n]=d;break;case"H":i=d[0],t.push({key:"L",data:[i,n]});break;case"V":n=d[0],t.push({key:"L",data:[i,n]});break;case"S":{let m=0,y=0;r==="C"||r==="S"?(m=i+(i-o),y=n+(n-f)):(m=i,y=n),t.push({key:"C",data:[m,y,...d]}),o=d[0],f=d[1],i=d[2],n=d[3];break}case"T":{const[m,y]=d;let g=0,w=0;r==="Q"||r==="T"?(g=i+(i-o),w=n+(n-f)):(g=i,w=n);const S=i+2*(g-i)/3,B=n+2*(w-n)/3,T=m+2*(g-m)/3,L=y+2*(w-y)/3;t.push({key:"C",data:[S,B,T,L,m,y]}),o=g,f=w,i=m,n=y;break}case"Q":{const[m,y,g,w]=d,S=i+2*(m-i)/3,B=n+2*(y-n)/3,T=g+2*(m-g)/3,L=w+2*(y-w)/3;t.push({key:"C",data:[S,B,T,L,g,w]}),o=m,f=y,i=g,n=w;break}case"A":{const m=Math.abs(d[0]),y=Math.abs(d[1]),g=d[2],w=d[3],S=d[4],B=d[5],T=d[6];m===0||y===0?(t.push({key:"C",data:[i,n,B,T,B,T]}),i=B,n=T):(i!==B||n!==T)&&(n4(i,n,B,T,m,y,g,w,S).forEach(function(L){t.push({key:"C",data:L})}),i=B,n=T);break}case"Z":t.push({key:"Z",data:[]}),i=s,n=l}r=h}return t}function Os(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function n4(e,t,r,i,n,s,l,o,f,h){const d=(m=l,Math.PI*m/180);var m;let y=[],g=0,w=0,S=0,B=0;if(h)[g,w,S,B]=h;else{[e,t]=Os(e,t,-d),[r,i]=Os(r,i,-d);const Q=(e-r)/2,Z=(t-i)/2;let rt=Q*Q/(n*n)+Z*Z/(s*s);rt>1&&(rt=Math.sqrt(rt),n*=rt,s*=rt);const nt=n*n,at=s*s,et=nt*at-nt*Z*Z-at*Q*Q,it=nt*Z*Z+at*Q*Q,ot=(o===f?-1:1)*Math.sqrt(Math.abs(et/it));S=ot*n*Z/s+(e+r)/2,B=ot*-s*Q/n+(t+i)/2,g=Math.asin(parseFloat(((t-B)/s).toFixed(9))),w=Math.asin(parseFloat(((i-B)/s).toFixed(9))),ew&&(g-=2*Math.PI),!f&&w>g&&(w-=2*Math.PI)}let T=w-g;if(Math.abs(T)>120*Math.PI/180){const Q=w,Z=r,rt=i;w=f&&w>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,y=n4(r=S+n*Math.cos(w),i=B+s*Math.sin(w),Z,rt,n,s,l,0,f,[w,Q,S,B])}T=w-g;const L=Math.cos(g),z=Math.sin(g),R=Math.cos(w),$=Math.sin(w),A=Math.tan(T/4),N=4/3*n*A,U=4/3*s*A,X=[e,t],j=[e+N*z,t-U*L],P=[r+N*$,i-U*R],lt=[r,i];if(j[0]=2*X[0]-j[0],j[1]=2*X[1]-j[1],h)return[j,P,lt].concat(y);{y=[j,P,lt].concat(y);const Q=[];for(let Z=0;Z2){const n=[];for(let s=0;s2*Math.PI&&(g=0,w=2*Math.PI);const S=2*Math.PI/f.curveStepCount,B=Math.min(S/2,(w-g)/2),T=md(B,h,d,m,y,g,w,1,f);if(!f.disableMultiStroke){const L=md(B,h,d,m,y,g,w,1.5,f);T.push(...L)}return l&&(o?T.push(...Pi(h,d,h+m*Math.cos(g),d+y*Math.sin(g),f),...Pi(h,d,h+m*Math.cos(w),d+y*Math.sin(w),f)):T.push({op:"lineTo",data:[h,d]},{op:"lineTo",data:[h+m*Math.cos(g),d+y*Math.sin(g)]})),{type:"path",ops:T}}function fd(e,t){const r=i4(r4(hu(e))),i=[];let n=[0,0],s=[0,0];for(const{key:l,data:o}of r)switch(l){case"M":s=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...Pi(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]];break;case"C":{const[f,h,d,m,y,g]=o;i.push(...xM(f,h,d,m,y,g,s,t)),s=[y,g];break}case"Z":i.push(...Pi(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]]}return{type:"path",ops:i}}function sc(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+Pt(n,t),i[0][1]+Pt(n,t)]});for(let l=1;l500?.4:-.0016668*f+1.233334;let d=n.maxRandomnessOffset||0;d*d*100>o&&(d=f/10);const m=d/2,y=.2+.2*o4(n);let g=n.bowing*n.maxRandomnessOffset*(i-t)/200,w=n.bowing*n.maxRandomnessOffset*(e-r)/200;g=Pt(g,n,h),w=Pt(w,n,h);const S=[],B=()=>Pt(m,n,h),T=()=>Pt(d,n,h),L=n.preserveVertices;return s&&(l?S.push({op:"move",data:[e+(L?0:B()),t+(L?0:B())]}):S.push({op:"move",data:[e+(L?0:Pt(d,n,h)),t+(L?0:Pt(d,n,h))]})),l?S.push({op:"bcurveTo",data:[g+e+(r-e)*y+B(),w+t+(i-t)*y+B(),g+e+2*(r-e)*y+B(),w+t+2*(i-t)*y+B(),r+(L?0:B()),i+(L?0:B())]}):S.push({op:"bcurveTo",data:[g+e+(r-e)*y+T(),w+t+(i-t)*y+T(),g+e+2*(r-e)*y+T(),w+t+2*(i-t)*y+T(),r+(L?0:T()),i+(L?0:T())]}),S}function so(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Pt(t,r),e[0][1]+Pt(t,r)]),i.push([e[0][0]+Pt(t,r),e[0][1]+Pt(t,r)]);for(let n=1;n3){const s=[],l=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+21&&n.push(o)):n.push(o),n.push(e[t+3])}else{const f=e[t+0],h=e[t+1],d=e[t+2],m=e[t+3],y=nn(f,h,.5),g=nn(h,d,.5),w=nn(d,m,.5),S=nn(y,g,.5),B=nn(g,w,.5),T=nn(S,B,.5);Qc([f,y,S,T],0,r,n),Qc([T,B,w,m],0,r,n)}var s,l;return n}function kM(e,t){return pl(e,0,e.length,t)}function pl(e,t,r,i,n){const s=n||[],l=e[t],o=e[r-1];let f=0,h=1;for(let d=t+1;df&&(f=m,h=d)}return Math.sqrt(f)>i?(pl(e,t,h+1,i,s),pl(e,h,r,i,s)):(s.length||s.push(l),s.push(o)),s}function ac(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let s=0;s0?pl(i,0,i.length,r):i}const kr="none";class ml{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()*Oi(2,31))}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,s){const l=this._o(s);return this._d("line",[s4(t,r,i,n,l)],l)}rectangle(t,r,i,n,s){const l=this._o(s),o=[],f=bM(t,r,i,n,l);if(l.fill){const h=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];l.fillStyle==="solid"?o.push(sc([h],l)):o.push(zn([h],l))}return l.stroke!==kr&&o.push(f),this._d("rectangle",o,l)}ellipse(t,r,i,n,s){const l=this._o(s),o=[],f=a4(i,n,l),h=Zc(t,r,l,f);if(l.fill)if(l.fillStyle==="solid"){const d=Zc(t,r,l,f).opset;d.type="fillPath",o.push(d)}else o.push(zn([h.estimatedPoints],l));return l.stroke!==kr&&o.push(h.opset),this._d("ellipse",o,l)}circle(t,r,i,n){const s=this.ellipse(t,r,i,i,n);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Co(t,!1,i)],i)}arc(t,r,i,n,s,l,o=!1,f){const h=this._o(f),d=[],m=ud(t,r,i,n,s,l,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const y=Object.assign({},h);y.disableMultiStroke=!0;const g=ud(t,r,i,n,s,l,!0,!1,y);g.type="fillPath",d.push(g)}else d.push(function(y,g,w,S,B,T,L){const z=y,R=g;let $=Math.abs(w/2),A=Math.abs(S/2);$+=Pt(.01*$,L),A+=Pt(.01*A,L);let N=B,U=T;for(;N<0;)N+=2*Math.PI,U+=2*Math.PI;U-N>2*Math.PI&&(N=0,U=2*Math.PI);const X=(U-N)/L.curveStepCount,j=[];for(let P=N;P<=U;P+=X)j.push([z+$*Math.cos(P),R+A*Math.sin(P)]);return j.push([z+$*Math.cos(U),R+A*Math.sin(U)]),j.push([z,R]),zn([j],L)}(t,r,i,n,s,l,h));return h.stroke!==kr&&d.push(m),this._d("arc",d,h)}curve(t,r){const i=this._o(r),n=[],s=hd(t,i);if(i.fill&&i.fill!==kr)if(i.fillStyle==="solid"){const l=hd(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else{const l=[],o=t;if(o.length){const f=typeof o[0][0]=="number"?[o]:o;for(const h of f)h.length<3?l.push(...h):h.length===3?l.push(...ac(gd([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):l.push(...ac(gd(h),10,(1+i.roughness)/2))}l.length&&n.push(zn([l],i))}return i.stroke!==kr&&n.push(s),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],s=Co(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(sc([t],i)):n.push(zn([t],i))),i.stroke!==kr&&n.push(s),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==kr,l=i.stroke!==kr,o=!!(i.simplification&&i.simplification<1),f=function(d,m,y){const g=i4(r4(hu(d))),w=[];let S=[],B=[0,0],T=[];const L=()=>{T.length>=4&&S.push(...ac(T,m)),T=[]},z=()=>{L(),S.length&&(w.push(S),S=[])};for(const{key:$,data:A}of g)switch($){case"M":z(),B=[A[0],A[1]],S.push(B);break;case"L":L(),S.push([A[0],A[1]]);break;case"C":if(!T.length){const N=S.length?S[S.length-1]:B;T.push([N[0],N[1]])}T.push([A[0],A[1]]),T.push([A[2],A[3]]),T.push([A[4],A[5]]);break;case"Z":L(),S.push([B[0],B[1]])}if(z(),!y)return w;const R=[];for(const $ of w){const A=kM($,y);A.length&&R.push(A)}return R}(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=fd(t,i);if(s)if(i.fillStyle==="solid")if(f.length===1){const d=fd(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else n.push(sc(f,i));else n.push(zn(f,i));return l&&(o?f.forEach(d=>{n.push(Co(d,!1,i))}):n.push(h)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const s=typeof r=="number"&&r>=0?n.data.map(l=>+l.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const s of r){let l=null;switch(s.type){case"path":l={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:kr};break;case"fillPath":l={d:this.opsToPath(s),stroke:kr,strokeWidth:0,fill:i.fill||kr};break;case"fillSketch":l=this.fillSketch(s,i)}l&&n.push(l)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||kr,strokeWidth:i,fill:kr}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class vM{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ml(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const l of r)switch(l.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,l,s),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,l,s,o),n.restore();break}case"fillSketch":this.fillSketch(n,l,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const s of r.ops){const l=typeof i=="number"&&i>=0?s.data.map(o=>+o.toFixed(i)):s.data;switch(s.op){case"move":t.moveTo(l[0],l[1]);break;case"bcurveTo":t.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case"lineTo":t.lineTo(l[0],l[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,s){const l=this.gen.line(t,r,i,n,s);return this.draw(l),l}rectangle(t,r,i,n,s){const l=this.gen.rectangle(t,r,i,n,s);return this.draw(l),l}ellipse(t,r,i,n,s){const l=this.gen.ellipse(t,r,i,n,s);return this.draw(l),l}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,s,l,o=!1,f){const h=this.gen.arc(t,r,i,n,s,l,o,f);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const ao="http://www.w3.org/2000/svg";class CM{constructor(t,r){this.svg=t,this.gen=new ml(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,s=n.createElementNS(ao,"g"),l=t.options.fixedDecimalPlaceDigits;for(const o of r){let f=null;switch(o.type){case"path":f=n.createElementNS(ao,"path"),f.setAttribute("d",this.opsToPath(o,l)),f.setAttribute("stroke",i.stroke),f.setAttribute("stroke-width",i.strokeWidth+""),f.setAttribute("fill","none"),i.strokeLineDash&&f.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&f.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":f=n.createElementNS(ao,"path"),f.setAttribute("d",this.opsToPath(o,l)),f.setAttribute("stroke","none"),f.setAttribute("stroke-width","0"),f.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||f.setAttribute("fill-rule","evenodd");break;case"fillSketch":f=this.fillSketch(n,o,i)}f&&s.appendChild(f)}return s}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const s=t.createElementNS(ao,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",n+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,s){const l=this.gen.line(t,r,i,n,s);return this.draw(l)}rectangle(t,r,i,n,s){const l=this.gen.rectangle(t,r,i,n,s);return this.draw(l)}ellipse(t,r,i,n,s){const l=this.gen.ellipse(t,r,i,n,s);return this.draw(l)}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,s,l,o=!1,f){const h=this.gen.arc(t,r,i,n,s,l,o,f);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Lt={canvas:(e,t)=>new vM(e,t),svg:(e,t)=>new CM(e,t),generator:e=>new ml(e),newSeed:()=>ml.newSeed()},jt=k((e,t,r)=>ct(void 0,null,function*(){var m,y,g;let i;const n=t.useHtmlLabels||ze((m=le())==null?void 0:m.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),l=s.insert("g").attr("class","label").attr("style",lr(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const f=yield Wi(l,un(_n(o),le()),{useHtmlLabels:n,width:t.width||((y=le().flowchart)==null?void 0:y.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let h=f.getBBox();const d=((g=t==null?void 0:t.padding)!=null?g:0)/2;if(n){const w=f.children[0],S=te(f),B=w.getElementsByTagName("img");if(B){const T=o.replace(/]*>/g,"").trim()==="";yield Promise.all([...B].map(L=>new Promise(z=>{function R(){if(L.style.display="flex",L.style.flexDirection="column",T){const $=le().fontSize?le().fontSize:window.getComputedStyle(document.body).fontSize,A=5,[N=Qd.fontSize]=Il($),U=N*A+"px";L.style.minWidth=U,L.style.maxWidth=U}else L.style.width="100%";z(L)}k(R,"setupImage"),setTimeout(()=>{L.complete&&R()}),L.addEventListener("error",R),L.addEventListener("load",R)})))}h=w.getBoundingClientRect(),S.attr("width",h.width),S.attr("height",h.height)}return n?l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):l.attr("transform","translate(0, "+-h.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:s,bbox:h,halfPadding:d,label:l}}),"labelHelper"),oc=k((e,t,r)=>ct(void 0,null,function*(){var f,h,d,m,y,g;const i=r.useHtmlLabels||ze((h=(f=le())==null?void 0:f.flowchart)==null?void 0:h.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=yield Wi(n,un(_n(t),le()),{useHtmlLabels:i,width:r.width||((m=(d=le())==null?void 0:d.flowchart)==null?void 0:m.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let l=s.getBBox();const o=r.padding/2;if(ze((g=(y=le())==null?void 0:y.flowchart)==null?void 0:g.htmlLabels)){const w=s.children[0],S=te(s);l=w.getBoundingClientRect(),S.attr("width",l.width),S.attr("height",l.height)}return i?n.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):n.attr("transform","translate(0, "+-l.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:l,halfPadding:o,label:n}}),"insertLabel"),Ft=k((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Ht=k((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ee(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}k(ee,"createPathFromPoints");function qi(e,t,r,i,n,s){const l=[],f=r-e,h=i-t,d=f/s,m=2*Math.PI/d,y=t+h/2;for(let g=0;g<=50;g++){const w=g/50,S=e+w*f,B=y+n*Math.sin(m*(S-e));l.push({x:S,y:B})}return l}k(qi,"generateFullSineWavePoints");function uu(e,t,r,i,n,s){const l=[],o=n*Math.PI/180,d=(s*Math.PI/180-o)/(i-1);for(let m=0;m{var r=e.x,i=e.y,n=t.x-r,s=t.y-i,l=e.width/2,o=e.height/2,f,h;return Math.abs(s)*l>Math.abs(n)*o?(s<0&&(o=-o),f=s===0?0:o*n/s,h=o):(n<0&&(l=-l),f=l,h=n===0?0:l*s/n),{x:r+f,y:i+h}},"intersectRect"),us=SM;function l4(e,t){t&&e.attr("style",t)}k(l4,"applyStyle");function c4(e){return ct(this,null,function*(){const t=te(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&Kn(e.label)&&(i=yield uh(e.label.replace(ls.lineBreakRegex,` `),le()));const n=e.isNode?"nodeLabel":"edgeLabel";return r.html('"+i+""),l4(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()})}k(c4,"addHtmlLabel");var _M=k((e,t,r,i)=>ct(void 0,null,function*(){let n=e||"";if(typeof n=="object"&&(n=n[0]),ze(le().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),ht.info("vertexText"+n);const s={isNode:i,label:_n(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:t&&t.replace("fill:","color:")};return yield c4(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let l=[];typeof n=="string"?l=n.split(/\\n|\n|/gi):Array.isArray(n)?l=n:l=[];for(const o of l){const f=document.createElementNS("http://www.w3.org/2000/svg","tspan");f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),f.setAttribute("dy","1em"),f.setAttribute("x","0"),r?f.setAttribute("class","title-row"):f.setAttribute("class","row"),f.textContent=o.trim(),s.appendChild(f)}return s}}),"createLabel"),cn=_M,Ai=k((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),TM=k(e=>{const{handDrawnSeed:t}=le();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),fs=k(e=>{const t=MM([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),MM=k(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),h4=k(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Ot=k(e=>{const{stylesArray:t}=fs(e),r=[],i=[],n=[],s=[];return t.forEach(l=>{const o=l[0];h4(o)?r.push(l.join(":")+" !important"):(i.push(l.join(":")+" !important"),o.includes("stroke")&&n.push(l.join(":")+" !important"),o==="fill"&&s.push(l.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:s}},"styles2String"),Dt=k((e,t)=>{var f;const{themeVariables:r,handDrawnSeed:i}=le(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:l}=fs(e);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||n,seed:i,strokeWidth:((f=l.get("stroke-width"))==null?void 0:f.replace("px",""))||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),u4=k((e,t)=>ct(void 0,null,function*(){ht.info("Creating subgraph rect for ",t.id,t);const r=le(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:o,nodeStyles:f,borderStyles:h,backgroundStyles:d}=Ot(t),m=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),y=ze(r.flowchart.htmlLabels),g=m.insert("g").attr("class","cluster-label "),w=yield Wi(g,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0});let S=w.getBBox();if(ze(r.flowchart.htmlLabels)){const N=w.children[0],U=te(w);S=N.getBoundingClientRect(),U.attr("width",S.width),U.attr("height",S.height)}const B=t.width<=S.width+t.padding?S.width+t.padding:t.width;t.width<=S.width+t.padding?t.diff=(B-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,L=t.x-B/2,z=t.y-T/2;ht.trace("Data ",t,JSON.stringify(t));let R;if(t.look==="handDrawn"){const N=Lt.svg(m),U=Dt(t,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:n}),X=N.path(Ai(L,z,B,T,0),U);R=m.insert(()=>(ht.debug("Rough node insert CXC",X),X),":first-child"),R.select("path:nth-child(2)").attr("style",h.join(";")),R.select("path").attr("style",d.join(";").replace("fill","stroke"))}else R=m.insert("rect",":first-child"),R.attr("style",f).attr("rx",t.rx).attr("ry",t.ry).attr("x",L).attr("y",z).attr("width",B).attr("height",T);const{subGraphTitleTopMargin:$}=Sh(r);if(g.attr("transform",`translate(${t.x-S.width/2}, ${t.y-t.height/2+$})`),o){const N=g.select("span");N&&N.attr("style",o)}const A=R.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=S.height-t.padding/2,t.intersect=function(N){return us(t,N)},{cluster:m,labelBBox:S}}),"rect"),AM=k((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,s=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const l=i.node().getBBox();return t.width=l.width,t.height=l.height,t.intersect=function(o){return us(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),BM=k((e,t)=>ct(void 0,null,function*(){const r=le(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:s,compositeBackground:l,compositeTitleBackground:o,nodeBorder:f}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),d=h.insert("g",":first-child"),m=h.insert("g").attr("class","cluster-label");let y=h.append("rect");const g=m.node().appendChild(yield cn(t.label,t.labelStyle,void 0,!0));let w=g.getBBox();if(ze(r.flowchart.htmlLabels)){const X=g.children[0],j=te(g);w=X.getBoundingClientRect(),j.attr("width",w.width),j.attr("height",w.height)}const S=0*t.padding,B=S/2,T=(t.width<=w.width+t.padding?w.width+t.padding:t.width)+S;t.width<=w.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;const L=t.height+S,z=t.height+S-w.height-6,R=t.x-T/2,$=t.y-L/2;t.width=T;const A=t.y-t.height/2-B+w.height+2;let N;if(t.look==="handDrawn"){const X=t.cssClasses.includes("statediagram-cluster-alt"),j=Lt.svg(h),P=t.rx||t.ry?j.path(Ai(R,$,T,L,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:f,seed:n}):j.rectangle(R,$,T,L,{seed:n});N=h.insert(()=>P,":first-child");const lt=j.rectangle(R,A,T,z,{fill:X?s:l,fillStyle:X?"hachure":"solid",stroke:f,seed:n});N=h.insert(()=>P,":first-child"),y=h.insert(()=>lt)}else{N=d.insert("rect",":first-child");const X="outer";N.attr("class",X).attr("x",R).attr("y",$).attr("width",T).attr("height",L).attr("data-look",t.look),y.attr("class","inner").attr("x",R).attr("y",A).attr("width",T).attr("height",z)}m.attr("transform",`translate(${t.x-w.width/2}, ${$+1-(ze(r.flowchart.htmlLabels)?0:3)})`);const U=N.node().getBBox();return t.height=U.height,t.offsetX=0,t.offsetY=w.height-t.padding/2,t.labelBBox=w,t.intersect=function(X){return us(t,X)},{cluster:h,labelBBox:w}}),"roundedWithTitle"),LM=k((e,t)=>ct(void 0,null,function*(){ht.info("Creating subgraph rect for ",t.id,t);const r=le(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:o,nodeStyles:f,borderStyles:h,backgroundStyles:d}=Ot(t),m=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),y=ze(r.flowchart.htmlLabels),g=m.insert("g").attr("class","cluster-label "),w=yield Wi(g,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width});let S=w.getBBox();if(ze(r.flowchart.htmlLabels)){const N=w.children[0],U=te(w);S=N.getBoundingClientRect(),U.attr("width",S.width),U.attr("height",S.height)}const B=t.width<=S.width+t.padding?S.width+t.padding:t.width;t.width<=S.width+t.padding?t.diff=(B-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,L=t.x-B/2,z=t.y-T/2;ht.trace("Data ",t,JSON.stringify(t));let R;if(t.look==="handDrawn"){const N=Lt.svg(m),U=Dt(t,{roughness:.7,fill:s,stroke:l,fillWeight:4,seed:n}),X=N.path(Ai(L,z,B,T,t.rx),U);R=m.insert(()=>(ht.debug("Rough node insert CXC",X),X),":first-child"),R.select("path:nth-child(2)").attr("style",h.join(";")),R.select("path").attr("style",d.join(";").replace("fill","stroke"))}else R=m.insert("rect",":first-child"),R.attr("style",f).attr("rx",t.rx).attr("ry",t.ry).attr("x",L).attr("y",z).attr("width",B).attr("height",T);const{subGraphTitleTopMargin:$}=Sh(r);if(g.attr("transform",`translate(${t.x-S.width/2}, ${t.y-t.height/2+$})`),o){const N=g.select("span");N&&N.attr("style",o)}const A=R.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=S.height-t.padding/2,t.intersect=function(N){return us(t,N)},{cluster:m,labelBBox:S}}),"kanbanSection"),EM=k((e,t)=>{const r=le(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:s}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=l.insert("g",":first-child"),f=0*t.padding,h=t.width+f;t.diff=-t.padding;const d=t.height+f,m=t.x-h/2,y=t.y-d/2;t.width=h;let g;if(t.look==="handDrawn"){const B=Lt.svg(l).rectangle(m,y,h,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:n});g=l.insert(()=>B,":first-child")}else{g=o.insert("rect",":first-child");const S="divider";g.attr("class",S).attr("x",m).attr("y",y).attr("width",h).attr("height",d).attr("data-look",t.look)}const w=g.node().getBBox();return t.height=w.height,t.offsetX=0,t.offsetY=0,t.intersect=function(S){return us(t,S)},{cluster:l,labelBBox:{}}},"divider"),DM=u4,FM={rect:u4,squareRect:DM,roundedWithTitle:BM,noteGroup:AM,divider:EM,kanbanSection:LM},f4=new Map,OM=k((e,t)=>ct(void 0,null,function*(){const r=t.shape||"rect",i=yield FM[r](e,t);return f4.set(t.id,i),i}),"insertCluster"),kD=k(()=>{f4=new Map},"clear");function d4(e,t){return e.intersect(t)}k(d4,"intersectNode");var RM=d4;function p4(e,t,r,i){var n=e.x,s=e.y,l=n-i.x,o=s-i.y,f=Math.sqrt(t*t*o*o+r*r*l*l),h=Math.abs(t*r*l/f);i.x0}k(Jc,"sameSign");var zM=y4;function b4(e,t,r){let i=e.x,n=e.y,s=[],l=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){l=Math.min(l,d.x),o=Math.min(o,d.y)}):(l=Math.min(l,t.x),o=Math.min(o,t.y));let f=i-e.width/2-l,h=n-e.height/2-o;for(let d=0;d1&&s.sort(function(d,m){let y=d.x-r.x,g=d.y-r.y,w=Math.sqrt(y*y+g*g),S=m.x-r.x,B=m.y-r.y,T=Math.sqrt(S*S+B*B);return wd,":first-child");return m.attr("class","anchor").attr("style",lr(o)),Ft(t,m),t.intersect=function(y){return ht.info("Circle intersect",t,l,y),Bt.circle(t,l,y)},s}k(x4,"anchor");function th(e,t,r,i,n,s,l){const f=(e+r)/2,h=(t+i)/2,d=Math.atan2(i-t,r-e),m=(r-e)/2,y=(i-t)/2,g=m/n,w=y/s,S=Math.sqrt(Oi(g,2)+Oi(w,2));if(S>1)throw new Error("The given radii are too small to create an arc between the points.");const B=Math.sqrt(1-Oi(S,2)),T=f+B*s*Math.sin(d)*(l?-1:1),L=h-B*n*Math.cos(d)*(l?-1:1),z=Math.atan2((t-L)/s,(e-T)/n);let $=Math.atan2((i-L)/s,(r-T)/n)-z;l&&$<0&&($+=2*Math.PI),!l&&$>0&&($-=2*Math.PI);const A=[];for(let N=0;N<20;N++){const U=N/19,X=z+U*$,j=T+n*Math.cos(X),P=L+s*Math.sin(X);A.push({x:j,y:P})}return A}k(th,"generateArcPoints");function w4(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=s.width+t.padding+20,o=s.height+t.padding,f=o/2,h=f/(2.5+o/50),{cssStyles:d}=t,m=[{x:l/2,y:-o/2},{x:-l/2,y:-o/2},...th(-l/2,-o/2,-l/2,o/2,h,f,!1),{x:l/2,y:o/2},...th(l/2,o/2,l/2,-o/2,h,f,!0)],y=Lt.svg(n),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const w=ee(m),S=y.path(w,g),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${h/2}, 0)`),Ft(t,B),t.intersect=function(T){return Bt.polygon(t,m,T)},n})}k(w4,"bowTieRect");function Bi(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}k(Bi,"insertPolygonShape");function k4(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=s.height+t.padding,o=12,f=s.width+t.padding+o,h=0,d=f,m=-l,y=0,g=[{x:h+o,y:m},{x:d,y:m},{x:d,y},{x:h,y},{x:h,y:m+o},{x:h+o,y:m}];let w;const{cssStyles:S}=t;if(t.look==="handDrawn"){const B=Lt.svg(n),T=Dt(t,{}),L=ee(g),z=B.path(L,T);w=n.insert(()=>z,":first-child").attr("transform",`translate(${-f/2}, ${l/2})`),S&&w.attr("style",S)}else w=Bi(n,f,l,g);return i&&w.attr("style",i),Ft(t,w),t.intersect=function(B){return Bt.polygon(t,g,B)},n})}k(k4,"card");function v4(e,t){var y,g;const{nodeStyles:r}=Ot(t);t.label="";const i=e.insert("g").attr("class",Ht(t)).attr("id",(y=t.domId)!=null?y:t.id),{cssStyles:n}=t,s=Math.max(28,(g=t.width)!=null?g:0),l=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],o=Lt.svg(i),f=Dt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const h=ee(l),d=o.path(h,f),m=i.insert(()=>d,":first-child");return n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(w){return Bt.polygon(t,l,w)},i}k(v4,"choice");function C4(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:l}=yield jt(e,t,Ht(t)),o=s.width/2+l;let f;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=Lt.svg(n),m=Dt(t,{}),y=d.circle(0,0,o*2,m);f=n.insert(()=>y,":first-child"),f.attr("class","basic label-container").attr("style",lr(h))}else f=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",o).attr("cx",0).attr("cy",0);return Ft(t,f),t.intersect=function(d){return ht.info("Circle intersect",t,o,d),Bt.circle(t,o,d)},n})}k(C4,"circle");function S4(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},l={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${o.x},${o.y} M ${n.x},${n.y} L ${l.x},${l.y}`}k(S4,"createLine");function _4(e,t){var g,w;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",Ht(t)).attr("id",(g=t.domId)!=null?g:t.id),s=Math.max(30,(w=t==null?void 0:t.width)!=null?w:0),{cssStyles:l}=t,o=Lt.svg(n),f=Dt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const h=o.circle(0,0,s*2,f),d=S4(s),m=o.path(d,f),y=n.insert(()=>h,":first-child");return y.insert(()=>m),l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),Ft(t,y),t.intersect=function(S){return ht.info("crossedCircle intersect",t,{radius:s,point:S}),Bt.circle(t,s,S)},n}k(_4,"crossedCircle");function gi(e,t,r,i=100,n=0,s=180){const l=[],o=n*Math.PI/180,d=(s*Math.PI/180-o)/(i-1);for(let m=0;mz,":first-child").attr("stroke-opacity",0),R.insert(()=>T,":first-child"),R.attr("class","text"),d&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(${h}, 0)`),l.attr("transform",`translate(${-o/2+h-(s.x-((N=s.left)!=null?N:0))},${-f/2+((U=t.padding)!=null?U:0)/2-(s.y-((X=s.top)!=null?X:0))})`),Ft(t,R),t.intersect=function(j){return Bt.polygon(t,y,j)},n})}k(T4,"curlyBraceLeft");function yi(e,t,r,i=100,n=0,s=180){const l=[],o=n*Math.PI/180,d=(s*Math.PI/180-o)/(i-1);for(let m=0;mz,":first-child").attr("stroke-opacity",0),R.insert(()=>T,":first-child"),R.attr("class","text"),d&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(${-h}, 0)`),l.attr("transform",`translate(${-o/2+((N=t.padding)!=null?N:0)/2-(s.x-((U=s.left)!=null?U:0))},${-f/2+((X=t.padding)!=null?X:0)/2-(s.y-((j=s.top)!=null?j:0))})`),Ft(t,R),t.intersect=function(P){return Bt.polygon(t,y,P)},n})}k(M4,"curlyBraceRight");function We(e,t,r,i=100,n=0,s=180){const l=[],o=n*Math.PI/180,d=(s*Math.PI/180-o)/(i-1);for(let m=0;mN,":first-child").attr("stroke-opacity",0),U.insert(()=>L,":first-child"),U.insert(()=>$,":first-child"),U.attr("class","text"),d&&t.look!=="handDrawn"&&U.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&U.selectAll("path").attr("style",i),U.attr("transform",`translate(${h-h/4}, 0)`),l.attr("transform",`translate(${-o/2+((P=t.padding)!=null?P:0)/2-(s.x-((lt=s.left)!=null?lt:0))},${-f/2+((Q=t.padding)!=null?Q:0)/2-(s.y-((Z=s.top)!=null?Z:0))})`),Ft(t,U),t.intersect=function(rt){return Bt.polygon(t,g,rt)},n})}k(A4,"curlyBraces");function B4(e,t){return ct(this,null,function*(){var A,N,U,X;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=80,o=20,f=Math.max(l,(s.width+((A=t.padding)!=null?A:0)*2)*1.25,(N=t==null?void 0:t.width)!=null?N:0),h=Math.max(o,s.height+((U=t.padding)!=null?U:0)*2,(X=t==null?void 0:t.height)!=null?X:0),d=h/2,{cssStyles:m}=t,y=Lt.svg(n),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const w=f,S=h,B=w-d,T=S/4,L=[{x:B,y:0},{x:T,y:0},{x:0,y:S/2},{x:T,y:S},{x:B,y:S},...uu(-B,-S/2,d,50,270,90)],z=ee(L),R=y.path(z,g),$=n.insert(()=>R,":first-child");return $.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&$.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&$.selectChildren("path").attr("style",i),$.attr("transform",`translate(${-f/2}, ${-h/2})`),Ft(t,$),t.intersect=function(j){return Bt.polygon(t,L,j)},n})}k(B4,"curvedTrapezoid");var IM=k((e,t,r,i,n,s)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),PM=k((e,t,r,i,n,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),qM=k((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");function L4(e,t){return ct(this,null,function*(){var g,w,S,B,T;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+t.padding,(g=t.width)!=null?g:0),f=o/2,h=f/(2.5+o/50),d=Math.max(s.height+h+t.padding,(w=t.height)!=null?w:0);let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const L=Lt.svg(n),z=PM(0,0,o,d,f,h),R=qM(0,h,o,d,f,h),$=L.path(z,Dt(t,{})),A=L.path(R,Dt(t,{fill:"none"}));m=n.insert(()=>A,":first-child"),m=n.insert(()=>$,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const L=IM(0,0,o,d,f,h);m=n.insert("path",":first-child").attr("d",L).attr("class","basic label-container").attr("style",lr(y)).attr("style",i)}return m.attr("label-offset-y",h),m.attr("transform",`translate(${-o/2}, ${-(d/2+h)})`),Ft(t,m),l.attr("transform",`translate(${-(s.width/2)-(s.x-((S=s.left)!=null?S:0))}, ${-(s.height/2)+((B=t.padding)!=null?B:0)/1.5-(s.y-((T=s.top)!=null?T:0))})`),t.intersect=function(L){var $,A,N,U,X,j;const z=Bt.rect(t,L),R=z.x-(($=t.x)!=null?$:0);if(f!=0&&(Math.abs(R)<((A=t.width)!=null?A:0)/2||Math.abs(R)==((N=t.width)!=null?N:0)/2&&Math.abs(z.y-((U=t.y)!=null?U:0))>((X=t.height)!=null?X:0)/2-h)){let P=h*h*(1-R*R/(f*f));P>0&&(P=Math.sqrt(P)),P=h-P,L.y-((j=t.y)!=null?j:0)>0&&(P=-P),z.y+=P}return z},n})}k(L4,"cylinder");function E4(e,t){return ct(this,null,function*(){var L,z,R,$;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=s.width+t.padding,f=s.height+t.padding,h=f*.2,d=-o/2,m=-f/2-h/2,{cssStyles:y}=t,g=Lt.svg(n),w=Dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:d,y:m+h},{x:-d,y:m+h},{x:-d,y:-m},{x:d,y:-m},{x:d,y:m},{x:-d,y:m},{x:-d,y:m+h}],B=g.polygon(S.map(A=>[A.x,A.y]),w),T=n.insert(()=>B,":first-child");return T.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${d+((L=t.padding)!=null?L:0)/2-(s.x-((z=s.left)!=null?z:0))}, ${m+h+((R=t.padding)!=null?R:0)/2-(s.y-(($=s.top)!=null?$:0))})`),Ft(t,T),t.intersect=function(A){return Bt.rect(t,A)},n})}k(E4,"dividedRectangle");function D4(e,t){return ct(this,null,function*(){var y,g;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:l}=yield jt(e,t,Ht(t)),o=5,f=s.width/2+l+o,h=s.width/2+l;let d;const{cssStyles:m}=t;if(t.look==="handDrawn"){const w=Lt.svg(n),S=Dt(t,{roughness:.2,strokeWidth:2.5}),B=Dt(t,{roughness:.2,strokeWidth:1.5}),T=w.circle(0,0,f*2,S),L=w.circle(0,0,h*2,B);d=n.insert("g",":first-child"),d.attr("class",lr(t.cssClasses)).attr("style",lr(m)),(y=d.node())==null||y.appendChild(T),(g=d.node())==null||g.appendChild(L)}else{d=n.insert("g",":first-child");const w=d.insert("circle",":first-child"),S=d.insert("circle");d.attr("class","basic label-container").attr("style",i),w.attr("class","outer-circle").attr("style",i).attr("r",f).attr("cx",0).attr("cy",0),S.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Ft(t,d),t.intersect=function(w){return ht.info("DoubleCircle intersect",t,f,w),Bt.circle(t,f,w)},n})}k(D4,"doublecircle");function F4(e,t,{config:{themeVariables:r}}){var g;const{labelStyles:i,nodeStyles:n}=Ot(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",Ht(t)).attr("id",(g=t.domId)!=null?g:t.id),l=7,{cssStyles:o}=t,f=Lt.svg(s),{nodeBorder:h}=r,d=Dt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);const m=f.circle(0,0,l*2,d),y=s.insert(()=>m,":first-child");return y.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),Ft(t,y),t.intersect=function(w){return ht.info("filledCircle intersect",t,{radius:l,point:w}),Bt.circle(t,l,w)},s}k(F4,"filledCircle");function O4(e,t){return ct(this,null,function*(){var T,L,z,R;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=s.width+((T=t.padding)!=null?T:0),f=o+s.height,h=o+s.height,d=[{x:0,y:-f},{x:h,y:-f},{x:h/2,y:0}],{cssStyles:m}=t,y=Lt.svg(n),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const w=ee(d),S=y.path(w,g),B=n.insert(()=>S,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`);return m&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),t.width=o,t.height=f,Ft(t,B),l.attr("transform",`translate(${-s.width/2-(s.x-((L=s.left)!=null?L:0))}, ${-f/2+((z=t.padding)!=null?z:0)/2+(s.y-((R=s.top)!=null?R:0))})`),t.intersect=function($){return ht.info("Triangle intersect",t,d,$),Bt.polygon(t,d,$)},n})}k(O4,"flippedTriangle");function R4(e,t,{dir:r,config:{state:i,themeVariables:n}}){var T,L,z,R,$,A;const{nodeStyles:s}=Ot(t);t.label="";const l=e.insert("g").attr("class",Ht(t)).attr("id",(T=t.domId)!=null?T:t.id),{cssStyles:o}=t;let f=Math.max(70,(L=t==null?void 0:t.width)!=null?L:0),h=Math.max(10,(z=t==null?void 0:t.height)!=null?z:0);r==="LR"&&(f=Math.max(10,(R=t==null?void 0:t.width)!=null?R:0),h=Math.max(70,($=t==null?void 0:t.height)!=null?$:0));const d=-1*f/2,m=-1*h/2,y=Lt.svg(l),g=Dt(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const w=y.rectangle(d,m,f,h,g),S=l.insert(()=>w,":first-child");o&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",s),Ft(t,S);const B=(A=i==null?void 0:i.padding)!=null?A:0;return t.width&&t.height&&(t.width+=B/2||0,t.height+=B/2||0),t.intersect=function(N){return Bt.rect(t,N)},l}k(R4,"forkJoin");function N4(e,t){return ct(this,null,function*(){var L,z,R,$;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const n=80,s=50,{shapeSvg:l,bbox:o}=yield jt(e,t,Ht(t)),f=Math.max(n,o.width+((L=t.padding)!=null?L:0)*2,(z=t==null?void 0:t.width)!=null?z:0),h=Math.max(s,o.height+((R=t.padding)!=null?R:0)*2,($=t==null?void 0:t.height)!=null?$:0),d=h/2,{cssStyles:m}=t,y=Lt.svg(l),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const w=[{x:-f/2,y:-h/2},{x:f/2-d,y:-h/2},...uu(-f/2+d,0,d,50,90,270),{x:f/2-d,y:h/2},{x:-f/2,y:h/2}],S=ee(w),B=y.path(S,g),T=l.insert(()=>B,":first-child");return T.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Ft(t,T),t.intersect=function(A){return ht.info("Pill intersect",t,{radius:d,point:A}),Bt.polygon(t,w,A)},l})}k(N4,"halfRoundedRectangle");var HM=k((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");function z4(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=4,o=s.height+t.padding,f=o/l,h=s.width+2*f+t.padding,d=[{x:f,y:0},{x:h-f,y:0},{x:h,y:-o/2},{x:h-f,y:-o},{x:f,y:-o},{x:0,y:-o/2}];let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const g=Lt.svg(n),w=Dt(t,{}),S=HM(0,0,h,o,f),B=g.path(S,w);m=n.insert(()=>B,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),y&&m.attr("style",y)}else m=Bi(n,h,o,d);return i&&m.attr("style",i),t.width=h,t.height=o,Ft(t,m),t.intersect=function(g){return Bt.polygon(t,d,g)},n})}k(z4,"hexagon");function $4(e,t){return ct(this,null,function*(){var w,S;const{labelStyles:r,nodeStyles:i}=Ot(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=yield jt(e,t,Ht(t)),s=Math.max(30,(w=t==null?void 0:t.width)!=null?w:0),l=Math.max(30,(S=t==null?void 0:t.height)!=null?S:0),{cssStyles:o}=t,f=Lt.svg(n),h=Dt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:0,y:0},{x:s,y:0},{x:0,y:l},{x:s,y:l}],m=ee(d),y=f.path(m,h),g=n.insert(()=>y,":first-child");return g.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-s/2}, ${-l/2})`),Ft(t,g),t.intersect=function(B){return ht.info("Pill intersect",t,{points:d}),Bt.polygon(t,d,B)},n})}k($4,"hourglass");function I4(n,s,l){return ct(this,arguments,function*(e,t,{config:{themeVariables:r,flowchart:i}}){var rt,nt,at,et;const{labelStyles:o}=Ot(t);t.labelStyle=o;const f=(rt=t.assetHeight)!=null?rt:48,h=(nt=t.assetWidth)!=null?nt:48,d=Math.max(f,h),m=i==null?void 0:i.wrappingWidth;t.width=Math.max(d,m!=null?m:0);const{shapeSvg:y,bbox:g,label:w}=yield jt(e,t,"icon-shape default"),S=t.pos==="t",B=d,T=d,{nodeBorder:L}=r,{stylesMap:z}=fs(t),R=-T/2,$=-B/2,A=t.label?8:0,N=Lt.svg(y),U=Dt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(U.roughness=0,U.fillStyle="solid");const X=N.rectangle(R,$,T,B,U),j=Math.max(T,g.width),P=B+g.height+A,lt=N.rectangle(-j/2,-P/2,j,P,de(qt({},U),{fill:"transparent",stroke:"none"})),Q=y.insert(()=>X,":first-child"),Z=y.insert(()=>lt);if(t.icon){const it=y.append("g");it.html(`${yield Sl(t.icon,{height:d,width:d,fallbackPrefix:""})}`);const ot=it.node().getBBox(),J=ot.width,xt=ot.height,ft=ot.x,wt=ot.y;it.attr("transform",`translate(${-J/2-ft},${S?g.height/2+A/2-xt/2-wt:-g.height/2-A/2-xt/2-wt})`),it.attr("style",`color: ${(at=z.get("stroke"))!=null?at:L};`)}return w.attr("transform",`translate(${-g.width/2-(g.x-((et=g.left)!=null?et:0))},${S?-P/2:P/2-g.height})`),Q.attr("transform",`translate(0,${S?g.height/2+A/2:-g.height/2-A/2})`),Ft(t,Z),t.intersect=function(it){var st,Nt,Ut;if(ht.info("iconSquare intersect",t,it),!t.label)return Bt.rect(t,it);const ot=(st=t.x)!=null?st:0,J=(Nt=t.y)!=null?Nt:0,xt=(Ut=t.height)!=null?Ut:0;let ft=[];return S?ft=[{x:ot-g.width/2,y:J-xt/2},{x:ot+g.width/2,y:J-xt/2},{x:ot+g.width/2,y:J-xt/2+g.height+A},{x:ot+T/2,y:J-xt/2+g.height+A},{x:ot+T/2,y:J+xt/2},{x:ot-T/2,y:J+xt/2},{x:ot-T/2,y:J-xt/2+g.height+A},{x:ot-g.width/2,y:J-xt/2+g.height+A}]:ft=[{x:ot-T/2,y:J-xt/2},{x:ot+T/2,y:J-xt/2},{x:ot+T/2,y:J-xt/2+B},{x:ot+g.width/2,y:J-xt/2+B},{x:ot+g.width/2/2,y:J+xt/2},{x:ot-g.width/2,y:J+xt/2},{x:ot-g.width/2,y:J-xt/2+B},{x:ot-T/2,y:J-xt/2+B}],Bt.polygon(t,ft,it)},y})}k(I4,"icon");function P4(n,s,l){return ct(this,arguments,function*(e,t,{config:{themeVariables:r,flowchart:i}}){var J,xt,ft,wt;const{labelStyles:o}=Ot(t);t.labelStyle=o;const f=(J=t.assetHeight)!=null?J:48,h=(xt=t.assetWidth)!=null?xt:48,d=Math.max(f,h),m=i==null?void 0:i.wrappingWidth;t.width=Math.max(d,m!=null?m:0);const{shapeSvg:y,bbox:g,label:w}=yield jt(e,t,"icon-shape default"),S=20,B=t.label?8:0,T=t.pos==="t",{nodeBorder:L,mainBkg:z}=r,{stylesMap:R}=fs(t),$=Lt.svg(y),A=Dt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const N=R.get("fill");A.stroke=N!=null?N:z;const U=y.append("g");t.icon&&U.html(`${yield Sl(t.icon,{height:d,width:d,fallbackPrefix:""})}`);const X=U.node().getBBox(),j=X.width,P=X.height,lt=X.x,Q=X.y,Z=Math.max(j,P)*Math.SQRT2+S*2,rt=$.circle(0,0,Z,A),nt=Math.max(Z,g.width),at=Z+g.height+B,et=$.rectangle(-nt/2,-at/2,nt,at,de(qt({},A),{fill:"transparent",stroke:"none"})),it=y.insert(()=>rt,":first-child"),ot=y.insert(()=>et);return U.attr("transform",`translate(${-j/2-lt},${T?g.height/2+B/2-P/2-Q:-g.height/2-B/2-P/2-Q})`),U.attr("style",`color: ${(ft=R.get("stroke"))!=null?ft:L};`),w.attr("transform",`translate(${-g.width/2-(g.x-((wt=g.left)!=null?wt:0))},${T?-at/2:at/2-g.height})`),it.attr("transform",`translate(0,${T?g.height/2+B/2:-g.height/2-B/2})`),Ft(t,ot),t.intersect=function(st){return ht.info("iconSquare intersect",t,st),Bt.rect(t,st)},y})}k(P4,"iconCircle");function q4(n,s,l){return ct(this,arguments,function*(e,t,{config:{themeVariables:r,flowchart:i}}){var et,it,ot,J;const{labelStyles:o}=Ot(t);t.labelStyle=o;const f=(et=t.assetHeight)!=null?et:48,h=(it=t.assetWidth)!=null?it:48,d=Math.max(f,h),m=i==null?void 0:i.wrappingWidth;t.width=Math.max(d,m!=null?m:0);const{shapeSvg:y,bbox:g,halfPadding:w,label:S}=yield jt(e,t,"icon-shape default"),B=t.pos==="t",T=d+w*2,L=d+w*2,{nodeBorder:z,mainBkg:R}=r,{stylesMap:$}=fs(t),A=-L/2,N=-T/2,U=t.label?8:0,X=Lt.svg(y),j=Dt(t,{});t.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");const P=$.get("fill");j.stroke=P!=null?P:R;const lt=X.path(Ai(A,N,L,T,5),j),Q=Math.max(L,g.width),Z=T+g.height+U,rt=X.rectangle(-Q/2,-Z/2,Q,Z,de(qt({},j),{fill:"transparent",stroke:"none"})),nt=y.insert(()=>lt,":first-child").attr("class","icon-shape2"),at=y.insert(()=>rt);if(t.icon){const xt=y.append("g");xt.html(`${yield Sl(t.icon,{height:d,width:d,fallbackPrefix:""})}`);const ft=xt.node().getBBox(),wt=ft.width,st=ft.height,Nt=ft.x,Ut=ft.y;xt.attr("transform",`translate(${-wt/2-Nt},${B?g.height/2+U/2-st/2-Ut:-g.height/2-U/2-st/2-Ut})`),xt.attr("style",`color: ${(ot=$.get("stroke"))!=null?ot:z};`)}return S.attr("transform",`translate(${-g.width/2-(g.x-((J=g.left)!=null?J:0))},${B?-Z/2:Z/2-g.height})`),nt.attr("transform",`translate(0,${B?g.height/2+U/2:-g.height/2-U/2})`),Ft(t,at),t.intersect=function(xt){var Vt,yt,_t;if(ht.info("iconSquare intersect",t,xt),!t.label)return Bt.rect(t,xt);const ft=(Vt=t.x)!=null?Vt:0,wt=(yt=t.y)!=null?yt:0,st=(_t=t.height)!=null?_t:0;let Nt=[];return B?Nt=[{x:ft-g.width/2,y:wt-st/2},{x:ft+g.width/2,y:wt-st/2},{x:ft+g.width/2,y:wt-st/2+g.height+U},{x:ft+L/2,y:wt-st/2+g.height+U},{x:ft+L/2,y:wt+st/2},{x:ft-L/2,y:wt+st/2},{x:ft-L/2,y:wt-st/2+g.height+U},{x:ft-g.width/2,y:wt-st/2+g.height+U}]:Nt=[{x:ft-L/2,y:wt-st/2},{x:ft+L/2,y:wt-st/2},{x:ft+L/2,y:wt-st/2+T},{x:ft+g.width/2,y:wt-st/2+T},{x:ft+g.width/2/2,y:wt+st/2},{x:ft-g.width/2,y:wt+st/2},{x:ft-g.width/2,y:wt-st/2+T},{x:ft-L/2,y:wt-st/2+T}],Bt.polygon(t,Nt,xt)},y})}k(q4,"iconRounded");function H4(n,s,l){return ct(this,arguments,function*(e,t,{config:{themeVariables:r,flowchart:i}}){var et,it,ot,J;const{labelStyles:o}=Ot(t);t.labelStyle=o;const f=(et=t.assetHeight)!=null?et:48,h=(it=t.assetWidth)!=null?it:48,d=Math.max(f,h),m=i==null?void 0:i.wrappingWidth;t.width=Math.max(d,m!=null?m:0);const{shapeSvg:y,bbox:g,halfPadding:w,label:S}=yield jt(e,t,"icon-shape default"),B=t.pos==="t",T=d+w*2,L=d+w*2,{nodeBorder:z,mainBkg:R}=r,{stylesMap:$}=fs(t),A=-L/2,N=-T/2,U=t.label?8:0,X=Lt.svg(y),j=Dt(t,{});t.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");const P=$.get("fill");j.stroke=P!=null?P:R;const lt=X.path(Ai(A,N,L,T,.1),j),Q=Math.max(L,g.width),Z=T+g.height+U,rt=X.rectangle(-Q/2,-Z/2,Q,Z,de(qt({},j),{fill:"transparent",stroke:"none"})),nt=y.insert(()=>lt,":first-child"),at=y.insert(()=>rt);if(t.icon){const xt=y.append("g");xt.html(`${yield Sl(t.icon,{height:d,width:d,fallbackPrefix:""})}`);const ft=xt.node().getBBox(),wt=ft.width,st=ft.height,Nt=ft.x,Ut=ft.y;xt.attr("transform",`translate(${-wt/2-Nt},${B?g.height/2+U/2-st/2-Ut:-g.height/2-U/2-st/2-Ut})`),xt.attr("style",`color: ${(ot=$.get("stroke"))!=null?ot:z};`)}return S.attr("transform",`translate(${-g.width/2-(g.x-((J=g.left)!=null?J:0))},${B?-Z/2:Z/2-g.height})`),nt.attr("transform",`translate(0,${B?g.height/2+U/2:-g.height/2-U/2})`),Ft(t,at),t.intersect=function(xt){var Vt,yt,_t;if(ht.info("iconSquare intersect",t,xt),!t.label)return Bt.rect(t,xt);const ft=(Vt=t.x)!=null?Vt:0,wt=(yt=t.y)!=null?yt:0,st=(_t=t.height)!=null?_t:0;let Nt=[];return B?Nt=[{x:ft-g.width/2,y:wt-st/2},{x:ft+g.width/2,y:wt-st/2},{x:ft+g.width/2,y:wt-st/2+g.height+U},{x:ft+L/2,y:wt-st/2+g.height+U},{x:ft+L/2,y:wt+st/2},{x:ft-L/2,y:wt+st/2},{x:ft-L/2,y:wt-st/2+g.height+U},{x:ft-g.width/2,y:wt-st/2+g.height+U}]:Nt=[{x:ft-L/2,y:wt-st/2},{x:ft+L/2,y:wt-st/2},{x:ft+L/2,y:wt-st/2+T},{x:ft+g.width/2,y:wt-st/2+T},{x:ft+g.width/2/2,y:wt+st/2},{x:ft-g.width/2,y:wt+st/2},{x:ft-g.width/2,y:wt-st/2+T},{x:ft-L/2,y:wt-st/2+T}],Bt.polygon(t,Nt,xt)},y})}k(H4,"iconSquare");function W4(i,n,s){return ct(this,arguments,function*(e,t,{config:{flowchart:r}}){var Q,Z,rt,nt;const l=new Image;l.src=(Q=t==null?void 0:t.img)!=null?Q:"",yield l.decode();const o=Number(l.naturalWidth.toString().replace("px","")),f=Number(l.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/f;const{labelStyles:h}=Ot(t);t.labelStyle=h;const d=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const m=Math.max(t.label&&d!=null?d:0,(Z=t==null?void 0:t.assetWidth)!=null?Z:o),y=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:m,g=t.constraint==="on"?y/t.imageAspectRatio:(rt=t==null?void 0:t.assetHeight)!=null?rt:f;t.width=Math.max(y,d!=null?d:0);const{shapeSvg:w,bbox:S,label:B}=yield jt(e,t,"image-shape default"),T=t.pos==="t",L=-y/2,z=-g/2,R=t.label?8:0,$=Lt.svg(w),A=Dt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const N=$.rectangle(L,z,y,g,A),U=Math.max(y,S.width),X=g+S.height+R,j=$.rectangle(-U/2,-X/2,U,X,de(qt({},A),{fill:"none",stroke:"none"})),P=w.insert(()=>N,":first-child"),lt=w.insert(()=>j);if(t.img){const at=w.append("image");at.attr("href",t.img),at.attr("width",y),at.attr("height",g),at.attr("preserveAspectRatio","none"),at.attr("transform",`translate(${-y/2},${T?X/2-g:-X/2})`)}return B.attr("transform",`translate(${-S.width/2-(S.x-((nt=S.left)!=null?nt:0))},${T?-g/2-S.height/2-R/2:g/2-S.height/2+R/2})`),P.attr("transform",`translate(0,${T?S.height/2+R/2:-S.height/2-R/2})`),Ft(t,lt),t.intersect=function(at){var ft,wt,st;if(ht.info("iconSquare intersect",t,at),!t.label)return Bt.rect(t,at);const et=(ft=t.x)!=null?ft:0,it=(wt=t.y)!=null?wt:0,ot=(st=t.height)!=null?st:0;let J=[];return T?J=[{x:et-S.width/2,y:it-ot/2},{x:et+S.width/2,y:it-ot/2},{x:et+S.width/2,y:it-ot/2+S.height+R},{x:et+y/2,y:it-ot/2+S.height+R},{x:et+y/2,y:it+ot/2},{x:et-y/2,y:it+ot/2},{x:et-y/2,y:it-ot/2+S.height+R},{x:et-S.width/2,y:it-ot/2+S.height+R}]:J=[{x:et-y/2,y:it-ot/2},{x:et+y/2,y:it-ot/2},{x:et+y/2,y:it-ot/2+g},{x:et+S.width/2,y:it-ot/2+g},{x:et+S.width/2/2,y:it+ot/2},{x:et-S.width/2,y:it+ot/2},{x:et-S.width/2,y:it-ot/2+g},{x:et-y/2,y:it-ot/2+g}],Bt.polygon(t,J,at)},w})}k(W4,"imageSquare");function U4(e,t){return ct(this,null,function*(){var m,y,g,w;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=Math.max(s.width+((m=t.padding)!=null?m:0)*2,(y=t==null?void 0:t.width)!=null?y:0),o=Math.max(s.height+((g=t.padding)!=null?g:0)*2,(w=t==null?void 0:t.height)!=null?w:0),f=[{x:0,y:0},{x:l,y:0},{x:l+3*o/6,y:-o},{x:-3*o/6,y:-o}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const S=Lt.svg(n),B=Dt(t,{}),T=ee(f),L=S.path(T,B);h=n.insert(()=>L,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),d&&h.attr("style",d)}else h=Bi(n,l,o,f);return i&&h.attr("style",i),t.width=l,t.height=o,Ft(t,h),t.intersect=function(S){return Bt.polygon(t,f,S)},n})}k(U4,"inv_trapezoid");function Ma(e,t,r){return ct(this,null,function*(){const{labelStyles:i,nodeStyles:n}=Ot(t);t.labelStyle=i;const{shapeSvg:s,bbox:l}=yield jt(e,t,Ht(t)),o=Math.max(l.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),f=Math.max(l.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-o/2,d=-f/2;let m,{rx:y,ry:g}=t;const{cssStyles:w}=t;if(r!=null&&r.rx&&r.ry&&(y=r.rx,g=r.ry),t.look==="handDrawn"){const S=Lt.svg(s),B=Dt(t,{}),T=y||g?S.path(Ai(h,d,o,f,y||0),B):S.rectangle(h,d,o,f,B);m=s.insert(()=>T,":first-child"),m.attr("class","basic label-container").attr("style",lr(w))}else m=s.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",n).attr("rx",lr(y)).attr("ry",lr(g)).attr("x",h).attr("y",d).attr("width",o).attr("height",f);return Ft(t,m),t.intersect=function(S){return Bt.rect(t,S)},s})}k(Ma,"drawRect");function j4(e,t){return ct(this,null,function*(){var f,h;const{shapeSvg:r,bbox:i,label:n}=yield jt(e,t,"label"),s=r.insert("rect",":first-child"),l=.1,o=.1;return s.attr("width",l).attr("height",o),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-((f=i.left)!=null?f:0))}, ${-(i.height/2)-(i.y-((h=i.top)!=null?h:0))})`),Ft(t,s),t.intersect=function(d){return Bt.rect(t,d)},r})}k(j4,"labelRect");function Y4(e,t){return ct(this,null,function*(){var m,y,g,w;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=Math.max(s.width+((m=t.padding)!=null?m:0),(y=t==null?void 0:t.width)!=null?y:0),o=Math.max(s.height+((g=t.padding)!=null?g:0),(w=t==null?void 0:t.height)!=null?w:0),f=[{x:0,y:0},{x:l+3*o/6,y:0},{x:l,y:-o},{x:-(3*o)/6,y:-o}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const S=Lt.svg(n),B=Dt(t,{}),T=ee(f),L=S.path(T,B);h=n.insert(()=>L,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),d&&h.attr("style",d)}else h=Bi(n,l,o,f);return i&&h.attr("style",i),t.width=l,t.height=o,Ft(t,h),t.intersect=function(S){return Bt.polygon(t,f,S)},n})}k(Y4,"lean_left");function G4(e,t){return ct(this,null,function*(){var m,y,g,w;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=Math.max(s.width+((m=t.padding)!=null?m:0),(y=t==null?void 0:t.width)!=null?y:0),o=Math.max(s.height+((g=t.padding)!=null?g:0),(w=t==null?void 0:t.height)!=null?w:0),f=[{x:-3*o/6,y:0},{x:l,y:0},{x:l+3*o/6,y:-o},{x:0,y:-o}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const S=Lt.svg(n),B=Dt(t,{}),T=ee(f),L=S.path(T,B);h=n.insert(()=>L,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),d&&h.attr("style",d)}else h=Bi(n,l,o,f);return i&&h.attr("style",i),t.width=l,t.height=o,Ft(t,h),t.intersect=function(S){return Bt.polygon(t,f,S)},n})}k(G4,"lean_right");function V4(e,t){var S,B,T;const{labelStyles:r,nodeStyles:i}=Ot(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",Ht(t)).attr("id",(S=t.domId)!=null?S:t.id),{cssStyles:s}=t,l=Math.max(35,(B=t==null?void 0:t.width)!=null?B:0),o=Math.max(35,(T=t==null?void 0:t.height)!=null?T:0),f=7,h=[{x:l,y:0},{x:0,y:o+f/2},{x:l-2*f,y:o+f/2},{x:0,y:2*o},{x:l,y:o-f/2},{x:2*f,y:o-f/2}],d=Lt.svg(n),m=Dt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ee(h),g=d.path(y,m),w=n.insert(()=>g,":first-child");return s&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(-${l/2},${-o})`),Ft(t,w),t.intersect=function(L){return ht.info("lightningBolt intersect",t,L),Bt.polygon(t,h,L)},n}k(V4,"lightningBolt");var WM=k((e,t,r,i,n,s,l)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+l}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),UM=k((e,t,r,i,n,s,l)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+l}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),jM=k((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");function X4(e,t){return ct(this,null,function*(){var w,S,B,T,L,z;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+((w=t.padding)!=null?w:0),(S=t.width)!=null?S:0),f=o/2,h=f/(2.5+o/50),d=Math.max(s.height+h+((B=t.padding)!=null?B:0),(T=t.height)!=null?T:0),m=d*.1;let y;const{cssStyles:g}=t;if(t.look==="handDrawn"){const R=Lt.svg(n),$=UM(0,0,o,d,f,h,m),A=jM(0,h,o,d,f,h),N=Dt(t,{}),U=R.path($,N),X=R.path(A,N);n.insert(()=>X,":first-child").attr("class","line"),y=n.insert(()=>U,":first-child"),y.attr("class","basic label-container"),g&&y.attr("style",g)}else{const R=WM(0,0,o,d,f,h,m);y=n.insert("path",":first-child").attr("d",R).attr("class","basic label-container").attr("style",lr(g)).attr("style",i)}return y.attr("label-offset-y",h),y.attr("transform",`translate(${-o/2}, ${-(d/2+h)})`),Ft(t,y),l.attr("transform",`translate(${-(s.width/2)-(s.x-((L=s.left)!=null?L:0))}, ${-(s.height/2)+h-(s.y-((z=s.top)!=null?z:0))})`),t.intersect=function(R){var N,U,X,j,P,lt;const $=Bt.rect(t,R),A=$.x-((N=t.x)!=null?N:0);if(f!=0&&(Math.abs(A)<((U=t.width)!=null?U:0)/2||Math.abs(A)==((X=t.width)!=null?X:0)/2&&Math.abs($.y-((j=t.y)!=null?j:0))>((P=t.height)!=null?P:0)/2-h)){let Q=h*h*(1-A*A/(f*f));Q>0&&(Q=Math.sqrt(Q)),Q=h-Q,R.y-((lt=t.y)!=null?lt:0)>0&&(Q=-Q),$.y+=Q}return $},n})}k(X4,"linedCylinder");function Z4(e,t){return ct(this,null,function*(){var T,L,z,R,$,A,N,U;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+((T=t.padding)!=null?T:0)*2,(L=t==null?void 0:t.width)!=null?L:0),f=Math.max(s.height+((z=t.padding)!=null?z:0)*2,(R=t==null?void 0:t.height)!=null?R:0),h=f/4,d=f+h,{cssStyles:m}=t,y=Lt.svg(n),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const w=[{x:-o/2-o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:d/2},...qi(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,h,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2},{x:-o/2,y:-d/2},{x:-o/2,y:d/2*1.1},{x:-o/2,y:-d/2}],S=y.polygon(w.map(X=>[X.x,X.y]),g),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-h/2})`),l.attr("transform",`translate(${-o/2+(($=t.padding)!=null?$:0)+o/2*.1/2-(s.x-((A=s.left)!=null?A:0))},${-f/2+((N=t.padding)!=null?N:0)-h/2-(s.y-((U=s.top)!=null?U:0))})`),Ft(t,B),t.intersect=function(X){return Bt.polygon(t,w,X)},n})}k(Z4,"linedWaveEdgedRect");function K4(e,t){return ct(this,null,function*(){var A,N,U,X,j,P;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+((A=t.padding)!=null?A:0)*2,(N=t==null?void 0:t.width)!=null?N:0),f=Math.max(s.height+((U=t.padding)!=null?U:0)*2,(X=t==null?void 0:t.height)!=null?X:0),h=5,d=-o/2,m=-f/2,{cssStyles:y}=t,g=Lt.svg(n),w=Dt(t,{}),S=[{x:d-h,y:m+h},{x:d-h,y:m+f+h},{x:d+o-h,y:m+f+h},{x:d+o-h,y:m+f},{x:d+o,y:m+f},{x:d+o,y:m+f-h},{x:d+o+h,y:m+f-h},{x:d+o+h,y:m-h},{x:d+h,y:m-h},{x:d+h,y:m},{x:d,y:m},{x:d,y:m+h}],B=[{x:d,y:m+h},{x:d+o-h,y:m+h},{x:d+o-h,y:m+f},{x:d+o,y:m+f},{x:d+o,y:m},{x:d,y:m}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=ee(S),L=g.path(T,w),z=ee(B),R=g.path(z,de(qt({},w),{fill:"none"})),$=n.insert(()=>R,":first-child");return $.insert(()=>L,":first-child"),$.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(s.width/2)-h-(s.x-((j=s.left)!=null?j:0))}, ${-(s.height/2)+h-(s.y-((P=s.top)!=null?P:0))})`),Ft(t,$),t.intersect=function(lt){return Bt.polygon(t,S,lt)},n})}k(K4,"multiRect");function Q4(e,t){return ct(this,null,function*(){var j,P,lt,Q,Z,rt;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+((j=t.padding)!=null?j:0)*2,(P=t==null?void 0:t.width)!=null?P:0),f=Math.max(s.height+((lt=t.padding)!=null?lt:0)*2,(Q=t==null?void 0:t.height)!=null?Q:0),h=f/4,d=f+h,m=-o/2,y=-d/2,g=5,{cssStyles:w}=t,S=qi(m-g,y+d+g,m+o-g,y+d+g,h,.8),B=S==null?void 0:S[S.length-1],T=[{x:m-g,y:y+g},{x:m-g,y:y+d+g},...S,{x:m+o-g,y:B.y-g},{x:m+o,y:B.y-g},{x:m+o,y:B.y-2*g},{x:m+o+g,y:B.y-2*g},{x:m+o+g,y:y-g},{x:m+g,y:y-g},{x:m+g,y},{x:m,y},{x:m,y:y+g}],L=[{x:m,y:y+g},{x:m+o-g,y:y+g},{x:m+o-g,y:B.y-g},{x:m+o,y:B.y-g},{x:m+o,y},{x:m,y}],z=Lt.svg(n),R=Dt(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const $=ee(T),A=z.path($,R),N=ee(L),U=z.path(N,R),X=n.insert(()=>A,":first-child");return X.insert(()=>U),X.attr("class","basic label-container"),w&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",w),i&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",i),X.attr("transform",`translate(0,${-h/2})`),l.attr("transform",`translate(${-(s.width/2)-g-(s.x-((Z=s.left)!=null?Z:0))}, ${-(s.height/2)+g-h/2-(s.y-((rt=s.top)!=null?rt:0))})`),Ft(t,X),t.intersect=function(nt){return Bt.polygon(t,T,nt)},n})}k(Q4,"multiWaveEdgedRectangle");function J4(i,n,s){return ct(this,arguments,function*(e,t,{config:{themeVariables:r}}){var R,$,A,N,U;const{labelStyles:l,nodeStyles:o}=Ot(t);t.labelStyle=l,t.useHtmlLabels||((R=gr().flowchart)==null?void 0:R.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:h,bbox:d}=yield jt(e,t,Ht(t)),m=Math.max(d.width+(($=t.padding)!=null?$:0)*2,(A=t==null?void 0:t.width)!=null?A:0),y=Math.max(d.height+((N=t.padding)!=null?N:0)*2,(U=t==null?void 0:t.height)!=null?U:0),g=-m/2,w=-y/2,{cssStyles:S}=t,B=Lt.svg(h),T=Dt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const L=B.rectangle(g,w,m,y,T),z=h.insert(()=>L,":first-child");return z.attr("class","basic label-container"),S&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",S),o&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",o),Ft(t,z),t.intersect=function(X){return Bt.rect(t,X)},h})}k(J4,"note");var YM=k((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");function t5(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=s.width+t.padding,o=s.height+t.padding,f=l+o,h=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}];let d;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Lt.svg(n),g=Dt(t,{}),w=YM(0,0,f),S=y.path(w,g);d=n.insert(()=>S,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`),m&&d.attr("style",m)}else d=Bi(n,f,f,h);return i&&d.attr("style",i),Ft(t,d),t.intersect=function(y){return ht.debug(`APA12 Intersect called SPLIT point:`,y,` node: `,t,` res:`,Bt.polygon(t,h,y)),Bt.polygon(t,h,y)},n})}k(t5,"question");function e5(e,t){return ct(this,null,function*(){var z,R,$,A,N,U;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+((z=t.padding)!=null?z:0),(R=t==null?void 0:t.width)!=null?R:0),f=Math.max(s.height+(($=t.padding)!=null?$:0),(A=t==null?void 0:t.height)!=null?A:0),h=-o/2,d=-f/2,m=d/2,y=[{x:h+m,y:d},{x:h,y:0},{x:h+m,y:-d},{x:-h,y:-d},{x:-h,y:d}],{cssStyles:g}=t,w=Lt.svg(n),S=Dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=ee(y),T=w.path(B,S),L=n.insert(()=>T,":first-child");return L.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-m/2},0)`),l.attr("transform",`translate(${-m/2-s.width/2-(s.x-((N=s.left)!=null?N:0))}, ${-(s.height/2)-(s.y-((U=s.top)!=null?U:0))})`),Ft(t,L),t.intersect=function(X){return Bt.polygon(t,y,X)},n})}k(e5,"rect_left_inv_arrow");function r5(e,t){return ct(this,null,function*(){var U,X;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),l=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",i),f=t.description,h=t.label,d=o.node().appendChild(yield cn(h,t.labelStyle,!0,!0));let m={width:0,height:0};if(ze((X=(U=le())==null?void 0:U.flowchart)==null?void 0:X.htmlLabels)){const j=d.children[0],P=te(d);m=j.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}ht.info("Text 2",f);const y=f||[],g=d.getBBox(),w=o.node().appendChild(yield cn(y.join?y.join("
    "):y,t.labelStyle,!0,!0)),S=w.children[0],B=te(w);m=S.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height);const T=(t.padding||0)/2;te(w).attr("transform","translate( "+(m.width>g.width?0:(g.width-m.width)/2)+", "+(g.height+T+5)+")"),te(d).attr("transform","translate( "+(m.width(ht.debug("Rough node insert CXC",lt),Q),":first-child"),A=s.insert(()=>(ht.debug("Rough node insert CXC",lt),lt),":first-child")}else A=l.insert("rect",":first-child"),N=l.insert("line"),A.attr("class","outer title-state").attr("style",i).attr("x",-m.width/2-T).attr("y",-m.height/2-T).attr("width",m.width+(t.padding||0)).attr("height",m.height+(t.padding||0)),N.attr("class","divider").attr("x1",-m.width/2-T).attr("x2",m.width/2+T).attr("y1",-m.height/2-T+g.height+T).attr("y2",-m.height/2-T+g.height+T);return Ft(t,A),t.intersect=function(j){return Bt.rect(t,j)},s})}k(r5,"rectWithTitle");function i5(e,t){return ct(this,null,function*(){const r={rx:5,ry:5,classes:"",labelPaddingX:((t==null?void 0:t.padding)||0)*1,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Ma(e,t,r)})}k(i5,"roundedRect");function n5(e,t){return ct(this,null,function*(){var L,z,R,$,A,N,U,X,j;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=(L=t==null?void 0:t.padding)!=null?L:0,f=Math.max(s.width+((z=t.padding)!=null?z:0)*2,(R=t==null?void 0:t.width)!=null?R:0),h=Math.max(s.height+(($=t.padding)!=null?$:0)*2,(A=t==null?void 0:t.height)!=null?A:0),d=-s.width/2-o,m=-s.height/2-o,{cssStyles:y}=t,g=Lt.svg(n),w=Dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:d,y:m},{x:d+f+8,y:m},{x:d+f+8,y:m+h},{x:d-8,y:m+h},{x:d-8,y:m},{x:d,y:m},{x:d,y:m+h}],B=g.polygon(S.map(P=>[P.x,P.y]),w),T=n.insert(()=>B,":first-child");return T.attr("class","basic label-container").attr("style",lr(y)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${-f/2+4+((N=t.padding)!=null?N:0)-(s.x-((U=s.left)!=null?U:0))},${-h/2+((X=t.padding)!=null?X:0)-(s.y-((j=s.top)!=null?j:0))})`),Ft(t,T),t.intersect=function(P){return Bt.rect(t,P)},n})}k(n5,"shadedProcess");function s5(e,t){return ct(this,null,function*(){var L,z,R,$,A,N,U,X;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+((L=t.padding)!=null?L:0)*2,(z=t==null?void 0:t.width)!=null?z:0),f=Math.max(s.height+((R=t.padding)!=null?R:0)*2,($=t==null?void 0:t.height)!=null?$:0),h=-o/2,d=-f/2,{cssStyles:m}=t,y=Lt.svg(n),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const w=[{x:h,y:d},{x:h,y:d+f},{x:h+o,y:d+f},{x:h+o,y:d-f/2}],S=ee(w),B=y.path(S,g),T=n.insert(()=>B,":first-child");return T.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),T.attr("transform",`translate(0, ${f/4})`),l.attr("transform",`translate(${-o/2+((A=t.padding)!=null?A:0)-(s.x-((N=s.left)!=null?N:0))}, ${-f/4+((U=t.padding)!=null?U:0)-(s.y-((X=s.top)!=null?X:0))})`),Ft(t,T),t.intersect=function(j){return Bt.polygon(t,w,j)},n})}k(s5,"slopedRect");function a5(e,t){return ct(this,null,function*(){const r={rx:0,ry:0,classes:"",labelPaddingX:((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Ma(e,t,r)})}k(a5,"squareRect");function o5(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=s.height+t.padding,o=s.width+l/4+t.padding;let f;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=Lt.svg(n),m=Dt(t,{}),y=Ai(-o/2,-l/2,o,l,l/2),g=d.path(y,m);f=n.insert(()=>g,":first-child"),f.attr("class","basic label-container").attr("style",lr(h))}else f=n.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",l/2).attr("ry",l/2).attr("x",-o/2).attr("y",-l/2).attr("width",o).attr("height",l);return Ft(t,f),t.intersect=function(d){return Bt.rect(t,d)},n})}k(o5,"stadium");function l5(e,t){return ct(this,null,function*(){return Ma(e,t,{rx:5,ry:5,classes:"flowchart-node"})})}k(l5,"state");function c5(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Ot(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:l,stateBorder:o,nodeBorder:f}=r,h=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),d=Lt.svg(h),m=Dt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=d.circle(0,0,14,de(qt({},m),{stroke:l,strokeWidth:2})),g=o!=null?o:f,w=d.circle(0,0,5,de(qt({},m),{fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"})),S=h.insert(()=>y,":first-child");return S.insert(()=>w),s&&S.selectAll("path").attr("style",s),n&&S.selectAll("path").attr("style",n),Ft(t,S),t.intersect=function(B){return Bt.circle(t,7,B)},h}k(c5,"stateEnd");function h5(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const o=Lt.svg(n).circle(0,0,14,TM(i));s=n.insert(()=>o),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=n.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Ft(t,s),t.intersect=function(l){return Bt.circle(t,7,l)},n}k(h5,"stateStart");function u5(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=((t==null?void 0:t.padding)||0)/2,o=s.width+t.padding,f=s.height+t.padding,h=-s.width/2-l,d=-s.height/2-l,m=[{x:0,y:0},{x:o,y:0},{x:o,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const y=Lt.svg(n),g=Dt(t,{}),w=y.rectangle(h-8,d,o+16,f,g),S=y.line(h,d,h,d+f,g),B=y.line(h+o,d,h+o,d+f,g);n.insert(()=>S,":first-child"),n.insert(()=>B,":first-child");const T=n.insert(()=>w,":first-child"),{cssStyles:L}=t;T.attr("class","basic label-container").attr("style",lr(L)),Ft(t,T)}else{const y=Bi(n,o,f,m);i&&y.attr("style",i),Ft(t,y)}return t.intersect=function(y){return Bt.polygon(t,m,y)},n})}k(u5,"subroutine");function f5(e,t){return ct(this,null,function*(){var A,N,U,X;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=Math.max(s.width+((A=t.padding)!=null?A:0)*2,(N=t==null?void 0:t.width)!=null?N:0),o=Math.max(s.height+((U=t.padding)!=null?U:0)*2,(X=t==null?void 0:t.height)!=null?X:0),f=-l/2,h=-o/2,d=.2*o,m=.2*o,{cssStyles:y}=t,g=Lt.svg(n),w=Dt(t,{}),S=[{x:f-d/2,y:h},{x:f+l+d/2,y:h},{x:f+l+d/2,y:h+o},{x:f-d/2,y:h+o}],B=[{x:f+l-d/2,y:h+o},{x:f+l+d/2,y:h+o},{x:f+l+d/2,y:h+o-m}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=ee(S),L=g.path(T,w),z=ee(B),R=g.path(z,de(qt({},w),{fillStyle:"solid"})),$=n.insert(()=>R,":first-child");return $.insert(()=>L,":first-child"),$.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),Ft(t,$),t.intersect=function(j){return Bt.polygon(t,S,j)},n})}k(f5,"taggedRect");function d5(e,t){return ct(this,null,function*(){var X,j,P,lt,Q,Z,rt,nt;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+((X=t.padding)!=null?X:0)*2,(j=t==null?void 0:t.width)!=null?j:0),f=Math.max(s.height+((P=t.padding)!=null?P:0)*2,(lt=t==null?void 0:t.height)!=null?lt:0),h=f/4,d=.2*o,m=.2*f,y=f+h,{cssStyles:g}=t,w=Lt.svg(n),S=Dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=[{x:-o/2-o/2*.1,y:y/2},...qi(-o/2-o/2*.1,y/2,o/2+o/2*.1,y/2,h,.8),{x:o/2+o/2*.1,y:-y/2},{x:-o/2-o/2*.1,y:-y/2}],T=-o/2+o/2*.1,L=-y/2-m*.4,z=[{x:T+o-d,y:(L+f)*1.4},{x:T+o,y:L+f-m},{x:T+o,y:(L+f)*.9},...qi(T+o,(L+f)*1.3,T+o-d,(L+f)*1.5,-f*.03,.5)],R=ee(B),$=w.path(R,S),A=ee(z),N=w.path(A,de(qt({},S),{fillStyle:"solid"})),U=n.insert(()=>N,":first-child");return U.insert(()=>$,":first-child"),U.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&U.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&U.selectAll("path").attr("style",i),U.attr("transform",`translate(0,${-h/2})`),l.attr("transform",`translate(${-o/2+((Q=t.padding)!=null?Q:0)-(s.x-((Z=s.left)!=null?Z:0))},${-f/2+((rt=t.padding)!=null?rt:0)-h/2-(s.y-((nt=s.top)!=null?nt:0))})`),Ft(t,U),t.intersect=function(at){return Bt.polygon(t,B,at)},n})}k(d5,"taggedWaveEdgedRectangle");function p5(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=Math.max(s.width+t.padding,(t==null?void 0:t.width)||0),o=Math.max(s.height+t.padding,(t==null?void 0:t.height)||0),f=-l/2,h=-o/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",f).attr("y",h).attr("width",l).attr("height",o),Ft(t,d),t.intersect=function(m){return Bt.rect(t,m)},n})}k(p5,"text");var GM=k((e,t,r,i,n,s)=>`M${e},${t} a${n},${s} 0,0,1 0,${-i} l${r},0 a${n},${s} 0,0,1 0,${i} M${r},${-i} a${n},${s} 0,0,0 0,${i} l${-r},0`,"createCylinderPathD"),VM=k((e,t,r,i,n,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),XM=k((e,t,r,i,n,s)=>[`M${e+r/2},${-i/2}`,`a${n},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");function m5(e,t){return ct(this,null,function*(){var S,B;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l,halfPadding:o}=yield jt(e,t,Ht(t)),f=t.look==="neo"?o*2:o,h=s.height+f,d=h/2,m=d/(2.5+h/50),y=s.width+m+f,{cssStyles:g}=t;let w;if(t.look==="handDrawn"){const T=Lt.svg(n),L=VM(0,0,y,h,m,d),z=XM(0,0,y,h,m,d),R=T.path(L,Dt(t,{})),$=T.path(z,Dt(t,{fill:"none"}));w=n.insert(()=>$,":first-child"),w=n.insert(()=>R,":first-child"),w.attr("class","basic label-container"),g&&w.attr("style",g)}else{const T=GM(0,0,y,h,m,d);w=n.insert("path",":first-child").attr("d",T).attr("class","basic label-container").attr("style",lr(g)).attr("style",i),w.attr("class","basic label-container"),g&&w.selectAll("path").attr("style",g),i&&w.selectAll("path").attr("style",i)}return w.attr("label-offset-x",m),w.attr("transform",`translate(${-y/2}, ${h/2} )`),l.attr("transform",`translate(${-(s.width/2)-m-(s.x-((S=s.left)!=null?S:0))}, ${-(s.height/2)-(s.y-((B=s.top)!=null?B:0))})`),Ft(t,w),t.intersect=function(T){var R,$,A,N,U,X;const L=Bt.rect(t,T),z=L.y-((R=t.y)!=null?R:0);if(d!=0&&(Math.abs(z)<(($=t.height)!=null?$:0)/2||Math.abs(z)==((A=t.height)!=null?A:0)/2&&Math.abs(L.x-((N=t.x)!=null?N:0))>((U=t.width)!=null?U:0)/2-m)){let j=m*m*(1-z*z/(d*d));j!=0&&(j=Math.sqrt(Math.abs(j))),j=m-j,T.x-((X=t.x)!=null?X:0)>0&&(j=-j),L.x+=j}return L},n})}k(m5,"tiltedCylinder");function g5(e,t){return ct(this,null,function*(){const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=s.width+t.padding,o=s.height+t.padding,f=[{x:-3*o/6,y:0},{x:l+3*o/6,y:0},{x:l,y:-o},{x:0,y:-o}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=Lt.svg(n),y=Dt(t,{}),g=ee(f),w=m.path(g,y);h=n.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),d&&h.attr("style",d)}else h=Bi(n,l,o,f);return i&&h.attr("style",i),t.width=l,t.height=o,Ft(t,h),t.intersect=function(m){return Bt.polygon(t,f,m)},n})}k(g5,"trapezoid");function y5(e,t){return ct(this,null,function*(){var T,L,z,R;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=60,o=20,f=Math.max(l,s.width+((T=t.padding)!=null?T:0)*2,(L=t==null?void 0:t.width)!=null?L:0),h=Math.max(o,s.height+((z=t.padding)!=null?z:0)*2,(R=t==null?void 0:t.height)!=null?R:0),{cssStyles:d}=t,m=Lt.svg(n),y=Dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const g=[{x:-f/2*.8,y:-h/2},{x:f/2*.8,y:-h/2},{x:f/2,y:-h/2*.6},{x:f/2,y:h/2},{x:-f/2,y:h/2},{x:-f/2,y:-h/2*.6}],w=ee(g),S=m.path(w,y),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),Ft(t,B),t.intersect=function($){return Bt.polygon(t,g,$)},n})}k(y5,"trapezoidalPentagon");function b5(e,t){return ct(this,null,function*(){var L,z,R,$,A;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=ze((L=le().flowchart)==null?void 0:L.htmlLabels),f=s.width+((z=t.padding)!=null?z:0),h=f+s.height,d=f+s.height,m=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-h}],{cssStyles:y}=t,g=Lt.svg(n),w=Dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=ee(m),B=g.path(S,w),T=n.insert(()=>B,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return y&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),t.width=f,t.height=h,Ft(t,T),l.attr("transform",`translate(${-s.width/2-(s.x-((R=s.left)!=null?R:0))}, ${h/2-(s.height+(($=t.padding)!=null?$:0)/(o?2:1)-(s.y-((A=s.top)!=null?A:0)))})`),t.intersect=function(N){return ht.info("Triangle intersect",t,m,N),Bt.polygon(t,m,N)},n})}k(b5,"triangle");function x5(e,t){return ct(this,null,function*(){var $,A,N,U,X,j,P,lt;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+(($=t.padding)!=null?$:0)*2,(A=t==null?void 0:t.width)!=null?A:0),f=Math.max(s.height+((N=t.padding)!=null?N:0)*2,(U=t==null?void 0:t.height)!=null?U:0),h=f/8,d=f+h,{cssStyles:m}=t,g=70-o,w=g>0?g/2:0,S=Lt.svg(n),B=Dt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const T=[{x:-o/2-w,y:d/2},...qi(-o/2-w,d/2,o/2+w,d/2,h,.8),{x:o/2+w,y:-d/2},{x:-o/2-w,y:-d/2}],L=ee(T),z=S.path(L,B),R=n.insert(()=>z,":first-child");return R.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(0,${-h/2})`),l.attr("transform",`translate(${-o/2+((X=t.padding)!=null?X:0)-(s.x-((j=s.left)!=null?j:0))},${-f/2+((P=t.padding)!=null?P:0)-h-(s.y-((lt=s.top)!=null?lt:0))})`),Ft(t,R),t.intersect=function(Q){return Bt.polygon(t,T,Q)},n})}k(x5,"waveEdgedRectangle");function w5(e,t){return ct(this,null,function*(){var A,N,U,X;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=yield jt(e,t,Ht(t)),l=100,o=50,f=Math.max(s.width+((A=t.padding)!=null?A:0)*2,(N=t==null?void 0:t.width)!=null?N:0),h=Math.max(s.height+((U=t.padding)!=null?U:0)*2,(X=t==null?void 0:t.height)!=null?X:0),d=f/h;let m=f,y=h;m>y*d?y=m/d:m=y*d,m=Math.max(m,l),y=Math.max(y,o);const g=Math.min(y*.2,y/4),w=y+g*2,{cssStyles:S}=t,B=Lt.svg(n),T=Dt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const L=[{x:-m/2,y:w/2},...qi(-m/2,w/2,m/2,w/2,g,1),{x:m/2,y:-w/2},...qi(m/2,-w/2,-m/2,-w/2,g,-1)],z=ee(L),R=B.path(z,T),$=n.insert(()=>R,":first-child");return $.attr("class","basic label-container"),S&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",S),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),Ft(t,$),t.intersect=function(j){return Bt.polygon(t,L,j)},n})}k(w5,"waveRectangle");function k5(e,t){return ct(this,null,function*(){var z,R,$,A,N,U;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:l}=yield jt(e,t,Ht(t)),o=Math.max(s.width+((z=t.padding)!=null?z:0)*2,(R=t==null?void 0:t.width)!=null?R:0),f=Math.max(s.height+(($=t.padding)!=null?$:0)*2,(A=t==null?void 0:t.height)!=null?A:0),h=5,d=-o/2,m=-f/2,{cssStyles:y}=t,g=Lt.svg(n),w=Dt(t,{}),S=[{x:d-h,y:m-h},{x:d-h,y:m+f},{x:d+o,y:m+f},{x:d+o,y:m-h}],B=`M${d-h},${m-h} L${d+o},${m-h} L${d+o},${m+f} L${d-h},${m+f} L${d-h},${m-h} M${d-h},${m} L${d+o},${m} M${d},${m-h} L${d},${m+f}`;t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=g.path(B,w),L=n.insert(()=>T,":first-child");return L.attr("transform",`translate(${h/2}, ${h/2})`),L.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(s.width/2)+h/2-(s.x-((N=s.left)!=null?N:0))}, ${-(s.height/2)+h/2-(s.y-((U=s.top)!=null?U:0))})`),Ft(t,L),t.intersect=function(X){return Bt.polygon(t,S,X)},n})}k(k5,"windowPane");function fu(e,t){return ct(this,null,function*(){var it,ot,J,xt,ft,wt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:st}=gr(),{background:Nt}=st,Ut=de(qt({},t),{id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Nt}`]});yield fu(e,Ut)}const i=gr();t.useHtmlLabels=i.htmlLabels;let n=(ot=(it=i.er)==null?void 0:it.diagramPadding)!=null?ot:10,s=(xt=(J=i.er)==null?void 0:J.entityPadding)!=null?xt:6;const{cssStyles:l}=t,{labelStyles:o}=Ot(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5,classes:""};Ti(t.label,i)+st.labelPaddingX*20){const st=d.width+n*2-(g+w+S+B);g+=st/z,w+=st/z,S>0&&(S+=st/z),B>0&&(B+=st/z)}const $=g+w+S+B,A=Lt.svg(h),N=Dt(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const U=Math.max(R.width+n*2,(t==null?void 0:t.width)||0,$),X=Math.max(R.height+(y[0]||m)+s,(t==null?void 0:t.height)||0),j=-U/2,P=-X/2;h.selectAll("g:not(:first-child)").each((st,Nt,Ut)=>{const Vt=te(Ut[Nt]),yt=Vt.attr("transform");let _t=0,It=0;if(yt){const ue=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(yt);ue&&(_t=parseFloat(ue[1]),It=parseFloat(ue[2]),Vt.attr("class").includes("attribute-name")?_t+=g:Vt.attr("class").includes("attribute-keys")?_t+=g+w:Vt.attr("class").includes("attribute-comment")&&(_t+=g+w+S))}Vt.attr("transform",`translate(${j+n/2+_t}, ${It+P+d.height+s/2})`)}),h.select(".name").attr("transform","translate("+-d.width/2+", "+(P+s/2)+")");const lt=A.rectangle(j,P,U,X,N),Q=h.insert(()=>lt,":first-child").attr("style",l.join("")),{themeVariables:Z}=gr(),{rowEven:rt,rowOdd:nt,nodeBorder:at}=Z;y.push(0);for(const[st,Nt]of y.entries()){if(st===0&&y.length>1)continue;const Ut=st%2===0&&Nt!==0,Vt=A.rectangle(j,d.height+P+Nt,U,d.height,de(qt({},N),{fill:Ut?rt:nt,stroke:at}));h.insert(()=>Vt,"g.label").attr("style",l.join("")).attr("class",`row-rect-${st%2===0?"even":"odd"}`)}let et=A.line(j,d.height+P,U+j,d.height+P,N);h.insert(()=>et).attr("class","divider"),et=A.line(g+j,d.height+P,g+j,X+P,N),h.insert(()=>et).attr("class","divider"),T&&(et=A.line(g+w+j,d.height+P,g+w+j,X+P,N),h.insert(()=>et).attr("class","divider")),L&&(et=A.line(g+w+S+j,d.height+P,g+w+S+j,X+P,N),h.insert(()=>et).attr("class","divider"));for(const st of y)et=A.line(j,d.height+P+st,U+j,d.height+P+st,N),h.insert(()=>et).attr("class","divider");return Ft(t,Q),t.intersect=function(st){return Bt.rect(t,st)},h})}k(fu,"erBox");function In(o,f,h){return ct(this,arguments,function*(e,t,r,i=0,n=0,s=[],l=""){const d=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",l);t!==Yf(t)&&(t=Yf(t),t=t.replaceAll("<","<").replaceAll(">",">"));const m=d.node().appendChild(yield Wi(d,t,{width:Ti(t,r)+100,style:l,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let g=m.children[0];for(g.textContent=g.textContent.replaceAll("<","<").replaceAll(">",">");g.childNodes[0];)g=g.childNodes[0],g.textContent=g.textContent.replaceAll("<","<").replaceAll(">",">")}let y=m.getBBox();if(ze(r.htmlLabels)){const g=m.children[0];g.style.textAlign="start";const w=te(m);y=g.getBoundingClientRect(),w.attr("width",y.width),w.attr("height",y.height)}return y})}k(In,"addText");function v5(l,o,f,h){return ct(this,arguments,function*(e,t,r,i,n=(s=>(s=r.class.padding)!=null?s:12)()){const d=i?0:3,m=e.insert("g").attr("class",Ht(t)).attr("id",t.domId||t.id);let y=null,g=null,w=null,S=null,B=0,T=0,L=0;if(y=m.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const N=t.annotations[0];yield qs(y,{text:`«${N}»`},0),B=y.node().getBBox().height}g=m.insert("g").attr("class","label-group text"),yield qs(g,t,0,["font-weight: bolder"]);const z=g.node().getBBox();T=z.height,w=m.insert("g").attr("class","members-group text");let R=0;for(const N of t.members){const U=yield qs(w,N,R,[N.parseClassifier()]);R+=U+d}L=w.node().getBBox().height,L<=0&&(L=n/2),S=m.insert("g").attr("class","methods-group text");let $=0;for(const N of t.methods){const U=yield qs(S,N,$,[N.parseClassifier()]);$+=U+d}let A=m.node().getBBox();if(y!==null){const N=y.node().getBBox();y.attr("transform",`translate(${-N.width/2})`)}return g.attr("transform",`translate(${-z.width/2}, ${B})`),A=m.node().getBBox(),w.attr("transform",`translate(0, ${B+T+n*2})`),A=m.node().getBBox(),S.attr("transform",`translate(0, ${B+T+(L?L+n*4:n*2)})`),A=m.node().getBBox(),{shapeSvg:m,bbox:A}})}k(v5,"textHelper");function qs(n,s,l){return ct(this,arguments,function*(e,t,r,i=[]){var w;const o=e.insert("g").attr("class","label").attr("style",i.join("; ")),f=gr();let h="useHtmlLabels"in t?t.useHtmlLabels:(w=ze(f.htmlLabels))!=null?w:!0,d="";"text"in t?d=t.text:d=t.label,!h&&d.startsWith("\\")&&(d=d.substring(1)),Kn(d)&&(h=!0);const m=yield Wi(o,gh(_n(d)),{width:Ti(d,f)+50,classes:"markdown-node-label",useHtmlLabels:h},f);let y,g=1;if(h){const S=m.children[0],B=te(m);g=S.innerHTML.split("
    ").length,S.innerHTML.includes("")&&(g+=S.innerHTML.split("").length-1);const T=S.getElementsByTagName("img");if(T){const L=d.replace(/]*>/g,"").trim()==="";yield Promise.all([...T].map(z=>new Promise(R=>{function $(){var A,N;if(z.style.display="flex",z.style.flexDirection="column",L){const U=(N=(A=f.fontSize)==null?void 0:A.toString())!=null?N:window.getComputedStyle(document.body).fontSize,X=5,j=parseInt(U,10)*X+"px";z.style.minWidth=j,z.style.maxWidth=j}else z.style.width="100%";R(z)}k($,"setupImage"),setTimeout(()=>{z.complete&&$()}),z.addEventListener("error",$),z.addEventListener("load",$)})))}y=S.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}else{i.includes("font-weight: bolder")&&te(m).selectAll("tspan").attr("font-weight",""),g=m.children.length;const S=m.children[0];(m.textContent===""||m.textContent.includes(">"))&&(S.textContent=d[0]+d.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),d[1]===" "&&(S.textContent=S.textContent[0]+" "+S.textContent.substring(1))),S.textContent==="undefined"&&(S.textContent=""),y=m.getBBox()}return o.attr("transform","translate(0,"+(-y.height/(2*g)+r)+")"),y.height})}k(qs,"addText");function C5(e,t){return ct(this,null,function*(){var X,j,P,lt,Q,Z,rt,nt;const r=le(),i=(X=r.class.padding)!=null?X:12,n=i,s=(P=(j=t.useHtmlLabels)!=null?j:ze(r.htmlLabels))!=null?P:!0,l=t;l.annotations=(lt=l.annotations)!=null?lt:[],l.members=(Q=l.members)!=null?Q:[],l.methods=(Z=l.methods)!=null?Z:[];const{shapeSvg:o,bbox:f}=yield v5(e,t,r,s,n),{labelStyles:h,nodeStyles:d}=Ot(t);t.labelStyle=h,t.cssStyles=l.styles||"";const m=((rt=l.styles)==null?void 0:rt.join(";"))||d||"";t.cssStyles||(t.cssStyles=m.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((nt=r.class)!=null&&nt.hideEmptyMembersBox),g=Lt.svg(o),w=Dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=f.width;let B=f.height;l.members.length===0&&l.methods.length===0?B+=n:l.members.length>0&&l.methods.length===0&&(B+=n*2);const T=-S/2,L=-B/2,z=g.rectangle(T-i,L-i-(y?i:l.members.length===0&&l.methods.length===0?-i/2:0),S+2*i,B+2*i+(y?i*2:l.members.length===0&&l.methods.length===0?-i:0),w),R=o.insert(()=>z,":first-child");R.attr("class","basic label-container");const $=R.node().getBBox();o.selectAll(".text").each((at,et,it)=>{var st;const ot=te(it[et]),J=ot.attr("transform");let xt=0;if(J){const Ut=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(J);Ut&&(xt=parseFloat(Ut[2]))}let ft=xt+L+i-(y?i:l.members.length===0&&l.methods.length===0?-i/2:0);s||(ft-=4);let wt=T;(ot.attr("class").includes("label-group")||ot.attr("class").includes("annotation-group"))&&(wt=-((st=ot.node())==null?void 0:st.getBBox().width)/2||0,o.selectAll("text").each(function(Nt,Ut,Vt){window.getComputedStyle(Vt[Ut]).textAnchor==="middle"&&(wt=0)})),ot.attr("transform",`translate(${wt}, ${ft})`)});const A=o.select(".annotation-group").node().getBBox().height-(y?i/2:0)||0,N=o.select(".label-group").node().getBBox().height-(y?i/2:0)||0,U=o.select(".members-group").node().getBBox().height-(y?i/2:0)||0;if(l.members.length>0||l.methods.length>0||y){const at=g.line($.x,A+N+L+i,$.x+$.width,A+N+L+i,w);o.insert(()=>at).attr("class","divider").attr("style",m)}if(y||l.members.length>0||l.methods.length>0){const at=g.line($.x,A+N+U+L+n*2+i,$.x+$.width,A+N+U+L+i+n*2,w);o.insert(()=>at).attr("class","divider").attr("style",m)}if(l.look!=="handDrawn"&&o.selectAll("path").attr("style",m),R.select(":nth-child(2)").attr("style",m),o.selectAll(".divider").select("path").attr("style",m),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",m),!s){const at=RegExp(/color\s*:\s*([^;]*)/),et=at.exec(m);if(et){const it=et[0].replace("color","fill");o.selectAll("tspan").attr("style",it)}else if(h){const it=at.exec(h);if(it){const ot=it[0].replace("color","fill");o.selectAll("tspan").attr("style",ot)}}}return Ft(t,R),t.intersect=function(at){return Bt.rect(t,at)},o})}k(C5,"classBox");function S5(e,t){return ct(this,null,function*(){var A,N,U,X,j;const{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;const n=t,s=t,l=20,o=20,f="verifyMethod"in t,h=Ht(t),d=e.insert("g").attr("class",h).attr("id",(A=t.domId)!=null?A:t.id);let m;f?m=yield Qr(d,`<<${n.type}>>`,0,t.labelStyle):m=yield Qr(d,"<<Element>>",0,t.labelStyle);let y=m;const g=yield Qr(d,n.name,y,t.labelStyle+"; font-weight: bold;");if(y+=g+o,f){const P=yield Qr(d,`${n.requirementId?`Id: ${n.requirementId}`:""}`,y,t.labelStyle);y+=P;const lt=yield Qr(d,`${n.text?`Text: ${n.text}`:""}`,y,t.labelStyle);y+=lt;const Q=yield Qr(d,`${n.risk?`Risk: ${n.risk}`:""}`,y,t.labelStyle);y+=Q,yield Qr(d,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,y,t.labelStyle)}else{const P=yield Qr(d,`${s.type?`Type: ${s.type}`:""}`,y,t.labelStyle);y+=P,yield Qr(d,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,y,t.labelStyle)}const w=((U=(N=d.node())==null?void 0:N.getBBox().width)!=null?U:200)+l,S=((j=(X=d.node())==null?void 0:X.getBBox().height)!=null?j:200)+l,B=-w/2,T=-S/2,L=Lt.svg(d),z=Dt(t,{});t.look!=="handDrawn"&&(z.roughness=0,z.fillStyle="solid");const R=L.rectangle(B,T,w,S,z),$=d.insert(()=>R,":first-child");if($.attr("class","basic label-container").attr("style",i),d.selectAll(".label").each((P,lt,Q)=>{const Z=te(Q[lt]),rt=Z.attr("transform");let nt=0,at=0;if(rt){const J=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(rt);J&&(nt=parseFloat(J[1]),at=parseFloat(J[2]))}const et=at-S/2;let it=B+l/2;(lt===0||lt===1)&&(it=nt),Z.attr("transform",`translate(${it}, ${et+l})`)}),y>m+g+o){const P=L.line(B,T+m+g+o,B+w,T+m+g+o,z);d.insert(()=>P).attr("style",i)}return Ft(t,$),t.intersect=function(P){return Bt.rect(t,P)},d})}k(S5,"requirementBox");function Qr(e,t,r,i=""){return ct(this,null,function*(){var h;if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),s=le(),l=(h=s.htmlLabels)!=null?h:!0,o=yield Wi(n,gh(_n(t)),{width:Ti(t,s)+50,classes:"markdown-node-label",useHtmlLabels:l,style:i},s);let f;if(l){const d=o.children[0],m=te(o);f=d.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}else{const d=o.children[0];for(const m of d.children)m.textContent=m.textContent.replaceAll(">",">").replaceAll("<","<"),i&&m.setAttribute("style",i);f=o.getBBox(),f.height+=6}return n.attr("transform",`translate(${-f.width/2},${-f.height/2+r})`),f.height})}k(Qr,"addText");var ZM=k(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");function _5(i,n,s){return ct(this,arguments,function*(e,t,{config:r}){var rt,nt,at;const{labelStyles:l,nodeStyles:o}=Ot(t);t.labelStyle=l||"";const f=10,h=t.width;t.width=((rt=t.width)!=null?rt:200)-10;const{shapeSvg:d,bbox:m,label:y}=yield jt(e,t,Ht(t)),g=t.padding||10;let w="",S;"ticket"in t&&t.ticket&&((nt=r==null?void 0:r.kanban)!=null&&nt.ticketBaseUrl)&&(w=(at=r==null?void 0:r.kanban)==null?void 0:at.ticketBaseUrl.replace("#TICKET#",t.ticket),S=d.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",w).attr("target","_blank"));const B={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let T,L;S?{label:T,bbox:L}=yield oc(S,"ticket"in t&&t.ticket||"",B):{label:T,bbox:L}=yield oc(d,"ticket"in t&&t.ticket||"",B);const{label:z,bbox:R}=yield oc(d,"assigned"in t&&t.assigned||"",B);t.width=h;const $=10,A=(t==null?void 0:t.width)||0,N=Math.max(L.height,R.height)/2,U=Math.max(m.height+$*2,(t==null?void 0:t.height)||0)+N,X=-A/2,j=-U/2;y.attr("transform","translate("+(g-A/2)+", "+(-N-m.height/2)+")"),T.attr("transform","translate("+(g-A/2)+", "+(-N+m.height/2)+")"),z.attr("transform","translate("+(g+A/2-R.width-2*f)+", "+(-N+m.height/2)+")");let P;const{rx:lt,ry:Q}=t,{cssStyles:Z}=t;if(t.look==="handDrawn"){const et=Lt.svg(d),it=Dt(t,{}),ot=lt||Q?et.path(Ai(X,j,A,U,lt||0),it):et.rectangle(X,j,A,U,it);P=d.insert(()=>ot,":first-child"),P.attr("class","basic label-container").attr("style",Z||null)}else{P=d.insert("rect",":first-child"),P.attr("class","basic label-container __APA__").attr("style",o).attr("rx",lt!=null?lt:5).attr("ry",Q!=null?Q:5).attr("x",X).attr("y",j).attr("width",A).attr("height",U);const et="priority"in t&&t.priority;if(et){const it=d.append("line"),ot=X+2,J=j+Math.floor((lt!=null?lt:0)/2),xt=j+U-Math.floor((lt!=null?lt:0)/2);it.attr("x1",ot).attr("y1",J).attr("x2",ot).attr("y2",xt).attr("stroke-width","4").attr("stroke",ZM(et))}}return Ft(t,P),t.height=U,t.intersect=function(et){return Bt.rect(t,et)},d})}k(_5,"kanbanItem");var KM=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:a5},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:i5},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:o5},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:u5},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:L4},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:C4},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:t5},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:z4},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:G4},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Y4},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:g5},{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:U4},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:D4},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:p5},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:k4},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:n5},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:h5},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:c5},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:R4},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:$4},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:T4},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:M4},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:A4},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:V4},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:x5},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:N4},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:m5},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:X4},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:B4},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:E4},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:b5},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:k5},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:F4},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:y5},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:O4},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:s5},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Q4},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:K4},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:w4},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:_4},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:d5},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:f5},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:w5},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:e5},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Z4}],QM=k(()=>{const t=[...Object.entries({state:l5,choice:v4,note:J4,rectWithTitle:r5,labelRect:j4,iconSquare:H4,iconCircle:P4,icon:I4,iconRounded:q4,imageSquare:W4,anchor:x4,kanbanItem:_5,classBox:C5,erBox:fu,requirementBox:S5}),...KM.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),T5=QM();function JM(e){return e in T5}k(JM,"isValidShape");var jl=new Map;function M5(e,t,r){return ct(this,null,function*(){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?T5[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let l;r.config.securityLevel==="sandbox"?l="_top":t.linkTarget&&(l=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",l!=null?l:null),n=yield s(i,t,r)}else n=yield s(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),jl.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i})}k(M5,"insertNode");var vD=k((e,t)=>{jl.set(t.id,e)},"setNodeElem"),CD=k(()=>{jl.clear()},"clear"),SD=k(e=>{const t=jl.get(e.id);ht.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),tA=k((e,t,r,i,n,s)=>{t.arrowTypeStart&&yd(e,"start",t.arrowTypeStart,r,i,n,s),t.arrowTypeEnd&&yd(e,"end",t.arrowTypeEnd,r,i,n,s)},"addEdgeMarkers"),eA={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},yd=k((e,t,r,i,n,s,l)=>{var m;const o=eA[r];if(!o){ht.warn(`Unknown arrow type: ${r}`);return}const f=o.type,d=`${n}_${s}-${f}${t==="start"?"Start":"End"}`;if(l&&l.trim()!==""){const y=l.replace(/[^\dA-Za-z]/g,"_"),g=`${d}_${y}`;if(!document.getElementById(g)){const w=document.getElementById(d);if(w){const S=w.cloneNode(!0);S.id=g,S.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",l),o.fill&&T.setAttribute("fill",l)}),(m=w.parentNode)==null||m.appendChild(S)}}e.attr(`marker-${t}`,`url(${i}#${g})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),gl=new Map,Ue=new Map,_D=k(()=>{gl.clear(),Ue.clear()},"clear"),Ns=k(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),rA=k((e,t)=>ct(void 0,null,function*(){let r=ze(le().flowchart.htmlLabels);const i=yield Wi(e,t.label,{style:Ns(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});ht.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),s=n.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(r){const f=i.children[0],h=te(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),gl.set(t.id,n),t.width=l.width,t.height=l.height;let o;if(t.startLabelLeft){const f=yield cn(t.startLabelLeft,Ns(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),d=h.insert("g").attr("class","inner");o=d.node().appendChild(f);const m=f.getBBox();d.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),Ue.get(t.id)||Ue.set(t.id,{}),Ue.get(t.id).startLeft=h,Hs(o,t.startLabelLeft)}if(t.startLabelRight){const f=yield cn(t.startLabelRight,Ns(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),d=h.insert("g").attr("class","inner");o=h.node().appendChild(f),d.node().appendChild(f);const m=f.getBBox();d.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),Ue.get(t.id)||Ue.set(t.id,{}),Ue.get(t.id).startRight=h,Hs(o,t.startLabelRight)}if(t.endLabelLeft){const f=yield cn(t.endLabelLeft,Ns(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),d=h.insert("g").attr("class","inner");o=d.node().appendChild(f);const m=f.getBBox();d.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),h.node().appendChild(f),Ue.get(t.id)||Ue.set(t.id,{}),Ue.get(t.id).endLeft=h,Hs(o,t.endLabelLeft)}if(t.endLabelRight){const f=yield cn(t.endLabelRight,Ns(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),d=h.insert("g").attr("class","inner");o=d.node().appendChild(f);const m=f.getBBox();d.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),h.node().appendChild(f),Ue.get(t.id)||Ue.set(t.id,{}),Ue.get(t.id).endRight=h,Hs(o,t.endLabelRight)}return i}),"insertEdgeLabel");function Hs(e,t){le().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}k(Hs,"setTerminalWidth");var iA=k((e,t)=>{ht.debug("Moving label abc88 ",e.id,e.label,gl.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=le(),{subGraphTitleTotalMargin:n}=Sh(i);if(e.label){const s=gl.get(e.id);let l=e.x,o=e.y;if(r){const f=ti.calcLabelPosition(r);ht.debug("Moving label "+e.label+" from (",l,",",o,") to (",f.x,",",f.y,") abc88"),t.updatedPath&&(l=f.x,o=f.y)}s.attr("transform",`translate(${l}, ${o+n/2})`)}if(e.startLabelLeft){const s=Ue.get(e.id).startLeft;let l=e.x,o=e.y;if(r){const f=ti.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);l=f.x,o=f.y}s.attr("transform",`translate(${l}, ${o})`)}if(e.startLabelRight){const s=Ue.get(e.id).startRight;let l=e.x,o=e.y;if(r){const f=ti.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);l=f.x,o=f.y}s.attr("transform",`translate(${l}, ${o})`)}if(e.endLabelLeft){const s=Ue.get(e.id).endLeft;let l=e.x,o=e.y;if(r){const f=ti.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);l=f.x,o=f.y}s.attr("transform",`translate(${l}, ${o})`)}if(e.endLabelRight){const s=Ue.get(e.id).endRight;let l=e.x,o=e.y;if(r){const f=ti.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);l=f.x,o=f.y}s.attr("transform",`translate(${l}, ${o})`)}},"positionEdgeLabel"),nA=k((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),s=Math.abs(t.y-i),l=e.width/2,o=e.height/2;return n>=l||s>=o},"outsideNode"),sA=k((e,t,r)=>{ht.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(r)} node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,s=Math.abs(i-r.x),l=e.width/2;let o=r.xMath.abs(i-t.x)*f){let m=r.y{ht.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(s=>{if(ht.info("abc88 checking point",s,t),!nA(t,s)&&!n){const l=sA(t,i,s);ht.debug("abc88 inside",s,i,l),ht.debug("abc88 intersection",l,t);let o=!1;r.forEach(f=>{o=o||f.x===l.x&&f.y===l.y}),r.some(f=>f.x===l.x&&f.y===l.y)?ht.warn("abc88 no intersect",l,r):r.push(l),n=!0}else ht.warn("abc88 outside",s,i),i=s,n||r.push(s)}),ht.debug("returning points",r),r},"cutPathAtIntersect");function A5(e){const t=[],r=[];for(let i=1;i5&&Math.abs(s.y-n.y)>5||n.y===s.y&&s.x===l.x&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-l.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}k(A5,"extractCornerPoints");var xd=k(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,s=Math.sqrt(i*i+n*n),l=r/s;return{x:t.x-l*i,y:t.y-l*n}},"findAdjacentPoint"),aA=k(function(e){const{cornerPointPositions:t}=A5(e),r=[];for(let i=0;i10&&Math.abs(s.y-n.y)>=10){ht.debug("Corner point fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));const g=5;l.x===o.x?y={x:h<0?o.x-g+m:o.x+g-m,y:d<0?o.y-m:o.y+m}:y={x:h<0?o.x-m:o.x+m,y:d<0?o.y-g+m:o.y+g-m}}else ht.debug("Corner point skipping fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));r.push(y,f)}else r.push(e[i]);return r},"fixCorners"),oA=k(function(e,t,r,i,n,s,l){var X;const{handDrawnSeed:o}=le();let f=t.points,h=!1;const d=n;var m=s;const y=[];for(const j in t.cssCompiledStyles)h4(j)||y.push(t.cssCompiledStyles[j]);m.intersect&&d.intersect&&(f=f.slice(1,t.points.length-1),f.unshift(d.intersect(f[0])),ht.debug("Last point APA12",t.start,"-->",t.end,f[f.length-1],m,m.intersect(f[f.length-1])),f.push(m.intersect(f[f.length-1]))),t.toCluster&&(ht.info("to cluster abc88",r.get(t.toCluster)),f=bd(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(ht.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(f,null,2)),f=bd(f.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let g=f.filter(j=>!Number.isNaN(j.y));g=aA(g);let w=vo;switch(w=tl,t.curve){case"linear":w=tl;break;case"basis":w=vo;break;case"cardinal":w=Kg;break;case"bumpX":w=Yg;break;case"bumpY":w=Gg;break;case"catmullRom":w=Jg;break;case"monotoneX":w=s2;break;case"monotoneY":w=a2;break;case"natural":w=l2;break;case"step":w=c2;break;case"stepAfter":w=u2;break;case"stepBefore":w=h2;break;default:w=vo}const{x:S,y:B}=$b(t),T=iC().x(S).y(B).curve(w);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let z,R=T(g);const $=Array.isArray(t.style)?t.style:[t.style];let A=$.find(j=>j==null?void 0:j.startsWith("stroke:"));if(t.look==="handDrawn"){const j=Lt.svg(e);Object.assign([],g);const P=j.path(R,{roughness:.3,seed:o});L+=" transition",z=te(P).select("path").attr("id",t.id).attr("class"," "+L+(t.classes?" "+t.classes:"")).attr("style",$?$.reduce((Q,Z)=>Q+";"+Z,""):"");let lt=z.attr("d");z.attr("d",lt),e.node().appendChild(z.node())}else{const j=y.join(";"),P=$?$.reduce((Z,rt)=>Z+rt+";",""):"";let lt="";t.animate&&(lt=" edge-animation-fast"),t.animation&&(lt=" edge-animation-"+t.animation);const Q=j?j+";"+P+";":P;z=e.append("path").attr("d",R).attr("id",t.id).attr("class"," "+L+(t.classes?" "+t.classes:"")+(lt!=null?lt:"")).attr("style",Q),A=(X=Q.match(/stroke:([^;]+)/))==null?void 0:X[1]}let N="";(le().flowchart.arrowMarkerAbsolute||le().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),ht.info("arrowTypeStart",t.arrowTypeStart),ht.info("arrowTypeEnd",t.arrowTypeEnd),tA(z,t,N,l,i,A);let U={};return h&&(U.updatedPath=f),U.originalPath=t.points,U},"insertEdge"),lA=k((e,t,r,i)=>{t.forEach(n=>{SA[n](e,r,i)})},"insertMarkers"),cA=k((e,t,r)=>{ht.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),hA=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),uA=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),fA=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),dA=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),pA=k((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),mA=k((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),gA=k((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),yA=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),bA=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),xA=k((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),wA=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),kA=k((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),vA=k((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),CA=k((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),SA={extension:cA,composition:hA,aggregation:uA,dependency:fA,lollipop:dA,point:pA,circle:mA,cross:gA,barb:yA,only_one:bA,zero_or_one:xA,one_or_more:wA,zero_or_more:kA,requirement_arrow:vA,requirement_contains:CA},_A=lA,TA={common:ls,getConfig:gr,insertCluster:OM,insertEdge:oA,insertEdgeLabel:rA,insertMarkers:_A,insertNode:M5,interpolateToCurve:Gh,labelHelper:jt,log:ht,positionEdgeLabel:iA},oa={},B5=k(e=>{for(const t of e)oa[t.name]=t},"registerLayoutLoaders"),MA=k(()=>{B5([{name:"dagre",loader:k(()=>ct(void 0,null,function*(){return yield pe(()=>import("./dagre-OKDRZEBW-d917c4e2.js"),["./dagre-OKDRZEBW-d917c4e2.js","./graph-f794edc0.js","./_baseUniq-5ee25ed9.js","./layout-663bb27b.js","./_basePickBy-a1ec2f81.js","./clone-92746810.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url)}),"loader")}])},"registerDefaultLayoutLoaders");MA();var TD=k((e,t)=>ct(void 0,null,function*(){if(!(e.layoutAlgorithm in oa))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=oa[e.layoutAlgorithm];return(yield r.loader()).render(e,t,TA,{algorithm:r.algorithm})}),"render"),MD=k((e="",{fallback:t="dagre"}={})=>{if(e in oa)return e;if(t in oa)return ht.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),wd={name:"mermaid",version:"11.6.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},AA=k(e=>{var n,s;const{securityLevel:t}=le();let r=te("body");if(t==="sandbox"){const o=(s=(n=te(`#i${e}`).node())==null?void 0:n.contentDocument)!=null?s:document;r=te(o.body)}return r.select(`#${e}`)},"selectSvgElement"),L5="comm",E5="rule",D5="decl",BA="@import",LA="@namespace",EA="@keyframes",DA="@layer",F5=Math.abs,du=String.fromCharCode;function O5(e){return e.trim()}function _o(e,t,r){return e.replace(t,r)}function FA(e,t,r){return e.indexOf(t,r)}function Yn(e,t){return e.charCodeAt(t)|0}function ss(e,t,r){return e.slice(t,r)}function Jr(e){return e.length}function OA(e){return e.length}function oo(e,t){return t.push(e),e}var Yl=1,as=1,R5=0,Rr=0,De=0,ds="";function pu(e,t,r,i,n,s,l,o){return{value:e,root:t,parent:r,type:i,props:n,children:s,line:Yl,column:as,length:l,return:"",siblings:o}}function RA(){return De}function NA(){return De=Rr>0?Yn(ds,--Rr):0,as--,De===10&&(as=1,Yl--),De}function qr(){return De=Rr2||la(De)>3?"":" "}function PA(e,t){for(;--t&&qr()&&!(De<48||De>102||De>57&&De<65||De>70&&De<97););return Gl(e,To()+(t<6&&Ni()==32&&qr()==32))}function eh(e){for(;qr();)switch(De){case e:return Rr;case 34:case 39:e!==34&&e!==39&&eh(De);break;case 40:e===41&&eh(e);break;case 92:qr();break}return Rr}function qA(e,t){for(;qr()&&e+De!==47+10;)if(e+De===42+42&&Ni()===47)break;return"/*"+Gl(t,Rr-1)+"*"+du(e===47?e:qr())}function HA(e){for(;!la(Ni());)qr();return Gl(e,Rr)}function WA(e){return $A(Mo("",null,null,null,[""],e=zA(e),0,[0],e))}function Mo(e,t,r,i,n,s,l,o,f){for(var h=0,d=0,m=l,y=0,g=0,w=0,S=1,B=1,T=1,L=0,z="",R=n,$=s,A=i,N=z;B;)switch(w=L,L=qr()){case 40:if(w!=108&&Yn(N,m-1)==58){FA(N+=_o(lc(L),"&","&\f"),"&\f",F5(h?o[h-1]:0))!=-1&&(T=-1);break}case 34:case 39:case 91:N+=lc(L);break;case 9:case 10:case 13:case 32:N+=IA(w);break;case 92:N+=PA(To()-1,7);continue;case 47:switch(Ni()){case 42:case 47:oo(UA(qA(qr(),To()),t,r,f),f),(la(w||1)==5||la(Ni()||1)==5)&&Jr(N)&&ss(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/"}break;case 123*S:o[h++]=Jr(N)*T;case 125*S:case 59:case 0:switch(L){case 0:case 125:B=0;case 59+d:T==-1&&(N=_o(N,/\f/g,"")),g>0&&(Jr(N)-m||S===0&&w===47)&&oo(g>32?vd(N+";",i,r,m-1,f):vd(_o(N," ","")+";",i,r,m-2,f),f);break;case 59:N+=";";default:if(oo(A=kd(N,t,r,h,d,n,o,z,R=[],$=[],m,s),s),L===123)if(d===0)Mo(N,t,A,A,R,s,m,o,$);else{switch(y){case 99:if(Yn(N,3)===110)break;case 108:if(Yn(N,2)===97)break;default:d=0;case 100:case 109:case 115:}d?Mo(e,A,A,i&&oo(kd(e,A,A,0,0,n,o,z,n,R=[],m,$),$),n,$,m,o,i?R:$):Mo(N,A,A,A,[""],$,0,o,$)}}h=d=g=0,S=T=1,z=N="",m=l;break;case 58:m=1+Jr(N),g=w;default:if(S<1){if(L==123)--S;else if(L==125&&S++==0&&NA()==125)continue}switch(N+=du(L),L*S){case 38:T=d>0?1:(N+="\f",-1);break;case 44:o[h++]=(Jr(N)-1)*T,T=1;break;case 64:Ni()===45&&(N+=lc(qr())),y=Ni(),d=m=Jr(z=N+=HA(To())),L++;break;case 45:w===45&&Jr(N)==2&&(S=0)}}return s}function kd(e,t,r,i,n,s,l,o,f,h,d,m){for(var y=n-1,g=n===0?s:[""],w=OA(g),S=0,B=0,T=0;S0?g[L]+" "+z:_o(z,/&\f/g,g[L])))&&(f[T++]=R);return pu(e,t,r,n===0?E5:o,f,h,d,m)}function UA(e,t,r,i){return pu(e,t,r,L5,du(RA()),ss(e,2,-2),0,i)}function vd(e,t,r,i,n){return pu(e,t,r,D5,ss(e,0,i),ss(e,i+1,-1),i,n)}function rh(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),dB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./c4Diagram-VJAJSXHY-3b30c64a.js"),["./c4Diagram-VJAJSXHY-3b30c64a.js","./chunk-D6G4REZN-759b9c9b.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:N5,diagram:e}}),"loader"),pB={id:N5,detector:fB,loader:dB},mB=pB,z5="flowchart",gB=k((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),yB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./flowDiagram-4HSFHLVR-f87fa481.js"),["./flowDiagram-4HSFHLVR-f87fa481.js","./chunk-RZ5BOZE2-2248c621.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:z5,diagram:e}}),"loader"),bB={id:z5,detector:gB,loader:yB},xB=bB,$5="flowchart-v2",wB=k((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),kB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./flowDiagram-4HSFHLVR-f87fa481.js"),["./flowDiagram-4HSFHLVR-f87fa481.js","./chunk-RZ5BOZE2-2248c621.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:$5,diagram:e}}),"loader"),vB={id:$5,detector:wB,loader:kB},CB=vB,I5="er",SB=k(e=>/^\s*erDiagram/.test(e),"detector"),_B=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./erDiagram-Q7BY3M3F-291834c7.js"),["./erDiagram-Q7BY3M3F-291834c7.js","./chunk-RZ5BOZE2-2248c621.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:I5,diagram:e}}),"loader"),TB={id:I5,detector:SB,loader:_B},MB=TB,P5="gitGraph",AB=k(e=>/^\s*gitGraph/.test(e),"detector"),BB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./gitGraphDiagram-7IBYFJ6S-5a12c14e.js"),["./gitGraphDiagram-7IBYFJ6S-5a12c14e.js","./chunk-4BMEZGHF-450323fc.js","./chunk-XZIHB7SX-ad6075e5.js","./mermaid-parser.core-a05879fd.js","./_baseUniq-5ee25ed9.js","./_basePickBy-a1ec2f81.js","./clone-92746810.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:P5,diagram:e}}),"loader"),LB={id:P5,detector:AB,loader:BB},EB=LB,q5="gantt",DB=k(e=>/^\s*gantt/.test(e),"detector"),FB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./ganttDiagram-APWFNJXF-b4e68b07.js"),["./ganttDiagram-APWFNJXF-b4e68b07.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:q5,diagram:e}}),"loader"),OB={id:q5,detector:DB,loader:FB},RB=OB,H5="info",NB=k(e=>/^\s*info/.test(e),"detector"),zB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./infoDiagram-PH2N3AL5-8b938e5d.js"),["./infoDiagram-PH2N3AL5-8b938e5d.js","./mermaid-parser.core-a05879fd.js","./_baseUniq-5ee25ed9.js","./_basePickBy-a1ec2f81.js","./clone-92746810.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:H5,diagram:e}}),"loader"),$B={id:H5,detector:NB,loader:zB},W5="pie",IB=k(e=>/^\s*pie/.test(e),"detector"),PB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./pieDiagram-IB7DONF6-28cac21c.js"),["./pieDiagram-IB7DONF6-28cac21c.js","./chunk-4BMEZGHF-450323fc.js","./mermaid-parser.core-a05879fd.js","./_baseUniq-5ee25ed9.js","./_basePickBy-a1ec2f81.js","./clone-92746810.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:W5,diagram:e}}),"loader"),qB={id:W5,detector:IB,loader:PB},U5="quadrantChart",HB=k(e=>/^\s*quadrantChart/.test(e),"detector"),WB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./quadrantDiagram-7GDLP6J5-04760df9.js"),["./quadrantDiagram-7GDLP6J5-04760df9.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:U5,diagram:e}}),"loader"),UB={id:U5,detector:HB,loader:WB},jB=UB,j5="xychart",YB=k(e=>/^\s*xychart-beta/.test(e),"detector"),GB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./xychartDiagram-VJFVF3MP-f066b0a9.js"),["./xychartDiagram-VJFVF3MP-f066b0a9.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:j5,diagram:e}}),"loader"),VB={id:j5,detector:YB,loader:GB},XB=VB,Y5="requirement",ZB=k(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),KB=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./requirementDiagram-KVF5MWMF-3cb34f9e.js"),["./requirementDiagram-KVF5MWMF-3cb34f9e.js","./chunk-RZ5BOZE2-2248c621.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:Y5,diagram:e}}),"loader"),QB={id:Y5,detector:ZB,loader:KB},JB=QB,G5="sequence",tL=k(e=>/^\s*sequenceDiagram/.test(e),"detector"),eL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./sequenceDiagram-X6HHIX6F-38062ff3.js"),["./sequenceDiagram-X6HHIX6F-38062ff3.js","./chunk-D6G4REZN-759b9c9b.js","./chunk-XZIHB7SX-ad6075e5.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:G5,diagram:e}}),"loader"),rL={id:G5,detector:tL,loader:eL},iL=rL,V5="class",nL=k((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),sL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./classDiagram-GIVACNV2-ed5c442d.js"),["./classDiagram-GIVACNV2-ed5c442d.js","./chunk-A2AXSNBT-91f81fe1.js","./chunk-RZ5BOZE2-2248c621.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:V5,diagram:e}}),"loader"),aL={id:V5,detector:nL,loader:sL},oL=aL,X5="classDiagram",lL=k((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),cL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./classDiagram-v2-COTLJTTW-ed5c442d.js"),["./classDiagram-v2-COTLJTTW-ed5c442d.js","./chunk-A2AXSNBT-91f81fe1.js","./chunk-RZ5BOZE2-2248c621.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:X5,diagram:e}}),"loader"),hL={id:X5,detector:lL,loader:cL},uL=hL,Z5="state",fL=k((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),dL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./stateDiagram-DGXRK772-5659f574.js"),["./stateDiagram-DGXRK772-5659f574.js","./chunk-AEK57VVT-b106e120.js","./chunk-RZ5BOZE2-2248c621.js","./graph-f794edc0.js","./_baseUniq-5ee25ed9.js","./layout-663bb27b.js","./_basePickBy-a1ec2f81.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:Z5,diagram:e}}),"loader"),pL={id:Z5,detector:fL,loader:dL},mL=pL,K5="stateDiagram",gL=k((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),yL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./stateDiagram-v2-YXO3MK2T-75cc1610.js"),["./stateDiagram-v2-YXO3MK2T-75cc1610.js","./chunk-AEK57VVT-b106e120.js","./chunk-RZ5BOZE2-2248c621.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:K5,diagram:e}}),"loader"),bL={id:K5,detector:gL,loader:yL},xL=bL,Q5="journey",wL=k(e=>/^\s*journey/.test(e),"detector"),kL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./journeyDiagram-U35MCT3I-8811ed3e.js"),["./journeyDiagram-U35MCT3I-8811ed3e.js","./chunk-D6G4REZN-759b9c9b.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:Q5,diagram:e}}),"loader"),vL={id:Q5,detector:wL,loader:kL},CL=vL,SL=k((e,t,r)=>{ht.debug(`rendering svg for syntax error `);const i=AA(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),op(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),J5={draw:SL},_L=J5,TL={db:{},renderer:J5,parser:{parse:k(()=>{},"parse")}},ML=TL,t3="flowchart-elk",AL=k((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),BL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./flowDiagram-4HSFHLVR-f87fa481.js"),["./flowDiagram-4HSFHLVR-f87fa481.js","./chunk-RZ5BOZE2-2248c621.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:t3,diagram:e}}),"loader"),LL={id:t3,detector:AL,loader:BL},EL=LL,e3="timeline",DL=k(e=>/^\s*timeline/.test(e),"detector"),FL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./timeline-definition-BDJGKUSR-1df78097.js"),["./timeline-definition-BDJGKUSR-1df78097.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:e3,diagram:e}}),"loader"),OL={id:e3,detector:DL,loader:FL},RL=OL,r3="mindmap",NL=k(e=>/^\s*mindmap/.test(e),"detector"),zL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./mindmap-definition-ALO5MXBD-b2a9d38b.js"),["./mindmap-definition-ALO5MXBD-b2a9d38b.js","./cytoscape.esm-73b8622f.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:r3,diagram:e}}),"loader"),$L={id:r3,detector:NL,loader:zL},IL=$L,i3="kanban",PL=k(e=>/^\s*kanban/.test(e),"detector"),qL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./kanban-definition-NDS4AKOZ-33954390.js"),["./kanban-definition-NDS4AKOZ-33954390.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:i3,diagram:e}}),"loader"),HL={id:i3,detector:PL,loader:qL},WL=HL,n3="sankey",UL=k(e=>/^\s*sankey-beta/.test(e),"detector"),jL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./sankeyDiagram-QLVOVGJD-e9571b22.js"),["./sankeyDiagram-QLVOVGJD-e9571b22.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:n3,diagram:e}}),"loader"),YL={id:n3,detector:UL,loader:jL},GL=YL,s3="packet",VL=k(e=>/^\s*packet-beta/.test(e),"detector"),XL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./diagram-VNBRO52H-83eed6a5.js"),["./diagram-VNBRO52H-83eed6a5.js","./chunk-4BMEZGHF-450323fc.js","./mermaid-parser.core-a05879fd.js","./_baseUniq-5ee25ed9.js","./_basePickBy-a1ec2f81.js","./clone-92746810.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:s3,diagram:e}}),"loader"),ZL={id:s3,detector:VL,loader:XL},a3="radar",KL=k(e=>/^\s*radar-beta/.test(e),"detector"),QL=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./diagram-SSKATNLV-b8a27f89.js"),["./diagram-SSKATNLV-b8a27f89.js","./chunk-4BMEZGHF-450323fc.js","./mermaid-parser.core-a05879fd.js","./_baseUniq-5ee25ed9.js","./_basePickBy-a1ec2f81.js","./clone-92746810.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:a3,diagram:e}}),"loader"),JL={id:a3,detector:KL,loader:QL},o3="block",tE=k(e=>/^\s*block-beta/.test(e),"detector"),eE=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./blockDiagram-JOT3LUYC-29320812.js"),["./blockDiagram-JOT3LUYC-29320812.js","./clone-92746810.js","./_baseUniq-5ee25ed9.js","./graph-f794edc0.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:o3,diagram:e}}),"loader"),rE={id:o3,detector:tE,loader:eE},iE=rE,l3="architecture",nE=k(e=>/^\s*architecture/.test(e),"detector"),sE=k(()=>ct(void 0,null,function*(){const{diagram:e}=yield pe(()=>import("./architectureDiagram-IEHRJDOE-967019f3.js"),["./architectureDiagram-IEHRJDOE-967019f3.js","./chunk-4BMEZGHF-450323fc.js","./chunk-XZIHB7SX-ad6075e5.js","./mermaid-parser.core-a05879fd.js","./_baseUniq-5ee25ed9.js","./_basePickBy-a1ec2f81.js","./clone-92746810.js","./cytoscape.esm-73b8622f.js","./utils-vendor-c35799af.js","./vue-vendor-d751b0f5.js"],import.meta.url);return{id:l3,diagram:e}}),"loader"),aE={id:l3,detector:nE,loader:sE},oE=aE,Bd=!1,Vl=k(()=>{Bd||(Bd=!0,Eo("error",ML,e=>e.toLowerCase().trim()==="error"),Eo("---",{db:{clear:k(()=>{},"clear")},styles:{},renderer:{draw:k(()=>{},"draw")},parser:{parse:k(()=>{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:k(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Vd(mB,WL,uL,oL,MB,RB,$B,qB,JB,iL,EL,CB,xB,IL,RL,EB,xL,mL,CL,jB,GL,ZL,XB,iE,oE,JL))},"addDiagrams"),lE=k(()=>ct(void 0,null,function*(){ht.debug("Loading registered diagrams");const t=(yield Promise.allSettled(Object.entries(Vn).map(s=>ct(void 0,[s],function*([r,{detector:i,loader:n}]){if(n)try{mc(r)}catch(l){try{const{diagram:o,id:f}=yield n();Eo(f,o,i)}catch(o){throw ht.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Vn[r],o}}})))).filter(r=>r.status==="rejected");if(t.length>0){ht.error(`Failed to load ${t.length} external diagrams`);for(const r of t)ht.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams"),cE="graphics-document document";function c3(e,t){e.attr("role",cE),t!==""&&e.attr("aria-roledescription",t)}k(c3,"setA11yDiagramInfo");function h3(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}k(h3,"addSVGa11yTitleDescription");var os,oh=(os=class{constructor(t,r,i,n,s){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=s}static fromText(i){return ct(this,arguments,function*(t,r={}){var d,m;const n=gr(),s=hh(t,n);t=ST(t)+` `;try{mc(s)}catch(y){const g=$6(s);if(!g)throw new Gd(`Diagram ${s} not found.`);const{id:w,diagram:S}=yield g();Eo(w,S)}const{db:l,parser:o,renderer:f,init:h}=mc(s);return o.parser&&(o.parser.yy=l),(d=l.clear)==null||d.call(l),h==null||h(n),r.title&&((m=l.setDiagramTitle)==null||m.call(l,r.title)),yield o.parse(t),new os(s,t,l,o,f)})}render(t,r){return ct(this,null,function*(){yield this.renderer.draw(this.text,t,r,this)})}getParser(){return this.parser}getType(){return this.type}},k(os,"Diagram"),os),Ld=[],hE=k(()=>{Ld.forEach(e=>{e()}),Ld=[]},"attachFunctions"),uE=k(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function u3(e){var n;const t=e.match(Yd);if(!t)return{text:e,metadata:{}};let r=(n=zb(t[1],{schema:Nb}))!=null?n:{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}k(u3,"extractFrontMatter");var fE=k(e=>e.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),dE=k(e=>{const{text:t,metadata:r}=u3(e),{displayMode:i,title:n,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:n,config:s,text:t}},"processFrontmatter"),pE=k(e=>{var i;const t=(i=ti.detectInit(e))!=null?i:{},r=ti.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:uT(e),directive:t}},"processDirectives");function mu(e){const t=fE(e),r=dE(t),i=pE(r.text),n=Qh(r.config,i.directive);return e=uE(i.text),{code:e,title:r.title,config:n}}k(mu,"preprocessDiagram");function f3(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}k(f3,"toBase64");var mE=5e4,gE="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",yE="sandbox",bE="loose",xE="http://www.w3.org/2000/svg",wE="http://www.w3.org/1999/xlink",kE="http://www.w3.org/1999/xhtml",vE="100%",CE="100%",SE="border:0;margin:0;",_E="margin:0",TE="allow-top-navigation-by-user-activation allow-popups",ME='The "iframe" tag is not supported by your browser.',AE=["foreignobject"],BE=["dominant-baseline"];function gu(e){var r;const t=mu(e);return Bo(),t7((r=t.config)!=null?r:{}),t}k(gu,"processAndSetConfigs");function d3(e,t){return ct(this,null,function*(){Vl();try{const{code:r,config:i}=gu(e);return{diagramType:(yield m3(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}})}k(d3,"parse");var Ed=k((e,t,r=[])=>` .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),LE=k((e,t=new Map)=>{var i,n;let r="";if(e.themeCSS!==void 0&&(r+=` ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=` :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=` :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const f=((n=e.htmlLabels)!=null?n:(i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(h=>{Ad(h.styles)||f.forEach(d=>{r+=Ed(h.id,d,h.styles)}),Ad(h.textStyles)||(r+=Ed(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(d=>d.replace("color","fill"))))})}return r},"createCssStyles"),EE=k((e,t,r,i)=>{const n=LE(e,r),s=x7(t,n,e.themeVariables);return rh(WA(`${i}{${s}}`),jA)},"createUserStyles"),DE=k((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=_n(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),FE=k((e="",t)=>{var n,s;const r=(s=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":CE,i=f3(`${e}`);return``},"putIntoIFrame"),Dd=k((e,t,r,i,n)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const l=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",xE);return n&&l.attr("xmlns:xlink",n),l.append("g"),e},"appendDivSvgG");function lh(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}k(lh,"sandboxedIframe");var OE=k((e,t,r,i)=>{var n,s,l;(n=e.getElementById(t))==null||n.remove(),(s=e.getElementById(r))==null||s.remove(),(l=e.getElementById(i))==null||l.remove()},"removeExistingElements"),RE=k(function(e,t,r){return ct(this,null,function*(){var lt,Q,Z,rt,nt,at,et;Vl();const i=gu(t);t=i.code;const n=gr();ht.debug(n),t.length>((lt=n==null?void 0:n.maxTextSize)!=null?lt:mE)&&(t=gE);const s="#"+e,l="i"+e,o="#"+l,f="d"+e,h="#"+f,d=k(()=>{const ot=te(y?o:h).node();ot&&"remove"in ot&&ot.remove()},"removeTempElements");let m=te("body");const y=n.securityLevel===yE,g=n.securityLevel===bE,w=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),y){const it=lh(te(r),l);m=te(it.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=te(r);Dd(m,e,f,`font-family: ${w}`,wE)}else{if(OE(document,e,f,l),y){const it=lh(te("body"),l);m=te(it.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=te("body");Dd(m,e,f)}let S,B;try{S=yield oh.fromText(t,{title:i.title})}catch(it){if(n.suppressErrorRendering)throw d(),it;S=yield oh.fromText("error"),B=it}const T=m.select(h).node(),L=S.type,z=T.firstChild,R=z.firstChild,$=(Z=(Q=S.renderer).getClasses)==null?void 0:Z.call(Q,t,S),A=EE(n,L,$,s),N=document.createElement("style");N.innerHTML=A,z.insertBefore(N,R);try{yield S.renderer.draw(t,e,wd.version,S)}catch(it){throw n.suppressErrorRendering?d():_L.draw(t,e,wd.version),it}const U=m.select(`${h} svg`),X=(nt=(rt=S.db).getAccTitle)==null?void 0:nt.call(rt),j=(et=(at=S.db).getAccDescription)==null?void 0:et.call(at);g3(L,U,X,j),m.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",kE);let P=m.select(h).node().innerHTML;if(ht.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),P=DE(P,y,ze(n.arrowMarkerAbsolute)),y){const it=m.select(h+" svg").node();P=FE(P,it)}else g||(P=Gn.sanitize(P,{ADD_TAGS:AE,ADD_ATTR:BE,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(hE(),B)throw B;return d(),{diagramType:L,svg:P,bindFunctions:S.db.bindFunctions}})},"render");function p3(e={}){var i;const t=je({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Q6(t),t!=null&&t.theme&&t.theme in ki?t.themeVariables=ki[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ki.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?K6(t):tp();ch(r.logLevel),Vl()}k(p3,"initialize");var m3=k((e,t={})=>{const{code:r}=mu(e);return oh.fromText(r,t)},"getDiagramFromText");function g3(e,t,r,i){c3(t,e),h3(t,r,i,t.attr("id"))}k(g3,"addA11yInfo");var bn=Object.freeze({render:RE,parse:d3,getDiagramFromText:m3,initialize:p3,getConfig:gr,setConfig:ep,getSiteConfig:tp,updateSiteConfig:J6,reset:k(()=>{Bo()},"reset"),globalReset:k(()=>{Bo(Xn)},"globalReset"),defaultConfig:Xn});ch(gr().logLevel);Bo(gr());var NE=k((e,t,r)=>{ht.warn(e),Kh(e)?(r&&r(e.str,e.hash),t.push(de(qt({},e),{message:e.str,error:e}))):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),y3=k(function(){return ct(this,arguments,function*(e={querySelector:".mermaid"}){try{yield zE(e)}catch(t){if(Kh(t)&&ht.error(t.str),vr.parseError&&vr.parseError(t),!e.suppressErrors)throw ht.error("Use the suppressErrors option to suppress these errors"),t}})},"run"),zE=k(function(){return ct(this,arguments,function*({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=bn.getConfig();ht.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");ht.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(ht.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),bn.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new ti.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let l;const o=[];for(const f of Array.from(n)){if(ht.info("Rendering diagram: "+f.id),f.getAttribute("data-processed"))continue;f.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;l=f.innerHTML,l=j2(ti.entityDecode(l)).trim().replace(//gi,"
    ");const d=ti.detectInit(l);d&&ht.debug("Detected early reinit: ",d);try{const{svg:m,bindFunctions:y}=yield k3(h,l,f);f.innerHTML=m,e&&(yield e(h)),y&&y(f)}catch(m){NE(m,o,vr.parseError)}}if(o.length>0)throw o[0]})},"runThrowsErrors"),b3=k(function(e){bn.initialize(e)},"initialize"),$E=k(function(e,t,r){return ct(this,null,function*(){ht.warn("mermaid.init is deprecated. Please use run instead."),e&&b3(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),yield y3(i)})},"init"),IE=k((r,...i)=>ct(void 0,[r,...i],function*(e,{lazyLoad:t=!0}={}){Vl(),Vd(...e),t===!1&&(yield lE())}),"registerExternalDiagrams"),x3=k(function(){if(vr.startOnLoad){const{startOnLoad:e}=bn.getConfig();e&&vr.run().catch(t=>ht.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document!="undefined"&&window.addEventListener("load",x3,!1);var PE=k(function(e){vr.parseError=e},"setParseErrorHandler"),yl=[],cc=!1,w3=k(()=>ct(void 0,null,function*(){if(!cc){for(cc=!0;yl.length>0;){const e=yl.shift();if(e)try{yield e()}catch(t){ht.error("Error executing queue",t)}}cc=!1}}),"executeQueue"),qE=k((e,t)=>ct(void 0,null,function*(){return new Promise((r,i)=>{const n=k(()=>new Promise((s,l)=>{bn.parse(e,t).then(o=>{s(o),r(o)},o=>{var f;ht.error("Error parsing",o),(f=vr.parseError)==null||f.call(vr,o),l(o),i(o)})}),"performCall");yl.push(n),w3().catch(i)})}),"parse"),k3=k((e,t,r)=>new Promise((i,n)=>{const s=k(()=>new Promise((l,o)=>{bn.render(e,t,r).then(f=>{l(f),i(f)},f=>{var h;ht.error("Error parsing",f),(h=vr.parseError)==null||h.call(vr,f),o(f),n(f)})}),"performCall");yl.push(s),w3().catch(n)}),"render"),vr={startOnLoad:!0,mermaidAPI:bn,parse:qE,render:k3,init:$E,run:y3,registerExternalDiagrams:IE,registerLayoutLoaders:B5,initialize:b3,parseError:void 0,contentLoaded:x3,setParseErrorHandler:PE,detectType:hh,registerIconPacks:ax},AD=vr;/*! Check if previously processed *//*! * Wait for document loaded before starting the execution */var v3={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(typeof self!="undefined"?self:Fd,function(){return function(){var r={};(function(){r.d=function(c,a){for(var u in a)r.o(a,u)&&!r.o(c,u)&&Object.defineProperty(c,u,{enumerable:!0,get:a[u]})}})(),function(){r.o=function(c,a){return Object.prototype.hasOwnProperty.call(c,a)}}();var i={};r.d(i,{default:function(){return Ly}});class n{constructor(a,u){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let p="KaTeX parse error: "+a,b,v;const _=u&&u.loc;if(_&&_.start<=_.end){const O=_.lexer.input;b=_.start,v=_.end,b===O.length?p+=" at end of input: ":p+=" at position "+(b+1)+": ";const q=O.slice(b,v).replace(/[^]/g,"$&̲");let Y;b>15?Y="…"+O.slice(b-15,b):Y=O.slice(0,b);let V;v+15":">","<":"<",'"':""","'":"'"},m=/[&><"']/g;function y(c){return String(c).replace(m,a=>d[a])}const g=function(c){return c.type==="ordgroup"||c.type==="color"?c.body.length===1?g(c.body[0]):c:c.type==="font"?g(c.body):c},w=function(c){const a=g(c);return a.type==="mathord"||a.type==="textord"||a.type==="atom"},S=function(c){if(!c)throw new Error("Expected non-null, but got "+String(c));return c};var T={contains:l,deflt:o,escape:y,hyphenate:h,getBaseElem:g,isCharacterBox:w,protocolFromUrl:function(c){const a=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(c);return a?a[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(a[1])?null:a[1].toLowerCase():"_relative"}};const L={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:c=>"#"+c},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(c,a)=>(a.push(c),a)},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:c=>Math.max(0,c),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:c=>Math.max(0,c),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:c=>Math.max(0,c),cli:"-e, --max-expand ",cliProcessor:c=>c==="Infinity"?1/0:parseInt(c)},globalGroup:{type:"boolean",cli:!1}};function z(c){if(c.default)return c.default;const a=c.type,u=Array.isArray(a)?a[0]:a;if(typeof u!="string")return u.enum[0];switch(u){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class R{constructor(a){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,a=a||{};for(const u in L)if(L.hasOwnProperty(u)){const p=L[u];this[u]=a[u]!==void 0?p.processor?p.processor(a[u]):a[u]:z(p)}}reportNonstrict(a,u,p){let b=this.strict;if(typeof b=="function"&&(b=b(a,u,p)),!(!b||b==="ignore")&&(b===!0||b==="error"))throw new s("LaTeX-incompatible input and strict mode is set to 'error': "+(u+" ["+a+"]"),p)}useStrictBehavior(a,u,p){let b=this.strict;if(typeof b=="function")try{b=b(a,u,p)}catch(v){b="error"}return!b||b==="ignore"?!1:b===!0||b==="error"}isTrusted(a){if(a.url&&!a.protocol){const p=T.protocolFromUrl(a.url);if(p==null)return!1;a.protocol=p}return!!(typeof this.trust=="function"?this.trust(a):this.trust)}}class ${constructor(a,u,p){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=a,this.size=u,this.cramped=p}sup(){return Z[rt[this.id]]}sub(){return Z[nt[this.id]]}fracNum(){return Z[at[this.id]]}fracDen(){return Z[et[this.id]]}cramp(){return Z[it[this.id]]}text(){return Z[ot[this.id]]}isTight(){return this.size>=2}}const A=0,N=1,U=2,X=3,j=4,P=5,lt=6,Q=7,Z=[new $(A,0,!1),new $(N,0,!0),new $(U,1,!1),new $(X,1,!0),new $(j,2,!1),new $(P,2,!0),new $(lt,3,!1),new $(Q,3,!0)],rt=[j,P,j,P,lt,Q,lt,Q],nt=[P,P,P,P,Q,Q,Q,Q],at=[U,X,j,P,lt,Q,lt,Q],et=[X,X,P,P,Q,Q,Q,Q],it=[N,N,X,X,P,P,Q,Q],ot=[A,N,U,X,U,X,U,X];var J={DISPLAY:Z[A],TEXT:Z[U],SCRIPT:Z[j],SCRIPTSCRIPT:Z[lt]};const xt=[{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 ft(c){for(let a=0;a=b[0]&&c<=b[1])return u.name}}return null}const wt=[];xt.forEach(c=>c.blocks.forEach(a=>wt.push(...a)));function st(c){for(let a=0;a=wt[a]&&c<=wt[a+1])return!0;return!1}const Nt=80,Ut=function(c,a){return"M95,"+(622+c+a)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+c/2.075+" -"+c+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+c)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+c)+" "+a+"h400000v"+(40+c)+"h-400000z"},Vt=function(c,a){return"M263,"+(601+c+a)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+c/2.084+" -"+c+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+c)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+c)+" "+a+"h400000v"+(40+c)+"h-400000z"},yt=function(c,a){return"M983 "+(10+c+a)+` l`+c/3.13+" -"+c+` c4,-6.7,10,-10,18,-10 H400000v`+(40+c)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+c)+" "+a+"h400000v"+(40+c)+"h-400000z"},_t=function(c,a){return"M424,"+(2398+c+a)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+c/4.223+" -"+c+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+c)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+c)+" "+a+` h400000v`+(40+c)+"h-400000z"},It=function(c,a){return"M473,"+(2713+c+a)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+c/5.298+" -"+c+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+c)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+c)+" "+a+"h400000v"+(40+c)+"H1017.7z"},dt=function(c){const a=c/2;return"M400000 "+c+" H0 L"+a+" 0 l65 45 L145 "+(c-80)+" H400000z"},ue=function(c,a,u){const p=u-54-a-c;return"M702 "+(c+a)+"H400000"+(40+c)+` H742v`+p+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+a+"H400000v"+(40+c)+"H742z"},Zt=function(c,a,u){a=1e3*a;let p="";switch(c){case"sqrtMain":p=Ut(a,Nt);break;case"sqrtSize1":p=Vt(a,Nt);break;case"sqrtSize2":p=yt(a,Nt);break;case"sqrtSize3":p=_t(a,Nt);break;case"sqrtSize4":p=It(a,Nt);break;case"sqrtTall":p=ue(a,Nt,u)}return p},Fe=function(c,a){switch(c){case"⎜":return"M291 0 H417 V"+a+" H291z M291 0 H417 V"+a+" H291z";case"∣":return"M145 0 H188 V"+a+" H145z M145 0 H188 V"+a+" H145z";case"∥":return"M145 0 H188 V"+a+" H145z M145 0 H188 V"+a+" H145z"+("M367 0 H410 V"+a+" H367z M367 0 H410 V"+a+" H367z");case"⎟":return"M457 0 H583 V"+a+" H457z M457 0 H583 V"+a+" H457z";case"⎢":return"M319 0 H403 V"+a+" H319z M319 0 H403 V"+a+" H319z";case"⎥":return"M263 0 H347 V"+a+" H263z M263 0 H347 V"+a+" H263z";case"⎪":return"M384 0 H504 V"+a+" H384z M384 0 H504 V"+a+" H384z";case"⏐":return"M312 0 H355 V"+a+" H312z M312 0 H355 V"+a+" H312z";case"‖":return"M257 0 H300 V"+a+" H257z M257 0 H300 V"+a+" H257z"+("M478 0 H521 V"+a+" H478z M478 0 H521 V"+a+" H478z");default:return""}},Le={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ye=function(c,a){switch(c){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+a+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+a+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+a+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+a+" v1759 h84z";case"vert":return"M145 15 v585 v"+a+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+a+" v585 h43z";case"doublevert":return"M145 15 v585 v"+a+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+a+` v585 h43z M367 15 v585 v`+a+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+a+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+a+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+a+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+a+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+a+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+a+` v602 h84z M403 1759 V0 H319 V1759 v`+a+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+a+` v602 h84z M347 1759 V0 h-84 V1759 v`+a+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, -36,557 l0,`+(a+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(a+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(a+9)+` c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(a+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class yr{constructor(a){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=a,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(a){return T.contains(this.classes,a)}toNode(){const a=document.createDocumentFragment();for(let u=0;uu.toText();return this.children.map(a).join("")}}var er={"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]}};const Ui={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ps={Å:"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 Xl(c,a){er[c]=a}function ji(c,a,u){if(!er[a])throw new Error("Font metrics not found for font: "+a+".");let p=c.charCodeAt(0),b=er[a][p];if(!b&&c[0]in ps&&(p=ps[c[0]].charCodeAt(0),b=er[a][p]),!b&&u==="text"&&st(p)&&(b=er[a][77]),b)return{depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]}}const ai={};function Li(c){let a;if(c>=5?a=0:c>=3?a=1:a=2,!ai[a]){const u=ai[a]={cssEmPerMu:Ui.quad[a]/18};for(const p in Ui)Ui.hasOwnProperty(p)&&(u[p]=Ui[p][a])}return ai[a]}const Ei=[[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]],ms=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],gs=function(c,a){return a.size<2?c:Ei[c-1][a.size-1]};class Sr{constructor(a){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=a.style,this.color=a.color,this.size=a.size||Sr.BASESIZE,this.textSize=a.textSize||this.size,this.phantom=!!a.phantom,this.font=a.font||"",this.fontFamily=a.fontFamily||"",this.fontWeight=a.fontWeight||"",this.fontShape=a.fontShape||"",this.sizeMultiplier=ms[this.size-1],this.maxSize=a.maxSize,this.minRuleThickness=a.minRuleThickness,this._fontMetrics=void 0}extend(a){const u={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(const p in a)a.hasOwnProperty(p)&&(u[p]=a[p]);return new Sr(u)}havingStyle(a){return this.style===a?this:this.extend({style:a,size:gs(this.textSize,a)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(a){return this.size===a&&this.textSize===a?this:this.extend({style:this.style.text(),size:a,textSize:a,sizeMultiplier:ms[a-1]})}havingBaseStyle(a){a=a||this.style.text();const u=gs(Sr.BASESIZE,a);return this.size===u&&this.textSize===Sr.BASESIZE&&this.style===a?this:this.extend({style:a,size:u})}havingBaseSizing(){let a;switch(this.style.id){case 4:case 5:a=3;break;case 6:case 7:a=1;break;default:a=6}return this.extend({style:this.style.text(),size:a})}withColor(a){return this.extend({color:a})}withPhantom(){return this.extend({phantom:!0})}withFont(a){return this.extend({font:a})}withTextFontFamily(a){return this.extend({fontFamily:a,font:""})}withTextFontWeight(a){return this.extend({fontWeight:a,font:""})}withTextFontShape(a){return this.extend({fontShape:a,font:""})}sizingClasses(a){return a.size!==this.size?["sizing","reset-size"+a.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Sr.BASESIZE?["sizing","reset-size"+this.size,"size"+Sr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Li(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Sr.BASESIZE=6;var ys=Sr;const Mn={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},An={ex:!0,em:!0,mu:!0},Yi=function(c){return typeof c!="string"&&(c=c.unit),c in Mn||c in An||c==="ex"},re=function(c,a){let u;if(c.unit in Mn)u=Mn[c.unit]/a.fontMetrics().ptPerEm/a.sizeMultiplier;else if(c.unit==="mu")u=a.fontMetrics().cssEmPerMu;else{let p;if(a.style.isTight()?p=a.havingStyle(a.style.text()):p=a,c.unit==="ex")u=p.fontMetrics().xHeight;else if(c.unit==="em")u=p.fontMetrics().quad;else throw new s("Invalid unit: '"+c.unit+"'");p!==a&&(u*=p.sizeMultiplier/a.sizeMultiplier)}return Math.min(c.number*u,a.maxSize)},bt=function(c){return+c.toFixed(4)+"em"},_r=function(c){return c.filter(a=>a).join(" ")},Bn=function(c,a,u){if(this.classes=c||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=u||{},a){a.style.isTight()&&this.classes.push("mtight");const p=a.getColor();p&&(this.style.color=p)}},Aa=function(c){const a=document.createElement(c);a.className=_r(this.classes);for(const u in this.style)this.style.hasOwnProperty(u)&&(a.style[u]=this.style[u]);for(const u in this.attributes)this.attributes.hasOwnProperty(u)&&a.setAttribute(u,this.attributes[u]);for(let u=0;u/=\x00-\x1f]/,Gi=function(c){let a="<"+c;this.classes.length&&(a+=' class="'+T.escape(_r(this.classes))+'"');let u="";for(const p in this.style)this.style.hasOwnProperty(p)&&(u+=T.hyphenate(p)+":"+this.style[p]+";");u&&(a+=' style="'+T.escape(u)+'"');for(const p in this.attributes)if(this.attributes.hasOwnProperty(p)){if(Ln.test(p))throw new s("Invalid attribute name '"+p+"'");a+=" "+p+'="'+T.escape(this.attributes[p])+'"'}a+=">";for(let p=0;p",a};class Vi{constructor(a,u,p,b){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,Bn.call(this,a,p,b),this.children=u||[]}setAttribute(a,u){this.attributes[a]=u}hasClass(a){return T.contains(this.classes,a)}toNode(){return Aa.call(this,"span")}toMarkup(){return Gi.call(this,"span")}}class oi{constructor(a,u,p,b){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,Bn.call(this,u,b),this.children=p||[],this.setAttribute("href",a)}setAttribute(a,u){this.attributes[a]=u}hasClass(a){return T.contains(this.classes,a)}toNode(){return Aa.call(this,"a")}toMarkup(){return Gi.call(this,"a")}}class Zl{constructor(a,u,p){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=u,this.src=a,this.classes=["mord"],this.style=p}hasClass(a){return T.contains(this.classes,a)}toNode(){const a=document.createElement("img");a.src=this.src,a.alt=this.alt,a.className="mord";for(const u in this.style)this.style.hasOwnProperty(u)&&(a.style[u]=this.style[u]);return a}toMarkup(){let a=''+T.escape(this.alt)+'0&&(u=document.createElement("span"),u.style.marginRight=bt(this.italic)),this.classes.length>0&&(u=u||document.createElement("span"),u.className=_r(this.classes));for(const p in this.style)this.style.hasOwnProperty(p)&&(u=u||document.createElement("span"),u.style[p]=this.style[p]);return u?(u.appendChild(a),u):a}toMarkup(){let a=!1,u="0&&(p+="margin-right:"+this.italic+"em;");for(const v in this.style)this.style.hasOwnProperty(v)&&(p+=T.hyphenate(v)+":"+this.style[v]+";");p&&(a=!0,u+=' style="'+T.escape(p)+'"');const b=T.escape(this.text);return a?(u+=">",u+=b,u+="",u):b}}class Ge{constructor(a,u){this.children=void 0,this.attributes=void 0,this.children=a||[],this.attributes=u||{}}toNode(){const a="http://www.w3.org/2000/svg",u=document.createElementNS(a,"svg");for(const p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&u.setAttribute(p,this.attributes[p]);for(let p=0;p':''}}class En{constructor(a){this.attributes=void 0,this.attributes=a||{}}toNode(){const a="http://www.w3.org/2000/svg",u=document.createElementNS(a,"line");for(const p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&u.setAttribute(p,this.attributes[p]);return u}toMarkup(){let a=" but got "+String(c)+".")}const La={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ql={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},rr={math:{},text:{}};var be=rr;function x(c,a,u,p,b,v){rr[c][b]={font:a,group:u,replace:p},v&&p&&(rr[c][p]=rr[c][b])}const C="math",ut="text",M="main",I="ams",me="accent-token",St="bin",Ie="close",li="inner",$t="mathord",vt="op-token",W="open",gt="punct",F="rel",Qt="spacing",H="textord";x(C,M,F,"≡","\\equiv",!0),x(C,M,F,"≺","\\prec",!0),x(C,M,F,"≻","\\succ",!0),x(C,M,F,"∼","\\sim",!0),x(C,M,F,"⊥","\\perp"),x(C,M,F,"⪯","\\preceq",!0),x(C,M,F,"⪰","\\succeq",!0),x(C,M,F,"≃","\\simeq",!0),x(C,M,F,"∣","\\mid",!0),x(C,M,F,"≪","\\ll",!0),x(C,M,F,"≫","\\gg",!0),x(C,M,F,"≍","\\asymp",!0),x(C,M,F,"∥","\\parallel"),x(C,M,F,"⋈","\\bowtie",!0),x(C,M,F,"⌣","\\smile",!0),x(C,M,F,"⊑","\\sqsubseteq",!0),x(C,M,F,"⊒","\\sqsupseteq",!0),x(C,M,F,"≐","\\doteq",!0),x(C,M,F,"⌢","\\frown",!0),x(C,M,F,"∋","\\ni",!0),x(C,M,F,"∝","\\propto",!0),x(C,M,F,"⊢","\\vdash",!0),x(C,M,F,"⊣","\\dashv",!0),x(C,M,F,"∋","\\owns"),x(C,M,gt,".","\\ldotp"),x(C,M,gt,"⋅","\\cdotp"),x(C,M,H,"#","\\#"),x(ut,M,H,"#","\\#"),x(C,M,H,"&","\\&"),x(ut,M,H,"&","\\&"),x(C,M,H,"ℵ","\\aleph",!0),x(C,M,H,"∀","\\forall",!0),x(C,M,H,"ℏ","\\hbar",!0),x(C,M,H,"∃","\\exists",!0),x(C,M,H,"∇","\\nabla",!0),x(C,M,H,"♭","\\flat",!0),x(C,M,H,"ℓ","\\ell",!0),x(C,M,H,"♮","\\natural",!0),x(C,M,H,"♣","\\clubsuit",!0),x(C,M,H,"℘","\\wp",!0),x(C,M,H,"♯","\\sharp",!0),x(C,M,H,"♢","\\diamondsuit",!0),x(C,M,H,"ℜ","\\Re",!0),x(C,M,H,"♡","\\heartsuit",!0),x(C,M,H,"ℑ","\\Im",!0),x(C,M,H,"♠","\\spadesuit",!0),x(C,M,H,"§","\\S",!0),x(ut,M,H,"§","\\S"),x(C,M,H,"¶","\\P",!0),x(ut,M,H,"¶","\\P"),x(C,M,H,"†","\\dag"),x(ut,M,H,"†","\\dag"),x(ut,M,H,"†","\\textdagger"),x(C,M,H,"‡","\\ddag"),x(ut,M,H,"‡","\\ddag"),x(ut,M,H,"‡","\\textdaggerdbl"),x(C,M,Ie,"⎱","\\rmoustache",!0),x(C,M,W,"⎰","\\lmoustache",!0),x(C,M,Ie,"⟯","\\rgroup",!0),x(C,M,W,"⟮","\\lgroup",!0),x(C,M,St,"∓","\\mp",!0),x(C,M,St,"⊖","\\ominus",!0),x(C,M,St,"⊎","\\uplus",!0),x(C,M,St,"⊓","\\sqcap",!0),x(C,M,St,"∗","\\ast"),x(C,M,St,"⊔","\\sqcup",!0),x(C,M,St,"◯","\\bigcirc",!0),x(C,M,St,"∙","\\bullet",!0),x(C,M,St,"‡","\\ddagger"),x(C,M,St,"≀","\\wr",!0),x(C,M,St,"⨿","\\amalg"),x(C,M,St,"&","\\And"),x(C,M,F,"⟵","\\longleftarrow",!0),x(C,M,F,"⇐","\\Leftarrow",!0),x(C,M,F,"⟸","\\Longleftarrow",!0),x(C,M,F,"⟶","\\longrightarrow",!0),x(C,M,F,"⇒","\\Rightarrow",!0),x(C,M,F,"⟹","\\Longrightarrow",!0),x(C,M,F,"↔","\\leftrightarrow",!0),x(C,M,F,"⟷","\\longleftrightarrow",!0),x(C,M,F,"⇔","\\Leftrightarrow",!0),x(C,M,F,"⟺","\\Longleftrightarrow",!0),x(C,M,F,"↦","\\mapsto",!0),x(C,M,F,"⟼","\\longmapsto",!0),x(C,M,F,"↗","\\nearrow",!0),x(C,M,F,"↩","\\hookleftarrow",!0),x(C,M,F,"↪","\\hookrightarrow",!0),x(C,M,F,"↘","\\searrow",!0),x(C,M,F,"↼","\\leftharpoonup",!0),x(C,M,F,"⇀","\\rightharpoonup",!0),x(C,M,F,"↙","\\swarrow",!0),x(C,M,F,"↽","\\leftharpoondown",!0),x(C,M,F,"⇁","\\rightharpoondown",!0),x(C,M,F,"↖","\\nwarrow",!0),x(C,M,F,"⇌","\\rightleftharpoons",!0),x(C,I,F,"≮","\\nless",!0),x(C,I,F,"","\\@nleqslant"),x(C,I,F,"","\\@nleqq"),x(C,I,F,"⪇","\\lneq",!0),x(C,I,F,"≨","\\lneqq",!0),x(C,I,F,"","\\@lvertneqq"),x(C,I,F,"⋦","\\lnsim",!0),x(C,I,F,"⪉","\\lnapprox",!0),x(C,I,F,"⊀","\\nprec",!0),x(C,I,F,"⋠","\\npreceq",!0),x(C,I,F,"⋨","\\precnsim",!0),x(C,I,F,"⪹","\\precnapprox",!0),x(C,I,F,"≁","\\nsim",!0),x(C,I,F,"","\\@nshortmid"),x(C,I,F,"∤","\\nmid",!0),x(C,I,F,"⊬","\\nvdash",!0),x(C,I,F,"⊭","\\nvDash",!0),x(C,I,F,"⋪","\\ntriangleleft"),x(C,I,F,"⋬","\\ntrianglelefteq",!0),x(C,I,F,"⊊","\\subsetneq",!0),x(C,I,F,"","\\@varsubsetneq"),x(C,I,F,"⫋","\\subsetneqq",!0),x(C,I,F,"","\\@varsubsetneqq"),x(C,I,F,"≯","\\ngtr",!0),x(C,I,F,"","\\@ngeqslant"),x(C,I,F,"","\\@ngeqq"),x(C,I,F,"⪈","\\gneq",!0),x(C,I,F,"≩","\\gneqq",!0),x(C,I,F,"","\\@gvertneqq"),x(C,I,F,"⋧","\\gnsim",!0),x(C,I,F,"⪊","\\gnapprox",!0),x(C,I,F,"⊁","\\nsucc",!0),x(C,I,F,"⋡","\\nsucceq",!0),x(C,I,F,"⋩","\\succnsim",!0),x(C,I,F,"⪺","\\succnapprox",!0),x(C,I,F,"≆","\\ncong",!0),x(C,I,F,"","\\@nshortparallel"),x(C,I,F,"∦","\\nparallel",!0),x(C,I,F,"⊯","\\nVDash",!0),x(C,I,F,"⋫","\\ntriangleright"),x(C,I,F,"⋭","\\ntrianglerighteq",!0),x(C,I,F,"","\\@nsupseteqq"),x(C,I,F,"⊋","\\supsetneq",!0),x(C,I,F,"","\\@varsupsetneq"),x(C,I,F,"⫌","\\supsetneqq",!0),x(C,I,F,"","\\@varsupsetneqq"),x(C,I,F,"⊮","\\nVdash",!0),x(C,I,F,"⪵","\\precneqq",!0),x(C,I,F,"⪶","\\succneqq",!0),x(C,I,F,"","\\@nsubseteqq"),x(C,I,St,"⊴","\\unlhd"),x(C,I,St,"⊵","\\unrhd"),x(C,I,F,"↚","\\nleftarrow",!0),x(C,I,F,"↛","\\nrightarrow",!0),x(C,I,F,"⇍","\\nLeftarrow",!0),x(C,I,F,"⇏","\\nRightarrow",!0),x(C,I,F,"↮","\\nleftrightarrow",!0),x(C,I,F,"⇎","\\nLeftrightarrow",!0),x(C,I,F,"△","\\vartriangle"),x(C,I,H,"ℏ","\\hslash"),x(C,I,H,"▽","\\triangledown"),x(C,I,H,"◊","\\lozenge"),x(C,I,H,"Ⓢ","\\circledS"),x(C,I,H,"®","\\circledR"),x(ut,I,H,"®","\\circledR"),x(C,I,H,"∡","\\measuredangle",!0),x(C,I,H,"∄","\\nexists"),x(C,I,H,"℧","\\mho"),x(C,I,H,"Ⅎ","\\Finv",!0),x(C,I,H,"⅁","\\Game",!0),x(C,I,H,"‵","\\backprime"),x(C,I,H,"▲","\\blacktriangle"),x(C,I,H,"▼","\\blacktriangledown"),x(C,I,H,"■","\\blacksquare"),x(C,I,H,"⧫","\\blacklozenge"),x(C,I,H,"★","\\bigstar"),x(C,I,H,"∢","\\sphericalangle",!0),x(C,I,H,"∁","\\complement",!0),x(C,I,H,"ð","\\eth",!0),x(ut,M,H,"ð","ð"),x(C,I,H,"╱","\\diagup"),x(C,I,H,"╲","\\diagdown"),x(C,I,H,"□","\\square"),x(C,I,H,"□","\\Box"),x(C,I,H,"◊","\\Diamond"),x(C,I,H,"¥","\\yen",!0),x(ut,I,H,"¥","\\yen",!0),x(C,I,H,"✓","\\checkmark",!0),x(ut,I,H,"✓","\\checkmark"),x(C,I,H,"ℶ","\\beth",!0),x(C,I,H,"ℸ","\\daleth",!0),x(C,I,H,"ℷ","\\gimel",!0),x(C,I,H,"ϝ","\\digamma",!0),x(C,I,H,"ϰ","\\varkappa"),x(C,I,W,"┌","\\@ulcorner",!0),x(C,I,Ie,"┐","\\@urcorner",!0),x(C,I,W,"└","\\@llcorner",!0),x(C,I,Ie,"┘","\\@lrcorner",!0),x(C,I,F,"≦","\\leqq",!0),x(C,I,F,"⩽","\\leqslant",!0),x(C,I,F,"⪕","\\eqslantless",!0),x(C,I,F,"≲","\\lesssim",!0),x(C,I,F,"⪅","\\lessapprox",!0),x(C,I,F,"≊","\\approxeq",!0),x(C,I,St,"⋖","\\lessdot"),x(C,I,F,"⋘","\\lll",!0),x(C,I,F,"≶","\\lessgtr",!0),x(C,I,F,"⋚","\\lesseqgtr",!0),x(C,I,F,"⪋","\\lesseqqgtr",!0),x(C,I,F,"≑","\\doteqdot"),x(C,I,F,"≓","\\risingdotseq",!0),x(C,I,F,"≒","\\fallingdotseq",!0),x(C,I,F,"∽","\\backsim",!0),x(C,I,F,"⋍","\\backsimeq",!0),x(C,I,F,"⫅","\\subseteqq",!0),x(C,I,F,"⋐","\\Subset",!0),x(C,I,F,"⊏","\\sqsubset",!0),x(C,I,F,"≼","\\preccurlyeq",!0),x(C,I,F,"⋞","\\curlyeqprec",!0),x(C,I,F,"≾","\\precsim",!0),x(C,I,F,"⪷","\\precapprox",!0),x(C,I,F,"⊲","\\vartriangleleft"),x(C,I,F,"⊴","\\trianglelefteq"),x(C,I,F,"⊨","\\vDash",!0),x(C,I,F,"⊪","\\Vvdash",!0),x(C,I,F,"⌣","\\smallsmile"),x(C,I,F,"⌢","\\smallfrown"),x(C,I,F,"≏","\\bumpeq",!0),x(C,I,F,"≎","\\Bumpeq",!0),x(C,I,F,"≧","\\geqq",!0),x(C,I,F,"⩾","\\geqslant",!0),x(C,I,F,"⪖","\\eqslantgtr",!0),x(C,I,F,"≳","\\gtrsim",!0),x(C,I,F,"⪆","\\gtrapprox",!0),x(C,I,St,"⋗","\\gtrdot"),x(C,I,F,"⋙","\\ggg",!0),x(C,I,F,"≷","\\gtrless",!0),x(C,I,F,"⋛","\\gtreqless",!0),x(C,I,F,"⪌","\\gtreqqless",!0),x(C,I,F,"≖","\\eqcirc",!0),x(C,I,F,"≗","\\circeq",!0),x(C,I,F,"≜","\\triangleq",!0),x(C,I,F,"∼","\\thicksim"),x(C,I,F,"≈","\\thickapprox"),x(C,I,F,"⫆","\\supseteqq",!0),x(C,I,F,"⋑","\\Supset",!0),x(C,I,F,"⊐","\\sqsupset",!0),x(C,I,F,"≽","\\succcurlyeq",!0),x(C,I,F,"⋟","\\curlyeqsucc",!0),x(C,I,F,"≿","\\succsim",!0),x(C,I,F,"⪸","\\succapprox",!0),x(C,I,F,"⊳","\\vartriangleright"),x(C,I,F,"⊵","\\trianglerighteq"),x(C,I,F,"⊩","\\Vdash",!0),x(C,I,F,"∣","\\shortmid"),x(C,I,F,"∥","\\shortparallel"),x(C,I,F,"≬","\\between",!0),x(C,I,F,"⋔","\\pitchfork",!0),x(C,I,F,"∝","\\varpropto"),x(C,I,F,"◀","\\blacktriangleleft"),x(C,I,F,"∴","\\therefore",!0),x(C,I,F,"∍","\\backepsilon"),x(C,I,F,"▶","\\blacktriangleright"),x(C,I,F,"∵","\\because",!0),x(C,I,F,"⋘","\\llless"),x(C,I,F,"⋙","\\gggtr"),x(C,I,St,"⊲","\\lhd"),x(C,I,St,"⊳","\\rhd"),x(C,I,F,"≂","\\eqsim",!0),x(C,M,F,"⋈","\\Join"),x(C,I,F,"≑","\\Doteq",!0),x(C,I,St,"∔","\\dotplus",!0),x(C,I,St,"∖","\\smallsetminus"),x(C,I,St,"⋒","\\Cap",!0),x(C,I,St,"⋓","\\Cup",!0),x(C,I,St,"⩞","\\doublebarwedge",!0),x(C,I,St,"⊟","\\boxminus",!0),x(C,I,St,"⊞","\\boxplus",!0),x(C,I,St,"⋇","\\divideontimes",!0),x(C,I,St,"⋉","\\ltimes",!0),x(C,I,St,"⋊","\\rtimes",!0),x(C,I,St,"⋋","\\leftthreetimes",!0),x(C,I,St,"⋌","\\rightthreetimes",!0),x(C,I,St,"⋏","\\curlywedge",!0),x(C,I,St,"⋎","\\curlyvee",!0),x(C,I,St,"⊝","\\circleddash",!0),x(C,I,St,"⊛","\\circledast",!0),x(C,I,St,"⋅","\\centerdot"),x(C,I,St,"⊺","\\intercal",!0),x(C,I,St,"⋒","\\doublecap"),x(C,I,St,"⋓","\\doublecup"),x(C,I,St,"⊠","\\boxtimes",!0),x(C,I,F,"⇢","\\dashrightarrow",!0),x(C,I,F,"⇠","\\dashleftarrow",!0),x(C,I,F,"⇇","\\leftleftarrows",!0),x(C,I,F,"⇆","\\leftrightarrows",!0),x(C,I,F,"⇚","\\Lleftarrow",!0),x(C,I,F,"↞","\\twoheadleftarrow",!0),x(C,I,F,"↢","\\leftarrowtail",!0),x(C,I,F,"↫","\\looparrowleft",!0),x(C,I,F,"⇋","\\leftrightharpoons",!0),x(C,I,F,"↶","\\curvearrowleft",!0),x(C,I,F,"↺","\\circlearrowleft",!0),x(C,I,F,"↰","\\Lsh",!0),x(C,I,F,"⇈","\\upuparrows",!0),x(C,I,F,"↿","\\upharpoonleft",!0),x(C,I,F,"⇃","\\downharpoonleft",!0),x(C,M,F,"⊶","\\origof",!0),x(C,M,F,"⊷","\\imageof",!0),x(C,I,F,"⊸","\\multimap",!0),x(C,I,F,"↭","\\leftrightsquigarrow",!0),x(C,I,F,"⇉","\\rightrightarrows",!0),x(C,I,F,"⇄","\\rightleftarrows",!0),x(C,I,F,"↠","\\twoheadrightarrow",!0),x(C,I,F,"↣","\\rightarrowtail",!0),x(C,I,F,"↬","\\looparrowright",!0),x(C,I,F,"↷","\\curvearrowright",!0),x(C,I,F,"↻","\\circlearrowright",!0),x(C,I,F,"↱","\\Rsh",!0),x(C,I,F,"⇊","\\downdownarrows",!0),x(C,I,F,"↾","\\upharpoonright",!0),x(C,I,F,"⇂","\\downharpoonright",!0),x(C,I,F,"⇝","\\rightsquigarrow",!0),x(C,I,F,"⇝","\\leadsto"),x(C,I,F,"⇛","\\Rrightarrow",!0),x(C,I,F,"↾","\\restriction"),x(C,M,H,"‘","`"),x(C,M,H,"$","\\$"),x(ut,M,H,"$","\\$"),x(ut,M,H,"$","\\textdollar"),x(C,M,H,"%","\\%"),x(ut,M,H,"%","\\%"),x(C,M,H,"_","\\_"),x(ut,M,H,"_","\\_"),x(ut,M,H,"_","\\textunderscore"),x(C,M,H,"∠","\\angle",!0),x(C,M,H,"∞","\\infty",!0),x(C,M,H,"′","\\prime"),x(C,M,H,"△","\\triangle"),x(C,M,H,"Γ","\\Gamma",!0),x(C,M,H,"Δ","\\Delta",!0),x(C,M,H,"Θ","\\Theta",!0),x(C,M,H,"Λ","\\Lambda",!0),x(C,M,H,"Ξ","\\Xi",!0),x(C,M,H,"Π","\\Pi",!0),x(C,M,H,"Σ","\\Sigma",!0),x(C,M,H,"Υ","\\Upsilon",!0),x(C,M,H,"Φ","\\Phi",!0),x(C,M,H,"Ψ","\\Psi",!0),x(C,M,H,"Ω","\\Omega",!0),x(C,M,H,"A","Α"),x(C,M,H,"B","Β"),x(C,M,H,"E","Ε"),x(C,M,H,"Z","Ζ"),x(C,M,H,"H","Η"),x(C,M,H,"I","Ι"),x(C,M,H,"K","Κ"),x(C,M,H,"M","Μ"),x(C,M,H,"N","Ν"),x(C,M,H,"O","Ο"),x(C,M,H,"P","Ρ"),x(C,M,H,"T","Τ"),x(C,M,H,"X","Χ"),x(C,M,H,"¬","\\neg",!0),x(C,M,H,"¬","\\lnot"),x(C,M,H,"⊤","\\top"),x(C,M,H,"⊥","\\bot"),x(C,M,H,"∅","\\emptyset"),x(C,I,H,"∅","\\varnothing"),x(C,M,$t,"α","\\alpha",!0),x(C,M,$t,"β","\\beta",!0),x(C,M,$t,"γ","\\gamma",!0),x(C,M,$t,"δ","\\delta",!0),x(C,M,$t,"ϵ","\\epsilon",!0),x(C,M,$t,"ζ","\\zeta",!0),x(C,M,$t,"η","\\eta",!0),x(C,M,$t,"θ","\\theta",!0),x(C,M,$t,"ι","\\iota",!0),x(C,M,$t,"κ","\\kappa",!0),x(C,M,$t,"λ","\\lambda",!0),x(C,M,$t,"μ","\\mu",!0),x(C,M,$t,"ν","\\nu",!0),x(C,M,$t,"ξ","\\xi",!0),x(C,M,$t,"ο","\\omicron",!0),x(C,M,$t,"π","\\pi",!0),x(C,M,$t,"ρ","\\rho",!0),x(C,M,$t,"σ","\\sigma",!0),x(C,M,$t,"τ","\\tau",!0),x(C,M,$t,"υ","\\upsilon",!0),x(C,M,$t,"ϕ","\\phi",!0),x(C,M,$t,"χ","\\chi",!0),x(C,M,$t,"ψ","\\psi",!0),x(C,M,$t,"ω","\\omega",!0),x(C,M,$t,"ε","\\varepsilon",!0),x(C,M,$t,"ϑ","\\vartheta",!0),x(C,M,$t,"ϖ","\\varpi",!0),x(C,M,$t,"ϱ","\\varrho",!0),x(C,M,$t,"ς","\\varsigma",!0),x(C,M,$t,"φ","\\varphi",!0),x(C,M,St,"∗","*",!0),x(C,M,St,"+","+"),x(C,M,St,"−","-",!0),x(C,M,St,"⋅","\\cdot",!0),x(C,M,St,"∘","\\circ",!0),x(C,M,St,"÷","\\div",!0),x(C,M,St,"±","\\pm",!0),x(C,M,St,"×","\\times",!0),x(C,M,St,"∩","\\cap",!0),x(C,M,St,"∪","\\cup",!0),x(C,M,St,"∖","\\setminus",!0),x(C,M,St,"∧","\\land"),x(C,M,St,"∨","\\lor"),x(C,M,St,"∧","\\wedge",!0),x(C,M,St,"∨","\\vee",!0),x(C,M,H,"√","\\surd"),x(C,M,W,"⟨","\\langle",!0),x(C,M,W,"∣","\\lvert"),x(C,M,W,"∥","\\lVert"),x(C,M,Ie,"?","?"),x(C,M,Ie,"!","!"),x(C,M,Ie,"⟩","\\rangle",!0),x(C,M,Ie,"∣","\\rvert"),x(C,M,Ie,"∥","\\rVert"),x(C,M,F,"=","="),x(C,M,F,":",":"),x(C,M,F,"≈","\\approx",!0),x(C,M,F,"≅","\\cong",!0),x(C,M,F,"≥","\\ge"),x(C,M,F,"≥","\\geq",!0),x(C,M,F,"←","\\gets"),x(C,M,F,">","\\gt",!0),x(C,M,F,"∈","\\in",!0),x(C,M,F,"","\\@not"),x(C,M,F,"⊂","\\subset",!0),x(C,M,F,"⊃","\\supset",!0),x(C,M,F,"⊆","\\subseteq",!0),x(C,M,F,"⊇","\\supseteq",!0),x(C,I,F,"⊈","\\nsubseteq",!0),x(C,I,F,"⊉","\\nsupseteq",!0),x(C,M,F,"⊨","\\models"),x(C,M,F,"←","\\leftarrow",!0),x(C,M,F,"≤","\\le"),x(C,M,F,"≤","\\leq",!0),x(C,M,F,"<","\\lt",!0),x(C,M,F,"→","\\rightarrow",!0),x(C,M,F,"→","\\to"),x(C,I,F,"≱","\\ngeq",!0),x(C,I,F,"≰","\\nleq",!0),x(C,M,Qt," ","\\ "),x(C,M,Qt," ","\\space"),x(C,M,Qt," ","\\nobreakspace"),x(ut,M,Qt," ","\\ "),x(ut,M,Qt," "," "),x(ut,M,Qt," ","\\space"),x(ut,M,Qt," ","\\nobreakspace"),x(C,M,Qt,null,"\\nobreak"),x(C,M,Qt,null,"\\allowbreak"),x(C,M,gt,",",","),x(C,M,gt,";",";"),x(C,I,St,"⊼","\\barwedge",!0),x(C,I,St,"⊻","\\veebar",!0),x(C,M,St,"⊙","\\odot",!0),x(C,M,St,"⊕","\\oplus",!0),x(C,M,St,"⊗","\\otimes",!0),x(C,M,H,"∂","\\partial",!0),x(C,M,St,"⊘","\\oslash",!0),x(C,I,St,"⊚","\\circledcirc",!0),x(C,I,St,"⊡","\\boxdot",!0),x(C,M,St,"△","\\bigtriangleup"),x(C,M,St,"▽","\\bigtriangledown"),x(C,M,St,"†","\\dagger"),x(C,M,St,"⋄","\\diamond"),x(C,M,St,"⋆","\\star"),x(C,M,St,"◃","\\triangleleft"),x(C,M,St,"▹","\\triangleright"),x(C,M,W,"{","\\{"),x(ut,M,H,"{","\\{"),x(ut,M,H,"{","\\textbraceleft"),x(C,M,Ie,"}","\\}"),x(ut,M,H,"}","\\}"),x(ut,M,H,"}","\\textbraceright"),x(C,M,W,"{","\\lbrace"),x(C,M,Ie,"}","\\rbrace"),x(C,M,W,"[","\\lbrack",!0),x(ut,M,H,"[","\\lbrack",!0),x(C,M,Ie,"]","\\rbrack",!0),x(ut,M,H,"]","\\rbrack",!0),x(C,M,W,"(","\\lparen",!0),x(C,M,Ie,")","\\rparen",!0),x(ut,M,H,"<","\\textless",!0),x(ut,M,H,">","\\textgreater",!0),x(C,M,W,"⌊","\\lfloor",!0),x(C,M,Ie,"⌋","\\rfloor",!0),x(C,M,W,"⌈","\\lceil",!0),x(C,M,Ie,"⌉","\\rceil",!0),x(C,M,H,"\\","\\backslash"),x(C,M,H,"∣","|"),x(C,M,H,"∣","\\vert"),x(ut,M,H,"|","\\textbar",!0),x(C,M,H,"∥","\\|"),x(C,M,H,"∥","\\Vert"),x(ut,M,H,"∥","\\textbardbl"),x(ut,M,H,"~","\\textasciitilde"),x(ut,M,H,"\\","\\textbackslash"),x(ut,M,H,"^","\\textasciicircum"),x(C,M,F,"↑","\\uparrow",!0),x(C,M,F,"⇑","\\Uparrow",!0),x(C,M,F,"↓","\\downarrow",!0),x(C,M,F,"⇓","\\Downarrow",!0),x(C,M,F,"↕","\\updownarrow",!0),x(C,M,F,"⇕","\\Updownarrow",!0),x(C,M,vt,"∐","\\coprod"),x(C,M,vt,"⋁","\\bigvee"),x(C,M,vt,"⋀","\\bigwedge"),x(C,M,vt,"⨄","\\biguplus"),x(C,M,vt,"⋂","\\bigcap"),x(C,M,vt,"⋃","\\bigcup"),x(C,M,vt,"∫","\\int"),x(C,M,vt,"∫","\\intop"),x(C,M,vt,"∬","\\iint"),x(C,M,vt,"∭","\\iiint"),x(C,M,vt,"∏","\\prod"),x(C,M,vt,"∑","\\sum"),x(C,M,vt,"⨂","\\bigotimes"),x(C,M,vt,"⨁","\\bigoplus"),x(C,M,vt,"⨀","\\bigodot"),x(C,M,vt,"∮","\\oint"),x(C,M,vt,"∯","\\oiint"),x(C,M,vt,"∰","\\oiiint"),x(C,M,vt,"⨆","\\bigsqcup"),x(C,M,vt,"∫","\\smallint"),x(ut,M,li,"…","\\textellipsis"),x(C,M,li,"…","\\mathellipsis"),x(ut,M,li,"…","\\ldots",!0),x(C,M,li,"…","\\ldots",!0),x(C,M,li,"⋯","\\@cdots",!0),x(C,M,li,"⋱","\\ddots",!0),x(C,M,H,"⋮","\\varvdots"),x(ut,M,H,"⋮","\\varvdots"),x(C,M,me,"ˊ","\\acute"),x(C,M,me,"ˋ","\\grave"),x(C,M,me,"¨","\\ddot"),x(C,M,me,"~","\\tilde"),x(C,M,me,"ˉ","\\bar"),x(C,M,me,"˘","\\breve"),x(C,M,me,"ˇ","\\check"),x(C,M,me,"^","\\hat"),x(C,M,me,"⃗","\\vec"),x(C,M,me,"˙","\\dot"),x(C,M,me,"˚","\\mathring"),x(C,M,$t,"","\\@imath"),x(C,M,$t,"","\\@jmath"),x(C,M,H,"ı","ı"),x(C,M,H,"ȷ","ȷ"),x(ut,M,H,"ı","\\i",!0),x(ut,M,H,"ȷ","\\j",!0),x(ut,M,H,"ß","\\ss",!0),x(ut,M,H,"æ","\\ae",!0),x(ut,M,H,"œ","\\oe",!0),x(ut,M,H,"ø","\\o",!0),x(ut,M,H,"Æ","\\AE",!0),x(ut,M,H,"Œ","\\OE",!0),x(ut,M,H,"Ø","\\O",!0),x(ut,M,me,"ˊ","\\'"),x(ut,M,me,"ˋ","\\`"),x(ut,M,me,"ˆ","\\^"),x(ut,M,me,"˜","\\~"),x(ut,M,me,"ˉ","\\="),x(ut,M,me,"˘","\\u"),x(ut,M,me,"˙","\\."),x(ut,M,me,"¸","\\c"),x(ut,M,me,"˚","\\r"),x(ut,M,me,"ˇ","\\v"),x(ut,M,me,"¨",'\\"'),x(ut,M,me,"˝","\\H"),x(ut,M,me,"◯","\\textcircled");const Ee={"--":!0,"---":!0,"``":!0,"''":!0};x(ut,M,H,"–","--",!0),x(ut,M,H,"–","\\textendash"),x(ut,M,H,"—","---",!0),x(ut,M,H,"—","\\textemdash"),x(ut,M,H,"‘","`",!0),x(ut,M,H,"‘","\\textquoteleft"),x(ut,M,H,"’","'",!0),x(ut,M,H,"’","\\textquoteright"),x(ut,M,H,"“","``",!0),x(ut,M,H,"“","\\textquotedblleft"),x(ut,M,H,"”","''",!0),x(ut,M,H,"”","\\textquotedblright"),x(C,M,H,"°","\\degree",!0),x(ut,M,H,"°","\\degree"),x(ut,M,H,"°","\\textdegree",!0),x(C,M,H,"£","\\pounds"),x(C,M,H,"£","\\mathsterling",!0),x(ut,M,H,"£","\\pounds"),x(ut,M,H,"£","\\textsterling",!0),x(C,I,H,"✠","\\maltese"),x(ut,I,H,"✠","\\maltese");const He='0123456789/@."';for(let c=0;c0)return Nr(b,O,p,a,v.concat(q));if(E){let Y,V;if(E==="boldsymbol"){const tt=T3(b,p,a,v,u);Y=tt.fontName,V=[tt.fontClass]}else _?(Y=wu[E].fontName,V=[E]):(Y=Da(E,a.fontWeight,a.fontShape),V=[E,a.fontWeight,a.fontShape]);if(Ea(b,Y,p).metrics)return Nr(b,Y,p,a,v.concat(V));if(Ee.hasOwnProperty(b)&&Y.slice(0,10)==="Typewriter"){const tt=[];for(let pt=0;pt{if(_r(c.classes)!==_r(a.classes)||c.skew!==a.skew||c.maxFontSize!==a.maxFontSize)return!1;if(c.classes.length===1){const u=c.classes[0];if(u==="mbin"||u==="mord")return!1}for(const u in c.style)if(c.style.hasOwnProperty(u)&&c.style[u]!==a.style[u])return!1;for(const u in a.style)if(a.style.hasOwnProperty(u)&&c.style[u]!==a.style[u])return!1;return!0},B3=c=>{for(let a=0;aa&&(a=v.height),v.depth>u&&(u=v.depth),v.maxFontSize>p&&(p=v.maxFontSize)}c.height=a,c.depth=u,c.maxFontSize=p},ur=function(c,a,u,p){const b=new Vi(c,a,u,p);return Jl(b),b},bu=(c,a,u,p)=>new Vi(c,a,u,p),L3=function(c,a,u){const p=ur([c],[],a);return p.height=Math.max(u||a.fontMetrics().defaultRuleThickness,a.minRuleThickness),p.style.borderBottomWidth=bt(p.height),p.maxFontSize=1,p},E3=function(c,a,u,p){const b=new oi(c,a,u,p);return Jl(b),b},xu=function(c){const a=new yr(c);return Jl(a),a},D3=function(c,a){return c instanceof yr?ur([],[c],a):c},F3=function(c){if(c.positionType==="individualShift"){const u=c.children,p=[u[0]],b=-u[0].shift-u[0].elem.depth;let v=b;for(let _=1;_{const u=ur(["mspace"],[],a),p=re(c,a);return u.style.marginRight=bt(p),u},Da=function(c,a,u){let p="";switch(c){case"amsrm":p="AMS";break;case"textrm":p="Main";break;case"textsf":p="SansSerif";break;case"texttt":p="Typewriter";break;default:p=c}let b;return a==="textbf"&&u==="textit"?b="BoldItalic":a==="textbf"?b="Bold":a==="textit"?b="Italic":b="Regular",p+"-"+b},wu={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"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-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"}},ku={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var K={fontMap:wu,makeSymbol:Nr,mathsym:_3,makeSpan:ur,makeSvgSpan:bu,makeLineSpan:L3,makeAnchor:E3,makeFragment:xu,wrapFragment:D3,makeVList:O3,makeOrd:M3,makeGlue:R3,staticSvg:function(c,a){const[u,p,b]=ku[c],v=new Ur(u),_=new Ge([v],{width:bt(p),height:bt(b),style:"width:"+bt(p),viewBox:"0 0 "+1e3*p+" "+1e3*b,preserveAspectRatio:"xMinYMin"}),E=bu(["overlay"],[_],a);return E.height=b,E.style.height=bt(b),E.style.width=bt(p),E},svgData:ku,tryCombineChars:B3};const Se={number:3,unit:"mu"},Zi={number:4,unit:"mu"},ci={number:5,unit:"mu"},N3={mord:{mop:Se,mbin:Zi,mrel:ci,minner:Se},mop:{mord:Se,mop:Se,mrel:ci,minner:Se},mbin:{mord:Zi,mop:Zi,mopen:Zi,minner:Zi},mrel:{mord:ci,mop:ci,mopen:ci,minner:ci},mopen:{},mclose:{mop:Se,mbin:Zi,mrel:ci,minner:Se},mpunct:{mord:Se,mop:Se,mrel:ci,mopen:Se,mclose:Se,mpunct:Se,minner:Se},minner:{mord:Se,mop:Se,mbin:Zi,mrel:ci,mopen:Se,mpunct:Se,minner:Se}},z3={mord:{mop:Se},mop:{mord:Se,mop:Se},mbin:{},mrel:{},mopen:{},mclose:{mop:Se},mpunct:{},minner:{mop:Se}},vu={},Fa={},Oa={};function Ct(c){let{type:a,names:u,props:p,handler:b,htmlBuilder:v,mathmlBuilder:_}=c;const E={type:a,numArgs:p.numArgs,argTypes:p.argTypes,allowedInArgument:!!p.allowedInArgument,allowedInText:!!p.allowedInText,allowedInMath:p.allowedInMath===void 0?!0:p.allowedInMath,numOptionalArgs:p.numOptionalArgs||0,infix:!!p.infix,primitive:!!p.primitive,handler:b};for(let O=0;O{const V=Y.classes[0],tt=q.classes[0];V==="mbin"&&T.contains(I3,tt)?Y.classes[0]="mord":tt==="mbin"&&T.contains($3,V)&&(q.classes[0]="mord")},{node:_},E,O),t0(b,(q,Y)=>{const V=r0(Y),tt=r0(q),pt=V&&tt?q.hasClass("mtight")?z3[V][tt]:N3[V][tt]:null;if(pt)return K.makeGlue(pt,v)},{node:_},E,O),b},t0=function(c,a,u,p,b){p&&c.push(p);let v=0;for(;vY=>{c.splice(q+1,0,Y),v++})(v)}p&&c.pop()},Cu=function(c){return c instanceof yr||c instanceof oi||c instanceof Vi&&c.hasClass("enclosing")?c:null},e0=function(c,a){const u=Cu(c);if(u){const p=u.children;if(p.length){if(a==="right")return e0(p[p.length-1],"right");if(a==="left")return e0(p[0],"left")}}return c},r0=function(c,a){return c?(a&&(c=e0(c,a)),q3[c.classes[0]]||null):null},bs=function(c,a){const u=["nulldelimiter"].concat(c.baseSizingClasses());return hi(a.concat(u))},ie=function(c,a,u){if(!c)return hi();if(Fa[c.type]){let p=Fa[c.type](c,a);if(u&&a.size!==u.size){p=hi(a.sizingClasses(u),[p],a);const b=a.sizeMultiplier/u.sizeMultiplier;p.height*=b,p.depth*=b}return p}else throw new s("Got group of unknown type: '"+c.type+"'")};function Na(c,a){const u=hi(["base"],c,a),p=hi(["strut"]);return p.style.height=bt(u.height+u.depth),u.depth&&(p.style.verticalAlign=bt(-u.depth)),u.children.unshift(p),u}function i0(c,a){let u=null;c.length===1&&c[0].type==="tag"&&(u=c[0].tag,c=c[0].body);const p=Oe(c,a,"root");let b;p.length===2&&p[1].hasClass("tag")&&(b=p.pop());const v=[];let _=[];for(let q=0;q0&&(v.push(Na(_,a)),_=[]),v.push(p[q]));_.length>0&&v.push(Na(_,a));let E;u?(E=Na(Oe(u,a,!0)),E.classes=["tag"],v.push(E)):b&&v.push(b);const O=hi(["katex-html"],v);if(O.setAttribute("aria-hidden","true"),E){const q=E.children[0];q.style.height=bt(O.height+O.depth),O.depth&&(q.style.verticalAlign=bt(-O.depth))}return O}function Su(c){return new yr(c)}class xr{constructor(a,u,p){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=a,this.attributes={},this.children=u||[],this.classes=p||[]}setAttribute(a,u){this.attributes[a]=u}getAttribute(a){return this.attributes[a]}toNode(){const a=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const u in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,u)&&a.setAttribute(u,this.attributes[u]);this.classes.length>0&&(a.className=_r(this.classes));for(let u=0;u0&&(a+=' class ="'+T.escape(_r(this.classes))+'"'),a+=">";for(let u=0;u",a}toText(){return this.children.map(a=>a.toText()).join("")}}class Yr{constructor(a){this.text=void 0,this.text=a}toNode(){return document.createTextNode(this.text)}toMarkup(){return T.escape(this.toText())}toText(){return this.text}}class H3{constructor(a){this.width=void 0,this.character=void 0,this.width=a,a>=.05555&&a<=.05556?this.character=" ":a>=.1666&&a<=.1667?this.character=" ":a>=.2222&&a<=.2223?this.character=" ":a>=.2777&&a<=.2778?this.character="  ":a>=-.05556&&a<=-.05555?this.character=" ⁣":a>=-.1667&&a<=-.1666?this.character=" ⁣":a>=-.2223&&a<=-.2222?this.character=" ⁣":a>=-.2778&&a<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);{const a=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return a.setAttribute("width",bt(this.width)),a}}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var mt={MathNode:xr,TextNode:Yr,SpaceNode:H3,newDocumentFragment:Su};const Tr=function(c,a,u){return be[a][c]&&be[a][c].replace&&c.charCodeAt(0)!==55349&&!(Ee.hasOwnProperty(c)&&u&&(u.fontFamily&&u.fontFamily.slice(4,6)==="tt"||u.font&&u.font.slice(4,6)==="tt"))&&(c=be[a][c].replace),new mt.TextNode(c)},n0=function(c){return c.length===1?c[0]:new mt.MathNode("mrow",c)},s0=function(c,a){if(a.fontFamily==="texttt")return"monospace";if(a.fontFamily==="textsf")return a.fontShape==="textit"&&a.fontWeight==="textbf"?"sans-serif-bold-italic":a.fontShape==="textit"?"sans-serif-italic":a.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(a.fontShape==="textit"&&a.fontWeight==="textbf")return"bold-italic";if(a.fontShape==="textit")return"italic";if(a.fontWeight==="textbf")return"bold";const u=a.font;if(!u||u==="mathnormal")return null;const p=c.mode;if(u==="mathit")return"italic";if(u==="boldsymbol")return c.type==="textord"?"bold":"bold-italic";if(u==="mathbf")return"bold";if(u==="mathbb")return"double-struck";if(u==="mathsfit")return"sans-serif-italic";if(u==="mathfrak")return"fraktur";if(u==="mathscr"||u==="mathcal")return"script";if(u==="mathsf")return"sans-serif";if(u==="mathtt")return"monospace";let b=c.text;if(T.contains(["\\imath","\\jmath"],b))return null;be[p][b]&&be[p][b].replace&&(b=be[p][b].replace);const v=K.fontMap[u].fontName;return ji(b,v,p)?K.fontMap[u].variant:null};function a0(c){if(!c)return!1;if(c.type==="mi"&&c.children.length===1){const a=c.children[0];return a instanceof Yr&&a.text==="."}else if(c.type==="mo"&&c.children.length===1&&c.getAttribute("separator")==="true"&&c.getAttribute("lspace")==="0em"&&c.getAttribute("rspace")==="0em"){const a=c.children[0];return a instanceof Yr&&a.text===","}else return!1}const fr=function(c,a,u){if(c.length===1){const v=ge(c[0],a);return u&&v instanceof xr&&v.type==="mo"&&(v.setAttribute("lspace","0em"),v.setAttribute("rspace","0em")),[v]}const p=[];let b;for(let v=0;v=1&&(b.type==="mn"||a0(b))){const E=_.children[0];E instanceof xr&&E.type==="mn"&&(E.children=[...b.children,...E.children],p.pop())}else if(b.type==="mi"&&b.children.length===1){const E=b.children[0];if(E instanceof Yr&&E.text==="̸"&&(_.type==="mo"||_.type==="mi"||_.type==="mn")){const O=_.children[0];O instanceof Yr&&O.text.length>0&&(O.text=O.text.slice(0,1)+"̸"+O.text.slice(1),p.pop())}}}p.push(_),b=_}return p},Di=function(c,a,u){return n0(fr(c,a,u))},ge=function(c,a){if(!c)return new mt.MathNode("mrow");if(Oa[c.type])return Oa[c.type](c,a);throw new s("Got group of unknown type: '"+c.type+"'")};function _u(c,a,u,p,b){const v=fr(c,u);let _;v.length===1&&v[0]instanceof xr&&T.contains(["mrow","mtable"],v[0].type)?_=v[0]:_=new mt.MathNode("mrow",v);const E=new mt.MathNode("annotation",[new mt.TextNode(a)]);E.setAttribute("encoding","application/x-tex");const O=new mt.MathNode("semantics",[_,E]),q=new mt.MathNode("math",[O]);q.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),p&&q.setAttribute("display","block");const Y=b?"katex":"katex-mathml";return K.makeSpan([Y],[q])}const Tu=function(c){return new ys({style:c.displayMode?J.DISPLAY:J.TEXT,maxSize:c.maxSize,minRuleThickness:c.minRuleThickness})},Mu=function(c,a){if(a.displayMode){const u=["katex-display"];a.leqno&&u.push("leqno"),a.fleqn&&u.push("fleqn"),c=K.makeSpan(u,[c])}return c},W3=function(c,a,u){const p=Tu(u);let b;if(u.output==="mathml")return _u(c,a,p,u.displayMode,!0);if(u.output==="html"){const v=i0(c,p);b=K.makeSpan(["katex"],[v])}else{const v=_u(c,a,p,u.displayMode,!1),_=i0(c,p);b=K.makeSpan(["katex"],[v,_])}return Mu(b,u)},U3=function(c,a,u){const p=Tu(u),b=i0(c,p),v=K.makeSpan(["katex"],[b]);return Mu(v,u)},j3={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":"="},Y3=function(c){const a=new mt.MathNode("mo",[new mt.TextNode(j3[c.replace(/^\\/,"")])]);return a.setAttribute("stretchy","true"),a},G3={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]},V3=function(c){return c.type==="ordgroup"?c.body.length:1};var ui={encloseSpan:function(c,a,u,p,b){let v;const _=c.height+c.depth+u+p;if(/fbox|color|angl/.test(a)){if(v=K.makeSpan(["stretchy",a],[],b),a==="fbox"){const E=b.color&&b.getColor();E&&(v.style.borderColor=E)}}else{const E=[];/^[bx]cancel$/.test(a)&&E.push(new En({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(a)&&E.push(new En({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const O=new Ge(E,{width:"100%",height:bt(_)});v=K.makeSvgSpan([],[O],b)}return v.height=_,v.style.height=bt(_),v},mathMLnode:Y3,svgSpan:function(c,a){function u(){let _=4e5;const E=c.label.slice(1);if(T.contains(["widehat","widecheck","widetilde","utilde"],E)){const q=V3(c.base);let Y,V,tt;if(q>5)E==="widehat"||E==="widecheck"?(Y=420,_=2364,tt=.42,V=E+"4"):(Y=312,_=2340,tt=.34,V="tilde4");else{const Et=[1,1,2,2,3,3][q];E==="widehat"||E==="widecheck"?(_=[0,1062,2364,2364,2364][Et],Y=[0,239,300,360,420][Et],tt=[0,.24,.3,.3,.36,.42][Et],V=E+Et):(_=[0,600,1033,2339,2340][Et],Y=[0,260,286,306,312][Et],tt=[0,.26,.286,.3,.306,.34][Et],V="tilde"+Et)}const pt=new Ur(V),Tt=new Ge([pt],{width:"100%",height:bt(tt),viewBox:"0 0 "+_+" "+Y,preserveAspectRatio:"none"});return{span:K.makeSvgSpan([],[Tt],a),minWidth:0,height:tt}}else{const O=[],q=G3[E],[Y,V,tt]=q,pt=tt/1e3,Tt=Y.length;let Et,Kt;if(Tt===1){const Gt=q[3];Et=["hide-tail"],Kt=[Gt]}else if(Tt===2)Et=["halfarrow-left","halfarrow-right"],Kt=["xMinYMin","xMaxYMin"];else if(Tt===3)Et=["brace-left","brace-center","brace-right"],Kt=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+Tt+" children.");for(let Gt=0;Gt0&&(p.style.minWidth=bt(b)),p}};function Yt(c,a){if(!c||c.type!==a)throw new Error("Expected node of type "+a+", but got "+(c?"node of type "+c.type:String(c)));return c}function o0(c){const a=za(c);if(!a)throw new Error("Expected node of symbol group type, but got "+(c?"node of type "+c.type:String(c)));return a}function za(c){return c&&(c.type==="atom"||Ql.hasOwnProperty(c.type))?c:null}const l0=(c,a)=>{let u,p,b;c&&c.type==="supsub"?(p=Yt(c.base,"accent"),u=p.base,c.base=u,b=Ba(ie(c,a)),c.base=p):(p=Yt(c,"accent"),u=p.base);const v=ie(u,a.havingCrampedStyle()),_=p.isShifty&&T.isCharacterBox(u);let E=0;if(_){const tt=T.getBaseElem(u),pt=ie(tt,a.havingCrampedStyle());E=Dn(pt).skew}const O=p.label==="\\c";let q=O?v.height+v.depth:Math.min(v.height,a.fontMetrics().xHeight),Y;if(p.isStretchy)Y=ui.svgSpan(p,a),Y=K.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:v},{type:"elem",elem:Y,wrapperClasses:["svg-align"],wrapperStyle:E>0?{width:"calc(100% - "+bt(2*E)+")",marginLeft:bt(2*E)}:void 0}]},a);else{let tt,pt;p.label==="\\vec"?(tt=K.staticSvg("vec",a),pt=K.svgData.vec[1]):(tt=K.makeOrd({mode:p.mode,text:p.label},a,"textord"),tt=Dn(tt),tt.italic=0,pt=tt.width,O&&(q+=tt.depth)),Y=K.makeSpan(["accent-body"],[tt]);const Tt=p.label==="\\textcircled";Tt&&(Y.classes.push("accent-full"),q=v.height);let Et=E;Tt||(Et-=pt/2),Y.style.left=bt(Et),p.label==="\\textcircled"&&(Y.style.top=".2em"),Y=K.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:v},{type:"kern",size:-q},{type:"elem",elem:Y}]},a)}const V=K.makeSpan(["mord","accent"],[Y],a);return b?(b.children[0]=V,b.height=Math.max(V.height,b.height),b.classes[0]="mord",b):V},Au=(c,a)=>{const u=c.isStretchy?ui.mathMLnode(c.label):new mt.MathNode("mo",[Tr(c.label,c.mode)]),p=new mt.MathNode("mover",[ge(c.base,a),u]);return p.setAttribute("accent","true"),p},X3=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(c=>"\\"+c).join("|"));Ct({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:(c,a)=>{const u=Ra(a[0]),p=!X3.test(c.funcName),b=!p||c.funcName==="\\widehat"||c.funcName==="\\widetilde"||c.funcName==="\\widecheck";return{type:"accent",mode:c.parser.mode,label:c.funcName,isStretchy:p,isShifty:b,base:u}},htmlBuilder:l0,mathmlBuilder:Au}),Ct({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(c,a)=>{const u=a[0];let p=c.parser.mode;return p==="math"&&(c.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+c.funcName+" works only in text mode"),p="text"),{type:"accent",mode:p,label:c.funcName,isStretchy:!1,isShifty:!0,base:u}},htmlBuilder:l0,mathmlBuilder:Au}),Ct({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(c,a)=>{let{parser:u,funcName:p}=c;const b=a[0];return{type:"accentUnder",mode:u.mode,label:p,base:b}},htmlBuilder:(c,a)=>{const u=ie(c.base,a),p=ui.svgSpan(c,a),b=c.label==="\\utilde"?.12:0,v=K.makeVList({positionType:"top",positionData:u.height,children:[{type:"elem",elem:p,wrapperClasses:["svg-align"]},{type:"kern",size:b},{type:"elem",elem:u}]},a);return K.makeSpan(["mord","accentunder"],[v],a)},mathmlBuilder:(c,a)=>{const u=ui.mathMLnode(c.label),p=new mt.MathNode("munder",[ge(c.base,a),u]);return p.setAttribute("accentunder","true"),p}});const $a=c=>{const a=new mt.MathNode("mpadded",c?[c]:[]);return a.setAttribute("width","+0.6em"),a.setAttribute("lspace","0.3em"),a};Ct({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(c,a,u){let{parser:p,funcName:b}=c;return{type:"xArrow",mode:p.mode,label:b,body:a[0],below:u[0]}},htmlBuilder(c,a){const u=a.style;let p=a.havingStyle(u.sup());const b=K.wrapFragment(ie(c.body,p,a),a),v=c.label.slice(0,2)==="\\x"?"x":"cd";b.classes.push(v+"-arrow-pad");let _;c.below&&(p=a.havingStyle(u.sub()),_=K.wrapFragment(ie(c.below,p,a),a),_.classes.push(v+"-arrow-pad"));const E=ui.svgSpan(c,a),O=-a.fontMetrics().axisHeight+.5*E.height;let q=-a.fontMetrics().axisHeight-.5*E.height-.111;(b.depth>.25||c.label==="\\xleftequilibrium")&&(q-=b.depth);let Y;if(_){const V=-a.fontMetrics().axisHeight+_.height+.5*E.height+.111;Y=K.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:q},{type:"elem",elem:E,shift:O},{type:"elem",elem:_,shift:V}]},a)}else Y=K.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:q},{type:"elem",elem:E,shift:O}]},a);return Y.children[0].children[0].children[1].classes.push("svg-align"),K.makeSpan(["mrel","x-arrow"],[Y],a)},mathmlBuilder(c,a){const u=ui.mathMLnode(c.label);u.setAttribute("minsize",c.label.charAt(0)==="x"?"1.75em":"3.0em");let p;if(c.body){const b=$a(ge(c.body,a));if(c.below){const v=$a(ge(c.below,a));p=new mt.MathNode("munderover",[u,v,b])}else p=new mt.MathNode("mover",[u,b])}else if(c.below){const b=$a(ge(c.below,a));p=new mt.MathNode("munder",[u,b])}else p=$a(),p=new mt.MathNode("mover",[u,p]);return p}});const Z3=K.makeSpan;function Bu(c,a){const u=Oe(c.body,a,!0);return Z3([c.mclass],u,a)}function Lu(c,a){let u;const p=fr(c.body,a);return c.mclass==="minner"?u=new mt.MathNode("mpadded",p):c.mclass==="mord"?c.isCharacterBox?(u=p[0],u.type="mi"):u=new mt.MathNode("mi",p):(c.isCharacterBox?(u=p[0],u.type="mo"):u=new mt.MathNode("mo",p),c.mclass==="mbin"?(u.attributes.lspace="0.22em",u.attributes.rspace="0.22em"):c.mclass==="mpunct"?(u.attributes.lspace="0em",u.attributes.rspace="0.17em"):c.mclass==="mopen"||c.mclass==="mclose"?(u.attributes.lspace="0em",u.attributes.rspace="0em"):c.mclass==="minner"&&(u.attributes.lspace="0.0556em",u.attributes.width="+0.1111em")),u}Ct({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(c,a){let{parser:u,funcName:p}=c;const b=a[0];return{type:"mclass",mode:u.mode,mclass:"m"+p.slice(5),body:Me(b),isCharacterBox:T.isCharacterBox(b)}},htmlBuilder:Bu,mathmlBuilder:Lu});const Ia=c=>{const a=c.type==="ordgroup"&&c.body.length?c.body[0]:c;return a.type==="atom"&&(a.family==="bin"||a.family==="rel")?"m"+a.family:"mord"};Ct({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(c,a){let{parser:u}=c;return{type:"mclass",mode:u.mode,mclass:Ia(a[0]),body:Me(a[1]),isCharacterBox:T.isCharacterBox(a[1])}}}),Ct({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(c,a){let{parser:u,funcName:p}=c;const b=a[1],v=a[0];let _;p!=="\\stackrel"?_=Ia(b):_="mrel";const E={type:"op",mode:b.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:p!=="\\stackrel",body:Me(b)},O={type:"supsub",mode:v.mode,base:E,sup:p==="\\underset"?null:v,sub:p==="\\underset"?v:null};return{type:"mclass",mode:u.mode,mclass:_,body:[O],isCharacterBox:T.isCharacterBox(O)}},htmlBuilder:Bu,mathmlBuilder:Lu}),Ct({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(c,a){let{parser:u}=c;return{type:"pmb",mode:u.mode,mclass:Ia(a[0]),body:Me(a[0])}},htmlBuilder(c,a){const u=Oe(c.body,a,!0),p=K.makeSpan([c.mclass],u,a);return p.style.textShadow="0.02em 0.01em 0.04px",p},mathmlBuilder(c,a){const u=fr(c.body,a),p=new mt.MathNode("mstyle",u);return p.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),p}});const K3={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Eu=()=>({type:"styling",body:[],mode:"math",style:"display"}),Du=c=>c.type==="textord"&&c.text==="@",Q3=(c,a)=>(c.type==="mathord"||c.type==="atom")&&c.text===a;function J3(c,a,u){const p=K3[c];switch(p){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return u.callFunction(p,[a[0]],[a[1]]);case"\\uparrow":case"\\downarrow":{const b=u.callFunction("\\\\cdleft",[a[0]],[]),v={type:"atom",text:p,mode:"math",family:"rel"},_=u.callFunction("\\Big",[v],[]),E=u.callFunction("\\\\cdright",[a[1]],[]),O={type:"ordgroup",mode:"math",body:[b,_,E]};return u.callFunction("\\\\cdparent",[O],[])}case"\\\\cdlongequal":return u.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const b={type:"textord",text:"\\Vert",mode:"math"};return u.callFunction("\\Big",[b],[])}default:return{type:"textord",text:" ",mode:"math"}}}function ty(c){const a=[];for(c.gullet.beginGroup(),c.gullet.macros.set("\\cr","\\\\\\relax"),c.gullet.beginGroup();;){a.push(c.parseExpression(!1,"\\\\")),c.gullet.endGroup(),c.gullet.beginGroup();const v=c.fetch().text;if(v==="&"||v==="\\\\")c.consume();else if(v==="\\end"){a[a.length-1].length===0&&a.pop();break}else throw new s("Expected \\\\ or \\cr or \\end",c.nextToken)}let u=[];const p=[u];for(let v=0;v-1))if("<>AV".indexOf(q)>-1)for(let pt=0;pt<2;pt++){let Tt=!0;for(let Et=O+1;Et<_.length;Et++){if(Q3(_[Et],q)){Tt=!1,O=Et;break}if(Du(_[Et]))throw new s("Missing a "+q+" character to complete a CD arrow.",_[Et]);Y[pt].body.push(_[Et])}if(Tt)throw new s("Missing a "+q+" character to complete a CD arrow.",_[O])}else throw new s('Expected one of "<>AV=|." after @',_[O]);const tt={type:"styling",body:[J3(q,Y,c)],mode:"math",style:"display"};u.push(tt),E=Eu()}v%2===0?u.push(E):u.shift(),u=[],p.push(u)}c.gullet.endGroup(),c.gullet.endGroup();const b=new Array(p[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:p,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(p.length+1).fill([])}}Ct({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(c,a){let{parser:u,funcName:p}=c;return{type:"cdlabel",mode:u.mode,side:p.slice(4),label:a[0]}},htmlBuilder(c,a){const u=a.havingStyle(a.style.sup()),p=K.wrapFragment(ie(c.label,u,a),a);return p.classes.push("cd-label-"+c.side),p.style.bottom=bt(.8-p.depth),p.height=0,p.depth=0,p},mathmlBuilder(c,a){let u=new mt.MathNode("mrow",[ge(c.label,a)]);return u=new mt.MathNode("mpadded",[u]),u.setAttribute("width","0"),c.side==="left"&&u.setAttribute("lspace","-1width"),u.setAttribute("voffset","0.7em"),u=new mt.MathNode("mstyle",[u]),u.setAttribute("displaystyle","false"),u.setAttribute("scriptlevel","1"),u}}),Ct({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(c,a){let{parser:u}=c;return{type:"cdlabelparent",mode:u.mode,fragment:a[0]}},htmlBuilder(c,a){const u=K.wrapFragment(ie(c.fragment,a),a);return u.classes.push("cd-vert-arrow"),u},mathmlBuilder(c,a){return new mt.MathNode("mrow",[ge(c.fragment,a)])}}),Ct({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(c,a){let{parser:u}=c;const b=Yt(a[0],"ordgroup").body;let v="";for(let O=0;O=1114111)throw new s("\\@char with invalid code point "+v);return _<=65535?E=String.fromCharCode(_):(_-=65536,E=String.fromCharCode((_>>10)+55296,(_&1023)+56320)),{type:"textord",mode:u.mode,text:E}}});const Fu=(c,a)=>{const u=Oe(c.body,a.withColor(c.color),!1);return K.makeFragment(u)},Ou=(c,a)=>{const u=fr(c.body,a.withColor(c.color)),p=new mt.MathNode("mstyle",u);return p.setAttribute("mathcolor",c.color),p};Ct({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(c,a){let{parser:u}=c;const p=Yt(a[0],"color-token").color,b=a[1];return{type:"color",mode:u.mode,color:p,body:Me(b)}},htmlBuilder:Fu,mathmlBuilder:Ou}),Ct({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(c,a){let{parser:u,breakOnTokenText:p}=c;const b=Yt(a[0],"color-token").color;u.gullet.macros.set("\\current@color",b);const v=u.parseExpression(!0,p);return{type:"color",mode:u.mode,color:b,body:v}},htmlBuilder:Fu,mathmlBuilder:Ou}),Ct({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(c,a,u){let{parser:p}=c;const b=p.gullet.future().text==="["?p.parseSizeGroup(!0):null,v=!p.settings.displayMode||!p.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:p.mode,newLine:v,size:b&&Yt(b,"size").value}},htmlBuilder(c,a){const u=K.makeSpan(["mspace"],[],a);return c.newLine&&(u.classes.push("newline"),c.size&&(u.style.marginTop=bt(re(c.size,a)))),u},mathmlBuilder(c,a){const u=new mt.MathNode("mspace");return c.newLine&&(u.setAttribute("linebreak","newline"),c.size&&u.setAttribute("height",bt(re(c.size,a)))),u}});const c0={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Ru=c=>{const a=c.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new s("Expected a control sequence",c);return a},ey=c=>{let a=c.gullet.popToken();return a.text==="="&&(a=c.gullet.popToken(),a.text===" "&&(a=c.gullet.popToken())),a},Nu=(c,a,u,p)=>{let b=c.gullet.macros.get(u.text);b==null&&(u.noexpand=!0,b={tokens:[u],numArgs:0,unexpandable:!c.gullet.isExpandable(u.text)}),c.gullet.macros.set(a,b,p)};Ct({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(c){let{parser:a,funcName:u}=c;a.consumeSpaces();const p=a.fetch();if(c0[p.text])return(u==="\\global"||u==="\\\\globallong")&&(p.text=c0[p.text]),Yt(a.parseFunction(),"internal");throw new s("Invalid token after macro prefix",p)}}),Ct({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(c){let{parser:a,funcName:u}=c,p=a.gullet.popToken();const b=p.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(b))throw new s("Expected a control sequence",p);let v=0,_;const E=[[]];for(;a.gullet.future().text!=="{";)if(p=a.gullet.popToken(),p.text==="#"){if(a.gullet.future().text==="{"){_=a.gullet.future(),E[v].push("{");break}if(p=a.gullet.popToken(),!/^[1-9]$/.test(p.text))throw new s('Invalid argument number "'+p.text+'"');if(parseInt(p.text)!==v+1)throw new s('Argument number "'+p.text+'" out of order');v++,E.push([])}else{if(p.text==="EOF")throw new s("Expected a macro definition");E[v].push(p.text)}let{tokens:O}=a.gullet.consumeArg();return _&&O.unshift(_),(u==="\\edef"||u==="\\xdef")&&(O=a.gullet.expandTokens(O),O.reverse()),a.gullet.macros.set(b,{tokens:O,numArgs:v,delimiters:E},u===c0[u]),{type:"internal",mode:a.mode}}}),Ct({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(c){let{parser:a,funcName:u}=c;const p=Ru(a.gullet.popToken());a.gullet.consumeSpaces();const b=ey(a);return Nu(a,p,b,u==="\\\\globallet"),{type:"internal",mode:a.mode}}}),Ct({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(c){let{parser:a,funcName:u}=c;const p=Ru(a.gullet.popToken()),b=a.gullet.popToken(),v=a.gullet.popToken();return Nu(a,p,v,u==="\\\\globalfuture"),a.gullet.pushToken(v),a.gullet.pushToken(b),{type:"internal",mode:a.mode}}});const xs=function(c,a,u){const p=be.math[c]&&be.math[c].replace,b=ji(p||c,a,u);if(!b)throw new Error("Unsupported symbol "+c+" and font size "+a+".");return b},h0=function(c,a,u,p){const b=u.havingBaseStyle(a),v=K.makeSpan(p.concat(b.sizingClasses(u)),[c],u),_=b.sizeMultiplier/u.sizeMultiplier;return v.height*=_,v.depth*=_,v.maxFontSize=b.sizeMultiplier,v},zu=function(c,a,u){const p=a.havingBaseStyle(u),b=(1-a.sizeMultiplier/p.sizeMultiplier)*a.fontMetrics().axisHeight;c.classes.push("delimcenter"),c.style.top=bt(b),c.height-=b,c.depth+=b},ry=function(c,a,u,p,b,v){const _=K.makeSymbol(c,"Main-Regular",b,p),E=h0(_,a,p,v);return u&&zu(E,p,a),E},iy=function(c,a,u,p){return K.makeSymbol(c,"Size"+a+"-Regular",u,p)},$u=function(c,a,u,p,b,v){const _=iy(c,a,b,p),E=h0(K.makeSpan(["delimsizing","size"+a],[_],p),J.TEXT,p,v);return u&&zu(E,p,J.TEXT),E},u0=function(c,a,u){let p;return a==="Size1-Regular"?p="delim-size1":p="delim-size4",{type:"elem",elem:K.makeSpan(["delimsizinginner",p],[K.makeSpan([],[K.makeSymbol(c,a,u)])])}},f0=function(c,a,u){const p=er["Size4-Regular"][c.charCodeAt(0)]?er["Size4-Regular"][c.charCodeAt(0)][4]:er["Size1-Regular"][c.charCodeAt(0)][4],b=new Ur("inner",Fe(c,Math.round(1e3*a))),v=new Ge([b],{width:bt(p),height:bt(a),style:"width:"+bt(p),viewBox:"0 0 "+1e3*p+" "+Math.round(1e3*a),preserveAspectRatio:"xMinYMin"}),_=K.makeSvgSpan([],[v],u);return _.height=a,_.style.height=bt(a),_.style.width=bt(p),{type:"elem",elem:_}},d0=.008,Pa={type:"kern",size:-1*d0},ny=["|","\\lvert","\\rvert","\\vert"],sy=["\\|","\\lVert","\\rVert","\\Vert"],Iu=function(c,a,u,p,b,v){let _,E,O,q,Y="",V=0;_=O=q=c,E=null;let tt="Size1-Regular";c==="\\uparrow"?O=q="⏐":c==="\\Uparrow"?O=q="‖":c==="\\downarrow"?_=O="⏐":c==="\\Downarrow"?_=O="‖":c==="\\updownarrow"?(_="\\uparrow",O="⏐",q="\\downarrow"):c==="\\Updownarrow"?(_="\\Uparrow",O="‖",q="\\Downarrow"):T.contains(ny,c)?(O="∣",Y="vert",V=333):T.contains(sy,c)?(O="∥",Y="doublevert",V=556):c==="["||c==="\\lbrack"?(_="⎡",O="⎢",q="⎣",tt="Size4-Regular",Y="lbrack",V=667):c==="]"||c==="\\rbrack"?(_="⎤",O="⎥",q="⎦",tt="Size4-Regular",Y="rbrack",V=667):c==="\\lfloor"||c==="⌊"?(O=_="⎢",q="⎣",tt="Size4-Regular",Y="lfloor",V=667):c==="\\lceil"||c==="⌈"?(_="⎡",O=q="⎢",tt="Size4-Regular",Y="lceil",V=667):c==="\\rfloor"||c==="⌋"?(O=_="⎥",q="⎦",tt="Size4-Regular",Y="rfloor",V=667):c==="\\rceil"||c==="⌉"?(_="⎤",O=q="⎥",tt="Size4-Regular",Y="rceil",V=667):c==="("||c==="\\lparen"?(_="⎛",O="⎜",q="⎝",tt="Size4-Regular",Y="lparen",V=875):c===")"||c==="\\rparen"?(_="⎞",O="⎟",q="⎠",tt="Size4-Regular",Y="rparen",V=875):c==="\\{"||c==="\\lbrace"?(_="⎧",E="⎨",q="⎩",O="⎪",tt="Size4-Regular"):c==="\\}"||c==="\\rbrace"?(_="⎫",E="⎬",q="⎭",O="⎪",tt="Size4-Regular"):c==="\\lgroup"||c==="⟮"?(_="⎧",q="⎩",O="⎪",tt="Size4-Regular"):c==="\\rgroup"||c==="⟯"?(_="⎫",q="⎭",O="⎪",tt="Size4-Regular"):c==="\\lmoustache"||c==="⎰"?(_="⎧",q="⎭",O="⎪",tt="Size4-Regular"):(c==="\\rmoustache"||c==="⎱")&&(_="⎫",q="⎩",O="⎪",tt="Size4-Regular");const pt=xs(_,tt,b),Tt=pt.height+pt.depth,Et=xs(O,tt,b),Kt=Et.height+Et.depth,Gt=xs(q,tt,b),Jt=Gt.height+Gt.depth;let oe=0,xe=1;if(E!==null){const Te=xs(E,tt,b);oe=Te.height+Te.depth,xe=2}const ir=Tt+Jt+oe,Re=Math.max(0,Math.ceil((a-ir)/(xe*Kt))),Ar=ir+Re*xe*Kt;let Rn=p.fontMetrics().axisHeight;u&&(Rn*=p.sizeMultiplier);const ne=Ar/2-Rn,fe=[];if(Y.length>0){const Te=Ar-Tt-Jt,_e=Math.round(Ar*1e3),Br=Ye(Y,Math.round(Te*1e3)),Ey=new Ur(Y,Br),Lf=(V/1e3).toFixed(3)+"em",Ef=(_e/1e3).toFixed(3)+"em",Dy=new Ge([Ey],{width:Lf,height:Ef,viewBox:"0 0 "+V+" "+_e}),ja=K.makeSvgSpan([],[Dy],p);ja.height=_e/1e3,ja.style.width=Lf,ja.style.height=Ef,fe.push({type:"elem",elem:ja})}else{if(fe.push(u0(q,tt,b)),fe.push(Pa),E===null){const Te=Ar-Tt-Jt+2*d0;fe.push(f0(O,Te,p))}else{const Te=(Ar-Tt-Jt-oe)/2+2*d0;fe.push(f0(O,Te,p)),fe.push(Pa),fe.push(u0(E,tt,b)),fe.push(Pa),fe.push(f0(O,Te,p))}fe.push(Pa),fe.push(u0(_,tt,b))}const we=p.havingBaseStyle(J.TEXT),ve=K.makeVList({positionType:"bottom",positionData:ne,children:fe},we);return h0(K.makeSpan(["delimsizing","mult"],[ve],we),J.TEXT,p,v)},p0=80,m0=.08,g0=function(c,a,u,p,b){const v=Zt(c,p,u),_=new Ur(c,v),E=new Ge([_],{width:"400em",height:bt(a),viewBox:"0 0 400000 "+u,preserveAspectRatio:"xMinYMin slice"});return K.makeSvgSpan(["hide-tail"],[E],b)},ay=function(c,a){const u=a.havingBaseSizing(),p=Wu("\\surd",c*u.sizeMultiplier,Hu,u);let b=u.sizeMultiplier;const v=Math.max(0,a.minRuleThickness-a.fontMetrics().sqrtRuleThickness);let _,E=0,O=0,q=0,Y;return p.type==="small"?(q=1e3+1e3*v+p0,c<1?b=1:c<1.4&&(b=.7),E=(1+v+m0)/b,O=(1+v)/b,_=g0("sqrtMain",E,q,v,a),_.style.minWidth="0.853em",Y=.833/b):p.type==="large"?(q=(1e3+p0)*ws[p.size],O=(ws[p.size]+v)/b,E=(ws[p.size]+v+m0)/b,_=g0("sqrtSize"+p.size,E,q,v,a),_.style.minWidth="1.02em",Y=1/b):(E=c+v+m0,O=c+v,q=Math.floor(1e3*c+v)+p0,_=g0("sqrtTall",E,q,v,a),_.style.minWidth="0.742em",Y=1.056),_.height=O,_.style.height=bt(E),{span:_,advanceWidth:Y,ruleWidth:(a.fontMetrics().sqrtRuleThickness+v)*b}},Pu=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],oy=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],qu=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ws=[0,1.2,1.8,2.4,3],ly=function(c,a,u,p,b){if(c==="<"||c==="\\lt"||c==="⟨"?c="\\langle":(c===">"||c==="\\gt"||c==="⟩")&&(c="\\rangle"),T.contains(Pu,c)||T.contains(qu,c))return $u(c,a,!1,u,p,b);if(T.contains(oy,c))return Iu(c,ws[a],!1,u,p,b);throw new s("Illegal delimiter: '"+c+"'")},cy=[{type:"small",style:J.SCRIPTSCRIPT},{type:"small",style:J.SCRIPT},{type:"small",style:J.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],hy=[{type:"small",style:J.SCRIPTSCRIPT},{type:"small",style:J.SCRIPT},{type:"small",style:J.TEXT},{type:"stack"}],Hu=[{type:"small",style:J.SCRIPTSCRIPT},{type:"small",style:J.SCRIPT},{type:"small",style:J.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],uy=function(c){if(c.type==="small")return"Main-Regular";if(c.type==="large")return"Size"+c.size+"-Regular";if(c.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+c.type+"' here.")},Wu=function(c,a,u,p){const b=Math.min(2,3-p.style.size);for(let v=b;va)return u[v]}return u[u.length-1]},Uu=function(c,a,u,p,b,v){c==="<"||c==="\\lt"||c==="⟨"?c="\\langle":(c===">"||c==="\\gt"||c==="⟩")&&(c="\\rangle");let _;T.contains(qu,c)?_=cy:T.contains(Pu,c)?_=Hu:_=hy;const E=Wu(c,a,_,p);return E.type==="small"?ry(c,E.style,u,p,b,v):E.type==="large"?$u(c,E.size,u,p,b,v):Iu(c,a,u,p,b,v)};var fi={sqrtImage:ay,sizedDelim:ly,sizeToMaxHeight:ws,customSizedDelim:Uu,leftRightDelim:function(c,a,u,p,b,v){const _=p.fontMetrics().axisHeight*p.sizeMultiplier,E=901,O=5/p.fontMetrics().ptPerEm,q=Math.max(a-_,u+_),Y=Math.max(q/500*E,2*q-O);return Uu(c,Y,!0,p,b,v)}};const ju={"\\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}},fy=["(","\\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 qa(c,a){const u=za(c);if(u&&T.contains(fy,u.text))return u;throw u?new s("Invalid delimiter '"+u.text+"' after '"+a.funcName+"'",c):new s("Invalid delimiter type '"+c.type+"'",c)}Ct({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:(c,a)=>{const u=qa(a[0],c);return{type:"delimsizing",mode:c.parser.mode,size:ju[c.funcName].size,mclass:ju[c.funcName].mclass,delim:u.text}},htmlBuilder:(c,a)=>c.delim==="."?K.makeSpan([c.mclass]):fi.sizedDelim(c.delim,c.size,a,c.mode,[c.mclass]),mathmlBuilder:c=>{const a=[];c.delim!=="."&&a.push(Tr(c.delim,c.mode));const u=new mt.MathNode("mo",a);c.mclass==="mopen"||c.mclass==="mclose"?u.setAttribute("fence","true"):u.setAttribute("fence","false"),u.setAttribute("stretchy","true");const p=bt(fi.sizeToMaxHeight[c.size]);return u.setAttribute("minsize",p),u.setAttribute("maxsize",p),u}});function Yu(c){if(!c.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ct({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(c,a)=>{const u=c.parser.gullet.macros.get("\\current@color");if(u&&typeof u!="string")throw new s("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:c.parser.mode,delim:qa(a[0],c).text,color:u}}}),Ct({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(c,a)=>{const u=qa(a[0],c),p=c.parser;++p.leftrightDepth;const b=p.parseExpression(!1);--p.leftrightDepth,p.expect("\\right",!1);const v=Yt(p.parseFunction(),"leftright-right");return{type:"leftright",mode:p.mode,body:b,left:u.text,right:v.delim,rightColor:v.color}},htmlBuilder:(c,a)=>{Yu(c);const u=Oe(c.body,a,!0,["mopen","mclose"]);let p=0,b=0,v=!1;for(let O=0;O{Yu(c);const u=fr(c.body,a);if(c.left!=="."){const p=new mt.MathNode("mo",[Tr(c.left,c.mode)]);p.setAttribute("fence","true"),u.unshift(p)}if(c.right!=="."){const p=new mt.MathNode("mo",[Tr(c.right,c.mode)]);p.setAttribute("fence","true"),c.rightColor&&p.setAttribute("mathcolor",c.rightColor),u.push(p)}return n0(u)}}),Ct({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(c,a)=>{const u=qa(a[0],c);if(!c.parser.leftrightDepth)throw new s("\\middle without preceding \\left",u);return{type:"middle",mode:c.parser.mode,delim:u.text}},htmlBuilder:(c,a)=>{let u;if(c.delim===".")u=bs(a,[]);else{u=fi.sizedDelim(c.delim,1,a,c.mode,[]);const p={delim:c.delim,options:a};u.isMiddle=p}return u},mathmlBuilder:(c,a)=>{const u=c.delim==="\\vert"||c.delim==="|"?Tr("|","text"):Tr(c.delim,c.mode),p=new mt.MathNode("mo",[u]);return p.setAttribute("fence","true"),p.setAttribute("lspace","0.05em"),p.setAttribute("rspace","0.05em"),p}});const y0=(c,a)=>{const u=K.wrapFragment(ie(c.body,a),a),p=c.label.slice(1);let b=a.sizeMultiplier,v,_=0;const E=T.isCharacterBox(c.body);if(p==="sout")v=K.makeSpan(["stretchy","sout"]),v.height=a.fontMetrics().defaultRuleThickness/b,_=-.5*a.fontMetrics().xHeight;else if(p==="phase"){const q=re({number:.6,unit:"pt"},a),Y=re({number:.35,unit:"ex"},a),V=a.havingBaseSizing();b=b/V.sizeMultiplier;const tt=u.height+u.depth+q+Y;u.style.paddingLeft=bt(tt/2+q);const pt=Math.floor(1e3*tt*b),Tt=dt(pt),Et=new Ge([new Ur("phase",Tt)],{width:"400em",height:bt(pt/1e3),viewBox:"0 0 400000 "+pt,preserveAspectRatio:"xMinYMin slice"});v=K.makeSvgSpan(["hide-tail"],[Et],a),v.style.height=bt(tt),_=u.depth+q+Y}else{/cancel/.test(p)?E||u.classes.push("cancel-pad"):p==="angl"?u.classes.push("anglpad"):u.classes.push("boxpad");let q=0,Y=0,V=0;/box/.test(p)?(V=Math.max(a.fontMetrics().fboxrule,a.minRuleThickness),q=a.fontMetrics().fboxsep+(p==="colorbox"?0:V),Y=q):p==="angl"?(V=Math.max(a.fontMetrics().defaultRuleThickness,a.minRuleThickness),q=4*V,Y=Math.max(0,.25-u.depth)):(q=E?.2:0,Y=q),v=ui.encloseSpan(u,p,q,Y,a),/fbox|boxed|fcolorbox/.test(p)?(v.style.borderStyle="solid",v.style.borderWidth=bt(V)):p==="angl"&&V!==.049&&(v.style.borderTopWidth=bt(V),v.style.borderRightWidth=bt(V)),_=u.depth+Y,c.backgroundColor&&(v.style.backgroundColor=c.backgroundColor,c.borderColor&&(v.style.borderColor=c.borderColor))}let O;if(c.backgroundColor)O=K.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:_},{type:"elem",elem:u,shift:0}]},a);else{const q=/cancel|phase/.test(p)?["svg-align"]:[];O=K.makeVList({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:v,shift:_,wrapperClasses:q}]},a)}return/cancel/.test(p)&&(O.height=u.height,O.depth=u.depth),/cancel/.test(p)&&!E?K.makeSpan(["mord","cancel-lap"],[O],a):K.makeSpan(["mord"],[O],a)},b0=(c,a)=>{let u=0;const p=new mt.MathNode(c.label.indexOf("colorbox")>-1?"mpadded":"menclose",[ge(c.body,a)]);switch(c.label){case"\\cancel":p.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":p.setAttribute("notation","downdiagonalstrike");break;case"\\phase":p.setAttribute("notation","phasorangle");break;case"\\sout":p.setAttribute("notation","horizontalstrike");break;case"\\fbox":p.setAttribute("notation","box");break;case"\\angl":p.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(u=a.fontMetrics().fboxsep*a.fontMetrics().ptPerEm,p.setAttribute("width","+"+2*u+"pt"),p.setAttribute("height","+"+2*u+"pt"),p.setAttribute("lspace",u+"pt"),p.setAttribute("voffset",u+"pt"),c.label==="\\fcolorbox"){const b=Math.max(a.fontMetrics().fboxrule,a.minRuleThickness);p.setAttribute("style","border: "+b+"em solid "+String(c.borderColor))}break;case"\\xcancel":p.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return c.backgroundColor&&p.setAttribute("mathbackground",c.backgroundColor),p};Ct({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(c,a,u){let{parser:p,funcName:b}=c;const v=Yt(a[0],"color-token").color,_=a[1];return{type:"enclose",mode:p.mode,label:b,backgroundColor:v,body:_}},htmlBuilder:y0,mathmlBuilder:b0}),Ct({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(c,a,u){let{parser:p,funcName:b}=c;const v=Yt(a[0],"color-token").color,_=Yt(a[1],"color-token").color,E=a[2];return{type:"enclose",mode:p.mode,label:b,backgroundColor:_,borderColor:v,body:E}},htmlBuilder:y0,mathmlBuilder:b0}),Ct({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(c,a){let{parser:u}=c;return{type:"enclose",mode:u.mode,label:"\\fbox",body:a[0]}}}),Ct({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(c,a){let{parser:u,funcName:p}=c;const b=a[0];return{type:"enclose",mode:u.mode,label:p,body:b}},htmlBuilder:y0,mathmlBuilder:b0}),Ct({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(c,a){let{parser:u}=c;return{type:"enclose",mode:u.mode,label:"\\angl",body:a[0]}}});const Gu={};function Gr(c){let{type:a,names:u,props:p,handler:b,htmlBuilder:v,mathmlBuilder:_}=c;const E={type:a,numArgs:p.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:b};for(let O=0;O{if(!c.parser.settings.displayMode)throw new s("{"+c.envName+"} can be used only in display mode.")};function x0(c){if(c.indexOf("ed")===-1)return c.indexOf("*")===-1}function Fi(c,a,u){let{hskipBeforeAndAfter:p,addJot:b,cols:v,arraystretch:_,colSeparationType:E,autoTag:O,singleRow:q,emptySingleRow:Y,maxNumCols:V,leqno:tt}=a;if(c.gullet.beginGroup(),q||c.gullet.macros.set("\\cr","\\\\\\relax"),!_){const xe=c.gullet.expandMacroAsText("\\arraystretch");if(xe==null)_=1;else if(_=parseFloat(xe),!_||_<0)throw new s("Invalid \\arraystretch: "+xe)}c.gullet.beginGroup();let pt=[];const Tt=[pt],Et=[],Kt=[],Gt=O!=null?[]:void 0;function Jt(){O&&c.gullet.macros.set("\\@eqnsw","1",!0)}function oe(){Gt&&(c.gullet.macros.get("\\df@tag")?(Gt.push(c.subparse([new Mr("\\df@tag")])),c.gullet.macros.set("\\df@tag",void 0,!0)):Gt.push(!!O&&c.gullet.macros.get("\\@eqnsw")==="1"))}for(Jt(),Kt.push(Xu(c));;){let xe=c.parseExpression(!1,q?"\\end":"\\\\");c.gullet.endGroup(),c.gullet.beginGroup(),xe={type:"ordgroup",mode:c.mode,body:xe},u&&(xe={type:"styling",mode:c.mode,style:u,body:[xe]}),pt.push(xe);const ir=c.fetch().text;if(ir==="&"){if(V&&pt.length===V){if(q||E)throw new s("Too many tab characters: &",c.nextToken);c.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}c.consume()}else if(ir==="\\end"){oe(),pt.length===1&&xe.type==="styling"&&xe.body[0].body.length===0&&(Tt.length>1||!Y)&&Tt.pop(),Kt.length0&&(Gt+=.25),O.push({pos:Gt,isDashed:ne[fe]})}for(Jt(v[0]),u=0;u0&&(_e+=Kt,we<_e&&(we=_e),_e=0)),c.addJot&&(we+=pt),ve.height=fe,ve.depth=we,Gt+=fe,ve.pos=Gt,Gt+=we+_e,E[u]=ve,Jt(v[u+1])}const oe=Gt/2+a.fontMetrics().axisHeight,xe=c.cols||[],ir=[];let Re,Ar;const Rn=[];if(c.tags&&c.tags.some(ne=>ne))for(u=0;u=_)continue;let we;(p>0||c.hskipBeforeAndAfter)&&(we=T.deflt(ne.pregap,V),we!==0&&(Re=K.makeSpan(["arraycolsep"],[]),Re.style.width=bt(we),ir.push(Re)));let ve=[];for(u=0;u0){const ne=K.makeLineSpan("hline",a,q),fe=K.makeLineSpan("hdashline",a,q),we=[{type:"elem",elem:E,shift:0}];for(;O.length>0;){const ve=O.pop(),Te=ve.pos-oe;ve.isDashed?we.push({type:"elem",elem:fe,shift:Te}):we.push({type:"elem",elem:ne,shift:Te})}E=K.makeVList({positionType:"individualShift",children:we},a)}if(Rn.length===0)return K.makeSpan(["mord"],[E],a);{let ne=K.makeVList({positionType:"individualShift",children:Rn},a);return ne=K.makeSpan(["tag"],[ne],a),K.makeFragment([E,ne])}},dy={c:"center ",l:"left ",r:"right "},Xr=function(c,a){const u=[],p=new mt.MathNode("mtd",[],["mtr-glue"]),b=new mt.MathNode("mtd",[],["mml-eqn-num"]);for(let V=0;V0){const V=c.cols;let tt="",pt=!1,Tt=0,Et=V.length;V[0].type==="separator"&&(E+="top ",Tt=1),V[V.length-1].type==="separator"&&(E+="bottom ",Et-=1);for(let Kt=Tt;Kt0?"left ":"",E+=Y[Y.length-1].length>0?"right ":"";for(let V=1;V-1?"alignat":"align",b=c.envName==="split",v=Fi(c.parser,{cols:u,addJot:!0,autoTag:b?void 0:x0(c.envName),emptySingleRow:!0,colSeparationType:p,maxNumCols:b?2:void 0,leqno:c.parser.settings.leqno},"display");let _,E=0;const O={type:"ordgroup",mode:c.mode,body:[]};if(a[0]&&a[0].type==="ordgroup"){let Y="";for(let V=0;V0&&q&&(tt=1),u[Y]={type:"align",align:V,pregap:tt,postgap:0}}return v.colSeparationType=q?"align":"alignat",v};Gr({type:"array",names:["array","darray"],props:{numArgs:1},handler(c,a){const b=(za(a[0])?[a[0]]:Yt(a[0],"ordgroup").body).map(function(_){const O=o0(_).text;if("lcr".indexOf(O)!==-1)return{type:"align",align:O};if(O==="|")return{type:"separator",separator:"|"};if(O===":")return{type:"separator",separator:":"};throw new s("Unknown column alignment: "+O,_)}),v={cols:b,hskipBeforeAndAfter:!0,maxNumCols:b.length};return Fi(c.parser,v,w0(c.envName))},htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(c){const a={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[c.envName.replace("*","")];let u="c";const p={hskipBeforeAndAfter:!1,cols:[{type:"align",align:u}]};if(c.envName.charAt(c.envName.length-1)==="*"){const _=c.parser;if(_.consumeSpaces(),_.fetch().text==="["){if(_.consume(),_.consumeSpaces(),u=_.fetch().text,"lcr".indexOf(u)===-1)throw new s("Expected l or c or r",_.nextToken);_.consume(),_.consumeSpaces(),_.expect("]"),_.consume(),p.cols=[{type:"align",align:u}]}}const b=Fi(c.parser,p,w0(c.envName)),v=Math.max(0,...b.body.map(_=>_.length));return b.cols=new Array(v).fill({type:"align",align:u}),a?{type:"leftright",mode:c.mode,body:[b],left:a[0],right:a[1],rightColor:void 0}:b},htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(c){const a={arraystretch:.5},u=Fi(c.parser,a,"script");return u.colSeparationType="small",u},htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["subarray"],props:{numArgs:1},handler(c,a){const b=(za(a[0])?[a[0]]:Yt(a[0],"ordgroup").body).map(function(_){const O=o0(_).text;if("lc".indexOf(O)!==-1)return{type:"align",align:O};throw new s("Unknown column alignment: "+O,_)});if(b.length>1)throw new s("{subarray} can contain only one column");let v={cols:b,hskipBeforeAndAfter:!1,arraystretch:.5};if(v=Fi(c.parser,v,"script"),v.body.length>0&&v.body[0].length>1)throw new s("{subarray} can contain only one column");return v},htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(c){const a={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},u=Fi(c.parser,a,w0(c.envName));return{type:"leftright",mode:c.mode,body:[u],left:c.envName.indexOf("r")>-1?".":"\\{",right:c.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Zu,htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(c){T.contains(["gather","gather*"],c.envName)&&Ha(c);const a={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:x0(c.envName),emptySingleRow:!0,leqno:c.parser.settings.leqno};return Fi(c.parser,a,"display")},htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Zu,htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(c){Ha(c);const a={autoTag:x0(c.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:c.parser.settings.leqno};return Fi(c.parser,a,"display")},htmlBuilder:Vr,mathmlBuilder:Xr}),Gr({type:"array",names:["CD"],props:{numArgs:0},handler(c){return Ha(c),ty(c.parser)},htmlBuilder:Vr,mathmlBuilder:Xr}),D("\\nonumber","\\gdef\\@eqnsw{0}"),D("\\notag","\\nonumber"),Ct({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(c,a){throw new s(c.funcName+" valid only within array environment")}});var Ku=Gu;Ct({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(c,a){let{parser:u,funcName:p}=c;const b=a[0];if(b.type!=="ordgroup")throw new s("Invalid environment name",b);let v="";for(let _=0;_{const u=c.font,p=a.withFont(u);return ie(c.body,p)},Ju=(c,a)=>{const u=c.font,p=a.withFont(u);return ge(c.body,p)},tf={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ct({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(c,a)=>{let{parser:u,funcName:p}=c;const b=Ra(a[0]);let v=p;return v in tf&&(v=tf[v]),{type:"font",mode:u.mode,font:v.slice(1),body:b}},htmlBuilder:Qu,mathmlBuilder:Ju}),Ct({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(c,a)=>{let{parser:u}=c;const p=a[0],b=T.isCharacterBox(p);return{type:"mclass",mode:u.mode,mclass:Ia(p),body:[{type:"font",mode:u.mode,font:"boldsymbol",body:p}],isCharacterBox:b}}}),Ct({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(c,a)=>{let{parser:u,funcName:p,breakOnTokenText:b}=c;const{mode:v}=u,_=u.parseExpression(!0,b),E="math"+p.slice(1);return{type:"font",mode:v,font:E,body:{type:"ordgroup",mode:u.mode,body:_}}},htmlBuilder:Qu,mathmlBuilder:Ju});const ef=(c,a)=>{let u=a;return c==="display"?u=u.id>=J.SCRIPT.id?u.text():J.DISPLAY:c==="text"&&u.size===J.DISPLAY.size?u=J.TEXT:c==="script"?u=J.SCRIPT:c==="scriptscript"&&(u=J.SCRIPTSCRIPT),u},k0=(c,a)=>{const u=ef(c.size,a.style),p=u.fracNum(),b=u.fracDen();let v;v=a.havingStyle(p);const _=ie(c.numer,v,a);if(c.continued){const Jt=8.5/a.fontMetrics().ptPerEm,oe=3.5/a.fontMetrics().ptPerEm;_.height=_.height0?tt=3*Y:tt=7*Y,pt=a.fontMetrics().denom1):(q>0?(V=a.fontMetrics().num2,tt=Y):(V=a.fontMetrics().num3,tt=3*Y),pt=a.fontMetrics().denom2);let Tt;if(O){const Jt=a.fontMetrics().axisHeight;V-_.depth-(Jt+.5*q){let u=new mt.MathNode("mfrac",[ge(c.numer,a),ge(c.denom,a)]);if(!c.hasBarLine)u.setAttribute("linethickness","0px");else if(c.barSize){const b=re(c.barSize,a);u.setAttribute("linethickness",bt(b))}const p=ef(c.size,a.style);if(p.size!==a.style.size){u=new mt.MathNode("mstyle",[u]);const b=p.size===J.DISPLAY.size?"true":"false";u.setAttribute("displaystyle",b),u.setAttribute("scriptlevel","0")}if(c.leftDelim!=null||c.rightDelim!=null){const b=[];if(c.leftDelim!=null){const v=new mt.MathNode("mo",[new mt.TextNode(c.leftDelim.replace("\\",""))]);v.setAttribute("fence","true"),b.push(v)}if(b.push(u),c.rightDelim!=null){const v=new mt.MathNode("mo",[new mt.TextNode(c.rightDelim.replace("\\",""))]);v.setAttribute("fence","true"),b.push(v)}return n0(b)}return u};Ct({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(c,a)=>{let{parser:u,funcName:p}=c;const b=a[0],v=a[1];let _,E=null,O=null,q="auto";switch(p){case"\\dfrac":case"\\frac":case"\\tfrac":_=!0;break;case"\\\\atopfrac":_=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":_=!1,E="(",O=")";break;case"\\\\bracefrac":_=!1,E="\\{",O="\\}";break;case"\\\\brackfrac":_=!1,E="[",O="]";break;default:throw new Error("Unrecognized genfrac command")}switch(p){case"\\dfrac":case"\\dbinom":q="display";break;case"\\tfrac":case"\\tbinom":q="text";break}return{type:"genfrac",mode:u.mode,continued:!1,numer:b,denom:v,hasBarLine:_,leftDelim:E,rightDelim:O,size:q,barSize:null}},htmlBuilder:k0,mathmlBuilder:v0}),Ct({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(c,a)=>{let{parser:u,funcName:p}=c;const b=a[0],v=a[1];return{type:"genfrac",mode:u.mode,continued:!0,numer:b,denom:v,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Ct({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(c){let{parser:a,funcName:u,token:p}=c,b;switch(u){case"\\over":b="\\frac";break;case"\\choose":b="\\binom";break;case"\\atop":b="\\\\atopfrac";break;case"\\brace":b="\\\\bracefrac";break;case"\\brack":b="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:a.mode,replaceWith:b,token:p}}});const rf=["display","text","script","scriptscript"],nf=function(c){let a=null;return c.length>0&&(a=c,a=a==="."?null:a),a};Ct({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(c,a){let{parser:u}=c;const p=a[4],b=a[5],v=Ra(a[0]),_=v.type==="atom"&&v.family==="open"?nf(v.text):null,E=Ra(a[1]),O=E.type==="atom"&&E.family==="close"?nf(E.text):null,q=Yt(a[2],"size");let Y,V=null;q.isBlank?Y=!0:(V=q.value,Y=V.number>0);let tt="auto",pt=a[3];if(pt.type==="ordgroup"){if(pt.body.length>0){const Tt=Yt(pt.body[0],"textord");tt=rf[Number(Tt.text)]}}else pt=Yt(pt,"textord"),tt=rf[Number(pt.text)];return{type:"genfrac",mode:u.mode,numer:p,denom:b,continued:!1,hasBarLine:Y,barSize:V,leftDelim:_,rightDelim:O,size:tt}},htmlBuilder:k0,mathmlBuilder:v0}),Ct({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(c,a){let{parser:u,funcName:p,token:b}=c;return{type:"infix",mode:u.mode,replaceWith:"\\\\abovefrac",size:Yt(a[0],"size").value,token:b}}}),Ct({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(c,a)=>{let{parser:u,funcName:p}=c;const b=a[0],v=S(Yt(a[1],"infix").size),_=a[2],E=v.number>0;return{type:"genfrac",mode:u.mode,numer:b,denom:_,continued:!1,hasBarLine:E,barSize:v,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:k0,mathmlBuilder:v0});const sf=(c,a)=>{const u=a.style;let p,b;c.type==="supsub"?(p=c.sup?ie(c.sup,a.havingStyle(u.sup()),a):ie(c.sub,a.havingStyle(u.sub()),a),b=Yt(c.base,"horizBrace")):b=Yt(c,"horizBrace");const v=ie(b.base,a.havingBaseStyle(J.DISPLAY)),_=ui.svgSpan(b,a);let E;if(b.isOver?(E=K.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:v},{type:"kern",size:.1},{type:"elem",elem:_}]},a),E.children[0].children[0].children[1].classes.push("svg-align")):(E=K.makeVList({positionType:"bottom",positionData:v.depth+.1+_.height,children:[{type:"elem",elem:_},{type:"kern",size:.1},{type:"elem",elem:v}]},a),E.children[0].children[0].children[0].classes.push("svg-align")),p){const O=K.makeSpan(["mord",b.isOver?"mover":"munder"],[E],a);b.isOver?E=K.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:O},{type:"kern",size:.2},{type:"elem",elem:p}]},a):E=K.makeVList({positionType:"bottom",positionData:O.depth+.2+p.height+p.depth,children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:O}]},a)}return K.makeSpan(["mord",b.isOver?"mover":"munder"],[E],a)};Ct({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(c,a){let{parser:u,funcName:p}=c;return{type:"horizBrace",mode:u.mode,label:p,isOver:/^\\over/.test(p),base:a[0]}},htmlBuilder:sf,mathmlBuilder:(c,a)=>{const u=ui.mathMLnode(c.label);return new mt.MathNode(c.isOver?"mover":"munder",[ge(c.base,a),u])}}),Ct({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(c,a)=>{let{parser:u}=c;const p=a[1],b=Yt(a[0],"url").url;return u.settings.isTrusted({command:"\\href",url:b})?{type:"href",mode:u.mode,href:b,body:Me(p)}:u.formatUnsupportedCmd("\\href")},htmlBuilder:(c,a)=>{const u=Oe(c.body,a,!1);return K.makeAnchor(c.href,[],u,a)},mathmlBuilder:(c,a)=>{let u=Di(c.body,a);return u instanceof xr||(u=new xr("mrow",[u])),u.setAttribute("href",c.href),u}}),Ct({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(c,a)=>{let{parser:u}=c;const p=Yt(a[0],"url").url;if(!u.settings.isTrusted({command:"\\url",url:p}))return u.formatUnsupportedCmd("\\url");const b=[];for(let _=0;_{let{parser:u,funcName:p,token:b}=c;const v=Yt(a[0],"raw").string,_=a[1];u.settings.strict&&u.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let E;const O={};switch(p){case"\\htmlClass":O.class=v,E={command:"\\htmlClass",class:v};break;case"\\htmlId":O.id=v,E={command:"\\htmlId",id:v};break;case"\\htmlStyle":O.style=v,E={command:"\\htmlStyle",style:v};break;case"\\htmlData":{const q=v.split(",");for(let Y=0;Y{const u=Oe(c.body,a,!1),p=["enclosing"];c.attributes.class&&p.push(...c.attributes.class.trim().split(/\s+/));const b=K.makeSpan(p,u,a);for(const v in c.attributes)v!=="class"&&c.attributes.hasOwnProperty(v)&&b.setAttribute(v,c.attributes[v]);return b},mathmlBuilder:(c,a)=>Di(c.body,a)}),Ct({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(c,a)=>{let{parser:u}=c;return{type:"htmlmathml",mode:u.mode,html:Me(a[0]),mathml:Me(a[1])}},htmlBuilder:(c,a)=>{const u=Oe(c.html,a,!1);return K.makeFragment(u)},mathmlBuilder:(c,a)=>Di(c.mathml,a)});const C0=function(c){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(c))return{number:+c,unit:"bp"};{const a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(c);if(!a)throw new s("Invalid size: '"+c+"' in \\includegraphics");const u={number:+(a[1]+a[2]),unit:a[3]};if(!Yi(u))throw new s("Invalid unit: '"+u.unit+"' in \\includegraphics.");return u}};Ct({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(c,a,u)=>{let{parser:p}=c,b={number:0,unit:"em"},v={number:.9,unit:"em"},_={number:0,unit:"em"},E="";if(u[0]){const Y=Yt(u[0],"raw").string.split(",");for(let V=0;V{const u=re(c.height,a);let p=0;c.totalheight.number>0&&(p=re(c.totalheight,a)-u);let b=0;c.width.number>0&&(b=re(c.width,a));const v={height:bt(u+p)};b>0&&(v.width=bt(b)),p>0&&(v.verticalAlign=bt(-p));const _=new Zl(c.src,c.alt,v);return _.height=u,_.depth=p,_},mathmlBuilder:(c,a)=>{const u=new mt.MathNode("mglyph",[]);u.setAttribute("alt",c.alt);const p=re(c.height,a);let b=0;if(c.totalheight.number>0&&(b=re(c.totalheight,a)-p,u.setAttribute("valign",bt(-b))),u.setAttribute("height",bt(p+b)),c.width.number>0){const v=re(c.width,a);u.setAttribute("width",bt(v))}return u.setAttribute("src",c.src),u}}),Ct({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(c,a){let{parser:u,funcName:p}=c;const b=Yt(a[0],"size");if(u.settings.strict){const v=p[1]==="m",_=b.value.unit==="mu";v?(_||u.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" supports only mu units, "+("not "+b.value.unit+" units")),u.mode!=="math"&&u.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" works only in math mode")):_&&u.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" doesn't support mu units")}return{type:"kern",mode:u.mode,dimension:b.value}},htmlBuilder(c,a){return K.makeGlue(c.dimension,a)},mathmlBuilder(c,a){const u=re(c.dimension,a);return new mt.SpaceNode(u)}}),Ct({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(c,a)=>{let{parser:u,funcName:p}=c;const b=a[0];return{type:"lap",mode:u.mode,alignment:p.slice(5),body:b}},htmlBuilder:(c,a)=>{let u;c.alignment==="clap"?(u=K.makeSpan([],[ie(c.body,a)]),u=K.makeSpan(["inner"],[u],a)):u=K.makeSpan(["inner"],[ie(c.body,a)]);const p=K.makeSpan(["fix"],[]);let b=K.makeSpan([c.alignment],[u,p],a);const v=K.makeSpan(["strut"]);return v.style.height=bt(b.height+b.depth),b.depth&&(v.style.verticalAlign=bt(-b.depth)),b.children.unshift(v),b=K.makeSpan(["thinbox"],[b],a),K.makeSpan(["mord","vbox"],[b],a)},mathmlBuilder:(c,a)=>{const u=new mt.MathNode("mpadded",[ge(c.body,a)]);if(c.alignment!=="rlap"){const p=c.alignment==="llap"?"-1":"-0.5";u.setAttribute("lspace",p+"width")}return u.setAttribute("width","0px"),u}}),Ct({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(c,a){let{funcName:u,parser:p}=c;const b=p.mode;p.switchMode("math");const v=u==="\\("?"\\)":"$",_=p.parseExpression(!1,v);return p.expect(v),p.switchMode(b),{type:"styling",mode:p.mode,style:"text",body:_}}}),Ct({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(c,a){throw new s("Mismatched "+c.funcName)}});const af=(c,a)=>{switch(a.style.size){case J.DISPLAY.size:return c.display;case J.TEXT.size:return c.text;case J.SCRIPT.size:return c.script;case J.SCRIPTSCRIPT.size:return c.scriptscript;default:return c.text}};Ct({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(c,a)=>{let{parser:u}=c;return{type:"mathchoice",mode:u.mode,display:Me(a[0]),text:Me(a[1]),script:Me(a[2]),scriptscript:Me(a[3])}},htmlBuilder:(c,a)=>{const u=af(c,a),p=Oe(u,a,!1);return K.makeFragment(p)},mathmlBuilder:(c,a)=>{const u=af(c,a);return Di(u,a)}});const of=(c,a,u,p,b,v,_)=>{c=K.makeSpan([],[c]);const E=u&&T.isCharacterBox(u);let O,q;if(a){const tt=ie(a,p.havingStyle(b.sup()),p);q={elem:tt,kern:Math.max(p.fontMetrics().bigOpSpacing1,p.fontMetrics().bigOpSpacing3-tt.depth)}}if(u){const tt=ie(u,p.havingStyle(b.sub()),p);O={elem:tt,kern:Math.max(p.fontMetrics().bigOpSpacing2,p.fontMetrics().bigOpSpacing4-tt.height)}}let Y;if(q&&O){const tt=p.fontMetrics().bigOpSpacing5+O.elem.height+O.elem.depth+O.kern+c.depth+_;Y=K.makeVList({positionType:"bottom",positionData:tt,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:O.elem,marginLeft:bt(-v)},{type:"kern",size:O.kern},{type:"elem",elem:c},{type:"kern",size:q.kern},{type:"elem",elem:q.elem,marginLeft:bt(v)},{type:"kern",size:p.fontMetrics().bigOpSpacing5}]},p)}else if(O){const tt=c.height-_;Y=K.makeVList({positionType:"top",positionData:tt,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:O.elem,marginLeft:bt(-v)},{type:"kern",size:O.kern},{type:"elem",elem:c}]},p)}else if(q){const tt=c.depth+_;Y=K.makeVList({positionType:"bottom",positionData:tt,children:[{type:"elem",elem:c},{type:"kern",size:q.kern},{type:"elem",elem:q.elem,marginLeft:bt(v)},{type:"kern",size:p.fontMetrics().bigOpSpacing5}]},p)}else return c;const V=[Y];if(O&&v!==0&&!E){const tt=K.makeSpan(["mspace"],[],p);tt.style.marginRight=bt(v),V.unshift(tt)}return K.makeSpan(["mop","op-limits"],V,p)},lf=["\\smallint"],On=(c,a)=>{let u,p,b=!1,v;c.type==="supsub"?(u=c.sup,p=c.sub,v=Yt(c.base,"op"),b=!0):v=Yt(c,"op");const _=a.style;let E=!1;_.size===J.DISPLAY.size&&v.symbol&&!T.contains(lf,v.name)&&(E=!0);let O;if(v.symbol){const V=E?"Size2-Regular":"Size1-Regular";let tt="";if((v.name==="\\oiint"||v.name==="\\oiiint")&&(tt=v.name.slice(1),v.name=tt==="oiint"?"\\iint":"\\iiint"),O=K.makeSymbol(v.name,V,"math",a,["mop","op-symbol",E?"large-op":"small-op"]),tt.length>0){const pt=O.italic,Tt=K.staticSvg(tt+"Size"+(E?"2":"1"),a);O=K.makeVList({positionType:"individualShift",children:[{type:"elem",elem:O,shift:0},{type:"elem",elem:Tt,shift:E?.08:0}]},a),v.name="\\"+tt,O.classes.unshift("mop"),O.italic=pt}}else if(v.body){const V=Oe(v.body,a,!0);V.length===1&&V[0]instanceof ae?(O=V[0],O.classes[0]="mop"):O=K.makeSpan(["mop"],V,a)}else{const V=[];for(let tt=1;tt{let u;if(c.symbol)u=new xr("mo",[Tr(c.name,c.mode)]),T.contains(lf,c.name)&&u.setAttribute("largeop","false");else if(c.body)u=new xr("mo",fr(c.body,a));else{u=new xr("mi",[new Yr(c.name.slice(1))]);const p=new xr("mo",[Tr("⁡","text")]);c.parentIsSupSub?u=new xr("mrow",[u,p]):u=Su([u,p])}return u},py={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ct({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(c,a)=>{let{parser:u,funcName:p}=c,b=p;return b.length===1&&(b=py[b]),{type:"op",mode:u.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:b}},htmlBuilder:On,mathmlBuilder:ks}),Ct({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(c,a)=>{let{parser:u}=c;const p=a[0];return{type:"op",mode:u.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Me(p)}},htmlBuilder:On,mathmlBuilder:ks});const my={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ct({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(c){let{parser:a,funcName:u}=c;return{type:"op",mode:a.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:u}},htmlBuilder:On,mathmlBuilder:ks}),Ct({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(c){let{parser:a,funcName:u}=c;return{type:"op",mode:a.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:u}},htmlBuilder:On,mathmlBuilder:ks}),Ct({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(c){let{parser:a,funcName:u}=c,p=u;return p.length===1&&(p=my[p]),{type:"op",mode:a.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:p}},htmlBuilder:On,mathmlBuilder:ks});const cf=(c,a)=>{let u,p,b=!1,v;c.type==="supsub"?(u=c.sup,p=c.sub,v=Yt(c.base,"operatorname"),b=!0):v=Yt(c,"operatorname");let _;if(v.body.length>0){const E=v.body.map(q=>{const Y=q.text;return typeof Y=="string"?{type:"textord",mode:q.mode,text:Y}:q}),O=Oe(E,a.withFont("mathrm"),!0);for(let q=0;q{let{parser:u,funcName:p}=c;const b=a[0];return{type:"operatorname",mode:u.mode,body:Me(b),alwaysHandleSupSub:p==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:cf,mathmlBuilder:(c,a)=>{let u=fr(c.body,a.withFont("mathrm")),p=!0;for(let _=0;_E.toText()).join("");u=[new mt.TextNode(_)]}const b=new mt.MathNode("mi",u);b.setAttribute("mathvariant","normal");const v=new mt.MathNode("mo",[Tr("⁡","text")]);return c.parentIsSupSub?new mt.MathNode("mrow",[b,v]):mt.newDocumentFragment([b,v])}}),D("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ki({type:"ordgroup",htmlBuilder(c,a){return c.semisimple?K.makeFragment(Oe(c.body,a,!1)):K.makeSpan(["mord"],Oe(c.body,a,!0),a)},mathmlBuilder(c,a){return Di(c.body,a,!0)}}),Ct({type:"overline",names:["\\overline"],props:{numArgs:1},handler(c,a){let{parser:u}=c;const p=a[0];return{type:"overline",mode:u.mode,body:p}},htmlBuilder(c,a){const u=ie(c.body,a.havingCrampedStyle()),p=K.makeLineSpan("overline-line",a),b=a.fontMetrics().defaultRuleThickness,v=K.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:3*b},{type:"elem",elem:p},{type:"kern",size:b}]},a);return K.makeSpan(["mord","overline"],[v],a)},mathmlBuilder(c,a){const u=new mt.MathNode("mo",[new mt.TextNode("‾")]);u.setAttribute("stretchy","true");const p=new mt.MathNode("mover",[ge(c.body,a),u]);return p.setAttribute("accent","true"),p}}),Ct({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(c,a)=>{let{parser:u}=c;const p=a[0];return{type:"phantom",mode:u.mode,body:Me(p)}},htmlBuilder:(c,a)=>{const u=Oe(c.body,a.withPhantom(),!1);return K.makeFragment(u)},mathmlBuilder:(c,a)=>{const u=fr(c.body,a);return new mt.MathNode("mphantom",u)}}),Ct({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(c,a)=>{let{parser:u}=c;const p=a[0];return{type:"hphantom",mode:u.mode,body:p}},htmlBuilder:(c,a)=>{let u=K.makeSpan([],[ie(c.body,a.withPhantom())]);if(u.height=0,u.depth=0,u.children)for(let p=0;p{const u=fr(Me(c.body),a),p=new mt.MathNode("mphantom",u),b=new mt.MathNode("mpadded",[p]);return b.setAttribute("height","0px"),b.setAttribute("depth","0px"),b}}),Ct({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(c,a)=>{let{parser:u}=c;const p=a[0];return{type:"vphantom",mode:u.mode,body:p}},htmlBuilder:(c,a)=>{const u=K.makeSpan(["inner"],[ie(c.body,a.withPhantom())]),p=K.makeSpan(["fix"],[]);return K.makeSpan(["mord","rlap"],[u,p],a)},mathmlBuilder:(c,a)=>{const u=fr(Me(c.body),a),p=new mt.MathNode("mphantom",u),b=new mt.MathNode("mpadded",[p]);return b.setAttribute("width","0px"),b}}),Ct({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(c,a){let{parser:u}=c;const p=Yt(a[0],"size").value,b=a[1];return{type:"raisebox",mode:u.mode,dy:p,body:b}},htmlBuilder(c,a){const u=ie(c.body,a),p=re(c.dy,a);return K.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:u}]},a)},mathmlBuilder(c,a){const u=new mt.MathNode("mpadded",[ge(c.body,a)]),p=c.dy.number+c.dy.unit;return u.setAttribute("voffset",p),u}}),Ct({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(c){let{parser:a}=c;return{type:"internal",mode:a.mode}}}),Ct({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(c,a,u){let{parser:p}=c;const b=u[0],v=Yt(a[0],"size"),_=Yt(a[1],"size");return{type:"rule",mode:p.mode,shift:b&&Yt(b,"size").value,width:v.value,height:_.value}},htmlBuilder(c,a){const u=K.makeSpan(["mord","rule"],[],a),p=re(c.width,a),b=re(c.height,a),v=c.shift?re(c.shift,a):0;return u.style.borderRightWidth=bt(p),u.style.borderTopWidth=bt(b),u.style.bottom=bt(v),u.width=p,u.height=b+v,u.depth=-v,u.maxFontSize=b*1.125*a.sizeMultiplier,u},mathmlBuilder(c,a){const u=re(c.width,a),p=re(c.height,a),b=c.shift?re(c.shift,a):0,v=a.color&&a.getColor()||"black",_=new mt.MathNode("mspace");_.setAttribute("mathbackground",v),_.setAttribute("width",bt(u)),_.setAttribute("height",bt(p));const E=new mt.MathNode("mpadded",[_]);return b>=0?E.setAttribute("height",bt(b)):(E.setAttribute("height",bt(b)),E.setAttribute("depth",bt(-b))),E.setAttribute("voffset",bt(b)),E}});function hf(c,a,u){const p=Oe(c,a,!1),b=a.sizeMultiplier/u.sizeMultiplier;for(let v=0;v{let{breakOnTokenText:u,funcName:p,parser:b}=c;const v=b.parseExpression(!1,u);return{type:"sizing",mode:b.mode,size:uf.indexOf(p)+1,body:v}},htmlBuilder:(c,a)=>{const u=a.havingSize(c.size);return hf(c.body,u,a)},mathmlBuilder:(c,a)=>{const u=a.havingSize(c.size),p=fr(c.body,u),b=new mt.MathNode("mstyle",p);return b.setAttribute("mathsize",bt(u.sizeMultiplier)),b}}),Ct({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(c,a,u)=>{let{parser:p}=c,b=!1,v=!1;const _=u[0]&&Yt(u[0],"ordgroup");if(_){let O="";for(let q=0;q<_.body.length;++q)if(O=_.body[q].text,O==="t")b=!0;else if(O==="b")v=!0;else{b=!1,v=!1;break}}else b=!0,v=!0;const E=a[0];return{type:"smash",mode:p.mode,body:E,smashHeight:b,smashDepth:v}},htmlBuilder:(c,a)=>{const u=K.makeSpan([],[ie(c.body,a)]);if(!c.smashHeight&&!c.smashDepth)return u;if(c.smashHeight&&(u.height=0,u.children))for(let b=0;b{const u=new mt.MathNode("mpadded",[ge(c.body,a)]);return c.smashHeight&&u.setAttribute("height","0px"),c.smashDepth&&u.setAttribute("depth","0px"),u}}),Ct({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(c,a,u){let{parser:p}=c;const b=u[0],v=a[0];return{type:"sqrt",mode:p.mode,body:v,index:b}},htmlBuilder(c,a){let u=ie(c.body,a.havingCrampedStyle());u.height===0&&(u.height=a.fontMetrics().xHeight),u=K.wrapFragment(u,a);const b=a.fontMetrics().defaultRuleThickness;let v=b;a.style.idu.height+u.depth+_&&(_=(_+V-u.height-u.depth)/2);const tt=O.height-u.height-_-q;u.style.paddingLeft=bt(Y);const pt=K.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u,wrapperClasses:["svg-align"]},{type:"kern",size:-(u.height+tt)},{type:"elem",elem:O},{type:"kern",size:q}]},a);if(c.index){const Tt=a.havingStyle(J.SCRIPTSCRIPT),Et=ie(c.index,Tt,a),Kt=.6*(pt.height-pt.depth),Gt=K.makeVList({positionType:"shift",positionData:-Kt,children:[{type:"elem",elem:Et}]},a),Jt=K.makeSpan(["root"],[Gt]);return K.makeSpan(["mord","sqrt"],[Jt,pt],a)}else return K.makeSpan(["mord","sqrt"],[pt],a)},mathmlBuilder(c,a){const{body:u,index:p}=c;return p?new mt.MathNode("mroot",[ge(u,a),ge(p,a)]):new mt.MathNode("msqrt",[ge(u,a)])}});const ff={display:J.DISPLAY,text:J.TEXT,script:J.SCRIPT,scriptscript:J.SCRIPTSCRIPT};Ct({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(c,a){let{breakOnTokenText:u,funcName:p,parser:b}=c;const v=b.parseExpression(!0,u),_=p.slice(1,p.length-5);return{type:"styling",mode:b.mode,style:_,body:v}},htmlBuilder(c,a){const u=ff[c.style],p=a.havingStyle(u).withFont("");return hf(c.body,p,a)},mathmlBuilder(c,a){const u=ff[c.style],p=a.havingStyle(u),b=fr(c.body,p),v=new mt.MathNode("mstyle",b),E={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[c.style];return v.setAttribute("scriptlevel",E[0]),v.setAttribute("displaystyle",E[1]),v}});const gy=function(c,a){const u=c.base;return u?u.type==="op"?u.limits&&(a.style.size===J.DISPLAY.size||u.alwaysHandleSupSub)?On:null:u.type==="operatorname"?u.alwaysHandleSupSub&&(a.style.size===J.DISPLAY.size||u.limits)?cf:null:u.type==="accent"?T.isCharacterBox(u.base)?l0:null:u.type==="horizBrace"&&!c.sub===u.isOver?sf:null:null};Ki({type:"supsub",htmlBuilder(c,a){const u=gy(c,a);if(u)return u(c,a);const{base:p,sup:b,sub:v}=c,_=ie(p,a);let E,O;const q=a.fontMetrics();let Y=0,V=0;const tt=p&&T.isCharacterBox(p);if(b){const oe=a.havingStyle(a.style.sup());E=ie(b,oe,a),tt||(Y=_.height-oe.fontMetrics().supDrop*oe.sizeMultiplier/a.sizeMultiplier)}if(v){const oe=a.havingStyle(a.style.sub());O=ie(v,oe,a),tt||(V=_.depth+oe.fontMetrics().subDrop*oe.sizeMultiplier/a.sizeMultiplier)}let pt;a.style===J.DISPLAY?pt=q.sup1:a.style.cramped?pt=q.sup3:pt=q.sup2;const Tt=a.sizeMultiplier,Et=bt(.5/q.ptPerEm/Tt);let Kt=null;if(O){const oe=c.base&&c.base.type==="op"&&c.base.name&&(c.base.name==="\\oiint"||c.base.name==="\\oiiint");(_ instanceof ae||oe)&&(Kt=bt(-_.italic))}let Gt;if(E&&O){Y=Math.max(Y,pt,E.depth+.25*q.xHeight),V=Math.max(V,q.sub2);const xe=4*q.defaultRuleThickness;if(Y-E.depth-(O.height-V)0&&(Y+=Re,V-=Re)}const ir=[{type:"elem",elem:O,shift:V,marginRight:Et,marginLeft:Kt},{type:"elem",elem:E,shift:-Y,marginRight:Et}];Gt=K.makeVList({positionType:"individualShift",children:ir},a)}else if(O){V=Math.max(V,q.sub1,O.height-.8*q.xHeight);const oe=[{type:"elem",elem:O,marginLeft:Kt,marginRight:Et}];Gt=K.makeVList({positionType:"shift",positionData:V,children:oe},a)}else if(E)Y=Math.max(Y,pt,E.depth+.25*q.xHeight),Gt=K.makeVList({positionType:"shift",positionData:-Y,children:[{type:"elem",elem:E,marginRight:Et}]},a);else throw new Error("supsub must have either sup or sub.");const Jt=r0(_,"right")||"mord";return K.makeSpan([Jt],[_,K.makeSpan(["msupsub"],[Gt])],a)},mathmlBuilder(c,a){let u=!1,p,b;c.base&&c.base.type==="horizBrace"&&(b=!!c.sup,b===c.base.isOver&&(u=!0,p=c.base.isOver)),c.base&&(c.base.type==="op"||c.base.type==="operatorname")&&(c.base.parentIsSupSub=!0);const v=[ge(c.base,a)];c.sub&&v.push(ge(c.sub,a)),c.sup&&v.push(ge(c.sup,a));let _;if(u)_=p?"mover":"munder";else if(c.sub)if(c.sup){const E=c.base;E&&E.type==="op"&&E.limits&&a.style===J.DISPLAY||E&&E.type==="operatorname"&&E.alwaysHandleSupSub&&(a.style===J.DISPLAY||E.limits)?_="munderover":_="msubsup"}else{const E=c.base;E&&E.type==="op"&&E.limits&&(a.style===J.DISPLAY||E.alwaysHandleSupSub)||E&&E.type==="operatorname"&&E.alwaysHandleSupSub&&(E.limits||a.style===J.DISPLAY)?_="munder":_="msub"}else{const E=c.base;E&&E.type==="op"&&E.limits&&(a.style===J.DISPLAY||E.alwaysHandleSupSub)||E&&E.type==="operatorname"&&E.alwaysHandleSupSub&&(E.limits||a.style===J.DISPLAY)?_="mover":_="msup"}return new mt.MathNode(_,v)}}),Ki({type:"atom",htmlBuilder(c,a){return K.mathsym(c.text,c.mode,a,["m"+c.family])},mathmlBuilder(c,a){const u=new mt.MathNode("mo",[Tr(c.text,c.mode)]);if(c.family==="bin"){const p=s0(c,a);p==="bold-italic"&&u.setAttribute("mathvariant",p)}else c.family==="punct"?u.setAttribute("separator","true"):(c.family==="open"||c.family==="close")&&u.setAttribute("stretchy","false");return u}});const df={mi:"italic",mn:"normal",mtext:"normal"};Ki({type:"mathord",htmlBuilder(c,a){return K.makeOrd(c,a,"mathord")},mathmlBuilder(c,a){const u=new mt.MathNode("mi",[Tr(c.text,c.mode,a)]),p=s0(c,a)||"italic";return p!==df[u.type]&&u.setAttribute("mathvariant",p),u}}),Ki({type:"textord",htmlBuilder(c,a){return K.makeOrd(c,a,"textord")},mathmlBuilder(c,a){const u=Tr(c.text,c.mode,a),p=s0(c,a)||"normal";let b;return c.mode==="text"?b=new mt.MathNode("mtext",[u]):/[0-9]/.test(c.text)?b=new mt.MathNode("mn",[u]):c.text==="\\prime"?b=new mt.MathNode("mo",[u]):b=new mt.MathNode("mi",[u]),p!==df[b.type]&&b.setAttribute("mathvariant",p),b}});const S0={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},_0={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ki({type:"spacing",htmlBuilder(c,a){if(_0.hasOwnProperty(c.text)){const u=_0[c.text].className||"";if(c.mode==="text"){const p=K.makeOrd(c,a,"textord");return p.classes.push(u),p}else return K.makeSpan(["mspace",u],[K.mathsym(c.text,c.mode,a)],a)}else{if(S0.hasOwnProperty(c.text))return K.makeSpan(["mspace",S0[c.text]],[],a);throw new s('Unknown type of space "'+c.text+'"')}},mathmlBuilder(c,a){let u;if(_0.hasOwnProperty(c.text))u=new mt.MathNode("mtext",[new mt.TextNode(" ")]);else{if(S0.hasOwnProperty(c.text))return new mt.MathNode("mspace");throw new s('Unknown type of space "'+c.text+'"')}return u}});const pf=()=>{const c=new mt.MathNode("mtd",[]);return c.setAttribute("width","50%"),c};Ki({type:"tag",mathmlBuilder(c,a){const u=new mt.MathNode("mtable",[new mt.MathNode("mtr",[pf(),new mt.MathNode("mtd",[Di(c.body,a)]),pf(),new mt.MathNode("mtd",[Di(c.tag,a)])])]);return u.setAttribute("width","100%"),u}});const mf={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},gf={"\\textbf":"textbf","\\textmd":"textmd"},yy={"\\textit":"textit","\\textup":"textup"},yf=(c,a)=>{const u=c.font;if(u){if(mf[u])return a.withTextFontFamily(mf[u]);if(gf[u])return a.withTextFontWeight(gf[u]);if(u==="\\emph")return a.fontShape==="textit"?a.withTextFontShape("textup"):a.withTextFontShape("textit")}else return a;return a.withTextFontShape(yy[u])};Ct({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(c,a){let{parser:u,funcName:p}=c;const b=a[0];return{type:"text",mode:u.mode,body:Me(b),font:p}},htmlBuilder(c,a){const u=yf(c,a),p=Oe(c.body,u,!0);return K.makeSpan(["mord","text"],p,u)},mathmlBuilder(c,a){const u=yf(c,a);return Di(c.body,u)}}),Ct({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(c,a){let{parser:u}=c;return{type:"underline",mode:u.mode,body:a[0]}},htmlBuilder(c,a){const u=ie(c.body,a),p=K.makeLineSpan("underline-line",a),b=a.fontMetrics().defaultRuleThickness,v=K.makeVList({positionType:"top",positionData:u.height,children:[{type:"kern",size:b},{type:"elem",elem:p},{type:"kern",size:3*b},{type:"elem",elem:u}]},a);return K.makeSpan(["mord","underline"],[v],a)},mathmlBuilder(c,a){const u=new mt.MathNode("mo",[new mt.TextNode("‾")]);u.setAttribute("stretchy","true");const p=new mt.MathNode("munder",[ge(c.body,a),u]);return p.setAttribute("accentunder","true"),p}}),Ct({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(c,a){let{parser:u}=c;return{type:"vcenter",mode:u.mode,body:a[0]}},htmlBuilder(c,a){const u=ie(c.body,a),p=a.fontMetrics().axisHeight,b=.5*(u.height-p-(u.depth+p));return K.makeVList({positionType:"shift",positionData:b,children:[{type:"elem",elem:u}]},a)},mathmlBuilder(c,a){return new mt.MathNode("mpadded",[ge(c.body,a)],["vcenter"])}}),Ct({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(c,a,u){throw new s("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(c,a){const u=bf(c),p=[],b=a.havingStyle(a.style.text());for(let v=0;vc.body.replace(/ /g,c.star?"␣":" ");var Qi=vu;const xf=`[ \r ]`,by="\\\\[a-zA-Z@]+",xy="\\\\[^\uD800-\uDFFF]",wy="("+by+")"+xf+"*",ky=`\\\\( |[ \r ]+ ?)[ \r ]*`,T0="[̀-ͯ]",vy=new RegExp(T0+"+$"),Cy="("+xf+"+)|"+(ky+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(T0+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(T0+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+wy)+("|"+xy+")");class wf{constructor(a,u){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=a,this.settings=u,this.tokenRegex=new RegExp(Cy,"g"),this.catcodes={"%":14,"~":13}}setCatcode(a,u){this.catcodes[a]=u}lex(){const a=this.input,u=this.tokenRegex.lastIndex;if(u===a.length)return new Mr("EOF",new wr(this,u,u));const p=this.tokenRegex.exec(a);if(p===null||p.index!==u)throw new s("Unexpected character: '"+a[u]+"'",new Mr(a[u],new wr(this,u,u+1)));const b=p[6]||p[3]||(p[2]?"\\ ":" ");if(this.catcodes[b]===14){const v=a.indexOf(` `,this.tokenRegex.lastIndex);return v===-1?(this.tokenRegex.lastIndex=a.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=v+1,this.lex()}return new Mr(b,new wr(this,u,this.tokenRegex.lastIndex))}}class Sy{constructor(a,u){a===void 0&&(a={}),u===void 0&&(u={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=u,this.builtins=a,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new s("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const a=this.undefStack.pop();for(const u in a)a.hasOwnProperty(u)&&(a[u]==null?delete this.current[u]:this.current[u]=a[u])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(a){return this.current.hasOwnProperty(a)||this.builtins.hasOwnProperty(a)}get(a){return this.current.hasOwnProperty(a)?this.current[a]:this.builtins[a]}set(a,u,p){if(p===void 0&&(p=!1),p){for(let b=0;b0&&(this.undefStack[this.undefStack.length-1][a]=u)}else{const b=this.undefStack[this.undefStack.length-1];b&&!b.hasOwnProperty(a)&&(b[a]=this.current[a])}u==null?delete this.current[a]:this.current[a]=u}}var _y=Vu;D("\\noexpand",function(c){const a=c.popToken();return c.isExpandable(a.text)&&(a.noexpand=!0,a.treatAsRelax=!0),{tokens:[a],numArgs:0}}),D("\\expandafter",function(c){const a=c.popToken();return c.expandOnce(!0),{tokens:[a],numArgs:0}}),D("\\@firstoftwo",function(c){return{tokens:c.consumeArgs(2)[0],numArgs:0}}),D("\\@secondoftwo",function(c){return{tokens:c.consumeArgs(2)[1],numArgs:0}}),D("\\@ifnextchar",function(c){const a=c.consumeArgs(3);c.consumeSpaces();const u=c.future();return a[0].length===1&&a[0][0].text===u.text?{tokens:a[1],numArgs:0}:{tokens:a[2],numArgs:0}}),D("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),D("\\TextOrMath",function(c){const a=c.consumeArgs(2);return c.mode==="text"?{tokens:a[0],numArgs:0}:{tokens:a[1],numArgs:0}});const kf={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};D("\\char",function(c){let a=c.popToken(),u,p="";if(a.text==="'")u=8,a=c.popToken();else if(a.text==='"')u=16,a=c.popToken();else if(a.text==="`")if(a=c.popToken(),a.text[0]==="\\")p=a.text.charCodeAt(1);else{if(a.text==="EOF")throw new s("\\char` missing argument");p=a.text.charCodeAt(0)}else u=10;if(u){if(p=kf[a.text],p==null||p>=u)throw new s("Invalid base-"+u+" digit "+a.text);let b;for(;(b=kf[c.future().text])!=null&&b{let b=c.consumeArg().tokens;if(b.length!==1)throw new s("\\newcommand's first argument must be a macro name");const v=b[0].text,_=c.isDefined(v);if(_&&!a)throw new s("\\newcommand{"+v+"} attempting to redefine "+(v+"; use \\renewcommand"));if(!_&&!u)throw new s("\\renewcommand{"+v+"} when command "+v+" does not yet exist; use \\newcommand");let E=0;if(b=c.consumeArg().tokens,b.length===1&&b[0].text==="["){let O="",q=c.expandNextToken();for(;q.text!=="]"&&q.text!=="EOF";)O+=q.text,q=c.expandNextToken();if(!O.match(/^\s*[0-9]+\s*$/))throw new s("Invalid number of arguments: "+O);E=parseInt(O),b=c.consumeArg().tokens}return _&&p||c.macros.set(v,{tokens:b,numArgs:E}),""};D("\\newcommand",c=>M0(c,!1,!0,!1)),D("\\renewcommand",c=>M0(c,!0,!1,!1)),D("\\providecommand",c=>M0(c,!0,!0,!0)),D("\\message",c=>{const a=c.consumeArgs(1)[0];return""}),D("\\errmessage",c=>{const a=c.consumeArgs(1)[0];return""}),D("\\show",c=>{const u=c.popToken().text;return""}),D("\\bgroup","{"),D("\\egroup","}"),D("~","\\nobreakspace"),D("\\lq","`"),D("\\rq","'"),D("\\aa","\\r a"),D("\\AA","\\r A"),D("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),D("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),D("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),D("ℬ","\\mathscr{B}"),D("ℰ","\\mathscr{E}"),D("ℱ","\\mathscr{F}"),D("ℋ","\\mathscr{H}"),D("ℐ","\\mathscr{I}"),D("ℒ","\\mathscr{L}"),D("ℳ","\\mathscr{M}"),D("ℛ","\\mathscr{R}"),D("ℭ","\\mathfrak{C}"),D("ℌ","\\mathfrak{H}"),D("ℨ","\\mathfrak{Z}"),D("\\Bbbk","\\Bbb{k}"),D("·","\\cdotp"),D("\\llap","\\mathllap{\\textrm{#1}}"),D("\\rlap","\\mathrlap{\\textrm{#1}}"),D("\\clap","\\mathclap{\\textrm{#1}}"),D("\\mathstrut","\\vphantom{(}"),D("\\underbar","\\underline{\\text{#1}}"),D("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),D("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),D("\\ne","\\neq"),D("≠","\\neq"),D("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),D("∉","\\notin"),D("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),D("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),D("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),D("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),D("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),D("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),D("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),D("⟂","\\perp"),D("‼","\\mathclose{!\\mkern-0.8mu!}"),D("∌","\\notni"),D("⌜","\\ulcorner"),D("⌝","\\urcorner"),D("⌞","\\llcorner"),D("⌟","\\lrcorner"),D("©","\\copyright"),D("®","\\textregistered"),D("️","\\textregistered"),D("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),D("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),D("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),D("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),D("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),D("⋮","\\vdots"),D("\\varGamma","\\mathit{\\Gamma}"),D("\\varDelta","\\mathit{\\Delta}"),D("\\varTheta","\\mathit{\\Theta}"),D("\\varLambda","\\mathit{\\Lambda}"),D("\\varXi","\\mathit{\\Xi}"),D("\\varPi","\\mathit{\\Pi}"),D("\\varSigma","\\mathit{\\Sigma}"),D("\\varUpsilon","\\mathit{\\Upsilon}"),D("\\varPhi","\\mathit{\\Phi}"),D("\\varPsi","\\mathit{\\Psi}"),D("\\varOmega","\\mathit{\\Omega}"),D("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),D("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),D("\\boxed","\\fbox{$\\displaystyle{#1}$}"),D("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),D("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),D("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),D("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),D("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const vf={",":"\\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"};D("\\dots",function(c){let a="\\dotso";const u=c.expandAfterFuture().text;return u in vf?a=vf[u]:(u.slice(0,4)==="\\not"||u in be.math&&T.contains(["bin","rel"],be.math[u].group))&&(a="\\dotsb"),a});const A0={")":!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};D("\\dotso",function(c){return c.future().text in A0?"\\ldots\\,":"\\ldots"}),D("\\dotsc",function(c){const a=c.future().text;return a in A0&&a!==","?"\\ldots\\,":"\\ldots"}),D("\\cdots",function(c){return c.future().text in A0?"\\@cdots\\,":"\\@cdots"}),D("\\dotsb","\\cdots"),D("\\dotsm","\\cdots"),D("\\dotsi","\\!\\cdots"),D("\\dotsx","\\ldots\\,"),D("\\DOTSI","\\relax"),D("\\DOTSB","\\relax"),D("\\DOTSX","\\relax"),D("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),D("\\,","\\tmspace+{3mu}{.1667em}"),D("\\thinspace","\\,"),D("\\>","\\mskip{4mu}"),D("\\:","\\tmspace+{4mu}{.2222em}"),D("\\medspace","\\:"),D("\\;","\\tmspace+{5mu}{.2777em}"),D("\\thickspace","\\;"),D("\\!","\\tmspace-{3mu}{.1667em}"),D("\\negthinspace","\\!"),D("\\negmedspace","\\tmspace-{4mu}{.2222em}"),D("\\negthickspace","\\tmspace-{5mu}{.277em}"),D("\\enspace","\\kern.5em "),D("\\enskip","\\hskip.5em\\relax"),D("\\quad","\\hskip1em\\relax"),D("\\qquad","\\hskip2em\\relax"),D("\\tag","\\@ifstar\\tag@literal\\tag@paren"),D("\\tag@paren","\\tag@literal{({#1})}"),D("\\tag@literal",c=>{if(c.macros.get("\\df@tag"))throw new s("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),D("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),D("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),D("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),D("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),D("\\newline","\\\\\\relax"),D("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Cf=bt(er["Main-Regular"]["T".charCodeAt(0)][1]-.7*er["Main-Regular"]["A".charCodeAt(0)][1]);D("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Cf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),D("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Cf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),D("\\hspace","\\@ifstar\\@hspacer\\@hspace"),D("\\@hspace","\\hskip #1\\relax"),D("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),D("\\ordinarycolon",":"),D("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),D("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),D("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),D("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),D("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),D("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),D("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),D("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),D("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),D("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),D("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),D("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),D("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),D("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),D("∷","\\dblcolon"),D("∹","\\eqcolon"),D("≔","\\coloneqq"),D("≕","\\eqqcolon"),D("⩴","\\Coloneqq"),D("\\ratio","\\vcentcolon"),D("\\coloncolon","\\dblcolon"),D("\\colonequals","\\coloneqq"),D("\\coloncolonequals","\\Coloneqq"),D("\\equalscolon","\\eqqcolon"),D("\\equalscoloncolon","\\Eqqcolon"),D("\\colonminus","\\coloneq"),D("\\coloncolonminus","\\Coloneq"),D("\\minuscolon","\\eqcolon"),D("\\minuscoloncolon","\\Eqcolon"),D("\\coloncolonapprox","\\Colonapprox"),D("\\coloncolonsim","\\Colonsim"),D("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),D("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),D("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),D("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),D("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),D("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),D("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),D("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),D("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),D("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),D("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),D("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),D("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),D("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),D("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),D("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),D("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),D("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),D("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),D("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),D("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),D("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),D("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),D("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),D("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),D("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),D("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),D("\\imath","\\html@mathml{\\@imath}{ı}"),D("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),D("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),D("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),D("⟦","\\llbracket"),D("⟧","\\rrbracket"),D("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),D("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),D("⦃","\\lBrace"),D("⦄","\\rBrace"),D("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),D("⦵","\\minuso"),D("\\darr","\\downarrow"),D("\\dArr","\\Downarrow"),D("\\Darr","\\Downarrow"),D("\\lang","\\langle"),D("\\rang","\\rangle"),D("\\uarr","\\uparrow"),D("\\uArr","\\Uparrow"),D("\\Uarr","\\Uparrow"),D("\\N","\\mathbb{N}"),D("\\R","\\mathbb{R}"),D("\\Z","\\mathbb{Z}"),D("\\alef","\\aleph"),D("\\alefsym","\\aleph"),D("\\Alpha","\\mathrm{A}"),D("\\Beta","\\mathrm{B}"),D("\\bull","\\bullet"),D("\\Chi","\\mathrm{X}"),D("\\clubs","\\clubsuit"),D("\\cnums","\\mathbb{C}"),D("\\Complex","\\mathbb{C}"),D("\\Dagger","\\ddagger"),D("\\diamonds","\\diamondsuit"),D("\\empty","\\emptyset"),D("\\Epsilon","\\mathrm{E}"),D("\\Eta","\\mathrm{H}"),D("\\exist","\\exists"),D("\\harr","\\leftrightarrow"),D("\\hArr","\\Leftrightarrow"),D("\\Harr","\\Leftrightarrow"),D("\\hearts","\\heartsuit"),D("\\image","\\Im"),D("\\infin","\\infty"),D("\\Iota","\\mathrm{I}"),D("\\isin","\\in"),D("\\Kappa","\\mathrm{K}"),D("\\larr","\\leftarrow"),D("\\lArr","\\Leftarrow"),D("\\Larr","\\Leftarrow"),D("\\lrarr","\\leftrightarrow"),D("\\lrArr","\\Leftrightarrow"),D("\\Lrarr","\\Leftrightarrow"),D("\\Mu","\\mathrm{M}"),D("\\natnums","\\mathbb{N}"),D("\\Nu","\\mathrm{N}"),D("\\Omicron","\\mathrm{O}"),D("\\plusmn","\\pm"),D("\\rarr","\\rightarrow"),D("\\rArr","\\Rightarrow"),D("\\Rarr","\\Rightarrow"),D("\\real","\\Re"),D("\\reals","\\mathbb{R}"),D("\\Reals","\\mathbb{R}"),D("\\Rho","\\mathrm{P}"),D("\\sdot","\\cdot"),D("\\sect","\\S"),D("\\spades","\\spadesuit"),D("\\sub","\\subset"),D("\\sube","\\subseteq"),D("\\supe","\\supseteq"),D("\\Tau","\\mathrm{T}"),D("\\thetasym","\\vartheta"),D("\\weierp","\\wp"),D("\\Zeta","\\mathrm{Z}"),D("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),D("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),D("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),D("\\bra","\\mathinner{\\langle{#1}|}"),D("\\ket","\\mathinner{|{#1}\\rangle}"),D("\\braket","\\mathinner{\\langle{#1}\\rangle}"),D("\\Bra","\\left\\langle#1\\right|"),D("\\Ket","\\left|#1\\right\\rangle");const Sf=c=>a=>{const u=a.consumeArg().tokens,p=a.consumeArg().tokens,b=a.consumeArg().tokens,v=a.consumeArg().tokens,_=a.macros.get("|"),E=a.macros.get("\\|");a.macros.beginGroup();const O=V=>tt=>{c&&(tt.macros.set("|",_),b.length&&tt.macros.set("\\|",E));let pt=V;return!V&&b.length&&tt.future().text==="|"&&(tt.popToken(),pt=!0),{tokens:pt?b:p,numArgs:0}};a.macros.set("|",O(!1)),b.length&&a.macros.set("\\|",O(!0));const q=a.consumeArg().tokens,Y=a.expandTokens([...v,...q,...u]);return a.macros.endGroup(),{tokens:Y.reverse(),numArgs:0}};D("\\bra@ket",Sf(!1)),D("\\bra@set",Sf(!0)),D("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),D("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),D("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),D("\\angln","{\\angl n}"),D("\\blue","\\textcolor{##6495ed}{#1}"),D("\\orange","\\textcolor{##ffa500}{#1}"),D("\\pink","\\textcolor{##ff00af}{#1}"),D("\\red","\\textcolor{##df0030}{#1}"),D("\\green","\\textcolor{##28ae7b}{#1}"),D("\\gray","\\textcolor{gray}{#1}"),D("\\purple","\\textcolor{##9d38bd}{#1}"),D("\\blueA","\\textcolor{##ccfaff}{#1}"),D("\\blueB","\\textcolor{##80f6ff}{#1}"),D("\\blueC","\\textcolor{##63d9ea}{#1}"),D("\\blueD","\\textcolor{##11accd}{#1}"),D("\\blueE","\\textcolor{##0c7f99}{#1}"),D("\\tealA","\\textcolor{##94fff5}{#1}"),D("\\tealB","\\textcolor{##26edd5}{#1}"),D("\\tealC","\\textcolor{##01d1c1}{#1}"),D("\\tealD","\\textcolor{##01a995}{#1}"),D("\\tealE","\\textcolor{##208170}{#1}"),D("\\greenA","\\textcolor{##b6ffb0}{#1}"),D("\\greenB","\\textcolor{##8af281}{#1}"),D("\\greenC","\\textcolor{##74cf70}{#1}"),D("\\greenD","\\textcolor{##1fab54}{#1}"),D("\\greenE","\\textcolor{##0d923f}{#1}"),D("\\goldA","\\textcolor{##ffd0a9}{#1}"),D("\\goldB","\\textcolor{##ffbb71}{#1}"),D("\\goldC","\\textcolor{##ff9c39}{#1}"),D("\\goldD","\\textcolor{##e07d10}{#1}"),D("\\goldE","\\textcolor{##a75a05}{#1}"),D("\\redA","\\textcolor{##fca9a9}{#1}"),D("\\redB","\\textcolor{##ff8482}{#1}"),D("\\redC","\\textcolor{##f9685d}{#1}"),D("\\redD","\\textcolor{##e84d39}{#1}"),D("\\redE","\\textcolor{##bc2612}{#1}"),D("\\maroonA","\\textcolor{##ffbde0}{#1}"),D("\\maroonB","\\textcolor{##ff92c6}{#1}"),D("\\maroonC","\\textcolor{##ed5fa6}{#1}"),D("\\maroonD","\\textcolor{##ca337c}{#1}"),D("\\maroonE","\\textcolor{##9e034e}{#1}"),D("\\purpleA","\\textcolor{##ddd7ff}{#1}"),D("\\purpleB","\\textcolor{##c6b9fc}{#1}"),D("\\purpleC","\\textcolor{##aa87ff}{#1}"),D("\\purpleD","\\textcolor{##7854ab}{#1}"),D("\\purpleE","\\textcolor{##543b78}{#1}"),D("\\mintA","\\textcolor{##f5f9e8}{#1}"),D("\\mintB","\\textcolor{##edf2df}{#1}"),D("\\mintC","\\textcolor{##e0e5cc}{#1}"),D("\\grayA","\\textcolor{##f6f7f7}{#1}"),D("\\grayB","\\textcolor{##f0f1f2}{#1}"),D("\\grayC","\\textcolor{##e3e5e6}{#1}"),D("\\grayD","\\textcolor{##d6d8da}{#1}"),D("\\grayE","\\textcolor{##babec2}{#1}"),D("\\grayF","\\textcolor{##888d93}{#1}"),D("\\grayG","\\textcolor{##626569}{#1}"),D("\\grayH","\\textcolor{##3b3e40}{#1}"),D("\\grayI","\\textcolor{##21242c}{#1}"),D("\\kaBlue","\\textcolor{##314453}{#1}"),D("\\kaGreen","\\textcolor{##71B307}{#1}");const _f={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Ty{constructor(a,u,p){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=u,this.expansionCount=0,this.feed(a),this.macros=new Sy(_y,u.macros),this.mode=p,this.stack=[]}feed(a){this.lexer=new wf(a,this.settings)}switchMode(a){this.mode=a}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(a){this.stack.push(a)}pushTokens(a){this.stack.push(...a)}scanArgument(a){let u,p,b;if(a){if(this.consumeSpaces(),this.future().text!=="[")return null;u=this.popToken(),{tokens:b,end:p}=this.consumeArg(["]"])}else({tokens:b,start:u,end:p}=this.consumeArg());return this.pushToken(new Mr("EOF",p.loc)),this.pushTokens(b),u.range(p,"")}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(a){const u=[],p=a&&a.length>0;p||this.consumeSpaces();const b=this.future();let v,_=0,E=0;do{if(v=this.popToken(),u.push(v),v.text==="{")++_;else if(v.text==="}"){if(--_,_===-1)throw new s("Extra }",v)}else if(v.text==="EOF")throw new s("Unexpected end of input in a macro argument, expected '"+(a&&p?a[E]:"}")+"'",v);if(a&&p)if((_===0||_===1&&a[E]==="{")&&v.text===a[E]){if(++E,E===a.length){u.splice(-E,E);break}}else E=0}while(_!==0||p);return b.text==="{"&&u[u.length-1].text==="}"&&(u.pop(),u.shift()),u.reverse(),{tokens:u,start:b,end:v}}consumeArgs(a,u){if(u){if(u.length!==a+1)throw new s("The length of delimiters doesn't match the number of args!");const b=u[0];for(let v=0;vthis.settings.maxExpand)throw new s("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(a){const u=this.popToken(),p=u.text,b=u.noexpand?null:this._getExpansion(p);if(b==null||a&&b.unexpandable){if(a&&b==null&&p[0]==="\\"&&!this.isDefined(p))throw new s("Undefined control sequence: "+p);return this.pushToken(u),!1}this.countExpansion(1);let v=b.tokens;const _=this.consumeArgs(b.numArgs,b.delimiters);if(b.numArgs){v=v.slice();for(let E=v.length-1;E>=0;--E){let O=v[E];if(O.text==="#"){if(E===0)throw new s("Incomplete placeholder at end of macro body",O);if(O=v[--E],O.text==="#")v.splice(E+1,1);else if(/^[1-9]$/.test(O.text))v.splice(E,2,..._[+O.text-1]);else throw new s("Not a valid argument number",O)}}}return this.pushTokens(v),v.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){const a=this.stack.pop();return a.treatAsRelax&&(a.text="\\relax"),a}throw new Error}expandMacro(a){return this.macros.has(a)?this.expandTokens([new Mr(a)]):void 0}expandTokens(a){const u=[],p=this.stack.length;for(this.pushTokens(a);this.stack.length>p;)if(this.expandOnce(!0)===!1){const b=this.stack.pop();b.treatAsRelax&&(b.noexpand=!1,b.treatAsRelax=!1),u.push(b)}return this.countExpansion(u.length),u}expandMacroAsText(a){const u=this.expandMacro(a);return u&&u.map(p=>p.text).join("")}_getExpansion(a){const u=this.macros.get(a);if(u==null)return u;if(a.length===1){const b=this.lexer.catcodes[a];if(b!=null&&b!==13)return}const p=typeof u=="function"?u(this):u;if(typeof p=="string"){let b=0;if(p.indexOf("#")!==-1){const q=p.replace(/##/g,"");for(;q.indexOf("#"+(b+1))!==-1;)++b}const v=new wf(p,this.settings),_=[];let E=v.lex();for(;E.text!=="EOF";)_.push(E),E=v.lex();return _.reverse(),{tokens:_,numArgs:b}}return p}isDefined(a){return this.macros.has(a)||Qi.hasOwnProperty(a)||be.math.hasOwnProperty(a)||be.text.hasOwnProperty(a)||_f.hasOwnProperty(a)}isExpandable(a){const u=this.macros.get(a);return u!=null?typeof u=="string"||typeof u=="function"||!u.unexpandable:Qi.hasOwnProperty(a)&&!Qi[a].primitive}}const Tf=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Wa=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),B0={"́":{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"}},Mf={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Ua{constructor(a,u){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 Ty(a,u,this.mode),this.settings=u,this.leftrightDepth=0}expect(a,u){if(u===void 0&&(u=!0),this.fetch().text!==a)throw new s("Expected '"+a+"', got '"+this.fetch().text+"'",this.fetch());u&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(a){this.mode=a,this.gullet.switchMode(a)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const a=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),a}finally{this.gullet.endGroups()}}subparse(a){const u=this.nextToken;this.consume(),this.gullet.pushToken(new Mr("}")),this.gullet.pushTokens(a);const p=this.parseExpression(!1);return this.expect("}"),this.nextToken=u,p}parseExpression(a,u){const p=[];for(;;){this.mode==="math"&&this.consumeSpaces();const b=this.fetch();if(Ua.endOfExpression.indexOf(b.text)!==-1||u&&b.text===u||a&&Qi[b.text]&&Qi[b.text].infix)break;const v=this.parseAtom(u);if(v){if(v.type==="internal")continue}else break;p.push(v)}return this.mode==="text"&&this.formLigatures(p),this.handleInfixNodes(p)}handleInfixNodes(a){let u=-1,p;for(let b=0;b=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+u[0]+'" used in math mode',a);const v=be[this.mode][u].group,_=wr.range(a);let E;if(La.hasOwnProperty(v)){const O=v;E={type:"atom",mode:this.mode,family:O,loc:_,text:u}}else E={type:v,mode:this.mode,loc:_,text:u};b=E}else if(u.charCodeAt(0)>=128)this.settings.strict&&(st(u.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+u[0]+'" used in math mode',a):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+u[0]+'"'+(" ("+u.charCodeAt(0)+")"),a)),b={type:"textord",mode:"text",loc:wr.range(a),text:u};else return null;if(this.consume(),p)for(let v=0;v