(()=>{var iIe=Object.create;var p9=Object.defineProperty;var aIe=Object.getOwnPropertyDescriptor;var sIe=Object.getOwnPropertyNames;var oIe=Object.getPrototypeOf,lIe=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ke=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Wt=(t,e)=>{for(var r in e)p9(t,r,{get:e[r],enumerable:!0})},d9=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of sIe(e))!lIe.call(t,i)&&i!==r&&p9(t,i,{get:()=>e[i],enumerable:!(n=aIe(e,i))||n.enumerable});return t},Tr=(t,e,r)=>(d9(t,e,"default"),r&&d9(r,e,"default")),Vi=(t,e,r)=>(r=t!=null?iIe(oIe(t)):{},d9(e||!t||!t.__esModule?p9(r,"default",{value:t,enumerable:!0}):r,t));var cIe,b=$(()=>{cIe=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};cIe.SENTRY_RELEASE={id:"95e8e2596ca163e0334ef1c335693ad669b2a58b"}});var HQ=Ke((NFt,uO)=>{b();function UQ(t,e=100,r={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");let{immediate:n}=typeof r=="boolean"?{immediate:r}:r,i,a,s,o,l;function u(){let d=i,p=a;return i=void 0,a=void 0,l=t.apply(d,p),l}function h(){let d=Date.now()-o;d=0?s=setTimeout(h,e-d):(s=void 0,n||(l=u()))}let f=function(...d){if(i&&this!==i&&Object.getPrototypeOf(this)===Object.getPrototypeOf(i))throw new Error("Debounced method called with different contexts of the same prototype.");i=this,a=d,o=Date.now();let p=n&&!s;return s||(s=setTimeout(h,e)),p&&(l=u()),l};return Object.defineProperty(f,"isPending",{get(){return s!==void 0}}),f.clear=()=>{s&&(clearTimeout(s),s=void 0)},f.flush=()=>{s&&f.trigger()},f.trigger=()=>{l=u(),f.clear()},f}uO.exports.debounce=UQ;uO.exports=UQ});var QE=Ke((ZFt,Yee)=>{b();var Kze=Array.isArray;Yee.exports=Kze});var Xee=Ke((JFt,jee)=>{b();var Zze=typeof global=="object"&&global&&global.Object===Object&&global;jee.exports=Zze});var JE=Ke((tBt,Kee)=>{b();var Qze=Xee(),Jze=typeof self=="object"&&self&&self.Object===Object&&self,e$e=Qze||Jze||Function("return this")();Kee.exports=e$e});var eS=Ke((nBt,Zee)=>{b();var t$e=JE(),r$e=t$e.Symbol;Zee.exports=r$e});var tte=Ke((aBt,ete)=>{b();var Qee=eS(),Jee=Object.prototype,n$e=Jee.hasOwnProperty,i$e=Jee.toString,Ox=Qee?Qee.toStringTag:void 0;function a$e(t){var e=n$e.call(t,Ox),r=t[Ox];try{t[Ox]=void 0;var n=!0}catch{}var i=i$e.call(t);return n&&(e?t[Ox]=r:delete t[Ox]),i}ete.exports=a$e});var nte=Ke((oBt,rte)=>{b();var s$e=Object.prototype,o$e=s$e.toString;function l$e(t){return o$e.call(t)}rte.exports=l$e});var _R=Ke((cBt,ste)=>{b();var ite=eS(),c$e=tte(),u$e=nte(),h$e="[object Null]",f$e="[object Undefined]",ate=ite?ite.toStringTag:void 0;function d$e(t){return t==null?t===void 0?f$e:h$e:ate&&ate in Object(t)?c$e(t):u$e(t)}ste.exports=d$e});var lte=Ke((hBt,ote)=>{b();function p$e(t){return t!=null&&typeof t=="object"}ote.exports=p$e});var tS=Ke((dBt,cte)=>{b();var g$e=_R(),m$e=lte(),v$e="[object Symbol]";function y$e(t){return typeof t=="symbol"||m$e(t)&&g$e(t)==v$e}cte.exports=y$e});var hte=Ke((gBt,ute)=>{b();var b$e=QE(),x$e=tS(),w$e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k$e=/^\w*$/;function T$e(t,e){if(b$e(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||x$e(t)?!0:k$e.test(t)||!w$e.test(t)||e!=null&&t in Object(e)}ute.exports=T$e});var rS=Ke((vBt,fte)=>{b();function E$e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}fte.exports=E$e});var pte=Ke((bBt,dte)=>{b();var S$e=_R(),C$e=rS(),_$e="[object AsyncFunction]",A$e="[object Function]",L$e="[object GeneratorFunction]",M$e="[object Proxy]";function D$e(t){if(!C$e(t))return!1;var e=S$e(t);return e==A$e||e==L$e||e==_$e||e==M$e}dte.exports=D$e});var mte=Ke((wBt,gte)=>{b();var O$e=JE(),R$e=O$e["__core-js_shared__"];gte.exports=R$e});var bte=Ke((TBt,yte)=>{b();var AR=mte(),vte=function(){var t=/[^.]+$/.exec(AR&&AR.keys&&AR.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function I$e(t){return!!vte&&vte in t}yte.exports=I$e});var wte=Ke((SBt,xte)=>{b();var N$e=Function.prototype,P$e=N$e.toString;function F$e(t){if(t!=null){try{return P$e.call(t)}catch{}try{return t+""}catch{}}return""}xte.exports=F$e});var Tte=Ke((_Bt,kte)=>{b();var B$e=pte(),z$e=bte(),$$e=rS(),V$e=wte(),U$e=/[\\^$.*+?()[\]{}|]/g,H$e=/^\[object .+?Constructor\]$/,q$e=Function.prototype,W$e=Object.prototype,G$e=q$e.toString,Y$e=W$e.hasOwnProperty,j$e=RegExp("^"+G$e.call(Y$e).replace(U$e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X$e(t){if(!$$e(t)||z$e(t))return!1;var e=B$e(t)?j$e:H$e;return e.test(V$e(t))}kte.exports=X$e});var Ste=Ke((LBt,Ete)=>{b();function K$e(t,e){return t?.[e]}Ete.exports=K$e});var nS=Ke((DBt,Cte)=>{b();var Z$e=Tte(),Q$e=Ste();function J$e(t,e){var r=Q$e(t,e);return Z$e(r)?r:void 0}Cte.exports=J$e});var Rx=Ke((RBt,_te)=>{b();var eVe=nS(),tVe=eVe(Object,"create");_te.exports=tVe});var Mte=Ke((NBt,Lte)=>{b();var Ate=Rx();function rVe(){this.__data__=Ate?Ate(null):{},this.size=0}Lte.exports=rVe});var Ote=Ke((FBt,Dte)=>{b();function nVe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}Dte.exports=nVe});var Ite=Ke((zBt,Rte)=>{b();var iVe=Rx(),aVe="__lodash_hash_undefined__",sVe=Object.prototype,oVe=sVe.hasOwnProperty;function lVe(t){var e=this.__data__;if(iVe){var r=e[t];return r===aVe?void 0:r}return oVe.call(e,t)?e[t]:void 0}Rte.exports=lVe});var Pte=Ke((VBt,Nte)=>{b();var cVe=Rx(),uVe=Object.prototype,hVe=uVe.hasOwnProperty;function fVe(t){var e=this.__data__;return cVe?e[t]!==void 0:hVe.call(e,t)}Nte.exports=fVe});var Bte=Ke((HBt,Fte)=>{b();var dVe=Rx(),pVe="__lodash_hash_undefined__";function gVe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=dVe&&e===void 0?pVe:e,this}Fte.exports=gVe});var $te=Ke((WBt,zte)=>{b();var mVe=Mte(),vVe=Ote(),yVe=Ite(),bVe=Pte(),xVe=Bte();function V1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{b();function wVe(){this.__data__=[],this.size=0}Vte.exports=wVe});var LR=Ke((XBt,Hte)=>{b();function kVe(t,e){return t===e||t!==t&&e!==e}Hte.exports=kVe});var Ix=Ke((ZBt,qte)=>{b();var TVe=LR();function EVe(t,e){for(var r=t.length;r--;)if(TVe(t[r][0],e))return r;return-1}qte.exports=EVe});var Gte=Ke((JBt,Wte)=>{b();var SVe=Ix(),CVe=Array.prototype,_Ve=CVe.splice;function AVe(t){var e=this.__data__,r=SVe(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():_Ve.call(e,r,1),--this.size,!0}Wte.exports=AVe});var jte=Ke((tzt,Yte)=>{b();var LVe=Ix();function MVe(t){var e=this.__data__,r=LVe(e,t);return r<0?void 0:e[r][1]}Yte.exports=MVe});var Kte=Ke((nzt,Xte)=>{b();var DVe=Ix();function OVe(t){return DVe(this.__data__,t)>-1}Xte.exports=OVe});var Qte=Ke((azt,Zte)=>{b();var RVe=Ix();function IVe(t,e){var r=this.__data__,n=RVe(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}Zte.exports=IVe});var ere=Ke((ozt,Jte)=>{b();var NVe=Ute(),PVe=Gte(),FVe=jte(),BVe=Kte(),zVe=Qte();function U1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{b();var $Ve=nS(),VVe=JE(),UVe=$Ve(VVe,"Map");tre.exports=UVe});var are=Ke((hzt,ire)=>{b();var nre=$te(),HVe=ere(),qVe=rre();function WVe(){this.size=0,this.__data__={hash:new nre,map:new(qVe||HVe),string:new nre}}ire.exports=WVe});var ore=Ke((dzt,sre)=>{b();function GVe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}sre.exports=GVe});var Nx=Ke((gzt,lre)=>{b();var YVe=ore();function jVe(t,e){var r=t.__data__;return YVe(e)?r[typeof e=="string"?"string":"hash"]:r.map}lre.exports=jVe});var ure=Ke((vzt,cre)=>{b();var XVe=Nx();function KVe(t){var e=XVe(this,t).delete(t);return this.size-=e?1:0,e}cre.exports=KVe});var fre=Ke((bzt,hre)=>{b();var ZVe=Nx();function QVe(t){return ZVe(this,t).get(t)}hre.exports=QVe});var pre=Ke((wzt,dre)=>{b();var JVe=Nx();function eUe(t){return JVe(this,t).has(t)}dre.exports=eUe});var mre=Ke((Tzt,gre)=>{b();var tUe=Nx();function rUe(t,e){var r=tUe(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}gre.exports=rUe});var yre=Ke((Szt,vre)=>{b();var nUe=are(),iUe=ure(),aUe=fre(),sUe=pre(),oUe=mre();function H1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{b();var bre=yre(),lUe="Expected a function";function MR(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(lUe);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(MR.Cache||bre),r}MR.Cache=bre;xre.exports=MR});var Tre=Ke((Lzt,kre)=>{b();var cUe=wre(),uUe=500;function hUe(t){var e=cUe(t,function(n){return r.size===uUe&&r.clear(),n}),r=e.cache;return e}kre.exports=hUe});var Sre=Ke((Dzt,Ere)=>{b();var fUe=Tre(),dUe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pUe=/\\(\\)?/g,gUe=fUe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(dUe,function(r,n,i,a){e.push(i?a.replace(pUe,"$1"):n||r)}),e});Ere.exports=gUe});var _re=Ke((Rzt,Cre)=>{b();function mUe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{b();var Are=eS(),vUe=_re(),yUe=QE(),bUe=tS(),xUe=1/0,Lre=Are?Are.prototype:void 0,Mre=Lre?Lre.toString:void 0;function Dre(t){if(typeof t=="string")return t;if(yUe(t))return vUe(t,Dre)+"";if(bUe(t))return Mre?Mre.call(t):"";var e=t+"";return e=="0"&&1/t==-xUe?"-0":e}Ore.exports=Dre});var Nre=Ke((Fzt,Ire)=>{b();var wUe=Rre();function kUe(t){return t==null?"":wUe(t)}Ire.exports=kUe});var DR=Ke((zzt,Pre)=>{b();var TUe=QE(),EUe=hte(),SUe=Sre(),CUe=Nre();function _Ue(t,e){return TUe(t)?t:EUe(t,e)?[t]:SUe(CUe(t))}Pre.exports=_Ue});var OR=Ke((Vzt,Fre)=>{b();var AUe=tS(),LUe=1/0;function MUe(t){if(typeof t=="string"||AUe(t))return t;var e=t+"";return e=="0"&&1/t==-LUe?"-0":e}Fre.exports=MUe});var zre=Ke((Hzt,Bre)=>{b();var DUe=DR(),OUe=OR();function RUe(t,e){e=DUe(e,t);for(var r=0,n=e.length;t!=null&&r{b();var IUe=zre();function NUe(t,e,r){var n=t==null?void 0:IUe(t,e);return n===void 0?r:n}$re.exports=NUe});var Hre=Ke((Yzt,Ure)=>{b();var PUe=nS(),FUe=function(){try{var t=PUe(Object,"defineProperty");return t({},"",{}),t}catch{}}();Ure.exports=FUe});var Gre=Ke((Xzt,Wre)=>{b();var qre=Hre();function BUe(t,e,r){e=="__proto__"&&qre?qre(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Wre.exports=BUe});var jre=Ke((Zzt,Yre)=>{b();var zUe=Gre(),$Ue=LR(),VUe=Object.prototype,UUe=VUe.hasOwnProperty;function HUe(t,e,r){var n=t[e];(!(UUe.call(t,e)&&$Ue(n,r))||r===void 0&&!(e in t))&&zUe(t,e,r)}Yre.exports=HUe});var Kre=Ke((Jzt,Xre)=>{b();var qUe=9007199254740991,WUe=/^(?:0|[1-9]\d*)$/;function GUe(t,e){var r=typeof t;return e=e??qUe,!!e&&(r=="number"||r!="symbol"&&WUe.test(t))&&t>-1&&t%1==0&&t{b();var YUe=jre(),jUe=DR(),XUe=Kre(),Zre=rS(),KUe=OR();function ZUe(t,e,r,n){if(!Zre(t))return t;e=jUe(e,t);for(var i=-1,a=e.length,s=a-1,o=t;o!=null&&++i{b();var QUe=Jre();function JUe(t,e,r){return t==null?t:QUe(t,e,r)}ene.exports=JUe});var IR=Ke(RR=>{"use strict";b();Object.defineProperty(RR,"__esModule",{value:!0});Object.defineProperty(RR,"default",{enumerable:!0,get:function(){return eHe}});function eHe(t){if(t=`${t}`,t==="0")return"0";if(/^[+-]?(\d+|\d*\.\d+)(e[+-]?\d+)?(%|\w+)?$/.test(t))return t.replace(/^[+-]?/,r=>r==="-"?"":"-");let e=["var","calc","min","max","clamp"];for(let r of e)if(t.includes(`${r}(`))return`calc(${t} * -1)`}});var rne=Ke(NR=>{"use strict";b();Object.defineProperty(NR,"__esModule",{value:!0});Object.defineProperty(NR,"default",{enumerable:!0,get:function(){return tHe}});var tHe=["preflight","container","accessibility","pointerEvents","visibility","position","inset","isolation","zIndex","order","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","float","clear","margin","boxSizing","lineClamp","display","aspectRatio","size","height","maxHeight","minHeight","width","minWidth","maxWidth","flex","flexShrink","flexGrow","flexBasis","tableLayout","captionSide","borderCollapse","borderSpacing","transformOrigin","translate","rotate","skew","scale","transform","animation","cursor","touchAction","userSelect","resize","scrollSnapType","scrollSnapAlign","scrollSnapStop","scrollMargin","scrollPadding","listStylePosition","listStyleType","listStyleImage","appearance","columns","breakBefore","breakInside","breakAfter","gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateColumns","gridTemplateRows","flexDirection","flexWrap","placeContent","placeItems","alignContent","alignItems","justifyContent","justifyItems","gap","space","divideWidth","divideStyle","divideColor","divideOpacity","placeSelf","alignSelf","justifySelf","overflow","overscrollBehavior","scrollBehavior","textOverflow","hyphens","whitespace","textWrap","wordBreak","borderRadius","borderWidth","borderStyle","borderColor","borderOpacity","backgroundColor","backgroundOpacity","backgroundImage","gradientColorStops","boxDecorationBreak","backgroundSize","backgroundAttachment","backgroundClip","backgroundPosition","backgroundRepeat","backgroundOrigin","fill","stroke","strokeWidth","objectFit","objectPosition","padding","textAlign","textIndent","verticalAlign","fontFamily","fontSize","fontWeight","textTransform","fontStyle","fontVariantNumeric","lineHeight","letterSpacing","textColor","textOpacity","textDecoration","textDecorationColor","textDecorationStyle","textDecorationThickness","textUnderlineOffset","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","boxShadowColor","outlineStyle","outlineWidth","outlineOffset","outlineColor","ringWidth","ringColor","ringOpacity","ringOffsetWidth","ringOffsetColor","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","filter","backdropBlur","backdropBrightness","backdropContrast","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backdropFilter","transitionProperty","transitionDelay","transitionDuration","transitionTimingFunction","willChange","contain","content","forcedColorAdjust"]});var nne=Ke(PR=>{"use strict";b();Object.defineProperty(PR,"__esModule",{value:!0});Object.defineProperty(PR,"default",{enumerable:!0,get:function(){return rHe}});function rHe(t,e){return t===void 0?e:Array.isArray(t)?t:[...new Set(e.filter(n=>t!==!1&&t[n]!==!1).concat(Object.keys(t).filter(n=>t[n]!==!1)))]}});var BR=Ke((h$t,FR)=>{b();var oi=String,ine=function(){return{isColorSupported:!1,reset:oi,bold:oi,dim:oi,italic:oi,underline:oi,inverse:oi,hidden:oi,strikethrough:oi,black:oi,red:oi,green:oi,yellow:oi,blue:oi,magenta:oi,cyan:oi,white:oi,gray:oi,bgBlack:oi,bgRed:oi,bgGreen:oi,bgYellow:oi,bgBlue:oi,bgMagenta:oi,bgCyan:oi,bgWhite:oi}};FR.exports=ine();FR.exports.createColors=ine});var iS=Ke($R=>{"use strict";b();Object.defineProperty($R,"__esModule",{value:!0});function nHe(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}nHe($R,{dim:function(){return aHe},default:function(){return sHe}});var U0=iHe(BR());function iHe(t){return t&&t.__esModule?t:{default:t}}var ane=new Set;function zR(t,e,r){typeof process<"u"&&process.env.JEST_WORKER_ID||r&&ane.has(r)||(r&&ane.add(r),console.warn(""),e.forEach(n=>console.warn(t,"-",n)))}function aHe(t){return U0.default.dim(t)}var sHe={info(t,e){zR(U0.default.bold(U0.default.cyan("info")),...Array.isArray(t)?[t]:[e,t])},warn(t,e){zR(U0.default.bold(U0.default.yellow("warn")),...Array.isArray(t)?[t]:[e,t])},risk(t,e){zR(U0.default.bold(U0.default.magenta("risk")),...Array.isArray(t)?[t]:[e,t])}}});var UR=Ke(VR=>{"use strict";b();Object.defineProperty(VR,"__esModule",{value:!0});Object.defineProperty(VR,"default",{enumerable:!0,get:function(){return cHe}});var oHe=lHe(iS());function lHe(t){return t&&t.__esModule?t:{default:t}}function Px({version:t,from:e,to:r}){oHe.default.warn(`${e}-color-renamed`,[`As of Tailwind CSS ${t}, \`${e}\` has been renamed to \`${r}\`.`,"Update your configuration file to silence this warning."])}var cHe={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return Px({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return Px({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return Px({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return Px({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return Px({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}});var sne=Ke(HR=>{"use strict";b();Object.defineProperty(HR,"__esModule",{value:!0});Object.defineProperty(HR,"defaults",{enumerable:!0,get:function(){return uHe}});function uHe(t,...e){for(let i of e){for(let a in i){var r;!(t==null||(r=t.hasOwnProperty)===null||r===void 0)&&r.call(t,a)||(t[a]=i[a])}for(let a of Object.getOwnPropertySymbols(i)){var n;!(t==null||(n=t.hasOwnProperty)===null||n===void 0)&&n.call(t,a)||(t[a]=i[a])}}return t}});var one=Ke(qR=>{"use strict";b();Object.defineProperty(qR,"__esModule",{value:!0});Object.defineProperty(qR,"toPath",{enumerable:!0,get:function(){return hHe}});function hHe(t){if(Array.isArray(t))return t;let e=t.split("[").length-1,r=t.split("]").length-1;if(e!==r)throw new Error(`Path is invalid. Has unbalanced brackets: ${t}`);return t.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)}});var aS=Ke(WR=>{"use strict";b();Object.defineProperty(WR,"__esModule",{value:!0});function fHe(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}fHe(WR,{flagEnabled:function(){return gHe},issueFlagNotices:function(){return mHe},default:function(){return vHe}});var dHe=une(BR()),pHe=une(iS());function une(t){return t&&t.__esModule?t:{default:t}}var lne={optimizeUniversalDefaults:!1,generalizedModifiers:!0,disableColorOpacityUtilitiesByDefault:!1,relativeContentPathsByDefault:!1},Fx={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity","disableColorOpacityUtilitiesByDefault","relativeContentPathsByDefault"],experimental:["optimizeUniversalDefaults","generalizedModifiers"]};function gHe(t,e){if(Fx.future.includes(e)){var r,n,i;return t.future==="all"||((i=(n=t==null||(r=t.future)===null||r===void 0?void 0:r[e])!==null&&n!==void 0?n:lne[e])!==null&&i!==void 0?i:!1)}if(Fx.experimental.includes(e)){var a,s,o;return t.experimental==="all"||((o=(s=t==null||(a=t.experimental)===null||a===void 0?void 0:a[e])!==null&&s!==void 0?s:lne[e])!==null&&o!==void 0?o:!1)}return!1}function cne(t){if(t.experimental==="all")return Fx.experimental;var e;return Object.keys((e=t?.experimental)!==null&&e!==void 0?e:{}).filter(r=>Fx.experimental.includes(r)&&t.experimental[r])}function mHe(t){if(process.env.JEST_WORKER_ID===void 0&&cne(t).length>0){let e=cne(t).map(r=>dHe.default.yellow(r)).join(", ");pHe.default.warn("experimental-flags-enabled",[`You have enabled experimental features: ${e}`,"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."])}}var vHe=Fx});var fne=Ke(GR=>{"use strict";b();Object.defineProperty(GR,"__esModule",{value:!0});Object.defineProperty(GR,"normalizeConfig",{enumerable:!0,get:function(){return xHe}});var yHe=aS(),q1=bHe(iS());function hne(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(hne=function(n){return n?r:e})(t)}function bHe(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=hne(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)){var s=i?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}function xHe(t){if((()=>{if(t.purge||!t.content||!Array.isArray(t.content)&&!(typeof t.content=="object"&&t.content!==null))return!1;if(Array.isArray(t.content))return t.content.every(n=>typeof n=="string"?!0:!(typeof n?.raw!="string"||n?.extension&&typeof n?.extension!="string"));if(typeof t.content=="object"&&t.content!==null){if(Object.keys(t.content).some(n=>!["files","relative","extract","transform"].includes(n)))return!1;if(Array.isArray(t.content.files)){if(!t.content.files.every(n=>typeof n=="string"?!0:!(typeof n?.raw!="string"||n?.extension&&typeof n?.extension!="string")))return!1;if(typeof t.content.extract=="object"){for(let n of Object.values(t.content.extract))if(typeof n!="function")return!1}else if(!(t.content.extract===void 0||typeof t.content.extract=="function"))return!1;if(typeof t.content.transform=="object"){for(let n of Object.values(t.content.transform))if(typeof n!="function")return!1}else if(!(t.content.transform===void 0||typeof t.content.transform=="function"))return!1;if(typeof t.content.relative!="boolean"&&typeof t.content.relative<"u")return!1}return!0}return!1})()||q1.default.warn("purge-deprecation",["The `purge`/`content` options have changed in Tailwind CSS v3.0.","Update your configuration file to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#configure-content-sources"]),t.safelist=(()=>{var n;let{content:i,purge:a,safelist:s}=t;return Array.isArray(s)?s:Array.isArray(i?.safelist)?i.safelist:Array.isArray(a?.safelist)?a.safelist:Array.isArray(a==null||(n=a.options)===null||n===void 0?void 0:n.safelist)?a.options.safelist:[]})(),t.blocklist=(()=>{let{blocklist:n}=t;if(Array.isArray(n)){if(n.every(i=>typeof i=="string"))return n;q1.default.warn("blocklist-invalid",["The `blocklist` option must be an array of strings.","https://tailwindcss.com/docs/content-configuration#discarding-classes"])}return[]})(),typeof t.prefix=="function")q1.default.warn("prefix-function",["As of Tailwind CSS v3.0, `prefix` cannot be a function.","Update `prefix` in your configuration to be a string to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#prefix-cannot-be-a-function"]),t.prefix="";else{var r;t.prefix=(r=t.prefix)!==null&&r!==void 0?r:""}t.content={relative:(()=>{let{content:n}=t;return n?.relative?n.relative:(0,yHe.flagEnabled)(t,"relativeContentPathsByDefault")})(),files:(()=>{let{content:n,purge:i}=t;return Array.isArray(i)?i:Array.isArray(i?.content)?i.content:Array.isArray(n)?n:Array.isArray(n?.content)?n.content:Array.isArray(n?.files)?n.files:[]})(),extract:(()=>{let n=(()=>{var s,o,l,u,h,f,d,p,g,m;return!((s=t.purge)===null||s===void 0)&&s.extract?t.purge.extract:!((o=t.content)===null||o===void 0)&&o.extract?t.content.extract:!((l=t.purge)===null||l===void 0||(u=l.extract)===null||u===void 0)&&u.DEFAULT?t.purge.extract.DEFAULT:!((h=t.content)===null||h===void 0||(f=h.extract)===null||f===void 0)&&f.DEFAULT?t.content.extract.DEFAULT:!((d=t.purge)===null||d===void 0||(p=d.options)===null||p===void 0)&&p.extractors?t.purge.options.extractors:!((g=t.content)===null||g===void 0||(m=g.options)===null||m===void 0)&&m.extractors?t.content.options.extractors:{}})(),i={},a=(()=>{var s,o,l,u;if(!((s=t.purge)===null||s===void 0||(o=s.options)===null||o===void 0)&&o.defaultExtractor)return t.purge.options.defaultExtractor;if(!((l=t.content)===null||l===void 0||(u=l.options)===null||u===void 0)&&u.defaultExtractor)return t.content.options.defaultExtractor})();if(a!==void 0&&(i.DEFAULT=a),typeof n=="function")i.DEFAULT=n;else if(Array.isArray(n))for(let{extensions:s,extractor:o}of n??[])for(let l of s)i[l]=o;else typeof n=="object"&&n!==null&&Object.assign(i,n);return i})(),transform:(()=>{let n=(()=>{var a,s,o,l,u,h;return!((a=t.purge)===null||a===void 0)&&a.transform?t.purge.transform:!((s=t.content)===null||s===void 0)&&s.transform?t.content.transform:!((o=t.purge)===null||o===void 0||(l=o.transform)===null||l===void 0)&&l.DEFAULT?t.purge.transform.DEFAULT:!((u=t.content)===null||u===void 0||(h=u.transform)===null||h===void 0)&&h.DEFAULT?t.content.transform.DEFAULT:{}})(),i={};return typeof n=="function"?i.DEFAULT=n:typeof n=="object"&&n!==null&&Object.assign(i,n),i})()};for(let n of t.content.files)if(typeof n=="string"&&/{([^,]*?)}/g.test(n)){q1.default.warn("invalid-glob-braces",[`The glob pattern ${(0,q1.dim)(n)} in your Tailwind CSS configuration is invalid.`,`Update it to ${(0,q1.dim)(n.replace(/{([^,]*?)}/g,"$1"))} to silence this warning.`]);break}return t}});var dne=Ke(YR=>{"use strict";b();Object.defineProperty(YR,"__esModule",{value:!0});Object.defineProperty(YR,"default",{enumerable:!0,get:function(){return wHe}});function wHe(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null}});var KR=Ke(XR=>{"use strict";b();Object.defineProperty(XR,"__esModule",{value:!0});Object.defineProperty(XR,"cloneDeep",{enumerable:!0,get:function(){return jR}});function jR(t){return Array.isArray(t)?t.map(e=>jR(e)):typeof t=="object"&&t!==null?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,jR(r)])):t}});var pne=Ke(ZR=>{"use strict";b();Object.defineProperty(ZR,"__esModule",{value:!0});Object.defineProperty(ZR,"default",{enumerable:!0,get:function(){return kHe}});function kHe(t){return t.replace(/\\,/g,"\\2c ")}});var gne=Ke(QR=>{"use strict";b();Object.defineProperty(QR,"__esModule",{value:!0});Object.defineProperty(QR,"default",{enumerable:!0,get:function(){return THe}});var THe={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var eI=Ke(JR=>{"use strict";b();Object.defineProperty(JR,"__esModule",{value:!0});function EHe(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}EHe(JR,{parseColor:function(){return MHe},formatColor:function(){return DHe}});var mne=SHe(gne());function SHe(t){return t&&t.__esModule?t:{default:t}}var CHe=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,_He=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,$d=/(?:\d+|\d*\.\d+)%?/,sS=/(?:\s*,\s*|\s+)/,vne=/\s*[,/]\s*/,Vd=/var\(--(?:[^ )]*?)(?:,(?:[^ )]*?|var\(--[^ )]*?\)))?\)/,AHe=new RegExp(`^(rgba?)\\(\\s*(${$d.source}|${Vd.source})(?:${sS.source}(${$d.source}|${Vd.source}))?(?:${sS.source}(${$d.source}|${Vd.source}))?(?:${vne.source}(${$d.source}|${Vd.source}))?\\s*\\)$`),LHe=new RegExp(`^(hsla?)\\(\\s*((?:${$d.source})(?:deg|rad|grad|turn)?|${Vd.source})(?:${sS.source}(${$d.source}|${Vd.source}))?(?:${sS.source}(${$d.source}|${Vd.source}))?(?:${vne.source}(${$d.source}|${Vd.source}))?\\s*\\)$`);function MHe(t,{loose:e=!1}={}){var r,n;if(typeof t!="string")return null;if(t=t.trim(),t==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(t in mne.default)return{mode:"rgb",color:mne.default[t].map(l=>l.toString())};let i=t.replace(_He,(l,u,h,f,d)=>["#",u,u,h,h,f,f,d?d+d:""].join("")).match(CHe);if(i!==null)return{mode:"rgb",color:[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)].map(l=>l.toString()),alpha:i[4]?(parseInt(i[4],16)/255).toString():void 0};var a;let s=(a=t.match(AHe))!==null&&a!==void 0?a:t.match(LHe);if(s===null)return null;let o=[s[2],s[3],s[4]].filter(Boolean).map(l=>l.toString());return o.length===2&&o[0].startsWith("var(")?{mode:s[1],color:[o[0]],alpha:o[1]}:!e&&o.length!==3||o.length<3&&!o.some(l=>/^var\(.*?\)$/.test(l))?null:{mode:s[1],color:o,alpha:(r=s[5])===null||r===void 0||(n=r.toString)===null||n===void 0?void 0:n.call(r)}}function DHe({mode:t,color:e,alpha:r}){let n=r!==void 0;return t==="rgba"||t==="hsla"?`${t}(${e.join(", ")}${n?`, ${r}`:""})`:`${t}(${e.join(" ")}${n?` / ${r}`:""})`}});var rI=Ke(tI=>{"use strict";b();Object.defineProperty(tI,"__esModule",{value:!0});function OHe(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}OHe(tI,{withAlphaValue:function(){return RHe},default:function(){return IHe}});var oS=eI();function RHe(t,e,r){if(typeof t=="function")return t({opacityValue:e});let n=(0,oS.parseColor)(t,{loose:!0});return n===null?r:(0,oS.formatColor)({...n,alpha:e})}function IHe({color:t,property:e,variable:r}){let n=[].concat(e);if(typeof t=="function")return{[r]:"1",...Object.fromEntries(n.map(a=>[a,t({opacityVariable:r,opacityValue:`var(${r})`})]))};let i=(0,oS.parseColor)(t);return i===null?Object.fromEntries(n.map(a=>[a,t])):i.alpha!==void 0?Object.fromEntries(n.map(a=>[a,t])):{[r]:"1",...Object.fromEntries(n.map(a=>[a,(0,oS.formatColor)({...i,alpha:`var(${r})`})]))}}});var lS=Ke(nI=>{"use strict";b();Object.defineProperty(nI,"__esModule",{value:!0});Object.defineProperty(nI,"splitAtTopLevelOnly",{enumerable:!0,get:function(){return NHe}});function NHe(t,e){let r=[],n=[],i=0,a=!1;for(let s=0;s{"use strict";b();Object.defineProperty(iI,"__esModule",{value:!0});function PHe(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}PHe(iI,{parseBoxShadowValue:function(){return $He},formatBoxShadowValue:function(){return VHe}});var FHe=lS(),BHe=new Set(["inset","inherit","initial","revert","unset"]),zHe=/\ +(?![^(]*\))/g,yne=/^-?(\d+|\.\d+)(.*?)$/g;function $He(t){return(0,FHe.splitAtTopLevelOnly)(t,",").map(r=>{let n=r.trim(),i={raw:n},a=n.split(zHe),s=new Set;for(let o of a)yne.lastIndex=0,!s.has("KEYWORD")&&BHe.has(o)?(i.keyword=o,s.add("KEYWORD")):yne.test(o)?s.has("X")?s.has("Y")?s.has("BLUR")?s.has("SPREAD")||(i.spread=o,s.add("SPREAD")):(i.blur=o,s.add("BLUR")):(i.y=o,s.add("Y")):(i.x=o,s.add("X")):i.color?(i.unknown||(i.unknown=[]),i.unknown.push(o)):i.color=o;return i.valid=i.x!==void 0&&i.y!==void 0,i})}function VHe(t){return t.map(e=>e.valid?[e.keyword,e.x,e.y,e.blur,e.spread,e.color].filter(Boolean).join(" "):e.raw).join(", ")}});var oI=Ke(sI=>{"use strict";b();Object.defineProperty(sI,"__esModule",{value:!0});function UHe(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}UHe(sI,{normalize:function(){return Ud},normalizeAttributeSelectors:function(){return YHe},url:function(){return xne},number:function(){return wne},percentage:function(){return kne},length:function(){return Tne},lineWidth:function(){return QHe},shadow:function(){return JHe},color:function(){return eqe},image:function(){return tqe},gradient:function(){return Ene},position:function(){return iqe},familyName:function(){return aqe},genericName:function(){return oqe},absoluteSize:function(){return cqe},relativeSize:function(){return hqe}});var HHe=eI(),qHe=bne(),cS=lS(),WHe=["min","max","clamp","calc"];function aI(t){return WHe.some(e=>new RegExp(`^${e}\\(.*\\)`).test(t))}var GHe=new Set(["scroll-timeline-name","timeline-scope","view-timeline-name","font-palette","anchor-name","anchor-scope","position-anchor","position-try-options","scroll-timeline","animation-timeline","view-timeline","position-try"]);function Ud(t,e=null,r=!0){let n=e&&GHe.has(e.property);return t.startsWith("--")&&!n?`var(${t})`:t.includes("url(")?t.split(/(url\(.*?\))/g).filter(Boolean).map(i=>/^url\(.*?\)$/.test(i)?i:Ud(i,e,!1)).join(""):(t=t.replace(/([^\\])_+/g,(i,a)=>a+" ".repeat(i.length-1)).replace(/^_/g," ").replace(/\\_/g,"_"),r&&(t=t.trim()),t=jHe(t),t)}function YHe(t){return t.includes("=")&&(t=t.replace(/(=.*)/g,(e,r)=>{if(r[1]==="'"||r[1]==='"')return r;if(r.length>2){let n=r[r.length-1];if(r[r.length-2]===" "&&(n==="i"||n==="I"||n==="s"||n==="S"))return`="${r.slice(1,-2)}" ${r[r.length-1]}`}return`="${r.slice(1)}"`})),t}function jHe(t){let e=["theme"],r=["min-content","max-content","fit-content","safe-area-inset-top","safe-area-inset-right","safe-area-inset-bottom","safe-area-inset-left","titlebar-area-x","titlebar-area-y","titlebar-area-width","titlebar-area-height","keyboard-inset-top","keyboard-inset-right","keyboard-inset-bottom","keyboard-inset-left","keyboard-inset-width","keyboard-inset-height","radial-gradient","linear-gradient","conic-gradient","repeating-radial-gradient","repeating-linear-gradient","repeating-conic-gradient","anchor-size"];return t.replace(/(calc|min|max|clamp)\(.+\)/g,n=>{let i="";function a(){let s=i.trimEnd();return s[s.length-1]}for(let s=0;sn[s+d]===f)},l=function(h){let f=1/0;for(let p of h){let g=n.indexOf(p,s);g!==-1&&go(h))){let h=r.find(f=>o(f));i+=h,s+=h.length-1}else e.some(h=>o(h))?i+=l([")"]):o("[")?i+=l(["]"]):["+","-","*","/"].includes(u)&&!["(","+","-","*","/",","].includes(a())?i+=` ${u} `:i+=u}return i.replace(/\s+/g," ")})}function xne(t){return t.startsWith("url(")}function wne(t){return!isNaN(Number(t))||aI(t)}function kne(t){return t.endsWith("%")&&wne(t.slice(0,-1))||aI(t)}var XHe=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],KHe=`(?:${XHe.join("|")})`;function Tne(t){return t==="0"||new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${KHe}$`).test(t)||aI(t)}var ZHe=new Set(["thin","medium","thick"]);function QHe(t){return ZHe.has(t)}function JHe(t){let e=(0,qHe.parseBoxShadowValue)(Ud(t));for(let r of e)if(!r.valid)return!1;return!0}function eqe(t){let e=0;return(0,cS.splitAtTopLevelOnly)(t,"_").every(n=>(n=Ud(n),n.startsWith("var(")?!0:(0,HHe.parseColor)(n,{loose:!0})!==null?(e++,!0):!1))?e>0:!1}function tqe(t){let e=0;return(0,cS.splitAtTopLevelOnly)(t,",").every(n=>(n=Ud(n),n.startsWith("var(")?!0:xne(n)||Ene(n)||["element(","image(","cross-fade(","image-set("].some(i=>n.startsWith(i))?(e++,!0):!1))?e>0:!1}var rqe=new Set(["conic-gradient","linear-gradient","radial-gradient","repeating-conic-gradient","repeating-linear-gradient","repeating-radial-gradient"]);function Ene(t){t=Ud(t);for(let e of rqe)if(t.startsWith(`${e}(`))return!0;return!1}var nqe=new Set(["center","top","right","bottom","left"]);function iqe(t){let e=0;return(0,cS.splitAtTopLevelOnly)(t,"_").every(n=>(n=Ud(n),n.startsWith("var(")?!0:nqe.has(n)||Tne(n)||kne(n)?(e++,!0):!1))?e>0:!1}function aqe(t){let e=0;return(0,cS.splitAtTopLevelOnly)(t,",").every(n=>(n=Ud(n),n.startsWith("var(")?!0:n.includes(" ")&&!/(['"])([^"']+)\1/g.test(n)||/^\d/g.test(n)?!1:(e++,!0)))?e>0:!1}var sqe=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function oqe(t){return sqe.has(t)}var lqe=new Set(["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large"]);function cqe(t){return lqe.has(t)}var uqe=new Set(["larger","smaller"]);function hqe(t){return uqe.has(t)}});var _ne=Ke(lI=>{"use strict";b();Object.defineProperty(lI,"__esModule",{value:!0});Object.defineProperty(lI,"backgroundSize",{enumerable:!0,get:function(){return fqe}});var Sne=oI(),Cne=lS();function fqe(t){let e=["cover","contain"];return(0,Cne.splitAtTopLevelOnly)(t,",").every(r=>{let n=(0,Cne.splitAtTopLevelOnly)(r,"_").filter(Boolean);return n.length===1&&e.includes(n[0])?!0:n.length!==1&&n.length!==2?!1:n.every(i=>(0,Sne.length)(i)||(0,Sne.percentage)(i)||i==="auto")})}});var Bne=Ke(uI=>{"use strict";b();Object.defineProperty(uI,"__esModule",{value:!0});function dqe(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}dqe(uI,{updateAllClasses:function(){return vqe},asValue:function(){return Bx},parseColorFormat:function(){return cI},asColor:function(){return Nne},asLookupValue:function(){return Pne},typeMap:function(){return uS},coerceValue:function(){return xqe},getMatchingTypes:function(){return Fne}});var pqe=Dne(pne()),Ane=rI(),Ys=oI(),Lne=Dne(IR()),gqe=_ne(),mqe=aS();function Dne(t){return t&&t.__esModule?t:{default:t}}function vqe(t,e){t.walkClasses(r=>{r.value=e(r.value),r.raws&&r.raws.value&&(r.raws.value=(0,pqe.default)(r.raws.value))})}function One(t,e){if(!Hd(t))return;let r=t.slice(1,-1);if(e(r))return(0,Ys.normalize)(r)}function yqe(t,e={},r){let n=e[t];if(n!==void 0)return(0,Lne.default)(n);if(Hd(t)){let i=One(t,r);return i===void 0?void 0:(0,Lne.default)(i)}}function Bx(t,e={},{validate:r=()=>!0}={}){var n;let i=(n=e.values)===null||n===void 0?void 0:n[t];return i!==void 0?i:e.supportsNegativeValues&&t.startsWith("-")?yqe(t.slice(1),e.values,r):One(t,r)}function Hd(t){return t.startsWith("[")&&t.endsWith("]")}function Rne(t){let e=t.lastIndexOf("/"),r=t.lastIndexOf("[",e),n=t.indexOf("]",e);return t[e-1]==="]"||t[e+1]==="["||r!==-1&&n!==-1&&r")){let e=t;return({opacityValue:r=1})=>e.replace(//g,r)}return t}function Ine(t){return(0,Ys.normalize)(t.slice(1,-1))}function Nne(t,e={},{tailwindConfig:r={}}={}){var n;if(((n=e.values)===null||n===void 0?void 0:n[t])!==void 0){var i;return cI((i=e.values)===null||i===void 0?void 0:i[t])}let[a,s]=Rne(t);if(s!==void 0){var o,l,u,h;let f=(h=(o=e.values)===null||o===void 0?void 0:o[a])!==null&&h!==void 0?h:Hd(a)?a.slice(1,-1):void 0;return f===void 0?void 0:(f=cI(f),Hd(s)?(0,Ane.withAlphaValue)(f,Ine(s)):((l=r.theme)===null||l===void 0||(u=l.opacity)===null||u===void 0?void 0:u[s])===void 0?void 0:(0,Ane.withAlphaValue)(f,r.theme.opacity[s]))}return Bx(t,e,{validate:Ys.color})}function Pne(t,e={}){var r;return(r=e.values)===null||r===void 0?void 0:r[t]}function ol(t){return(e,r)=>Bx(e,r,{validate:t})}var uS={any:Bx,color:Nne,url:ol(Ys.url),image:ol(Ys.image),length:ol(Ys.length),percentage:ol(Ys.percentage),position:ol(Ys.position),lookup:Pne,"generic-name":ol(Ys.genericName),"family-name":ol(Ys.familyName),number:ol(Ys.number),"line-width":ol(Ys.lineWidth),"absolute-size":ol(Ys.absoluteSize),"relative-size":ol(Ys.relativeSize),shadow:ol(Ys.shadow),size:ol(gqe.backgroundSize)},Mne=Object.keys(uS);function bqe(t,e){let r=t.indexOf(e);return r===-1?[void 0,t]:[t.slice(0,r),t.slice(r+1)]}function xqe(t,e,r,n){if(r.values&&e in r.values)for(let{type:a}of t??[]){let s=uS[a](e,r,{tailwindConfig:n});if(s!==void 0)return[s,a,null]}if(Hd(e)){let a=e.slice(1,-1),[s,o]=bqe(a,":");if(!/^[\w-_]+$/g.test(s))o=a;else if(s!==void 0&&!Mne.includes(s))return[];if(o.length>0&&Mne.includes(s))return[Bx(`[${o}]`,r),s,null]}let i=Fne(t,e,r,n);for(let a of i)return a;return[]}function*Fne(t,e,r,n){let i=(0,mqe.flagEnabled)(n,"generalizedModifiers"),[a,s]=Rne(e);if(i&&r.modifiers!=null&&(r.modifiers==="any"||typeof r.modifiers=="object"&&(s&&Hd(s)||s in r.modifiers))||(a=e,s=void 0),s!==void 0&&a===""&&(a="DEFAULT"),s!==void 0&&typeof r.modifiers=="object"){var l,u;let h=(u=(l=r.modifiers)===null||l===void 0?void 0:l[s])!==null&&u!==void 0?u:null;h!==null?s=h:Hd(s)&&(s=Ine(s))}for(let{type:h}of t??[]){let f=uS[h](a,r,{tailwindConfig:n});f!==void 0&&(yield[f,h,s??null])}}});var zne=Ke(hI=>{"use strict";b();Object.defineProperty(hI,"__esModule",{value:!0});Object.defineProperty(hI,"default",{enumerable:!0,get:function(){return wqe}});function wqe(t){return typeof t=="function"?t({}):t}});var qne=Ke(dI=>{"use strict";b();Object.defineProperty(dI,"__esModule",{value:!0});Object.defineProperty(dI,"default",{enumerable:!0,get:function(){return zqe}});var kqe=Y1(IR()),Tqe=Y1(rne()),Eqe=Y1(nne()),Sqe=Y1(UR()),Une=sne(),$ne=one(),Cqe=fne(),W1=Y1(dne()),_qe=KR(),Aqe=Bne(),Lqe=rI(),Mqe=Y1(zne());function Y1(t){return t&&t.__esModule?t:{default:t}}function G1(t){return typeof t=="function"}function zx(t,...e){let r=e.pop();for(let n of e)for(let i in n){let a=r(t[i],n[i]);a===void 0?(0,W1.default)(t[i])&&(0,W1.default)(n[i])?t[i]=zx({},t[i],n[i],r):t[i]=n[i]:t[i]=a}return t}var fI={colors:Sqe.default,negative(t){return Object.keys(t).filter(e=>t[e]!=="0").reduce((e,r)=>{let n=(0,kqe.default)(t[r]);return n!==void 0&&(e[`-${r}`]=n),e},{})},breakpoints(t){return Object.keys(t).filter(e=>typeof t[e]=="string").reduce((e,r)=>({...e,[`screen-${r}`]:t[r]}),{})}};function Dqe(t,...e){return G1(t)?t(...e):t}function Oqe(t){return t.reduce((e,{extend:r})=>zx(e,r,(n,i)=>n===void 0?[i]:Array.isArray(n)?[i,...n]:[i,n]),{})}function Rqe(t){return{...t.reduce((e,r)=>(0,Une.defaults)(e,r),{}),extend:Oqe(t)}}function Vne(t,e){if(Array.isArray(t)&&(0,W1.default)(t[0]))return t.concat(e);if(Array.isArray(e)&&(0,W1.default)(e[0])&&(0,W1.default)(t))return[t,...e];if(Array.isArray(e))return e}function Iqe({extend:t,...e}){return zx(e,t,(r,n)=>!G1(r)&&!n.some(G1)?zx({},r,...n,Vne):(i,a)=>zx({},...[r,...n].map(s=>Dqe(s,i,a)),Vne))}function*Nqe(t){let e=(0,$ne.toPath)(t);if(e.length===0||(yield e,Array.isArray(t)))return;let r=/^(.*?)\s*\/\s*([^/]+)$/,n=t.match(r);if(n!==null){let[,i,a]=n,s=(0,$ne.toPath)(i);s.alpha=a,yield s}}function Pqe(t){let e=(r,n)=>{for(let i of Nqe(r)){let a=0,s=t;for(;s!=null&&a(r[n]=G1(t[n])?t[n](e,fI):t[n],r),{})}function Hne(t){let e=[];return t.forEach(r=>{e=[...e,r];var n;let i=(n=r?.plugins)!==null&&n!==void 0?n:[];i.length!==0&&i.forEach(a=>{a.__isOptionsFunction&&(a=a());var s;e=[...e,...Hne([(s=a?.config)!==null&&s!==void 0?s:{}])]})}),e}function Fqe(t){return[...t].reduceRight((r,n)=>G1(n)?n({corePlugins:r}):(0,Eqe.default)(n,r),Tqe.default)}function Bqe(t){return[...t].reduceRight((r,n)=>[...r,...n],[])}function zqe(t){let e=[...Hne(t),{prefix:"",important:!1,separator:":"}];var r,n;return(0,Cqe.normalizeConfig)((0,Une.defaults)({theme:Pqe(Iqe(Rqe(e.map(i=>(r=i?.theme)!==null&&r!==void 0?r:{})))),corePlugins:Fqe(e.map(i=>i.corePlugins)),plugins:Bqe(t.map(i=>(n=i?.plugins)!==null&&n!==void 0?n:[]))},...e))}});var pI=Ke((Z$t,Wne)=>{b();Wne.exports={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:t})=>({...t("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:t})=>t("blur"),backdropBrightness:({theme:t})=>t("brightness"),backdropContrast:({theme:t})=>t("contrast"),backdropGrayscale:({theme:t})=>t("grayscale"),backdropHueRotate:({theme:t})=>t("hueRotate"),backdropInvert:({theme:t})=>t("invert"),backdropOpacity:({theme:t})=>t("opacity"),backdropSaturate:({theme:t})=>t("saturate"),backdropSepia:({theme:t})=>t("sepia"),backgroundColor:({theme:t})=>t("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:t})=>t("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:t})=>({...t("colors"),DEFAULT:t("colors.gray.200","currentColor")}),borderOpacity:({theme:t})=>t("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:t})=>({...t("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:t})=>t("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:t})=>t("colors"),colors:({colors:t})=>({inherit:t.inherit,current:t.current,transparent:t.transparent,black:t.black,white:t.white,slate:t.slate,gray:t.gray,zinc:t.zinc,neutral:t.neutral,stone:t.stone,red:t.red,orange:t.orange,amber:t.amber,yellow:t.yellow,lime:t.lime,green:t.green,emerald:t.emerald,teal:t.teal,cyan:t.cyan,sky:t.sky,blue:t.blue,indigo:t.indigo,violet:t.violet,purple:t.purple,fuchsia:t.fuchsia,pink:t.pink,rose:t.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:t})=>t("borderColor"),divideOpacity:({theme:t})=>t("borderOpacity"),divideWidth:({theme:t})=>t("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:t})=>({none:"none",...t("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({auto:"auto",...t("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:t})=>t("spacing"),gradientColorStops:({theme:t})=>t("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:t})=>({auto:"auto",...t("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:t})=>({auto:"auto",...t("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:t})=>({...t("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:t,breakpoints:e})=>({...t("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e(t("screens"))}),minHeight:({theme:t})=>({...t("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:t})=>({...t("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:t})=>t("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:t})=>t("spacing"),placeholderColor:({theme:t})=>t("colors"),placeholderOpacity:({theme:t})=>t("opacity"),ringColor:({theme:t})=>({DEFAULT:t("colors.blue.500","#3b82f6"),...t("colors")}),ringOffsetColor:({theme:t})=>t("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:t})=>({DEFAULT:"0.5",...t("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:t})=>({...t("spacing")}),scrollPadding:({theme:t})=>t("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:t})=>({...t("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:t})=>({none:"none",...t("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:t})=>t("colors"),textDecorationColor:({theme:t})=>t("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:t})=>({...t("spacing")}),textOpacity:({theme:t})=>t("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:t})=>({...t("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:t})=>({auto:"auto",...t("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:t})=>({auto:"auto",...t("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]}});var Yne=Ke(gI=>{"use strict";b();Object.defineProperty(gI,"__esModule",{value:!0});Object.defineProperty(gI,"default",{enumerable:!0,get:function(){return Gne}});var $qe=Uqe(pI()),Vqe=aS();function Uqe(t){return t&&t.__esModule?t:{default:t}}function Gne(t){var e;let r=((e=t?.presets)!==null&&e!==void 0?e:[$qe.default]).slice().reverse().flatMap(a=>Gne(a instanceof Function?a():a)),n={respectDefaultRingColorOpacity:{theme:{ringColor:({theme:a})=>({DEFAULT:"#3b82f67f",...a("colors")})}},disableColorOpacityUtilitiesByDefault:{corePlugins:{backgroundOpacity:!1,borderOpacity:!1,divideOpacity:!1,placeholderOpacity:!1,ringOpacity:!1,textOpacity:!1}}},i=Object.keys(n).filter(a=>(0,Vqe.flagEnabled)(t,a)).map(a=>n[a]);return[t,...i,...r]}});var Xne=Ke(mI=>{"use strict";b();Object.defineProperty(mI,"__esModule",{value:!0});Object.defineProperty(mI,"default",{enumerable:!0,get:function(){return Wqe}});var Hqe=jne(qne()),qqe=jne(Yne());function jne(t){return t&&t.__esModule?t:{default:t}}function Wqe(...t){let[,...e]=(0,qqe.default)(t[0]);return(0,Hqe.default)([...t,...e])}});var Zne=Ke((nVt,Kne)=>{b();var vI=Xne();Kne.exports=(vI.__esModule?vI:{default:vI}).default});var lie=Ke(EI=>{"use strict";b();Object.defineProperty(EI,"__esModule",{value:!0});Object.defineProperty(EI,"default",{enumerable:!0,get:function(){return Jqe}});function oie(t,e){return{handler:t,config:e}}oie.withOptions=function(t,e=()=>({})){let r=function(n){return{__options:n,handler:t(n),config:e(n)}};return r.__isOptionsFunction=!0,r.__pluginFunction=t,r.__configFunction=e,r};var Jqe=oie});var cie=Ke(SI=>{"use strict";b();Object.defineProperty(SI,"__esModule",{value:!0});Object.defineProperty(SI,"default",{enumerable:!0,get:function(){return rWe}});var eWe=tWe(lie());function tWe(t){return t&&t.__esModule?t:{default:t}}var rWe=eWe.default});var _I=Ke((vVt,uie)=>{b();var CI=cie();uie.exports=(CI.__esModule?CI:{default:CI}).default});var zie=Ke((Vx,X1)=>{b();var nWe=200,xie="__lodash_hash_undefined__",iWe=800,aWe=16,wie=9007199254740991,kie="[object Arguments]",sWe="[object Array]",oWe="[object AsyncFunction]",lWe="[object Boolean]",cWe="[object Date]",uWe="[object Error]",Tie="[object Function]",hWe="[object GeneratorFunction]",fWe="[object Map]",dWe="[object Number]",pWe="[object Null]",Eie="[object Object]",gWe="[object Proxy]",mWe="[object RegExp]",vWe="[object Set]",yWe="[object String]",bWe="[object Undefined]",xWe="[object WeakMap]",wWe="[object ArrayBuffer]",kWe="[object DataView]",TWe="[object Float32Array]",EWe="[object Float64Array]",SWe="[object Int8Array]",CWe="[object Int16Array]",_We="[object Int32Array]",AWe="[object Uint8Array]",LWe="[object Uint8ClampedArray]",MWe="[object Uint16Array]",DWe="[object Uint32Array]",OWe=/[\\^$.*+?()[\]{}|]/g,RWe=/^\[object .+?Constructor\]$/,IWe=/^(?:0|[1-9]\d*)$/,li={};li[TWe]=li[EWe]=li[SWe]=li[CWe]=li[_We]=li[AWe]=li[LWe]=li[MWe]=li[DWe]=!0;li[kie]=li[sWe]=li[wWe]=li[lWe]=li[kWe]=li[cWe]=li[uWe]=li[Tie]=li[fWe]=li[dWe]=li[Eie]=li[mWe]=li[vWe]=li[yWe]=li[xWe]=!1;var Sie=typeof global=="object"&&global&&global.Object===Object&&global,NWe=typeof self=="object"&&self&&self.Object===Object&&self,qx=Sie||NWe||Function("return this")(),Cie=typeof Vx=="object"&&Vx&&!Vx.nodeType&&Vx,Ux=Cie&&typeof X1=="object"&&X1&&!X1.nodeType&&X1,_ie=Ux&&Ux.exports===Cie,AI=_ie&&Sie.process,hie=function(){try{var t=Ux&&Ux.require&&Ux.require("util").types;return t||AI&&AI.binding&&AI.binding("util")}catch{}}(),fie=hie&&hie.isTypedArray;function PWe(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function FWe(t,e){for(var r=-1,n=Array(t);++r-1}function aGe(t,e){var r=this.__data__,n=gS(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}uf.prototype.clear=tGe;uf.prototype.delete=rGe;uf.prototype.get=nGe;uf.prototype.has=iGe;uf.prototype.set=aGe;function K1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&IGe(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n-1&&t%1==0&&t0){if(++e>=iWe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function UGe(t){if(t!=null){try{return pS.call(t)}catch{}try{return t+""}catch{}}return""}function yS(t,e){return t===e||t!==t&&e!==e}var OI=bie(function(){return arguments}())?bie:function(t){return Wx(t)&&cf.call(t,"callee")&&!WWe.call(t,"callee")},RI=Array.isArray;function PI(t){return t!=null&&Nie(t.length)&&!FI(t)}function HGe(t){return Wx(t)&&PI(t)}var Iie=YWe||jGe;function FI(t){if(!W0(t))return!1;var e=mS(t);return e==Tie||e==hWe||e==oWe||e==gWe}function Nie(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=wie}function W0(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Wx(t){return t!=null&&typeof t=="object"}function qGe(t){if(!Wx(t)||mS(t)!=Eie)return!1;var e=Lie(t);if(e===null)return!0;var r=cf.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&pS.call(r)==HWe}var Pie=fie?BWe(fie):xGe;function WGe(t){return LGe(t,Fie(t))}function Fie(t){return PI(t)?mGe(t,!0):wGe(t)}var GGe=MGe(function(t,e,r){Die(t,e,r)});function YGe(t){return function(){return t}}function Bie(t){return t}function jGe(){return!1}X1.exports=GGe});var Vie=Ke((xVt,$ie)=>{b();function XGe(){if(!arguments.length)return[];var t=arguments[0];return KGe(t)?t:[t]}var KGe=Array.isArray;$ie.exports=XGe});var zI=Ke((kVt,Uie)=>{b();var BI=UR();Uie.exports=(BI.__esModule?BI:{default:BI}).default});var qie=Ke((EVt,Hie)=>{b();var Oe=zI(),mr=t=>t.toFixed(7).replace(/(\.[0-9]+?)0+$/,"$1").replace(/\.0$/,""),js=t=>`${mr(t/16)}rem`,he=(t,e)=>`${mr(t/e)}em`,Wu=t=>{t=t.replace("#",""),t=t.length===3?t.replace(/./g,"$&$&"):t;let e=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),n=parseInt(t.substring(4,6),16);return`${e} ${r} ${n}`},$I={sm:{css:[{fontSize:js(14),lineHeight:mr(24/14),p:{marginTop:he(16,14),marginBottom:he(16,14)},'[class~="lead"]':{fontSize:he(18,14),lineHeight:mr(28/18),marginTop:he(16,18),marginBottom:he(16,18)},blockquote:{marginTop:he(24,18),marginBottom:he(24,18),paddingInlineStart:he(20,18)},h1:{fontSize:he(30,14),marginTop:"0",marginBottom:he(24,30),lineHeight:mr(36/30)},h2:{fontSize:he(20,14),marginTop:he(32,20),marginBottom:he(16,20),lineHeight:mr(28/20)},h3:{fontSize:he(18,14),marginTop:he(28,18),marginBottom:he(8,18),lineHeight:mr(28/18)},h4:{marginTop:he(20,14),marginBottom:he(8,14),lineHeight:mr(20/14)},img:{marginTop:he(24,14),marginBottom:he(24,14)},picture:{marginTop:he(24,14),marginBottom:he(24,14)},"picture > img":{marginTop:"0",marginBottom:"0"},video:{marginTop:he(24,14),marginBottom:he(24,14)},kbd:{fontSize:he(12,14),borderRadius:js(5),paddingTop:he(2,14),paddingInlineEnd:he(5,14),paddingBottom:he(2,14),paddingInlineStart:he(5,14)},code:{fontSize:he(12,14)},"h2 code":{fontSize:he(18,20)},"h3 code":{fontSize:he(16,18)},pre:{fontSize:he(12,14),lineHeight:mr(20/12),marginTop:he(20,12),marginBottom:he(20,12),borderRadius:js(4),paddingTop:he(8,12),paddingInlineEnd:he(12,12),paddingBottom:he(8,12),paddingInlineStart:he(12,12)},ol:{marginTop:he(16,14),marginBottom:he(16,14),paddingInlineStart:he(22,14)},ul:{marginTop:he(16,14),marginBottom:he(16,14),paddingInlineStart:he(22,14)},li:{marginTop:he(4,14),marginBottom:he(4,14)},"ol > li":{paddingInlineStart:he(6,14)},"ul > li":{paddingInlineStart:he(6,14)},"> ul > li p":{marginTop:he(8,14),marginBottom:he(8,14)},"> ul > li > p:first-child":{marginTop:he(16,14)},"> ul > li > p:last-child":{marginBottom:he(16,14)},"> ol > li > p:first-child":{marginTop:he(16,14)},"> ol > li > p:last-child":{marginBottom:he(16,14)},"ul ul, ul ol, ol ul, ol ol":{marginTop:he(8,14),marginBottom:he(8,14)},dl:{marginTop:he(16,14),marginBottom:he(16,14)},dt:{marginTop:he(16,14)},dd:{marginTop:he(4,14),paddingInlineStart:he(22,14)},hr:{marginTop:he(40,14),marginBottom:he(40,14)},"hr + *":{marginTop:"0"},"h2 + *":{marginTop:"0"},"h3 + *":{marginTop:"0"},"h4 + *":{marginTop:"0"},table:{fontSize:he(12,14),lineHeight:mr(18/12)},"thead th":{paddingInlineEnd:he(12,12),paddingBottom:he(8,12),paddingInlineStart:he(12,12)},"thead th:first-child":{paddingInlineStart:"0"},"thead th:last-child":{paddingInlineEnd:"0"},"tbody td, tfoot td":{paddingTop:he(8,12),paddingInlineEnd:he(12,12),paddingBottom:he(8,12),paddingInlineStart:he(12,12)},"tbody td:first-child, tfoot td:first-child":{paddingInlineStart:"0"},"tbody td:last-child, tfoot td:last-child":{paddingInlineEnd:"0"},figure:{marginTop:he(24,14),marginBottom:he(24,14)},"figure > *":{marginTop:"0",marginBottom:"0"},figcaption:{fontSize:he(12,14),lineHeight:mr(16/12),marginTop:he(8,12)}},{"> :first-child":{marginTop:"0"},"> :last-child":{marginBottom:"0"}}]},base:{css:[{fontSize:js(16),lineHeight:mr(28/16),p:{marginTop:he(20,16),marginBottom:he(20,16)},'[class~="lead"]':{fontSize:he(20,16),lineHeight:mr(32/20),marginTop:he(24,20),marginBottom:he(24,20)},blockquote:{marginTop:he(32,20),marginBottom:he(32,20),paddingInlineStart:he(20,20)},h1:{fontSize:he(36,16),marginTop:"0",marginBottom:he(32,36),lineHeight:mr(40/36)},h2:{fontSize:he(24,16),marginTop:he(48,24),marginBottom:he(24,24),lineHeight:mr(32/24)},h3:{fontSize:he(20,16),marginTop:he(32,20),marginBottom:he(12,20),lineHeight:mr(32/20)},h4:{marginTop:he(24,16),marginBottom:he(8,16),lineHeight:mr(24/16)},img:{marginTop:he(32,16),marginBottom:he(32,16)},picture:{marginTop:he(32,16),marginBottom:he(32,16)},"picture > img":{marginTop:"0",marginBottom:"0"},video:{marginTop:he(32,16),marginBottom:he(32,16)},kbd:{fontSize:he(14,16),borderRadius:js(5),paddingTop:he(3,16),paddingInlineEnd:he(6,16),paddingBottom:he(3,16),paddingInlineStart:he(6,16)},code:{fontSize:he(14,16)},"h2 code":{fontSize:he(21,24)},"h3 code":{fontSize:he(18,20)},pre:{fontSize:he(14,16),lineHeight:mr(24/14),marginTop:he(24,14),marginBottom:he(24,14),borderRadius:js(6),paddingTop:he(12,14),paddingInlineEnd:he(16,14),paddingBottom:he(12,14),paddingInlineStart:he(16,14)},ol:{marginTop:he(20,16),marginBottom:he(20,16),paddingInlineStart:he(26,16)},ul:{marginTop:he(20,16),marginBottom:he(20,16),paddingInlineStart:he(26,16)},li:{marginTop:he(8,16),marginBottom:he(8,16)},"ol > li":{paddingInlineStart:he(6,16)},"ul > li":{paddingInlineStart:he(6,16)},"> ul > li p":{marginTop:he(12,16),marginBottom:he(12,16)},"> ul > li > p:first-child":{marginTop:he(20,16)},"> ul > li > p:last-child":{marginBottom:he(20,16)},"> ol > li > p:first-child":{marginTop:he(20,16)},"> ol > li > p:last-child":{marginBottom:he(20,16)},"ul ul, ul ol, ol ul, ol ol":{marginTop:he(12,16),marginBottom:he(12,16)},dl:{marginTop:he(20,16),marginBottom:he(20,16)},dt:{marginTop:he(20,16)},dd:{marginTop:he(8,16),paddingInlineStart:he(26,16)},hr:{marginTop:he(48,16),marginBottom:he(48,16)},"hr + *":{marginTop:"0"},"h2 + *":{marginTop:"0"},"h3 + *":{marginTop:"0"},"h4 + *":{marginTop:"0"},table:{fontSize:he(14,16),lineHeight:mr(24/14)},"thead th":{paddingInlineEnd:he(8,14),paddingBottom:he(8,14),paddingInlineStart:he(8,14)},"thead th:first-child":{paddingInlineStart:"0"},"thead th:last-child":{paddingInlineEnd:"0"},"tbody td, tfoot td":{paddingTop:he(8,14),paddingInlineEnd:he(8,14),paddingBottom:he(8,14),paddingInlineStart:he(8,14)},"tbody td:first-child, tfoot td:first-child":{paddingInlineStart:"0"},"tbody td:last-child, tfoot td:last-child":{paddingInlineEnd:"0"},figure:{marginTop:he(32,16),marginBottom:he(32,16)},"figure > *":{marginTop:"0",marginBottom:"0"},figcaption:{fontSize:he(14,16),lineHeight:mr(20/14),marginTop:he(12,14)}},{"> :first-child":{marginTop:"0"},"> :last-child":{marginBottom:"0"}}]},lg:{css:[{fontSize:js(18),lineHeight:mr(32/18),p:{marginTop:he(24,18),marginBottom:he(24,18)},'[class~="lead"]':{fontSize:he(22,18),lineHeight:mr(32/22),marginTop:he(24,22),marginBottom:he(24,22)},blockquote:{marginTop:he(40,24),marginBottom:he(40,24),paddingInlineStart:he(24,24)},h1:{fontSize:he(48,18),marginTop:"0",marginBottom:he(40,48),lineHeight:mr(48/48)},h2:{fontSize:he(30,18),marginTop:he(56,30),marginBottom:he(32,30),lineHeight:mr(40/30)},h3:{fontSize:he(24,18),marginTop:he(40,24),marginBottom:he(16,24),lineHeight:mr(36/24)},h4:{marginTop:he(32,18),marginBottom:he(8,18),lineHeight:mr(28/18)},img:{marginTop:he(32,18),marginBottom:he(32,18)},picture:{marginTop:he(32,18),marginBottom:he(32,18)},"picture > img":{marginTop:"0",marginBottom:"0"},video:{marginTop:he(32,18),marginBottom:he(32,18)},kbd:{fontSize:he(16,18),borderRadius:js(5),paddingTop:he(4,18),paddingInlineEnd:he(8,18),paddingBottom:he(4,18),paddingInlineStart:he(8,18)},code:{fontSize:he(16,18)},"h2 code":{fontSize:he(26,30)},"h3 code":{fontSize:he(21,24)},pre:{fontSize:he(16,18),lineHeight:mr(28/16),marginTop:he(32,16),marginBottom:he(32,16),borderRadius:js(6),paddingTop:he(16,16),paddingInlineEnd:he(24,16),paddingBottom:he(16,16),paddingInlineStart:he(24,16)},ol:{marginTop:he(24,18),marginBottom:he(24,18),paddingInlineStart:he(28,18)},ul:{marginTop:he(24,18),marginBottom:he(24,18),paddingInlineStart:he(28,18)},li:{marginTop:he(12,18),marginBottom:he(12,18)},"ol > li":{paddingInlineStart:he(8,18)},"ul > li":{paddingInlineStart:he(8,18)},"> ul > li p":{marginTop:he(16,18),marginBottom:he(16,18)},"> ul > li > p:first-child":{marginTop:he(24,18)},"> ul > li > p:last-child":{marginBottom:he(24,18)},"> ol > li > p:first-child":{marginTop:he(24,18)},"> ol > li > p:last-child":{marginBottom:he(24,18)},"ul ul, ul ol, ol ul, ol ol":{marginTop:he(16,18),marginBottom:he(16,18)},dl:{marginTop:he(24,18),marginBottom:he(24,18)},dt:{marginTop:he(24,18)},dd:{marginTop:he(12,18),paddingInlineStart:he(28,18)},hr:{marginTop:he(56,18),marginBottom:he(56,18)},"hr + *":{marginTop:"0"},"h2 + *":{marginTop:"0"},"h3 + *":{marginTop:"0"},"h4 + *":{marginTop:"0"},table:{fontSize:he(16,18),lineHeight:mr(24/16)},"thead th":{paddingInlineEnd:he(12,16),paddingBottom:he(12,16),paddingInlineStart:he(12,16)},"thead th:first-child":{paddingInlineStart:"0"},"thead th:last-child":{paddingInlineEnd:"0"},"tbody td, tfoot td":{paddingTop:he(12,16),paddingInlineEnd:he(12,16),paddingBottom:he(12,16),paddingInlineStart:he(12,16)},"tbody td:first-child, tfoot td:first-child":{paddingInlineStart:"0"},"tbody td:last-child, tfoot td:last-child":{paddingInlineEnd:"0"},figure:{marginTop:he(32,18),marginBottom:he(32,18)},"figure > *":{marginTop:"0",marginBottom:"0"},figcaption:{fontSize:he(16,18),lineHeight:mr(24/16),marginTop:he(16,16)}},{"> :first-child":{marginTop:"0"},"> :last-child":{marginBottom:"0"}}]},xl:{css:[{fontSize:js(20),lineHeight:mr(36/20),p:{marginTop:he(24,20),marginBottom:he(24,20)},'[class~="lead"]':{fontSize:he(24,20),lineHeight:mr(36/24),marginTop:he(24,24),marginBottom:he(24,24)},blockquote:{marginTop:he(48,30),marginBottom:he(48,30),paddingInlineStart:he(32,30)},h1:{fontSize:he(56,20),marginTop:"0",marginBottom:he(48,56),lineHeight:mr(56/56)},h2:{fontSize:he(36,20),marginTop:he(56,36),marginBottom:he(32,36),lineHeight:mr(40/36)},h3:{fontSize:he(30,20),marginTop:he(48,30),marginBottom:he(20,30),lineHeight:mr(40/30)},h4:{marginTop:he(36,20),marginBottom:he(12,20),lineHeight:mr(32/20)},img:{marginTop:he(40,20),marginBottom:he(40,20)},picture:{marginTop:he(40,20),marginBottom:he(40,20)},"picture > img":{marginTop:"0",marginBottom:"0"},video:{marginTop:he(40,20),marginBottom:he(40,20)},kbd:{fontSize:he(18,20),borderRadius:js(5),paddingTop:he(5,20),paddingInlineEnd:he(8,20),paddingBottom:he(5,20),paddingInlineStart:he(8,20)},code:{fontSize:he(18,20)},"h2 code":{fontSize:he(31,36)},"h3 code":{fontSize:he(27,30)},pre:{fontSize:he(18,20),lineHeight:mr(32/18),marginTop:he(36,18),marginBottom:he(36,18),borderRadius:js(8),paddingTop:he(20,18),paddingInlineEnd:he(24,18),paddingBottom:he(20,18),paddingInlineStart:he(24,18)},ol:{marginTop:he(24,20),marginBottom:he(24,20),paddingInlineStart:he(32,20)},ul:{marginTop:he(24,20),marginBottom:he(24,20),paddingInlineStart:he(32,20)},li:{marginTop:he(12,20),marginBottom:he(12,20)},"ol > li":{paddingInlineStart:he(8,20)},"ul > li":{paddingInlineStart:he(8,20)},"> ul > li p":{marginTop:he(16,20),marginBottom:he(16,20)},"> ul > li > p:first-child":{marginTop:he(24,20)},"> ul > li > p:last-child":{marginBottom:he(24,20)},"> ol > li > p:first-child":{marginTop:he(24,20)},"> ol > li > p:last-child":{marginBottom:he(24,20)},"ul ul, ul ol, ol ul, ol ol":{marginTop:he(16,20),marginBottom:he(16,20)},dl:{marginTop:he(24,20),marginBottom:he(24,20)},dt:{marginTop:he(24,20)},dd:{marginTop:he(12,20),paddingInlineStart:he(32,20)},hr:{marginTop:he(56,20),marginBottom:he(56,20)},"hr + *":{marginTop:"0"},"h2 + *":{marginTop:"0"},"h3 + *":{marginTop:"0"},"h4 + *":{marginTop:"0"},table:{fontSize:he(18,20),lineHeight:mr(28/18)},"thead th":{paddingInlineEnd:he(12,18),paddingBottom:he(16,18),paddingInlineStart:he(12,18)},"thead th:first-child":{paddingInlineStart:"0"},"thead th:last-child":{paddingInlineEnd:"0"},"tbody td, tfoot td":{paddingTop:he(16,18),paddingInlineEnd:he(12,18),paddingBottom:he(16,18),paddingInlineStart:he(12,18)},"tbody td:first-child, tfoot td:first-child":{paddingInlineStart:"0"},"tbody td:last-child, tfoot td:last-child":{paddingInlineEnd:"0"},figure:{marginTop:he(40,20),marginBottom:he(40,20)},"figure > *":{marginTop:"0",marginBottom:"0"},figcaption:{fontSize:he(18,20),lineHeight:mr(28/18),marginTop:he(18,18)}},{"> :first-child":{marginTop:"0"},"> :last-child":{marginBottom:"0"}}]},"2xl":{css:[{fontSize:js(24),lineHeight:mr(40/24),p:{marginTop:he(32,24),marginBottom:he(32,24)},'[class~="lead"]':{fontSize:he(30,24),lineHeight:mr(44/30),marginTop:he(32,30),marginBottom:he(32,30)},blockquote:{marginTop:he(64,36),marginBottom:he(64,36),paddingInlineStart:he(40,36)},h1:{fontSize:he(64,24),marginTop:"0",marginBottom:he(56,64),lineHeight:mr(64/64)},h2:{fontSize:he(48,24),marginTop:he(72,48),marginBottom:he(40,48),lineHeight:mr(52/48)},h3:{fontSize:he(36,24),marginTop:he(56,36),marginBottom:he(24,36),lineHeight:mr(44/36)},h4:{marginTop:he(40,24),marginBottom:he(16,24),lineHeight:mr(36/24)},img:{marginTop:he(48,24),marginBottom:he(48,24)},picture:{marginTop:he(48,24),marginBottom:he(48,24)},"picture > img":{marginTop:"0",marginBottom:"0"},video:{marginTop:he(48,24),marginBottom:he(48,24)},kbd:{fontSize:he(20,24),borderRadius:js(6),paddingTop:he(6,24),paddingInlineEnd:he(8,24),paddingBottom:he(6,24),paddingInlineStart:he(8,24)},code:{fontSize:he(20,24)},"h2 code":{fontSize:he(42,48)},"h3 code":{fontSize:he(32,36)},pre:{fontSize:he(20,24),lineHeight:mr(36/20),marginTop:he(40,20),marginBottom:he(40,20),borderRadius:js(8),paddingTop:he(24,20),paddingInlineEnd:he(32,20),paddingBottom:he(24,20),paddingInlineStart:he(32,20)},ol:{marginTop:he(32,24),marginBottom:he(32,24),paddingInlineStart:he(38,24)},ul:{marginTop:he(32,24),marginBottom:he(32,24),paddingInlineStart:he(38,24)},li:{marginTop:he(12,24),marginBottom:he(12,24)},"ol > li":{paddingInlineStart:he(10,24)},"ul > li":{paddingInlineStart:he(10,24)},"> ul > li p":{marginTop:he(20,24),marginBottom:he(20,24)},"> ul > li > p:first-child":{marginTop:he(32,24)},"> ul > li > p:last-child":{marginBottom:he(32,24)},"> ol > li > p:first-child":{marginTop:he(32,24)},"> ol > li > p:last-child":{marginBottom:he(32,24)},"ul ul, ul ol, ol ul, ol ol":{marginTop:he(16,24),marginBottom:he(16,24)},dl:{marginTop:he(32,24),marginBottom:he(32,24)},dt:{marginTop:he(32,24)},dd:{marginTop:he(12,24),paddingInlineStart:he(38,24)},hr:{marginTop:he(72,24),marginBottom:he(72,24)},"hr + *":{marginTop:"0"},"h2 + *":{marginTop:"0"},"h3 + *":{marginTop:"0"},"h4 + *":{marginTop:"0"},table:{fontSize:he(20,24),lineHeight:mr(28/20)},"thead th":{paddingInlineEnd:he(12,20),paddingBottom:he(16,20),paddingInlineStart:he(12,20)},"thead th:first-child":{paddingInlineStart:"0"},"thead th:last-child":{paddingInlineEnd:"0"},"tbody td, tfoot td":{paddingTop:he(16,20),paddingInlineEnd:he(12,20),paddingBottom:he(16,20),paddingInlineStart:he(12,20)},"tbody td:first-child, tfoot td:first-child":{paddingInlineStart:"0"},"tbody td:last-child, tfoot td:last-child":{paddingInlineEnd:"0"},figure:{marginTop:he(48,24),marginBottom:he(48,24)},"figure > *":{marginTop:"0",marginBottom:"0"},figcaption:{fontSize:he(20,24),lineHeight:mr(32/20),marginTop:he(20,20)}},{"> :first-child":{marginTop:"0"},"> :last-child":{marginBottom:"0"}}]},slate:{css:{"--tw-prose-body":Oe.slate[700],"--tw-prose-headings":Oe.slate[900],"--tw-prose-lead":Oe.slate[600],"--tw-prose-links":Oe.slate[900],"--tw-prose-bold":Oe.slate[900],"--tw-prose-counters":Oe.slate[500],"--tw-prose-bullets":Oe.slate[300],"--tw-prose-hr":Oe.slate[200],"--tw-prose-quotes":Oe.slate[900],"--tw-prose-quote-borders":Oe.slate[200],"--tw-prose-captions":Oe.slate[500],"--tw-prose-kbd":Oe.slate[900],"--tw-prose-kbd-shadows":Wu(Oe.slate[900]),"--tw-prose-code":Oe.slate[900],"--tw-prose-pre-code":Oe.slate[200],"--tw-prose-pre-bg":Oe.slate[800],"--tw-prose-th-borders":Oe.slate[300],"--tw-prose-td-borders":Oe.slate[200],"--tw-prose-invert-body":Oe.slate[300],"--tw-prose-invert-headings":Oe.white,"--tw-prose-invert-lead":Oe.slate[400],"--tw-prose-invert-links":Oe.white,"--tw-prose-invert-bold":Oe.white,"--tw-prose-invert-counters":Oe.slate[400],"--tw-prose-invert-bullets":Oe.slate[600],"--tw-prose-invert-hr":Oe.slate[700],"--tw-prose-invert-quotes":Oe.slate[100],"--tw-prose-invert-quote-borders":Oe.slate[700],"--tw-prose-invert-captions":Oe.slate[400],"--tw-prose-invert-kbd":Oe.white,"--tw-prose-invert-kbd-shadows":Wu(Oe.white),"--tw-prose-invert-code":Oe.white,"--tw-prose-invert-pre-code":Oe.slate[300],"--tw-prose-invert-pre-bg":"rgb(0 0 0 / 50%)","--tw-prose-invert-th-borders":Oe.slate[600],"--tw-prose-invert-td-borders":Oe.slate[700]}},gray:{css:{"--tw-prose-body":Oe.gray[700],"--tw-prose-headings":Oe.gray[900],"--tw-prose-lead":Oe.gray[600],"--tw-prose-links":Oe.gray[900],"--tw-prose-bold":Oe.gray[900],"--tw-prose-counters":Oe.gray[500],"--tw-prose-bullets":Oe.gray[300],"--tw-prose-hr":Oe.gray[200],"--tw-prose-quotes":Oe.gray[900],"--tw-prose-quote-borders":Oe.gray[200],"--tw-prose-captions":Oe.gray[500],"--tw-prose-kbd":Oe.gray[900],"--tw-prose-kbd-shadows":Wu(Oe.gray[900]),"--tw-prose-code":Oe.gray[900],"--tw-prose-pre-code":Oe.gray[200],"--tw-prose-pre-bg":Oe.gray[800],"--tw-prose-th-borders":Oe.gray[300],"--tw-prose-td-borders":Oe.gray[200],"--tw-prose-invert-body":Oe.gray[300],"--tw-prose-invert-headings":Oe.white,"--tw-prose-invert-lead":Oe.gray[400],"--tw-prose-invert-links":Oe.white,"--tw-prose-invert-bold":Oe.white,"--tw-prose-invert-counters":Oe.gray[400],"--tw-prose-invert-bullets":Oe.gray[600],"--tw-prose-invert-hr":Oe.gray[700],"--tw-prose-invert-quotes":Oe.gray[100],"--tw-prose-invert-quote-borders":Oe.gray[700],"--tw-prose-invert-captions":Oe.gray[400],"--tw-prose-invert-kbd":Oe.white,"--tw-prose-invert-kbd-shadows":Wu(Oe.white),"--tw-prose-invert-code":Oe.white,"--tw-prose-invert-pre-code":Oe.gray[300],"--tw-prose-invert-pre-bg":"rgb(0 0 0 / 50%)","--tw-prose-invert-th-borders":Oe.gray[600],"--tw-prose-invert-td-borders":Oe.gray[700]}},zinc:{css:{"--tw-prose-body":Oe.zinc[700],"--tw-prose-headings":Oe.zinc[900],"--tw-prose-lead":Oe.zinc[600],"--tw-prose-links":Oe.zinc[900],"--tw-prose-bold":Oe.zinc[900],"--tw-prose-counters":Oe.zinc[500],"--tw-prose-bullets":Oe.zinc[300],"--tw-prose-hr":Oe.zinc[200],"--tw-prose-quotes":Oe.zinc[900],"--tw-prose-quote-borders":Oe.zinc[200],"--tw-prose-captions":Oe.zinc[500],"--tw-prose-kbd":Oe.zinc[900],"--tw-prose-kbd-shadows":Wu(Oe.zinc[900]),"--tw-prose-code":Oe.zinc[900],"--tw-prose-pre-code":Oe.zinc[200],"--tw-prose-pre-bg":Oe.zinc[800],"--tw-prose-th-borders":Oe.zinc[300],"--tw-prose-td-borders":Oe.zinc[200],"--tw-prose-invert-body":Oe.zinc[300],"--tw-prose-invert-headings":Oe.white,"--tw-prose-invert-lead":Oe.zinc[400],"--tw-prose-invert-links":Oe.white,"--tw-prose-invert-bold":Oe.white,"--tw-prose-invert-counters":Oe.zinc[400],"--tw-prose-invert-bullets":Oe.zinc[600],"--tw-prose-invert-hr":Oe.zinc[700],"--tw-prose-invert-quotes":Oe.zinc[100],"--tw-prose-invert-quote-borders":Oe.zinc[700],"--tw-prose-invert-captions":Oe.zinc[400],"--tw-prose-invert-kbd":Oe.white,"--tw-prose-invert-kbd-shadows":Wu(Oe.white),"--tw-prose-invert-code":Oe.white,"--tw-prose-invert-pre-code":Oe.zinc[300],"--tw-prose-invert-pre-bg":"rgb(0 0 0 / 50%)","--tw-prose-invert-th-borders":Oe.zinc[600],"--tw-prose-invert-td-borders":Oe.zinc[700]}},neutral:{css:{"--tw-prose-body":Oe.neutral[700],"--tw-prose-headings":Oe.neutral[900],"--tw-prose-lead":Oe.neutral[600],"--tw-prose-links":Oe.neutral[900],"--tw-prose-bold":Oe.neutral[900],"--tw-prose-counters":Oe.neutral[500],"--tw-prose-bullets":Oe.neutral[300],"--tw-prose-hr":Oe.neutral[200],"--tw-prose-quotes":Oe.neutral[900],"--tw-prose-quote-borders":Oe.neutral[200],"--tw-prose-captions":Oe.neutral[500],"--tw-prose-kbd":Oe.neutral[900],"--tw-prose-kbd-shadows":Wu(Oe.neutral[900]),"--tw-prose-code":Oe.neutral[900],"--tw-prose-pre-code":Oe.neutral[200],"--tw-prose-pre-bg":Oe.neutral[800],"--tw-prose-th-borders":Oe.neutral[300],"--tw-prose-td-borders":Oe.neutral[200],"--tw-prose-invert-body":Oe.neutral[300],"--tw-prose-invert-headings":Oe.white,"--tw-prose-invert-lead":Oe.neutral[400],"--tw-prose-invert-links":Oe.white,"--tw-prose-invert-bold":Oe.white,"--tw-prose-invert-counters":Oe.neutral[400],"--tw-prose-invert-bullets":Oe.neutral[600],"--tw-prose-invert-hr":Oe.neutral[700],"--tw-prose-invert-quotes":Oe.neutral[100],"--tw-prose-invert-quote-borders":Oe.neutral[700],"--tw-prose-invert-captions":Oe.neutral[400],"--tw-prose-invert-kbd":Oe.white,"--tw-prose-invert-kbd-shadows":Wu(Oe.white),"--tw-prose-invert-code":Oe.white,"--tw-prose-invert-pre-code":Oe.neutral[300],"--tw-prose-invert-pre-bg":"rgb(0 0 0 / 50%)","--tw-prose-invert-th-borders":Oe.neutral[600],"--tw-prose-invert-td-borders":Oe.neutral[700]}},stone:{css:{"--tw-prose-body":Oe.stone[700],"--tw-prose-headings":Oe.stone[900],"--tw-prose-lead":Oe.stone[600],"--tw-prose-links":Oe.stone[900],"--tw-prose-bold":Oe.stone[900],"--tw-prose-counters":Oe.stone[500],"--tw-prose-bullets":Oe.stone[300],"--tw-prose-hr":Oe.stone[200],"--tw-prose-quotes":Oe.stone[900],"--tw-prose-quote-borders":Oe.stone[200],"--tw-prose-captions":Oe.stone[500],"--tw-prose-kbd":Oe.stone[900],"--tw-prose-kbd-shadows":Wu(Oe.stone[900]),"--tw-prose-code":Oe.stone[900],"--tw-prose-pre-code":Oe.stone[200],"--tw-prose-pre-bg":Oe.stone[800],"--tw-prose-th-borders":Oe.stone[300],"--tw-prose-td-borders":Oe.stone[200],"--tw-prose-invert-body":Oe.stone[300],"--tw-prose-invert-headings":Oe.white,"--tw-prose-invert-lead":Oe.stone[400],"--tw-prose-invert-links":Oe.white,"--tw-prose-invert-bold":Oe.white,"--tw-prose-invert-counters":Oe.stone[400],"--tw-prose-invert-bullets":Oe.stone[600],"--tw-prose-invert-hr":Oe.stone[700],"--tw-prose-invert-quotes":Oe.stone[100],"--tw-prose-invert-quote-borders":Oe.stone[700],"--tw-prose-invert-captions":Oe.stone[400],"--tw-prose-invert-kbd":Oe.white,"--tw-prose-invert-kbd-shadows":Wu(Oe.white),"--tw-prose-invert-code":Oe.white,"--tw-prose-invert-pre-code":Oe.stone[300],"--tw-prose-invert-pre-bg":"rgb(0 0 0 / 50%)","--tw-prose-invert-th-borders":Oe.stone[600],"--tw-prose-invert-td-borders":Oe.stone[700]}},red:{css:{"--tw-prose-links":Oe.red[600],"--tw-prose-invert-links":Oe.red[500]}},orange:{css:{"--tw-prose-links":Oe.orange[600],"--tw-prose-invert-links":Oe.orange[500]}},amber:{css:{"--tw-prose-links":Oe.amber[600],"--tw-prose-invert-links":Oe.amber[500]}},yellow:{css:{"--tw-prose-links":Oe.yellow[600],"--tw-prose-invert-links":Oe.yellow[500]}},lime:{css:{"--tw-prose-links":Oe.lime[600],"--tw-prose-invert-links":Oe.lime[500]}},green:{css:{"--tw-prose-links":Oe.green[600],"--tw-prose-invert-links":Oe.green[500]}},emerald:{css:{"--tw-prose-links":Oe.emerald[600],"--tw-prose-invert-links":Oe.emerald[500]}},teal:{css:{"--tw-prose-links":Oe.teal[600],"--tw-prose-invert-links":Oe.teal[500]}},cyan:{css:{"--tw-prose-links":Oe.cyan[600],"--tw-prose-invert-links":Oe.cyan[500]}},sky:{css:{"--tw-prose-links":Oe.sky[600],"--tw-prose-invert-links":Oe.sky[500]}},blue:{css:{"--tw-prose-links":Oe.blue[600],"--tw-prose-invert-links":Oe.blue[500]}},indigo:{css:{"--tw-prose-links":Oe.indigo[600],"--tw-prose-invert-links":Oe.indigo[500]}},violet:{css:{"--tw-prose-links":Oe.violet[600],"--tw-prose-invert-links":Oe.violet[500]}},purple:{css:{"--tw-prose-links":Oe.purple[600],"--tw-prose-invert-links":Oe.purple[500]}},fuchsia:{css:{"--tw-prose-links":Oe.fuchsia[600],"--tw-prose-invert-links":Oe.fuchsia[500]}},pink:{css:{"--tw-prose-links":Oe.pink[600],"--tw-prose-invert-links":Oe.pink[500]}},rose:{css:{"--tw-prose-links":Oe.rose[600],"--tw-prose-invert-links":Oe.rose[500]}},invert:{css:{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-kbd":"var(--tw-prose-invert-kbd)","--tw-prose-kbd-shadows":"var(--tw-prose-invert-kbd-shadows)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}};Hie.exports={DEFAULT:{css:[{color:"var(--tw-prose-body)",maxWidth:"65ch",p:{},'[class~="lead"]':{color:"var(--tw-prose-lead)"},a:{color:"var(--tw-prose-links)",textDecoration:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong":{color:"inherit"},"blockquote strong":{color:"inherit"},"thead th strong":{color:"inherit"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},ul:{listStyleType:"disc"},"ol > li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul > li::marker":{color:"var(--tw-prose-bullets)"},dt:{color:"var(--tw-prose-headings)",fontWeight:"600"},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:1},blockquote:{fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderInlineStartWidth:"0.25rem",borderInlineStartColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},h1:{color:"var(--tw-prose-headings)",fontWeight:"800"},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600"},"h4 strong":{fontWeight:"700",color:"inherit"},img:{},picture:{display:"block"},video:{},kbd:{fontWeight:"500",fontFamily:"inherit",color:"var(--tw-prose-kbd)",boxShadow:"0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%)"},code:{color:"var(--tw-prose-code)",fontWeight:"600"},"code::before":{content:'"`"'},"code::after":{content:'"`"'},"a code":{color:"inherit"},"h1 code":{color:"inherit"},"h2 code":{color:"inherit"},"h3 code":{color:"inherit"},"h4 code":{color:"inherit"},"blockquote code":{color:"inherit"},"thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400"},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",marginTop:he(32,16),marginBottom:he(32,16)},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td":{verticalAlign:"baseline"},tfoot:{borderTopWidth:"1px",borderTopColor:"var(--tw-prose-th-borders)"},"tfoot td":{verticalAlign:"top"},"th, td":{textAlign:"start"},"figure > *":{},figcaption:{color:"var(--tw-prose-captions)"}},$I.gray.css,...$I.base.css]},...$I}});var jie=Ke((CVt,Yie)=>{b();var ZGe="[object Object]";function QGe(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function JGe(t,e){return function(r){return t(e(r))}}var eYe=Function.prototype,Wie=Object.prototype,Gie=eYe.toString,tYe=Wie.hasOwnProperty,rYe=Gie.call(Object),nYe=Wie.toString,iYe=JGe(Object.getPrototypeOf,Object);function aYe(t){return!!t&&typeof t=="object"}function sYe(t){if(!aYe(t)||nYe.call(t)!=ZGe||QGe(t))return!1;var e=iYe(t);if(e===null)return!0;var r=tYe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Gie.call(r)==rYe}Yie.exports=sYe});var VI=Ke((bS,Xie)=>{"use strict";b();bS.__esModule=!0;bS.default=cYe;function oYe(t){for(var e=t.toLowerCase(),r="",n=!1,i=0;i<6&&e[i]!==void 0;i++){var a=e.charCodeAt(i),s=a>=97&&a<=102||a>=48&&a<=57;if(n=a===32,!s)break;r+=e[i]}if(r.length!==0){var o=parseInt(r,16),l=o>=55296&&o<=57343;return l||o===0||o>1114111?["\uFFFD",r.length+(n?1:0)]:[String.fromCodePoint(o),r.length+(n?1:0)]}}var lYe=/\\/;function cYe(t){var e=lYe.test(t);if(!e)return t;for(var r="",n=0;n{"use strict";b();xS.__esModule=!0;xS.default=uYe;function uYe(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n0;){var i=r.shift();if(!t[i])return;t=t[i]}return t}Kie.exports=xS.default});var Jie=Ke((wS,Qie)=>{"use strict";b();wS.__esModule=!0;wS.default=hYe;function hYe(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n0;){var i=r.shift();t[i]||(t[i]={}),t=t[i]}}Qie.exports=wS.default});var tae=Ke((kS,eae)=>{"use strict";b();kS.__esModule=!0;kS.default=fYe;function fYe(t){for(var e="",r=t.indexOf("/*"),n=0;r>=0;){e=e+t.slice(n,r);var i=t.indexOf("*/",r+2);if(i<0)return e;n=i+2,r=t.indexOf("/*",n)}return e=e+t.slice(n),e}eae.exports=kS.default});var Gx=Ke(Gu=>{"use strict";b();Gu.__esModule=!0;Gu.stripComments=Gu.ensureObject=Gu.getProp=Gu.unesc=void 0;var dYe=TS(VI());Gu.unesc=dYe.default;var pYe=TS(Zie());Gu.getProp=pYe.default;var gYe=TS(Jie());Gu.ensureObject=gYe.default;var mYe=TS(tae());Gu.stripComments=mYe.default;function TS(t){return t&&t.__esModule?t:{default:t}}});var hf=Ke((Yx,iae)=>{"use strict";b();Yx.__esModule=!0;Yx.default=void 0;var rae=Gx();function nae(t,e){for(var r=0;rn||this.source.end.linei||this.source.end.line===n&&this.source.end.column{"use strict";b();Xn.__esModule=!0;Xn.UNIVERSAL=Xn.ATTRIBUTE=Xn.CLASS=Xn.COMBINATOR=Xn.COMMENT=Xn.ID=Xn.NESTING=Xn.PSEUDO=Xn.ROOT=Xn.SELECTOR=Xn.STRING=Xn.TAG=void 0;var xYe="tag";Xn.TAG=xYe;var wYe="string";Xn.STRING=wYe;var kYe="selector";Xn.SELECTOR=kYe;var TYe="root";Xn.ROOT=TYe;var EYe="pseudo";Xn.PSEUDO=EYe;var SYe="nesting";Xn.NESTING=SYe;var CYe="id";Xn.ID=CYe;var _Ye="comment";Xn.COMMENT=_Ye;var AYe="combinator";Xn.COMBINATOR=AYe;var LYe="class";Xn.CLASS=LYe;var MYe="attribute";Xn.ATTRIBUTE=MYe;var DYe="universal";Xn.UNIVERSAL=DYe});var ES=Ke((jx,lae)=>{"use strict";b();jx.__esModule=!0;jx.default=void 0;var OYe=IYe(hf()),ff=RYe(ts());function oae(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return oae=function(){return t},t}function RYe(t){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var e=oae();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=n?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}function IYe(t){return t&&t.__esModule?t:{default:t}}function NYe(t,e){var r;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(r=PYe(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return r=t[Symbol.iterator](),r.next.bind(r)}function PYe(t,e){if(t){if(typeof t=="string")return aae(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aae(t,e)}}function aae(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=i&&(this.indexes[s]=a-1);return this},r.removeAll=function(){for(var i=NYe(this.nodes),a;!(a=i()).done;){var s=a.value;s.parent=void 0}return this.nodes=[],this},r.empty=function(){return this.removeAll()},r.insertAfter=function(i,a){a.parent=this;var s=this.index(i);this.nodes.splice(s+1,0,a),a.parent=this;var o;for(var l in this.indexes)o=this.indexes[l],s<=o&&(this.indexes[l]=o+1);return this},r.insertBefore=function(i,a){a.parent=this;var s=this.index(i);this.nodes.splice(s,0,a),a.parent=this;var o;for(var l in this.indexes)o=this.indexes[l],o<=s&&(this.indexes[l]=o+1);return this},r._findChildAtPosition=function(i,a){var s=void 0;return this.each(function(o){if(o.atPosition){var l=o.atPosition(i,a);if(l)return s=l,!1}else if(o.isAtPosition(i,a))return s=o,!1}),s},r.atPosition=function(i,a){if(this.isAtPosition(i,a))return this._findChildAtPosition(i,a)||this},r._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},r.each=function(i){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var a=this.lastEach;if(this.indexes[a]=0,!!this.length){for(var s,o;this.indexes[a]{"use strict";b();Xx.__esModule=!0;Xx.default=void 0;var $Ye=UYe(ES()),VYe=ts();function UYe(t){return t&&t.__esModule?t:{default:t}}function cae(t,e){for(var r=0;r{"use strict";b();Kx.__esModule=!0;Kx.default=void 0;var GYe=jYe(ES()),YYe=ts();function jYe(t){return t&&t.__esModule?t:{default:t}}function XYe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,WI(t,e)}function WI(t,e){return WI=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},WI(t,e)}var KYe=function(t){XYe(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=YYe.SELECTOR,n}return e}(GYe.default);Kx.default=KYe;hae.exports=Kx.default});var SS=Ke(($Vt,fae)=>{"use strict";b();var ZYe={},QYe=ZYe.hasOwnProperty,JYe=function(e,r){if(!e)return r;var n={};for(var i in r)n[i]=QYe.call(e,i)?e[i]:r[i];return n},eje=/[ -,\.\/:-@\[-\^`\{-~]/,tje=/[ -,\.\/:-@\[\]\^`\{-~]/,rje=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,YI=function t(e,r){r=JYe(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",i=r.isIdentifier,a=e.charAt(0),s="",o=0,l=e.length;o126){if(h>=55296&&h<=56319&&o{"use strict";b();Zx.__esModule=!0;Zx.default=void 0;var nje=pae(SS()),ije=Gx(),aje=pae(hf()),sje=ts();function pae(t){return t&&t.__esModule?t:{default:t}}function dae(t,e){for(var r=0;r{"use strict";b();Qx.__esModule=!0;Qx.default=void 0;var uje=fje(hf()),hje=ts();function fje(t){return t&&t.__esModule?t:{default:t}}function dje(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,KI(t,e)}function KI(t,e){return KI=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},KI(t,e)}var pje=function(t){dje(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=hje.COMMENT,n}return e}(uje.default);Qx.default=pje;mae.exports=Qx.default});var JI=Ke((Jx,vae)=>{"use strict";b();Jx.__esModule=!0;Jx.default=void 0;var gje=vje(hf()),mje=ts();function vje(t){return t&&t.__esModule?t:{default:t}}function yje(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,QI(t,e)}function QI(t,e){return QI=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},QI(t,e)}var bje=function(t){yje(e,t);function e(n){var i;return i=t.call(this,n)||this,i.type=mje.ID,i}var r=e.prototype;return r.valueToString=function(){return"#"+t.prototype.valueToString.call(this)},e}(gje.default);Jx.default=bje;vae.exports=Jx.default});var CS=Ke((ew,xae)=>{"use strict";b();ew.__esModule=!0;ew.default=void 0;var xje=bae(SS()),wje=Gx(),kje=bae(hf());function bae(t){return t&&t.__esModule?t:{default:t}}function yae(t,e){for(var r=0;r{"use strict";b();tw.__esModule=!0;tw.default=void 0;var Cje=Aje(CS()),_je=ts();function Aje(t){return t&&t.__esModule?t:{default:t}}function Lje(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,tN(t,e)}function tN(t,e){return tN=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},tN(t,e)}var Mje=function(t){Lje(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=_je.TAG,n}return e}(Cje.default);tw.default=Mje;wae.exports=tw.default});var iN=Ke((rw,kae)=>{"use strict";b();rw.__esModule=!0;rw.default=void 0;var Dje=Rje(hf()),Oje=ts();function Rje(t){return t&&t.__esModule?t:{default:t}}function Ije(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,nN(t,e)}function nN(t,e){return nN=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},nN(t,e)}var Nje=function(t){Ije(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=Oje.STRING,n}return e}(Dje.default);rw.default=Nje;kae.exports=rw.default});var sN=Ke((nw,Tae)=>{"use strict";b();nw.__esModule=!0;nw.default=void 0;var Pje=Bje(ES()),Fje=ts();function Bje(t){return t&&t.__esModule?t:{default:t}}function zje(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,aN(t,e)}function aN(t,e){return aN=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},aN(t,e)}var $je=function(t){zje(e,t);function e(n){var i;return i=t.call(this,n)||this,i.type=Fje.PSEUDO,i}var r=e.prototype;return r.toString=function(){var i=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),i,this.rawSpaceAfter].join("")},e}(Pje.default);nw.default=$je;Tae.exports=nw.default});var Sae=Ke((XVt,Eae)=>{b();Eae.exports=Vje;function Vje(t,e){if(oN("noDeprecation"))return t;var r=!1;function n(){if(!r){if(oN("throwDeprecation"))throw new Error(e);oN("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function oN(t){try{if(!global.localStorage)return!1}catch{return!1}var e=global.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var dN=Ke(sw=>{"use strict";b();sw.__esModule=!0;sw.unescapeValue=fN;sw.default=void 0;var iw=hN(SS()),Uje=hN(VI()),Hje=hN(CS()),qje=ts(),lN;function hN(t){return t&&t.__esModule?t:{default:t}}function Cae(t,e){for(var r=0;r0&&!i.quoted&&o.before.length===0&&!(i.spaces.value&&i.spaces.value.after)&&(o.before=" "),_ae(s,o)}))),a.push("]"),a.push(this.rawSpaceAfter),a.join("")},Wje(e,[{key:"quoted",get:function(){var i=this.quoteMark;return i==="'"||i==='"'},set:function(i){Xje()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(i){if(!this._constructed){this._quoteMark=i;return}this._quoteMark!==i&&(this._quoteMark=i,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(i){if(this._constructed){var a=fN(i),s=a.deprecatedUsage,o=a.unescaped,l=a.quoteMark;if(s&&jje(),o===this._value&&l===this._quoteMark)return;this._value=o,this._quoteMark=l,this._syncRawValue()}else this._value=i}},{key:"attribute",get:function(){return this._attribute},set:function(i){this._handleEscapes("attribute",i),this._attribute=i}}]),e}(Hje.default);sw.default=_S;_S.NO_QUOTE=null;_S.SINGLE_QUOTE="'";_S.DOUBLE_QUOTE='"';var cN=(lN={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},lN[null]={isIdentifier:!0},lN);function _ae(t,e){return""+e.before+t+e.after}});var gN=Ke((ow,Aae)=>{"use strict";b();ow.__esModule=!0;ow.default=void 0;var Qje=eXe(CS()),Jje=ts();function eXe(t){return t&&t.__esModule?t:{default:t}}function tXe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,pN(t,e)}function pN(t,e){return pN=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},pN(t,e)}var rXe=function(t){tXe(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=Jje.UNIVERSAL,n.value="*",n}return e}(Qje.default);ow.default=rXe;Aae.exports=ow.default});var vN=Ke((lw,Lae)=>{"use strict";b();lw.__esModule=!0;lw.default=void 0;var nXe=aXe(hf()),iXe=ts();function aXe(t){return t&&t.__esModule?t:{default:t}}function sXe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,mN(t,e)}function mN(t,e){return mN=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},mN(t,e)}var oXe=function(t){sXe(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=iXe.COMBINATOR,n}return e}(nXe.default);lw.default=oXe;Lae.exports=lw.default});var bN=Ke((cw,Mae)=>{"use strict";b();cw.__esModule=!0;cw.default=void 0;var lXe=uXe(hf()),cXe=ts();function uXe(t){return t&&t.__esModule?t:{default:t}}function hXe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,yN(t,e)}function yN(t,e){return yN=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},yN(t,e)}var fXe=function(t){hXe(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=cXe.NESTING,n.value="&",n}return e}(lXe.default);cw.default=fXe;Mae.exports=cw.default});var Oae=Ke((AS,Dae)=>{"use strict";b();AS.__esModule=!0;AS.default=dXe;function dXe(t){return t.sort(function(e,r){return e-r})}Dae.exports=AS.default});var xN=Ke(Ht=>{"use strict";b();Ht.__esModule=!0;Ht.combinator=Ht.word=Ht.comment=Ht.str=Ht.tab=Ht.newline=Ht.feed=Ht.cr=Ht.backslash=Ht.bang=Ht.slash=Ht.doubleQuote=Ht.singleQuote=Ht.space=Ht.greaterThan=Ht.pipe=Ht.equals=Ht.plus=Ht.caret=Ht.tilde=Ht.dollar=Ht.closeSquare=Ht.openSquare=Ht.closeParenthesis=Ht.openParenthesis=Ht.semicolon=Ht.colon=Ht.comma=Ht.at=Ht.asterisk=Ht.ampersand=void 0;var pXe=38;Ht.ampersand=pXe;var gXe=42;Ht.asterisk=gXe;var mXe=64;Ht.at=mXe;var vXe=44;Ht.comma=vXe;var yXe=58;Ht.colon=yXe;var bXe=59;Ht.semicolon=bXe;var xXe=40;Ht.openParenthesis=xXe;var wXe=41;Ht.closeParenthesis=wXe;var kXe=91;Ht.openSquare=kXe;var TXe=93;Ht.closeSquare=TXe;var EXe=36;Ht.dollar=EXe;var SXe=126;Ht.tilde=SXe;var CXe=94;Ht.caret=CXe;var _Xe=43;Ht.plus=_Xe;var AXe=61;Ht.equals=AXe;var LXe=124;Ht.pipe=LXe;var MXe=62;Ht.greaterThan=MXe;var DXe=32;Ht.space=DXe;var Rae=39;Ht.singleQuote=Rae;var OXe=34;Ht.doubleQuote=OXe;var RXe=47;Ht.slash=RXe;var IXe=33;Ht.bang=IXe;var NXe=92;Ht.backslash=NXe;var PXe=13;Ht.cr=PXe;var FXe=12;Ht.feed=FXe;var BXe=10;Ht.newline=BXe;var zXe=9;Ht.tab=zXe;var $Xe=Rae;Ht.str=$Xe;var VXe=-1;Ht.comment=VXe;var UXe=-2;Ht.word=UXe;var HXe=-3;Ht.combinator=HXe});var Pae=Ke(uw=>{"use strict";b();uw.__esModule=!0;uw.default=KXe;uw.FIELDS=void 0;var Lt=qXe(xN()),Q1,$n;function Nae(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return Nae=function(){return t},t}function qXe(t){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var e=Nae();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=n?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var WXe=(Q1={},Q1[Lt.tab]=!0,Q1[Lt.newline]=!0,Q1[Lt.cr]=!0,Q1[Lt.feed]=!0,Q1),GXe=($n={},$n[Lt.space]=!0,$n[Lt.tab]=!0,$n[Lt.newline]=!0,$n[Lt.cr]=!0,$n[Lt.feed]=!0,$n[Lt.ampersand]=!0,$n[Lt.asterisk]=!0,$n[Lt.bang]=!0,$n[Lt.comma]=!0,$n[Lt.colon]=!0,$n[Lt.semicolon]=!0,$n[Lt.openParenthesis]=!0,$n[Lt.closeParenthesis]=!0,$n[Lt.openSquare]=!0,$n[Lt.closeSquare]=!0,$n[Lt.singleQuote]=!0,$n[Lt.doubleQuote]=!0,$n[Lt.plus]=!0,$n[Lt.pipe]=!0,$n[Lt.tilde]=!0,$n[Lt.greaterThan]=!0,$n[Lt.equals]=!0,$n[Lt.dollar]=!0,$n[Lt.caret]=!0,$n[Lt.slash]=!0,$n),wN={},Iae="0123456789abcdefABCDEF";for(LS=0;LS0?(w=s+m,k=y-v[m].length):(w=s,k=a),T=Lt.comment,s=w,d=w,f=y-k):u===Lt.slash?(y=o,T=u,d=s,f=o-a,l=y+1):(y=YXe(r,o),T=Lt.word,d=s,f=y-a),l=y+1;break}e.push([T,s,o-a,d,f,o,l]),k&&(a=k,k=null),o=l}return e}});var qae=Ke((hw,Hae)=>{"use strict";b();hw.__esModule=!0;hw.default=void 0;var ZXe=Vl(qI()),kN=Vl(GI()),QXe=Vl(XI()),Fae=Vl(ZI()),JXe=Vl(JI()),eKe=Vl(rN()),TN=Vl(iN()),tKe=Vl(sN()),Bae=MS(dN()),rKe=Vl(gN()),EN=Vl(vN()),nKe=Vl(bN()),iKe=Vl(Oae()),bt=MS(Pae()),Ft=MS(xN()),aKe=MS(ts()),gi=Gx(),G0,SN;function Uae(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return Uae=function(){return t},t}function MS(t){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var e=Uae();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=n?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}function Vl(t){return t&&t.__esModule?t:{default:t}}function zae(t,e){for(var r=0;r0){var s=this.current.last;if(s){var o=this.convertWhitespaceNodesToSpace(a),l=o.space,u=o.rawSpace;u!==void 0&&(s.rawSpaceAfter+=u),s.spaces.after+=l}else a.forEach(function(T){return n.newNode(T)})}return}var h=this.currToken,f=void 0;i>this.position&&(f=this.parseWhitespaceEquivalentTokens(i));var d;if(this.isNamedCombinator()?d=this.namedCombinator():this.currToken[bt.FIELDS.TYPE]===Ft.combinator?(d=new EN.default({value:this.content(),source:J1(this.currToken),sourceIndex:this.currToken[bt.FIELDS.START_POS]}),this.position++):AN[this.currToken[bt.FIELDS.TYPE]]||f||this.unexpected(),d){if(f){var p=this.convertWhitespaceNodesToSpace(f),g=p.space,m=p.rawSpace;d.spaces.before=g,d.rawSpaceBefore=m}}else{var v=this.convertWhitespaceNodesToSpace(f,!0),y=v.space,w=v.rawSpace;w||(w=y);var k={},E={spaces:{}};y.endsWith(" ")&&w.endsWith(" ")?(k.before=y.slice(0,y.length-1),E.spaces.before=w.slice(0,w.length-1)):y.startsWith(" ")&&w.startsWith(" ")?(k.after=y.slice(1),E.spaces.after=w.slice(1)):E.value=w,d=new EN.default({value:" ",source:CN(h,this.tokens[this.position-1]),sourceIndex:h[bt.FIELDS.START_POS],spaces:k,raws:E})}return this.currToken&&this.currToken[bt.FIELDS.TYPE]===Ft.space&&(d.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(d)},e.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var n=new kN.default({source:{start:$ae(this.tokens[this.position+1])}});this.current.parent.append(n),this.current=n,this.position++},e.comment=function(){var n=this.currToken;this.newNode(new Fae.default({value:this.content(),source:J1(n),sourceIndex:n[bt.FIELDS.START_POS]})),this.position++},e.error=function(n,i){throw this.root.error(n,i)},e.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[bt.FIELDS.START_POS]})},e.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[bt.FIELDS.START_POS])},e.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[bt.FIELDS.START_POS])},e.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[bt.FIELDS.START_POS])},e.namespace=function(){var n=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[bt.FIELDS.TYPE]===Ft.word)return this.position++,this.word(n);if(this.nextToken[bt.FIELDS.TYPE]===Ft.asterisk)return this.position++,this.universal(n)},e.nesting=function(){if(this.nextToken){var n=this.content(this.nextToken);if(n==="|"){this.position++;return}}var i=this.currToken;this.newNode(new nKe.default({value:this.content(),source:J1(i),sourceIndex:i[bt.FIELDS.START_POS]})),this.position++},e.parentheses=function(){var n=this.current.last,i=1;if(this.position++,n&&n.type===aKe.PSEUDO){var a=new kN.default({source:{start:$ae(this.tokens[this.position-1])}}),s=this.current;for(n.append(a),this.current=a;this.position1&&n.nextToken&&n.nextToken[bt.FIELDS.TYPE]===Ft.openParenthesis&&n.error("Misplaced parenthesis.",{index:n.nextToken[bt.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[bt.FIELDS.START_POS])},e.space=function(){var n=this.content();this.position===0||this.prevToken[bt.FIELDS.TYPE]===Ft.comma||this.prevToken[bt.FIELDS.TYPE]===Ft.openParenthesis||this.current.nodes.every(function(i){return i.type==="comment"})?(this.spaces=this.optionalSpace(n),this.position++):this.position===this.tokens.length-1||this.nextToken[bt.FIELDS.TYPE]===Ft.comma||this.nextToken[bt.FIELDS.TYPE]===Ft.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(n),this.position++):this.combinator()},e.string=function(){var n=this.currToken;this.newNode(new TN.default({value:this.content(),source:J1(n),sourceIndex:n[bt.FIELDS.START_POS]})),this.position++},e.universal=function(n){var i=this.nextToken;if(i&&this.content(i)==="|")return this.position++,this.namespace();var a=this.currToken;this.newNode(new rKe.default({value:this.content(),source:J1(a),sourceIndex:a[bt.FIELDS.START_POS]}),n),this.position++},e.splitWord=function(n,i){for(var a=this,s=this.nextToken,o=this.content();s&&~[Ft.dollar,Ft.caret,Ft.equals,Ft.word].indexOf(s[bt.FIELDS.TYPE]);){this.position++;var l=this.content();if(o+=l,l.lastIndexOf("\\")===l.length-1){var u=this.nextToken;u&&u[bt.FIELDS.TYPE]===Ft.space&&(o+=this.requiredSpace(this.content(u)),this.position++)}s=this.nextToken}var h=_N(o,".").filter(function(g){var m=o[g-1]==="\\",v=/^\d+\.\d+%$/.test(o);return!m&&!v}),f=_N(o,"#").filter(function(g){return o[g-1]!=="\\"}),d=_N(o,"#{");d.length&&(f=f.filter(function(g){return!~d.indexOf(g)}));var p=(0,iKe.default)(lKe([0].concat(h,f)));p.forEach(function(g,m){var v=p[m+1]||o.length,y=o.slice(g,v);if(m===0&&i)return i.call(a,y,p.length);var w,k=a.currToken,E=k[bt.FIELDS.START_POS]+p[m],T=Y0(k[1],k[2]+g,k[3],k[2]+(v-1));if(~h.indexOf(g)){var S={value:y.slice(1),source:T,sourceIndex:E};w=new QXe.default(ev(S,"value"))}else if(~f.indexOf(g)){var L={value:y.slice(1),source:T,sourceIndex:E};w=new JXe.default(ev(L,"value"))}else{var _={value:y,source:T,sourceIndex:E};ev(_,"value"),w=new eKe.default(_)}a.newNode(w,n),n=null}),this.position++},e.word=function(n){var i=this.nextToken;return i&&this.content(i)==="|"?(this.position++,this.namespace()):this.splitWord(n)},e.loop=function(){for(;this.position{"use strict";b();fw.__esModule=!0;fw.default=void 0;var uKe=hKe(qae());function hKe(t){return t&&t.__esModule?t:{default:t}}var fKe=function(){function t(r,n){this.func=r||function(){},this.funcRes=null,this.options=n}var e=t.prototype;return e._shouldUpdateSelector=function(n,i){i===void 0&&(i={});var a=Object.assign({},this.options,i);return a.updateSelector===!1?!1:typeof n!="string"},e._isLossy=function(n){n===void 0&&(n={});var i=Object.assign({},this.options,n);return i.lossless===!1},e._root=function(n,i){i===void 0&&(i={});var a=new uKe.default(n,this._parseOptions(i));return a.root},e._parseOptions=function(n){return{lossy:this._isLossy(n)}},e._run=function(n,i){var a=this;return i===void 0&&(i={}),new Promise(function(s,o){try{var l=a._root(n,i);Promise.resolve(a.func(l)).then(function(u){var h=void 0;return a._shouldUpdateSelector(n,i)&&(h=l.toString(),n.selector=h),{transform:u,root:l,string:h}}).then(s,o)}catch(u){o(u);return}})},e._runSync=function(n,i){i===void 0&&(i={});var a=this._root(n,i),s=this.func(a);if(s&&typeof s.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var o=void 0;return i.updateSelector&&typeof n!="string"&&(o=a.toString(),n.selector=o),{transform:s,root:a,string:o}},e.ast=function(n,i){return this._run(n,i).then(function(a){return a.root})},e.astSync=function(n,i){return this._runSync(n,i).root},e.transform=function(n,i){return this._run(n,i).then(function(a){return a.transform})},e.transformSync=function(n,i){return this._runSync(n,i).transform},e.process=function(n,i){return this._run(n,i).then(function(a){return a.string||a.root.toString()})},e.processSync=function(n,i){var a=this._runSync(n,i);return a.string||a.root.toString()},t}();fw.default=fKe;Wae.exports=fw.default});var Yae=Ke(Kn=>{"use strict";b();Kn.__esModule=!0;Kn.universal=Kn.tag=Kn.string=Kn.selector=Kn.root=Kn.pseudo=Kn.nesting=Kn.id=Kn.comment=Kn.combinator=Kn.className=Kn.attribute=void 0;var dKe=Ul(dN()),pKe=Ul(XI()),gKe=Ul(vN()),mKe=Ul(ZI()),vKe=Ul(JI()),yKe=Ul(bN()),bKe=Ul(sN()),xKe=Ul(qI()),wKe=Ul(GI()),kKe=Ul(iN()),TKe=Ul(rN()),EKe=Ul(gN());function Ul(t){return t&&t.__esModule?t:{default:t}}var SKe=function(e){return new dKe.default(e)};Kn.attribute=SKe;var CKe=function(e){return new pKe.default(e)};Kn.className=CKe;var _Ke=function(e){return new gKe.default(e)};Kn.combinator=_Ke;var AKe=function(e){return new mKe.default(e)};Kn.comment=AKe;var LKe=function(e){return new vKe.default(e)};Kn.id=LKe;var MKe=function(e){return new yKe.default(e)};Kn.nesting=MKe;var DKe=function(e){return new bKe.default(e)};Kn.pseudo=DKe;var OKe=function(e){return new xKe.default(e)};Kn.root=OKe;var RKe=function(e){return new wKe.default(e)};Kn.selector=RKe;var IKe=function(e){return new kKe.default(e)};Kn.string=IKe;var NKe=function(e){return new TKe.default(e)};Kn.tag=NKe;var PKe=function(e){return new EKe.default(e)};Kn.universal=PKe});var Zae=Ke(pn=>{"use strict";b();pn.__esModule=!0;pn.isNode=LN;pn.isPseudoElement=Kae;pn.isPseudoClass=YKe;pn.isContainer=jKe;pn.isNamespace=XKe;pn.isUniversal=pn.isTag=pn.isString=pn.isSelector=pn.isRoot=pn.isPseudo=pn.isNesting=pn.isIdentifier=pn.isComment=pn.isCombinator=pn.isClassName=pn.isAttribute=void 0;var mi=ts(),ko,FKe=(ko={},ko[mi.ATTRIBUTE]=!0,ko[mi.CLASS]=!0,ko[mi.COMBINATOR]=!0,ko[mi.COMMENT]=!0,ko[mi.ID]=!0,ko[mi.NESTING]=!0,ko[mi.PSEUDO]=!0,ko[mi.ROOT]=!0,ko[mi.SELECTOR]=!0,ko[mi.STRING]=!0,ko[mi.TAG]=!0,ko[mi.UNIVERSAL]=!0,ko);function LN(t){return typeof t=="object"&&FKe[t.type]}function Hl(t,e){return LN(e)&&e.type===t}var jae=Hl.bind(null,mi.ATTRIBUTE);pn.isAttribute=jae;var BKe=Hl.bind(null,mi.CLASS);pn.isClassName=BKe;var zKe=Hl.bind(null,mi.COMBINATOR);pn.isCombinator=zKe;var $Ke=Hl.bind(null,mi.COMMENT);pn.isComment=$Ke;var VKe=Hl.bind(null,mi.ID);pn.isIdentifier=VKe;var UKe=Hl.bind(null,mi.NESTING);pn.isNesting=UKe;var MN=Hl.bind(null,mi.PSEUDO);pn.isPseudo=MN;var HKe=Hl.bind(null,mi.ROOT);pn.isRoot=HKe;var qKe=Hl.bind(null,mi.SELECTOR);pn.isSelector=qKe;var WKe=Hl.bind(null,mi.STRING);pn.isString=WKe;var Xae=Hl.bind(null,mi.TAG);pn.isTag=Xae;var GKe=Hl.bind(null,mi.UNIVERSAL);pn.isUniversal=GKe;function Kae(t){return MN(t)&&t.value&&(t.value.startsWith("::")||t.value.toLowerCase()===":before"||t.value.toLowerCase()===":after"||t.value.toLowerCase()===":first-letter"||t.value.toLowerCase()===":first-line")}function YKe(t){return MN(t)&&!Kae(t)}function jKe(t){return!!(LN(t)&&t.walk)}function XKe(t){return jae(t)||Xae(t)}});var Qae=Ke(qc=>{"use strict";b();qc.__esModule=!0;var DN=ts();Object.keys(DN).forEach(function(t){t==="default"||t==="__esModule"||t in qc&&qc[t]===DN[t]||(qc[t]=DN[t])});var ON=Yae();Object.keys(ON).forEach(function(t){t==="default"||t==="__esModule"||t in qc&&qc[t]===ON[t]||(qc[t]=ON[t])});var RN=Zae();Object.keys(RN).forEach(function(t){t==="default"||t==="__esModule"||t in qc&&qc[t]===RN[t]||(qc[t]=RN[t])})});var tse=Ke((dw,ese)=>{"use strict";b();dw.__esModule=!0;dw.default=void 0;var KKe=JKe(Gae()),ZKe=QKe(Qae());function Jae(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return Jae=function(){return t},t}function QKe(t){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var e=Jae();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=n?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}function JKe(t){return t&&t.__esModule?t:{default:t}}var IN=function(e){return new KKe.default(e)};Object.assign(IN,ZKe);delete IN.__esModule;var eZe=IN;dw.default=eZe;ese.exports=dw.default});var ise=Ke((mUt,nse)=>{b();var tZe=jie(),rse=tse(),rZe=rse();nse.exports={isUsableColor(t,e){return tZe(e)&&t!=="gray"&&e[600]},commonTrailingPseudos(t){let e=rZe.astSync(t),r=[];for(let[i,a]of e.nodes.entries())for(let[s,o]of[...a.nodes].reverse().entries()){if(o.type!=="pseudo"||!o.value.startsWith("::"))break;r[s]=r[s]||[],r[s][i]=o}let n=rse.selector();for(let i of r){if(!i)continue;if(new Set([...i.map(s=>s.value)]).size>1)break;i.forEach(s=>s.remove()),n.prepend(i[0])}return n.nodes.length?[n.toString(),e.toString()]:[null,t]}}});var lse=Ke((yUt,ose)=>{b();var nZe=_I(),iZe=zie(),aZe=Vie(),sZe=qie(),{commonTrailingPseudos:oZe}=ise(),ase={};function NN(t,{className:e,modifier:r,prefix:n}){let i=n(`.not-${e}`).slice(1),a=t.startsWith(">")?`${r==="DEFAULT"?`.${e}`:`.${e}-${r}`} `:"",[s,o]=oZe(t);return s?`:where(${a}${o}):not(:where([class~="${i}"],[class~="${i}"] *))${s}`:`:where(${a}${t}):not(:where([class~="${i}"],[class~="${i}"] *))`}function sse(t){return typeof t=="object"&&t!==null}function lZe(t={},{target:e,className:r,modifier:n,prefix:i}){function a(s,o){return e==="legacy"?[s,o]:Array.isArray(o)?[s,o]:sse(o)?Object.values(o).some(sse)?[NN(s,{className:r,modifier:n,prefix:i}),o,Object.fromEntries(Object.entries(o).map(([u,h])=>a(u,h)))]:[NN(s,{className:r,modifier:n,prefix:i}),o]:[s,o]}return Object.fromEntries(Object.entries(iZe({},...Object.keys(t).filter(s=>ase[s]).map(s=>ase[s](t[s])),...aZe(t.css||{}))).map(([s,o])=>a(s,o)))}ose.exports=nZe.withOptions(({className:t="prose",target:e="modern"}={})=>function({addVariant:r,addComponents:n,theme:i,prefix:a}){let s=i("typography"),o={className:t,prefix:a};for(let[l,...u]of[["headings","h1","h2","h3","h4","h5","h6","th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["kbd"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",'[class~="lead"]']]){u=u.length===0?[l]:u;let h=e==="legacy"?u.map(f=>`& ${f}`):u.join(", ");r(`${t}-${l}`,e==="legacy"?h:`& :is(${NN(h,o)})`)}n(Object.keys(s).map(l=>({[l==="DEFAULT"?`.${t}`:`.${t}-${l}`]:lZe(s[l],{target:e,className:t,modifier:l,prefix:a})})))},()=>({theme:{typography:sZe}}))});var use=Ke((xUt,cse)=>{b();cse.exports={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi}});var fse=Ke((kUt,hse)=>{b();var PN=use(),BN={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function cZe(t){return t.trim().replace(BN.whitespace," ")}function uZe(t){return encodeURIComponent(t).replace(BN.urlHexPairs,fZe)}function hZe(t){return Object.keys(PN).forEach(function(e){PN[e].test(t)&&(t=t.replace(PN[e],e))}),t}function fZe(t){switch(t){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return t.toLowerCase()}}function FN(t){if(typeof t!="string")throw new TypeError("Expected a string, but received "+typeof t);t.charCodeAt(0)===65279&&(t=t.slice(1));var e=hZe(cZe(t)).replace(BN.quotes,"'");return"data:image/svg+xml,"+uZe(e)}FN.toSrcset=function(e){return FN(e).replace(/ /g,"%20")};hse.exports=FN});var dse=Ke(zN=>{"use strict";b();Object.defineProperty(zN,"__esModule",{value:!0});Object.defineProperty(zN,"default",{enumerable:!0,get:function(){return mZe}});var dZe=KR(),pZe=gZe(pI());function gZe(t){return t&&t.__esModule?t:{default:t}}var mZe=(0,dZe.cloneDeep)(pZe.default.theme)});var gse=Ke((CUt,pse)=>{b();var $N=dse();pse.exports=($N.__esModule?$N:{default:$N}).default});var xse=Ke((AUt,bse)=>{b();var DS=fse(),vZe=_I(),yse=gse(),qd=zI(),[yZe,{lineHeight:bZe}]=yse.fontSize.base,{spacing:df,borderWidth:mse,borderRadius:vse}=yse;function j0(t,e){return t.replace("",`var(${e}, 1)`)}var xZe=vZe.withOptions(function(t={strategy:void 0}){return function({addBase:e,addComponents:r,theme:n}){function i(l,u){let h=n(l);return!h||h.includes("var(")?u:h.replace("","1")}let a=t.strategy===void 0?["base","class"]:[t.strategy],s=[{base:["[type='text']","input:where(:not([type]))","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":j0(n("colors.gray.500",qd.gray[500]),"--tw-border-opacity"),"border-width":mse.DEFAULT,"border-radius":vse.none,"padding-top":df[2],"padding-right":df[3],"padding-bottom":df[2],"padding-left":df[3],"font-size":yZe,"line-height":bZe,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":j0(n("colors.blue.600",qd.blue[600]),"--tw-ring-opacity"),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":j0(n("colors.blue.600",qd.blue[600]),"--tw-border-opacity")}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:j0(n("colors.gray.500",qd.gray[500]),"--tw-text-opacity"),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"text-align":"inherit"}},{base:["::-webkit-datetime-edit"],class:[".form-input::-webkit-datetime-edit"],styles:{display:"inline-flex"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${DS(``)}")`,"background-position":`right ${df[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":df[10],"print-color-adjust":"exact"}},{base:["[multiple]",'[size]:where(select:not([size="1"]))'],class:['.form-select:where([size]:not([size="1"]))'],styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":df[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:df[4],width:df[4],color:j0(n("colors.blue.600",qd.blue[600]),"--tw-text-opacity"),"background-color":"#fff","border-color":j0(n("colors.gray.500",qd.gray[500]),"--tw-border-opacity"),"border-width":mse.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":vse.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":j0(n("colors.blue.600",qd.blue[600]),"--tw-ring-opacity"),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${DS('')}")`,"@media (forced-colors: active) ":{appearance:"auto"}}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${DS('')}")`,"@media (forced-colors: active) ":{appearance:"auto"}}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${DS('')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat","@media (forced-colors: active) ":{appearance:"auto"}}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],o=l=>s.map(u=>u[l]===null?null:{[u[l]]:u.styles}).filter(Boolean);a.includes("base")&&e(o("base")),a.includes("class")&&r(o("class"))}});bse.exports=xZe});var kse=Ke((MUt,wse)=>{b();wse.exports={content:["./app/**/*.html.erb","./app/**/*.turbo_stream.erb","./app/components/**/*","./app/components/*.rb","./app/javascript/**/*.js","./app/javascript/components/**/*.jsx","app/assets/images/icons/*.svg","./config/utility_classes.yml","./app/components/**/*.yml","./app/builders/**/*.rb"],safelist:["lesson-note","lesson-note--tip","lesson-note--warning","lesson-note--critical","lesson-content__panel","anchor-link","toc-item-active","inline-img"],darkMode:"class",theme:{extend:{typography:t=>({DEFAULT:{css:{code:{"&:before":{display:"none"},"&:after":{display:"none"}},h3:{width:"fit-content",a:{color:t("colors.gray.800"),"text-decoration":"none","font-weight":"600","&:hover":{color:t("colors.gray.800")}}},h4:{a:{"text-decoration":"none"}},details:{summary:{"font-size":"1.25rem","margin-bottom":"1.25rem","font-weight":"600",cursor:"pointer"}}}},gray:{css:{"--tw-prose-code":t("colors.pink.700"),"--tw-prose-invert-code":t("colors.pink.400")}}}),colors:{transitionProperty:{"stroke-dashoffset":"stroke-dashoffset"},gold:{DEFAULT:"#CE973E",50:"#F3E6D0",100:"#EFDDC0",200:"#E7CCA0",300:"#DFBA7F",400:"#D6A95F",500:"#CE973E",600:"#A9792B",700:"#7C5920",800:"#503914",900:"#231909"}}}},corePlugins:{container:!1},plugins:[lse(),xse()]}});var HS=Ke((QN,JN)=>{b();(function(t,e){typeof QN=="object"&&typeof JN<"u"?JN.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(QN,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",s="hour",o="day",l="week",u="month",h="quarter",f="year",d="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,v={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(C){var R=["th","st","nd","rd"],D=C%100;return"["+C+(R[(D-20)%10]||R[D]||R[0])+"]"}},y=function(C,R,D){var P=String(C);return!P||P.length>=R?C:""+Array(R+1-P.length).join(D)+C},w={s:y,z:function(C){var R=-C.utcOffset(),D=Math.abs(R),P=Math.floor(D/60),A=D%60;return(R<=0?"+":"-")+y(P,2,"0")+":"+y(A,2,"0")},m:function C(R,D){if(R.date()1)return C(F[0])}else{var B=R.name;E[B]=R,A=B}return!P&&A&&(k=A),A||!P&&k},_=function(C,R){if(S(C))return C.clone();var D=typeof R=="object"?R:{};return D.date=C,D.args=arguments,new I(D)},M=w;M.l=L,M.i=S,M.w=function(C,R){return _(C,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var I=function(){function C(D){this.$L=L(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[T]=!0}var R=C.prototype;return R.parse=function(D){this.$d=function(P){var A=P.date,N=P.utc;if(A===null)return new Date(NaN);if(M.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var F=A.match(g);if(F){var B=F[2]-1||0,V=(F[7]||"0").substring(0,3);return N?new Date(Date.UTC(F[1],B,F[3]||1,F[4]||0,F[5]||0,F[6]||0,V)):new Date(F[1],B,F[3]||1,F[4]||0,F[5]||0,F[6]||0,V)}}return new Date(A)}(D),this.init()},R.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},R.$utils=function(){return M},R.isValid=function(){return this.$d.toString()!==p},R.isSame=function(D,P){var A=_(D);return this.startOf(P)<=A&&A<=this.endOf(P)},R.isAfter=function(D,P){return _(D){b();qS={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return qS.hue2rgb(a,i,t+.3333333333333333)*255;case"g":return qS.hue2rgb(a,i,t)*255;case"b":return qS.hue2rgb(a,i,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;let i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;let o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e{b();TZe={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Rse=TZe});var EZe,Nse,Pse=$(()=>{b();EZe={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Nse=EZe});var SZe,Qt,Yu=$(()=>{b();Ose();Ise();Pse();SZe={channel:Dse,lang:Rse,unit:Nse},Qt=SZe});var gf,va,vw=$(()=>{b();Yu();gf={};for(let t=0;t<=255;t++)gf[t]=Qt.unit.dec2hex(t);va={ALL:0,RGB:1,HSL:2}});var eP,Fse,Bse=$(()=>{b();vw();eP=class{constructor(){this.type=va.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=va.ALL}is(e){return this.type===e}},Fse=eP});var tP,zse,$se=$(()=>{b();Yu();Bse();vw();tP=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Fse}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=va.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=Qt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Qt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Qt.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=Qt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Qt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Qt.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(va.HSL)&&r!==void 0?r:(this._ensureHSL(),Qt.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(va.HSL)&&r!==void 0?r:(this._ensureHSL(),Qt.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(va.HSL)&&r!==void 0?r:(this._ensureHSL(),Qt.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(va.RGB)&&r!==void 0?r:(this._ensureRGB(),Qt.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(va.RGB)&&r!==void 0?r:(this._ensureRGB(),Qt.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(va.RGB)&&r!==void 0?r:(this._ensureRGB(),Qt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(va.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(va.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(va.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(va.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(va.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(va.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},zse=tP});var CZe,Gd,yw=$(()=>{b();$se();CZe=new zse({r:0,g:0,b:0,a:0},"transparent"),Gd=CZe});var Vse,X0,rP=$(()=>{b();yw();vw();Vse={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(Vse.re);if(!e)return;let r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,u=a?0:-1,h=s?255:15;return Gd.set({r:(n>>l*(u+3)&h)*o,g:(n>>l*(u+2)&h)*o,b:(n>>l*(u+1)&h)*o,a:a?(n&h)*o/255:1},t)},stringify:t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`#${gf[Math.round(e)]}${gf[Math.round(r)]}${gf[Math.round(n)]}${gf[Math.round(i*255)]}`:`#${gf[Math.round(e)]}${gf[Math.round(r)]}${gf[Math.round(n)]}`}},X0=Vse});var WS,bw,Use=$(()=>{b();Yu();yw();WS={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:t=>{let e=t.match(WS.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return Qt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Qt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Qt.channel.clamp.h(parseFloat(r)*360)}}return Qt.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(WS.re);if(!r)return;let[,n,i,a,s,o]=r;return Gd.set({h:WS._hue2deg(n),s:Qt.channel.clamp.s(parseFloat(i)),l:Qt.channel.clamp.l(parseFloat(a)),a:s?Qt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{let{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${Qt.lang.round(e)}, ${Qt.lang.round(r)}%, ${Qt.lang.round(n)}%, ${i})`:`hsl(${Qt.lang.round(e)}, ${Qt.lang.round(r)}%, ${Qt.lang.round(n)}%)`}},bw=WS});var GS,nP,Hse=$(()=>{b();rP();GS={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:t=>{t=t.toLowerCase();let e=GS.colors[t];if(e)return X0.parse(e)},stringify:t=>{let e=X0.stringify(t);for(let r in GS.colors)if(GS.colors[r]===e)return r}},nP=GS});var qse,xw,Wse=$(()=>{b();Yu();yw();qse={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:t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(qse.re);if(!r)return;let[,n,i,a,s,o,l,u,h]=r;return Gd.set({r:Qt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:Qt.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:Qt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?Qt.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${Qt.lang.round(e)}, ${Qt.lang.round(r)}, ${Qt.lang.round(n)}, ${Qt.lang.round(i)})`:`rgb(${Qt.lang.round(e)}, ${Qt.lang.round(r)}, ${Qt.lang.round(n)})`}},xw=qse});var _Ze,ya,mf=$(()=>{b();rP();Use();Hse();Wse();vw();_Ze={format:{keyword:nP,hex:X0,rgb:xw,rgba:xw,hsl:bw,hsla:bw},parse:t=>{if(typeof t!="string")return t;let e=X0.parse(t)||xw.parse(t)||bw.parse(t)||nP.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(va.HSL)||t.data.r===void 0?bw.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?xw.stringify(t):X0.stringify(t)},ya=_Ze});var AZe,YS,iP=$(()=>{b();Yu();mf();AZe=(t,e)=>{let r=ya.parse(t);for(let n in e)r[n]=Qt.channel.clamp[n](e[n]);return ya.stringify(r)},YS=AZe});var LZe,ll,aP=$(()=>{b();Yu();yw();mf();iP();LZe=(t,e,r=0,n=1)=>{if(typeof t!="number")return YS(t,{a:e});let i=Gd.set({r:Qt.channel.clamp.r(t),g:Qt.channel.clamp.g(e),b:Qt.channel.clamp.b(r),a:Qt.channel.clamp.a(n)});return ya.stringify(i)},ll=LZe});var MZe,ww,Gse=$(()=>{b();Yu();mf();MZe=(t,e)=>Qt.lang.round(ya.parse(t)[e]),ww=MZe});var DZe,Yse,jse=$(()=>{b();Yu();mf();DZe=t=>{let{r:e,g:r,b:n}=ya.parse(t),i=.2126*Qt.channel.toLinear(e)+.7152*Qt.channel.toLinear(r)+.0722*Qt.channel.toLinear(n);return Qt.lang.round(i)},Yse=DZe});var OZe,Xse,Kse=$(()=>{b();jse();OZe=t=>Yse(t)>=.5,Xse=OZe});var RZe,rs,Zse=$(()=>{b();Kse();RZe=t=>!Xse(t),rs=RZe});var IZe,jS,sP=$(()=>{b();Yu();mf();IZe=(t,e,r)=>{let n=ya.parse(t),i=n[e],a=Qt.channel.clamp[e](i+r);return i!==a&&(n[e]=a),ya.stringify(n)},jS=IZe});var NZe,It,Qse=$(()=>{b();sP();NZe=(t,e)=>jS(t,"l",e),It=NZe});var PZe,Ut,Jse=$(()=>{b();sP();PZe=(t,e)=>jS(t,"l",-e),Ut=PZe});var FZe,Ve,eoe=$(()=>{b();mf();iP();FZe=(t,e)=>{let r=ya.parse(t),n={};for(let i in e)e[i]&&(n[i]=r[i]+e[i]);return YS(t,n)},Ve=FZe});var BZe,toe,roe=$(()=>{b();mf();aP();BZe=(t,e,r=50)=>{let{r:n,g:i,b:a,a:s}=ya.parse(t),{r:o,g:l,b:u,a:h}=ya.parse(e),f=r/100,d=f*2-1,p=s-h,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,v=1-m,y=n*m+o*v,w=i*m+l*v,k=a*m+u*v,E=s*f+h*(1-f);return ll(y,w,k,E)},toe=BZe});var zZe,xt,noe=$(()=>{b();mf();roe();zZe=(t,e=100)=>{let r=ya.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,toe(r,t,e)},xt=zZe});var ioe=$(()=>{b();aP();Gse();Zse();Qse();Jse();eoe();noe()});var ql=$(()=>{b();ioe()});function cl(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:ZS;soe&&soe(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){let a=r(i);a!==i&&($Ze(e)||(e[n]=a),i=a)}t[i]=!0}return t}function GZe(t){for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:nQe(),e=_t=>boe(_t);if(e.version="3.2.2",e.removed=[],!t||!t.document||t.document.nodeType!==Cw.document)return e.isSupported=!1,e;let{document:r}=t,n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:p}=t,g=l.prototype,m=Sw(g,"cloneNode"),v=Sw(g,"remove"),y=Sw(g,"nextSibling"),w=Sw(g,"childNodes"),k=Sw(g,"parentNode");if(typeof s=="function"){let _t=r.createElement("template");_t.content&&_t.content.ownerDocument&&(r=_t.content.ownerDocument)}let E,T="",{implementation:S,createNodeIterator:L,createDocumentFragment:_,getElementsByTagName:M}=r,{importNode:I}=n,O=poe();e.isSupported=typeof goe=="function"&&typeof k=="function"&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:C,ERB_EXPR:R,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:B}=doe,{IS_ALLOWED_URI:V}=doe,z=null,H=Ir({},[...coe,...lP,...cP,...uP,...uoe]),K=null,X=Ir({},[...hoe,...hP,...foe,...KS]),ne=Object.seal(moe(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}})),j=null,ee=null,Q=!0,G=!0,Z=!1,te=!0,oe=!1,de=!0,pe=!1,re=!1,Be=!1,le=!1,Se=!1,Ye=!1,We=!0,Ze=!1,Qe="user-content-",et=!0,ze=!1,He={},Ee=null,Y=Ir({},["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"]),ve=null,ce=Ir({},["audio","video","img","source","image","track"]),me=null,q=Ir({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Le="http://www.w3.org/1998/Math/MathML",J="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml",xe=fe,Ie=!1,Fe=null,ye=Ir({},[Le,J,fe],oP),qe=Ir({},["mi","mo","mn","ms","mtext"]),Re=Ir({},["annotation-xml"]),nt=Ir({},["title","style","font","a","script"]),mt=null,Tt=["application/xhtml+xml","text/html"],ue="text/html",ae=null,ke=null,we=r.createElement("form"),Ne=function(Me){return Me instanceof RegExp||Me instanceof Function},Ge=function(){let Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ke&&ke===Me)){if((!Me||typeof Me!="object")&&(Me={}),Me=K0(Me),mt=Tt.indexOf(Me.PARSER_MEDIA_TYPE)===-1?ue:Me.PARSER_MEDIA_TYPE,ae=mt==="application/xhtml+xml"?oP:ZS,z=Wc(Me,"ALLOWED_TAGS")?Ir({},Me.ALLOWED_TAGS,ae):H,K=Wc(Me,"ALLOWED_ATTR")?Ir({},Me.ALLOWED_ATTR,ae):X,Fe=Wc(Me,"ALLOWED_NAMESPACES")?Ir({},Me.ALLOWED_NAMESPACES,oP):ye,me=Wc(Me,"ADD_URI_SAFE_ATTR")?Ir(K0(q),Me.ADD_URI_SAFE_ATTR,ae):q,ve=Wc(Me,"ADD_DATA_URI_TAGS")?Ir(K0(ce),Me.ADD_DATA_URI_TAGS,ae):ce,Ee=Wc(Me,"FORBID_CONTENTS")?Ir({},Me.FORBID_CONTENTS,ae):Y,j=Wc(Me,"FORBID_TAGS")?Ir({},Me.FORBID_TAGS,ae):{},ee=Wc(Me,"FORBID_ATTR")?Ir({},Me.FORBID_ATTR,ae):{},He=Wc(Me,"USE_PROFILES")?Me.USE_PROFILES:!1,Q=Me.ALLOW_ARIA_ATTR!==!1,G=Me.ALLOW_DATA_ATTR!==!1,Z=Me.ALLOW_UNKNOWN_PROTOCOLS||!1,te=Me.ALLOW_SELF_CLOSE_IN_ATTR!==!1,oe=Me.SAFE_FOR_TEMPLATES||!1,de=Me.SAFE_FOR_XML!==!1,pe=Me.WHOLE_DOCUMENT||!1,le=Me.RETURN_DOM||!1,Se=Me.RETURN_DOM_FRAGMENT||!1,Ye=Me.RETURN_TRUSTED_TYPE||!1,Be=Me.FORCE_BODY||!1,We=Me.SANITIZE_DOM!==!1,Ze=Me.SANITIZE_NAMED_PROPS||!1,et=Me.KEEP_CONTENT!==!1,ze=Me.IN_PLACE||!1,V=Me.ALLOWED_URI_REGEXP||voe,xe=Me.NAMESPACE||fe,qe=Me.MATHML_TEXT_INTEGRATION_POINTS||qe,Re=Me.HTML_INTEGRATION_POINTS||Re,ne=Me.CUSTOM_ELEMENT_HANDLING||{},Me.CUSTOM_ELEMENT_HANDLING&&Ne(Me.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ne.tagNameCheck=Me.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Me.CUSTOM_ELEMENT_HANDLING&&Ne(Me.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ne.attributeNameCheck=Me.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Me.CUSTOM_ELEMENT_HANDLING&&typeof Me.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=Me.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),oe&&(G=!1),Se&&(le=!0),He&&(z=Ir({},uoe),K=[],He.html===!0&&(Ir(z,coe),Ir(K,hoe)),He.svg===!0&&(Ir(z,lP),Ir(K,hP),Ir(K,KS)),He.svgFilters===!0&&(Ir(z,cP),Ir(K,hP),Ir(K,KS)),He.mathMl===!0&&(Ir(z,uP),Ir(K,foe),Ir(K,KS))),Me.ADD_TAGS&&(z===H&&(z=K0(z)),Ir(z,Me.ADD_TAGS,ae)),Me.ADD_ATTR&&(K===X&&(K=K0(K)),Ir(K,Me.ADD_ATTR,ae)),Me.ADD_URI_SAFE_ATTR&&Ir(me,Me.ADD_URI_SAFE_ATTR,ae),Me.FORBID_CONTENTS&&(Ee===Y&&(Ee=K0(Ee)),Ir(Ee,Me.FORBID_CONTENTS,ae)),et&&(z["#text"]=!0),pe&&Ir(z,["html","head","body"]),z.table&&(Ir(z,["tbody"]),delete j.tbody),Me.TRUSTED_TYPES_POLICY){if(typeof Me.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ew('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Me.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ew('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=Me.TRUSTED_TYPES_POLICY,T=E.createHTML("")}else E===void 0&&(E=iQe(p,i)),E!==null&&typeof T=="string"&&(T=E.createHTML(""));Ks&&Ks(Me),ke=Me}},st=Ir({},[...lP,...cP,...YZe]),ot=Ir({},[...uP,...jZe]),at=function(Me){let dt=k(Me);(!dt||!dt.tagName)&&(dt={namespaceURI:xe,tagName:"template"});let Mt=ZS(Me.tagName),xr=ZS(dt.tagName);return Fe[Me.namespaceURI]?Me.namespaceURI===J?dt.namespaceURI===fe?Mt==="svg":dt.namespaceURI===Le?Mt==="svg"&&(xr==="annotation-xml"||qe[xr]):!!st[Mt]:Me.namespaceURI===Le?dt.namespaceURI===fe?Mt==="math":dt.namespaceURI===J?Mt==="math"&&Re[xr]:!!ot[Mt]:Me.namespaceURI===fe?dt.namespaceURI===J&&!Re[xr]||dt.namespaceURI===Le&&!qe[xr]?!1:!ot[Mt]&&(nt[Mt]||!st[Mt]):!!(mt==="application/xhtml+xml"&&Fe[Me.namespaceURI]):!1},Ue=function(Me){kw(e.removed,{element:Me});try{k(Me).removeChild(Me)}catch{v(Me)}},it=function(Me,dt){try{kw(e.removed,{attribute:dt.getAttributeNode(Me),from:dt})}catch{kw(e.removed,{attribute:null,from:dt})}if(dt.removeAttribute(Me),Me==="is")if(le||Se)try{Ue(dt)}catch{}else try{dt.setAttribute(Me,"")}catch{}},pt=function(Me){let dt=null,Mt=null;if(Be)Me=""+Me;else{let jn=loe(Me,/^[\r\n\t ]+/);Mt=jn&&jn[0]}mt==="application/xhtml+xml"&&xe===fe&&(Me=''+Me+"");let xr=E?E.createHTML(Me):Me;if(xe===fe)try{dt=new d().parseFromString(xr,mt)}catch{}if(!dt||!dt.documentElement){dt=S.createDocument(xe,"template",null);try{dt.documentElement.innerHTML=Ie?T:xr}catch{}}let Pn=dt.body||dt.documentElement;return Me&&Mt&&Pn.insertBefore(r.createTextNode(Mt),Pn.childNodes[0]||null),xe===fe?M.call(dt,pe?"html":"body")[0]:pe?dt.documentElement:Pn},yt=function(Me){return L.call(Me.ownerDocument||Me,Me,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Et=function(Me){return Me instanceof f&&(typeof Me.nodeName!="string"||typeof Me.textContent!="string"||typeof Me.removeChild!="function"||!(Me.attributes instanceof h)||typeof Me.removeAttribute!="function"||typeof Me.setAttribute!="function"||typeof Me.namespaceURI!="string"||typeof Me.insertBefore!="function"||typeof Me.hasChildNodes!="function")},hn=function(Me){return typeof o=="function"&&Me instanceof o};function qt(_t,Me,dt){XS(_t,Mt=>{Mt.call(e,Me,dt,ke)})}let fn=function(Me){let dt=null;if(qt(O.beforeSanitizeElements,Me,null),Et(Me))return Ue(Me),!0;let Mt=ae(Me.nodeName);if(qt(O.uponSanitizeElement,Me,{tagName:Mt,allowedTags:z}),Me.hasChildNodes()&&!hn(Me.firstElementChild)&&Xs(/<[/\w]/g,Me.innerHTML)&&Xs(/<[/\w]/g,Me.textContent)||Me.nodeType===Cw.progressingInstruction||de&&Me.nodeType===Cw.comment&&Xs(/<[/\w]/g,Me.data))return Ue(Me),!0;if(!z[Mt]||j[Mt]){if(!j[Mt]&&qr(Mt)&&(ne.tagNameCheck instanceof RegExp&&Xs(ne.tagNameCheck,Mt)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(Mt)))return!1;if(et&&!Ee[Mt]){let xr=k(Me)||Me.parentNode,Pn=w(Me)||Me.childNodes;if(Pn&&xr){let jn=Pn.length;for(let si=jn-1;si>=0;--si){let fi=m(Pn[si],!0);fi.__removalCount=(Me.__removalCount||0)+1,xr.insertBefore(fi,y(Me))}}}return Ue(Me),!0}return Me instanceof l&&!at(Me)||(Mt==="noscript"||Mt==="noembed"||Mt==="noframes")&&Xs(/<\/no(script|embed|frames)/i,Me.innerHTML)?(Ue(Me),!0):(oe&&Me.nodeType===Cw.text&&(dt=Me.textContent,XS([C,R,D],xr=>{dt=Tw(dt,xr," ")}),Me.textContent!==dt&&(kw(e.removed,{element:Me.cloneNode()}),Me.textContent=dt)),qt(O.afterSanitizeElements,Me,null),!1)},xn=function(Me,dt,Mt){if(We&&(dt==="id"||dt==="name")&&(Mt in r||Mt in we))return!1;if(!(G&&!ee[dt]&&Xs(P,dt))){if(!(Q&&Xs(A,dt))){if(!K[dt]||ee[dt]){if(!(qr(Me)&&(ne.tagNameCheck instanceof RegExp&&Xs(ne.tagNameCheck,Me)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(Me))&&(ne.attributeNameCheck instanceof RegExp&&Xs(ne.attributeNameCheck,dt)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(dt))||dt==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&Xs(ne.tagNameCheck,Mt)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(Mt))))return!1}else if(!me[dt]){if(!Xs(V,Tw(Mt,F,""))){if(!((dt==="src"||dt==="xlink:href"||dt==="href")&&Me!=="script"&&HZe(Mt,"data:")===0&&ve[Me])){if(!(Z&&!Xs(N,Tw(Mt,F,"")))){if(Mt)return!1}}}}}}return!0},qr=function(Me){return Me!=="annotation-xml"&&loe(Me,B)},hi=function(Me){qt(O.beforeSanitizeAttributes,Me,null);let{attributes:dt}=Me;if(!dt)return;let Mt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0},xr=dt.length;for(;xr--;){let Pn=dt[xr],{name:jn,namespaceURI:si,value:fi}=Pn,St=ae(jn),Dt=jn==="value"?fi:qZe(fi);if(Mt.attrName=St,Mt.attrValue=Dt,Mt.keepAttr=!0,Mt.forceKeepAttr=void 0,qt(O.uponSanitizeAttribute,Me,Mt),Dt=Mt.attrValue,Ze&&(St==="id"||St==="name")&&(it(jn,Me),Dt=Qe+Dt),de&&Xs(/((--!?|])>)|<\/(style|title)/i,Dt)){it(jn,Me);continue}if(Mt.forceKeepAttr||(it(jn,Me),!Mt.keepAttr))continue;if(!te&&Xs(/\/>/i,Dt)){it(jn,Me);continue}oe&&XS([C,R,D],tt=>{Dt=Tw(Dt,tt," ")});let Rt=ae(Me.nodeName);if(xn(Rt,St,Dt)){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!si)switch(p.getAttributeType(Rt,St)){case"TrustedHTML":{Dt=E.createHTML(Dt);break}case"TrustedScriptURL":{Dt=E.createScriptURL(Dt);break}}try{si?Me.setAttributeNS(si,jn,Dt):Me.setAttribute(jn,Dt),Et(Me)?Ue(Me):ooe(e.removed)}catch{}}}qt(O.afterSanitizeAttributes,Me,null)},Nn=function _t(Me){let dt=null,Mt=yt(Me);for(qt(O.beforeSanitizeShadowDOM,Me,null);dt=Mt.nextNode();)qt(O.uponSanitizeShadowNode,dt,null),!fn(dt)&&(dt.content instanceof a&&_t(dt.content),hi(dt));qt(O.afterSanitizeShadowDOM,Me,null)};return e.sanitize=function(_t){let Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dt=null,Mt=null,xr=null,Pn=null;if(Ie=!_t,Ie&&(_t=""),typeof _t!="string"&&!hn(_t))if(typeof _t.toString=="function"){if(_t=_t.toString(),typeof _t!="string")throw Ew("dirty is not a string, aborting")}else throw Ew("toString is not a function");if(!e.isSupported)return _t;if(re||Ge(Me),e.removed=[],typeof _t=="string"&&(ze=!1),ze){if(_t.nodeName){let fi=ae(_t.nodeName);if(!z[fi]||j[fi])throw Ew("root node is forbidden and cannot be sanitized in-place")}}else if(_t instanceof o)dt=pt(""),Mt=dt.ownerDocument.importNode(_t,!0),Mt.nodeType===Cw.element&&Mt.nodeName==="BODY"||Mt.nodeName==="HTML"?dt=Mt:dt.appendChild(Mt);else{if(!le&&!oe&&!pe&&_t.indexOf("<")===-1)return E&&Ye?E.createHTML(_t):_t;if(dt=pt(_t),!dt)return le?null:Ye?T:""}dt&&Be&&Ue(dt.firstChild);let jn=yt(ze?_t:dt);for(;xr=jn.nextNode();)fn(xr)||(xr.content instanceof a&&Nn(xr.content),hi(xr));if(ze)return _t;if(le){if(Se)for(Pn=_.call(dt.ownerDocument);dt.firstChild;)Pn.appendChild(dt.firstChild);else Pn=dt;return(K.shadowroot||K.shadowrootmode)&&(Pn=I.call(n,Pn,!0)),Pn}let si=pe?dt.outerHTML:dt.innerHTML;return pe&&z["!doctype"]&&dt.ownerDocument&&dt.ownerDocument.doctype&&dt.ownerDocument.doctype.name&&Xs(yoe,dt.ownerDocument.doctype.name)&&(si=" `+si),oe&&XS([C,R,D],fi=>{si=Tw(si,fi," ")}),E&&Ye?E.createHTML(si):si},e.setConfig=function(){let _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ge(_t),re=!0},e.clearConfig=function(){ke=null,re=!1},e.isValidAttribute=function(_t,Me,dt){ke||Ge({});let Mt=ae(_t),xr=ae(Me);return xn(Mt,xr,dt)},e.addHook=function(_t,Me){typeof Me=="function"&&kw(O[_t],Me)},e.removeHook=function(_t){return ooe(O[_t])},e.removeHooks=function(_t){O[_t]=[]},e.removeAllHooks=function(){O=poe()},e}var goe,soe,$Ze,VZe,UZe,Ks,Wl,moe,fP,dP,XS,ooe,kw,ZS,oP,loe,Tw,HZe,qZe,Wc,Xs,Ew,coe,lP,cP,YZe,uP,jZe,uoe,hoe,hP,foe,KS,XZe,KZe,ZZe,QZe,JZe,voe,eQe,tQe,yoe,rQe,doe,Cw,nQe,iQe,poe,Yd,pP=$(()=>{b();({entries:goe,setPrototypeOf:soe,isFrozen:$Ze,getPrototypeOf:VZe,getOwnPropertyDescriptor:UZe}=Object),{freeze:Ks,seal:Wl,create:moe}=Object,{apply:fP,construct:dP}=typeof Reflect<"u"&&Reflect;Ks||(Ks=function(e){return e});Wl||(Wl=function(e){return e});fP||(fP=function(e,r,n){return e.apply(r,n)});dP||(dP=function(e,r){return new e(...r)});XS=cl(Array.prototype.forEach),ooe=cl(Array.prototype.pop),kw=cl(Array.prototype.push),ZS=cl(String.prototype.toLowerCase),oP=cl(String.prototype.toString),loe=cl(String.prototype.match),Tw=cl(String.prototype.replace),HZe=cl(String.prototype.indexOf),qZe=cl(String.prototype.trim),Wc=cl(Object.prototype.hasOwnProperty),Xs=cl(RegExp.prototype.test),Ew=WZe(TypeError);coe=Ks(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lP=Ks(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),cP=Ks(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),YZe=Ks(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),uP=Ks(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),jZe=Ks(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uoe=Ks(["#text"]),hoe=Ks(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),hP=Ks(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),foe=Ks(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),KS=Ks(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),XZe=Wl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),KZe=Wl(/<%[\w\W]*|[\w\W]*%>/gm),ZZe=Wl(/\${[\w\W]*}/gm),QZe=Wl(/^data-[\-\w.\u00B7-\uFFFF]/),JZe=Wl(/^aria-[\-\w]+$/),voe=Wl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),eQe=Wl(/^(?:\w+script|data):/i),tQe=Wl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yoe=Wl(/^html$/i),rQe=Wl(/^[a-z][.\w]*(-[.\w]+)+$/i),doe=Object.freeze({__proto__:null,ARIA_ATTR:JZe,ATTR_WHITESPACE:tQe,CUSTOM_ELEMENT:rQe,DATA_ATTR:QZe,DOCTYPE_NAME:yoe,ERB_EXPR:KZe,IS_ALLOWED_URI:voe,IS_SCRIPT_OR_DATA:eQe,MUSTACHE_EXPR:XZe,TMPLIT_EXPR:ZZe}),Cw={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},nQe=function(){return typeof window>"u"?null:window},iQe=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},poe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};Yd=boe()});var Gle={};Wt(Gle,{default:()=>QJe});function hQe(t){return String(t).replace(uQe,e=>cQe[e])}function gQe(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function kQe(t){for(var e=0;e<_P.length;e++)for(var r=_P[e],n=0;n=i[0]&&t<=i[1])return r.name}return null}function Qoe(t){for(var e=0;e=uC[e]&&t<=uC[e+1])return!0;return!1}function RQe(t,e){Ku[t]=e}function $P(t,e,r){if(!Ku[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=Ku[e][n];if(!i&&t[0]in woe&&(n=woe[t[0]].charCodeAt(0),i=Ku[e][n]),!i&&r==="text"&&Qoe(n)&&(i=Ku[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function IQe(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!gP[e]){var r=gP[e]={cssEmPerMu:QS.quad[e]/18};for(var n in QS)QS.hasOwnProperty(n)&&(r[n]=QS[n][e])}return gP[e]}function Eoe(t){if(t instanceof Ao)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function BQe(t){if(t instanceof eg)return t;throw new Error("Expected span but got "+String(t)+".")}function U(t,e,r,n,i,a){Zn[t][i]={font:e,group:r,replace:n},a&&n&&(Zn[t][n]=Zn[t][i])}function Ot(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l0&&(a.push(aC(s,e)),s=[]),a.push(n[o]));s.length>0&&a.push(aC(s,e));var u;r?(u=aC(ba(r,e,!0)),u.classes=["tag"],a.push(u)):i&&a.push(i);var h=wf(["katex-html"],a);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=wt(h.height+h.depth),h.depth&&(f.style.verticalAlign=wt(-h.depth))}return h}function ule(t){return new J0(t)}function Loe(t,e,r,n,i){var a=Lo(t,r),s;a.length===1&&a[0]instanceof _o&&ir.contains(["mrow","mtable"],a[0].type)?s=a[0]:s=new gt.MathNode("mrow",a);var o=new gt.MathNode("annotation",[new gt.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new gt.MathNode("semantics",[s,o]),u=new gt.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var h=i?"katex":"katex-mathml";return je.makeSpan([h],[u])}function Ar(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function qP(t){var e=wC(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function wC(t){return t&&(t.type==="atom"||$Qe.hasOwnProperty(t.type))?t:null}function ple(t,e){var r=ba(t.body,e,!0);return mJe([t.mclass],r,e)}function gle(t,e){var r,n=Lo(t.body,e);return t.mclass==="minner"?r=new gt.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new gt.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new gt.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function bJe(t,e,r){var n=vJe[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function xJe(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new vt("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;a-1))if("<>AV".indexOf(u)>-1)for(var f=0;f<2;f++){for(var d=!0,p=l+1;pAV=|." after @',s[l]);var g=bJe(u,h,t),m={type:"styling",body:[g],mode:"math",style:"display"};n.push(m),o=Moe()}a%2===0?n.push(o):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var v=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function TC(t,e){var r=wC(t);if(r&&ir.contains(RJe,r.text))return r;throw r?new vt("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new vt("Invalid delimiter type '"+t.type+"'",t)}function Roe(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Qu(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l1||!h)&&m.pop(),y.length{b();ul=class t{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}},Yl=class t{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new t(r,ul.range(this,e))}},vt=class t{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;i=s.start,a=s.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,a).replace(/[^]/g,"$&\u0332"),u;i>15?u="\u2026"+o.slice(i-15,i):u=o.slice(0,i);var h;a+15":">","<":"<",'"':""","'":"'"},uQe=/[&><"']/g;Zoe=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},fQe=function(e){var r=Zoe(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},dQe=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},pQe=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},ir={contains:aQe,deflt:sQe,escape:hQe,hyphenate:lQe,getBaseElem:Zoe,isCharacterBox:fQe,protocolFromUrl:pQe},cC={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:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},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:t=>Math.max(0,t),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:t=>Math.max(0,t),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:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};Dw=class{constructor(e){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,e=e||{};for(var r in cC)if(cC.hasOwnProperty(r)){var n=cC[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:gQe(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new vt("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=ir.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}},ju=class{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return Xu[mQe[this.id]]}sub(){return Xu[vQe[this.id]]}fracNum(){return Xu[yQe[this.id]]}fracDen(){return Xu[bQe[this.id]]}cramp(){return Xu[xQe[this.id]]}text(){return Xu[wQe[this.id]]}isTight(){return this.size>=2}},zP=0,hC=1,av=2,bf=3,Ow=4,Gl=5,sv=6,Zs=7,Xu=[new ju(zP,0,!1),new ju(hC,0,!0),new ju(av,1,!1),new ju(bf,1,!0),new ju(Ow,2,!1),new ju(Gl,2,!0),new ju(sv,3,!1),new ju(Zs,3,!0)],mQe=[Ow,Gl,Ow,Gl,sv,Zs,sv,Zs],vQe=[Gl,Gl,Gl,Gl,Zs,Zs,Zs,Zs],yQe=[av,bf,Ow,Gl,sv,Zs,sv,Zs],bQe=[bf,bf,Gl,Gl,Zs,Zs,Zs,Zs],xQe=[hC,hC,bf,bf,Gl,Gl,Zs,Zs],wQe=[zP,hC,av,bf,av,bf,av,bf],sr={DISPLAY:Xu[zP],TEXT:Xu[av],SCRIPT:Xu[Ow],SCRIPTSCRIPT:Xu[sv]},_P=[{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]]}];uC=[];_P.forEach(t=>t.blocks.forEach(e=>uC.push(...e)));iv=80,TQe=function(e,r){return"M95,"+(622+e+r)+` 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`+e/2.075+" -"+e+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+e)+`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+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},EQe=function(e,r){return"M263,"+(601+e+r)+`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`+e/2.084+" -"+e+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+e)+`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+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},SQe=function(e,r){return"M983 "+(10+e+r)+` l`+e/3.13+" -"+e+` c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` 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+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},CQe=function(e,r){return"M424,"+(2398+e+r)+` 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`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+e)+`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+e)+" "+r+` h400000v`+(40+e)+"h-400000z"},_Qe=function(e,r){return"M473,"+(2713+e+r)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`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+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},AQe=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},LQe=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+` H742v`+i+`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 `+r+"H400000v"+(40+e)+"H742z"},MQe=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=TQe(r,iv);break;case"sqrtSize1":i=EQe(r,iv);break;case"sqrtSize2":i=SQe(r,iv);break;case"sqrtSize3":i=CQe(r,iv);break;case"sqrtSize4":i=_Qe(r,iv);break;case"sqrtTall":i=LQe(r,iv,n)}return i},DQe=function(e,r){switch(e){case"\u239C":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"\u2223":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"\u2225":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"\u239F":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"\u23A2":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"\u23A5":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"\u23AA":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"\u23D0":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"\u2016":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},xoe={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`},OQe=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z M347 1759 V0 h-84 V1759 v`+r+" 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,`+(r+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,-`+(r+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,`+(r+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,-`+(r+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.")}},J0=class{constructor(e){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=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return ir.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(e).join("")}},Ku={"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]}},QS={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]},woe={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};gP={};NQe=[[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]],koe=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Toe=function(e,r){return r.size<2?e:NQe[e-1][r.size-1]},fC=class t{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=koe[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new t(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Toe(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:koe[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=Toe(t.BASESIZE,e);return this.size===r&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=IQe(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};fC.BASESIZE=6;AP={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},PQe={ex:!0,em:!0,mu:!0},Joe=function(e){return typeof e!="string"&&(e=e.unit),e in AP||e in PQe||e==="ex"},Ii=function(e,r){var n;if(e.unit in AP)n=AP[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new vt("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},wt=function(e){return+e.toFixed(4)+"em"},Kd=function(e){return e.filter(r=>r).join(" ")},ele=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},tle=function(e){var r=document.createElement(e);r.className=Kd(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a",r},eg=class{constructor(e,r,n,i){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,ele.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return ir.contains(this.classes,e)}toNode(){return tle.call(this,"span")}toMarkup(){return rle.call(this,"span")}},Rw=class{constructor(e,r,n,i){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,ele.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return ir.contains(this.classes,e)}toNode(){return tle.call(this,"a")}toMarkup(){return rle.call(this,"a")}},LP=class{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return ir.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=''+ir.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=wt(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Kd(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=ir.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+ir.escape(n)+'"');var a=ir.escape(this.text);return e?(r+=">",r+=a,r+="",r):a}},Yc=class{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}},Iw=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="","\\gt",!0);U(W,se,Ae,"\u2208","\\in",!0);U(W,se,Ae,"\uE020","\\@not");U(W,se,Ae,"\u2282","\\subset",!0);U(W,se,Ae,"\u2283","\\supset",!0);U(W,se,Ae,"\u2286","\\subseteq",!0);U(W,se,Ae,"\u2287","\\supseteq",!0);U(W,Ce,Ae,"\u2288","\\nsubseteq",!0);U(W,Ce,Ae,"\u2289","\\nsupseteq",!0);U(W,se,Ae,"\u22A8","\\models");U(W,se,Ae,"\u2190","\\leftarrow",!0);U(W,se,Ae,"\u2264","\\le");U(W,se,Ae,"\u2264","\\leq",!0);U(W,se,Ae,"<","\\lt",!0);U(W,se,Ae,"\u2192","\\rightarrow",!0);U(W,se,Ae,"\u2192","\\to");U(W,Ce,Ae,"\u2271","\\ngeq",!0);U(W,Ce,Ae,"\u2270","\\nleq",!0);U(W,se,Tf,"\xA0","\\ ");U(W,se,Tf,"\xA0","\\space");U(W,se,Tf,"\xA0","\\nobreakspace");U(ft,se,Tf,"\xA0","\\ ");U(ft,se,Tf,"\xA0"," ");U(ft,se,Tf,"\xA0","\\space");U(ft,se,Tf,"\xA0","\\nobreakspace");U(W,se,Tf,null,"\\nobreak");U(W,se,Tf,null,"\\allowbreak");U(W,se,bC,",",",");U(W,se,bC,";",";");U(W,Ce,Nt,"\u22BC","\\barwedge",!0);U(W,Ce,Nt,"\u22BB","\\veebar",!0);U(W,se,Nt,"\u2299","\\odot",!0);U(W,se,Nt,"\u2295","\\oplus",!0);U(W,se,Nt,"\u2297","\\otimes",!0);U(W,se,Pe,"\u2202","\\partial",!0);U(W,se,Nt,"\u2298","\\oslash",!0);U(W,Ce,Nt,"\u229A","\\circledcirc",!0);U(W,Ce,Nt,"\u22A1","\\boxdot",!0);U(W,se,Nt,"\u25B3","\\bigtriangleup");U(W,se,Nt,"\u25BD","\\bigtriangledown");U(W,se,Nt,"\u2020","\\dagger");U(W,se,Nt,"\u22C4","\\diamond");U(W,se,Nt,"\u22C6","\\star");U(W,se,Nt,"\u25C3","\\triangleleft");U(W,se,Nt,"\u25B9","\\triangleright");U(W,se,hl,"{","\\{");U(ft,se,Pe,"{","\\{");U(ft,se,Pe,"{","\\textbraceleft");U(W,se,Qs,"}","\\}");U(ft,se,Pe,"}","\\}");U(ft,se,Pe,"}","\\textbraceright");U(W,se,hl,"{","\\lbrace");U(W,se,Qs,"}","\\rbrace");U(W,se,hl,"[","\\lbrack",!0);U(ft,se,Pe,"[","\\lbrack",!0);U(W,se,Qs,"]","\\rbrack",!0);U(ft,se,Pe,"]","\\rbrack",!0);U(W,se,hl,"(","\\lparen",!0);U(W,se,Qs,")","\\rparen",!0);U(ft,se,Pe,"<","\\textless",!0);U(ft,se,Pe,">","\\textgreater",!0);U(W,se,hl,"\u230A","\\lfloor",!0);U(W,se,Qs,"\u230B","\\rfloor",!0);U(W,se,hl,"\u2308","\\lceil",!0);U(W,se,Qs,"\u2309","\\rceil",!0);U(W,se,Pe,"\\","\\backslash");U(W,se,Pe,"\u2223","|");U(W,se,Pe,"\u2223","\\vert");U(ft,se,Pe,"|","\\textbar",!0);U(W,se,Pe,"\u2225","\\|");U(W,se,Pe,"\u2225","\\Vert");U(ft,se,Pe,"\u2225","\\textbardbl");U(ft,se,Pe,"~","\\textasciitilde");U(ft,se,Pe,"\\","\\textbackslash");U(ft,se,Pe,"^","\\textasciicircum");U(W,se,Ae,"\u2191","\\uparrow",!0);U(W,se,Ae,"\u21D1","\\Uparrow",!0);U(W,se,Ae,"\u2193","\\downarrow",!0);U(W,se,Ae,"\u21D3","\\Downarrow",!0);U(W,se,Ae,"\u2195","\\updownarrow",!0);U(W,se,Ae,"\u21D5","\\Updownarrow",!0);U(W,se,fa,"\u2210","\\coprod");U(W,se,fa,"\u22C1","\\bigvee");U(W,se,fa,"\u22C0","\\bigwedge");U(W,se,fa,"\u2A04","\\biguplus");U(W,se,fa,"\u22C2","\\bigcap");U(W,se,fa,"\u22C3","\\bigcup");U(W,se,fa,"\u222B","\\int");U(W,se,fa,"\u222B","\\intop");U(W,se,fa,"\u222C","\\iint");U(W,se,fa,"\u222D","\\iiint");U(W,se,fa,"\u220F","\\prod");U(W,se,fa,"\u2211","\\sum");U(W,se,fa,"\u2A02","\\bigotimes");U(W,se,fa,"\u2A01","\\bigoplus");U(W,se,fa,"\u2A00","\\bigodot");U(W,se,fa,"\u222E","\\oint");U(W,se,fa,"\u222F","\\oiint");U(W,se,fa,"\u2230","\\oiiint");U(W,se,fa,"\u2A06","\\bigsqcup");U(W,se,fa,"\u222B","\\smallint");U(ft,se,ov,"\u2026","\\textellipsis");U(W,se,ov,"\u2026","\\mathellipsis");U(ft,se,ov,"\u2026","\\ldots",!0);U(W,se,ov,"\u2026","\\ldots",!0);U(W,se,ov,"\u22EF","\\@cdots",!0);U(W,se,ov,"\u22F1","\\ddots",!0);U(W,se,Pe,"\u22EE","\\varvdots");U(W,se,yi,"\u02CA","\\acute");U(W,se,yi,"\u02CB","\\grave");U(W,se,yi,"\xA8","\\ddot");U(W,se,yi,"~","\\tilde");U(W,se,yi,"\u02C9","\\bar");U(W,se,yi,"\u02D8","\\breve");U(W,se,yi,"\u02C7","\\check");U(W,se,yi,"^","\\hat");U(W,se,yi,"\u20D7","\\vec");U(W,se,yi,"\u02D9","\\dot");U(W,se,yi,"\u02DA","\\mathring");U(W,se,ar,"\uE131","\\@imath");U(W,se,ar,"\uE237","\\@jmath");U(W,se,Pe,"\u0131","\u0131");U(W,se,Pe,"\u0237","\u0237");U(ft,se,Pe,"\u0131","\\i",!0);U(ft,se,Pe,"\u0237","\\j",!0);U(ft,se,Pe,"\xDF","\\ss",!0);U(ft,se,Pe,"\xE6","\\ae",!0);U(ft,se,Pe,"\u0153","\\oe",!0);U(ft,se,Pe,"\xF8","\\o",!0);U(ft,se,Pe,"\xC6","\\AE",!0);U(ft,se,Pe,"\u0152","\\OE",!0);U(ft,se,Pe,"\xD8","\\O",!0);U(ft,se,yi,"\u02CA","\\'");U(ft,se,yi,"\u02CB","\\`");U(ft,se,yi,"\u02C6","\\^");U(ft,se,yi,"\u02DC","\\~");U(ft,se,yi,"\u02C9","\\=");U(ft,se,yi,"\u02D8","\\u");U(ft,se,yi,"\u02D9","\\.");U(ft,se,yi,"\xB8","\\c");U(ft,se,yi,"\u02DA","\\r");U(ft,se,yi,"\u02C7","\\v");U(ft,se,yi,"\xA8",'\\"');U(ft,se,yi,"\u02DD","\\H");U(ft,se,yi,"\u25EF","\\textcircled");nle={"--":!0,"---":!0,"``":!0,"''":!0};U(ft,se,Pe,"\u2013","--",!0);U(ft,se,Pe,"\u2013","\\textendash");U(ft,se,Pe,"\u2014","---",!0);U(ft,se,Pe,"\u2014","\\textemdash");U(ft,se,Pe,"\u2018","`",!0);U(ft,se,Pe,"\u2018","\\textquoteleft");U(ft,se,Pe,"\u2019","'",!0);U(ft,se,Pe,"\u2019","\\textquoteright");U(ft,se,Pe,"\u201C","``",!0);U(ft,se,Pe,"\u201C","\\textquotedblleft");U(ft,se,Pe,"\u201D","''",!0);U(ft,se,Pe,"\u201D","\\textquotedblright");U(W,se,Pe,"\xB0","\\degree",!0);U(ft,se,Pe,"\xB0","\\degree");U(ft,se,Pe,"\xB0","\\textdegree",!0);U(W,se,Pe,"\xA3","\\pounds");U(W,se,Pe,"\xA3","\\mathsterling",!0);U(ft,se,Pe,"\xA3","\\pounds");U(ft,se,Pe,"\xA3","\\textsterling",!0);U(W,Ce,Pe,"\u2720","\\maltese");U(ft,Ce,Pe,"\u2720","\\maltese");Soe='0123456789/@."';for(JS=0;JS0)return Gc(a,u,i,r,s.concat(h));if(l){var f,d;if(l==="boldsymbol"){var p=HQe(a,i,r,s,n);f=p.fontName,d=[p.fontClass]}else o?(f=sle[l].fontName,d=[l]):(f=iC(l,r.fontWeight,r.fontShape),d=[l,r.fontWeight,r.fontShape]);if(xC(a,f,i).metrics)return Gc(a,f,i,r,s.concat(d));if(nle.hasOwnProperty(a)&&f.slice(0,10)==="Typewriter"){for(var g=[],m=0;m{if(Kd(t.classes)!==Kd(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},GQe=t=>{for(var e=0;er&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},Co=function(e,r,n,i){var a=new eg(e,r,n,i);return VP(a),a},ile=(t,e,r,n)=>new eg(t,e,r,n),YQe=function(e,r,n){var i=Co([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=wt(i.height),i.maxFontSize=1,i},jQe=function(e,r,n,i){var a=new Rw(e,r,n,i);return VP(a),a},ale=function(e){var r=new J0(e);return VP(r),r},XQe=function(e,r){return e instanceof J0?Co([],[e],r):e},KQe=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s{var r=Co(["mspace"],[],e),n=Ii(t,e);return r.style.marginRight=wt(n),r},iC=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},sle={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},ole={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},JQe=function(e,r){var[n,i,a]=ole[e],s=new Zu(n),o=new Yc([s],{width:wt(i),height:wt(a),style:"width:"+wt(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=ile(["overlay"],[o],r);return l.height=a,l.style.height=wt(a),l.style.width=wt(i),l},je={fontMap:sle,makeSymbol:Gc,mathsym:UQe,makeSpan:Co,makeSvgSpan:ile,makeLineSpan:YQe,makeAnchor:jQe,makeFragment:ale,wrapFragment:XQe,makeVList:ZQe,makeOrd:qQe,makeGlue:QQe,staticSvg:JQe,svgData:ole,tryCombineChars:GQe},Ri={number:3,unit:"mu"},Z0={number:4,unit:"mu"},yf={number:5,unit:"mu"},eJe={mord:{mop:Ri,mbin:Z0,mrel:yf,minner:Ri},mop:{mord:Ri,mop:Ri,mrel:yf,minner:Ri},mbin:{mord:Z0,mop:Z0,mopen:Z0,minner:Z0},mrel:{mord:yf,mop:yf,mopen:yf,minner:yf},mopen:{},mclose:{mop:Ri,mbin:Z0,mrel:yf,minner:Ri},mpunct:{mord:Ri,mop:Ri,mrel:yf,mopen:Ri,mclose:Ri,mpunct:Ri,minner:Ri},minner:{mord:Ri,mop:Ri,mbin:Z0,mrel:yf,mopen:Ri,mpunct:Ri,minner:Ri}},tJe={mord:{mop:Ri},mop:{mord:Ri,mop:Ri},mbin:{},mrel:{},mopen:{},mclose:{mop:Ri},mpunct:{},minner:{mop:Ri}},lle={},pC={},gC={};mC=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},Ji=function(e){return e.type==="ordgroup"?e.body:[e]},wf=je.makeSpan,rJe=["leftmost","mbin","mopen","mrel","mop","mpunct"],nJe=["rightmost","mrel","mclose","mpunct"],iJe={display:sr.DISPLAY,text:sr.TEXT,script:sr.SCRIPT,scriptscript:sr.SCRIPTSCRIPT},aJe={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ba=function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s{var v=m.classes[0],y=g.classes[0];v==="mbin"&&ir.contains(nJe,y)?m.classes[0]="mord":y==="mbin"&&ir.contains(rJe,v)&&(g.classes[0]="mord")},{node:f},d,p),Aoe(a,(g,m)=>{var v=DP(m),y=DP(g),w=v&&y?g.hasClass("mtight")?tJe[v][y]:eJe[v][y]:null;if(w)return je.makeGlue(w,u)},{node:f},d,p),a},Aoe=function t(e,r,n,i,a){i&&e.push(i);for(var s=0;sd=>{e.splice(f+1,0,d),s++})(s)}i&&e.pop()},cle=function(e){return e instanceof J0||e instanceof Rw||e instanceof eg&&e.hasClass("enclosing")?e:null},sJe=function t(e,r){var n=cle(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},DP=function(e,r){return e?(r&&(e=sJe(e,r)),aJe[e.classes[0]]||null):null},Nw=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return wf(r.concat(n))},jr=function(e,r,n){if(!e)return wf();if(pC[e.type]){var i=pC[e.type](e,r);if(n&&r.size!==n.size){i=wf(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new vt("Got group of unknown type: '"+e.type+"'")};_o=class{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=Kd(this.classes));for(var n=0;n0&&(e+=' class ="'+ir.escape(Kd(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}},Q0=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ir.escape(this.toText())}toText(){return this.text}},RP=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",wt(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},gt={MathNode:_o,TextNode:Q0,SpaceNode:RP,newDocumentFragment:ule},jl=function(e,r,n){return Zn[r][e]&&Zn[r][e].replace&&e.charCodeAt(0)!==55349&&!(nle.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Zn[r][e].replace),new gt.TextNode(e)},UP=function(e){return e.length===1?e[0]:new gt.MathNode("mrow",e)},HP=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=e.text;if(ir.contains(["\\imath","\\jmath"],a))return null;Zn[i][a]&&Zn[i][a].replace&&(a=Zn[i][a].replace);var s=je.fontMap[n].fontName;return $P(a,s,i)?je.fontMap[n].variant:null},Lo=function(e,r,n){if(e.length===1){var i=Vn(e[0],r);return n&&i instanceof _o&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o0&&(f.text=f.text.slice(0,1)+"\u0338"+f.text.slice(1),a.pop())}}}a.push(l),s=l}return a},Zd=function(e,r,n){return UP(Lo(e,r,n))},Vn=function(e,r){if(!e)return new gt.MathNode("mrow");if(gC[e.type]){var n=gC[e.type](e,r);return n}else throw new vt("Got group of unknown type: '"+e.type+"'")};hle=function(e){return new fC({style:e.displayMode?sr.DISPLAY:sr.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},fle=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=je.makeSpan(n,[e])}return e},oJe=function(e,r,n){var i=hle(n),a;if(n.output==="mathml")return Loe(e,r,i,n.displayMode,!0);if(n.output==="html"){var s=OP(e,i);a=je.makeSpan(["katex"],[s])}else{var o=Loe(e,r,i,n.displayMode,!1),l=OP(e,i);a=je.makeSpan(["katex"],[o,l])}return fle(a,n)},lJe=function(e,r,n){var i=hle(n),a=OP(e,i),s=je.makeSpan(["katex"],[a]);return fle(s,n)},cJe={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},uJe=function(e){var r=new gt.MathNode("mo",[new gt.TextNode(cJe[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},hJe={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]},fJe=function(e){return e.type==="ordgroup"?e.body.length:1},dJe=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(ir.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=e,h=fJe(u.base),f,d,p;if(h>5)l==="widehat"||l==="widecheck"?(f=420,o=2364,p=.42,d=l+"4"):(f=312,o=2340,p=.34,d="tilde4");else{var g=[1,1,2,2,3,3][h];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][g],f=[0,239,300,360,420][g],p=[0,.24,.3,.3,.36,.42][g],d=l+g):(o=[0,600,1033,2339,2340][g],f=[0,260,286,306,312][g],p=[0,.26,.286,.3,.306,.34][g],d="tilde"+g)}var m=new Zu(d),v=new Yc([m],{width:"100%",height:wt(p),viewBox:"0 0 "+o+" "+f,preserveAspectRatio:"none"});return{span:je.makeSvgSpan([],[v],r),minWidth:0,height:p}}else{var y=[],w=hJe[l],[k,E,T]=w,S=T/1e3,L=k.length,_,M;if(L===1){var I=w[3];_=["hide-tail"],M=[I]}else if(L===2)_=["halfarrow-left","halfarrow-right"],M=["xMinYMin","xMaxYMin"];else if(L===3)_=["brace-left","brace-center","brace-right"],M=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+L+" children.");for(var O=0;O0&&(i.style.minWidth=wt(a)),i},pJe=function(e,r,n,i,a){var s,o=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=je.makeSpan(["stretchy",r],[],a),r==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new Iw({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new Iw({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new Yc(u,{width:"100%",height:wt(o)});s=je.makeSvgSpan([],[h],a)}return s.height=o,s.style.height=wt(o),s},kf={encloseSpan:pJe,mathMLnode:uJe,svgSpan:dJe};WP=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=Ar(t.base,"accent"),r=n.base,t.base=r,i=BQe(jr(t,e)),t.base=n):(n=Ar(t,"accent"),r=n.base);var a=jr(r,e.havingCrampedStyle()),s=n.isShifty&&ir.isCharacterBox(r),o=0;if(s){var l=ir.getBaseElem(r),u=jr(l,e.havingCrampedStyle());o=Eoe(u).skew}var h=n.label==="\\c",f=h?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),d;if(n.isStretchy)d=kf.svgSpan(n,e),d=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+wt(2*o)+")",marginLeft:wt(2*o)}:void 0}]},e);else{var p,g;n.label==="\\vec"?(p=je.staticSvg("vec",e),g=je.svgData.vec[1]):(p=je.makeOrd({mode:n.mode,text:n.label},e,"textord"),p=Eoe(p),p.italic=0,g=p.width,h&&(f+=p.depth)),d=je.makeSpan(["accent-body"],[p]);var m=n.label==="\\textcircled";m&&(d.classes.push("accent-full"),f=a.height);var v=o;m||(v-=g/2),d.style.left=wt(v),n.label==="\\textcircled"&&(d.style.top=".2em"),d=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:d}]},e)}var y=je.makeSpan(["mord","accent"],[d],e);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},dle=(t,e)=>{var r=t.isStretchy?kf.mathMLnode(t.label):new gt.MathNode("mo",[jl(t.label,t.mode)]),n=new gt.MathNode("mover",[Vn(t.base,e),r]);return n.setAttribute("accent","true"),n},gJe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));Ot({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:(t,e)=>{var r=mC(e[0]),n=!gJe.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:WP,mathmlBuilder:dle});Ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:WP,mathmlBuilder:dle});Ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=jr(t.base,e),n=kf.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,a=je.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return je.makeSpan(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var r=kf.mathMLnode(t.label),n=new gt.MathNode("munder",[Vn(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});sC=t=>{var e=new gt.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};Ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=je.wrapFragment(jr(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=je.wrapFragment(jr(t.below,n,e),e),s.classes.push(a+"-arrow-pad"));var o=kf.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,u=-e.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(u-=i.depth);var h;if(s){var f=-e.fontMetrics().axisHeight+s.height+.5*o.height+.111;h=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l},{type:"elem",elem:s,shift:f}]},e)}else h=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l}]},e);return h.children[0].children[0].children[1].classes.push("svg-align"),je.makeSpan(["mrel","x-arrow"],[h],e)},mathmlBuilder(t,e){var r=kf.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=sC(Vn(t.body,e));if(t.below){var a=sC(Vn(t.below,e));n=new gt.MathNode("munderover",[r,a,i])}else n=new gt.MathNode("mover",[r,i])}else if(t.below){var s=sC(Vn(t.below,e));n=new gt.MathNode("munder",[r,s])}else n=sC(),n=new gt.MathNode("mover",[r,n]);return n}});mJe=je.makeSpan;Ot({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Ji(i),isCharacterBox:ir.isCharacterBox(i)}},htmlBuilder:ple,mathmlBuilder:gle});kC=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};Ot({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:kC(e[0]),body:Ji(e[1]),isCharacterBox:ir.isCharacterBox(e[1])}}});Ot({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],s;n!=="\\stackrel"?s=kC(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ji(i)},l={type:"supsub",mode:a.mode,base:o,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:ir.isCharacterBox(l)}},htmlBuilder:ple,mathmlBuilder:gle});Ot({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:kC(e[0]),body:Ji(e[0])}},htmlBuilder(t,e){var r=ba(t.body,e,!0),n=je.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=Lo(t.body,e),n=new gt.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});vJe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Moe=()=>({type:"styling",body:[],mode:"math",style:"display"}),Doe=t=>t.type==="textord"&&t.text==="@",yJe=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;Ot({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=je.wrapFragment(jr(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=wt(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new gt.MathNode("mrow",[Vn(t.label,e)]);return r=new gt.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new gt.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});Ot({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=je.wrapFragment(jr(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new gt.MathNode("mrow",[Vn(t.fragment,e)])}});Ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=Ar(e[0],"ordgroup"),i=n.body,a="",s=0;s=1114111)throw new vt("\\@char with invalid code point "+a);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});mle=(t,e)=>{var r=ba(t.body,e.withColor(t.color),!1);return je.makeFragment(r)},vle=(t,e)=>{var r=Lo(t.body,e.withColor(t.color)),n=new gt.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};Ot({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=Ar(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:Ji(i)}},htmlBuilder:mle,mathmlBuilder:vle});Ot({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=Ar(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:mle,mathmlBuilder:vle});Ot({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&Ar(i,"size").value}},htmlBuilder(t,e){var r=je.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=wt(Ii(t.size,e)))),r},mathmlBuilder(t,e){var r=new gt.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",wt(Ii(t.size,e)))),r}});IP={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},yle=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new vt("Expected a control sequence",t);return e},wJe=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},ble=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};Ot({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(IP[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=IP[n.text]),Ar(e.parseFunction(),"internal");throw new vt("Invalid token after macro prefix",n)}});Ot({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new vt("Expected a control sequence",n);for(var a=0,s,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),o[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new vt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new vt('Argument number "'+n.text+'" out of order');a++,o.push([])}else{if(n.text==="EOF")throw new vt("Expected a macro definition");o[a].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},r===IP[r]),{type:"internal",mode:e.mode}}});Ot({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=yle(e.gullet.popToken());e.gullet.consumeSpaces();var i=wJe(e);return ble(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});Ot({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=yle(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return ble(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});Lw=function(e,r,n){var i=Zn.math[e]&&Zn.math[e].replace,a=$P(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},GP=function(e,r,n,i){var a=n.havingBaseStyle(r),s=je.makeSpan(i.concat(a.sizingClasses(n)),[e],n),o=a.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},xle=function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=wt(a),e.height-=a,e.depth+=a},kJe=function(e,r,n,i,a,s){var o=je.makeSymbol(e,"Main-Regular",a,i),l=GP(o,r,i,s);return n&&xle(l,i,r),l},TJe=function(e,r,n,i){return je.makeSymbol(e,"Size"+r+"-Regular",n,i)},wle=function(e,r,n,i,a,s){var o=TJe(e,r,a,i),l=GP(je.makeSpan(["delimsizing","size"+r],[o],i),sr.TEXT,i,s);return n&&xle(l,i,sr.TEXT),l},yP=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=je.makeSpan(["delimsizinginner",i],[je.makeSpan([],[je.makeSymbol(e,r,n)])]);return{type:"elem",elem:a}},bP=function(e,r,n){var i=Ku["Size4-Regular"][e.charCodeAt(0)]?Ku["Size4-Regular"][e.charCodeAt(0)][4]:Ku["Size1-Regular"][e.charCodeAt(0)][4],a=new Zu("inner",DQe(e,Math.round(1e3*r))),s=new Yc([a],{width:wt(i),height:wt(r),style:"width:"+wt(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=je.makeSvgSpan([],[s],n);return o.height=r,o.style.height=wt(r),o.style.width=wt(i),{type:"elem",elem:o}},NP=.008,oC={type:"kern",size:-1*NP},EJe=["|","\\lvert","\\rvert","\\vert"],SJe=["\\|","\\lVert","\\rVert","\\Vert"],kle=function(e,r,n,i,a,s){var o,l,u,h,f="",d=0;o=u=h=e,l=null;var p="Size1-Regular";e==="\\uparrow"?u=h="\u23D0":e==="\\Uparrow"?u=h="\u2016":e==="\\downarrow"?o=u="\u23D0":e==="\\Downarrow"?o=u="\u2016":e==="\\updownarrow"?(o="\\uparrow",u="\u23D0",h="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",u="\u2016",h="\\Downarrow"):ir.contains(EJe,e)?(u="\u2223",f="vert",d=333):ir.contains(SJe,e)?(u="\u2225",f="doublevert",d=556):e==="["||e==="\\lbrack"?(o="\u23A1",u="\u23A2",h="\u23A3",p="Size4-Regular",f="lbrack",d=667):e==="]"||e==="\\rbrack"?(o="\u23A4",u="\u23A5",h="\u23A6",p="Size4-Regular",f="rbrack",d=667):e==="\\lfloor"||e==="\u230A"?(u=o="\u23A2",h="\u23A3",p="Size4-Regular",f="lfloor",d=667):e==="\\lceil"||e==="\u2308"?(o="\u23A1",u=h="\u23A2",p="Size4-Regular",f="lceil",d=667):e==="\\rfloor"||e==="\u230B"?(u=o="\u23A5",h="\u23A6",p="Size4-Regular",f="rfloor",d=667):e==="\\rceil"||e==="\u2309"?(o="\u23A4",u=h="\u23A5",p="Size4-Regular",f="rceil",d=667):e==="("||e==="\\lparen"?(o="\u239B",u="\u239C",h="\u239D",p="Size4-Regular",f="lparen",d=875):e===")"||e==="\\rparen"?(o="\u239E",u="\u239F",h="\u23A0",p="Size4-Regular",f="rparen",d=875):e==="\\{"||e==="\\lbrace"?(o="\u23A7",l="\u23A8",h="\u23A9",u="\u23AA",p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="\u23AB",l="\u23AC",h="\u23AD",u="\u23AA",p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(o="\u23A7",h="\u23A9",u="\u23AA",p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(o="\u23AB",h="\u23AD",u="\u23AA",p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(o="\u23A7",h="\u23AD",u="\u23AA",p="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(o="\u23AB",h="\u23A9",u="\u23AA",p="Size4-Regular");var g=Lw(o,p,a),m=g.height+g.depth,v=Lw(u,p,a),y=v.height+v.depth,w=Lw(h,p,a),k=w.height+w.depth,E=0,T=1;if(l!==null){var S=Lw(l,p,a);E=S.height+S.depth,T=2}var L=m+k+E,_=Math.max(0,Math.ceil((r-L)/(T*y))),M=L+_*T*y,I=i.fontMetrics().axisHeight;n&&(I*=i.sizeMultiplier);var O=M/2-I,C=[];if(f.length>0){var R=M-m-k,D=Math.round(M*1e3),P=OQe(f,Math.round(R*1e3)),A=new Zu(f,P),N=(d/1e3).toFixed(3)+"em",F=(D/1e3).toFixed(3)+"em",B=new Yc([A],{width:N,height:F,viewBox:"0 0 "+d+" "+D}),V=je.makeSvgSpan([],[B],i);V.height=D/1e3,V.style.width=N,V.style.height=F,C.push({type:"elem",elem:V})}else{if(C.push(yP(h,p,a)),C.push(oC),l===null){var z=M-m-k+2*NP;C.push(bP(u,z,i))}else{var H=(M-m-k-E)/2+2*NP;C.push(bP(u,H,i)),C.push(oC),C.push(yP(l,p,a)),C.push(oC),C.push(bP(u,H,i))}C.push(oC),C.push(yP(o,p,a))}var K=i.havingBaseStyle(sr.TEXT),X=je.makeVList({positionType:"bottom",positionData:O,children:C},K);return GP(je.makeSpan(["delimsizing","mult"],[X],K),sr.TEXT,i,s)},xP=80,wP=.08,kP=function(e,r,n,i,a){var s=MQe(e,i,n),o=new Zu(e,s),l=new Yc([o],{width:"400em",height:wt(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return je.makeSvgSpan(["hide-tail"],[l],a)},CJe=function(e,r){var n=r.havingBaseSizing(),i=Cle("\\surd",e*n.sizeMultiplier,Sle,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,u=0,h=0,f;return i.type==="small"?(h=1e3+1e3*s+xP,e<1?a=1:e<1.4&&(a=.7),l=(1+s+wP)/a,u=(1+s)/a,o=kP("sqrtMain",l,h,s,r),o.style.minWidth="0.853em",f=.833/a):i.type==="large"?(h=(1e3+xP)*Mw[i.size],u=(Mw[i.size]+s)/a,l=(Mw[i.size]+s+wP)/a,o=kP("sqrtSize"+i.size,l,h,s,r),o.style.minWidth="1.02em",f=1/a):(l=e+s+wP,u=e+s,h=Math.floor(1e3*e+s)+xP,o=kP("sqrtTall",l,h,s,r),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=wt(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},Tle=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],_Je=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Ele=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Mw=[0,1.2,1.8,2.4,3],AJe=function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),ir.contains(Tle,e)||ir.contains(Ele,e))return wle(e,r,!1,n,i,a);if(ir.contains(_Je,e))return kle(e,Mw[r],!1,n,i,a);throw new vt("Illegal delimiter: '"+e+"'")},LJe=[{type:"small",style:sr.SCRIPTSCRIPT},{type:"small",style:sr.SCRIPT},{type:"small",style:sr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],MJe=[{type:"small",style:sr.SCRIPTSCRIPT},{type:"small",style:sr.SCRIPT},{type:"small",style:sr.TEXT},{type:"stack"}],Sle=[{type:"small",style:sr.SCRIPTSCRIPT},{type:"small",style:sr.SCRIPT},{type:"small",style:sr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],DJe=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Cle=function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;sr)return n[s]}return n[n.length-1]},_le=function(e,r,n,i,a,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var o;ir.contains(Ele,e)?o=LJe:ir.contains(Tle,e)?o=Sle:o=MJe;var l=Cle(e,r,o,i);return l.type==="small"?kJe(e,l.style,n,i,a,s):l.type==="large"?wle(e,l.size,n,i,a,s):kle(e,r,n,i,a,s)},OJe=function(e,r,n,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,h=Math.max(r-o,n+o),f=Math.max(h/500*l,2*h-u);return _le(e,f,!0,i,a,s)},xf={sqrtImage:CJe,sizedDelim:AJe,sizeToMaxHeight:Mw,customSizedDelim:_le,leftRightDelim:OJe},Ooe={"\\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}},RJe=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];Ot({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:(t,e)=>{var r=TC(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:Ooe[t.funcName].size,mclass:Ooe[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?je.makeSpan([t.mclass]):xf.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(jl(t.delim,t.mode));var r=new gt.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=wt(xf.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});Ot({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new vt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:TC(e[0],t).text,color:r}}});Ot({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=TC(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=Ar(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{Roe(t);for(var r=ba(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s{Roe(t);var r=Lo(t.body,e);if(t.left!=="."){var n=new gt.MathNode("mo",[jl(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new gt.MathNode("mo",[jl(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return UP(r)}});Ot({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=TC(e[0],t);if(!t.parser.leftrightDepth)throw new vt("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=Nw(e,[]);else{r=xf.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?jl("|","text"):jl(t.delim,t.mode),n=new gt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});YP=(t,e)=>{var r=je.wrapFragment(jr(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,s=0,o=ir.isCharacterBox(t.body);if(n==="sout")a=je.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=Ii({number:.6,unit:"pt"},e),u=Ii({number:.35,unit:"ex"},e),h=e.havingBaseSizing();i=i/h.sizeMultiplier;var f=r.height+r.depth+l+u;r.style.paddingLeft=wt(f/2+l);var d=Math.floor(1e3*f*i),p=AQe(d),g=new Yc([new Zu("phase",p)],{width:"400em",height:wt(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=je.makeSvgSpan(["hide-tail"],[g],e),a.style.height=wt(f),s=r.depth+l+u}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var m=0,v=0,y=0;/box/.test(n)?(y=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),m=e.fontMetrics().fboxsep+(n==="colorbox"?0:y),v=m):n==="angl"?(y=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),m=4*y,v=Math.max(0,.25-r.depth)):(m=o?.2:0,v=m),a=kf.encloseSpan(r,n,m,v,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=wt(y)):n==="angl"&&y!==.049&&(a.style.borderTopWidth=wt(y),a.style.borderRightWidth=wt(y)),s=r.depth+v,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var w;if(t.backgroundColor)w=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]},e);else{var k=/cancel|phase/.test(n)?["svg-align"]:[];w=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:k}]},e)}return/cancel/.test(n)&&(w.height=r.height,w.depth=r.depth),/cancel/.test(n)&&!o?je.makeSpan(["mord","cancel-lap"],[w],e):je.makeSpan(["mord"],[w],e)},jP=(t,e)=>{var r=0,n=new gt.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Vn(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};Ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=Ar(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:YP,mathmlBuilder:jP});Ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=Ar(e[0],"color-token").color,s=Ar(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:YP,mathmlBuilder:jP});Ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});Ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:YP,mathmlBuilder:jP});Ot({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});Ale={};Lle={};EC=t=>{var e=t.parser.settings;if(!e.displayMode)throw new vt("{"+t.envName+"} can be used only in display mode.")};Ju=function(e,r){var n,i,a=e.body.length,s=e.hLinesBeforeRow,o=0,l=new Array(a),u=[],h=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(e.colSeparationType&&e.colSeparationType==="small"){var p=r.havingStyle(sr.SCRIPT).sizeMultiplier;d=.2778*(p/r.sizeMultiplier)}var g=e.colSeparationType==="CD"?Ii({number:3,unit:"ex"},r):12*f,m=3*f,v=e.arraystretch*g,y=.7*v,w=.3*v,k=0;function E(Se){for(var Ye=0;Ye0&&(k+=.25),u.push({pos:k,isDashed:Se[Ye]})}for(E(s[0]),n=0;n0&&(O+=w,LSe))for(n=0;n=o)){var ee=void 0;(i>0||e.hskipBeforeAndAfter)&&(ee=ir.deflt(H.pregap,d),ee!==0&&(P=je.makeSpan(["arraycolsep"],[]),P.style.width=wt(ee),D.push(P)));var Q=[];for(n=0;n0){for(var oe=je.makeLineSpan("hline",r,h),de=je.makeLineSpan("hdashline",r,h),pe=[{type:"elem",elem:l,shift:0}];u.length>0;){var re=u.pop(),Be=re.pos-C;re.isDashed?pe.push({type:"elem",elem:de,shift:Be}):pe.push({type:"elem",elem:oe,shift:Be})}l=je.makeVList({positionType:"individualShift",children:pe},r)}if(N.length===0)return je.makeSpan(["mord"],[l],r);var le=je.makeVList({positionType:"individualShift",children:N},r);return le=je.makeSpan(["tag"],[le],r),je.makeFragment([l,le])},IJe={c:"center ",l:"left ",r:"right "},eh=function(e,r){for(var n=[],i=new gt.MathNode("mtd",[],["mtr-glue"]),a=new gt.MathNode("mtd",[],["mml-eqn-num"]),s=0;s0){var g=e.cols,m="",v=!1,y=0,w=g.length;g[0].type==="separator"&&(d+="top ",y=1),g[g.length-1].type==="separator"&&(d+="bottom ",w-=1);for(var k=y;k0?"left ":"",d+=_[_.length-1].length>0?"right ":"";for(var M=1;M<_.length-1;M++)L+=_[M].length===0?"none ":_[M][0]?"dashed ":"solid ";return/[sd]/.test(L)&&h.setAttribute("rowlines",L.trim()),d!==""&&(h=new gt.MathNode("menclose",[h]),h.setAttribute("notation",d.trim())),e.arraystretch&&e.arraystretch<1&&(h=new gt.MathNode("mstyle",[h]),h.setAttribute("scriptlevel","1")),h},Mle=function(e,r){e.envName.indexOf("ed")===-1&&EC(e);var n=[],i=e.envName.indexOf("at")>-1?"alignat":"align",a=e.envName==="split",s=Qd(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:XP(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),o,l=0,u={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var h="",f=0;f0&&p&&(v=1),n[g]={type:"align",align:m,pregap:v,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Qu({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=wC(e[0]),n=r?[e[0]]:Ar(e[0],"ordgroup").body,i=n.map(function(s){var o=qP(s),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new vt("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Qd(t.parser,a,KP(t.envName))},htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new vt("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=Qd(t.parser,n,KP(t.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=Qd(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=wC(e[0]),n=r?[e[0]]:Ar(e[0],"ordgroup").body,i=n.map(function(s){var o=qP(s),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new vt("Unknown column alignment: "+l,s)});if(i.length>1)throw new vt("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=Qd(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new vt("{subarray} can contain only one column");return a},htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=Qd(t.parser,e,KP(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Mle,htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){ir.contains(["gather","gather*"],t.envName)&&EC(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:XP(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Qd(t.parser,e,"display")},htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Mle,htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){EC(t);var e={autoTag:XP(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Qd(t.parser,e,"display")},htmlBuilder:Ju,mathmlBuilder:eh});Qu({type:"array",names:["CD"],props:{numArgs:0},handler(t){return EC(t),xJe(t.parser)},htmlBuilder:Ju,mathmlBuilder:eh});ge("\\nonumber","\\gdef\\@eqnsw{0}");ge("\\notag","\\nonumber");Ot({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new vt(t.funcName+" valid only within array environment")}});Noe=Ale;Ot({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new vt("Invalid environment name",i);for(var a="",s=0;s{var r=t.font,n=e.withFont(r);return jr(t.body,n)},Ole=(t,e)=>{var r=t.font,n=e.withFont(r);return Vn(t.body,n)},Poe={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ot({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=mC(e[0]),a=n;return a in Poe&&(a=Poe[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:Dle,mathmlBuilder:Ole});Ot({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=ir.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:kC(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});Ot({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,s=r.parseExpression(!0,i),o="math"+n.slice(1);return{type:"font",mode:a,font:o,body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:Dle,mathmlBuilder:Ole});Rle=(t,e)=>{var r=e;return t==="display"?r=r.id>=sr.SCRIPT.id?r.text():sr.DISPLAY:t==="text"&&r.size===sr.DISPLAY.size?r=sr.TEXT:t==="script"?r=sr.SCRIPT:t==="scriptscript"&&(r=sr.SCRIPTSCRIPT),r},ZP=(t,e)=>{var r=Rle(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var s=jr(t.numer,a,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height0?g=3*d:g=7*d,m=e.fontMetrics().denom1):(f>0?(p=e.fontMetrics().num2,g=d):(p=e.fontMetrics().num3,g=3*d),m=e.fontMetrics().denom2);var v;if(h){var w=e.fontMetrics().axisHeight;p-s.depth-(w+.5*f){var r=new gt.MathNode("mfrac",[Vn(t.numer,e),Vn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=Ii(t.barSize,e);r.setAttribute("linethickness",wt(n))}var i=Rle(t.size,e.style);if(i.size!==e.style.size){r=new gt.MathNode("mstyle",[r]);var a=i.size===sr.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var s=[];if(t.leftDelim!=null){var o=new gt.MathNode("mo",[new gt.TextNode(t.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(r),t.rightDelim!=null){var l=new gt.MathNode("mo",[new gt.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return UP(s)}return r};Ot({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],s,o=null,l=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:o,rightDelim:l,size:u,barSize:null}},htmlBuilder:ZP,mathmlBuilder:QP});Ot({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Ot({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});Foe=["display","text","script","scriptscript"],Boe=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};Ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=mC(e[0]),s=a.type==="atom"&&a.family==="open"?Boe(a.text):null,o=mC(e[1]),l=o.type==="atom"&&o.family==="close"?Boe(o.text):null,u=Ar(e[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var d="auto",p=e[3];if(p.type==="ordgroup"){if(p.body.length>0){var g=Ar(p.body[0],"textord");d=Foe[Number(g.text)]}}else p=Ar(p,"textord"),d=Foe[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:h,barSize:f,leftDelim:s,rightDelim:l,size:d}},htmlBuilder:ZP,mathmlBuilder:QP});Ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ar(e[0],"size").value,token:i}}});Ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=dQe(Ar(e[1],"infix").size),s=e[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:ZP,mathmlBuilder:QP});Ile=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?jr(t.sup,e.havingStyle(r.sup()),e):jr(t.sub,e.havingStyle(r.sub()),e),i=Ar(t.base,"horizBrace")):i=Ar(t,"horizBrace");var a=jr(i.base,e.havingBaseStyle(sr.DISPLAY)),s=kf.svgSpan(i,e),o;if(i.isOver?(o=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e),o.children[0].children[0].children[1].classes.push("svg-align")):(o=je.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=je.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e);i.isOver?o=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):o=je.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return je.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e)},NJe=(t,e)=>{var r=kf.mathMLnode(t.label);return new gt.MathNode(t.isOver?"mover":"munder",[Vn(t.base,e),r])};Ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:Ile,mathmlBuilder:NJe});Ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=Ar(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:Ji(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=ba(t.body,e,!1);return je.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Zd(t.body,e);return r instanceof _o||(r=new _o("mrow",[r])),r.setAttribute("href",t.href),r}});Ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=Ar(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:r,funcName:n,token:i}=t,a=Ar(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),h=0;h{var r=ba(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=je.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>Zd(t.body,e)});Ot({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:Ji(e[0]),mathml:Ji(e[1])}},htmlBuilder:(t,e)=>{var r=ba(t.html,e,!1);return je.makeFragment(r)},mathmlBuilder:(t,e)=>Zd(t.mathml,e)});TP=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new vt("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!Joe(n))throw new vt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ot({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=Ar(r[0],"raw").string,u=l.split(","),h=0;h{var r=Ii(t.height,e),n=0;t.totalheight.number>0&&(n=Ii(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=Ii(t.width,e));var a={height:wt(r+n)};i>0&&(a.width=wt(i)),n>0&&(a.verticalAlign=wt(-n));var s=new LP(t.src,t.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(t,e)=>{var r=new gt.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=Ii(t.height,e),i=0;if(t.totalheight.number>0&&(i=Ii(t.totalheight,e)-n,r.setAttribute("valign",wt(-i))),r.setAttribute("height",wt(n+i)),t.width.number>0){var a=Ii(t.width,e);r.setAttribute("width",wt(a))}return r.setAttribute("src",t.src),r}});Ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=Ar(e[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return je.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=Ii(t.dimension,e);return new gt.SpaceNode(r)}});Ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=je.makeSpan([],[jr(t.body,e)]),r=je.makeSpan(["inner"],[r],e)):r=je.makeSpan(["inner"],[jr(t.body,e)]);var n=je.makeSpan(["fix"],[]),i=je.makeSpan([t.alignment],[r,n],e),a=je.makeSpan(["strut"]);return a.style.height=wt(i.height+i.depth),i.depth&&(a.style.verticalAlign=wt(-i.depth)),i.children.unshift(a),i=je.makeSpan(["thinbox"],[i],e),je.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new gt.MathNode("mpadded",[Vn(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});Ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}});Ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new vt("Mismatched "+t.funcName)}});zoe=(t,e)=>{switch(e.style.size){case sr.DISPLAY.size:return t.display;case sr.TEXT.size:return t.text;case sr.SCRIPT.size:return t.script;case sr.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};Ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:Ji(e[0]),text:Ji(e[1]),script:Ji(e[2]),scriptscript:Ji(e[3])}},htmlBuilder:(t,e)=>{var r=zoe(t,e),n=ba(r,e,!1);return je.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=zoe(t,e);return Zd(r,e)}});Nle=(t,e,r,n,i,a,s)=>{t=je.makeSpan([],[t]);var o=r&&ir.isCharacterBox(r),l,u;if(e){var h=jr(e,n.havingStyle(i.sup()),n);u={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var f=jr(r,n.havingStyle(i.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s;d=je.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:wt(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:wt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var g=t.height-s;d=je.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:wt(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(u){var m=t.depth+s;d=je.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:wt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var v=[d];if(l&&a!==0&&!o){var y=je.makeSpan(["mspace"],[],n);y.style.marginRight=wt(a),v.unshift(y)}return je.makeSpan(["mop","op-limits"],v,n)},Ple=["\\smallint"],lv=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=Ar(t.base,"op"),i=!0):a=Ar(t,"op");var s=e.style,o=!1;s.size===sr.DISPLAY.size&&a.symbol&&!ir.contains(Ple,a.name)&&(o=!0);var l;if(a.symbol){var u=o?"Size2-Regular":"Size1-Regular",h="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(h=a.name.slice(1),a.name=h==="oiint"?"\\iint":"\\iiint"),l=je.makeSymbol(a.name,u,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),h.length>0){var f=l.italic,d=je.staticSvg(h+"Size"+(o?"2":"1"),e);l=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]},e),a.name="\\"+h,l.classes.unshift("mop"),l.italic=f}}else if(a.body){var p=ba(a.body,e,!0);p.length===1&&p[0]instanceof Ao?(l=p[0],l.classes[0]="mop"):l=je.makeSpan(["mop"],p,e)}else{for(var g=[],m=1;m{var r;if(t.symbol)r=new _o("mo",[jl(t.name,t.mode)]),ir.contains(Ple,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new _o("mo",Lo(t.body,e));else{r=new _o("mi",[new Q0(t.name.slice(1))]);var n=new _o("mo",[jl("\u2061","text")]);t.parentIsSupSub?r=new _o("mrow",[r,n]):r=ule([r,n])}return r},PJe={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Ot({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=PJe[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:lv,mathmlBuilder:Pw});Ot({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ji(n)}},htmlBuilder:lv,mathmlBuilder:Pw});FJe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Ot({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:lv,mathmlBuilder:Pw});Ot({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:lv,mathmlBuilder:Pw});Ot({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=FJe[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:lv,mathmlBuilder:Pw});Fle=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=Ar(t.base,"operatorname"),i=!0):a=Ar(t,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(f=>{var d=f.text;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),l=ba(o,e.withFont("mathrm"),!0),u=0;u{for(var r=Lo(t.body,e.withFont("mathrm")),n=!0,i=0;ih.toText()).join("");r=[new gt.TextNode(o)]}var l=new gt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var u=new gt.MathNode("mo",[jl("\u2061","text")]);return t.parentIsSupSub?new gt.MathNode("mrow",[l,u]):gt.newDocumentFragment([l,u])};Ot({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:Ji(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Fle,mathmlBuilder:BJe});ge("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");tg({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?je.makeFragment(ba(t.body,e,!1)):je.makeSpan(["mord"],ba(t.body,e,!0),e)},mathmlBuilder(t,e){return Zd(t.body,e,!0)}});Ot({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=jr(t.body,e.havingCrampedStyle()),n=je.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return je.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new gt.MathNode("mo",[new gt.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new gt.MathNode("mover",[Vn(t.body,e),r]);return n.setAttribute("accent","true"),n}});Ot({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:Ji(n)}},htmlBuilder:(t,e)=>{var r=ba(t.body,e.withPhantom(),!1);return je.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=Lo(t.body,e);return new gt.MathNode("mphantom",r)}});Ot({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=je.makeSpan([],[jr(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=Lo(Ji(t.body),e),n=new gt.MathNode("mphantom",r),i=new gt.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});Ot({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=je.makeSpan(["inner"],[jr(t.body,e.withPhantom())]),n=je.makeSpan(["fix"],[]);return je.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=Lo(Ji(t.body),e),n=new gt.MathNode("mphantom",r),i=new gt.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});Ot({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=Ar(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=jr(t.body,e),n=Ii(t.dy,e);return je.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new gt.MathNode("mpadded",[Vn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});Ot({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});Ot({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=Ar(e[0],"size"),s=Ar(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&Ar(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var r=je.makeSpan(["mord","rule"],[],e),n=Ii(t.width,e),i=Ii(t.height,e),a=t.shift?Ii(t.shift,e):0;return r.style.borderRightWidth=wt(n),r.style.borderTopWidth=wt(i),r.style.bottom=wt(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Ii(t.width,e),n=Ii(t.height,e),i=t.shift?Ii(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new gt.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",wt(r)),s.setAttribute("height",wt(n));var o=new gt.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",wt(i)):(o.setAttribute("height",wt(i)),o.setAttribute("depth",wt(-i))),o.setAttribute("voffset",wt(i)),o}});$oe=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],zJe=(t,e)=>{var r=e.havingSize(t.size);return Ble(t.body,r,e)};Ot({type:"sizing",names:$oe,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:$oe.indexOf(n)+1,body:a}},htmlBuilder:zJe,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=Lo(t.body,r),i=new gt.MathNode("mstyle",n);return i.setAttribute("mathsize",wt(r.sizeMultiplier)),i}});Ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,a=!1,s=r[0]&&Ar(r[0],"ordgroup");if(s)for(var o="",l=0;l{var r=je.makeSpan([],[jr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new gt.MathNode("mpadded",[Vn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});Ot({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=jr(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=je.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.idr.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var d=l.height-r.height-s-u;r.style.paddingLeft=wt(h);var p=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]},e);if(t.index){var g=e.havingStyle(sr.SCRIPTSCRIPT),m=jr(t.index,g,e),v=.6*(p.height-p.depth),y=je.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:m}]},e),w=je.makeSpan(["root"],[y]);return je.makeSpan(["mord","sqrt"],[w,p],e)}else return je.makeSpan(["mord","sqrt"],[p],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new gt.MathNode("mroot",[Vn(r,e),Vn(n,e)]):new gt.MathNode("msqrt",[Vn(r,e)])}});Voe={display:sr.DISPLAY,text:sr.TEXT,script:sr.SCRIPT,scriptscript:sr.SCRIPTSCRIPT};Ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var r=Voe[t.style],n=e.havingStyle(r).withFont("");return Ble(t.body,n,e)},mathmlBuilder(t,e){var r=Voe[t.style],n=e.havingStyle(r),i=Lo(t.body,n),a=new gt.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[t.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});$Je=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===sr.DISPLAY.size||n.alwaysHandleSupSub);return i?lv:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===sr.DISPLAY.size||n.limits);return a?Fle:null}else{if(n.type==="accent")return ir.isCharacterBox(n.base)?WP:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?Ile:null}else return null}else return null};tg({type:"supsub",htmlBuilder(t,e){var r=$Je(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,s=jr(n,e),o,l,u=e.fontMetrics(),h=0,f=0,d=n&&ir.isCharacterBox(n);if(i){var p=e.havingStyle(e.style.sup());o=jr(i,p,e),d||(h=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/e.sizeMultiplier)}if(a){var g=e.havingStyle(e.style.sub());l=jr(a,g,e),d||(f=s.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}var m;e.style===sr.DISPLAY?m=u.sup1:e.style.cramped?m=u.sup3:m=u.sup2;var v=e.sizeMultiplier,y=wt(.5/u.ptPerEm/v),w=null;if(l){var k=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(s instanceof Ao||k)&&(w=wt(-s.italic))}var E;if(o&&l){h=Math.max(h,m,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var T=u.defaultRuleThickness,S=4*T;if(h-o.depth-(l.height-f)0&&(h+=L,f-=L)}var _=[{type:"elem",elem:l,shift:f,marginRight:y,marginLeft:w},{type:"elem",elem:o,shift:-h,marginRight:y}];E=je.makeVList({positionType:"individualShift",children:_},e)}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var M=[{type:"elem",elem:l,marginLeft:w,marginRight:y}];E=je.makeVList({positionType:"shift",positionData:f,children:M},e)}else if(o)h=Math.max(h,m,o.depth+.25*u.xHeight),E=je.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:y}]},e);else throw new Error("supsub must have either sup or sub.");var I=DP(s,"right")||"mord";return je.makeSpan([I],[s,je.makeSpan(["msupsub"],[E])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[Vn(t.base,e)];t.sub&&a.push(Vn(t.sub,e)),t.sup&&a.push(Vn(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&e.style===sr.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(e.style===sr.DISPLAY||u.limits)?s="munderover":s="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===sr.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===sr.DISPLAY)?s="munder":s="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===sr.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===sr.DISPLAY)?s="mover":s="msup"}return new gt.MathNode(s,a)}});tg({type:"atom",htmlBuilder(t,e){return je.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new gt.MathNode("mo",[jl(t.text,t.mode)]);if(t.family==="bin"){var n=HP(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});zle={mi:"italic",mn:"normal",mtext:"normal"};tg({type:"mathord",htmlBuilder(t,e){return je.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new gt.MathNode("mi",[jl(t.text,t.mode,e)]),n=HP(t,e)||"italic";return n!==zle[r.type]&&r.setAttribute("mathvariant",n),r}});tg({type:"textord",htmlBuilder(t,e){return je.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=jl(t.text,t.mode,e),n=HP(t,e)||"normal",i;return t.mode==="text"?i=new gt.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new gt.MathNode("mn",[r]):t.text==="\\prime"?i=new gt.MathNode("mo",[r]):i=new gt.MathNode("mi",[r]),n!==zle[i.type]&&i.setAttribute("mathvariant",n),i}});EP={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},SP={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};tg({type:"spacing",htmlBuilder(t,e){if(SP.hasOwnProperty(t.text)){var r=SP[t.text].className||"";if(t.mode==="text"){var n=je.makeOrd(t,e,"textord");return n.classes.push(r),n}else return je.makeSpan(["mspace",r],[je.mathsym(t.text,t.mode,e)],e)}else{if(EP.hasOwnProperty(t.text))return je.makeSpan(["mspace",EP[t.text]],[],e);throw new vt('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(SP.hasOwnProperty(t.text))r=new gt.MathNode("mtext",[new gt.TextNode("\xA0")]);else{if(EP.hasOwnProperty(t.text))return new gt.MathNode("mspace");throw new vt('Unknown type of space "'+t.text+'"')}return r}});Uoe=()=>{var t=new gt.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};tg({type:"tag",mathmlBuilder(t,e){var r=new gt.MathNode("mtable",[new gt.MathNode("mtr",[Uoe(),new gt.MathNode("mtd",[Zd(t.body,e)]),Uoe(),new gt.MathNode("mtd",[Zd(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});Hoe={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},qoe={"\\textbf":"textbf","\\textmd":"textmd"},VJe={"\\textit":"textit","\\textup":"textup"},Woe=(t,e)=>{var r=t.font;if(r){if(Hoe[r])return e.withTextFontFamily(Hoe[r]);if(qoe[r])return e.withTextFontWeight(qoe[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(VJe[r])};Ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:Ji(i),font:n}},htmlBuilder(t,e){var r=Woe(t,e),n=ba(t.body,r,!0);return je.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=Woe(t,e);return Zd(t.body,r)}});Ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=jr(t.body,e),n=je.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=je.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return je.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new gt.MathNode("mo",[new gt.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new gt.MathNode("munder",[Vn(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});Ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=jr(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return je.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new gt.MathNode("mpadded",[Vn(t.body,e)],["vcenter"])}});Ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new vt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Goe(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"\u2423":"\xA0"),Xd=lle,$le=`[ \r ]`,UJe="\\\\[a-zA-Z@]+",HJe="\\\\[^\uD800-\uDFFF]",qJe="("+UJe+")"+$le+"*",WJe=`\\\\( |[ \r ]+ ?)[ \r ]*`,PP="[\u0300-\u036F]",GJe=new RegExp(PP+"+$"),YJe="("+$le+"+)|"+(WJe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(PP+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(PP+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+qJe)+("|"+HJe+")"),vC=class{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(YJe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Yl("EOF",new ul(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new vt("Unexpected character: '"+e[r]+"'",new Yl(e[r],new ul(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=e.indexOf(` `,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.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=a+1,this.lex()}return new Yl(i,new ul(this,r,this.tokenRegex.lastIndex))}},FP=class{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new vt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}},jJe=Lle;ge("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});ge("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});ge("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});ge("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});ge("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});ge("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ge("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});Yoe={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};ge("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new vt("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=Yoe[e.text],n==null||n>=r)throw new vt("Invalid base-"+r+" digit "+e.text);for(var i;(i=Yoe[t.future().text])!=null&&i{var n=t.consumeArg().tokens;if(n.length!==1)throw new vt("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new vt("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new vt("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(n=t.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var o="",l=t.expandNextToken();l.text!=="]"&&l.text!=="EOF";)o+=l.text,l=t.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new vt("Invalid number of arguments: "+o);s=parseInt(o),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:s}),""};ge("\\newcommand",t=>JP(t,!1,!0));ge("\\renewcommand",t=>JP(t,!0,!1));ge("\\providecommand",t=>JP(t,!0,!0));ge("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});ge("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});ge("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Xd[r],Zn.math[r],Zn.text[r]),""});ge("\\bgroup","{");ge("\\egroup","}");ge("~","\\nobreakspace");ge("\\lq","`");ge("\\rq","'");ge("\\aa","\\r a");ge("\\AA","\\r A");ge("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");ge("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ge("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");ge("\u212C","\\mathscr{B}");ge("\u2130","\\mathscr{E}");ge("\u2131","\\mathscr{F}");ge("\u210B","\\mathscr{H}");ge("\u2110","\\mathscr{I}");ge("\u2112","\\mathscr{L}");ge("\u2133","\\mathscr{M}");ge("\u211B","\\mathscr{R}");ge("\u212D","\\mathfrak{C}");ge("\u210C","\\mathfrak{H}");ge("\u2128","\\mathfrak{Z}");ge("\\Bbbk","\\Bbb{k}");ge("\xB7","\\cdotp");ge("\\llap","\\mathllap{\\textrm{#1}}");ge("\\rlap","\\mathrlap{\\textrm{#1}}");ge("\\clap","\\mathclap{\\textrm{#1}}");ge("\\mathstrut","\\vphantom{(}");ge("\\underbar","\\underline{\\text{#1}}");ge("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');ge("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");ge("\\ne","\\neq");ge("\u2260","\\neq");ge("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");ge("\u2209","\\notin");ge("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");ge("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");ge("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");ge("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");ge("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");ge("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");ge("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");ge("\u27C2","\\perp");ge("\u203C","\\mathclose{!\\mkern-0.8mu!}");ge("\u220C","\\notni");ge("\u231C","\\ulcorner");ge("\u231D","\\urcorner");ge("\u231E","\\llcorner");ge("\u231F","\\lrcorner");ge("\xA9","\\copyright");ge("\xAE","\\textregistered");ge("\uFE0F","\\textregistered");ge("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ge("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ge("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ge("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ge("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");ge("\u22EE","\\vdots");ge("\\varGamma","\\mathit{\\Gamma}");ge("\\varDelta","\\mathit{\\Delta}");ge("\\varTheta","\\mathit{\\Theta}");ge("\\varLambda","\\mathit{\\Lambda}");ge("\\varXi","\\mathit{\\Xi}");ge("\\varPi","\\mathit{\\Pi}");ge("\\varSigma","\\mathit{\\Sigma}");ge("\\varUpsilon","\\mathit{\\Upsilon}");ge("\\varPhi","\\mathit{\\Phi}");ge("\\varPsi","\\mathit{\\Psi}");ge("\\varOmega","\\mathit{\\Omega}");ge("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ge("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ge("\\boxed","\\fbox{$\\displaystyle{#1}$}");ge("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ge("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ge("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");joe={",":"\\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"};ge("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in joe?e=joe[r]:(r.slice(0,4)==="\\not"||r in Zn.math&&ir.contains(["bin","rel"],Zn.math[r].group))&&(e="\\dotsb"),e});eF={")":!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};ge("\\dotso",function(t){var e=t.future().text;return e in eF?"\\ldots\\,":"\\ldots"});ge("\\dotsc",function(t){var e=t.future().text;return e in eF&&e!==","?"\\ldots\\,":"\\ldots"});ge("\\cdots",function(t){var e=t.future().text;return e in eF?"\\@cdots\\,":"\\@cdots"});ge("\\dotsb","\\cdots");ge("\\dotsm","\\cdots");ge("\\dotsi","\\!\\cdots");ge("\\dotsx","\\ldots\\,");ge("\\DOTSI","\\relax");ge("\\DOTSB","\\relax");ge("\\DOTSX","\\relax");ge("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ge("\\,","\\tmspace+{3mu}{.1667em}");ge("\\thinspace","\\,");ge("\\>","\\mskip{4mu}");ge("\\:","\\tmspace+{4mu}{.2222em}");ge("\\medspace","\\:");ge("\\;","\\tmspace+{5mu}{.2777em}");ge("\\thickspace","\\;");ge("\\!","\\tmspace-{3mu}{.1667em}");ge("\\negthinspace","\\!");ge("\\negmedspace","\\tmspace-{4mu}{.2222em}");ge("\\negthickspace","\\tmspace-{5mu}{.277em}");ge("\\enspace","\\kern.5em ");ge("\\enskip","\\hskip.5em\\relax");ge("\\quad","\\hskip1em\\relax");ge("\\qquad","\\hskip2em\\relax");ge("\\tag","\\@ifstar\\tag@literal\\tag@paren");ge("\\tag@paren","\\tag@literal{({#1})}");ge("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new vt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ge("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ge("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ge("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ge("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ge("\\newline","\\\\\\relax");ge("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");Vle=wt(Ku["Main-Regular"][84][1]-.7*Ku["Main-Regular"][65][1]);ge("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Vle+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ge("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Vle+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ge("\\hspace","\\@ifstar\\@hspacer\\@hspace");ge("\\@hspace","\\hskip #1\\relax");ge("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ge("\\ordinarycolon",":");ge("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ge("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ge("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ge("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ge("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ge("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ge("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ge("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ge("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ge("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ge("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ge("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ge("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ge("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ge("\u2237","\\dblcolon");ge("\u2239","\\eqcolon");ge("\u2254","\\coloneqq");ge("\u2255","\\eqqcolon");ge("\u2A74","\\Coloneqq");ge("\\ratio","\\vcentcolon");ge("\\coloncolon","\\dblcolon");ge("\\colonequals","\\coloneqq");ge("\\coloncolonequals","\\Coloneqq");ge("\\equalscolon","\\eqqcolon");ge("\\equalscoloncolon","\\Eqqcolon");ge("\\colonminus","\\coloneq");ge("\\coloncolonminus","\\Coloneq");ge("\\minuscolon","\\eqcolon");ge("\\minuscoloncolon","\\Eqcolon");ge("\\coloncolonapprox","\\Colonapprox");ge("\\coloncolonsim","\\Colonsim");ge("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ge("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ge("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ge("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ge("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");ge("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ge("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ge("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ge("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ge("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ge("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ge("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ge("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ge("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");ge("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");ge("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");ge("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");ge("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");ge("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");ge("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");ge("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");ge("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");ge("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");ge("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");ge("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");ge("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");ge("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");ge("\\imath","\\html@mathml{\\@imath}{\u0131}");ge("\\jmath","\\html@mathml{\\@jmath}{\u0237}");ge("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");ge("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");ge("\u27E6","\\llbracket");ge("\u27E7","\\rrbracket");ge("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");ge("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");ge("\u2983","\\lBrace");ge("\u2984","\\rBrace");ge("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");ge("\u29B5","\\minuso");ge("\\darr","\\downarrow");ge("\\dArr","\\Downarrow");ge("\\Darr","\\Downarrow");ge("\\lang","\\langle");ge("\\rang","\\rangle");ge("\\uarr","\\uparrow");ge("\\uArr","\\Uparrow");ge("\\Uarr","\\Uparrow");ge("\\N","\\mathbb{N}");ge("\\R","\\mathbb{R}");ge("\\Z","\\mathbb{Z}");ge("\\alef","\\aleph");ge("\\alefsym","\\aleph");ge("\\Alpha","\\mathrm{A}");ge("\\Beta","\\mathrm{B}");ge("\\bull","\\bullet");ge("\\Chi","\\mathrm{X}");ge("\\clubs","\\clubsuit");ge("\\cnums","\\mathbb{C}");ge("\\Complex","\\mathbb{C}");ge("\\Dagger","\\ddagger");ge("\\diamonds","\\diamondsuit");ge("\\empty","\\emptyset");ge("\\Epsilon","\\mathrm{E}");ge("\\Eta","\\mathrm{H}");ge("\\exist","\\exists");ge("\\harr","\\leftrightarrow");ge("\\hArr","\\Leftrightarrow");ge("\\Harr","\\Leftrightarrow");ge("\\hearts","\\heartsuit");ge("\\image","\\Im");ge("\\infin","\\infty");ge("\\Iota","\\mathrm{I}");ge("\\isin","\\in");ge("\\Kappa","\\mathrm{K}");ge("\\larr","\\leftarrow");ge("\\lArr","\\Leftarrow");ge("\\Larr","\\Leftarrow");ge("\\lrarr","\\leftrightarrow");ge("\\lrArr","\\Leftrightarrow");ge("\\Lrarr","\\Leftrightarrow");ge("\\Mu","\\mathrm{M}");ge("\\natnums","\\mathbb{N}");ge("\\Nu","\\mathrm{N}");ge("\\Omicron","\\mathrm{O}");ge("\\plusmn","\\pm");ge("\\rarr","\\rightarrow");ge("\\rArr","\\Rightarrow");ge("\\Rarr","\\Rightarrow");ge("\\real","\\Re");ge("\\reals","\\mathbb{R}");ge("\\Reals","\\mathbb{R}");ge("\\Rho","\\mathrm{P}");ge("\\sdot","\\cdot");ge("\\sect","\\S");ge("\\spades","\\spadesuit");ge("\\sub","\\subset");ge("\\sube","\\subseteq");ge("\\supe","\\supseteq");ge("\\Tau","\\mathrm{T}");ge("\\thetasym","\\vartheta");ge("\\weierp","\\wp");ge("\\Zeta","\\mathrm{Z}");ge("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ge("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ge("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ge("\\bra","\\mathinner{\\langle{#1}|}");ge("\\ket","\\mathinner{|{#1}\\rangle}");ge("\\braket","\\mathinner{\\langle{#1}\\rangle}");ge("\\Bra","\\left\\langle#1\\right|");ge("\\Ket","\\left|#1\\right\\rangle");Ule=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=f=>d=>{t&&(d.macros.set("|",s),i.length&&d.macros.set("\\|",o));var p=f;if(!f&&i.length){var g=d.future();g.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var u=e.consumeArg().tokens,h=e.expandTokens([...a,...u,...r]);return e.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ge("\\bra@ket",Ule(!1));ge("\\bra@set",Ule(!0));ge("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ge("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ge("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ge("\\angln","{\\angl n}");ge("\\blue","\\textcolor{##6495ed}{#1}");ge("\\orange","\\textcolor{##ffa500}{#1}");ge("\\pink","\\textcolor{##ff00af}{#1}");ge("\\red","\\textcolor{##df0030}{#1}");ge("\\green","\\textcolor{##28ae7b}{#1}");ge("\\gray","\\textcolor{gray}{#1}");ge("\\purple","\\textcolor{##9d38bd}{#1}");ge("\\blueA","\\textcolor{##ccfaff}{#1}");ge("\\blueB","\\textcolor{##80f6ff}{#1}");ge("\\blueC","\\textcolor{##63d9ea}{#1}");ge("\\blueD","\\textcolor{##11accd}{#1}");ge("\\blueE","\\textcolor{##0c7f99}{#1}");ge("\\tealA","\\textcolor{##94fff5}{#1}");ge("\\tealB","\\textcolor{##26edd5}{#1}");ge("\\tealC","\\textcolor{##01d1c1}{#1}");ge("\\tealD","\\textcolor{##01a995}{#1}");ge("\\tealE","\\textcolor{##208170}{#1}");ge("\\greenA","\\textcolor{##b6ffb0}{#1}");ge("\\greenB","\\textcolor{##8af281}{#1}");ge("\\greenC","\\textcolor{##74cf70}{#1}");ge("\\greenD","\\textcolor{##1fab54}{#1}");ge("\\greenE","\\textcolor{##0d923f}{#1}");ge("\\goldA","\\textcolor{##ffd0a9}{#1}");ge("\\goldB","\\textcolor{##ffbb71}{#1}");ge("\\goldC","\\textcolor{##ff9c39}{#1}");ge("\\goldD","\\textcolor{##e07d10}{#1}");ge("\\goldE","\\textcolor{##a75a05}{#1}");ge("\\redA","\\textcolor{##fca9a9}{#1}");ge("\\redB","\\textcolor{##ff8482}{#1}");ge("\\redC","\\textcolor{##f9685d}{#1}");ge("\\redD","\\textcolor{##e84d39}{#1}");ge("\\redE","\\textcolor{##bc2612}{#1}");ge("\\maroonA","\\textcolor{##ffbde0}{#1}");ge("\\maroonB","\\textcolor{##ff92c6}{#1}");ge("\\maroonC","\\textcolor{##ed5fa6}{#1}");ge("\\maroonD","\\textcolor{##ca337c}{#1}");ge("\\maroonE","\\textcolor{##9e034e}{#1}");ge("\\purpleA","\\textcolor{##ddd7ff}{#1}");ge("\\purpleB","\\textcolor{##c6b9fc}{#1}");ge("\\purpleC","\\textcolor{##aa87ff}{#1}");ge("\\purpleD","\\textcolor{##7854ab}{#1}");ge("\\purpleE","\\textcolor{##543b78}{#1}");ge("\\mintA","\\textcolor{##f5f9e8}{#1}");ge("\\mintB","\\textcolor{##edf2df}{#1}");ge("\\mintC","\\textcolor{##e0e5cc}{#1}");ge("\\grayA","\\textcolor{##f6f7f7}{#1}");ge("\\grayB","\\textcolor{##f0f1f2}{#1}");ge("\\grayC","\\textcolor{##e3e5e6}{#1}");ge("\\grayD","\\textcolor{##d6d8da}{#1}");ge("\\grayE","\\textcolor{##babec2}{#1}");ge("\\grayF","\\textcolor{##888d93}{#1}");ge("\\grayG","\\textcolor{##626569}{#1}");ge("\\grayH","\\textcolor{##3b3e40}{#1}");ge("\\grayI","\\textcolor{##21242c}{#1}");ge("\\kaBlue","\\textcolor{##314453}{#1}");ge("\\kaGreen","\\textcolor{##71B307}{#1}");Hle={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},BP=class{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new FP(jJe,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new vC(e,this.settings)}switchMode(e){this.mode=e}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(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Yl("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new vt("Extra }",a)}else if(a.text==="EOF")throw new vt("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",a);if(e&&n)if((s===0||s===1&&e[o]==="{")&&a.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new vt("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new vt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new vt("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new vt("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new vt("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Yl(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var o=new vC(i,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:a};return h}return i}isDefined(e){return this.macros.has(e)||Xd.hasOwnProperty(e)||Zn.math.hasOwnProperty(e)||Zn.text.hasOwnProperty(e)||Hle.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Xd.hasOwnProperty(e)&&!Xd[e].primitive}},Xoe=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,lC=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),CP={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},Koe={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},yC=class t{constructor(e,r){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 BP(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new vt("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Yl("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(t.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&Xd[i.text]&&Xd[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=Zn[this.mode][r].group,l=ul.range(e),u;if(zQe.hasOwnProperty(o)){var h=o;u={type:"atom",mode:this.mode,family:h,loc:l,text:r}}else u={type:o,mode:this.mode,loc:l,text:r};s=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(Qoe(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:ul.range(e),text:r};else return null;if(this.consume(),a)for(var f=0;f{e instanceof Element&&e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Yd.addHook("afterSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}var Jle,Qle,x,sF,Ef,ie,_C,Xl,oF,uv,JJe,lF,rg,zw,cF,ece,tce,nF,Ni,AC,LC,Js,eet,tet,ret,net,iet,$w,aet,set,oet,cet,th,Jd,rce,nce,uet,Er,Bw,het,ng,Mo,ice,cv,Fw,MC,ace,sce,oce,uF,hF,rn,lce,cce,Vw,fet,jle,det,uce,ig,pet,get,fce,Xle,Nr,met,vet,yet,bet,dce,xet,gn,wet,ket,Sf,iF,Tet,Eet,Kle,aF,xa,hv,ep,ct,Cet,_et,mn,jc,SC,Aet,Let,pce,DC,fF,dF,pF,gF,zr,Wr,Xr,Kr,Zr,Cn,vn,Zle,Met,Te,mF,OC,vF,yF,Det,CC,Uw,RC,Oet,Sr=$(()=>{b();Jle=Vi(HS(),1);ql();ql();ql();ql();ql();ql();pP();Qle=Object.defineProperty,x=(t,e)=>Qle(t,"name",{value:e,configurable:!0}),sF=(t,e)=>{for(var r in e)Qle(t,r,{get:e[r],enumerable:!0})},Ef={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},ie={trace:x((...t)=>{},"trace"),debug:x((...t)=>{},"debug"),info:x((...t)=>{},"info"),warn:x((...t)=>{},"warn"),error:x((...t)=>{},"error"),fatal:x((...t)=>{},"fatal")},_C=x(function(t="fatal"){let e=Ef.fatal;typeof t=="string"?t.toLowerCase()in Ef&&(e=Ef[t]):typeof t=="number"&&(e=t),ie.trace=()=>{},ie.debug=()=>{},ie.info=()=>{},ie.warn=()=>{},ie.error=()=>{},ie.fatal=()=>{},e<=Ef.fatal&&(ie.fatal=console.error?console.error.bind(console,Xl("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Xl("FATAL"))),e<=Ef.error&&(ie.error=console.error?console.error.bind(console,Xl("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Xl("ERROR"))),e<=Ef.warn&&(ie.warn=console.warn?console.warn.bind(console,Xl("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Xl("WARN"))),e<=Ef.info&&(ie.info=console.info?console.info.bind(console,Xl("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Xl("INFO"))),e<=Ef.debug&&(ie.debug=console.debug?console.debug.bind(console,Xl("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Xl("DEBUG"))),e<=Ef.trace&&(ie.trace=console.debug?console.debug.bind(console,Xl("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Xl("TRACE")))},"setLogLevel"),Xl=x(t=>`%c${(0,Jle.default)().format("ss.SSS")} : ${t} : `,"format"),oF=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,uv=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,JJe=/\s*%%.*\n/gm,lF=class extends Error{static{x(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},rg={},zw=x(function(t,e){t=t.replace(oF,"").replace(uv,"").replace(JJe,` `);for(let[r,{detector:n}]of Object.entries(rg))if(n(t,e))return r;throw new lF(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),cF=x((...t)=>{for(let{id:e,detector:r,loader:n}of t)ece(e,r,n)},"registerLazyLoadedDiagrams"),ece=x((t,e,r)=>{rg[t]&&ie.warn(`Detector with key ${t} already exists. Overwriting.`),rg[t]={detector:e,loader:r},ie.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),tce=x(t=>rg[t].loader,"getDiagramLoader"),nF=x((t,e,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>nF(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=nF(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),Ni=nF,AC="#ffffff",LC="#f2f2f2",Js=x((t,e)=>e?Ve(t,{s:-40,l:10}):Ve(t,{s:-40,l:-10}),"mkBorder"),eet=class{static{x(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ve(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ve(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Js(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Js(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Js(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||xt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||xt(this.tertiaryColor),this.lineColor=this.lineColor||xt(this.background),this.arrowheadColor=this.arrowheadColor||xt(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?Ut(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||Ut(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||xt(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||It(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ve(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ve(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ve(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ve(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ve(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ve(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ve(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ve(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ve(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},tet=x(t=>{let e=new eet;return e.calculate(t),e},"getThemeVariables"),ret=class{static{x(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=It(this.primaryColor,16),this.tertiaryColor=Ve(this.primaryColor,{h:-160}),this.primaryBorderColor=xt(this.background),this.secondaryBorderColor=Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Js(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.lineColor=xt(this.background),this.textColor=xt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=It(xt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ll(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=Ut("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ut(this.sectionBkgColor,10),this.taskBorderColor=ll(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ll(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=It(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=It(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=It(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=Ve(this.primaryColor,{h:64}),this.fillType3=Ve(this.secondaryColor,{h:64}),this.fillType4=Ve(this.primaryColor,{h:-64}),this.fillType5=Ve(this.secondaryColor,{h:-64}),this.fillType6=Ve(this.primaryColor,{h:128}),this.fillType7=Ve(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||Ve(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ve(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ve(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ve(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ve(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ve(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ve(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ve(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ve(this.primaryColor,{h:330});for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},net=x(t=>{let e=new ret;return e.calculate(t),e},"getThemeVariables"),iet=class{static{x(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Ve(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Ve(this.primaryColor,{h:-160}),this.primaryBorderColor=Js(this.primaryColor,this.darkMode),this.secondaryBorderColor=Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Js(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.lineColor=xt(this.background),this.textColor=xt(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=ll(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ve(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ve(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ve(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ve(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ve(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ve(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ve(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ve(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ve(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ut(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ut(this.tertiaryColor,40);for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},$w=x(t=>{let e=new iet;return e.calculate(t),e},"getThemeVariables"),aet=class{static{x(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=It("#cde498",10),this.primaryBorderColor=Js(this.primaryColor,this.darkMode),this.secondaryBorderColor=Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Js(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.primaryColor),this.lineColor=xt(this.background),this.textColor=xt(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Ut(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||Ve(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ve(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ve(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ve(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ve(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ve(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ve(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ve(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ve(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ut(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ut(this.tertiaryColor,40);for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},set=x(t=>{let e=new aet;return e.calculate(t),e},"getThemeVariables"),oet=class{static{x(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=It(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Ve(this.primaryColor,{h:-160}),this.primaryBorderColor=Js(this.primaryColor,this.darkMode),this.secondaryBorderColor=Js(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Js(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.lineColor=xt(this.background),this.textColor=xt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=It(this.contrast,55),this.border2=this.contrast,this.actorBorder=It(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},cet=x(t=>{let e=new oet;return e.calculate(t),e},"getThemeVariables"),th={base:{getThemeVariables:tet},dark:{getThemeVariables:net},default:{getThemeVariables:$w},forest:{getThemeVariables:set},neutral:{getThemeVariables:cet}},Jd={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},rce={...Jd,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:th.default.getThemeVariables(),sequence:{...Jd.sequence,messageFont:x(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:x(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:x(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Jd.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Jd.c4,useWidth:void 0,personFont:x(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:x(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:x(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:x(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:x(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:x(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:x(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:x(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:x(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:x(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:x(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:x(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:x(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:x(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:x(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:x(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:x(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:x(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:x(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:x(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:x(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:x(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Jd.pie,useWidth:984},xyChart:{...Jd.xyChart,useWidth:void 0},requirement:{...Jd.requirement,useWidth:void 0},packet:{...Jd.packet}},nce=x((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...nce(t[n],"")]:[...r,e+n],[]),"keyify"),uet=new Set(nce(rce,"")),Er=rce,Bw=x(t=>{if(ie.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Bw(e));return}for(let e of Object.keys(t)){if(ie.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!uet.has(e)||t[e]==null){ie.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){ie.debug("sanitizing object",e),Bw(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(ie.debug("sanitizing css option",e),t[e]=het(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}ie.debug("After sanitization",t)}},"sanitizeDirective"),het=x(t=>{let e=0,r=0;for(let n of t){if(e{let r=Ni({},t),n={};for(let i of e)lce(i),n=Ni(n,i);if(r=Ni(r,n),n.theme&&n.theme in th){let i=Ni({},ice),a=Ni(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in th&&(r.themeVariables=th[r.theme].getThemeVariables(a))}return Fw=r,uce(Fw),Fw},"updateCurrentConfig"),ace=x(t=>(Mo=Ni({},ng),Mo=Ni(Mo,t),t.theme&&th[t.theme]&&(Mo.themeVariables=th[t.theme].getThemeVariables(t.themeVariables)),MC(Mo,cv),Mo),"setSiteConfig"),sce=x(t=>{ice=Ni({},t)},"saveConfigFromInitialize"),oce=x(t=>(Mo=Ni(Mo,t),MC(Mo,cv),Mo),"updateSiteConfig"),uF=x(()=>Ni({},Mo),"getSiteConfig"),hF=x(t=>(uce(t),Ni(Fw,t),rn()),"setConfig"),rn=x(()=>Ni({},Fw),"getConfig"),lce=x(t=>{t&&(["secure",...Mo.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(ie.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&lce(t[e])}))},"sanitize"),cce=x(t=>{Bw(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),cv.push(t),MC(Mo,cv)},"addDirective"),Vw=x((t=Mo)=>{cv=[],MC(t,cv)},"reset"),fet={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},jle={},det=x(t=>{jle[t]||(ie.warn(fet[t]),jle[t]=!0)},"issueWarning"),uce=x(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&det("LAZY_LOAD_DEPRECATED")},"checkConfig"),ig=//gi,pet=x(t=>t?dce(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),get=(()=>{let t=!1;return()=>{t||(hce(),t=!0)}})();x(hce,"setupDompurifyHooks");fce=x(t=>(get(),Yd.sanitize(t)),"removeScript"),Xle=x((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=fce(t):r!=="loose"&&(t=dce(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=bet(t))}return t},"sanitizeMore"),Nr=x((t,e)=>t&&(e.dompurifyConfig?t=Yd.sanitize(Xle(t,e),e.dompurifyConfig).toString():t=Yd.sanitize(Xle(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),met=x((t,e)=>typeof t=="string"?Nr(t,e):t.flat().map(r=>Nr(r,e)),"sanitizeTextOrArray"),vet=x(t=>ig.test(t),"hasBreaks"),yet=x(t=>t.split(ig),"splitBreaks"),bet=x(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),dce=x(t=>t.replace(ig,"#br#"),"breakToPlaceholder"),xet=x(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),gn=x(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),wet=x(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),ket=x(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),Sf=x(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,t.split(e).length-1),"countOccurrence"),Tet=x((t,e)=>{let r=iF(t,"~"),n=iF(e,"~");return r===1&&n===1},"shouldCombineSets"),Eet=x(t=>{let e=iF(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Kle=x(()=>window.MathMLElement!==void 0,"isMathMLSupported"),aF=/\$\$(.*)\$\$/g,xa=x(t=>(t.match(aF)?.length??0)>0,"hasKatex"),hv=x(async(t,e)=>{t=await ep(t,e);let r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),ep=x(async(t,e)=>{if(!xa(t))return t;if(!(Kle()||e.legacyMathML||e.forceLegacyMathML))return t.replace(aF,"MathML is unsupported in this environment.");let{default:r}=await Promise.resolve().then(()=>(Yle(),Gle)),n=e.forceLegacyMathML||!Kle()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ig).map(i=>xa(i)?`
${i}
`:`
${i}
`).join("").replace(aF,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),ct={getRows:pet,sanitizeText:Nr,sanitizeTextOrArray:met,hasBreaks:vet,splitBreaks:yet,lineBreakRegex:ig,removeScript:fce,getUrl:xet,evaluate:gn,getMax:wet,getMin:ket},Cet=x(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),_et=x(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),mn=x(function(t,e,r,n){let i=_et(e,r,n);Cet(t,i)},"configureSvgSize"),jc=x(function(t,e,r,n){let i=e.node().getBBox(),a=i.width,s=i.height;ie.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;ie.info(`Graph bounds: ${o}x${l}`,t),o=a+r*2,l=s+r*2,ie.info(`Calculated bounds: ${o}x${l}`),mn(e,l,o,n);let u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)},"setupGraphViewbox"),SC={},Aet=x((t,e,r)=>{let n="";return t in SC&&SC[t]?n=SC[t](r):ie.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${n} ${e} `},"getStyles"),Let=x((t,e)=>{e!==void 0&&(SC[t]=e)},"addStylesForDiagram"),pce=Aet,DC={};sF(DC,{clear:()=>zr,getAccDescription:()=>Zr,getAccTitle:()=>Xr,getDiagramTitle:()=>vn,setAccDescription:()=>Kr,setAccTitle:()=>Wr,setDiagramTitle:()=>Cn});fF="",dF="",pF="",gF=x(t=>Nr(t,rn()),"sanitizeText"),zr=x(()=>{fF="",pF="",dF=""},"clear"),Wr=x(t=>{fF=gF(t).replace(/^\s+/g,"")},"setAccTitle"),Xr=x(()=>fF,"getAccTitle"),Kr=x(t=>{pF=gF(t).replace(/\n\s+/g,` `)},"setAccDescription"),Zr=x(()=>pF,"getAccDescription"),Cn=x(t=>{dF=gF(t)},"setDiagramTitle"),vn=x(()=>dF,"getDiagramTitle"),Zle=ie,Met=_C,Te=rn,mF=hF,OC=ng,vF=x(t=>Nr(t,Te()),"sanitizeText"),yF=jc,Det=x(()=>DC,"getCommonDb"),CC={},Uw=x((t,e,r)=>{CC[t]&&Zle.warn(`Diagram with id ${t} already registered. Overwriting.`),CC[t]=e,r&&ece(t,r),Let(t,e.styles),e.injectUtils?.(Zle,Met,Te,vF,yF,Det(),()=>{})},"registerDiagram"),RC=x(t=>{if(t in CC)return CC[t];throw new Oet(t)},"getDiagram"),Oet=class extends Error{static{x(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}});function NF(t){return typeof t>"u"||t===null}function vce(t){return typeof t=="object"&&t!==null}function yce(t){return Array.isArray(t)?t:NF(t)?[]:[t]}function bce(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;ro&&(a=" ... ",e=n-o+a.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+s,pos:n-e+a.length}}function NC(t,e){return wa.repeat(" ",e-t.length)+t}function kce(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,s=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",l,u,h=Math.min(t.line+e.linesAfter,i.length).toString().length,f=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(s-l<0);l++)u=IC(t.buffer,n[s-l],i[s-l],t.position-(n[s]-n[s-l]),f),o=wa.repeat(" ",e.indent)+NC((t.line-l+1).toString(),h)+" | "+u.str+` `+o;for(u=IC(t.buffer,n[s],i[s],t.position,f),o+=wa.repeat(" ",e.indent)+NC((t.line+1).toString(),h)+" | "+u.str+` `,o+=wa.repeat("-",e.indent+h+3+u.pos)+`^ `,l=1;l<=e.linesAfter&&!(s+l>=i.length);l++)u=IC(t.buffer,n[s+l],i[s+l],t.position-(n[s]-n[s+l]),f),o+=wa.repeat(" ",e.indent)+NC((t.line+l+1).toString(),h)+" | "+u.str+` `;return o.replace(/\n$/,"")}function Tce(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function Ece(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if($et.indexOf(r)===-1)throw new Do('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Tce(e.styleAliases||null),Vet.indexOf(this.kind)===-1)throw new Do('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function xF(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s)}),r[i]=n}),r}function Sce(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(x(n,"collectType"),e=0,r=arguments.length;e=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}function $ce(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(wa.isNegativeZero(t))return"-0.0";return r=t.toString(10),Zet.test(r)?r.replace("e",".e"):r}function Vce(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||wa.isNegativeZero(t))}function Wce(t){return t===null?!1:Hce.exec(t)!==null||qce.exec(t)!==null}function Gce(t){var e,r,n,i,a,s,o,l=0,u=null,h,f,d;if(e=Hce.exec(t),e===null&&(e=qce.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],f=+(e[11]||0),u=(h*60+f)*6e4,e[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,i,a,s,o,l)),u&&d.setTime(d.getTime()-u),d}function Yce(t){return t.toISOString()}function jce(t){return t==="<<"||t===null}function Xce(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=FF;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}function Kce(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=FF,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}function Zce(t){var e="",r=0,n,i,a=t.length,s=FF;for(n=0;n>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):i===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):i===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}function Qce(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function Jce(t){if(t===null)return!0;var e=[],r,n,i,a,s,o=t;for(r=0,n=o.length;r>10)+55296,(t-65536&1023)+56320)}function mue(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||aue,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function BF(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=zet(r),new Do(e,r)}function Jt(t,e){throw BF(t,e)}function Hw(t,e){t.onWarning&&t.onWarning.call(null,BF(t,e))}function Cf(t,e,r,n){var i,a,s,o;if(e1&&(t.result+=wa.repeat(` `,e-1))}function vue(t,e,r){var n,i,a,s,o,l,u,h,f=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),eo(p)||sg(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),eo(i)||r&&sg(i)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,o=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),eo(i)||r&&sg(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),eo(n))break}else{if(t.position===t.lineStart&&Yw(t)||r&&sg(p))break;if(Xc(p))if(l=t.line,u=t.lineStart,h=t.lineIndent,ea(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=u,t.lineIndent=h;break}}o&&(Cf(t,a,s,!1),HC(t,t.line-l),a=s=t.position,o=!1),tp(p)||(s=t.position+1),p=t.input.charCodeAt(++t.position)}return Cf(t,a,s,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function yue(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Cf(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Xc(r)?(Cf(t,n,i,!0),HC(t,ea(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Yw(t)?Jt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Jt(t,"unexpected end of the stream within a single quoted scalar")}function bue(t,e){var r,n,i,a,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return Cf(t,r,t.position,!0),t.position++,!0;if(o===92){if(Cf(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Xc(o))ea(t,!1,e);else if(o<256&&pue[o])t.result+=gue[o],t.position++;else if((s=hue(o))>0){for(i=s,a=0;i>0;i--)o=t.input.charCodeAt(++t.position),(s=uue(o))>=0?a=(a<<4)+s:Jt(t,"expected hexadecimal character");t.result+=due(a),t.position++}else Jt(t,"unknown escape sequence");r=n=t.position}else Xc(o)?(Cf(t,r,n,!0),HC(t,ea(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Yw(t)?Jt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Jt(t,"unexpected end of the stream within a double quoted scalar")}function xue(t,e){var r=!0,n,i,a,s=t.tag,o,l=t.anchor,u,h,f,d,p,g=Object.create(null),m,v,y,w;if(w=t.input.charCodeAt(t.position),w===91)h=93,p=!1,o=[];else if(w===123)h=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),w=t.input.charCodeAt(++t.position);w!==0;){if(ea(t,!0,e),w=t.input.charCodeAt(t.position),w===h)return t.position++,t.tag=s,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;r?w===44&&Jt(t,"expected the node content, but found ','"):Jt(t,"missed comma between flow collection entries"),v=m=y=null,f=d=!1,w===63&&(u=t.input.charCodeAt(t.position+1),eo(u)&&(f=d=!0,t.position++,ea(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,lg(t,e,FC,!1,!0),v=t.tag,m=t.result,ea(t,!0,e),w=t.input.charCodeAt(t.position),(d||t.line===n)&&w===58&&(f=!0,w=t.input.charCodeAt(++t.position),ea(t,!0,e),lg(t,e,FC,!1,!0),y=t.result),p?og(t,o,g,v,m,y,n,i,a):f?o.push(og(t,null,g,v,m,y,n,i,a)):o.push(m),ea(t,!0,e),w=t.input.charCodeAt(t.position),w===44?(r=!0,w=t.input.charCodeAt(++t.position)):r=!1}Jt(t,"unexpected end of the stream within a flow collection")}function wue(t,e){var r,n,i=bF,a=!1,s=!1,o=e,l=0,u=!1,h,f;if(f=t.input.charCodeAt(t.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)bF===i?i=f===43?gce:utt:Jt(t,"repeat of a chomping mode identifier");else if((h=fue(f))>=0)h===0?Jt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Jt(t,"repeat of an indentation width identifier"):(o=e+h-1,s=!0);else break;if(tp(f)){do f=t.input.charCodeAt(++t.position);while(tp(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Xc(f)&&f!==0)}for(;f!==0;){for(UC(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndento&&(o=t.lineIndent),Xc(f)){l++;continue}if(t.lineIndente)&&l!==0)Jt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(v&&(s=t.line,o=t.lineStart,l=t.position),lg(t,e,BC,!0,i)&&(v?g=t.result:m=t.result),v||(og(t,f,d,p,g,m,s,o,l),p=g=m=null),ea(t,!0,-1),w=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&w!==0)Jt(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f"),t.result!==null&&g.kind!==t.kind&&Jt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Jt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function Cue(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(ea(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!eo(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Jt(t,"directive name must not be less than one character in length");s!==0;){for(;tp(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Xc(s));break}if(Xc(s))break;for(r=t.position;s!==0&&!eo(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}s!==0&&UC(t),rp.call(mce,n)?mce[n](t,n,i):Hw(t,'unknown document directive "'+n+'"')}if(ea(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,ea(t,!0,-1)):a&&Jt(t,"directives end mark is expected"),lg(t,t.lineIndent-1,BC,!1,!0),ea(t,!0,-1),t.checkLineBreaks&&ftt.test(t.input.slice(e,t.position))&&Hw(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Yw(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,ea(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=zF(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function VF(t){var e=/^\n* /;return e.test(t)}function Gue(t,e,r,n,i,a,s,o){var l,u=0,h=null,f=!1,d=!1,p=n!==-1,g=-1,m=Vue(dv(t,0))&&Uue(dv(t,t.length-1));if(e||s)for(l=0;l=65536?l+=2:l++){if(u=dv(t,l),!gv(u))return fv;m=m&&AF(u,h,o),h=u}else{for(l=0;l=65536?l+=2:l++){if(u=dv(t,l),u===qw)f=!0,p&&(d=d||l-g-1>n&&t[g+1]!==" ",g=l);else if(!gv(u))return fv;m=m&&AF(u,h,o),h=u}d=d||p&&l-g-1>n&&t[g+1]!==" "}return!f&&!d?m&&!s&&!i(t)?Hue:a===Ww?fv:LF:r>9&&VF(t)?fv:s?a===Ww?fv:LF:d?Wue:que}function Yue(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===Ww?'""':"''";if(!t.noCompatMode&&(Ott.indexOf(e)!==-1||Rtt.test(e)))return t.quotingType===Ww?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),o=n||t.flowLevel>-1&&r>=t.flowLevel;function l(u){return $ue(t,u)}switch(x(l,"testAmbiguity"),Gue(e,o,t.indent,s,l,t.quotingType,t.forceQuotes&&!n,i)){case Hue:return e;case LF:return"'"+e.replace(/'/g,"''")+"'";case que:return"|"+MF(e,t.indent)+DF(CF(e,a));case Wue:return">"+MF(e,t.indent)+DF(CF(jue(e,s),a));case fv:return'"'+Xue(e)+'"';default:throw new Do("impossible error: invalid scalar style")}}()}function MF(t,e){var r=VF(t)?String(e):"",n=t[t.length-1]===` `,i=n&&(t[t.length-2]===` `||t===` `),a=i?"+":n?"":"-";return r+a+` `}function DF(t){return t[t.length-1]===` `?t.slice(0,-1):t}function jue(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var u=t.indexOf(` `);return u=u!==-1?u:t.length,r.lastIndex=u,OF(t.slice(0,u),e)}(),i=t[0]===` `||t[0]===" ",a,s;s=r.exec(t);){var o=s[1],l=s[2];a=l[0]===" ",n+=o+(!i&&!a&&l!==""?` `:"")+OF(l,e),i=a}return n}function OF(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,s=0,o=0,l="";n=r.exec(t);)o=n.index,o-i>e&&(a=s>i?s:o,l+=` `+t.slice(i,a),i=a+1),s=o;return l+=` `,t.length-i>e&&s>i?l+=t.slice(i,s)+` `+t.slice(s+1):l+=t.slice(i),l.slice(1)}function Xue(t){for(var e="",r=0,n,i=0;i=65536?i+=2:i++)r=dv(t,i),n=Ms[r],!n&&gv(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||Bue(r);return e}function Kue(t,e,r){var n="",i=t.tag,a,s,o;for(a=0,s=r.length;a"u"&&rh(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function RF(t,e,r,n){var i="",a=t.tag,s,o,l;for(s=0,o=r.length;s"u"&&rh(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=$C(t,e)),t.dump&&qw===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}function Zue(t,e,r){var n="",i=t.tag,a=Object.keys(r),s,o,l,u,h;for(s=0,o=a.length;s1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),rh(t,e,u,!1,!1)&&(h+=t.dump,n+=h));t.tag=i,t.dump="{"+n+"}"}function Que(t,e,r,n){var i="",a=t.tag,s=Object.keys(r),o,l,u,h,f,d;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Do("sortKeys must be a boolean or a function");for(o=0,l=s.length;o1024,f&&(t.dump&&qw===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,f&&(d+=$C(t,e)),rh(t,e+1,h,!0,f)&&(t.dump&&qw===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=a,t.dump=i||"{}"}function IF(t,e,r){var n,i,a,s,o,l;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;a tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function rh(t,e,r,n,i,a,s){t.tag=null,t.dump=r,IF(t,r,!1)||IF(t,r,!0);var o=Mue.call(t.dump),l=n,u;n&&(n=t.flowLevel<0||t.flowLevel>e);var h=o==="[object Object]"||o==="[object Array]",f,d;if(h&&(f=t.duplicates.indexOf(r),d=f!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(i=!1),d&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(h&&d&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(Que(t,e,t.dump,i),d&&(t.dump="&ref_"+f+t.dump)):(Zue(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?RF(t,e-1,t.dump,i):RF(t,e,t.dump,i),d&&(t.dump="&ref_"+f+t.dump)):(Kue(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&Yue(t,t.dump,e,a,l);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Do("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",t.dump=u+" "+t.dump)}return!0}function Jue(t,e){var r=[],n=[],i,a;for(VC(t,r,n),i=0,a=n.length;i{b();Sr();x(NF,"isNothing");x(vce,"isObject");x(yce,"toArray");x(bce,"extend");x(xce,"repeat");x(wce,"isNegativeZero");Ret=NF,Iet=vce,Net=yce,Pet=xce,Fet=wce,Bet=bce,wa={isNothing:Ret,isObject:Iet,toArray:Net,repeat:Pet,isNegativeZero:Fet,extend:Bet};x(PF,"formatError");x(pv,"YAMLException$1");pv.prototype=Object.create(Error.prototype);pv.prototype.constructor=pv;pv.prototype.toString=x(function(e){return this.name+": "+PF(this,e)},"toString");Do=pv;x(IC,"getLine");x(NC,"padStart");x(kce,"makeSnippet");zet=kce,$et=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Vet=["scalar","sequence","mapping"];x(Tce,"compileStyleAliases");x(Ece,"Type$1");Ls=Ece;x(xF,"compileList");x(Sce,"compileMap");x(PC,"Schema$1");PC.prototype.extend=x(function(e){var r=[],n=[];if(e instanceof Ls)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Do("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Ls))throw new Do("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Do("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Do("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Ls))throw new Do("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(PC.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=xF(i,"implicit"),i.compiledExplicit=xF(i,"explicit"),i.compiledTypeMap=Sce(i.compiledImplicit,i.compiledExplicit),i},"extend");Uet=PC,Het=new Ls("tag:yaml.org,2002:str",{kind:"scalar",construct:x(function(t){return t!==null?t:""},"construct")}),qet=new Ls("tag:yaml.org,2002:seq",{kind:"sequence",construct:x(function(t){return t!==null?t:[]},"construct")}),Wet=new Ls("tag:yaml.org,2002:map",{kind:"mapping",construct:x(function(t){return t!==null?t:{}},"construct")}),Get=new Uet({explicit:[Het,qet,Wet]});x(Cce,"resolveYamlNull");x(_ce,"constructYamlNull");x(Ace,"isNull");Yet=new Ls("tag:yaml.org,2002:null",{kind:"scalar",resolve:Cce,construct:_ce,predicate:Ace,represent:{canonical:x(function(){return"~"},"canonical"),lowercase:x(function(){return"null"},"lowercase"),uppercase:x(function(){return"NULL"},"uppercase"),camelcase:x(function(){return"Null"},"camelcase"),empty:x(function(){return""},"empty")},defaultStyle:"lowercase"});x(Lce,"resolveYamlBoolean");x(Mce,"constructYamlBoolean");x(Dce,"isBoolean");jet=new Ls("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Lce,construct:Mce,predicate:Dce,represent:{lowercase:x(function(t){return t?"true":"false"},"lowercase"),uppercase:x(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:x(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});x(Oce,"isHexCode");x(Rce,"isOctCode");x(Ice,"isDecCode");x(Nce,"resolveYamlInteger");x(Pce,"constructYamlInteger");x(Fce,"isInteger");Xet=new Ls("tag:yaml.org,2002:int",{kind:"scalar",resolve:Nce,construct:Pce,predicate:Fce,represent:{binary:x(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:x(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:x(function(t){return t.toString(10)},"decimal"),hexadecimal:x(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ket=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");x(Bce,"resolveYamlFloat");x(zce,"constructYamlFloat");Zet=/^[-+]?[0-9]+e/;x($ce,"representYamlFloat");x(Vce,"isFloat");Qet=new Ls("tag:yaml.org,2002:float",{kind:"scalar",resolve:Bce,construct:zce,predicate:Vce,represent:$ce,defaultStyle:"lowercase"}),Uce=Get.extend({implicit:[Yet,jet,Xet,Qet]}),Jet=Uce,Hce=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),qce=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]))?))?$");x(Wce,"resolveYamlTimestamp");x(Gce,"constructYamlTimestamp");x(Yce,"representYamlTimestamp");ett=new Ls("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Wce,construct:Gce,instanceOf:Date,represent:Yce});x(jce,"resolveYamlMerge");ttt=new Ls("tag:yaml.org,2002:merge",{kind:"scalar",resolve:jce}),FF=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;x(Xce,"resolveYamlBinary");x(Kce,"constructYamlBinary");x(Zce,"representYamlBinary");x(Qce,"isBinary");rtt=new Ls("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Xce,construct:Kce,predicate:Qce,represent:Zce}),ntt=Object.prototype.hasOwnProperty,itt=Object.prototype.toString;x(Jce,"resolveYamlOmap");x(eue,"constructYamlOmap");att=new Ls("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Jce,construct:eue}),stt=Object.prototype.toString;x(tue,"resolveYamlPairs");x(rue,"constructYamlPairs");ott=new Ls("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:tue,construct:rue}),ltt=Object.prototype.hasOwnProperty;x(nue,"resolveYamlSet");x(iue,"constructYamlSet");ctt=new Ls("tag:yaml.org,2002:set",{kind:"mapping",resolve:nue,construct:iue}),aue=Jet.extend({implicit:[ett,ttt],explicit:[rtt,att,ott,ctt]}),rp=Object.prototype.hasOwnProperty,FC=1,sue=2,oue=3,BC=4,bF=1,utt=2,gce=3,htt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ftt=/[\x85\u2028\u2029]/,dtt=/[,\[\]\{\}]/,lue=/^(?:!|!!|![a-z\-]+!)$/i,cue=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;x(wF,"_class");x(Xc,"is_EOL");x(tp,"is_WHITE_SPACE");x(eo,"is_WS_OR_EOL");x(sg,"is_FLOW_INDICATOR");x(uue,"fromHexCode");x(hue,"escapedHexLen");x(fue,"fromDecimalCode");x(kF,"simpleEscapeSequence");x(due,"charFromCodepoint");pue=new Array(256),gue=new Array(256);for(ag=0;ag<256;ag++)pue[ag]=kF(ag)?1:0,gue[ag]=kF(ag);x(mue,"State$1");x(BF,"generateError");x(Jt,"throwError");x(Hw,"throwWarning");mce={YAML:x(function(e,r,n){var i,a,s;e.version!==null&&Jt(e,"duplication of %YAML directive"),n.length!==1&&Jt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Jt(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&Jt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&Hw(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:x(function(e,r,n){var i,a;n.length!==2&&Jt(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],lue.test(i)||Jt(e,"ill-formed tag handle (first argument) of the TAG directive"),rp.call(e.tagMap,i)&&Jt(e,'there is a previously declared suffix for "'+i+'" tag handle'),cue.test(a)||Jt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Jt(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};x(Cf,"captureSegment");x(TF,"mergeMappings");x(og,"storeMappingPair");x(UC,"readLineBreak");x(ea,"skipSeparationSpace");x(Yw,"testDocumentSeparator");x(HC,"writeFoldedLines");x(vue,"readPlainScalar");x(yue,"readSingleQuotedScalar");x(bue,"readDoubleQuotedScalar");x(xue,"readFlowCollection");x(wue,"readBlockScalar");x(EF,"readBlockSequence");x(kue,"readBlockMapping");x(Tue,"readTagProperty");x(Eue,"readAnchorProperty");x(Sue,"readAlias");x(lg,"composeNode");x(Cue,"readDocument");x(zF,"loadDocuments");x(_ue,"loadAll$1");x(Aue,"load$1");ptt=_ue,gtt=Aue,Lue={loadAll:ptt,load:gtt},Mue=Object.prototype.toString,Due=Object.prototype.hasOwnProperty,$F=65279,mtt=9,qw=10,vtt=13,ytt=32,btt=33,xtt=34,SF=35,wtt=37,ktt=38,Ttt=39,Ett=42,Oue=44,Stt=45,zC=58,Ctt=61,_tt=62,Att=63,Ltt=64,Rue=91,Iue=93,Mtt=96,Nue=123,Dtt=124,Pue=125,Ms={};Ms[0]="\\0";Ms[7]="\\a";Ms[8]="\\b";Ms[9]="\\t";Ms[10]="\\n";Ms[11]="\\v";Ms[12]="\\f";Ms[13]="\\r";Ms[27]="\\e";Ms[34]='\\"';Ms[92]="\\\\";Ms[133]="\\N";Ms[160]="\\_";Ms[8232]="\\L";Ms[8233]="\\P";Ott=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Rtt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;x(Fue,"compileStyleMap");x(Bue,"encodeHex");Itt=1,Ww=2;x(zue,"State");x(CF,"indentString");x($C,"generateNextLine");x($ue,"testImplicitResolving");x(Gw,"isWhitespace");x(gv,"isPrintable");x(_F,"isNsCharOrWhitespace");x(AF,"isPlainSafe");x(Vue,"isPlainSafeFirst");x(Uue,"isPlainSafeLast");x(dv,"codePointAt");x(VF,"needIndentIndicator");Hue=1,LF=2,que=3,Wue=4,fv=5;x(Gue,"chooseScalarStyle");x(Yue,"writeScalar");x(MF,"blockHeader");x(DF,"dropEndingNewline");x(jue,"foldString");x(OF,"foldLine");x(Xue,"escapeString");x(Kue,"writeFlowSequence");x(RF,"writeBlockSequence");x(Zue,"writeFlowMapping");x(Que,"writeBlockMapping");x(IF,"detectType");x(rh,"writeNode");x(Jue,"getDuplicateReferences");x(VC,"inspectNode");x(ehe,"dump$1");Ntt=ehe,Ptt={dump:Ntt};x(qC,"renamed");mv=Uce,vv=Lue.load,ZWt=Lue.loadAll,QWt=Ptt.dump,JWt=qC("safeLoad","load"),eGt=qC("safeLoadAll","loadAll"),tGt=qC("safeDump","dump");});var Ftt,yv,UF,the,GC=$(()=>{b();Ftt=Object.freeze({left:0,top:0,width:16,height:16}),yv=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),UF=Object.freeze({...Ftt,...yv}),the=Object.freeze({...UF,body:"",hidden:!1})});var Btt,rhe,nhe=$(()=>{b();GC();Btt=Object.freeze({width:null,height:null}),rhe=Object.freeze({...Btt,...yv})});var HF,YC,ihe=$(()=>{b();HF=(t,e,r,n="")=>{let i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let o=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:n,prefix:l,name:o};return e&&!YC(u)?null:u}let a=i[0],s=a.split("-");if(s.length>1){let o={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!YC(o)?null:o}if(r&&n===""){let o={provider:n,prefix:"",name:a};return e&&!YC(o,r)?null:o}return null},YC=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1});function ahe(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}var she=$(()=>{b()});function qF(t,e){let r=ahe(t,e);for(let n in the)n in yv?n in t&&!(n in r)&&(r[n]=yv[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}var ohe=$(()=>{b();GC();she()});function lhe(t,e){let r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;let o=n[s]&&n[s].parent,l=o&&a(o);l&&(i[s]=[o].concat(l))}return i[s]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i}var che=$(()=>{b()});function uhe(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(o){a=qF(n[o]||i[o],a)}return s(e),r.forEach(s),qF(t,a)}function WF(t,e){if(t.icons[e])return uhe(t,e,[]);let r=lhe(t,[e])[e];return r?uhe(t,e,r):null}var hhe=$(()=>{b();ohe();che()});function GF(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let n=t.split(ztt);if(n===null||!n.length)return t;let i=[],a=n.shift(),s=$tt.test(a);for(;;){if(s){let o=parseFloat(a);isNaN(o)?i.push(a):i.push(Math.ceil(o*e*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}var ztt,$tt,fhe=$(()=>{b();ztt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$tt=/^-?[0-9.]*[0-9]+[0-9.]*$/g});function Vtt(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let i=t.indexOf(">",n),a=t.indexOf("",a);if(s===-1)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function Utt(t,e){return t?""+t+""+e:e}function dhe(t,e,r){let n=Vtt(t);return Utt(n.defs,e+n.content+r)}var phe=$(()=>{b()});function YF(t,e){let r={...UF,...t},n={...rhe,...e},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(m=>{let v=[],y=m.hFlip,w=m.vFlip,k=m.rotate;y?w?k+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):w&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let E;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:E=i.height/2+i.top,v.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:E=i.width/2+i.left,v.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}k%2===1&&(i.left!==i.top&&(E=i.left,i.left=i.top,i.top=E),i.width!==i.height&&(E=i.width,i.width=i.height,i.height=E)),v.length&&(a=dhe(a,'',""))});let s=n.width,o=n.height,l=i.width,u=i.height,h,f;s===null?(f=o===null?"1em":o==="auto"?u:o,h=GF(f,l/u)):(h=s==="auto"?l:s,f=o===null?GF(h,u/l):o==="auto"?u:o);let d={},p=(m,v)=>{Htt(v)||(d[m]=v.toString())};p("width",h),p("height",f);let g=[i.left,i.top,l,u];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}var Htt,ghe=$(()=>{b();GC();nhe();fhe();phe();Htt=t=>t==="unset"||t==="undefined"||t==="none"});function jF(t,e=Wtt){let r=[],n;for(;n=qtt.exec(t);)r.push(n[1]);if(!r.length)return t;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let s=typeof e=="function"?e(a):e+(Gtt++).toString(),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}var qtt,Wtt,Gtt,mhe=$(()=>{b();qtt=/\sid="(\S+)"/g,Wtt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),Gtt=0});function XF(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}var vhe=$(()=>{b()});var bhe=Ke((FGt,yhe)=>{b();var bv=1e3,xv=bv*60,wv=xv*60,cg=wv*24,Ytt=cg*7,jtt=cg*365.25;yhe.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Xtt(t);if(r==="number"&&isFinite(t))return e.long?Ztt(t):Ktt(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Xtt(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*jtt;case"weeks":case"week":case"w":return r*Ytt;case"days":case"day":case"d":return r*cg;case"hours":case"hour":case"hrs":case"hr":case"h":return r*wv;case"minutes":case"minute":case"mins":case"min":case"m":return r*xv;case"seconds":case"second":case"secs":case"sec":case"s":return r*bv;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ktt(t){var e=Math.abs(t);return e>=cg?Math.round(t/cg)+"d":e>=wv?Math.round(t/wv)+"h":e>=xv?Math.round(t/xv)+"m":e>=bv?Math.round(t/bv)+"s":t+"ms"}function Ztt(t){var e=Math.abs(t);return e>=cg?jC(t,e,cg,"day"):e>=wv?jC(t,e,wv,"hour"):e>=xv?jC(t,e,xv,"minute"):e>=bv?jC(t,e,bv,"second"):t+" ms"}function jC(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var whe=Ke((zGt,xhe)=>{b();function Qtt(t){r.debug=r,r.default=r,r.coerce=l,r.disable=s,r.enable=i,r.enabled=o,r.humanize=bhe(),r.destroy=u,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function e(h){let f=0;for(let d=0;d{if(S==="%%")return"%";E++;let _=r.formatters[L];if(typeof _=="function"){let M=v[E];S=_.call(y,M),v.splice(E,1),E--}return S}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return m.namespace=h,m.useColors=r.useColors(),m.color=r.selectColor(h),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,g=r.enabled(h)),g),set:v=>{d=v}}),typeof r.init=="function"&&r.init(m),m}function n(h,f){let d=r(this.namespace+(typeof f>"u"?":":f)+h);return d.log=this.log,d}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let f=(typeof h=="string"?h:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function a(h,f){let d=0,p=0,g=-1,m=0;for(;d"-"+f)].join(",");return r.enable(""),h}function o(h){for(let f of r.skips)if(a(h,f))return!1;for(let f of r.names)if(a(h,f))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}xhe.exports=Qtt});var khe=Ke((fl,XC)=>{b();fl.formatArgs=ert;fl.save=trt;fl.load=rrt;fl.useColors=Jtt;fl.storage=nrt();fl.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();fl.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Jtt(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ert(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+XC.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}fl.log=console.debug||console.log||(()=>{});function trt(t){try{t?fl.storage.setItem("debug",t):fl.storage.removeItem("debug")}catch{}}function rrt(){let t;try{t=fl.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function nrt(){try{return localStorage}catch{}}XC.exports=whe()(fl);var{formatters:irt}=XC.exports;irt.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var HGt,The=$(()=>{b();ihe();hhe();ghe();mhe();vhe();HGt=Vi(khe(),1)});var ZF,KF,Ehe,KC,art,_f,Kc=$(()=>{b();Sr();The();ZF={body:'?',height:80,width:80},KF=new Map,Ehe=new Map,KC=x(t=>{for(let e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(ie.debug("Registering icon pack:",e.name),"loader"in e)Ehe.set(e.name,e.loader);else if("icons"in e)KF.set(e.name,e.icons);else throw ie.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),art=x(async(t,e)=>{let r=HF(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=KF.get(n);if(!i){let s=Ehe.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},KF.set(n,i)}catch(o){throw ie.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=WF(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),_f=x(async(t,e)=>{let r;try{r=await art(t,e?.fallbackPrefix)}catch(a){ie.error(a),r=ZF}let n=YF(r,e);return XF(jF(n.body),n.attributes)},"getIconSVG")});var Af,Kl=$(()=>{b();Sr();Af=x(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var She=Ke(Va=>{"use strict";b();Object.defineProperty(Va,"__esModule",{value:!0});Va.BLANK_URL=Va.relativeFirstCharacters=Va.whitespaceEscapeCharsRegex=Va.urlSchemeRegex=Va.ctrlCharactersRegex=Va.htmlCtrlEntityRegex=Va.htmlEntitiesRegex=Va.invalidProtocolRegex=void 0;Va.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Va.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Va.htmlCtrlEntityRegex=/&(newline|tab);/gi;Va.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Va.urlSchemeRegex=/^.+(:|:)/gim;Va.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Va.relativeFirstCharacters=[".","/"];Va.BLANK_URL="about:blank"});var kv=Ke(ZC=>{"use strict";b();Object.defineProperty(ZC,"__esModule",{value:!0});ZC.sanitizeUrl=void 0;var Ds=She();function srt(t){return Ds.relativeFirstCharacters.indexOf(t[0])>-1}function ort(t){var e=t.replace(Ds.ctrlCharactersRegex,"");return e.replace(Ds.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}function lrt(t){return URL.canParse(t)}function Che(t){try{return decodeURIComponent(t)}catch{return t}}function crt(t){if(!t)return Ds.BLANK_URL;var e,r=Che(t.trim());do r=ort(r).replace(Ds.htmlCtrlEntityRegex,"").replace(Ds.ctrlCharactersRegex,"").replace(Ds.whitespaceEscapeCharsRegex,"").trim(),r=Che(r),e=r.match(Ds.ctrlCharactersRegex)||r.match(Ds.htmlEntitiesRegex)||r.match(Ds.htmlCtrlEntityRegex)||r.match(Ds.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Ds.BLANK_URL;if(srt(n))return n;var i=n.trimStart(),a=i.match(Ds.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(Ds.invalidProtocolRegex.test(s))return Ds.BLANK_URL;var o=i.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!lrt(o))return Ds.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}ZC.sanitizeUrl=crt});function ug(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}var QF=$(()=>{b()});function JF(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}var _he=$(()=>{b()});function hg(t){let e,r,n;t.length!==2?(e=ug,r=(o,l)=>ug(t(o),l),n=(o,l)=>t(o)-l):(e=t===ug||t===JF?t:urt,r=t,n=t);function i(o,l,u=0,h=o.length){if(u>>1;r(o[f],l)<0?u=f+1:h=f}while(u>>1;r(o[f],l)<=0?u=f+1:h=f}while(uu&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:i,center:s,right:a}}function urt(){return 0}var eB=$(()=>{b();QF();_he()});function tB(t){return t===null?NaN:+t}var Ahe=$(()=>{b()});var Lhe,Mhe,hrt,frt,rB,Dhe=$(()=>{b();QF();eB();Ahe();Lhe=hg(ug),Mhe=Lhe.right,hrt=Lhe.left,frt=hg(tB).center,rB=Mhe});function Ohe({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function drt({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function prt({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function grt(t){return t!==null&&typeof t=="object"?t.valueOf():t}var Tv,Rhe=$(()=>{b();Tv=class extends Map{constructor(e,r=grt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(Ohe(this,e))}has(e){return super.has(Ohe(this,e))}set(e,r){return super.set(drt(this,e),r)}delete(e){return super.delete(prt(this,e))}}});function QC(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=mrt?10:a>=vrt?5:a>=yrt?2:1,o,l,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(t*u),l=Math.round(e*u),o/ue&&--l,u=-u):(u=Math.pow(10,i)*s,o=Math.round(t/u),l=Math.round(e/u),o*ue&&--l),l0))return[];if(t===e)return[t];let n=e=i))return[];let o=a-i+1,l=new Array(o);if(n)if(s<0)for(let u=0;u{b();mrt=Math.sqrt(50),vrt=Math.sqrt(10),yrt=Math.sqrt(2)});function e_(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var Nhe=$(()=>{b()});function t_(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var Phe=$(()=>{b()});function r_(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n{b()});var np=$(()=>{b();Dhe();eB();Nhe();Phe();Fhe();Ihe();Rhe()});function Bhe(t){return t}var zhe=$(()=>{b()});function brt(t){return"translate("+t+",0)"}function xrt(t){return"translate(0,"+t+")"}function wrt(t){return e=>+t(e)}function krt(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Trt(){return!this.__axis}function Vhe(t,e){var r=[],n=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===i_||t===n_?-1:1,h=t===n_||t===nB?"x":"y",f=t===i_||t===iB?brt:xrt;function d(p){var g=n??(e.ticks?e.ticks.apply(e,r):e.domain()),m=i??(e.tickFormat?e.tickFormat.apply(e,r):Bhe),v=Math.max(a,0)+o,y=e.range(),w=+y[0]+l,k=+y[y.length-1]+l,E=(e.bandwidth?krt:wrt)(e.copy(),l),T=p.selection?p.selection():p,S=T.selectAll(".domain").data([null]),L=T.selectAll(".tick").data(g,e).order(),_=L.exit(),M=L.enter().append("g").attr("class","tick"),I=L.select("line"),O=L.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),L=L.merge(M),I=I.merge(M.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),O=O.merge(M.append("text").attr("fill","currentColor").attr(h,u*v).attr("dy",t===i_?"0em":t===iB?"0.71em":"0.32em")),p!==T&&(S=S.transition(p),L=L.transition(p),I=I.transition(p),O=O.transition(p),_=_.transition(p).attr("opacity",$he).attr("transform",function(C){return isFinite(C=E(C))?f(C+l):this.getAttribute("transform")}),M.attr("opacity",$he).attr("transform",function(C){var R=this.parentNode.__axis;return f((R&&isFinite(R=R(C))?R:E(C))+l)})),_.remove(),S.attr("d",t===n_||t===nB?s?"M"+u*s+","+w+"H"+l+"V"+k+"H"+u*s:"M"+l+","+w+"V"+k:s?"M"+w+","+u*s+"V"+l+"H"+k+"V"+u*s:"M"+w+","+l+"H"+k),L.attr("opacity",1).attr("transform",function(C){return f(E(C)+l)}),I.attr(h+"2",u*a),O.attr(h,u*v).text(m),T.filter(Trt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===nB?"start":t===n_?"end":"middle"),T.each(function(){this.__axis=E})}return d.scale=function(p){return arguments.length?(e=p,d):e},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),d):n&&n.slice()},d.tickFormat=function(p){return arguments.length?(i=p,d):i},d.tickSize=function(p){return arguments.length?(a=s=+p,d):a},d.tickSizeInner=function(p){return arguments.length?(a=+p,d):a},d.tickSizeOuter=function(p){return arguments.length?(s=+p,d):s},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function aB(t){return Vhe(i_,t)}function sB(t){return Vhe(iB,t)}var i_,nB,iB,n_,$he,Uhe=$(()=>{b();zhe();i_=1,nB=2,iB=3,n_=4,$he=1e-6});var Hhe=$(()=>{b();Uhe()});function Whe(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function Crt(t,e){for(var r=0,n=t.length,i;r{b();Ert={value:()=>{}};a_.prototype=Whe.prototype={constructor:a_,on:function(t,e){var r=this._,n=Srt(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n{b();Ghe()});var s_,cB,uB=$(()=>{b();s_="http://www.w3.org/1999/xhtml",cB={svg:"http://www.w3.org/2000/svg",xhtml:s_,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Lf(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),cB.hasOwnProperty(e)?{space:cB[e],local:t}:t}var o_=$(()=>{b();uB()});function _rt(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===s_&&e.documentElement.namespaceURI===s_?e.createElement(t):e.createElementNS(r,t)}}function Art(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function l_(t){var e=Lf(t);return(e.local?Art:_rt)(e)}var hB=$(()=>{b();o_();uB()});function Lrt(){}function fg(t){return t==null?Lrt:function(){return this.querySelector(t)}}var c_=$(()=>{b()});function Yhe(t){typeof t!="function"&&(t=fg(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{b();Zc();c_()});function fB(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}var Xhe=$(()=>{b()});function Mrt(){return[]}function Xw(t){return t==null?Mrt:function(){return this.querySelectorAll(t)}}var dB=$(()=>{b()});function Drt(t){return function(){return fB(t.apply(this,arguments))}}function Khe(t){typeof t=="function"?t=Drt(t):t=Xw(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{b();Zc();Xhe();dB()});function Kw(t){return function(){return this.matches(t)}}function u_(t){return function(e){return e.matches(t)}}var Zw=$(()=>{b()});function Rrt(t){return function(){return Ort.call(this.children,t)}}function Irt(){return this.firstElementChild}function Qhe(t){return this.select(t==null?Irt:Rrt(typeof t=="function"?t:u_(t)))}var Ort,Jhe=$(()=>{b();Zw();Ort=Array.prototype.find});function Prt(){return Array.from(this.children)}function Frt(t){return function(){return Nrt.call(this.children,t)}}function efe(t){return this.selectAll(t==null?Prt:Frt(typeof t=="function"?t:u_(t)))}var Nrt,tfe=$(()=>{b();Zw();Nrt=Array.prototype.filter});function rfe(t){typeof t!="function"&&(t=Kw(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{b();Zc();Zw()});function h_(t){return new Array(t.length)}var pB=$(()=>{b()});function ife(){return new Hi(this._enter||this._groups.map(h_),this._parents)}function Qw(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var gB=$(()=>{b();pB();Zc();Qw.prototype={constructor:Qw,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}}});function afe(t){return function(){return t}}var sfe=$(()=>{b()});function Brt(t,e,r,n,i,a){for(var s=0,o,l=e.length,u=a.length;s=k&&(k=w+1);!(T=v[k])&&++k{b();Zc();gB();sfe()});function cfe(){return new Hi(this._exit||this._groups.map(h_),this._parents)}var ufe=$(()=>{b();pB();Zc()});function hfe(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}var ffe=$(()=>{b()});function dfe(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l{b();Zc()});function gfe(){for(var t=this._groups,e=-1,r=t.length;++e=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}var mfe=$(()=>{b()});function vfe(t){t||(t=Urt);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}var yfe=$(()=>{b();Zc()});function bfe(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var xfe=$(()=>{b()});function wfe(){return Array.from(this)}var kfe=$(()=>{b()});function Tfe(){for(var t=this._groups,e=0,r=t.length;e{b()});function Sfe(){let t=0;for(let e of this)++t;return t}var Cfe=$(()=>{b()});function _fe(){return!this.node()}var Afe=$(()=>{b()});function Lfe(t){for(var e=this._groups,r=0,n=e.length;r{b()});function Hrt(t){return function(){this.removeAttribute(t)}}function qrt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wrt(t,e){return function(){this.setAttribute(t,e)}}function Grt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Yrt(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function jrt(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Dfe(t,e){var r=Lf(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?qrt:Hrt:typeof e=="function"?r.local?jrt:Yrt:r.local?Grt:Wrt)(r,e))}var Ofe=$(()=>{b();o_()});function f_(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var mB=$(()=>{b()});function Xrt(t){return function(){this.style.removeProperty(t)}}function Krt(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Zrt(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function Rfe(t,e,r){return arguments.length>1?this.each((e==null?Xrt:typeof e=="function"?Zrt:Krt)(t,e,r??"")):ip(this.node(),t)}function ip(t,e){return t.style.getPropertyValue(e)||f_(t).getComputedStyle(t,null).getPropertyValue(e)}var vB=$(()=>{b();mB()});function Qrt(t){return function(){delete this[t]}}function Jrt(t,e){return function(){this[t]=e}}function ent(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function Ife(t,e){return arguments.length>1?this.each((e==null?Qrt:typeof e=="function"?ent:Jrt)(t,e)):this.node()[t]}var Nfe=$(()=>{b()});function Pfe(t){return t.trim().split(/^|\s+/)}function yB(t){return t.classList||new Ffe(t)}function Ffe(t){this._node=t,this._names=Pfe(t.getAttribute("class")||"")}function Bfe(t,e){for(var r=yB(t),n=-1,i=e.length;++n{b();Ffe.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}}});function int(){this.textContent=""}function ant(t){return function(){this.textContent=t}}function snt(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ufe(t){return arguments.length?this.each(t==null?int:(typeof t=="function"?snt:ant)(t)):this.node().textContent}var Hfe=$(()=>{b()});function ont(){this.innerHTML=""}function lnt(t){return function(){this.innerHTML=t}}function cnt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function qfe(t){return arguments.length?this.each(t==null?ont:(typeof t=="function"?cnt:lnt)(t)):this.node().innerHTML}var Wfe=$(()=>{b()});function unt(){this.nextSibling&&this.parentNode.appendChild(this)}function Gfe(){return this.each(unt)}var Yfe=$(()=>{b()});function hnt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jfe(){return this.each(hnt)}var Xfe=$(()=>{b()});function Kfe(t){var e=typeof t=="function"?t:l_(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var Zfe=$(()=>{b();hB()});function fnt(){return null}function Qfe(t,e){var r=typeof t=="function"?t:l_(t),n=e==null?fnt:typeof e=="function"?e:fg(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var Jfe=$(()=>{b();hB();c_()});function dnt(){var t=this.parentNode;t&&t.removeChild(this)}function ede(){return this.each(dnt)}var tde=$(()=>{b()});function pnt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function gnt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function rde(t){return this.select(t?gnt:pnt)}var nde=$(()=>{b()});function ide(t){return arguments.length?this.property("__data__",t):this.node().__data__}var ade=$(()=>{b()});function mnt(t){return function(e){t.call(this,e,this.__data__)}}function vnt(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function ynt(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r{b()});function lde(t,e,r){var n=f_(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function xnt(t,e){return function(){return lde(this,t,e)}}function wnt(t,e){return function(){return lde(this,t,e.apply(this,arguments))}}function cde(t,e){return this.each((typeof e=="function"?wnt:xnt)(t,e))}var ude=$(()=>{b();mB()});function*hde(){for(var t=this._groups,e=0,r=t.length;e{b()});function Hi(t,e){this._groups=t,this._parents=e}function dde(){return new Hi([[document.documentElement]],bB)}function knt(){return this}var bB,Mf,Zc=$(()=>{b();jhe();Zhe();Jhe();tfe();nfe();lfe();gB();ufe();ffe();pfe();mfe();yfe();xfe();kfe();Efe();Cfe();Afe();Mfe();Ofe();vB();Nfe();Vfe();Hfe();Wfe();Yfe();Xfe();Zfe();Jfe();tde();nde();ade();ode();ude();fde();bB=[null];Hi.prototype=dde.prototype={constructor:Hi,select:Yhe,selectAll:Khe,selectChild:Qhe,selectChildren:efe,filter:rfe,data:ofe,enter:ife,exit:cfe,join:hfe,merge:dfe,selection:knt,order:gfe,sort:vfe,call:bfe,nodes:wfe,node:Tfe,size:Sfe,empty:_fe,each:Lfe,attr:Dfe,style:Rfe,property:Ife,classed:$fe,text:Ufe,html:qfe,raise:Gfe,lower:jfe,append:Kfe,insert:Qfe,remove:ede,clone:rde,datum:ide,on:sde,dispatch:cde,[Symbol.iterator]:hde};Mf=dde});function Je(t){return typeof t=="string"?new Hi([[document.querySelector(t)]],[document.documentElement]):new Hi([[t]],bB)}var pde=$(()=>{b();Zc()});var Qc=$(()=>{b();Zw();o_();pde();Zc();c_();dB();vB()});var gde=$(()=>{b()});function dg(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Sv(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}var xB=$(()=>{b()});function ap(){}function vde(){return this.rgb().formatHex()}function Mnt(){return this.rgb().formatHex8()}function Dnt(){return Ede(this).formatHsl()}function yde(){return this.rgb().formatRgb()}function eu(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Tnt.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?bde(e):r===3?new ns(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?d_(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?d_(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ent.exec(t))?new ns(e[1],e[2],e[3],1):(e=Snt.exec(t))?new ns(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Cnt.exec(t))?d_(e[1],e[2],e[3],e[4]):(e=_nt.exec(t))?d_(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ant.exec(t))?kde(e[1],e[2]/100,e[3]/100,1):(e=Lnt.exec(t))?kde(e[1],e[2]/100,e[3]/100,e[4]):mde.hasOwnProperty(t)?bde(mde[t]):t==="transparent"?new ns(NaN,NaN,NaN,0):null}function bde(t){return new ns(t>>16&255,t>>8&255,t&255,1)}function d_(t,e,r,n){return n<=0&&(t=e=r=NaN),new ns(t,e,r,n)}function kB(t){return t instanceof ap||(t=eu(t)),t?(t=t.rgb(),new ns(t.r,t.g,t.b,t.opacity)):new ns}function _v(t,e,r,n){return arguments.length===1?kB(t):new ns(t,e,r,n??1)}function ns(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function xde(){return`#${pg(this.r)}${pg(this.g)}${pg(this.b)}`}function Ont(){return`#${pg(this.r)}${pg(this.g)}${pg(this.b)}${pg((isNaN(this.opacity)?1:this.opacity)*255)}`}function wde(){let t=m_(this.opacity);return`${t===1?"rgb(":"rgba("}${gg(this.r)}, ${gg(this.g)}, ${gg(this.b)}${t===1?")":`, ${t})`}`}function m_(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function gg(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function pg(t){return t=gg(t),(t<16?"0":"")+t.toString(16)}function kde(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Jc(t,e,r,n)}function Ede(t){if(t instanceof Jc)return new Jc(t.h,t.s,t.l,t.opacity);if(t instanceof ap||(t=eu(t)),!t)return new Jc;if(t instanceof Jc)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(r-n)/o+(r0&&l<1?0:s,new Jc(s,o,l,t.opacity)}function Sde(t,e,r,n){return arguments.length===1?Ede(t):new Jc(t,e,r,n??1)}function Jc(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function Tde(t){return t=(t||0)%360,t<0?t+360:t}function p_(t){return Math.max(0,Math.min(1,t||0))}function wB(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var Jw,g_,Cv,e4,nh,Tnt,Ent,Snt,Cnt,_nt,Ant,Lnt,mde,TB=$(()=>{b();xB();Jw=.7,g_=1/Jw,Cv="\\s*([+-]?\\d+)\\s*",e4="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",nh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tnt=/^#([0-9a-f]{3,8})$/,Ent=new RegExp(`^rgb\\(${Cv},${Cv},${Cv}\\)$`),Snt=new RegExp(`^rgb\\(${nh},${nh},${nh}\\)$`),Cnt=new RegExp(`^rgba\\(${Cv},${Cv},${Cv},${e4}\\)$`),_nt=new RegExp(`^rgba\\(${nh},${nh},${nh},${e4}\\)$`),Ant=new RegExp(`^hsl\\(${e4},${nh},${nh}\\)$`),Lnt=new RegExp(`^hsla\\(${e4},${nh},${nh},${e4}\\)$`),mde={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};dg(ap,eu,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:vde,formatHex:vde,formatHex8:Mnt,formatHsl:Dnt,formatRgb:yde,toString:yde});dg(ns,_v,Sv(ap,{brighter(t){return t=t==null?g_:Math.pow(g_,t),new ns(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Jw:Math.pow(Jw,t),new ns(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ns(gg(this.r),gg(this.g),gg(this.b),m_(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:xde,formatHex:xde,formatHex8:Ont,formatRgb:wde,toString:wde}));dg(Jc,Sde,Sv(ap,{brighter(t){return t=t==null?g_:Math.pow(g_,t),new Jc(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Jw:Math.pow(Jw,t),new Jc(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new ns(wB(t>=240?t-240:t+120,i,n),wB(t,i,n),wB(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Jc(Tde(this.h),p_(this.s),p_(this.l),m_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=m_(this.opacity);return`${t===1?"hsl(":"hsla("}${Tde(this.h)}, ${p_(this.s)*100}%, ${p_(this.l)*100}%${t===1?")":`, ${t})`}`}}))});var Cde,_de,Ade=$(()=>{b();Cde=Math.PI/180,_de=180/Math.PI});function Ide(t){if(t instanceof ih)return new ih(t.l,t.a,t.b,t.opacity);if(t instanceof Df)return Nde(t);t instanceof ns||(t=kB(t));var e=_B(t.r),r=_B(t.g),n=_B(t.b),i=EB((.2225045*e+.7168786*r+.0606169*n)/Mde),a,s;return e===r&&r===n?a=s=i:(a=EB((.4360747*e+.3850649*r+.1430804*n)/Lde),s=EB((.0139322*e+.0971045*r+.7141733*n)/Dde)),new ih(116*i-16,500*(a-i),200*(i-s),t.opacity)}function AB(t,e,r,n){return arguments.length===1?Ide(t):new ih(t,e,r,n??1)}function ih(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function EB(t){return t>Rnt?Math.pow(t,1/3):t/Rde+Ode}function SB(t){return t>Av?t*t*t:Rde*(t-Ode)}function CB(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function _B(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Int(t){if(t instanceof Df)return new Df(t.h,t.c,t.l,t.opacity);if(t instanceof ih||(t=Ide(t)),t.a===0&&t.b===0)return new Df(NaN,0{b();xB();TB();Ade();v_=18,Lde=.96422,Mde=1,Dde=.82521,Ode=4/29,Av=6/29,Rde=3*Av*Av,Rnt=Av*Av*Av;dg(ih,AB,Sv(ap,{brighter(t){return new ih(this.l+v_*(t??1),this.a,this.b,this.opacity)},darker(t){return new ih(this.l-v_*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Lde*SB(e),t=Mde*SB(t),r=Dde*SB(r),new ns(CB(3.1338561*e-1.6168667*t-.4906146*r),CB(-.9787684*e+1.9161415*t+.033454*r),CB(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));dg(Df,t4,Sv(ap,{brighter(t){return new Df(this.h,this.c,this.l+v_*(t??1),this.opacity)},darker(t){return new Df(this.h,this.c,this.l-v_*(t??1),this.opacity)},rgb(){return Nde(this).rgb()}}))});var Lv=$(()=>{b();TB();Pde()});function LB(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function Fde(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,o=n{b()});function Bde(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],s=t[(n+1)%e],o=t[(n+2)%e];return LB((r-n/e)*e,i,a,s,o)}}var zde=$(()=>{b();MB()});var Mv,DB=$(()=>{b();Mv=t=>()=>t});function $de(t,e){return function(r){return t+r*e}}function Nnt(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function Vde(t,e){var r=e-t;return r?$de(t,r>180||r<-180?r-360*Math.round(r/360):r):Mv(isNaN(t)?e:t)}function Ude(t){return(t=+t)==1?Of:function(e,r){return r-e?Nnt(e,r,t):Mv(isNaN(e)?r:e)}}function Of(t,e){var r=e-t;return r?$de(t,r):Mv(isNaN(t)?e:t)}var OB=$(()=>{b();DB()});function Hde(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s,o;for(s=0;s{b();Lv();MB();zde();OB();mg=function t(e){var r=Ude(e);function n(i,a){var s=r((i=_v(i)).r,(a=_v(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),u=Of(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=o(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n}(1);Pnt=Hde(Fde),Fnt=Hde(Bde)});function qde(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i{b()});function Yde(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s{b();y_()});function Xde(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}var Kde=$(()=>{b()});function is(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var r4=$(()=>{b()});function Zde(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=vg(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Qde=$(()=>{b();y_()});function Bnt(t){return function(){return t}}function znt(t){return function(e){return t(e)+""}}function n4(t,e){var r=NB.lastIndex=IB.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(t=t+"",e=e+"";(n=NB.exec(t))&&(i=IB.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:is(n,i)})),r=IB.lastIndex;return r{b();r4();NB=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,IB=new RegExp(NB.source,"g")});function vg(t,e){var r=typeof e,n;return e==null||r==="boolean"?Mv(e):(r==="number"?is:r==="string"?(n=eu(e))?(e=n,mg):n4:e instanceof eu?mg:e instanceof Date?Xde:Wde(e)?qde:Array.isArray(e)?Yde:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Zde:is)(t,e)}var y_=$(()=>{b();Lv();RB();jde();Kde();r4();Qde();PB();DB();Gde()});function FB(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var Jde=$(()=>{b()});function BB(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n{b();epe=180/Math.PI,b_={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function rpe(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?b_:BB(e.a,e.b,e.c,e.d,e.e,e.f)}function npe(t){return t==null?b_:(x_||(x_=document.createElementNS("http://www.w3.org/2000/svg","g")),x_.setAttribute("transform",t),(t=x_.transform.baseVal.consolidate())?(t=t.matrix,BB(t.a,t.b,t.c,t.d,t.e,t.f)):b_)}var x_,ipe=$(()=>{b();tpe()});function ape(t,e,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push("translate(",null,e,null,r);g.push({i:m-4,x:is(u,f)},{i:m-2,x:is(h,d)})}else(f||d)&&p.push("translate("+f+e+d+r)}function s(u,h,f,d){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,n)-2,x:is(u,h)})):h&&f.push(i(f)+"rotate("+h+n)}function o(u,h,f,d){u!==h?d.push({i:f.push(i(f)+"skewX(",null,n)-2,x:is(u,h)}):h&&f.push(i(f)+"skewX("+h+n)}function l(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push(i(p)+"scale(",null,",",null,")");g.push({i:m-4,x:is(u,f)},{i:m-2,x:is(h,d)})}else(f!==1||d!==1)&&p.push(i(p)+"scale("+f+","+d+")")}return function(u,h){var f=[],d=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,f,d),s(u.rotate,h.rotate,f,d),o(u.skewX,h.skewX,f,d),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,d),u=h=null,function(p){for(var g=-1,m=d.length,v;++g{b();r4();ipe();zB=ape(rpe,"px, ","px)","deg)"),$B=ape(npe,", ",")",")")});function ope(t){return function(e,r){var n=t((e=t4(e)).h,(r=t4(r)).h),i=Of(e.c,r.c),a=Of(e.l,r.l),s=Of(e.opacity,r.opacity);return function(o){return e.h=n(o),e.c=i(o),e.l=a(o),e.opacity=s(o),e+""}}}var VB,$nt,lpe=$(()=>{b();Lv();OB();VB=ope(Vde),$nt=ope(Of)});var Dv=$(()=>{b();y_();r4();Jde();PB();spe();RB();lpe()});function c4(){return yg||(hpe(Vnt),yg=o4.now()+T_)}function Vnt(){yg=0}function l4(){this._call=this._time=this._next=null}function E_(t,e,r){var n=new l4;return n.restart(t,e,r),n}function fpe(){c4(),++Ov;for(var t=w_,e;t;)(e=yg-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ov}function cpe(){yg=(k_=o4.now())+T_,Ov=a4=0;try{fpe()}finally{Ov=0,Hnt(),yg=0}}function Unt(){var t=o4.now(),e=t-k_;e>upe&&(T_-=e,k_=t)}function Hnt(){for(var t,e=w_,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:w_=r);s4=t,UB(n)}function UB(t){if(!Ov){a4&&(a4=clearTimeout(a4));var e=t-yg;e>24?(t<1/0&&(a4=setTimeout(cpe,t-o4.now()-T_)),i4&&(i4=clearInterval(i4))):(i4||(k_=o4.now(),i4=setInterval(Unt,upe)),Ov=1,hpe(cpe))}}var Ov,a4,i4,upe,w_,s4,k_,yg,T_,o4,hpe,HB=$(()=>{b();Ov=0,a4=0,i4=0,upe=1e3,k_=0,yg=0,T_=0,o4=typeof performance=="object"&&performance.now?performance:Date,hpe=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};l4.prototype=E_.prototype={constructor:l4,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?c4():+r)+(e==null?0:+e),!this._next&&s4!==this&&(s4?s4._next=this:w_=this,s4=this),this._call=t,this._time=r,UB()},stop:function(){this._call&&(this._call=null,this._time=1/0,UB())}}});function S_(t,e,r){var n=new l4;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var dpe=$(()=>{b();HB()});var C_=$(()=>{b();HB();dpe()});function sp(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;Gnt(t,r,{name:e,index:n,group:i,on:qnt,tween:Wnt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:mpe})}function h4(t,e){var r=ka(t,e);if(r.state>mpe)throw new Error("too late; already scheduled");return r}function as(t,e){var r=ka(t,e);if(r.state>__)throw new Error("too late; already running");return r}function ka(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Gnt(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=E_(a,0,r.time);function a(u){r.state=ppe,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,d,p;if(r.state!==ppe)return l();for(h in n)if(p=n[h],p.name===r.name){if(p.state===__)return S_(s);p.state===gpe?(p.state=u4,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete n[h]):+h{b();lB();C_();qnt=oB("start","end","cancel","interrupt"),Wnt=[],mpe=0,ppe=1,A_=2,__=3,gpe=4,L_=5,u4=6});function M_(t,e){var r=t.__transition,n,i,a=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){a=!1;continue}i=n.state>A_&&n.state{b();Oo()});function ype(t){return this.each(function(){M_(this,t)})}var bpe=$(()=>{b();vpe()});function Ynt(t,e){var r,n;return function(){var i=as(this,t),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s{b();Oo()});function D_(t,e){var r;return(typeof e=="number"?is:e instanceof eu?mg:(r=eu(e))?(e=r,mg):n4)(t,e)}var qB=$(()=>{b();Lv();Dv()});function Xnt(t){return function(){this.removeAttribute(t)}}function Knt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Znt(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===n?a:a=e(n=s,r)}}function Qnt(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===n?a:a=e(n=s,r)}}function Jnt(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function eit(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function wpe(t,e){var r=Lf(t),n=r==="transform"?$B:D_;return this.attrTween(t,typeof e=="function"?(r.local?eit:Jnt)(r,n,Rv(this,"attr."+t,e)):e==null?(r.local?Knt:Xnt)(r):(r.local?Qnt:Znt)(r,n,e))}var kpe=$(()=>{b();Dv();Qc();f4();qB()});function tit(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function rit(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function nit(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&rit(t,a)),r}return i._value=e,i}function iit(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&tit(t,a)),r}return i._value=e,i}function Tpe(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=Lf(t);return this.tween(r,(n.local?nit:iit)(n,e))}var Epe=$(()=>{b();Qc()});function ait(t,e){return function(){h4(this,t).delay=+e.apply(this,arguments)}}function sit(t,e){return e=+e,function(){h4(this,t).delay=e}}function Spe(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ait:sit)(e,t)):ka(this.node(),e).delay}var Cpe=$(()=>{b();Oo()});function oit(t,e){return function(){as(this,t).duration=+e.apply(this,arguments)}}function lit(t,e){return e=+e,function(){as(this,t).duration=e}}function _pe(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?oit:lit)(e,t)):ka(this.node(),e).duration}var Ape=$(()=>{b();Oo()});function cit(t,e){if(typeof e!="function")throw new Error;return function(){as(this,t).ease=e}}function Lpe(t){var e=this._id;return arguments.length?this.each(cit(e,t)):ka(this.node(),e).ease}var Mpe=$(()=>{b();Oo()});function uit(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;as(this,t).ease=r}}function Dpe(t){if(typeof t!="function")throw new Error;return this.each(uit(this._id,t))}var Ope=$(()=>{b();Oo()});function Rpe(t){typeof t!="function"&&(t=Kw(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{b();Qc();bg()});function Npe(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o{b();bg()});function hit(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function fit(t,e,r){var n,i,a=hit(e)?h4:as;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}function Fpe(t,e){var r=this._id;return arguments.length<2?ka(this.node(),r).on.on(t):this.each(fit(r,t,e))}var Bpe=$(()=>{b();Oo()});function dit(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function zpe(){return this.on("end.remove",dit(this._id))}var $pe=$(()=>{b()});function Vpe(t){var e=this._name,r=this._id;typeof t!="function"&&(t=fg(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{b();Qc();bg();Oo()});function Hpe(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Xw(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{b();Qc();bg();Oo()});function Wpe(){return new pit(this._groups,this._parents)}var pit,Gpe=$(()=>{b();Qc();pit=Mf.prototype.constructor});function git(t,e){var r,n,i;return function(){var a=ip(this,t),s=(this.style.removeProperty(t),ip(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s)}}function Ype(t){return function(){this.style.removeProperty(t)}}function mit(t,e,r){var n,i=r+"",a;return function(){var s=ip(this,t);return s===i?null:s===n?a:a=e(n=s,r)}}function vit(t,e,r){var n,i,a;return function(){var s=ip(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),ip(this,t))),s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o))}}function yit(t,e){var r,n,i,a="style."+e,s="end."+a,o;return function(){var l=as(this,t),u=l.on,h=l.value[a]==null?o||(o=Ype(e)):void 0;(u!==r||i!==h)&&(n=(r=u).copy()).on(s,i=h),l.on=n}}function jpe(t,e,r){var n=(t+="")=="transform"?zB:D_;return e==null?this.styleTween(t,git(t,n)).on("end.style."+t,Ype(t)):typeof e=="function"?this.styleTween(t,vit(t,n,Rv(this,"style."+t,e))).each(yit(this._id,t)):this.styleTween(t,mit(t,n,e),r).on("end.style."+t,null)}var Xpe=$(()=>{b();Dv();Qc();Oo();f4();qB()});function bit(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function xit(t,e,r){var n,i;function a(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&bit(t,s,r)),n}return a._value=e,a}function Kpe(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,xit(t,e,r??""))}var Zpe=$(()=>{b()});function wit(t){return function(){this.textContent=t}}function kit(t){return function(){var e=t(this);this.textContent=e??""}}function Qpe(t){return this.tween("text",typeof t=="function"?kit(Rv(this,"text",t)):wit(t==null?"":t+""))}var Jpe=$(()=>{b();f4()});function Tit(t){return function(e){this.textContent=t.call(this,e)}}function Eit(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&Tit(i)),e}return n._value=t,n}function e0e(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Eit(t))}var t0e=$(()=>{b()});function r0e(){for(var t=this._name,e=this._id,r=O_(),n=this._groups,i=n.length,a=0;a{b();bg();Oo()});function i0e(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var u=as(this,n),h=u.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),i===0&&a()})}var a0e=$(()=>{b();Oo()});function to(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function s0e(t){return Mf().transition(t)}function O_(){return++Sit}var Sit,Rf,bg=$(()=>{b();Qc();kpe();Epe();Cpe();Ape();Mpe();Ope();Ipe();Ppe();Bpe();$pe();Upe();qpe();Gpe();Xpe();Zpe();Jpe();t0e();n0e();f4();a0e();Sit=0;Rf=Mf.prototype;to.prototype=s0e.prototype={constructor:to,select:Vpe,selectAll:Hpe,selectChild:Rf.selectChild,selectChildren:Rf.selectChildren,filter:Rpe,merge:Npe,selection:Wpe,transition:r0e,call:Rf.call,nodes:Rf.nodes,node:Rf.node,size:Rf.size,empty:Rf.empty,each:Rf.each,on:Fpe,attr:wpe,attrTween:Tpe,style:jpe,styleTween:Kpe,text:Qpe,textTween:e0e,remove:zpe,tween:xpe,delay:Spe,duration:_pe,ease:Lpe,easeVarying:Dpe,end:i0e,[Symbol.iterator]:Rf[Symbol.iterator]}});function R_(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var o0e=$(()=>{b()});var WB=$(()=>{b();o0e()});function _it(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function l0e(t){var e,r;t instanceof to?(e=t._id,t=t._name):(e=O_(),(r=Cit).time=c4(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a{b();bg();Oo();WB();C_();Cit={time:null,delay:0,duration:250,ease:R_}});var u0e=$(()=>{b();Qc();bpe();c0e();Mf.prototype.interrupt=ype;Mf.prototype.transition=l0e});var I_=$(()=>{b();u0e()});var h0e=$(()=>{b()});var f0e=$(()=>{b()});var d0e=$(()=>{b()});function p0e(t){return[+t[0],+t[1]]}function Ait(t){return[p0e(t[0]),p0e(t[1])]}function GB(t){return{type:t}}var Str,Ctr,_tr,Atr,Ltr,Mtr,g0e=$(()=>{b();I_();h0e();f0e();d0e();({abs:Str,max:Ctr,min:_tr}=Math);Atr={name:"x",handles:["w","e"].map(GB),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ltr={name:"y",handles:["n","s"].map(GB),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Mtr={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(GB),input:function(t){return t==null?null:Ait(t)},output:function(t){return t}}});var m0e=$(()=>{b();g0e()});function v0e(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return v0e;let r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i{b();YB=Math.PI,jB=2*YB,xg=1e-6,Lit=jB-xg;wg=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?v0e:Mit(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-e,u=i-r,h=s-e,f=o-r,d=h*h+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>xg)if(!(Math.abs(f*l-u*h)>xg)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let p=n-s,g=i-o,m=l*l+u*u,v=p*p+g*g,y=Math.sqrt(m),w=Math.sqrt(d),k=a*Math.tan((YB-Math.acos((m+d-v)/(2*y*w)))/2),E=k/w,T=k/y;Math.abs(E-1)>xg&&this._append`L${e+E*h},${r+E*f}`,this._append`A${a},${a},0,0,${+(f*p>h*g)},${this._x1=e+T*l},${this._y1=r+T*u}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),u=e+o,h=r+l,f=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>xg||Math.abs(this._y1-h)>xg)&&this._append`L${u},${h}`,n&&(d<0&&(d=d%jB+jB),d>Lit?this._append`A${n},${n},0,1,${f},${e-o},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=h}`:d>xg&&this._append`A${n},${n},0,${+(d>=YB)},${f},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};y0e.prototype=wg.prototype});var XB=$(()=>{b();b0e()});var x0e=$(()=>{b()});var w0e=$(()=>{b()});var k0e=$(()=>{b()});var T0e=$(()=>{b()});var E0e=$(()=>{b()});var S0e=$(()=>{b()});var C0e=$(()=>{b()});function _0e(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function kg(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}var d4=$(()=>{b()});function ah(t){return t=kg(Math.abs(t)),t?t[1]:NaN}var p4=$(()=>{b();d4()});function A0e(t,e){return function(r,n){for(var i=r.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}var L0e=$(()=>{b()});function M0e(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var D0e=$(()=>{b()});function op(t){if(!(e=Dit.exec(t)))throw new Error("invalid format: "+t);var e;return new N_({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function N_(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}var Dit,KB=$(()=>{b();Dit=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;op.prototype=N_.prototype;N_.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 O0e(t){e:for(var e=t.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var R0e=$(()=>{b()});function I0e(t,e){var r=kg(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(ZB=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+kg(t,Math.max(0,e+a-1))[0]}var ZB,QB=$(()=>{b();d4()});function JB(t,e){var r=kg(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var N0e=$(()=>{b();d4()});var ez,P0e=$(()=>{b();d4();QB();N0e();ez={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:_0e,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>JB(t*100,e),r:JB,s:I0e,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}});function tz(t){return t}var F0e=$(()=>{b()});function $0e(t){var e=t.grouping===void 0||t.thousands===void 0?tz:A0e(B0e.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?tz:M0e(B0e.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=op(f);var d=f.fill,p=f.align,g=f.sign,m=f.symbol,v=f.zero,y=f.width,w=f.comma,k=f.precision,E=f.trim,T=f.type;T==="n"?(w=!0,T="g"):ez[T]||(k===void 0&&(k=12),E=!0,T="g"),(v||d==="0"&&p==="=")&&(v=!0,d="0",p="=");var S=m==="$"?r:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",L=m==="$"?n:/[%p]/.test(T)?s:"",_=ez[T],M=/[defgprs%]/.test(T);k=k===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function I(O){var C=S,R=L,D,P,A;if(T==="c")R=_(O)+R,O="";else{O=+O;var N=O<0||1/O<0;if(O=isNaN(O)?l:_(Math.abs(O),k),E&&(O=O0e(O)),N&&+O==0&&g!=="+"&&(N=!1),C=(N?g==="("?g:o:g==="-"||g==="("?"":g)+C,R=(T==="s"?z0e[8+ZB/3]:"")+R+(N&&g==="("?")":""),M){for(D=-1,P=O.length;++DA||A>57){R=(A===46?i+O.slice(D+1):O.slice(D))+R,O=O.slice(0,D);break}}}w&&!v&&(O=e(O,1/0));var F=C.length+O.length+R.length,B=F>1)+C+O+R+B.slice(F);break;default:O=B+C+O+R;break}return a(O)}return I.toString=function(){return f+""},I}function h(f,d){var p=u((f=op(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(ah(d)/3)))*3,m=Math.pow(10,-g),v=z0e[8+g/3];return function(y){return p(m*y)+v}}return{format:u,formatPrefix:h}}var B0e,z0e,V0e=$(()=>{b();p4();L0e();D0e();KB();R0e();P0e();QB();F0e();B0e=Array.prototype.map,z0e=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function rz(t){return P_=$0e(t),F_=P_.format,B_=P_.formatPrefix,P_}var P_,F_,B_,U0e=$(()=>{b();V0e();rz({thousands:",",grouping:[3],currency:["$",""]})});function nz(t){return Math.max(0,-ah(Math.abs(t)))}var H0e=$(()=>{b();p4()});function iz(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ah(e)/3)))*3-ah(Math.abs(t)))}var q0e=$(()=>{b();p4()});function az(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ah(e)-ah(t))+1}var W0e=$(()=>{b();p4()});var sz=$(()=>{b();U0e();KB();H0e();q0e();W0e()});var G0e=$(()=>{b()});var Y0e=$(()=>{b()});var j0e=$(()=>{b()});var X0e=$(()=>{b()});function lp(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var g4=$(()=>{b()});function If(){var t=new Tv,e=[],r=[],n=oz;function i(a){let s=t.get(a);if(s===void 0){if(n!==oz)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new Tv;for(let s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return If(e,r).unknown(n)},lp.apply(i,arguments),i}var oz,lz=$(()=>{b();np();g4();oz=Symbol("implicit")});function Iv(){var t=If().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,o=!1,l=0,u=0,h=.5;delete t.unknown;function f(){var d=e().length,p=i{b();np();g4();lz()});function cz(t){return function(){return t}}var Z0e=$(()=>{b()});function uz(t){return+t}var Q0e=$(()=>{b()});function Nv(t){return t}function hz(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:cz(isNaN(e)?NaN:.5)}function Oit(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function Rit(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i2?Iit:Rit,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=o(t.map(n),e,r)))(n(s(d)))}return f.invert=function(d){return s(i((u||(u=o(e,t.map(n),is)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,uz),h()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),h()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=FB,h()},f.clamp=function(d){return arguments.length?(s=d?!0:Nv,h()):s!==Nv},f.interpolate=function(d){return arguments.length?(r=d,h()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return n=d,i=p,h()}}function m4(){return Nit()(Nv,Nv)}var J0e,fz=$(()=>{b();np();Dv();Z0e();Q0e();J0e=[0,1]});function dz(t,e,r,n){var i=Ev(t,e,r),a;switch(n=op(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=iz(i,s))&&(n.precision=a),B_(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=az(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=nz(i))&&(n.precision=a-(n.type==="%")*2);break}}return F_(n)}var ege=$(()=>{b();np();sz()});function Pit(t){var e=t.domain;return t.ticks=function(r){var n=e();return JC(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return dz(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],o=n[a],l,u,h=10;for(o0;){if(u=jw(s,o,r),u===l)return n[i]=s,n[a]=o,e(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function tu(){var t=m4();return t.copy=function(){return z_(t,tu())},lp.apply(t,arguments),Pit(t)}var tge=$(()=>{b();np();fz();g4();ege()});function pz(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a{b()});function Un(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),o=i.ceil(a);return a-s(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{let l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a0))return l;let u;do l.push(u=new Date(+a)),e(a,o),t(a);while(uUn(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(gz.setTime(+a),mz.setTime(+s),t(gz),t(mz),Math.floor(r(gz,mz))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var gz,mz,Nf=$(()=>{b();gz=new Date,mz=new Date});var sh,nge,vz=$(()=>{b();Nf();sh=Un(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);sh.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Un(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):sh);nge=sh.range});var dl,ige,yz=$(()=>{b();Nf();dl=Un(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),ige=dl.range});var Pf,Fit,$_,Bit,bz=$(()=>{b();Nf();Pf=Un(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),Fit=Pf.range,$_=Un(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),Bit=$_.range});var Ff,zit,V_,$it,xz=$(()=>{b();Nf();Ff=Un(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),zit=Ff.range,V_=Un(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),$it=V_.range});var Zl,Vit,y4,Uit,U_,Hit,wz=$(()=>{b();Nf();Zl=Un(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),Vit=Zl.range,y4=Un(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),Uit=y4.range,U_=Un(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),Hit=U_.range});function Sg(t){return Un(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function Cg(t){return Un(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var ru,cp,H_,q_,lh,W_,G_,sge,qit,Wit,Git,Yit,jit,Xit,_g,Pv,oge,lge,up,cge,uge,hge,Kit,Zit,Qit,Jit,eat,tat,kz=$(()=>{b();Nf();ru=Sg(0),cp=Sg(1),H_=Sg(2),q_=Sg(3),lh=Sg(4),W_=Sg(5),G_=Sg(6),sge=ru.range,qit=cp.range,Wit=H_.range,Git=q_.range,Yit=lh.range,jit=W_.range,Xit=G_.range;_g=Cg(0),Pv=Cg(1),oge=Cg(2),lge=Cg(3),up=Cg(4),cge=Cg(5),uge=Cg(6),hge=_g.range,Kit=Pv.range,Zit=oge.range,Qit=lge.range,Jit=up.range,eat=cge.range,tat=uge.range});var Bf,rat,Y_,nat,Tz=$(()=>{b();Nf();Bf=Un(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),rat=Bf.range,Y_=Un(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),nat=Y_.range});var pl,iat,nu,aat,Ez=$(()=>{b();Nf();pl=Un(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());pl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Un(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});iat=pl.range,nu=Un(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());nu.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Un(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});aat=nu.range});function dge(t,e,r,n,i,a){let s=[[dl,1,1e3],[dl,5,5*1e3],[dl,15,15*1e3],[dl,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function o(u,h,f){let d=hv).right(s,d);if(p===s.length)return t.every(Ev(u/31536e6,h/31536e6,f));if(p===0)return sh.every(Math.max(Ev(u,h,f),1));let[g,m]=s[d/s[p-1][2]{b();np();vz();yz();bz();xz();wz();kz();Tz();Ez();[oat,lat]=dge(nu,Y_,_g,U_,V_,$_),[Sz,Cz]=dge(pl,Bf,ru,Zl,Ff,Pf)});var j_=$(()=>{b();vz();yz();bz();xz();wz();kz();Tz();Ez();pge()});function _z(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Az(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function b4(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Lz(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,u=x4(i),h=w4(i),f=x4(a),d=w4(a),p=x4(s),g=w4(s),m=x4(o),v=w4(o),y=x4(l),w=w4(l),k={a:N,A:F,b:B,B:V,c:null,d:xge,e:xge,f:Dat,g:Vat,G:Hat,H:Aat,I:Lat,j:Mat,L:Sge,m:Oat,M:Rat,p:z,q:H,Q:Tge,s:Ege,S:Iat,u:Nat,U:Pat,V:Fat,w:Bat,W:zat,x:null,X:null,y:$at,Y:Uat,Z:qat,"%":kge},E={a:K,A:X,b:ne,B:j,c:null,d:wge,e:wge,f:jat,g:ist,G:sst,H:Wat,I:Gat,j:Yat,L:_ge,m:Xat,M:Kat,p:ee,q:Q,Q:Tge,s:Ege,S:Zat,u:Qat,U:Jat,V:est,w:tst,W:rst,x:null,X:null,y:nst,Y:ast,Z:ost,"%":kge},T={a:I,A:O,b:C,B:R,c:D,d:yge,e:yge,f:Eat,g:vge,G:mge,H:bge,I:bge,j:xat,L:Tat,m:bat,M:wat,p:M,q:yat,Q:Cat,s:_at,S:kat,u:dat,U:pat,V:gat,w:fat,W:mat,x:P,X:A,y:vge,Y:mge,Z:vat,"%":Sat};k.x=S(r,k),k.X=S(n,k),k.c=S(e,k),E.x=S(r,E),E.X=S(n,E),E.c=S(e,E);function S(G,Z){return function(te){var oe=[],de=-1,pe=0,re=G.length,Be,le,Se;for(te instanceof Date||(te=new Date(+te));++de53)return null;"w"in oe||(oe.w=1),"Z"in oe?(pe=Az(b4(oe.y,0,1)),re=pe.getUTCDay(),pe=re>4||re===0?Pv.ceil(pe):Pv(pe),pe=y4.offset(pe,(oe.V-1)*7),oe.y=pe.getUTCFullYear(),oe.m=pe.getUTCMonth(),oe.d=pe.getUTCDate()+(oe.w+6)%7):(pe=_z(b4(oe.y,0,1)),re=pe.getDay(),pe=re>4||re===0?cp.ceil(pe):cp(pe),pe=Zl.offset(pe,(oe.V-1)*7),oe.y=pe.getFullYear(),oe.m=pe.getMonth(),oe.d=pe.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),re="Z"in oe?Az(b4(oe.y,0,1)).getUTCDay():_z(b4(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(re+5)%7:oe.w+oe.U*7-(re+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,Az(oe)):_z(oe)}}function _(G,Z,te,oe){for(var de=0,pe=Z.length,re=te.length,Be,le;de=re)return-1;if(Be=Z.charCodeAt(de++),Be===37){if(Be=Z.charAt(de++),le=T[Be in gge?Z.charAt(de++):Be],!le||(oe=le(G,te,oe))<0)return-1}else if(Be!=te.charCodeAt(oe++))return-1}return oe}function M(G,Z,te){var oe=u.exec(Z.slice(te));return oe?(G.p=h.get(oe[0].toLowerCase()),te+oe[0].length):-1}function I(G,Z,te){var oe=p.exec(Z.slice(te));return oe?(G.w=g.get(oe[0].toLowerCase()),te+oe[0].length):-1}function O(G,Z,te){var oe=f.exec(Z.slice(te));return oe?(G.w=d.get(oe[0].toLowerCase()),te+oe[0].length):-1}function C(G,Z,te){var oe=y.exec(Z.slice(te));return oe?(G.m=w.get(oe[0].toLowerCase()),te+oe[0].length):-1}function R(G,Z,te){var oe=m.exec(Z.slice(te));return oe?(G.m=v.get(oe[0].toLowerCase()),te+oe[0].length):-1}function D(G,Z,te){return _(G,e,Z,te)}function P(G,Z,te){return _(G,r,Z,te)}function A(G,Z,te){return _(G,n,Z,te)}function N(G){return s[G.getDay()]}function F(G){return a[G.getDay()]}function B(G){return l[G.getMonth()]}function V(G){return o[G.getMonth()]}function z(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function K(G){return s[G.getUTCDay()]}function X(G){return a[G.getUTCDay()]}function ne(G){return l[G.getUTCMonth()]}function j(G){return o[G.getUTCMonth()]}function ee(G){return i[+(G.getUTCHours()>=12)]}function Q(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var Z=S(G+="",k);return Z.toString=function(){return G},Z},parse:function(G){var Z=L(G+="",!1);return Z.toString=function(){return G},Z},utcFormat:function(G){var Z=S(G+="",E);return Z.toString=function(){return G},Z},utcParse:function(G){var Z=L(G+="",!0);return Z.toString=function(){return G},Z}}}function nn(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a[e.toLowerCase(),r]))}function fat(t,e,r){var n=Ua.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function dat(t,e,r){var n=Ua.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function pat(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function gat(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function mat(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function mge(t,e,r){var n=Ua.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function vge(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function vat(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function yat(t,e,r){var n=Ua.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function bat(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function yge(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function xat(t,e,r){var n=Ua.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function bge(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function wat(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function kat(t,e,r){var n=Ua.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Tat(t,e,r){var n=Ua.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Eat(t,e,r){var n=Ua.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Sat(t,e,r){var n=cat.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Cat(t,e,r){var n=Ua.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function _at(t,e,r){var n=Ua.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function xge(t,e){return nn(t.getDate(),e,2)}function Aat(t,e){return nn(t.getHours(),e,2)}function Lat(t,e){return nn(t.getHours()%12||12,e,2)}function Mat(t,e){return nn(1+Zl.count(pl(t),t),e,3)}function Sge(t,e){return nn(t.getMilliseconds(),e,3)}function Dat(t,e){return Sge(t,e)+"000"}function Oat(t,e){return nn(t.getMonth()+1,e,2)}function Rat(t,e){return nn(t.getMinutes(),e,2)}function Iat(t,e){return nn(t.getSeconds(),e,2)}function Nat(t){var e=t.getDay();return e===0?7:e}function Pat(t,e){return nn(ru.count(pl(t)-1,t),e,2)}function Cge(t){var e=t.getDay();return e>=4||e===0?lh(t):lh.ceil(t)}function Fat(t,e){return t=Cge(t),nn(lh.count(pl(t),t)+(pl(t).getDay()===4),e,2)}function Bat(t){return t.getDay()}function zat(t,e){return nn(cp.count(pl(t)-1,t),e,2)}function $at(t,e){return nn(t.getFullYear()%100,e,2)}function Vat(t,e){return t=Cge(t),nn(t.getFullYear()%100,e,2)}function Uat(t,e){return nn(t.getFullYear()%1e4,e,4)}function Hat(t,e){var r=t.getDay();return t=r>=4||r===0?lh(t):lh.ceil(t),nn(t.getFullYear()%1e4,e,4)}function qat(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+nn(e/60|0,"0",2)+nn(e%60,"0",2)}function wge(t,e){return nn(t.getUTCDate(),e,2)}function Wat(t,e){return nn(t.getUTCHours(),e,2)}function Gat(t,e){return nn(t.getUTCHours()%12||12,e,2)}function Yat(t,e){return nn(1+y4.count(nu(t),t),e,3)}function _ge(t,e){return nn(t.getUTCMilliseconds(),e,3)}function jat(t,e){return _ge(t,e)+"000"}function Xat(t,e){return nn(t.getUTCMonth()+1,e,2)}function Kat(t,e){return nn(t.getUTCMinutes(),e,2)}function Zat(t,e){return nn(t.getUTCSeconds(),e,2)}function Qat(t){var e=t.getUTCDay();return e===0?7:e}function Jat(t,e){return nn(_g.count(nu(t)-1,t),e,2)}function Age(t){var e=t.getUTCDay();return e>=4||e===0?up(t):up.ceil(t)}function est(t,e){return t=Age(t),nn(up.count(nu(t),t)+(nu(t).getUTCDay()===4),e,2)}function tst(t){return t.getUTCDay()}function rst(t,e){return nn(Pv.count(nu(t)-1,t),e,2)}function nst(t,e){return nn(t.getUTCFullYear()%100,e,2)}function ist(t,e){return t=Age(t),nn(t.getUTCFullYear()%100,e,2)}function ast(t,e){return nn(t.getUTCFullYear()%1e4,e,4)}function sst(t,e){var r=t.getUTCDay();return t=r>=4||r===0?up(t):up.ceil(t),nn(t.getUTCFullYear()%1e4,e,4)}function ost(){return"+0000"}function kge(){return"%"}function Tge(t){return+t}function Ege(t){return Math.floor(+t/1e3)}var gge,Ua,cat,uat,Lge=$(()=>{b();j_();gge={"-":"",_:" ",0:"0"},Ua=/^\s*\d+/,cat=/^%/,uat=/[\\^$*+?|[\]().{}]/g});function Mz(t){return Fv=Lz(t),Ag=Fv.format,Mge=Fv.parse,Dge=Fv.utcFormat,Oge=Fv.utcParse,Fv}var Fv,Ag,Mge,Dge,Oge,Rge=$(()=>{b();Lge();Mz({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"]})});var Dz=$(()=>{b();Rge()});function lst(t){return new Date(t)}function cst(t){return t instanceof Date?+t:+new Date(+t)}function Ige(t,e,r,n,i,a,s,o,l,u){var h=m4(),f=h.invert,d=h.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),w=u("%b %d"),k=u("%B"),E=u("%Y");function T(S){return(l(S){b();j_();Dz();fz();g4();rge()});var Pge=$(()=>{b();K0e();tge();lz();Nge()});function Fge(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{b()});var Oz,zge=$(()=>{b();Bge();Oz=Fge("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var $ge=$(()=>{b();zge()});function bi(t){return function(){return t}}var K_=$(()=>{b()});function Uge(t){return t>1?0:t<-1?Bv:Math.acos(t)}function Iz(t){return t>=1?k4:t<=-1?-k4:Math.asin(t)}var Rz,ss,hp,Vge,Z_,iu,Lg,Ha,Bv,k4,zv,Q_=$(()=>{b();Rz=Math.abs,ss=Math.atan2,hp=Math.cos,Vge=Math.max,Z_=Math.min,iu=Math.sin,Lg=Math.sqrt,Ha=1e-12,Bv=Math.PI,k4=Bv/2,zv=2*Bv});function J_(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new wg(e)}var Nz=$(()=>{b();XB()});function ust(t){return t.innerRadius}function hst(t){return t.outerRadius}function fst(t){return t.startAngle}function dst(t){return t.endAngle}function pst(t){return t&&t.padAngle}function gst(t,e,r,n,i,a,s,o){var l=r-t,u=n-e,h=s-i,f=o-a,d=f*l-h*u;if(!(d*dD*D+P*P&&(_=I,M=O),{cx:_,cy:M,x01:-h,y01:-f,x11:_*(i/T-1),y11:M*(i/T-1)}}function ch(){var t=ust,e=hst,r=bi(0),n=null,i=fst,a=dst,s=pst,o=null,l=J_(u);function u(){var h,f,d=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-k4,m=a.apply(this,arguments)-k4,v=Rz(m-g),y=m>g;if(o||(o=h=l()),pHa))o.moveTo(0,0);else if(v>zv-Ha)o.moveTo(p*hp(g),p*iu(g)),o.arc(0,0,p,g,m,!y),d>Ha&&(o.moveTo(d*hp(m),d*iu(m)),o.arc(0,0,d,m,g,y));else{var w=g,k=m,E=g,T=m,S=v,L=v,_=s.apply(this,arguments)/2,M=_>Ha&&(n?+n.apply(this,arguments):Lg(d*d+p*p)),I=Z_(Rz(p-d)/2,+r.apply(this,arguments)),O=I,C=I,R,D;if(M>Ha){var P=Iz(M/d*iu(_)),A=Iz(M/p*iu(_));(S-=P*2)>Ha?(P*=y?1:-1,E+=P,T-=P):(S=0,E=T=(g+m)/2),(L-=A*2)>Ha?(A*=y?1:-1,w+=A,k-=A):(L=0,w=k=(g+m)/2)}var N=p*hp(w),F=p*iu(w),B=d*hp(T),V=d*iu(T);if(I>Ha){var z=p*hp(k),H=p*iu(k),K=d*hp(E),X=d*iu(E),ne;if(vHa?C>Ha?(R=e6(K,X,N,F,p,C,y),D=e6(z,H,B,V,p,C,y),o.moveTo(R.cx+R.x01,R.cy+R.y01),CHa)||!(S>Ha)?o.lineTo(B,V):O>Ha?(R=e6(B,V,z,H,d,-O,y),D=e6(N,F,K,X,d,-O,y),o.lineTo(R.cx+R.x01,R.cy+R.y01),O{b();K_();Q_();Nz()});function t6(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var Oar,Pz=$(()=>{b();Oar=Array.prototype.slice});function qge(t){this._context=t}function T4(t){return new qge(t)}var Fz=$(()=>{b();qge.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}}});function Wge(t){return t[0]}function Gge(t){return t[1]}var Yge=$(()=>{b()});function Ro(t,e){var r=bi(!0),n=null,i=T4,a=null,s=J_(o);t=typeof t=="function"?t:t===void 0?Wge:bi(t),e=typeof e=="function"?e:e===void 0?Gge:bi(e);function o(l){var u,h=(l=t6(l)).length,f,d=!1,p;for(n==null&&(a=i(p=s())),u=0;u<=h;++u)!(u{b();Pz();K_();Fz();Nz();Yge()});function Xge(t,e){return et?1:e>=t?0:NaN}var Kge=$(()=>{b()});function Zge(t){return t}var Qge=$(()=>{b()});function Bz(){var t=Zge,e=Xge,r=null,n=bi(0),i=bi(zv),a=bi(0);function s(o){var l,u=(o=t6(o)).length,h,f,d=0,p=new Array(u),g=new Array(u),m=+n.apply(this,arguments),v=Math.min(zv,Math.max(-zv,i.apply(this,arguments)-m)),y,w=Math.min(Math.abs(v)/u,a.apply(this,arguments)),k=w*(v<0?-1:1),E;for(l=0;l0&&(d+=E);for(e!=null?p.sort(function(T,S){return e(g[T],g[S])}):r!=null&&p.sort(function(T,S){return r(o[T],o[S])}),l=0,f=d?(v-u*k)/d:0;l0?E*f:0)+k,g[h]={data:o[h],index:l,value:E,startAngle:m,endAngle:y,padAngle:w};return g}return s.value=function(o){return arguments.length?(t=typeof o=="function"?o:bi(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:bi(+o),s):n},s.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:bi(+o),s):i},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:bi(+o),s):a},s}var Jge=$(()=>{b();Pz();K_();Kge();Qge();Q_()});function zz(t){return new r6(t,!0)}function $z(t){return new r6(t,!1)}var r6,eme=$(()=>{b();r6=class{constructor(e,r){this._context=e,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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}});function Ql(){}var E4=$(()=>{b()});function $v(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function S4(t){this._context=t}function au(t){return new S4(t)}var C4=$(()=>{b();S4.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:$v(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:$v(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function tme(t){this._context=t}function Vz(t){return new tme(t)}var rme=$(()=>{b();E4();C4();tme.prototype={areaStart:Ql,areaEnd:Ql,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:$v(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function nme(t){this._context=t}function Uz(t){return new nme(t)}var ime=$(()=>{b();C4();nme.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:$v(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function ame(t,e){this._basis=new S4(t),this._beta=e}var Hz,sme=$(()=>{b();C4();ame.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+l*a),this._beta*e[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};Hz=function t(e){function r(n){return e===1?new S4(n):new ame(n,e)}return r.beta=function(n){return t(+n)},r}(.85)});function Vv(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function n6(t,e){this._context=t,this._k=(1-e)/6}var qz,_4=$(()=>{b();n6.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:Vv(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Vv(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};qz=function t(e){function r(n){return new n6(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function i6(t,e){this._context=t,this._k=(1-e)/6}var Wz,Gz=$(()=>{b();E4();_4();i6.prototype={areaStart:Ql,areaEnd:Ql,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Vv(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};Wz=function t(e){function r(n){return new i6(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function a6(t,e){this._context=t,this._k=(1-e)/6}var Yz,jz=$(()=>{b();_4();a6.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vv(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};Yz=function t(e){function r(n){return new a6(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function A4(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Ha){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ha){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*u+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function ome(t,e){this._context=t,this._alpha=e}var Xz,s6=$(()=>{b();Q_();_4();ome.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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:A4(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};Xz=function t(e){function r(n){return e?new ome(n,e):new n6(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function lme(t,e){this._context=t,this._alpha=e}var Kz,cme=$(()=>{b();Gz();E4();s6();lme.prototype={areaStart:Ql,areaEnd:Ql,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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:A4(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};Kz=function t(e){function r(n){return e?new lme(n,e):new i6(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function ume(t,e){this._context=t,this._alpha=e}var Zz,hme=$(()=>{b();jz();s6();ume.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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:A4(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};Zz=function t(e){function r(n){return e?new ume(n,e):new a6(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function fme(t){this._context=t}function Qz(t){return new fme(t)}var dme=$(()=>{b();E4();fme.prototype={areaStart:Ql,areaEnd:Ql,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}}});function pme(t){return t<0?-1:1}function gme(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(pme(a)+pme(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function mme(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Jz(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function o6(t){this._context=t}function vme(t){this._context=new yme(t)}function yme(t){this._context=t}function e$(t){return new o6(t)}function t$(t){return new vme(t)}var bme=$(()=>{b();o6.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:Jz(this,this._t0,mme(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Jz(this,mme(this,r=gme(this,t,e)),r);break;default:Jz(this,this._t0,r=gme(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};(vme.prototype=Object.create(o6.prototype)).point=function(t,e){o6.prototype.point.call(this,e,t)};yme.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}}});function wme(t){this._context=t}function xme(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e{b();wme.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=xme(t),i=xme(e),a=0,s=1;s{b();l6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}}});var Eme=$(()=>{b();Hge();jge();Jge();rme();ime();C4();eme();sme();Gz();jz();_4();cme();hme();s6();dme();Fz();bme();kme();Tme()});var Sme=$(()=>{b()});var Cme=$(()=>{b()});function fp(t,e,r){this.k=t,this.x=e,this.y=r}function o$(t){for(;!t.__zoom;)if(!(t=t.parentNode))return s$;return t.__zoom}var s$,l$=$(()=>{b();fp.prototype={constructor:fp,scale:function(t){return t===1?this:new fp(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new fp(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};s$=new fp(1,0,0);o$.prototype=fp.prototype});var _me=$(()=>{b()});var Ame=$(()=>{b();I_();Sme();Cme();l$();_me()});var Lme=$(()=>{b();Ame();l$()});var Cr=$(()=>{b();np();Hhe();m0e();x0e();Lv();w0e();k0e();lB();gde();T0e();WB();E0e();C0e();sz();G0e();Y0e();Dv();XB();j0e();S0e();X0e();Pge();$ge();Qc();Eme();j_();Dz();C_();I_();Lme()});var mst,c6,c$=$(()=>{b();mst=typeof global=="object"&&global&&global.Object===Object&&global,c6=mst});var vst,yst,qi,Jl=$(()=>{b();c$();vst=typeof self=="object"&&self&&self.Object===Object&&self,yst=c6||vst||Function("return this")(),qi=yst});var bst,qa,Mg=$(()=>{b();Jl();bst=qi.Symbol,qa=bst});function kst(t){var e=xst.call(t,L4),r=t[L4];try{t[L4]=void 0;var n=!0}catch{}var i=wst.call(t);return n&&(e?t[L4]=r:delete t[L4]),i}var Mme,xst,wst,L4,Dme,Ome=$(()=>{b();Mg();Mme=Object.prototype,xst=Mme.hasOwnProperty,wst=Mme.toString,L4=qa?qa.toStringTag:void 0;Dme=kst});function Sst(t){return Est.call(t)}var Tst,Est,Rme,Ime=$(()=>{b();Tst=Object.prototype,Est=Tst.toString;Rme=Sst});function Ast(t){return t==null?t===void 0?_st:Cst:Nme&&Nme in Object(t)?Dme(t):Rme(t)}var Cst,_st,Nme,os,zf=$(()=>{b();Mg();Ome();Ime();Cst="[object Null]",_st="[object Undefined]",Nme=qa?qa.toStringTag:void 0;os=Ast});function Lst(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Hn,gl=$(()=>{b();Hn=Lst});function Ist(t){if(!Hn(t))return!1;var e=os(t);return e==Dst||e==Ost||e==Mst||e==Rst}var Mst,Dst,Ost,Rst,da,M4=$(()=>{b();zf();gl();Mst="[object AsyncFunction]",Dst="[object Function]",Ost="[object GeneratorFunction]",Rst="[object Proxy]";da=Ist});var Nst,u6,Pme=$(()=>{b();Jl();Nst=qi["__core-js_shared__"],u6=Nst});function Pst(t){return!!Fme&&Fme in t}var Fme,Bme,zme=$(()=>{b();Pme();Fme=function(){var t=/[^.]+$/.exec(u6&&u6.keys&&u6.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();Bme=Pst});function zst(t){if(t!=null){try{return Bst.call(t)}catch{}try{return t+""}catch{}}return""}var Fst,Bst,$f,u$=$(()=>{b();Fst=Function.prototype,Bst=Fst.toString;$f=zst});function Yst(t){if(!Hn(t)||Bme(t))return!1;var e=da(t)?Gst:Vst;return e.test($f(t))}var $st,Vst,Ust,Hst,qst,Wst,Gst,$me,Vme=$(()=>{b();M4();zme();gl();u$();$st=/[\\^$.*+?()[\]{}|]/g,Vst=/^\[object .+?Constructor\]$/,Ust=Function.prototype,Hst=Object.prototype,qst=Ust.toString,Wst=Hst.hasOwnProperty,Gst=RegExp("^"+qst.call(Wst).replace($st,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");$me=Yst});function jst(t,e){return t?.[e]}var Ume,Hme=$(()=>{b();Ume=jst});function Xst(t,e){var r=Ume(t,e);return $me(r)?r:void 0}var Io,dp=$(()=>{b();Vme();Hme();Io=Xst});var Kst,Vf,D4=$(()=>{b();dp();Kst=Io(Object,"create"),Vf=Kst});function Zst(){this.__data__=Vf?Vf(null):{},this.size=0}var qme,Wme=$(()=>{b();D4();qme=Zst});function Qst(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Gme,Yme=$(()=>{b();Gme=Qst});function rot(t){var e=this.__data__;if(Vf){var r=e[t];return r===Jst?void 0:r}return tot.call(e,t)?e[t]:void 0}var Jst,eot,tot,jme,Xme=$(()=>{b();D4();Jst="__lodash_hash_undefined__",eot=Object.prototype,tot=eot.hasOwnProperty;jme=rot});function aot(t){var e=this.__data__;return Vf?e[t]!==void 0:iot.call(e,t)}var not,iot,Kme,Zme=$(()=>{b();D4();not=Object.prototype,iot=not.hasOwnProperty;Kme=aot});function oot(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Vf&&e===void 0?sot:e,this}var sot,Qme,Jme=$(()=>{b();D4();sot="__lodash_hash_undefined__";Qme=oot});function Uv(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{b();Wme();Yme();Xme();Zme();Jme();Uv.prototype.clear=qme;Uv.prototype.delete=Gme;Uv.prototype.get=jme;Uv.prototype.has=Kme;Uv.prototype.set=Qme;h$=Uv});function lot(){this.__data__=[],this.size=0}var t1e,r1e=$(()=>{b();t1e=lot});function cot(t,e){return t===e||t!==t&&e!==e}var ec,Dg=$(()=>{b();ec=cot});function uot(t,e){for(var r=t.length;r--;)if(ec(t[r][0],e))return r;return-1}var pp,O4=$(()=>{b();Dg();pp=uot});function dot(t){var e=this.__data__,r=pp(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():fot.call(e,r,1),--this.size,!0}var hot,fot,n1e,i1e=$(()=>{b();O4();hot=Array.prototype,fot=hot.splice;n1e=dot});function pot(t){var e=this.__data__,r=pp(e,t);return r<0?void 0:e[r][1]}var a1e,s1e=$(()=>{b();O4();a1e=pot});function got(t){return pp(this.__data__,t)>-1}var o1e,l1e=$(()=>{b();O4();o1e=got});function mot(t,e){var r=this.__data__,n=pp(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var c1e,u1e=$(()=>{b();O4();c1e=mot});function Hv(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{b();r1e();i1e();s1e();l1e();u1e();Hv.prototype.clear=t1e;Hv.prototype.delete=n1e;Hv.prototype.get=a1e;Hv.prototype.has=o1e;Hv.prototype.set=c1e;gp=Hv});var vot,mp,h6=$(()=>{b();dp();Jl();vot=Io(qi,"Map"),mp=vot});function yot(){this.size=0,this.__data__={hash:new h$,map:new(mp||gp),string:new h$}}var h1e,f1e=$(()=>{b();e1e();R4();h6();h1e=yot});function bot(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var d1e,p1e=$(()=>{b();d1e=bot});function xot(t,e){var r=t.__data__;return d1e(e)?r[typeof e=="string"?"string":"hash"]:r.map}var vp,I4=$(()=>{b();p1e();vp=xot});function wot(t){var e=vp(this,t).delete(t);return this.size-=e?1:0,e}var g1e,m1e=$(()=>{b();I4();g1e=wot});function kot(t){return vp(this,t).get(t)}var v1e,y1e=$(()=>{b();I4();v1e=kot});function Tot(t){return vp(this,t).has(t)}var b1e,x1e=$(()=>{b();I4();b1e=Tot});function Eot(t,e){var r=vp(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var w1e,k1e=$(()=>{b();I4();w1e=Eot});function qv(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{b();f1e();m1e();y1e();x1e();k1e();qv.prototype.clear=h1e;qv.prototype.delete=g1e;qv.prototype.get=v1e;qv.prototype.has=b1e;qv.prototype.set=w1e;Og=qv});function f$(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Sot);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(f$.Cache||Og),r}var Sot,Wv,d$=$(()=>{b();f6();Sot="Expected a function";f$.Cache=Og;Wv=f$});function Cot(){this.__data__=new gp,this.size=0}var T1e,E1e=$(()=>{b();R4();T1e=Cot});function _ot(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var S1e,C1e=$(()=>{b();S1e=_ot});function Aot(t){return this.__data__.get(t)}var _1e,A1e=$(()=>{b();_1e=Aot});function Lot(t){return this.__data__.has(t)}var L1e,M1e=$(()=>{b();L1e=Lot});function Dot(t,e){var r=this.__data__;if(r instanceof gp){var n=r.__data__;if(!mp||n.length{b();R4();h6();f6();Mot=200;D1e=Dot});function Gv(t){var e=this.__data__=new gp(t);this.size=e.size}var uh,N4=$(()=>{b();R4();E1e();C1e();A1e();M1e();O1e();Gv.prototype.clear=T1e;Gv.prototype.delete=S1e;Gv.prototype.get=_1e;Gv.prototype.has=L1e;Gv.prototype.set=D1e;uh=Gv});var Oot,Yv,p$=$(()=>{b();dp();Oot=function(){try{var t=Io(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Yv=Oot});function Rot(t,e,r){e=="__proto__"&&Yv?Yv(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var hh,jv=$(()=>{b();p$();hh=Rot});function Iot(t,e,r){(r!==void 0&&!ec(t[e],r)||r===void 0&&!(e in t))&&hh(t,e,r)}var P4,g$=$(()=>{b();jv();Dg();P4=Iot});function Not(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++i];if(r(a[l],l,a)===!1)break}return e}}var R1e,I1e=$(()=>{b();R1e=Not});var Pot,Xv,d6=$(()=>{b();I1e();Pot=R1e(),Xv=Pot});function Bot(t,e){if(e)return t.slice();var r=t.length,n=F1e?F1e(r):new t.constructor(r);return t.copy(n),n}var B1e,N1e,Fot,P1e,F1e,p6,m$=$(()=>{b();Jl();B1e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,N1e=B1e&&typeof module=="object"&&module&&!module.nodeType&&module,Fot=N1e&&N1e.exports===B1e,P1e=Fot?qi.Buffer:void 0,F1e=P1e?P1e.allocUnsafe:void 0;p6=Bot});var zot,Kv,v$=$(()=>{b();Jl();zot=qi.Uint8Array,Kv=zot});function $ot(t){var e=new t.constructor(t.byteLength);return new Kv(e).set(new Kv(t)),e}var Zv,g6=$(()=>{b();v$();Zv=$ot});function Vot(t,e){var r=e?Zv(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var m6,y$=$(()=>{b();g6();m6=Vot});function Uot(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{b();v6=Uot});var z1e,Hot,$1e,V1e=$(()=>{b();gl();z1e=Object.create,Hot=function(){function t(){}return function(e){if(!Hn(e))return{};if(z1e)return z1e(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),$1e=Hot});function qot(t,e){return function(r){return t(e(r))}}var y6,x$=$(()=>{b();y6=qot});var Wot,Qv,b6=$(()=>{b();x$();Wot=y6(Object.getPrototypeOf,Object),Qv=Wot});function Yot(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Got;return t===r}var Got,fh,Jv=$(()=>{b();Got=Object.prototype;fh=Yot});function jot(t){return typeof t.constructor=="function"&&!fh(t)?$1e(Qv(t)):{}}var x6,w$=$(()=>{b();V1e();b6();Jv();x6=jot});function Xot(t){return t!=null&&typeof t=="object"}var Pi,tc=$(()=>{b();Pi=Xot});function Zot(t){return Pi(t)&&os(t)==Kot}var Kot,k$,U1e=$(()=>{b();zf();tc();Kot="[object Arguments]";k$=Zot});var H1e,Qot,Jot,elt,su,ey=$(()=>{b();U1e();tc();H1e=Object.prototype,Qot=H1e.hasOwnProperty,Jot=H1e.propertyIsEnumerable,elt=k$(function(){return arguments}())?k$:function(t){return Pi(t)&&Qot.call(t,"callee")&&!Jot.call(t,"callee")},su=elt});var tlt,Bt,xi=$(()=>{b();tlt=Array.isArray,Bt=tlt});function nlt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=rlt}var rlt,ty,w6=$(()=>{b();rlt=9007199254740991;ty=nlt});function ilt(t){return t!=null&&ty(t.length)&&!da(t)}var Wi,rc=$(()=>{b();M4();w6();Wi=ilt});function alt(t){return Pi(t)&&Wi(t)}var Rg,k6=$(()=>{b();rc();tc();Rg=alt});function slt(){return!1}var q1e,W1e=$(()=>{b();q1e=slt});var j1e,G1e,olt,Y1e,llt,clt,ou,ry=$(()=>{b();Jl();W1e();j1e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,G1e=j1e&&typeof module=="object"&&module&&!module.nodeType&&module,olt=G1e&&G1e.exports===j1e,Y1e=olt?qi.Buffer:void 0,llt=Y1e?Y1e.isBuffer:void 0,clt=llt||q1e,ou=clt});function glt(t){if(!Pi(t)||os(t)!=ult)return!1;var e=Qv(t);if(e===null)return!0;var r=dlt.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&X1e.call(r)==plt}var ult,hlt,flt,X1e,dlt,plt,K1e,Z1e=$(()=>{b();zf();b6();tc();ult="[object Object]",hlt=Function.prototype,flt=Object.prototype,X1e=hlt.toString,dlt=flt.hasOwnProperty,plt=X1e.call(Object);K1e=glt});function $lt(t){return Pi(t)&&ty(t.length)&&!!ci[os(t)]}var mlt,vlt,ylt,blt,xlt,wlt,klt,Tlt,Elt,Slt,Clt,_lt,Alt,Llt,Mlt,Dlt,Olt,Rlt,Ilt,Nlt,Plt,Flt,Blt,zlt,ci,Q1e,J1e=$(()=>{b();zf();w6();tc();mlt="[object Arguments]",vlt="[object Array]",ylt="[object Boolean]",blt="[object Date]",xlt="[object Error]",wlt="[object Function]",klt="[object Map]",Tlt="[object Number]",Elt="[object Object]",Slt="[object RegExp]",Clt="[object Set]",_lt="[object String]",Alt="[object WeakMap]",Llt="[object ArrayBuffer]",Mlt="[object DataView]",Dlt="[object Float32Array]",Olt="[object Float64Array]",Rlt="[object Int8Array]",Ilt="[object Int16Array]",Nlt="[object Int32Array]",Plt="[object Uint8Array]",Flt="[object Uint8ClampedArray]",Blt="[object Uint16Array]",zlt="[object Uint32Array]",ci={};ci[Dlt]=ci[Olt]=ci[Rlt]=ci[Ilt]=ci[Nlt]=ci[Plt]=ci[Flt]=ci[Blt]=ci[zlt]=!0;ci[mlt]=ci[vlt]=ci[Llt]=ci[ylt]=ci[Mlt]=ci[blt]=ci[xlt]=ci[wlt]=ci[klt]=ci[Tlt]=ci[Elt]=ci[Slt]=ci[Clt]=ci[_lt]=ci[Alt]=!1;Q1e=$lt});function Vlt(t){return function(e){return t(e)}}var nc,Ig=$(()=>{b();nc=Vlt});var eve,F4,Ult,T$,Hlt,ic,B4=$(()=>{b();c$();eve=typeof exports=="object"&&exports&&!exports.nodeType&&exports,F4=eve&&typeof module=="object"&&module&&!module.nodeType&&module,Ult=F4&&F4.exports===eve,T$=Ult&&c6.process,Hlt=function(){try{var t=F4&&F4.require&&F4.require("util").types;return t||T$&&T$.binding&&T$.binding("util")}catch{}}(),ic=Hlt});var tve,qlt,yp,z4=$(()=>{b();J1e();Ig();B4();tve=ic&&ic.isTypedArray,qlt=tve?nc(tve):Q1e,yp=qlt});function Wlt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var $4,E$=$(()=>{b();$4=Wlt});function jlt(t,e,r){var n=t[e];(!(Ylt.call(t,e)&&ec(n,r))||r===void 0&&!(e in t))&&hh(t,e,r)}var Glt,Ylt,dh,ny=$(()=>{b();jv();Dg();Glt=Object.prototype,Ylt=Glt.hasOwnProperty;dh=jlt});function Xlt(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a{b();ny();jv();ac=Xlt});function Klt(t,e){for(var r=-1,n=Array(t);++r{b();rve=Klt});function Jlt(t,e){var r=typeof t;return e=e??Zlt,!!e&&(r=="number"||r!="symbol"&&Qlt.test(t))&&t>-1&&t%1==0&&t{b();Zlt=9007199254740991,Qlt=/^(?:0|[1-9]\d*)$/;bp=Jlt});function rct(t,e){var r=Bt(t),n=!r&&su(t),i=!r&&!n&&ou(t),a=!r&&!n&&!i&&yp(t),s=r||n||i||a,o=s?rve(t.length,String):[],l=o.length;for(var u in t)(e||tct.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bp(u,l)))&&o.push(u);return o}var ect,tct,T6,S$=$(()=>{b();nve();ey();xi();ry();V4();z4();ect=Object.prototype,tct=ect.hasOwnProperty;T6=rct});function nct(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ive,ave=$(()=>{b();ive=nct});function sct(t){if(!Hn(t))return ive(t);var e=fh(t),r=[];for(var n in t)n=="constructor"&&(e||!act.call(t,n))||r.push(n);return r}var ict,act,sve,ove=$(()=>{b();gl();Jv();ave();ict=Object.prototype,act=ict.hasOwnProperty;sve=sct});function oct(t){return Wi(t)?T6(t,!0):sve(t)}var No,xp=$(()=>{b();S$();ove();rc();No=oct});function lct(t){return ac(t,No(t))}var lve,cve=$(()=>{b();Ng();xp();lve=lct});function cct(t,e,r,n,i,a,s){var o=$4(t,r),l=$4(e,r),u=s.get(l);if(u){P4(t,r,u);return}var h=a?a(o,l,r+"",t,e,s):void 0,f=h===void 0;if(f){var d=Bt(l),p=!d&&ou(l),g=!d&&!p&&yp(l);h=l,d||p||g?Bt(o)?h=o:Rg(o)?h=v6(o):p?(f=!1,h=p6(l,!0)):g?(f=!1,h=m6(l,!0)):h=[]:K1e(l)||su(l)?(h=o,su(o)?h=lve(o):(!Hn(o)||da(o))&&(h=x6(l))):f=!1}f&&(s.set(l,h),i(h,l,n,a,s),s.delete(l)),P4(t,r,h)}var uve,hve=$(()=>{b();g$();m$();y$();b$();w$();ey();xi();k6();ry();M4();gl();Z1e();z4();E$();cve();uve=cct});function fve(t,e,r,n,i){t!==e&&Xv(e,function(a,s){if(i||(i=new uh),Hn(a))uve(t,e,s,r,fve,n,i);else{var o=n?n($4(t,s),a,s+"",t,e,i):void 0;o===void 0&&(o=a),P4(t,s,o)}},No)}var dve,pve=$(()=>{b();N4();g$();d6();hve();gl();xp();E$();dve=fve});function uct(t){return t}var Wa,Uf=$(()=>{b();Wa=uct});function hct(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var gve,mve=$(()=>{b();gve=hct});function fct(t,e,r){return e=vve(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=vve(n.length-e,0),s=Array(a);++i{b();mve();vve=Math.max;E6=fct});function dct(t){return function(){return t}}var Po,_$=$(()=>{b();Po=dct});var pct,yve,bve=$(()=>{b();_$();p$();Uf();pct=Yv?function(t,e){return Yv(t,"toString",{configurable:!0,enumerable:!1,value:Po(e),writable:!0})}:Wa,yve=pct});function yct(t){var e=0,r=0;return function(){var n=vct(),i=mct-(n-r);if(r=n,i>0){if(++e>=gct)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var gct,mct,vct,xve,wve=$(()=>{b();gct=800,mct=16,vct=Date.now;xve=yct});var bct,S6,A$=$(()=>{b();bve();wve();bct=xve(yve),S6=bct});function xct(t,e){return S6(E6(t,e,Wa),t+"")}var ph,iy=$(()=>{b();Uf();C$();A$();ph=xct});function wct(t,e,r){if(!Hn(r))return!1;var n=typeof e;return(n=="number"?Wi(r)&&bp(e,r.length):n=="string"&&e in r)?ec(r[e],t):!1}var ml,Pg=$(()=>{b();Dg();rc();V4();gl();ml=wct});function kct(t){return ph(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&ml(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{b();iy();Pg();C6=kct});var Tct,wp,M$=$(()=>{b();pve();L$();Tct=C6(function(t,e,r){dve(t,e,r)}),wp=Tct});function A6(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Ect[r]??e}function _ve(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,Eve.sanitizeUrl)(r):r}function O$(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ave(t){let e,r=0;t.forEach(i=>{r+=O$(i,e),e=i});let n=r/2;return R$(t,n)}function Lve(t){return t.length===1?t[0]:Ave(t)}function Mve(t,e,r){let n=structuredClone(r);ie.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let i=25+t,a=R$(n,i),s=10+t*.5,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}function L6(t){let e="",r="";for(let n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function Dve(t){let e="",r="0123456789abcdef",n=r.length;for(let i=0;i{b();Sr();Eve=Vi(kv(),1);Cr();d$();M$();D$="\u200B",Ect={curveBasis:au,curveBasisClosed:Vz,curveBasisOpen:Uz,curveBumpX:zz,curveBumpY:$z,curveBundle:Hz,curveCardinalClosed:Wz,curveCardinalOpen:Yz,curveCardinal:qz,curveCatmullRomClosed:Kz,curveCatmullRomOpen:Zz,curveCatmullRom:Xz,curveLinear:T4,curveLinearClosed:Qz,curveMonotoneX:e$,curveMonotoneY:t$,curveNatural:r$,curveStep:n$,curveStepAfter:a$,curveStepBefore:i$},Sct=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Cct=x(function(t,e){let r=Sve(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let s=r.map(o=>o.args);Bw(s),n=Ni(n,[...s])}else n=r.args;if(!n)return;let i=zw(t,e),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),Sve=x(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${Sct.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),ie.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,i=[];for(;(n=uv.exec(t))!==null;)if(n.index===uv.lastIndex&&uv.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){let a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(r){return ie.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),Cve=x(function(t){return t.replace(uv,"")},"removeDirectives"),_ct=x(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");x(A6,"interpolateToCurve");x(_ve,"formatUrl");Act=x((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let s=0;s{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),R$=x((t,e)=>{let r,n=e;for(let i of t){if(r){let a=O$(i,r);if(a=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:kve((1-s)*r.x+s*i.x,5),y:kve((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Lct=x((t,e,r)=>{ie.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=R$(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(e[0].x+i.x)/2,o.y=-Math.cos(s)*a+(e[0].y+i.y)/2,o},"calcCardinalityPosition");x(Mve,"calcTerminalLabelPosition");x(L6,"getStylesFromArray");Tve=0,I$=x(()=>(Tve++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Tve),"generateId");x(Dve,"makeRandomHex");N$=x(t=>Dve(t.length),"random"),Mct=x(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"),Dct=x(function(t,e){let r=e.text.replace(ct.lineBreakRegex," "),[,n]=sc(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);let a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),P$=Wv((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),ct.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,o)=>{let l=Fo(`${s} `,r),u=Fo(a,r);if(l>e){let{hyphenatedStrings:d,remainingWord:p}=Oct(s,e,"-",r);i.push(a,...d),a=p}else u+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Oct=Wv((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((o,l)=>{let u=`${s}${o}`;if(Fo(u,n)>=e){let f=l+1,d=i.length===f,p=`${u}${r}`;a.push(d?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);x(U4,"calculateTextHeight");x(Fo,"calculateTextWidth");F$=Wv((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=sc(r),s=["sans-serif",n],o=t.split(ct.lineBreakRegex),l=[],u=Je("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let h=u.append("svg");for(let d of s){let p=0,g={width:0,height:0,lineHeight:0};for(let m of o){let v=Mct();v.text=m||D$;let y=Dct(h,v).style("font-size",a).style("font-weight",i).style("font-family",d),w=(y._groups||y)[0][0].getBBox();if(w.width===0&&w.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,w.width)),p=Math.round(w.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();let f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Rct=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{x(this,"InitIDGenerator")}},Ict=x(function(t){return _6=_6||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),_6.innerHTML=t,unescape(_6.textContent)},"entityDecode");x(M6,"isDetailedError");Nct=x((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),sc=x(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");x(Bo,"cleanAndMerge");tr={assignWithDepth:Ni,wrapLabel:P$,calculateTextHeight:U4,calculateTextWidth:Fo,calculateTextDimensions:F$,cleanAndMerge:Bo,detectInit:Cct,detectDirective:Sve,isSubstringInArray:_ct,interpolateToCurve:A6,calcLabelPosition:Lve,calcCardinalityPosition:Lct,calcTerminalLabelPosition:Mve,formatUrl:_ve,getStylesFromArray:L6,generateId:I$,random:N$,runFunc:Act,entityDecode:Ict,insertTitle:Nct,parseFontSize:sc,InitIDGenerator:Rct},Ove=x(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),vl=x(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),D6=x((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");x(Os,"handleUndefinedAttr")});function $$(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Bve(t){Bg=t}function yl(t,e){if(e){if(zve.test(t))return t.replace(Pct,Rve)}else if($ve.test(t))return t.replace(Fct,Rve);return t}function $ct(t){return t.replace(zct,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}function On(t,e){let r=typeof t=="string"?t:t.source;e=e||"";let n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Vct,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}function Ive(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function Nve(t,e){let r=t.replace(/\|/g,(a,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{let a=i.match(/^\s+/);if(a===null)return i;let[s]=a;return s.length>=n.length?i.slice(n.length):i}).join(` `)}function yn(t,e){return Fg.parse(t,e)}var Bg,zve,Pct,$ve,Fct,Bct,Rve,zct,Vct,W4,sy,qct,Wct,Gct,Y4,Yct,Vve,Uve,V$,jct,U$,Xct,Kct,I6,H$,Zct,Hve,Qct,q$,Fve,Jct,eut,qve,tut,Wve,rut,j4,nut,iut,aut,sut,out,lut,cut,uut,hut,R6,fut,Gve,Yve,dut,W$,put,B$,gut,O6,q4,Hf,oy,G4,qf,ay,z$,Fg,Kpr,Zpr,Qpr,Jpr,e0r,t0r,r0r,jve=$(()=>{b();Bg=$$();zve=/[&<>"']/,Pct=new RegExp(zve.source,"g"),$ve=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Fct=new RegExp($ve.source,"g"),Bct={"&":"&","<":"<",">":">",'"':""","'":"'"},Rve=t=>Bct[t];zct=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;Vct=/(^|[^\[])\^/g;W4={exec:()=>null};sy=class{options;rules;lexer;constructor(e){this.options=e||Bg}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:H4(n,` `)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],i=Hct(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(/#$/.test(n)){let i=H4(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:H4(r[0],` `)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=H4(r[0],` `).split(` `),i="",a="",s=[];for(;n.length>0;){let o=!1,l=[],u;for(u=0;u/.test(n[u]))l.push(n[u]),o=!0;else if(!o)l.push(n[u]);else break;n=n.slice(u);let h=l.join(` `),f=h.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` $1`).replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i} ${h}`:h,a=a?`${a} ${f}`:f;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,s,!0),this.lexer.state.top=d,n.length===0)break;let p=s[s.length-1];if(p?.type==="code")break;if(p?.type==="blockquote"){let g=p,m=g.raw+` `+n.join(` `),v=this.blockquote(m);s[s.length-1]=v,i=i.substring(0,i.length-g.raw.length)+v.raw,a=a.substring(0,a.length-g.text.length)+v.text;break}else if(p?.type==="list"){let g=p,m=g.raw+` `+n.join(` `),v=this.list(m);s[s.length-1]=v,i=i.substring(0,i.length-p.raw.length)+v.raw,a=a.substring(0,a.length-g.raw.length)+v.raw,n=m.substring(s[s.length-1].raw.length).split(` `);continue}}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),o=!1;for(;e;){let l=!1,u="",h="";if(!(r=s.exec(e))||this.rules.block.hr.test(e))break;u=r[0],e=e.substring(u.length);let f=r[2].split(` `,1)[0].replace(/^\t+/,y=>" ".repeat(3*y.length)),d=e.split(` `,1)[0],p=!f.trim(),g=0;if(this.options.pedantic?(g=2,h=f.trimStart()):p?g=r[1].length+1:(g=r[2].search(/[^ ]/),g=g>4?1:g,h=f.slice(g),g+=r[1].length),p&&/^ *$/.test(d)&&(u+=d+` `,e=e.substring(d.length+1),l=!0),!l){let y=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;e;){let T=e.split(` `,1)[0];if(d=T,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),k.test(d)||E.test(d)||y.test(d)||w.test(e))break;if(d.search(/[^ ]/)>=g||!d.trim())h+=` `+d.slice(g);else{if(p||f.search(/[^ ]/)>=4||k.test(f)||E.test(f)||w.test(f))break;h+=` `+d}!p&&!d.trim()&&(p=!0),u+=T+` `,e=e.substring(T.length+1),f=d.slice(g)}}a.loose||(o?a.loose=!0:/\n *\n *$/.test(u)&&(o=!0));let m=null,v;this.options.gfm&&(m=/^\[[ xX]\] /.exec(h),m&&(v=m[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:u,task:!!m,checked:v,loose:!1,text:h,tokens:[]}),a.raw+=u}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let l=0;lf.type==="space"),h=u.length>0&&u.some(f=>/\n.*\n/.test(f.raw));a.loose=h}if(a.loose)for(let l=0;l$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(e){let r=this.rules.block.table.exec(e);if(!r||!/[:|]/.test(r[2]))return;let n=Nve(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` `):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let o of i)/^ *-+: *$/.test(o)?s.align.push("right"):/^ *:-+: *$/.test(o)?s.align.push("center"):/^ *:-+ *$/.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[u]})));return s}}lheading(e){let r=this.rules.block.lheading.exec(e);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(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===` `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:yl(r[1])}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&/^/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.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(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;let s=H4(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=Uct(r[2],"()");if(s>-1){let l=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),Pve(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Pve(n,a,n[0],this.lexer)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let s=[...i[0]].length-1,o,l,u=s,h=0,f=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,r=r.slice(-1*e.length+s);(i=f.exec(r))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(l=[...o].length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&s%3&&!((s+l)%3)){h+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+h);let d=[...i[0]][0].length,p=e.slice(0,s+i.index+d+l);if(Math.min(s,l)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(/\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=yl(n,!0),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=yl(r[1]),i="mailto:"+n):(n=yl(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,i;if(r[2]==="@")n=yl(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=yl(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=yl(r[0]),{type:"text",raw:r[0],text:n}}}},qct=/^(?: *(?:\n|$))+/,Wct=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,Gct=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y4=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yct=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vve=/(?:[*+-]|\d{1,9}[.)])/,Uve=On(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Vve).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),V$=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jct=/^[^\n]+/,U$=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Xct=On(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",U$).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Kct=On(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vve).getRegex(),I6="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",H$=/|$))/,Zct=On("^ {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",H$).replace("tag",I6).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Hve=On(V$).replace("hr",Y4).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",I6).getRegex(),Qct=On(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Hve).getRegex(),q$={blockquote:Qct,code:Wct,def:Xct,fences:Gct,heading:Yct,hr:Y4,html:Zct,lheading:Uve,list:Kct,newline:qct,paragraph:Hve,table:W4,text:jct},Fve=On("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y4).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",I6).getRegex(),Jct={...q$,table:Fve,paragraph:On(V$).replace("hr",Y4).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Fve).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",I6).getRegex()},eut={...q$,html:On(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",H$).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:W4,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:On(V$).replace("hr",Y4).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Uve).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tut=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Wve=/^( {2,}|\\)\n(?!\s*$)/,rut=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,aut=On(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,j4).getRegex(),sut=On("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,j4).getRegex(),out=On("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,j4).getRegex(),lut=On(/\\([punct])/,"gu").replace(/punct/g,j4).getRegex(),cut=On(/^<(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(),uut=On(H$).replace("(?:-->|$)","-->").getRegex(),hut=On("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",uut).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),R6=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fut=On(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",R6).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Gve=On(/^!?\[(label)\]\[(ref)\]/).replace("label",R6).replace("ref",U$).getRegex(),Yve=On(/^!?\[(ref)\](?:\[\])?/).replace("ref",U$).getRegex(),dut=On("reflink|nolink(?!\\()","g").replace("reflink",Gve).replace("nolink",Yve).getRegex(),W$={_backpedal:W4,anyPunctuation:lut,autolink:cut,blockSkip:iut,br:Wve,code:tut,del:W4,emStrongLDelim:aut,emStrongRDelimAst:sut,emStrongRDelimUnd:out,escape:qve,link:fut,nolink:Yve,punctuation:nut,reflink:Gve,reflinkSearch:dut,tag:hut,text:rut,url:W4},put={...W$,link:On(/^!?\[(label)\]\((.*?)\)/).replace("label",R6).getRegex(),reflink:On(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",R6).getRegex()},B$={...W$,escape:On(qve).replace("])","~|])").getRegex(),url:On(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(u.length));let i,a,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(i=o.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&r.length>0?r[r.length-1].raw+=` `:r.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` `+i.raw,a.text+=` `+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` `+i.raw,a.text+=` `+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let o=1/0,l=e.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(s=e.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){a=r[r.length-1],n&&a?.type==="paragraph"?(a.raw+=` `+i.raw,a.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i),n=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&a.type==="text"?(a.raw+=` `+i.raw,a.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n,i,a,s=e,o,l,u;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(n=h.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(e,s,u)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),r.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startInline){let h=1/0,f=e.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(a=e.substring(0,h+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),l=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},oy=class{options;parser;constructor(e){this.options=e||Bg}space(e){return""}code({text:e,lang:r,escaped:n}){let i=(r||"").match(/^\S*/)?.[0],a=e.replace(/\n$/,"")+` `;return i?'
'+(n?a:yl(a,!0))+`
`:"
"+(n?a:yl(a,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}heading({tokens:e,depth:r}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(e){let r=e.ordered,n=e.start,i="";for(let o=0;o `+i+" `}listitem(e){let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`
  • ${r}
  • `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

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

    An error occurred:

    "+yl(n.message+"",!0)+"
    ";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Fg=new z$;yn.options=yn.setOptions=function(t){return Fg.setOptions(t),yn.defaults=Fg.defaults,Bve(yn.defaults),yn};yn.getDefaults=$$;yn.defaults=Bg;yn.use=function(...t){return Fg.use(...t),yn.defaults=Fg.defaults,Bve(yn.defaults),yn};yn.walkTokens=function(t,e){return Fg.walkTokens(t,e)};yn.parseInline=Fg.parseInline;yn.Parser=qf;yn.parser=qf.parse;yn.Renderer=oy;yn.TextRenderer=G4;yn.Lexer=Hf;yn.lexer=Hf.lex;yn.Tokenizer=sy;yn.Hooks=ay;yn.parse=yn;Kpr=yn.options,Zpr=yn.setOptions,Qpr=yn.use,Jpr=yn.walkTokens,e0r=yn.parseInline,t0r=qf.parse,r0r=Hf.lex});function N6(t){for(var e=[],r=1;r{b()});function Xve(t,{markdownAutoWrap:e}){let n=t.replace(//g,` `).replace(/\n{2,}/g,` `),i=N6(n);return e===!1?i.replace(/ /g," "):i}function Kve(t,e={}){let r=Xve(t,e),n=yn.lexer(r),i=[[]],a=0;function s(o,l="normal"){o.type==="text"?o.text.split(` `).forEach((h,f)=>{f!==0&&(a++,i.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&i[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(u=>{s(u,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return x(s,"processNode"),n.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}),i}function Zve(t,{markdownAutoWrap:e}={}){let r=yn.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`

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

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:`Unsupported markdown: ${i.type}`}return x(n,"output"),r.map(n).join("")}function Qve(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function Jve(t,e){let r=Qve(e.content);return j$(t,[],r,e.type)}function j$(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?j$(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function eye(t,e){if(t.some(({content:r})=>r.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return P6(t,e)}function P6(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return P6(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[o,l]=Jve(e,a);r.push([o]),l.content&&t.unshift(l)}return P6(t,e,r)}function Y$(t,e){e&&t.attr("style",e)}async function tye(t,e,r,n,i=!1){let a=t.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);let s=a.append("xhtml:div"),o=e.label;e.label&&xa(e.label)&&(o=await ep(e.label.replace(ct.lineBreakRegex,` `),Te()));let l=e.isNode?"nodeLabel":"edgeLabel",u=s.append("span");u.html(o),Y$(u,e.labelStyle),u.attr("class",`${l} ${n}`),Y$(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),a.node()}function F6(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function rye(t,e,r){let n=t.append("text"),i=F6(n,1,e);B6(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function X$(t,e,r){let n=t.append("text"),i=F6(n,1,e);B6(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function nye(t,e,r,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1"),l=0;for(let u of r){let h=x(d=>rye(a,1.1,d)<=t,"checkWidth"),f=h(u)?[u]:eye(u,h);for(let d of f){let p=F6(o,l,1.1);B6(p,d),l++}}if(n){let u=o.node().getBBox(),h=2;return s.attr("x",u.x-h).attr("y",u.y-h).attr("width",u.width+2*h).attr("height",u.height+2*h),a.node()}else return o.node()}function B6(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}function z6(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>``)}var ls,ro=$(()=>{b();Qn();Sr();Cr();jve();G$();x(Xve,"preprocessMarkdown");x(Kve,"markdownToLines");x(Zve,"markdownToHTML");x(Qve,"splitTextToChars");x(Jve,"splitWordToFitWidth");x(j$,"splitWordToFitWidthRecursion");x(eye,"splitLineToFitWidth");x(P6,"splitLineToFitWidthRecursion");x(Y$,"applyStyle");x(tye,"addHtmlSpan");x(F6,"createTspan");x(rye,"computeWidthOfText");x(X$,"computeDimensionOfText");x(nye,"createFormattedText");x(B6,"updateTextContentAndStyles");x(z6,"replaceIconSubstring");ls=x(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},u)=>{if(ie.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a){let h=Zve(e,u),f=z6(vl(h)),d=e.replace(/\\\\/g,"\\"),p={isNode:s,label:xa(e)?d:f,labelStyle:r.replace("fill:","color:")};return await tye(t,p,o,i,l)}else{let h=e.replace(//g,"
    "),f=Kve(h.replace("
    ","
    "),u),d=nye(o,t,f,e?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Je(d).attr("style",p)}else{let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Je(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Je(d).select("text").attr("style",g)}return d}},"createText")});function K$(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(let l of t){let[u,h]=l;l[0]=(u-n)*s-(h-i)*o+n,l[1]=(u-n)*o+(h-i)*s+i}}}function mut(t,e){return t[0]===e[0]&&t[1]===e[1]}function vut(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(i)for(let u of s)K$(u,o,i);let l=function(u,h,f){let d=[];for(let w of u){let k=[...w];mut(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&d.push(k)}let p=[];h=Math.max(h,.1);let g=[];for(let w of d)for(let k=0;kw.ymink.ymin?1:w.xk.x?1:w.ymax===k.ymax?0:(w.ymax-k.ymax)/Math.abs(w.ymax-k.ymax)),!g.length)return p;let m=[],v=g[0].ymin,y=0;for(;m.length||g.length;){if(g.length){let w=-1;for(let k=0;kv);k++)w=k;g.splice(0,w+1).forEach(k=>{m.push({s:v,edge:k})})}if(m=m.filter(w=>!(w.edge.ymax<=v)),m.sort((w,k)=>w.edge.x===k.edge.x?0:(w.edge.x-k.edge.x)/Math.abs(w.edge.x-k.edge.x)),(f!==1||y%h==0)&&m.length>1)for(let w=0;w=m.length)break;let E=m[w].edge,T=m[k].edge;p.push([[Math.round(E.x),v],[Math.round(T.x),v]])}v+=f,m.forEach(w=>{w.edge.x=w.edge.x+f*w.edge.islope}),y++}return p}(s,a,n);if(i){for(let u of s)K$(u,o,-i);(function(u,h,f){let d=[];u.forEach(p=>d.push(...p)),K$(d,h,f)})(l,o,-i)}return l}function Q4(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),vut(t,i,n,a||1)}function j6(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}function Q$(t,e){return t.type===e}function fV(t){let e=[],r=function(s){let o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:yut,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Z$,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:iye,text:""},o}(t),n="BOD",i=0,a=r[i];for(;!Q$(a,iye);){let s=0,o=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return fV("M0,0"+t);i++,s=$6[a.text],n=a.text}else Q$(a,Z$)?s=$6[n]:(i++,s=$6[a.text],n=a.text);if(!(i+sh%2?u+r:u+e);a.push({key:"C",data:l}),e=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{let l=o.map((u,h)=>h%2?u+r:u+e);a.push({key:"Q",data:l}),e=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{let l=o.map((u,h)=>h%2?u+r:u+e);a.push({key:"S",data:l}),e=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function dye(t){let e=[],r="",n=0,i=0,a=0,s=0,o=0,l=0;for(let{key:u,data:h}of t){switch(u){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let f=0,d=0;r==="C"||r==="S"?(f=n+(n-o),d=i+(i-l)):(f=n,d=i),e.push({key:"C",data:[f,d,...h]}),o=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{let[f,d]=h,p=0,g=0;r==="Q"||r==="T"?(p=n+(n-o),g=i+(i-l)):(p=n,g=i);let m=n+2*(p-n)/3,v=i+2*(g-i)/3,y=f+2*(p-f)/3,w=d+2*(g-d)/3;e.push({key:"C",data:[m,v,y,w,f,d]}),o=p,l=g,n=f,i=d;break}case"Q":{let[f,d,p,g]=h,m=n+2*(f-n)/3,v=i+2*(d-i)/3,y=p+2*(f-p)/3,w=g+2*(d-g)/3;e.push({key:"C",data:[m,v,y,w,p,g]}),o=f,l=d,n=p,i=g;break}case"A":{let f=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],v=h[5],y=h[6];f===0||d===0?(e.push({key:"C",data:[n,i,v,y,v,y]}),n=v,i=y):(n!==v||i!==y)&&(pye(n,i,v,y,f,d,p,g,m).forEach(function(w){e.push({key:"C",data:w})}),n=v,i=y);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=u}return e}function X4(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function pye(t,e,r,n,i,a,s,o,l,u){let h=(f=s,Math.PI*f/180);var f;let d=[],p=0,g=0,m=0,v=0;if(u)[p,g,m,v]=u;else{[t,e]=X4(t,e,-h),[r,n]=X4(r,n,-h);let R=(t-r)/2,D=(e-n)/2,P=R*R/(i*i)+D*D/(a*a);P>1&&(P=Math.sqrt(P),i*=P,a*=P);let A=i*i,N=a*a,F=A*N-A*D*D-N*R*R,B=A*D*D+N*R*R,V=(o===l?-1:1)*Math.sqrt(Math.abs(F/B));m=V*i*D/a+(t+r)/2,v=V*-a*R/i+(e+n)/2,p=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),tg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let y=g-p;if(Math.abs(y)>120*Math.PI/180){let R=g,D=r,P=n;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=pye(r=m+i*Math.cos(g),n=v+a*Math.sin(g),D,P,i,a,s,0,l,[g,R,m,v])}y=g-p;let w=Math.cos(p),k=Math.sin(p),E=Math.cos(g),T=Math.sin(g),S=Math.tan(y/4),L=4/3*i*S,_=4/3*a*S,M=[t,e],I=[t+L*k,e-_*w],O=[r+L*T,n-_*E],C=[r,n];if(I[0]=2*M[0]-I[0],I[1]=2*M[1]-I[1],u)return[I,O,C].concat(d);{d=[I,O,C].concat(d);let R=[];for(let D=0;D2){let i=[];for(let a=0;a2*Math.PI&&(p=0,g=2*Math.PI);let m=2*Math.PI/l.curveStepCount,v=Math.min(m/2,(g-p)/2),y=uye(v,u,h,f,d,p,g,1,l);if(!l.disableMultiStroke){let w=uye(v,u,h,f,d,p,g,1.5,l);y.push(...w)}return s&&(o?y.push(...kp(u,h,u+f*Math.cos(p),h+d*Math.sin(p),l),...kp(u,h,u+f*Math.cos(g),h+d*Math.sin(g),l)):y.push({op:"lineTo",data:[u,h]},{op:"lineTo",data:[u+f*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function oye(t,e){let r=dye(fye(fV(t))),n=[],i=[0,0],a=[0,0];for(let{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...kp(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{let[l,u,h,f,d,p]=o;n.push(...wut(l,u,h,f,d,p,a,e)),a=[d,p];break}case"Z":n.push(...kp(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function J$(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+lr(i,e),n[0][1]+lr(i,e)]});for(let s=1;s500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);let f=h/2,d=.2+.2*vye(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=lr(p,i,u),g=lr(g,i,u);let m=[],v=()=>lr(f,i,u),y=()=>lr(h,i,u),w=i.preserveVertices;return a&&(s?m.push({op:"move",data:[t+(w?0:v()),e+(w?0:v())]}):m.push({op:"move",data:[t+(w?0:lr(h,i,u)),e+(w?0:lr(h,i,u))]})),s?m.push({op:"bcurveTo",data:[p+t+(r-t)*d+v(),g+e+(n-e)*d+v(),p+t+2*(r-t)*d+v(),g+e+2*(n-e)*d+v(),r+(w?0:v()),n+(w?0:v())]}):m.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(n-e)*d+y(),r+(w?0:y()),n+(w?0:y())]}),m}function V6(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+lr(e,r),t[0][1]+lr(e,r)]),n.push([t[0][0]+lr(e,r),t[0][1]+lr(e,r)]);for(let i=1;i3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&i.push(o)):i.push(o),i.push(t[e+3])}else{let l=t[e+0],u=t[e+1],h=t[e+2],f=t[e+3],d=zg(l,u,.5),p=zg(u,h,.5),g=zg(h,f,.5),m=zg(d,p,.5),v=zg(p,g,.5),y=zg(m,v,.5);cV([l,d,m,y],0,r,i),cV([y,v,g,f],0,r,i)}var a,s;return i}function Tut(t,e){return Y6(t,0,t.length,e)}function Y6(t,e,r,n,i){let a=i||[],s=t[e],o=t[r-1],l=0,u=1;for(let h=e+1;hl&&(l=f,u=h)}return Math.sqrt(l)>n?(Y6(t,e,u+1,n,a),Y6(t,u,r,n,a)):(a.length||a.push(s),a.push(o)),a}function eV(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a0?Y6(n,0,n.length,r):n}var Z4,tV,rV,nV,iV,aV,zo,sV,yut,Z$,iye,$6,but,bl,cy,uV,U6,hV,lt,er=$(()=>{b();Z4=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=Q4(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};tV=class extends Z4{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=Q4(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(let[u,h]of i)j6([u,h])&&s.push([[u[0]-o,u[1]+l],[...h]],[[u[0]+o,u[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},rV=class extends Z4{fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}},nV=class{constructor(e){this.helper=e}fillPolygons(e,r){let n=Q4(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let o of e){let l=j6(o),u=l/i,h=Math.ceil(u)-1,f=l-h*i,d=(o[0][0]+o[1][0])/2-i/4,p=Math.min(o[0][1],o[1][1]);for(let g=0;g{let o=j6(s),l=Math.floor(o/(n+i)),u=(o+i-l*(n+i))/2,h=s[0],f=s[1];h[0]>f[0]&&(h=s[1],f=s[0]);let d=Math.atan((f[1]-h[1])/(f[0]-h[0]));for(let p=0;p{let s=j6(a),o=Math.round(s/(2*r)),l=a[0],u=a[1];l[0]>u[0]&&(l=a[1],u=a[0]);let h=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f2*Math.PI&&(L=0,_=2*Math.PI);let M=(_-L)/w.curveStepCount,I=[];for(let O=L;O<=_;O+=M)I.push([k+T*Math.cos(O),E+S*Math.sin(O)]);return I.push([k+T*Math.cos(_),E+S*Math.sin(_)]),I.push([k,E]),ly([I],w)}(e,r,n,i,a,s,u));return u.stroke!==bl&&h.push(f),this._d("arc",h,u)}curve(e,r){let n=this._o(r),i=[],a=aye(e,n);if(n.fill&&n.fill!==bl)if(n.fillStyle==="solid"){let s=aye(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=e;if(o.length){let l=typeof o[0][0]=="number"?[o]:o;for(let u of l)u.length<3?s.push(...u):u.length===3?s.push(...eV(hye([u[0],u[0],u[1],u[2]]),10,(1+n.roughness)/2)):s.push(...eV(hye(u),10,(1+n.roughness)/2))}s.length&&i.push(ly([s],n))}return n.stroke!==bl&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=H6(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(J$([e],n)):i.push(ly([e],n))),n.stroke!==bl&&i.push(a),this._d("polygon",i,n)}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==bl,s=n.stroke!==bl,o=!!(n.simplification&&n.simplification<1),l=function(h,f,d){let p=dye(fye(fV(h))),g=[],m=[],v=[0,0],y=[],w=()=>{y.length>=4&&m.push(...eV(y,f)),y=[]},k=()=>{w(),m.length&&(g.push(m),m=[])};for(let{key:T,data:S}of p)switch(T){case"M":k(),v=[S[0],S[1]],m.push(v);break;case"L":w(),m.push([S[0],S[1]]);break;case"C":if(!y.length){let L=m.length?m[m.length-1]:v;y.push([L[0],L[1]])}y.push([S[0],S[1]]),y.push([S[2],S[3]]),y.push([S[4],S[5]]);break;case"Z":w(),m.push([v[0],v[1]])}if(k(),!d)return g;let E=[];for(let T of g){let S=Tut(T,d);S.length&&E.push(S)}return E}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),u=oye(e,n);if(a)if(n.fillStyle==="solid")if(l.length===1){let h=oye(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(J$(l,n));else i.push(ly(l,n));return s&&(o?l.forEach(h=>{i.push(H6(h,!1,n))}):i.push(u)),this._d("path",i,n)}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map(s=>+s.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:bl};break;case"fillPath":s={d:this.opsToPath(a),stroke:bl,strokeWidth:0,fill:n.fill||bl};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||bl,strokeWidth:n,fill:bl}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}},uV=class{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new cy(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,o),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map(o=>+o.toFixed(n)):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,o=!1,l){let u=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(u),u}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},U6="http://www.w3.org/2000/svg",hV=class{constructor(e,r){this.svg=e,this.gen=new cy(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(U6,"g"),s=e.options.fixedDecimalPlaceDigits;for(let o of r){let l=null;switch(o.type){case"path":l=i.createElementNS(U6,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(U6,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,n)}l&&a.appendChild(l)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(U6,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,o=!1,l){let u=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(u)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},lt={canvas:(t,e)=>new uV(t,e),svg:(t,e)=>new hV(t,e),generator:t=>new cy(t),newSeed:()=>cy.newSeed()}});function Gr(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function Tp(t,e,r,n,i,a){let s=[],l=r-t,u=n-e,h=l/a,f=2*Math.PI/h,d=e+u/2;for(let p=0;p<=50;p++){let g=p/50,m=t+g*l,v=d+i*Math.sin(f*(m-t));s.push({x:m,y:v})}return s}function mV(t,e,r,n,i,a){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;f"+n+""),yye(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}function Tye(t,e){return t.intersect(e)}function Eye(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function Aye(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,u=i-t.height/2-o;for(let h=0;h1&&a.sort(function(h,f){let d=h.x-r.x,p=h.y-r.y,g=Math.sqrt(d*d+p*p),m=f.x-r.x,v=f.y-r.y,y=Math.sqrt(m*m+v*v);return gh,":first-child");return f.attr("class","anchor").attr("style",Os(o)),Kt(e,f),e.intersect=function(d){return ie.info("Circle intersect",e,s,d),Gt.circle(e,s,d)},a}function gV(t,e,r,n,i,a,s){let l=(t+r)/2,u=(e+n)/2,h=Math.atan2(n-e,r-t),f=(r-t)/2,d=(n-e)/2,p=f/i,g=d/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-m**2),y=l+v*a*Math.sin(h)*(s?-1:1),w=u-v*i*Math.cos(h)*(s?-1:1),k=Math.atan2((e-w)/a,(t-y)/i),T=Math.atan2((n-w)/a,(r-y)/i)-k;s&&T<0&&(T+=2*Math.PI),!s&&T>0&&(T-=2*Math.PI);let S=[];for(let L=0;L<20;L++){let _=L/19,M=k+_*T,I=y+i*Math.cos(M),O=w+a*Math.sin(M);S.push({x:I,y:O})}return S}async function Mye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,u=l/(2.5+o/50),{cssStyles:h}=e,f=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...gV(-s/2,-o/2,-s/2,o/2,u,l,!1),{x:s/2,y:o/2},...gV(s/2,o/2,s/2,-o/2,u,l,!0)],d=lt.svg(i),p=Zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=Gr(f),m=d.path(g,p),v=i.insert(()=>m,":first-child");return v.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${u/2}, 0)`),Kt(e,v),e.intersect=function(y){return Gt.polygon(e,f,y)},i}function jf(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function Dye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=a.height+e.padding,o=12,l=a.width+e.padding+o,u=0,h=l,f=-s,d=0,p=[{x:u+o,y:f},{x:h,y:f},{x:h,y:d},{x:u,y:d},{x:u,y:f+o},{x:u+o,y:f}],g,{cssStyles:m}=e;if(e.look==="handDrawn"){let v=lt.svg(i),y=Zt(e,{}),w=Gr(p),k=v.path(w,y);g=i.insert(()=>k,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=jf(i,l,s,p);return n&&g.attr("style",n),Kt(e,g),e.intersect=function(v){return Gt.polygon(e,p,v)},i}function Oye(t,e){let{nodeStyles:r}=rr(e);e.label="";let n=t.insert("g").attr("class",vr(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=lt.svg(n),l=Zt(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=Gr(s),h=o.path(u,l),f=n.insert(()=>h,":first-child");return i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(d){return Gt.polygon(e,s,d)},n}async function Rye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await pr(t,e,vr(e)),o=a.width/2+s,l,{cssStyles:u}=e;if(e.look==="handDrawn"){let h=lt.svg(i),f=Zt(e,{}),d=h.circle(0,0,o*2,f);l=i.insert(()=>d,":first-child"),l.attr("class","basic label-container").attr("style",Os(u))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",o).attr("cx",0).attr("cy",0);return Kt(e,l),e.intersect=function(h){return ie.info("Circle intersect",e,o,h),Gt.circle(e,o,h)},i}function Iye(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},o={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y} M ${i.x},${i.y} L ${s.x},${s.y}`}function Nye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",vr(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,o=lt.svg(i),l=Zt(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=o.circle(0,0,a*2,l),h=Iye(a),f=o.path(h,l),d=i.insert(()=>u,":first-child");return d.insert(()=>f),s&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Kt(e,d),e.intersect=function(p){return ie.info("crossedCircle intersect",e,{radius:a,point:p}),Gt.circle(e,a,p)},i}function Wf(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fk,":first-child").attr("stroke-opacity",0),E.insert(()=>y,":first-child"),E.attr("class","text"),h&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(${u}, 0)`),s.attr("transform",`translate(${-o/2+u-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Kt(e,E),e.intersect=function(T){return Gt.polygon(e,d,T)},i}function Gf(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fk,":first-child").attr("stroke-opacity",0),E.insert(()=>y,":first-child"),E.attr("class","text"),h&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(${-u}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Kt(e,E),e.intersect=function(T){return Gt.polygon(e,d,T)},i}function cs(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fL,":first-child").attr("stroke-opacity",0),_.insert(()=>w,":first-child"),_.insert(()=>T,":first-child"),_.attr("class","text"),h&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${u-u/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Kt(e,_),e.intersect=function(M){return Gt.polygon(e,p,M)},i}async function zye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=80,o=20,l=Math.max(s,(a.width+(e.padding??0)*2)*1.25,e?.width??0),u=Math.max(o,a.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=lt.svg(i),p=Zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=l,m=u,v=g-h,y=m/4,w=[{x:v,y:0},{x:y,y:0},{x:0,y:m/2},{x:y,y:m},{x:v,y:m},...mV(-v,-m/2,h,50,270,90)],k=Gr(w),E=d.path(k,p),T=i.insert(()=>E,":first-child");return T.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),T.attr("transform",`translate(${-l/2}, ${-u/2})`),Kt(e,T),e.intersect=function(S){return Gt.polygon(e,w,S)},i}async function $ye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+e.padding,e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(a.height+u+e.padding,e.height??0),f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=lt.svg(i),g=zut(0,0,o,h,l,u),m=$ut(0,u,o,h,l,u),v=p.path(g,Zt(e,{})),y=p.path(m,Zt(e,{fill:"none"}));f=i.insert(()=>y,":first-child"),f=i.insert(()=>v,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{let p=But(0,0,o,h,l,u);f=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Os(d)).attr("style",n)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),Kt(e,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(p){let g=Gt.rect(e,p),m=g.x-(e.x??0);if(l!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-u)){let v=u*u*(1-m*m/(l*l));v>0&&(v=Math.sqrt(v)),v=u-v,p.y-(e.y??0)>0&&(v=-v),g.y+=v}return g},i}async function Vye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=a.width+e.padding,l=a.height+e.padding,u=l*.2,h=-o/2,f=-l/2-u/2,{cssStyles:d}=e,p=lt.svg(i),g=Zt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:h,y:f+u},{x:-h,y:f+u},{x:-h,y:-f},{x:h,y:-f},{x:h,y:f},{x:-h,y:f},{x:-h,y:f+u}],v=p.polygon(m.map(w=>[w.x,w.y]),g),y=i.insert(()=>v,":first-child");return y.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${f+u+(e.padding??0)/2-(a.y-(a.top??0))})`),Kt(e,y),e.intersect=function(w){return Gt.rect(e,w)},i}async function Uye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await pr(t,e,vr(e)),l=a.width/2+s+5,u=a.width/2+s,h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=lt.svg(i),p=Zt(e,{roughness:.2,strokeWidth:2.5}),g=Zt(e,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,p),v=d.circle(0,0,u*2,g);h=i.insert("g",":first-child"),h.attr("class",Os(e.cssClasses)).attr("style",Os(f)),h.node()?.appendChild(m),h.node()?.appendChild(v)}else{h=i.insert("g",":first-child");let d=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",n),d.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0)}return Kt(e,h),e.intersect=function(d){return ie.info("DoubleCircle intersect",e,l,d),Gt.circle(e,l,d)},i}function Hye(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=rr(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",vr(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,l=lt.svg(a),{nodeBorder:u}=r,h=Zt(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let f=l.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Kt(e,d),e.intersect=function(p){return ie.info("filledCircle intersect",e,{radius:s,point:p}),Gt.circle(e,s,p)},a}async function qye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=a.width+(e.padding??0),l=o+a.height,u=o+a.height,h=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=e,d=lt.svg(i),p=Zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=Gr(h),m=d.path(g,p),v=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=o,e.height=l,Kt(e,v),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(y){return ie.info("Triangle intersect",e,h,y),Gt.polygon(e,h,y)},i}function Wye(t,e,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=rr(e);e.label="";let s=t.insert("g").attr("class",vr(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,l=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);r==="LR"&&(l=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));let h=-1*l/2,f=-1*u/2,d=lt.svg(s),p=Zt(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=d.rectangle(h,f,l,u,p),m=s.insert(()=>g,":first-child");o&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Kt(e,m);let v=n?.padding??0;return e.width&&e.height&&(e.width+=v/2||0,e.height+=v/2||0),e.intersect=function(y){return Gt.rect(e,y)},s}async function Gye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:o}=await pr(t,e,vr(e)),l=Math.max(i,o.width+(e.padding??0)*2,e?.width??0),u=Math.max(a,o.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=lt.svg(s),p=Zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-l/2,y:-u/2},{x:l/2-h,y:-u/2},...mV(-l/2+h,0,h,50,90,270),{x:l/2-h,y:u/2},{x:-l/2,y:u/2}],m=Gr(g),v=d.path(m,p),y=s.insert(()=>v,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),Kt(e,y),e.intersect=function(w){return ie.info("Pill intersect",e,{radius:h,point:w}),Gt.polygon(e,g,w)},s}async function Yye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=4,o=a.height+e.padding,l=o/s,u=a.width+2*l+e.padding,h=[{x:l,y:0},{x:u-l,y:0},{x:u,y:-o/2},{x:u-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=lt.svg(i),g=Zt(e,{}),m=Vut(0,0,u,o,l),v=p.path(m,g);f=i.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${o/2})`),d&&f.attr("style",d)}else f=jf(i,u,o,h);return n&&f.attr("style",n),e.width=u,e.height=o,Kt(e,f),e.intersect=function(p){return Gt.polygon(e,h,p)},i}async function jye(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await pr(t,e,vr(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,l=lt.svg(i),u=Zt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],f=Gr(h),d=l.path(f,u),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),n&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-a/2}, ${-s/2})`),Kt(e,p),e.intersect=function(g){return ie.info("Pill intersect",e,{points:h}),Gt.polygon(e,h,g)},i}async function Xye(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=rr(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await pr(t,e,"icon-shape default"),d=e.pos==="t",p=o,g=o,{nodeBorder:m}=r,{stylesMap:v}=hy(e),y=-g/2,w=-p/2,k=e.label?8:0,E=lt.svg(u),T=Zt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=E.rectangle(y,w,g,p,T),L=Math.max(g,h.width),_=p+h.height+k,M=E.rectangle(-L/2,-_/2,L,_,{...T,fill:"transparent",stroke:"none"}),I=u.insert(()=>S,":first-child"),O=u.insert(()=>M);if(e.icon){let C=u.append("g");C.html(`${await _f(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let R=C.node().getBBox(),D=R.width,P=R.height,A=R.x,N=R.y;C.attr("transform",`translate(${-D/2-A},${d?h.height/2+k/2-P/2-N:-h.height/2-k/2-P/2-N})`),C.attr("style",`color: ${v.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-_/2:_/2-h.height})`),I.attr("transform",`translate(0,${d?h.height/2+k/2:-h.height/2-k/2})`),Kt(e,O),e.intersect=function(C){if(ie.info("iconSquare intersect",e,C),!e.label)return Gt.rect(e,C);let R=e.x??0,D=e.y??0,P=e.height??0,A=[];return d?A=[{x:R-h.width/2,y:D-P/2},{x:R+h.width/2,y:D-P/2},{x:R+h.width/2,y:D-P/2+h.height+k},{x:R+g/2,y:D-P/2+h.height+k},{x:R+g/2,y:D+P/2},{x:R-g/2,y:D+P/2},{x:R-g/2,y:D-P/2+h.height+k},{x:R-h.width/2,y:D-P/2+h.height+k}]:A=[{x:R-g/2,y:D-P/2},{x:R+g/2,y:D-P/2},{x:R+g/2,y:D-P/2+p},{x:R+h.width/2,y:D-P/2+p},{x:R+h.width/2/2,y:D+P/2},{x:R-h.width/2,y:D+P/2},{x:R-h.width/2,y:D-P/2+p},{x:R-g/2,y:D-P/2+p}],Gt.polygon(e,A,C)},u}async function Kye(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=rr(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await pr(t,e,"icon-shape default"),d=20,p=e.label?8:0,g=e.pos==="t",{nodeBorder:m,mainBkg:v}=r,{stylesMap:y}=hy(e),w=lt.svg(u),k=Zt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let E=y.get("fill");k.stroke=E??v;let T=u.append("g");e.icon&&T.html(`${await _f(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let S=T.node().getBBox(),L=S.width,_=S.height,M=S.x,I=S.y,O=Math.max(L,_)*Math.SQRT2+d*2,C=w.circle(0,0,O,k),R=Math.max(O,h.width),D=O+h.height+p,P=w.rectangle(-R/2,-D/2,R,D,{...k,fill:"transparent",stroke:"none"}),A=u.insert(()=>C,":first-child"),N=u.insert(()=>P);return T.attr("transform",`translate(${-L/2-M},${g?h.height/2+p/2-_/2-I:-h.height/2-p/2-_/2-I})`),T.attr("style",`color: ${y.get("stroke")??m};`),f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-D/2:D/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),Kt(e,N),e.intersect=function(F){return ie.info("iconSquare intersect",e,F),Gt.rect(e,F)},u}async function Zye(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=rr(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await pr(t,e,"icon-shape default"),p=e.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:w}=hy(e),k=-m/2,E=-g/2,T=e.label?8:0,S=lt.svg(u),L=Zt(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let _=w.get("fill");L.stroke=_??y;let M=S.path(Yf(k,E,m,g,5),L),I=Math.max(m,h.width),O=g+h.height+T,C=S.rectangle(-I/2,-O/2,I,O,{...L,fill:"transparent",stroke:"none"}),R=u.insert(()=>M,":first-child").attr("class","icon-shape2"),D=u.insert(()=>C);if(e.icon){let P=u.append("g");P.html(`${await _f(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let A=P.node().getBBox(),N=A.width,F=A.height,B=A.x,V=A.y;P.attr("transform",`translate(${-N/2-B},${p?h.height/2+T/2-F/2-V:-h.height/2-T/2-F/2-V})`),P.attr("style",`color: ${w.get("stroke")??v};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+T/2:-h.height/2-T/2})`),Kt(e,D),e.intersect=function(P){if(ie.info("iconSquare intersect",e,P),!e.label)return Gt.rect(e,P);let A=e.x??0,N=e.y??0,F=e.height??0,B=[];return p?B=[{x:A-h.width/2,y:N-F/2},{x:A+h.width/2,y:N-F/2},{x:A+h.width/2,y:N-F/2+h.height+T},{x:A+m/2,y:N-F/2+h.height+T},{x:A+m/2,y:N+F/2},{x:A-m/2,y:N+F/2},{x:A-m/2,y:N-F/2+h.height+T},{x:A-h.width/2,y:N-F/2+h.height+T}]:B=[{x:A-m/2,y:N-F/2},{x:A+m/2,y:N-F/2},{x:A+m/2,y:N-F/2+g},{x:A+h.width/2,y:N-F/2+g},{x:A+h.width/2/2,y:N+F/2},{x:A-h.width/2,y:N+F/2},{x:A-h.width/2,y:N-F/2+g},{x:A-m/2,y:N-F/2+g}],Gt.polygon(e,B,P)},u}async function Qye(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=rr(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await pr(t,e,"icon-shape default"),p=e.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:w}=hy(e),k=-m/2,E=-g/2,T=e.label?8:0,S=lt.svg(u),L=Zt(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let _=w.get("fill");L.stroke=_??y;let M=S.path(Yf(k,E,m,g,.1),L),I=Math.max(m,h.width),O=g+h.height+T,C=S.rectangle(-I/2,-O/2,I,O,{...L,fill:"transparent",stroke:"none"}),R=u.insert(()=>M,":first-child"),D=u.insert(()=>C);if(e.icon){let P=u.append("g");P.html(`${await _f(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let A=P.node().getBBox(),N=A.width,F=A.height,B=A.x,V=A.y;P.attr("transform",`translate(${-N/2-B},${p?h.height/2+T/2-F/2-V:-h.height/2-T/2-F/2-V})`),P.attr("style",`color: ${w.get("stroke")??v};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+T/2:-h.height/2-T/2})`),Kt(e,D),e.intersect=function(P){if(ie.info("iconSquare intersect",e,P),!e.label)return Gt.rect(e,P);let A=e.x??0,N=e.y??0,F=e.height??0,B=[];return p?B=[{x:A-h.width/2,y:N-F/2},{x:A+h.width/2,y:N-F/2},{x:A+h.width/2,y:N-F/2+h.height+T},{x:A+m/2,y:N-F/2+h.height+T},{x:A+m/2,y:N+F/2},{x:A-m/2,y:N+F/2},{x:A-m/2,y:N-F/2+h.height+T},{x:A-h.width/2,y:N-F/2+h.height+T}]:B=[{x:A-m/2,y:N-F/2},{x:A+m/2,y:N-F/2},{x:A+m/2,y:N-F/2+g},{x:A+h.width/2,y:N-F/2+g},{x:A+h.width/2/2,y:N+F/2},{x:A-h.width/2,y:N+F/2},{x:A-h.width/2,y:N-F/2+g},{x:A-m/2,y:N-F/2+g}],Gt.polygon(e,B,P)},u}async function Jye(t,e,{config:{flowchart:r}}){let n=new Image;n.src=e?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;let{labelStyles:s}=rr(e);e.labelStyle=s;let o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let l=Math.max(e.label?o??0:0,e?.assetWidth??i),u=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,h=e.constraint==="on"?u/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(u,o??0);let{shapeSvg:f,bbox:d,label:p}=await pr(t,e,"image-shape default"),g=e.pos==="t",m=-u/2,v=-h/2,y=e.label?8:0,w=lt.svg(f),k=Zt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let E=w.rectangle(m,v,u,h,k),T=Math.max(u,d.width),S=h+d.height+y,L=w.rectangle(-T/2,-S/2,T,S,{...k,fill:"none",stroke:"none"}),_=f.insert(()=>E,":first-child"),M=f.insert(()=>L);if(e.img){let I=f.append("image");I.attr("href",e.img),I.attr("width",u),I.attr("height",h),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-u/2},${g?S/2-h:-S/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-y/2:h/2-d.height/2+y/2})`),_.attr("transform",`translate(0,${g?d.height/2+y/2:-d.height/2-y/2})`),Kt(e,M),e.intersect=function(I){if(ie.info("iconSquare intersect",e,I),!e.label)return Gt.rect(e,I);let O=e.x??0,C=e.y??0,R=e.height??0,D=[];return g?D=[{x:O-d.width/2,y:C-R/2},{x:O+d.width/2,y:C-R/2},{x:O+d.width/2,y:C-R/2+d.height+y},{x:O+u/2,y:C-R/2+d.height+y},{x:O+u/2,y:C+R/2},{x:O-u/2,y:C+R/2},{x:O-u/2,y:C-R/2+d.height+y},{x:O-d.width/2,y:C-R/2+d.height+y}]:D=[{x:O-u/2,y:C-R/2},{x:O+u/2,y:C-R/2},{x:O+u/2,y:C-R/2+h},{x:O+d.width/2,y:C-R/2+h},{x:O+d.width/2/2,y:C+R/2},{x:O-d.width/2,y:C+R/2},{x:O-d.width/2,y:C-R/2+h},{x:O-u/2,y:C-R/2+h}],Gt.polygon(e,D,I)},f}async function ebe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),o=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=lt.svg(i),d=Zt(e,{}),p=Gr(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=jf(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Kt(e,u),e.intersect=function(f){return Gt.polygon(e,l,f)},i}async function X6(t,e,r){let{labelStyles:n,nodeStyles:i}=rr(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await pr(t,e,vr(e)),o=Math.max(s.width+r.labelPaddingX*2,e?.width||0),l=Math.max(s.height+r.labelPaddingY*2,e?.height||0),u=-o/2,h=-l/2,f,{rx:d,ry:p}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),e.look==="handDrawn"){let m=lt.svg(a),v=Zt(e,{}),y=d||p?m.path(Yf(u,h,o,l,d||0),v):m.rectangle(u,h,o,l,v);f=a.insert(()=>y,":first-child"),f.attr("class","basic label-container").attr("style",Os(g))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",Os(d)).attr("ry",Os(p)).attr("x",u).attr("y",h).attr("width",o).attr("height",l);return Kt(e,f),e.intersect=function(m){return Gt.rect(e,m)},a}async function tbe(t,e){let{shapeSvg:r,bbox:n,label:i}=await pr(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Kt(e,a),e.intersect=function(l){return Gt.rect(e,l)},r}async function rbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=lt.svg(i),d=Zt(e,{}),p=Gr(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=jf(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Kt(e,u),e.intersect=function(f){return Gt.polygon(e,l,f)},i}async function nbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=lt.svg(i),d=Zt(e,{}),p=Gr(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=jf(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Kt(e,u),e.intersect=function(f){return Gt.polygon(e,l,f)},i}function ibe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",vr(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=7,u=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=lt.svg(i),f=Zt(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=Gr(u),p=h.path(d,f),g=i.insert(()=>p,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${s/2},${-o})`),Kt(e,g),e.intersect=function(m){return ie.info("lightningBolt intersect",e,m),Gt.polygon(e,u,m)},i}async function abe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0),e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(a.height+u+(e.padding??0),e.height??0),f=h*.1,d,{cssStyles:p}=e;if(e.look==="handDrawn"){let g=lt.svg(i),m=Hut(0,0,o,h,l,u,f),v=qut(0,u,o,h,l,u),y=Zt(e,{}),w=g.path(m,y),k=g.path(v,y);i.insert(()=>k,":first-child").attr("class","line"),d=i.insert(()=>w,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let g=Uut(0,0,o,h,l,u,f);d=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Os(p)).attr("style",n)}return d.attr("label-offset-y",u),d.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),Kt(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+u-(a.y-(a.top??0))})`),e.intersect=function(g){let m=Gt.rect(e,g),v=m.x-(e.x??0);if(l!=0&&(Math.abs(v)<(e.width??0)/2||Math.abs(v)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-u)){let y=u*u*(1-v*v/(l*l));y>0&&(y=Math.sqrt(y)),y=u-y,g.y-(e.y??0)>0&&(y=-y),m.y+=y}return m},i}async function sbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,{cssStyles:f}=e,d=lt.svg(i),p=Zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Tp(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,u,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=d.polygon(g.map(y=>[y.x,y.y]),p),v=i.insert(()=>m,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),Kt(e,v),e.intersect=function(y){return Gt.polygon(e,g,y)},i}async function obe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=lt.svg(i),g=Zt(e,{}),m=[{x:h-u,y:f+u},{x:h-u,y:f+l+u},{x:h+o-u,y:f+l+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f+l-u},{x:h+o+u,y:f+l-u},{x:h+o+u,y:f-u},{x:h+u,y:f-u},{x:h+u,y:f},{x:h,y:f},{x:h,y:f+u}],v=[{x:h,y:f+u},{x:h+o-u,y:f+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f},{x:h,y:f}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Gr(m),w=p.path(y,g),k=Gr(v),E=p.path(k,{...g,fill:"none"}),T=i.insert(()=>E,":first-child");return T.insert(()=>w,":first-child"),T.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)+u-(a.y-(a.top??0))})`),Kt(e,T),e.intersect=function(S){return Gt.polygon(e,m,S)},i}async function lbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,f=-o/2,d=-h/2,p=5,{cssStyles:g}=e,m=Tp(f-p,d+h+p,f+o-p,d+h+p,u,.8),v=m?.[m.length-1],y=[{x:f-p,y:d+p},{x:f-p,y:d+h+p},...m,{x:f+o-p,y:v.y-p},{x:f+o,y:v.y-p},{x:f+o,y:v.y-2*p},{x:f+o+p,y:v.y-2*p},{x:f+o+p,y:d-p},{x:f+p,y:d-p},{x:f+p,y:d},{x:f,y:d},{x:f,y:d+p}],w=[{x:f,y:d+p},{x:f+o-p,y:d+p},{x:f+o-p,y:v.y-p},{x:f+o,y:v.y-p},{x:f+o,y:d},{x:f,y:d}],k=lt.svg(i),E=Zt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let T=Gr(y),S=k.path(T,E),L=Gr(w),_=k.path(L,E),M=i.insert(()=>S,":first-child");return M.insert(()=>_),M.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-u/2-(a.y-(a.top??0))})`),Kt(e,M),e.intersect=function(I){return Gt.polygon(e,y,I)},i}async function cbe(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=rr(e);e.labelStyle=n,e.useHtmlLabels||rn().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:o}=await pr(t,e,vr(e)),l=Math.max(o.width+(e.padding??0)*2,e?.width??0),u=Math.max(o.height+(e.padding??0)*2,e?.height??0),h=-l/2,f=-u/2,{cssStyles:d}=e,p=lt.svg(s),g=Zt(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=p.rectangle(h,f,l,u,g),v=s.insert(()=>m,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Kt(e,v),e.intersect=function(y){return Gt.rect(e,y)},s}async function ube(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=a.width+e.padding,o=a.height+e.padding,l=s+o,u=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=lt.svg(i),p=Zt(e,{}),g=Wut(0,0,l),m=d.path(g,p);h=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),f&&h.attr("style",f)}else h=jf(i,l,l,u);return n&&h.attr("style",n),Kt(e,h),e.intersect=function(d){return ie.debug(`APA12 Intersect called SPLIT point:`,d,` node: `,e,` res:`,Gt.polygon(e,u,d)),Gt.polygon(e,u,d)},i}async function hbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),u=-o/2,h=-l/2,f=h/2,d=[{x:u+f,y:h},{x:u,y:0},{x:u+f,y:-h},{x:-u,y:-h},{x:-u,y:h}],{cssStyles:p}=e,g=lt.svg(i),m=Zt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let v=Gr(d),y=g.path(v,m),w=i.insert(()=>y,":first-child");return w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),w.attr("transform",`translate(${-f/2},0)`),s.attr("transform",`translate(${-f/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Kt(e,w),e.intersect=function(k){return Gt.polygon(e,d,k)},i}async function fbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=e.description,u=e.label,h=o.node().appendChild(await Ep(u,e.labelStyle,!0,!0)),f={width:0,height:0};if(gn(Te()?.flowchart?.htmlLabels)){let _=h.children[0],M=Je(h);f=_.getBoundingClientRect(),M.attr("width",f.width),M.attr("height",f.height)}ie.info("Text 2",l);let d=l||[],p=h.getBBox(),g=o.node().appendChild(await Ep(d.join?d.join("
    "):d,e.labelStyle,!0,!0)),m=g.children[0],v=Je(g);f=m.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height);let y=(e.padding||0)/2;Je(g).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+y+5)+")"),Je(h).attr("transform","translate( "+(f.width(ie.debug("Rough node insert CXC",I),O),":first-child"),S=a.insert(()=>(ie.debug("Rough node insert CXC",I),I),":first-child")}else S=s.insert("rect",":first-child"),L=s.insert("line"),S.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-y).attr("y",-f.height/2-y).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),L.attr("class","divider").attr("x1",-f.width/2-y).attr("x2",f.width/2+y).attr("y1",-f.height/2-y+p.height+y).attr("y2",-f.height/2-y+p.height+y);return Kt(e,S),e.intersect=function(_){return Gt.rect(e,_)},a}async function dbe(t,e){let r={rx:5,ry:5,classes:"",labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return X6(t,e,r)}async function pbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=e?.padding??0,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=-a.width/2-o,f=-a.height/2-o,{cssStyles:d}=e,p=lt.svg(i),g=Zt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:h,y:f},{x:h+l+8,y:f},{x:h+l+8,y:f+u},{x:h-8,y:f+u},{x:h-8,y:f},{x:h,y:f},{x:h,y:f+u}],v=p.polygon(m.map(w=>[w.x,w.y]),g),y=i.insert(()=>v,":first-child");return y.attr("class","basic label-container").attr("style",Os(d)),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-(a.y-(a.top??0))})`),Kt(e,y),e.intersect=function(w){return Gt.rect(e,w)},i}async function gbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=-o/2,h=-l/2,{cssStyles:f}=e,d=lt.svg(i),p=Zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:u,y:h},{x:u,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h-l/2}],m=Gr(g),v=d.path(m,p),y=i.insert(()=>v,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),Kt(e,y),e.intersect=function(w){return Gt.polygon(e,g,w)},i}async function mbe(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return X6(t,e,r)}async function vbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=a.height+e.padding,o=a.width+s/4+e.padding,l,{cssStyles:u}=e;if(e.look==="handDrawn"){let h=lt.svg(i),f=Zt(e,{}),d=Yf(-o/2,-s/2,o,s,s/2),p=h.path(d,f);l=i.insert(()=>p,":first-child"),l.attr("class","basic label-container").attr("style",Os(u))}else l=i.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return Kt(e,l),e.intersect=function(h){return Gt.rect(e,h)},i}async function ybe(t,e){return X6(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function bbe(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=rr(e);e.labelStyle=n;let{cssStyles:a}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=lt.svg(u),f=Zt(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=h.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),p=o??l,g=h.circle(0,0,5,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=u.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),i&&m.selectAll("path").attr("style",i),Kt(e,m),e.intersect=function(v){return Gt.circle(e,7,v)},u}function xbe(t,e,{config:{themeVariables:r}}){let{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let o=lt.svg(i).circle(0,0,14,Cut(n));a=i.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Kt(e,a),e.intersect=function(s){return Gt.circle(e,7,s)},i}async function wbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=(e?.padding||0)/2,o=a.width+e.padding,l=a.height+e.padding,u=-a.width/2-s,h=-a.height/2-s,f=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){let d=lt.svg(i),p=Zt(e,{}),g=d.rectangle(u-8,h,o+16,l,p),m=d.line(u,h,u,h+l,p),v=d.line(u+o,h,u+o,h+l,p);i.insert(()=>m,":first-child"),i.insert(()=>v,":first-child");let y=i.insert(()=>g,":first-child"),{cssStyles:w}=e;y.attr("class","basic label-container").attr("style",Os(w)),Kt(e,y)}else{let d=jf(i,o,l,f);n&&d.attr("style",n),Kt(e,d)}return e.intersect=function(d){return Gt.polygon(e,f,d)},i}async function kbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),o=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=-s/2,u=-o/2,h=.2*o,f=.2*o,{cssStyles:d}=e,p=lt.svg(i),g=Zt(e,{}),m=[{x:l-h/2,y:u},{x:l+s+h/2,y:u},{x:l+s+h/2,y:u+o},{x:l-h/2,y:u+o}],v=[{x:l+s-h/2,y:u+o},{x:l+s+h/2,y:u+o},{x:l+s+h/2,y:u+o-f}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Gr(m),w=p.path(y,g),k=Gr(v),E=p.path(k,{...g,fillStyle:"solid"}),T=i.insert(()=>E,":first-child");return T.insert(()=>w,":first-child"),T.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),Kt(e,T),e.intersect=function(S){return Gt.polygon(e,m,S)},i}async function Tbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=.2*o,f=.2*l,d=l+u,{cssStyles:p}=e,g=lt.svg(i),m=Zt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let v=[{x:-o/2-o/2*.1,y:d/2},...Tp(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,u,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],y=-o/2+o/2*.1,w=-d/2-f*.4,k=[{x:y+o-h,y:(w+l)*1.4},{x:y+o,y:w+l-f},{x:y+o,y:(w+l)*.9},...Tp(y+o,(w+l)*1.3,y+o-h,(w+l)*1.5,-l*.03,.5)],E=Gr(v),T=g.path(E,m),S=Gr(k),L=g.path(S,{...m,fillStyle:"solid"}),_=i.insert(()=>L,":first-child");return _.insert(()=>T,":first-child"),_.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),Kt(e,_),e.intersect=function(M){return Gt.polygon(e,v,M)},i}async function Ebe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=Math.max(a.width+e.padding,e?.width||0),o=Math.max(a.height+e.padding,e?.height||0),l=-s/2,u=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",u).attr("width",s).attr("height",o),Kt(e,h),e.intersect=function(f){return Gt.rect(e,f)},i}async function Sbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await pr(t,e,vr(e)),l=e.look==="neo"?o*2:o,u=a.height+l,h=u/2,f=h/(2.5+u/50),d=a.width+f+l,{cssStyles:p}=e,g;if(e.look==="handDrawn"){let m=lt.svg(i),v=Yut(0,0,d,u,f,h),y=jut(0,0,d,u,f,h),w=m.path(v,Zt(e,{})),k=m.path(y,Zt(e,{fill:"none"}));g=i.insert(()=>k,":first-child"),g=i.insert(()=>w,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{let m=Gut(0,0,d,u,f,h);g=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Os(p)).attr("style",n),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",f),g.attr("transform",`translate(${-d/2}, ${u/2} )`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Kt(e,g),e.intersect=function(m){let v=Gt.rect(e,m),y=v.y-(e.y??0);if(h!=0&&(Math.abs(y)<(e.height??0)/2||Math.abs(y)==(e.height??0)/2&&Math.abs(v.x-(e.x??0))>(e.width??0)/2-f)){let w=f*f*(1-y*y/(h*h));w!=0&&(w=Math.sqrt(Math.abs(w))),w=f-w,m.x-(e.x??0)>0&&(w=-w),v.x+=w}return v},i}async function Cbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=a.width+e.padding,o=a.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=lt.svg(i),d=Zt(e,{}),p=Gr(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=jf(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Kt(e,u),e.intersect=function(f){return Gt.polygon(e,l,f)},i}async function _be(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=60,o=20,l=Math.max(s,a.width+(e.padding??0)*2,e?.width??0),u=Math.max(o,a.height+(e.padding??0)*2,e?.height??0),{cssStyles:h}=e,f=lt.svg(i),d=Zt(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],g=Gr(p),m=f.path(g,d),v=i.insert(()=>m,":first-child");return v.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Kt(e,v),e.intersect=function(y){return Gt.polygon(e,p,y)},i}async function Abe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=gn(Te().flowchart?.htmlLabels),l=a.width+(e.padding??0),u=l+a.height,h=l+a.height,f=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-u}],{cssStyles:d}=e,p=lt.svg(i),g=Zt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=Gr(f),v=p.path(m,g),y=i.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),e.width=l,e.height=u,Kt(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${u/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(w){return ie.info("Triangle intersect",e,f,w),Gt.polygon(e,f,w)},i}async function Lbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/8,h=l+u,{cssStyles:f}=e,p=70-o,g=p>0?p/2:0,m=lt.svg(i),v=Zt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let y=[{x:-o/2-g,y:h/2},...Tp(-o/2-g,h/2,o/2+g,h/2,u,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],w=Gr(y),k=m.path(w,v),E=i.insert(()=>k,":first-child");return E.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u-(a.y-(a.top??0))})`),Kt(e,E),e.intersect=function(T){return Gt.polygon(e,y,T)},i}async function Mbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pr(t,e,vr(e)),s=100,o=50,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=l/u,f=l,d=u;f>d*h?d=f/h:f=d*h,f=Math.max(f,s),d=Math.max(d,o);let p=Math.min(d*.2,d/4),g=d+p*2,{cssStyles:m}=e,v=lt.svg(i),y=Zt(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let w=[{x:-f/2,y:g/2},...Tp(-f/2,g/2,f/2,g/2,p,1),{x:f/2,y:-g/2},...Tp(f/2,-g/2,-f/2,-g/2,p,-1)],k=Gr(w),E=v.path(k,y),T=i.insert(()=>E,":first-child");return T.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),Kt(e,T),e.intersect=function(S){return Gt.polygon(e,w,S)},i}async function Dbe(t,e){let{labelStyles:r,nodeStyles:n}=rr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pr(t,e,vr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=lt.svg(i),g=Zt(e,{}),m=[{x:h-u,y:f-u},{x:h-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f-u}],v=`M${h-u},${f-u} L${h+o},${f-u} L${h+o},${f+l} L${h-u},${f+l} L${h-u},${f-u} M${h-u},${f} L${h+o},${f} M${h},${f-u} L${h},${f+l}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=p.path(v,g),w=i.insert(()=>y,":first-child");return w.attr("transform",`translate(${u/2}, ${u/2})`),w.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+u/2-(a.x-(a.left??0))}, ${-(a.height/2)+u/2-(a.y-(a.top??0))})`),Kt(e,w),e.intersect=function(k){return Gt.polygon(e,m,k)},i}async function Obe(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",vr(e)).attr("id",e.domId||e.id),o=null,l=null,u=null,h=null,f=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let w=e.annotations[0];await J4(o,{text:`\xAB${w}\xBB`},0),f=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await J4(l,e,0,["font-weight: bolder"]);let g=l.node().getBBox();d=g.height,u=s.insert("g").attr("class","members-group text");let m=0;for(let w of e.members){let k=await J4(u,w,m,[w.parseClassifier()]);m+=k+a}p=u.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let v=0;for(let w of e.methods){let k=await J4(h,w,v,[w.parseClassifier()]);v+=k+a}let y=s.node().getBBox();if(o!==null){let w=o.node().getBBox();o.attr("transform",`translate(${-w.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${f})`),y=s.node().getBBox(),u.attr("transform",`translate(0, ${f+d+i*2})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${f+d+(p?p+i*4:i*2)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function J4(t,e,r,n=[]){let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=rn(),s="useHtmlLabels"in e?e.useHtmlLabels:gn(a.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),xa(o)&&(s=!0);let l=await ls(i,vF(vl(o)),{width:Fo(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),u,h=1;if(s){let f=l.children[0],d=Je(l);h=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(h+=f.innerHTML.split("").length-1);let p=f.getElementsByTagName("img");if(p){let g=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(v=>{function y(){if(m.style.display="flex",m.style.flexDirection="column",g){let w=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,E=parseInt(w,10)*5+"px";m.style.minWidth=E,m.style.maxWidth=E}else m.style.width="100%";v(m)}x(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{n.includes("font-weight: bolder")&&Je(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;let f=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(f.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=l.getBBox()}return i.attr("transform","translate(0,"+(-u.height/(2*h)+r)+")"),u.height}async function Rbe(t,e){let r=Te(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??gn(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:o,bbox:l}=await Obe(t,e,r,a,i),{labelStyles:u,nodeStyles:h}=rr(e);e.labelStyle=u,e.cssStyles=s.styles||"";let f=s.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,p=lt.svg(o),g=Zt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=l.width,v=l.height;s.members.length===0&&s.methods.length===0?v+=i:s.members.length>0&&s.methods.length===0&&(v+=i*2);let y=-m/2,w=-v/2,k=p.rectangle(y-n,w-n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0),m+2*n,v+2*n+(d?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),E=o.insert(()=>k,":first-child");E.attr("class","basic label-container");let T=E.node().getBBox();o.selectAll(".text").each((M,I,O)=>{let C=Je(O[I]),R=C.attr("transform"),D=0;if(R){let F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);F&&(D=parseFloat(F[2]))}let P=D+w+n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(P-=4);let A=y;(C.attr("class").includes("label-group")||C.attr("class").includes("annotation-group"))&&(A=-C.node()?.getBBox().width/2||0,o.selectAll("text").each(function(N,F,B){window.getComputedStyle(B[F]).textAnchor==="middle"&&(A=0)})),C.attr("transform",`translate(${A}, ${P})`)});let S=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,L=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,_=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){let M=p.line(T.x,S+L+w+n,T.x+T.width,S+L+w+n,g);o.insert(()=>M).attr("class","divider").attr("style",f)}if(d||s.members.length>0||s.methods.length>0){let M=p.line(T.x,S+L+_+w+i*2+n,T.x+T.width,S+L+_+w+n+i*2,g);o.insert(()=>M).attr("class","divider").attr("style",f)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",f),E.select(":nth-child(2)").attr("style",f),o.selectAll(".divider").select("path").attr("style",f),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",f),!a){let M=RegExp(/color\s*:\s*([^;]*)/),I=M.exec(f);if(I){let O=I[0].replace("color","fill");o.selectAll("tspan").attr("style",O)}else if(u){let O=M.exec(u);if(O){let C=O[0].replace("color","fill");o.selectAll("tspan").attr("style",C)}}}return Kt(e,E),e.intersect=function(M){return Gt.rect(e,M)},o}async function Ibe(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=rr(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:o,bbox:l,label:u}=await pr(t,e,vr(e)),h=e.padding||10,f="",d;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,m;d?{label:g,bbox:m}=await dV(d,"ticket"in e&&e.ticket||"",p):{label:g,bbox:m}=await dV(o,"ticket"in e&&e.ticket||"",p);let{label:v,bbox:y}=await dV(o,"assigned"in e&&e.assigned||"",p);e.width=s;let w=10,k=e?.width||0,E=Math.max(m.height,y.height)/2,T=Math.max(l.height+w*2,e?.height||0)+E,S=-k/2,L=-T/2;u.attr("transform","translate("+(h-k/2)+", "+(-E-l.height/2)+")"),g.attr("transform","translate("+(h-k/2)+", "+(-E+l.height/2)+")"),v.attr("transform","translate("+(h+k/2-y.width-2*a)+", "+(-E+l.height/2)+")");let _,{rx:M,ry:I}=e,{cssStyles:O}=e;if(e.look==="handDrawn"){let C=lt.svg(o),R=Zt(e,{}),D=M||I?C.path(Yf(S,L,k,T,M||0),R):C.rectangle(S,L,k,T,R);_=o.insert(()=>D,":first-child"),_.attr("class","basic label-container").attr("style",O||null)}else{_=o.insert("rect",":first-child"),_.attr("class","basic label-container __APA__").attr("style",i).attr("rx",M??5).attr("ry",I??5).attr("x",S).attr("y",L).attr("width",k).attr("height",T);let C="priority"in e&&e.priority;if(C){let R=o.append("line"),D=S+2,P=L+Math.floor((M??0)/2),A=L+T-Math.floor((M??0)/2);R.attr("x1",D).attr("y1",P).attr("x2",D).attr("y2",A).attr("stroke-width","4").attr("stroke",Xut(C))}}return Kt(e,_),e.height=T,e.intersect=function(C){return Gt.rect(e,C)},o}function vV(t){return t in Nbe}async function $g(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?Nbe[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),K6.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var pr,dV,Kt,vr,Eut,uy,Sut,Ep,Yf,Cut,hy,_ut,rr,Zt,xye,Aut,Lut,Mut,Dut,Out,Rut,wye,fy,kye,Iut,Sye,Nut,Put,Fut,Gt,But,zut,$ut,Vut,Uut,Hut,qut,Wut,Gut,Yut,jut,Xut,Kut,Zut,Nbe,K6,Pbe,Fbe,e3,lu=$(()=>{b();Kc();Kl();ro();Qn();Sr();Cr();Cr();er();Cr();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();Cr();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();er();Cr();er();Cr();er();pr=x(async(t,e,r)=>{let n,i=e.useHtmlLabels||gn(Te()?.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",Os(e.labelStyle)),o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];let l=await ls(s,Nr(vl(o),Te()),{useHtmlLabels:i,width:e.width||Te().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),u=l.getBBox(),h=(e?.padding??0)/2;if(i){let f=l.children[0],d=Je(l),p=f.getElementsByTagName("img");if(p){let g=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(v=>{function y(){if(m.style.display="flex",m.style.flexDirection="column",g){let w=Te().fontSize?Te().fontSize:window.getComputedStyle(document.body).fontSize,k=5,[E=Er.fontSize]=sc(w),T=E*k+"px";m.style.minWidth=T,m.style.maxWidth=T}else m.style.width="100%";v(m)}x(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}return i?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:h,label:s}},"labelHelper"),dV=x(async(t,e,r)=>{let n=r.useHtmlLabels||gn(Te()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ls(i,Nr(vl(e),Te()),{useHtmlLabels:n,width:r.width||Te()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2;if(gn(Te()?.flowchart?.htmlLabels)){let l=a.children[0],u=Je(a);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),Kt=x((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),vr=x((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");x(Gr,"createPathFromPoints");x(Tp,"generateFullSineWavePoints");x(mV,"generateCirclePoints");Eut=x((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),uy=Eut;x(yye,"applyStyle");x(bye,"addHtmlLabel");Sut=x(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),gn(Te().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),ie.info("vertexText"+i);let a={isNode:n,label:vl(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:e&&e.replace("fill:","color:")};return await bye(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Ep=Sut,Yf=x((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),Cut=x(t=>{let{handDrawnSeed:e}=Te();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),hy=x(t=>{let e=_ut([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),_ut=x(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),rr=x(t=>{let{stylesArray:e}=hy(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let o=s[0];o==="color"||o==="font-size"||o==="font-family"||o==="font-weight"||o==="font-style"||o==="text-decoration"||o==="text-align"||o==="text-transform"||o==="line-height"||o==="letter-spacing"||o==="word-spacing"||o==="text-shadow"||o==="text-overflow"||o==="white-space"||o==="word-wrap"||o==="word-break"||o==="overflow-wrap"||o==="hyphens"?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),Zt=x((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=Te(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=hy(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),xye=x(async(t,e)=>{ie.info("Creating subgraph rect for ",e.id,e);let r=Te(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=rr(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=gn(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),g=await ls(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0}),m=g.getBBox();if(gn(r.flowchart.htmlLabels)){let L=g.children[0],_=Je(g);m=L.getBoundingClientRect(),_.attr("width",m.width),_.attr("height",m.height)}let v=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let y=e.height,w=e.x-v/2,k=e.y-y/2;ie.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){let L=lt.svg(f),_=Zt(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),M=L.path(Yf(w,k,v,y,0),_);E=f.insert(()=>(ie.debug("Rough node insert CXC",M),M),":first-child"),E.select("path:nth-child(2)").attr("style",u.join(";")),E.select("path").attr("style",h.join(";").replace("fill","stroke"))}else E=f.insert("rect",":first-child"),E.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",w).attr("y",k).attr("width",v).attr("height",y);let{subGraphTitleTopMargin:T}=Af(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+T})`),o){let L=p.select("span");L&&L.attr("style",o)}let S=E.node().getBBox();return e.offsetX=0,e.width=S.width,e.height=S.height,e.offsetY=m.height-e.padding/2,e.intersect=function(L){return uy(e,L)},{cluster:f,labelBBox:m}},"rect"),Aut=x((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return uy(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Lut=x(async(t,e)=>{let r=Te(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=f.node().appendChild(await Ep(e.label,e.labelStyle,void 0,!0)),g=p.getBBox();if(gn(r.flowchart.htmlLabels)){let M=p.children[0],I=Je(p);g=M.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}let m=0*e.padding,v=m/2,y=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+m;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;let w=e.height+m,k=e.height+m-g.height-6,E=e.x-y/2,T=e.y-w/2;e.width=y;let S=e.y-e.height/2-v+g.height+2,L;if(e.look==="handDrawn"){let M=e.cssClasses.includes("statediagram-cluster-alt"),I=lt.svg(u),O=e.rx||e.ry?I.path(Yf(E,T,y,w,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):I.rectangle(E,T,y,w,{seed:i});L=u.insert(()=>O,":first-child");let C=I.rectangle(E,S,y,k,{fill:M?a:s,fillStyle:M?"hachure":"solid",stroke:l,seed:i});L=u.insert(()=>O,":first-child"),d=u.insert(()=>C)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",E).attr("y",T).attr("width",y).attr("height",w).attr("data-look",e.look),d.attr("class","inner").attr("x",E).attr("y",S).attr("width",y).attr("height",k);f.attr("transform",`translate(${e.x-g.width/2}, ${T+1-(gn(r.flowchart.htmlLabels)?0:3)})`);let _=L.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(M){return uy(e,M)},{cluster:u,labelBBox:g}},"roundedWithTitle"),Mut=x(async(t,e)=>{ie.info("Creating subgraph rect for ",e.id,e);let r=Te(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=rr(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=gn(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),g=await ls(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}),m=g.getBBox();if(gn(r.flowchart.htmlLabels)){let L=g.children[0],_=Je(g);m=L.getBoundingClientRect(),_.attr("width",m.width),_.attr("height",m.height)}let v=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let y=e.height,w=e.x-v/2,k=e.y-y/2;ie.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){let L=lt.svg(f),_=Zt(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),M=L.path(Yf(w,k,v,y,e.rx),_);E=f.insert(()=>(ie.debug("Rough node insert CXC",M),M),":first-child"),E.select("path:nth-child(2)").attr("style",u.join(";")),E.select("path").attr("style",h.join(";").replace("fill","stroke"))}else E=f.insert("rect",":first-child"),E.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",w).attr("y",k).attr("width",v).attr("height",y);let{subGraphTitleTopMargin:T}=Af(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+T})`),o){let L=p.select("span");L&&L.attr("style",o)}let S=E.node().getBBox();return e.offsetX=0,e.width=S.width,e.height=S.height,e.offsetY=m.height-e.padding/2,e.intersect=function(L){return uy(e,L)},{cluster:f,labelBBox:m}},"kanbanSection"),Dut=x((t,e)=>{let r=Te(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,u=e.width+l;e.diff=-e.padding;let h=e.height+l,f=e.x-u/2,d=e.y-h/2;e.width=u;let p;if(e.look==="handDrawn"){let v=lt.svg(s).rectangle(f,d,u,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert(()=>v,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("data-look",e.look);let g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(m){return uy(e,m)},{cluster:s,labelBBox:{}}},"divider"),Out=xye,Rut={rect:xye,squareRect:Out,roundedWithTitle:Lut,noteGroup:Aut,divider:Dut,kanbanSection:Mut},wye=new Map,fy=x(async(t,e)=>{let r=e.shape||"rect",n=await Rut[r](t,e);return wye.set(e.id,n),n},"insertCluster"),kye=x(()=>{wye=new Map},"clear");x(Tye,"intersectNode");Iut=Tye;x(Eye,"intersectEllipse");Sye=Eye;x(Cye,"intersectCircle");Nut=Cye;x(_ye,"intersectLine");x(pV,"sameSign");Put=_ye;x(Aye,"intersectPolygon");Fut=Aye,Gt={node:Iut,circle:Nut,ellipse:Sye,polygon:Fut,rect:uy};x(Lye,"anchor");x(gV,"generateArcPoints");x(Mye,"bowTieRect");x(jf,"insertPolygonShape");x(Dye,"card");x(Oye,"choice");x(Rye,"circle");x(Iye,"createLine");x(Nye,"crossedCircle");x(Wf,"generateCirclePoints");x(Pye,"curlyBraceLeft");x(Gf,"generateCirclePoints");x(Fye,"curlyBraceRight");x(cs,"generateCirclePoints");x(Bye,"curlyBraces");x(zye,"curvedTrapezoid");But=x((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),zut=x((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),$ut=x((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");x($ye,"cylinder");x(Vye,"dividedRectangle");x(Uye,"doublecircle");x(Hye,"filledCircle");x(qye,"flippedTriangle");x(Wye,"forkJoin");x(Gye,"halfRoundedRectangle");Vut=x((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");x(Yye,"hexagon");x(jye,"hourglass");x(Xye,"icon");x(Kye,"iconCircle");x(Zye,"iconRounded");x(Qye,"iconSquare");x(Jye,"imageSquare");x(ebe,"inv_trapezoid");x(X6,"drawRect");x(tbe,"labelRect");x(rbe,"lean_left");x(nbe,"lean_right");x(ibe,"lightningBolt");Uut=x((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Hut=x((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),qut=x((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");x(abe,"linedCylinder");x(sbe,"linedWaveEdgedRect");x(obe,"multiRect");x(lbe,"multiWaveEdgedRectangle");x(cbe,"note");Wut=x((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");x(ube,"question");x(hbe,"rect_left_inv_arrow");x(fbe,"rectWithTitle");x(dbe,"roundedRect");x(pbe,"shadedProcess");x(gbe,"slopedRect");x(mbe,"squareRect");x(vbe,"stadium");x(ybe,"state");x(bbe,"stateEnd");x(xbe,"stateStart");x(wbe,"subroutine");x(kbe,"taggedRect");x(Tbe,"taggedWaveEdgedRectangle");x(Ebe,"text");Gut=x((t,e,r,n,i,a)=>`M${t},${e} a${i},${a} 0,0,1 0,${-n} l${r},0 a${i},${a} 0,0,1 0,${n} M${r},${-n} a${i},${a} 0,0,0 0,${n} l${-r},0`,"createCylinderPathD"),Yut=x((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),jut=x((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");x(Sbe,"tiltedCylinder");x(Cbe,"trapezoid");x(_be,"trapezoidalPentagon");x(Abe,"triangle");x(Lbe,"waveEdgedRectangle");x(Mbe,"waveRectangle");x(Dbe,"windowPane");x(Obe,"textHelper");x(J4,"addText");x(Rbe,"classBox");Xut=x(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");x(Ibe,"kanbanItem");Kut=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:mbe},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:dbe},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:vbe},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:wbe},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:$ye},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Rye},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:ube},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Yye},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:nbe},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:rbe},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Cbe},{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:ebe},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Uye},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ebe},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Dye},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:pbe},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:xbe},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:bbe},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Wye},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:jye},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Pye},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Fye},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Bye},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ibe},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Lbe},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Gye},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Sbe},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:abe},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:zye},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Vye},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Abe},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Dbe},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Hye},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:_be},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:qye},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:gbe},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:lbe},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:obe},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Mye},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Nye},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Tbe},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:kbe},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Mbe},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:hbe},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:sbe}],Zut=x(()=>{let e=[...Object.entries({state:ybe,choice:Oye,note:cbe,rectWithTitle:fbe,labelRect:tbe,iconSquare:Qye,iconCircle:Kye,icon:Xye,iconRounded:Zye,imageSquare:Jye,anchor:Lye,kanbanItem:Ibe,classBox:Rbe}),...Kut.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Nbe=Zut();x(vV,"isValidShape");K6=new Map;x($g,"insertNode");Pbe=x((t,e)=>{K6.set(e.id,t)},"setNodeElem"),Fbe=x(()=>{K6.clear()},"clear"),e3=x(t=>{let e=K6.get(t.id);ie.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});function t3(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=wi(t),e=wi(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}var oc,wi,Z6,gh=$(()=>{b();Sr();oc={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};x(t3,"calculateDeltaAndAngle");wi=x(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),Z6=x(t=>({x:x(function(e,r,n){let i=0,a=wi(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(oc,t.arrowTypeEnd)){let{angle:p,deltaX:g}=t3(n[n.length-1],n[n.length-2]);i=oc[t.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}let s=Math.abs(wi(e).x-wi(n[n.length-1]).x),o=Math.abs(wi(e).y-wi(n[n.length-1]).y),l=Math.abs(wi(e).x-wi(n[0]).x),u=Math.abs(wi(e).y-wi(n[0]).y),h=oc[t.arrowTypeStart],f=oc[t.arrowTypeEnd],d=1;if(s0&&o0&&u=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(oc,t.arrowTypeEnd)){let{angle:p,deltaY:g}=t3(n[n.length-1],n[n.length-2]);i=oc[t.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}let s=Math.abs(wi(e).y-wi(n[n.length-1]).y),o=Math.abs(wi(e).x-wi(n[n.length-1]).x),l=Math.abs(wi(e).y-wi(n[0]).y),u=Math.abs(wi(e).x-wi(n[0]).x),h=oc[t.arrowTypeStart],f=oc[t.arrowTypeEnd],d=1;if(s0&&o0&&u5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}var Qut,Jut,Bbe,Q6,us,Vbe,r3,J6,eA,eht,tht,zbe,$be,rht,tA,nht,iht,aht,sht,oht,lht,cht,uht,hht,fht,dht,rA,Xf=$(()=>{b();lu();gh();Kl();ro();Qn();Sr();Cr();er();Qut=x((t,e,r,n,i)=>{e.arrowTypeStart&&Bbe(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&Bbe(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),Jut={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Bbe=x((t,e,r,n,i,a)=>{let s=Jut[r];if(!s){ie.warn(`Unknown arrow type: ${r}`);return}let o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),Q6=new Map,us=new Map,Vbe=x(()=>{Q6.clear(),us.clear()},"clear"),r3=x(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),J6=x(async(t,e)=>{let r=gn(Te().flowchart.htmlLabels),n=await ls(t,e.label,{style:r3(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});ie.info("abc82",e,e.labelType);let i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s=n.getBBox();if(r){let l=n.children[0],u=Je(n);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Q6.set(e.id,i),e.width=s.width,e.height=s.height;let o;if(e.startLabelLeft){let l=await Ep(e.startLabelLeft,r3(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),us.get(e.id)||us.set(e.id,{}),us.get(e.id).startLeft=u,n3(o,e.startLabelLeft)}if(e.startLabelRight){let l=await Ep(e.startLabelRight,r3(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=u.node().appendChild(l),h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),us.get(e.id)||us.set(e.id,{}),us.get(e.id).startRight=u,n3(o,e.startLabelRight)}if(e.endLabelLeft){let l=await Ep(e.endLabelLeft,r3(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),us.get(e.id)||us.set(e.id,{}),us.get(e.id).endLeft=u,n3(o,e.endLabelLeft)}if(e.endLabelRight){let l=await Ep(e.endLabelRight,r3(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),us.get(e.id)||us.set(e.id,{}),us.get(e.id).endRight=u,n3(o,e.endLabelRight)}return n},"insertEdgeLabel");x(n3,"setTerminalWidth");eA=x((t,e)=>{ie.debug("Moving label abc88 ",t.id,t.label,Q6.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=Te(),{subGraphTitleTotalMargin:i}=Af(n);if(t.label){let a=Q6.get(t.id),s=t.x,o=t.y;if(r){let l=tr.calcLabelPosition(r);ie.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=us.get(t.id).startLeft,s=t.x,o=t.y;if(r){let l=tr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=us.get(t.id).startRight,s=t.x,o=t.y;if(r){let l=tr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=us.get(t.id).endLeft,s=t.x,o=t.y;if(r){let l=tr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=us.get(t.id).endRight,s=t.x,o=t.y;if(r){let l=tr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),eht=x((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),tht=x((t,e,r)=>{ie.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{ie.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(ie.info("abc88 checking point",a,e),!eht(e,a)&&!i){let s=tht(e,n,a);ie.debug("abc88 inside",a,n,s),ie.debug("abc88 intersection",s,e);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?ie.warn("abc88 no intersect",s,r):r.push(s),i=!0}else ie.warn("abc88 outside",a,n),n=a,i||r.push(a)}),ie.debug("returning points",r),r},"cutPathAtIntersect");x(Ube,"extractCornerPoints");$be=x(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),rht=x(function(t){let{cornerPointPositions:e}=Ube(t),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){ie.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let p=5;s.x===o.x?d={x:u<0?o.x-p+f:o.x+p-f,y:h<0?o.y-f:o.y+f}:d={x:u<0?o.x-f:o.x+f,y:h<0?o.y-p+f:o.y+p-f}}else ie.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(d,l)}else r.push(t[n]);return r},"fixCorners"),tA=x(function(t,e,r,n,i,a,s){let{handDrawnSeed:o}=Te(),l=e.points,u=!1,h=i;var f=a;f.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),ie.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1]))),e.toCluster&&(ie.info("to cluster abc88",r.get(e.toCluster)),l=zbe(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(ie.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=zbe(l.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let d=l.filter(L=>!Number.isNaN(L.y));d=rht(d);let p=au;e.curve&&(p=e.curve);let{x:g,y:m}=Z6(e),v=Ro().x(g).y(m).curve(p),y;switch(e.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;case"invisible":y="edge-thickness-invisible";break;default:y="edge-thickness-normal"}switch(e.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed";break;default:y+=" edge-pattern-solid"}let w,k=v(d),E=Array.isArray(e.style)?e.style:[e.style];if(e.look==="handDrawn"){let L=lt.svg(t);Object.assign([],d);let _=L.path(k,{roughness:.3,seed:o});y+=" transition",w=Je(_).select("path").attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",E?E.reduce((I,O)=>I+";"+O,""):"");let M=w.attr("d");w.attr("d",M),t.node().appendChild(w.node())}else w=t.append("path").attr("d",k).attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",E?E.reduce((L,_)=>L+";"+_,""):"");let T="";(Te().flowchart.arrowMarkerAbsolute||Te().state.arrowMarkerAbsolute)&&(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,T=T.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),ie.info("arrowTypeStart",e.arrowTypeStart),ie.info("arrowTypeEnd",e.arrowTypeEnd),Qut(w,e,T,s,n);let S={};return u&&(S.updatedPath=l),S.originalPath=e.points,S},"insertEdge"),nht=x((t,e,r,n)=>{e.forEach(i=>{dht[i](t,r,n)})},"insertMarkers"),iht=x((t,e,r)=>{ie.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),aht=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),sht=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),oht=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lht=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),cht=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),uht=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),hht=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),fht=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),dht={extension:iht,composition:aht,aggregation:sht,dependency:oht,lollipop:lht,point:cht,circle:uht,cross:hht,barb:fht},rA=nht});function ght(t){return typeof t=="symbol"||Pi(t)&&os(t)==pht}var pht,xl,Vg=$(()=>{b();zf();tc();pht="[object Symbol]";xl=ght});function mht(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{b();$o=mht});function Wbe(t){if(typeof t=="string")return t;if(Bt(t))return $o(t,Wbe)+"";if(xl(t))return qbe?qbe.call(t):"";var e=t+"";return e=="0"&&1/t==-vht?"-0":e}var vht,Hbe,qbe,Gbe,Ybe=$(()=>{b();Mg();Ug();xi();Vg();vht=1/0,Hbe=qa?qa.prototype:void 0,qbe=Hbe?Hbe.toString:void 0;Gbe=Wbe});function bht(t){for(var e=t.length;e--&&yht.test(t.charAt(e)););return e}var yht,jbe,Xbe=$(()=>{b();yht=/\s/;jbe=bht});function wht(t){return t&&t.slice(0,jbe(t)+1).replace(xht,"")}var xht,Kbe,Zbe=$(()=>{b();Xbe();xht=/^\s+/;Kbe=wht});function Cht(t){if(typeof t=="number")return t;if(xl(t))return Qbe;if(Hn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Hn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Kbe(t);var r=Tht.test(t);return r||Eht.test(t)?Sht(t.slice(2),r?2:8):kht.test(t)?Qbe:+t}var Qbe,kht,Tht,Eht,Sht,Jbe,e2e=$(()=>{b();Zbe();gl();Vg();Qbe=NaN,kht=/^[-+]0x[0-9a-f]+$/i,Tht=/^0b[01]+$/i,Eht=/^0o[0-7]+$/i,Sht=parseInt;Jbe=Cht});function Aht(t){if(!t)return t===0?t:0;if(t=Jbe(t),t===t2e||t===-t2e){var e=t<0?-1:1;return e*_ht}return t===t?t:0}var t2e,_ht,dy,yV=$(()=>{b();e2e();t2e=1/0,_ht=17976931348623157e292;dy=Aht});function Lht(t){var e=dy(t),r=e%1;return e===e?r?e-r:e:0}var mh,py=$(()=>{b();yV();mh=Lht});var Mht,nA,r2e=$(()=>{b();dp();Jl();Mht=Io(qi,"WeakMap"),nA=Mht});function Dht(){}var Fi,bV=$(()=>{b();Fi=Dht});function Oht(t,e){for(var r=-1,n=t==null?0:t.length;++r{b();iA=Oht});function Rht(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{b();aA=Rht});function Iht(t){return t!==t}var n2e,i2e=$(()=>{b();n2e=Iht});function Nht(t,e,r){for(var n=r-1,i=t.length;++n{b();a2e=Nht});function Pht(t,e,r){return e===e?a2e(t,e,r):aA(t,n2e,r)}var gy,sA=$(()=>{b();wV();i2e();s2e();gy=Pht});function Fht(t,e){var r=t==null?0:t.length;return!!r&&gy(t,e,0)>-1}var oA,kV=$(()=>{b();sA();oA=Fht});var Bht,o2e,l2e=$(()=>{b();x$();Bht=y6(Object.keys,Object),o2e=Bht});function Vht(t){if(!fh(t))return o2e(t);var e=[];for(var r in Object(t))$ht.call(t,r)&&r!="constructor"&&e.push(r);return e}var zht,$ht,my,lA=$(()=>{b();Jv();l2e();zht=Object.prototype,$ht=zht.hasOwnProperty;my=Vht});function Uht(t){return Wi(t)?T6(t):my(t)}var Qr,vh=$(()=>{b();S$();lA();rc();Qr=Uht});var Hht,qht,Wht,hs,c2e=$(()=>{b();ny();Ng();L$();rc();Jv();vh();Hht=Object.prototype,qht=Hht.hasOwnProperty,Wht=C6(function(t,e){if(fh(e)||Wi(e)){ac(e,Qr(e),t);return}for(var r in e)qht.call(e,r)&&dh(t,r,e[r])}),hs=Wht});function jht(t,e){if(Bt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||xl(t)?!0:Yht.test(t)||!Ght.test(t)||e!=null&&t in Object(e)}var Ght,Yht,vy,cA=$(()=>{b();xi();Vg();Ght=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yht=/^\w*$/;vy=jht});function Kht(t){var e=Wv(t,function(n){return r.size===Xht&&r.clear(),n}),r=e.cache;return e}var Xht,u2e,h2e=$(()=>{b();d$();Xht=500;u2e=Kht});var Zht,Qht,Jht,f2e,d2e=$(()=>{b();h2e();Zht=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qht=/\\(\\)?/g,Jht=u2e(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Zht,function(r,n,i,a){e.push(i?a.replace(Qht,"$1"):n||r)}),e}),f2e=Jht});function eft(t){return t==null?"":Gbe(t)}var uA,TV=$(()=>{b();Ybe();uA=eft});function tft(t,e){return Bt(t)?t:vy(t,e)?[t]:f2e(uA(t))}var Sp,i3=$(()=>{b();xi();cA();d2e();TV();Sp=tft});function nft(t){if(typeof t=="string"||xl(t))return t;var e=t+"";return e=="0"&&1/t==-rft?"-0":e}var rft,yh,yy=$(()=>{b();Vg();rft=1/0;yh=nft});function ift(t,e){e=Sp(e,t);for(var r=0,n=e.length;t!=null&&r{b();i3();yy();Cp=ift});function aft(t,e,r){var n=t==null?void 0:Cp(t,e);return n===void 0?r:n}var p2e,g2e=$(()=>{b();a3();p2e=aft});function sft(t,e){for(var r=-1,n=e.length,i=t.length;++r{b();by=sft});function oft(t){return Bt(t)||su(t)||!!(m2e&&t&&t[m2e])}var m2e,v2e,y2e=$(()=>{b();Mg();ey();xi();m2e=qa?qa.isConcatSpreadable:void 0;v2e=oft});function b2e(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=v2e),i||(i=[]);++a0&&r(o)?e>1?b2e(o,e-1,r,n,i):by(i,o):n||(i[i.length]=o)}return i}var bh,xy=$(()=>{b();hA();y2e();bh=b2e});function lft(t){var e=t==null?0:t.length;return e?bh(t,1):[]}var an,fA=$(()=>{b();xy();an=lft});function cft(t){return S6(E6(t,void 0,an),t+"")}var x2e,w2e=$(()=>{b();fA();C$();A$();x2e=cft});function uft(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n{b();dA=uft});function bft(t){return yft.test(t)}var hft,fft,dft,pft,gft,mft,vft,yft,k2e,T2e=$(()=>{b();hft="\\ud800-\\udfff",fft="\\u0300-\\u036f",dft="\\ufe20-\\ufe2f",pft="\\u20d0-\\u20ff",gft=fft+dft+pft,mft="\\ufe0e\\ufe0f",vft="\\u200d",yft=RegExp("["+vft+hft+gft+mft+"]");k2e=bft});function xft(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{b();E2e=xft});function wft(t,e){return t&&ac(e,Qr(e),t)}var C2e,_2e=$(()=>{b();Ng();vh();C2e=wft});function kft(t,e){return t&&ac(e,No(e),t)}var A2e,L2e=$(()=>{b();Ng();xp();A2e=kft});function Tft(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{b();wy=Tft});function Eft(){return[]}var gA,SV=$(()=>{b();gA=Eft});var Sft,Cft,M2e,_ft,ky,mA=$(()=>{b();pA();SV();Sft=Object.prototype,Cft=Sft.propertyIsEnumerable,M2e=Object.getOwnPropertySymbols,_ft=M2e?function(t){return t==null?[]:(t=Object(t),wy(M2e(t),function(e){return Cft.call(t,e)}))}:gA,ky=_ft});function Aft(t,e){return ac(t,ky(t),e)}var D2e,O2e=$(()=>{b();Ng();mA();D2e=Aft});var Lft,Mft,vA,CV=$(()=>{b();hA();b6();mA();SV();Lft=Object.getOwnPropertySymbols,Mft=Lft?function(t){for(var e=[];t;)by(e,ky(t)),t=Qv(t);return e}:gA,vA=Mft});function Dft(t,e){return ac(t,vA(t),e)}var R2e,I2e=$(()=>{b();Ng();CV();R2e=Dft});function Oft(t,e,r){var n=e(t);return Bt(t)?n:by(n,r(t))}var yA,_V=$(()=>{b();hA();xi();yA=Oft});function Rft(t){return yA(t,Qr,ky)}var s3,AV=$(()=>{b();_V();mA();vh();s3=Rft});function Ift(t){return yA(t,No,vA)}var bA,LV=$(()=>{b();_V();CV();xp();bA=Ift});var Nft,xA,N2e=$(()=>{b();dp();Jl();Nft=Io(qi,"DataView"),xA=Nft});var Pft,wA,P2e=$(()=>{b();dp();Jl();Pft=Io(qi,"Promise"),wA=Pft});var Fft,_p,MV=$(()=>{b();dp();Jl();Fft=Io(qi,"Set"),_p=Fft});var F2e,Bft,B2e,z2e,$2e,V2e,zft,$ft,Vft,Uft,Hft,Hg,wl,qg=$(()=>{b();N2e();h6();P2e();MV();r2e();zf();u$();F2e="[object Map]",Bft="[object Object]",B2e="[object Promise]",z2e="[object Set]",$2e="[object WeakMap]",V2e="[object DataView]",zft=$f(xA),$ft=$f(mp),Vft=$f(wA),Uft=$f(_p),Hft=$f(nA),Hg=os;(xA&&Hg(new xA(new ArrayBuffer(1)))!=V2e||mp&&Hg(new mp)!=F2e||wA&&Hg(wA.resolve())!=B2e||_p&&Hg(new _p)!=z2e||nA&&Hg(new nA)!=$2e)&&(Hg=function(t){var e=os(t),r=e==Bft?t.constructor:void 0,n=r?$f(r):"";if(n)switch(n){case zft:return V2e;case $ft:return F2e;case Vft:return B2e;case Uft:return z2e;case Hft:return $2e}return e});wl=Hg});function Gft(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Wft.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var qft,Wft,U2e,H2e=$(()=>{b();qft=Object.prototype,Wft=qft.hasOwnProperty;U2e=Gft});function Yft(t,e){var r=e?Zv(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var q2e,W2e=$(()=>{b();g6();q2e=Yft});function Xft(t){var e=new t.constructor(t.source,jft.exec(t));return e.lastIndex=t.lastIndex,e}var jft,G2e,Y2e=$(()=>{b();jft=/\w*$/;G2e=Xft});function Kft(t){return X2e?Object(X2e.call(t)):{}}var j2e,X2e,K2e,Z2e=$(()=>{b();Mg();j2e=qa?qa.prototype:void 0,X2e=j2e?j2e.valueOf:void 0;K2e=Kft});function mdt(t,e,r){var n=t.constructor;switch(e){case adt:return Zv(t);case Zft:case Qft:return new n(+t);case sdt:return q2e(t,r);case odt:case ldt:case cdt:case udt:case hdt:case fdt:case ddt:case pdt:case gdt:return m6(t,r);case Jft:return new n;case edt:case ndt:return new n(t);case tdt:return G2e(t);case rdt:return new n;case idt:return K2e(t)}}var Zft,Qft,Jft,edt,tdt,rdt,ndt,idt,adt,sdt,odt,ldt,cdt,udt,hdt,fdt,ddt,pdt,gdt,Q2e,J2e=$(()=>{b();g6();W2e();Y2e();Z2e();y$();Zft="[object Boolean]",Qft="[object Date]",Jft="[object Map]",edt="[object Number]",tdt="[object RegExp]",rdt="[object Set]",ndt="[object String]",idt="[object Symbol]",adt="[object ArrayBuffer]",sdt="[object DataView]",odt="[object Float32Array]",ldt="[object Float64Array]",cdt="[object Int8Array]",udt="[object Int16Array]",hdt="[object Int32Array]",fdt="[object Uint8Array]",ddt="[object Uint8ClampedArray]",pdt="[object Uint16Array]",gdt="[object Uint32Array]";Q2e=mdt});function ydt(t){return Pi(t)&&wl(t)==vdt}var vdt,exe,txe=$(()=>{b();qg();tc();vdt="[object Map]";exe=ydt});var rxe,bdt,nxe,ixe=$(()=>{b();txe();Ig();B4();rxe=ic&&ic.isMap,bdt=rxe?nc(rxe):exe,nxe=bdt});function wdt(t){return Pi(t)&&wl(t)==xdt}var xdt,axe,sxe=$(()=>{b();qg();tc();xdt="[object Set]";axe=wdt});var oxe,kdt,lxe,cxe=$(()=>{b();sxe();Ig();B4();oxe=ic&&ic.isSet,kdt=oxe?nc(oxe):axe,lxe=kdt});function kA(t,e,r,n,i,a){var s,o=e&Tdt,l=e&Edt,u=e&Sdt;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!Hn(t))return t;var h=Bt(t);if(h){if(s=U2e(t),!o)return v6(t,s)}else{var f=wl(t),d=f==hxe||f==Mdt;if(ou(t))return p6(t,o);if(f==fxe||f==uxe||d&&!i){if(s=l||d?{}:x6(t),!o)return l?R2e(t,A2e(s,t)):D2e(t,C2e(s,t))}else{if(!Jn[f])return i?t:{};s=Q2e(t,f,o)}}a||(a=new uh);var p=a.get(t);if(p)return p;a.set(t,s),lxe(t)?t.forEach(function(v){s.add(kA(v,e,r,v,t,a))}):nxe(t)&&t.forEach(function(v,y){s.set(y,kA(v,e,r,y,t,a))});var g=u?l?bA:s3:l?No:Qr,m=h?void 0:g(t);return iA(m||t,function(v,y){m&&(y=v,v=t[y]),dh(s,y,kA(v,e,r,y,t,a))}),s}var Tdt,Edt,Sdt,uxe,Cdt,_dt,Adt,Ldt,hxe,Mdt,Ddt,Odt,fxe,Rdt,Idt,Ndt,Pdt,Fdt,Bdt,zdt,$dt,Vdt,Udt,Hdt,qdt,Wdt,Gdt,Ydt,jdt,Jn,TA,DV=$(()=>{b();N4();xV();ny();_2e();L2e();m$();b$();O2e();I2e();AV();LV();qg();H2e();J2e();w$();xi();ry();ixe();gl();cxe();vh();xp();Tdt=1,Edt=2,Sdt=4,uxe="[object Arguments]",Cdt="[object Array]",_dt="[object Boolean]",Adt="[object Date]",Ldt="[object Error]",hxe="[object Function]",Mdt="[object GeneratorFunction]",Ddt="[object Map]",Odt="[object Number]",fxe="[object Object]",Rdt="[object RegExp]",Idt="[object Set]",Ndt="[object String]",Pdt="[object Symbol]",Fdt="[object WeakMap]",Bdt="[object ArrayBuffer]",zdt="[object DataView]",$dt="[object Float32Array]",Vdt="[object Float64Array]",Udt="[object Int8Array]",Hdt="[object Int16Array]",qdt="[object Int32Array]",Wdt="[object Uint8Array]",Gdt="[object Uint8ClampedArray]",Ydt="[object Uint16Array]",jdt="[object Uint32Array]",Jn={};Jn[uxe]=Jn[Cdt]=Jn[Bdt]=Jn[zdt]=Jn[_dt]=Jn[Adt]=Jn[$dt]=Jn[Vdt]=Jn[Udt]=Jn[Hdt]=Jn[qdt]=Jn[Ddt]=Jn[Odt]=Jn[fxe]=Jn[Rdt]=Jn[Idt]=Jn[Ndt]=Jn[Pdt]=Jn[Wdt]=Jn[Gdt]=Jn[Ydt]=Jn[jdt]=!0;Jn[Ldt]=Jn[hxe]=Jn[Fdt]=!1;TA=kA});function Kdt(t){return TA(t,Xdt)}var Xdt,wn,OV=$(()=>{b();DV();Xdt=4;wn=Kdt});function Jdt(t){return TA(t,Zdt|Qdt)}var Zdt,Qdt,RV,dxe=$(()=>{b();DV();Zdt=1,Qdt=4;RV=Jdt});function ept(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{b();xh=ept});function rpt(t){return this.__data__.set(t,tpt),this}var tpt,gxe,mxe=$(()=>{b();tpt="__lodash_hash_undefined__";gxe=rpt});function npt(t){return this.__data__.has(t)}var vxe,yxe=$(()=>{b();vxe=npt});function EA(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Og;++e{b();f6();mxe();yxe();EA.prototype.add=EA.prototype.push=gxe;EA.prototype.has=vxe;Ty=EA});function ipt(t,e){for(var r=-1,n=t==null?0:t.length;++r{b();CA=ipt});function apt(t,e){return t.has(e)}var Ey,_A=$(()=>{b();Ey=apt});function lpt(t,e,r,n,i,a){var s=r&spt,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(t),h=a.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&opt?new Ty:void 0;for(a.set(t,e),a.set(e,t);++f{b();SA();IV();_A();spt=1,opt=2;AA=lpt});function cpt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var bxe,xxe=$(()=>{b();bxe=cpt});function upt(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Sy,LA=$(()=>{b();Sy=upt});function Ept(t,e,r,n,i,a,s){switch(r){case Tpt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case kpt:return!(t.byteLength!=e.byteLength||!a(new Kv(t),new Kv(e)));case dpt:case ppt:case vpt:return ec(+t,+e);case gpt:return t.name==e.name&&t.message==e.message;case ypt:case xpt:return t==e+"";case mpt:var o=bxe;case bpt:var l=n&hpt;if(o||(o=Sy),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=fpt,s.set(t,e);var h=AA(o(t),o(e),n,i,a,s);return s.delete(t),h;case wpt:if(PV)return PV.call(t)==PV.call(e)}return!1}var hpt,fpt,dpt,ppt,gpt,mpt,vpt,ypt,bpt,xpt,wpt,kpt,Tpt,wxe,PV,kxe,Txe=$(()=>{b();Mg();v$();Dg();NV();xxe();LA();hpt=1,fpt=2,dpt="[object Boolean]",ppt="[object Date]",gpt="[object Error]",mpt="[object Map]",vpt="[object Number]",ypt="[object RegExp]",bpt="[object Set]",xpt="[object String]",wpt="[object Symbol]",kpt="[object ArrayBuffer]",Tpt="[object DataView]",wxe=qa?qa.prototype:void 0,PV=wxe?wxe.valueOf:void 0;kxe=Ept});function Apt(t,e,r,n,i,a){var s=r&Spt,o=s3(t),l=o.length,u=s3(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:_pt.call(e,d)))return!1}var p=a.get(t),g=a.get(e);if(p&&g)return p==e&&g==t;var m=!0;a.set(t,e),a.set(e,t);for(var v=s;++f{b();AV();Spt=1,Cpt=Object.prototype,_pt=Cpt.hasOwnProperty;Exe=Apt});function Dpt(t,e,r,n,i,a){var s=Bt(t),o=Bt(e),l=s?_xe:wl(t),u=o?_xe:wl(e);l=l==Cxe?MA:l,u=u==Cxe?MA:u;var h=l==MA,f=u==MA,d=l==u;if(d&&ou(t)){if(!ou(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new uh),s||yp(t)?AA(t,e,r,n,i,a):kxe(t,e,l,r,n,i,a);if(!(r&Lpt)){var p=h&&Axe.call(t,"__wrapped__"),g=f&&Axe.call(e,"__wrapped__");if(p||g){var m=p?t.value():t,v=g?e.value():e;return a||(a=new uh),i(m,v,r,n,a)}}return d?(a||(a=new uh),Exe(t,e,r,n,i,a)):!1}var Lpt,Cxe,_xe,MA,Mpt,Axe,Lxe,Mxe=$(()=>{b();N4();NV();Txe();Sxe();qg();xi();ry();z4();Lpt=1,Cxe="[object Arguments]",_xe="[object Array]",MA="[object Object]",Mpt=Object.prototype,Axe=Mpt.hasOwnProperty;Lxe=Dpt});function Dxe(t,e,r,n,i){return t===e?!0:t==null||e==null||!Pi(t)&&!Pi(e)?t!==t&&e!==e:Lxe(t,e,r,n,Dxe,i)}var DA,FV=$(()=>{b();Mxe();tc();DA=Dxe});function Ipt(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i{b();N4();FV();Opt=1,Rpt=2;Oxe=Ipt});function Npt(t){return t===t&&!Hn(t)}var OA,BV=$(()=>{b();gl();OA=Npt});function Ppt(t){for(var e=Qr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,OA(i)]}return e}var Ixe,Nxe=$(()=>{b();BV();vh();Ixe=Ppt});function Fpt(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var RA,zV=$(()=>{b();RA=Fpt});function Bpt(t){var e=Ixe(t);return e.length==1&&e[0][2]?RA(e[0][0],e[0][1]):function(r){return r===t||Oxe(r,t,e)}}var Pxe,Fxe=$(()=>{b();Rxe();Nxe();zV();Pxe=Bpt});function zpt(t,e){return t!=null&&e in Object(t)}var Bxe,zxe=$(()=>{b();Bxe=zpt});function $pt(t,e,r){e=Sp(e,t);for(var n=-1,i=e.length,a=!1;++n{b();i3();ey();xi();V4();w6();yy();IA=$pt});function Vpt(t,e){return t!=null&&IA(t,e,Bxe)}var NA,VV=$(()=>{b();zxe();$V();NA=Vpt});function qpt(t,e){return vy(t)&&OA(e)?RA(yh(t),e):function(r){var n=p2e(r,t);return n===void 0&&n===e?NA(r,t):DA(e,n,Upt|Hpt)}}var Upt,Hpt,$xe,Vxe=$(()=>{b();FV();g2e();VV();cA();BV();zV();yy();Upt=1,Hpt=2;$xe=qpt});function Wpt(t){return function(e){return e?.[t]}}var PA,UV=$(()=>{b();PA=Wpt});function Gpt(t){return function(e){return Cp(e,t)}}var Uxe,Hxe=$(()=>{b();a3();Uxe=Gpt});function Ypt(t){return vy(t)?PA(yh(t)):Uxe(t)}var qxe,Wxe=$(()=>{b();UV();Hxe();cA();yy();qxe=Ypt});function jpt(t){return typeof t=="function"?t:t==null?Wa:typeof t=="object"?Bt(t)?$xe(t[0],t[1]):Pxe(t):qxe(t)}var Rn,no=$(()=>{b();Fxe();Vxe();Uf();xi();Wxe();Rn=jpt});function Xpt(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i{b();Gxe=Xpt});function Kpt(t,e){return t&&Xv(t,e,Qr)}var Cy,FA=$(()=>{b();d6();vh();Cy=Kpt});function Zpt(t,e){return function(r,n){if(r==null)return r;if(!Wi(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a{b();rc();jxe=Zpt});var Qpt,Vo,Ap=$(()=>{b();FA();Xxe();Qpt=jxe(Cy),Vo=Qpt});function Jpt(t,e,r,n){return Vo(t,function(i,a,s){e(n,i,r(i),s)}),n}var Kxe,Zxe=$(()=>{b();Ap();Kxe=Jpt});function e0t(t,e){return function(r,n){var i=Bt(r)?Gxe:Kxe,a=e?e():{};return i(r,t,Rn(n,2),a)}}var Qxe,Jxe=$(()=>{b();Yxe();Zxe();no();xi();Qxe=e0t});var t0t,BA,ewe=$(()=>{b();Jl();t0t=function(){return qi.Date.now()},BA=t0t});var twe,r0t,n0t,Lp,rwe=$(()=>{b();iy();Dg();Pg();xp();twe=Object.prototype,r0t=twe.hasOwnProperty,n0t=ph(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&ml(e[0],e[1],i)&&(n=1);++r{b();zA=i0t});function s0t(t,e,r,n){var i=-1,a=oA,s=!0,o=t.length,l=[],u=e.length;if(!o)return l;r&&(e=$o(e,nc(r))),n?(a=zA,s=!1):e.length>=a0t&&(a=Ey,s=!1,e=new Ty(e));e:for(;++i{b();SA();kV();HV();Ug();Ig();_A();a0t=200;nwe=s0t});var o0t,Mp,awe=$(()=>{b();iwe();xy();iy();k6();o0t=ph(function(t,e){return Rg(t)?nwe(t,bh(e,1,Rg,!0)):[]}),Mp=o0t});function l0t(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var fs,swe=$(()=>{b();fs=l0t});function c0t(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:mh(e),dA(t,e<0?0:e,n)):[]}var ta,owe=$(()=>{b();EV();py();ta=c0t});function u0t(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:mh(e),e=n-e,dA(t,0,e<0?0:e)):[]}var Kf,lwe=$(()=>{b();EV();py();Kf=u0t});function h0t(t){return typeof t=="function"?t:Wa}var _y,$A=$(()=>{b();Uf();_y=h0t});function f0t(t,e){var r=Bt(t)?iA:Vo;return r(t,_y(e))}var De,VA=$(()=>{b();xV();Ap();$A();xi();De=f0t});var cwe=$(()=>{b();VA()});function d0t(t,e){for(var r=-1,n=t==null?0:t.length;++r{b();uwe=d0t});function p0t(t,e){var r=!0;return Vo(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var fwe,dwe=$(()=>{b();Ap();fwe=p0t});function g0t(t,e,r){var n=Bt(t)?uwe:fwe;return r&&ml(t,e,r)&&(e=void 0),n(t,Rn(e,3))}var Rs,pwe=$(()=>{b();hwe();dwe();no();xi();Pg();Rs=g0t});function m0t(t,e){var r=[];return Vo(t,function(n,i,a){e(n,i,a)&&r.push(n)}),r}var UA,qV=$(()=>{b();Ap();UA=m0t});function v0t(t,e){var r=Bt(t)?wy:UA;return r(t,Rn(e,3))}var sn,WV=$(()=>{b();pA();qV();no();xi();sn=v0t});function y0t(t){return function(e,r,n){var i=Object(e);if(!Wi(e)){var a=Rn(r,3);e=Qr(e),r=function(o){return a(i[o],o,i)}}var s=t(e,r,n);return s>-1?i[a?e[s]:s]:void 0}}var gwe,mwe=$(()=>{b();no();rc();vh();gwe=y0t});function x0t(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:mh(r);return i<0&&(i=b0t(n+i,0)),aA(t,Rn(e,3),i)}var b0t,vwe,ywe=$(()=>{b();wV();no();py();b0t=Math.max;vwe=x0t});var w0t,io,bwe=$(()=>{b();mwe();ywe();w0t=gwe(vwe),io=w0t});function k0t(t){return t&&t.length?t[0]:void 0}var Ga,xwe=$(()=>{b();Ga=k0t});var wwe=$(()=>{b();xwe()});function T0t(t,e){var r=-1,n=Wi(t)?Array(t.length):[];return Vo(t,function(i,a,s){n[++r]=e(i,a,s)}),n}var HA,GV=$(()=>{b();Ap();rc();HA=T0t});function E0t(t,e){var r=Bt(t)?$o:HA;return r(t,Rn(e,3))}var ut,Ay=$(()=>{b();Ug();no();GV();xi();ut=E0t});function S0t(t,e){return bh(ut(t,e),1)}var ds,YV=$(()=>{b();xy();Ay();ds=S0t});function C0t(t,e){return t==null?t:Xv(t,_y(e),No)}var jV,kwe=$(()=>{b();d6();$A();xp();jV=C0t});function _0t(t,e){return t&&Cy(t,_y(e))}var XV,Twe=$(()=>{b();FA();$A();XV=_0t});var A0t,L0t,M0t,KV,Ewe=$(()=>{b();jv();Jxe();A0t=Object.prototype,L0t=A0t.hasOwnProperty,M0t=Qxe(function(t,e,r){L0t.call(t,r)?t[r].push(e):hh(t,r,[e])}),KV=M0t});function D0t(t,e){return t>e}var Swe,Cwe=$(()=>{b();Swe=D0t});function I0t(t,e){return t!=null&&R0t.call(t,e)}var O0t,R0t,_we,Awe=$(()=>{b();O0t=Object.prototype,R0t=O0t.hasOwnProperty;_we=I0t});function N0t(t,e){return t!=null&&IA(t,e,_we)}var zt,Lwe=$(()=>{b();Awe();$V();zt=N0t});function F0t(t){return typeof t=="string"||!Bt(t)&&Pi(t)&&os(t)==P0t}var P0t,ra,qA=$(()=>{b();zf();xi();tc();P0t="[object String]";ra=F0t});function B0t(t,e){return $o(e,function(r){return t[r]})}var Mwe,Dwe=$(()=>{b();Ug();Mwe=B0t});function z0t(t){return t==null?[]:Mwe(t,Qr(t))}var Lr,ZV=$(()=>{b();Dwe();vh();Lr=z0t});function V0t(t,e,r,n){t=Wi(t)?t:Lr(t),r=r&&!n?mh(r):0;var i=t.length;return r<0&&(r=$0t(i+r,0)),ra(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&gy(t,e,r)>-1}var $0t,ki,Owe=$(()=>{b();sA();rc();qA();py();ZV();$0t=Math.max;ki=V0t});function H0t(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:mh(r);return i<0&&(i=U0t(n+i,0)),gy(t,e,i)}var U0t,WA,Rwe=$(()=>{b();sA();py();U0t=Math.max;WA=H0t});function j0t(t){if(t==null)return!0;if(Wi(t)&&(Bt(t)||typeof t=="string"||typeof t.splice=="function"||ou(t)||yp(t)||su(t)))return!t.length;var e=wl(t);if(e==q0t||e==W0t)return!t.size;if(fh(t))return!my(t).length;for(var r in t)if(Y0t.call(t,r))return!1;return!0}var q0t,W0t,G0t,Y0t,br,GA=$(()=>{b();lA();qg();ey();xi();rc();ry();Jv();z4();q0t="[object Map]",W0t="[object Set]",G0t=Object.prototype,Y0t=G0t.hasOwnProperty;br=j0t});function K0t(t){return Pi(t)&&os(t)==X0t}var X0t,Iwe,Nwe=$(()=>{b();zf();tc();X0t="[object RegExp]";Iwe=K0t});var Pwe,Z0t,lc,Fwe=$(()=>{b();Nwe();Ig();B4();Pwe=ic&&ic.isRegExp,Z0t=Pwe?nc(Pwe):Iwe,lc=Z0t});function Q0t(t){return t===void 0}var kr,Bwe=$(()=>{b();kr=Q0t});function J0t(t,e){return t{b();YA=J0t});function egt(t,e){var r={};return e=Rn(e,3),Cy(t,function(n,i,a){hh(r,i,e(n,i,a))}),r}var Wg,zwe=$(()=>{b();jv();FA();no();Wg=egt});function tgt(t,e,r){for(var n=-1,i=t.length;++n{b();Vg();Ly=tgt});function rgt(t){return t&&t.length?Ly(t,Wa,Swe):void 0}var Uo,$we=$(()=>{b();jA();Cwe();Uf();Uo=rgt});function ngt(t){return t&&t.length?Ly(t,Wa,YA):void 0}var cu,JV=$(()=>{b();jA();QV();Uf();cu=ngt});function igt(t,e){return t&&t.length?Ly(t,Rn(e,2),YA):void 0}var Gg,Vwe=$(()=>{b();jA();no();QV();Gg=igt});function sgt(t){if(typeof t!="function")throw new TypeError(agt);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var agt,Uwe,Hwe=$(()=>{b();agt="Expected a function";Uwe=sgt});function ogt(t,e,r,n){if(!Hn(t))return t;e=Sp(e,t);for(var i=-1,a=e.length,s=a-1,o=t;o!=null&&++i{b();ny();i3();V4();gl();yy();qwe=ogt});function lgt(t,e,r){for(var n=-1,i=e.length,a={};++n{b();a3();Wwe();i3();XA=lgt});function cgt(t,e){if(t==null)return{};var r=$o(bA(t),function(n){return[n]});return e=Rn(e),XA(t,r,function(n,i){return e(n,i[0])})}var Ho,Gwe=$(()=>{b();Ug();no();eU();LV();Ho=cgt});function ugt(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Ywe,jwe=$(()=>{b();Ywe=ugt});function hgt(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=xl(t),s=e!==void 0,o=e===null,l=e===e,u=xl(e);if(!o&&!u&&!a&&t>e||a&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&t{b();Vg();Xwe=hgt});function fgt(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}var Zwe,Qwe=$(()=>{b();Kwe();Zwe=fgt});function dgt(t,e,r){e.length?e=$o(e,function(a){return Bt(a)?function(s){return Cp(s,a.length===1?a[0]:a)}:a}):e=[Wa];var n=-1;e=$o(e,nc(Rn));var i=HA(t,function(a,s,o){var l=$o(e,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return Ywe(i,function(a,s){return Zwe(a,s,r)})}var Jwe,e4e=$(()=>{b();Ug();a3();no();GV();jwe();Ig();Qwe();Uf();xi();Jwe=dgt});var pgt,t4e,r4e=$(()=>{b();UV();pgt=PA("length"),t4e=pgt});function Cgt(t){for(var e=n4e.lastIndex=0;n4e.test(t);)++e;return e}var i4e,ggt,mgt,vgt,ygt,bgt,xgt,tU,rU,wgt,a4e,s4e,o4e,kgt,l4e,c4e,Tgt,Egt,Sgt,n4e,u4e,h4e=$(()=>{b();i4e="\\ud800-\\udfff",ggt="\\u0300-\\u036f",mgt="\\ufe20-\\ufe2f",vgt="\\u20d0-\\u20ff",ygt=ggt+mgt+vgt,bgt="\\ufe0e\\ufe0f",xgt="["+i4e+"]",tU="["+ygt+"]",rU="\\ud83c[\\udffb-\\udfff]",wgt="(?:"+tU+"|"+rU+")",a4e="[^"+i4e+"]",s4e="(?:\\ud83c[\\udde6-\\uddff]){2}",o4e="[\\ud800-\\udbff][\\udc00-\\udfff]",kgt="\\u200d",l4e=wgt+"?",c4e="["+bgt+"]?",Tgt="(?:"+kgt+"(?:"+[a4e,s4e,o4e].join("|")+")"+c4e+l4e+")*",Egt=c4e+l4e+Tgt,Sgt="(?:"+[a4e+tU+"?",tU,s4e,o4e,xgt].join("|")+")",n4e=RegExp(rU+"(?="+rU+")|"+Sgt+Egt,"g");u4e=Cgt});function _gt(t){return k2e(t)?u4e(t):t4e(t)}var f4e,d4e=$(()=>{b();r4e();T2e();h4e();f4e=_gt});function Agt(t,e){return XA(t,e,function(r,n){return NA(t,n)})}var p4e,g4e=$(()=>{b();eU();VV();p4e=Agt});var Lgt,Yg,m4e=$(()=>{b();g4e();w2e();Lgt=x2e(function(t,e){return t==null?{}:p4e(t,e)}),Yg=Lgt});function Ogt(t,e,r,n){for(var i=-1,a=Dgt(Mgt((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var Mgt,Dgt,v4e,y4e=$(()=>{b();Mgt=Math.ceil,Dgt=Math.max;v4e=Ogt});function Rgt(t){return function(e,r,n){return n&&typeof n!="number"&&ml(e,r,n)&&(r=n=void 0),e=dy(e),r===void 0?(r=e,e=0):r=dy(r),n=n===void 0?e{b();y4e();Pg();yV();b4e=Rgt});var Igt,cc,w4e=$(()=>{b();x4e();Igt=b4e(),cc=Igt});function Ngt(t,e,r,n,i){return i(t,function(a,s,o){r=n?(n=!1,a):e(r,a,s,o)}),r}var k4e,T4e=$(()=>{b();k4e=Ngt});function Pgt(t,e,r){var n=Bt(t)?E2e:k4e,i=arguments.length<3;return n(t,Rn(e,4),r,i,Vo)}var on,nU=$(()=>{b();S2e();Ap();no();T4e();xi();on=Pgt});function Fgt(t,e){var r=Bt(t)?wy:UA;return r(t,Uwe(Rn(e,3)))}var Dp,E4e=$(()=>{b();pA();qV();no();xi();Hwe();Dp=Fgt});function $gt(t){if(t==null)return 0;if(Wi(t))return ra(t)?f4e(t):t.length;var e=wl(t);return e==Bgt||e==zgt?t.size:my(t).length}var Bgt,zgt,iU,S4e=$(()=>{b();lA();qg();rc();qA();d4e();Bgt="[object Map]",zgt="[object Set]";iU=$gt});function Vgt(t,e){var r;return Vo(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var C4e,_4e=$(()=>{b();Ap();C4e=Vgt});function Ugt(t,e,r){var n=Bt(t)?CA:C4e;return r&&ml(t,e,r)&&(e=void 0),n(t,Rn(e,3))}var o3,A4e=$(()=>{b();IV();no();_4e();xi();Pg();o3=Ugt});var Hgt,wh,L4e=$(()=>{b();xy();e4e();iy();Pg();Hgt=ph(function(t,e){if(t==null)return[];var r=e.length;return r>1&&ml(t,e[0],e[1])?e=[]:r>2&&ml(e[0],e[1],e[2])&&(e=[e[0]]),Jwe(t,bh(e,1),[])}),wh=Hgt});var qgt,Wgt,M4e,D4e=$(()=>{b();MV();bV();LA();qgt=1/0,Wgt=_p&&1/Sy(new _p([,-0]))[1]==qgt?function(t){return new _p(t)}:Fi,M4e=Wgt});function Ygt(t,e,r){var n=-1,i=oA,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=zA;else if(a>=Ggt){var u=e?null:M4e(t);if(u)return Sy(u);s=!1,i=Ey,l=new Ty}else l=e?[]:o;e:for(;++n{b();SA();kV();HV();_A();D4e();LA();Ggt=200;My=Ygt});var jgt,aU,O4e=$(()=>{b();xy();iy();KA();k6();jgt=ph(function(t){return My(bh(t,1,Rg,!0))}),aU=jgt});function Xgt(t){return t&&t.length?My(t):[]}var Dy,R4e=$(()=>{b();KA();Dy=Xgt});function Kgt(t,e){return t&&t.length?My(t,Rn(e,2)):[]}var I4e,N4e=$(()=>{b();no();KA();I4e=Kgt});function Qgt(t){var e=++Zgt;return uA(t)+e}var Zgt,jg,P4e=$(()=>{b();TV();Zgt=0;jg=Qgt});function Jgt(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n{b();F4e=Jgt});function emt(t,e){return F4e(t||[],e||[],dh)}var ZA,z4e=$(()=>{b();ny();B4e();ZA=emt});var Xt=$(()=>{b();c2e();OV();dxe();pxe();_$();rwe();awe();owe();lwe();cwe();pwe();WV();bwe();wwe();YV();fA();VA();kwe();Twe();Ewe();Lwe();Uf();Owe();Rwe();xi();GA();M4();gl();Fwe();qA();Bwe();vh();swe();Ay();zwe();$we();M$();JV();Vwe();bV();ewe();m4e();Gwe();w4e();nU();E4e();S4e();A4e();L4e();O4e();R4e();P4e();ZV();z4e();});function V4e(t,e){t[e]?t[e]++:t[e]=1}function U4e(t,e){--t[e]||delete t[e]}function l3(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+$4e+a+$4e+(kr(n)?tmt:n)}function rmt(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};return n&&(o.name=n),o}function sU(t,e){return l3(t,e.v,e.w,e.name)}var tmt,Xg,$4e,Yr,QA=$(()=>{b();Xt();tmt="\0",Xg="\0",$4e="",Yr=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Po(void 0),this._defaultEdgeLabelFn=Po(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Xg]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return da(e)||(e=Po(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Qr(this._nodes)}sources(){var e=this;return sn(this.nodes(),function(r){return br(e._in[r])})}sinks(){var e=this;return sn(this.nodes(),function(r){return br(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return De(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Xg,this._children[e]={},this._children[Xg][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],De(this.children(e),n=>{this.setParent(n)}),delete this._children[e]),De(Qr(this._in[e]),r),delete this._in[e],delete this._preds[e],De(Qr(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(kr(r))r=Xg;else{r+="";for(var n=r;!kr(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==Xg)return r}}children(e){if(kr(e)&&(e=Xg),this._isCompound){var r=this._children[e];if(r)return Qr(r)}else{if(e===Xg)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return Qr(r)}successors(e){var r=this._sucs[e];if(r)return Qr(r)}neighbors(e){var r=this.predecessors(e);if(r)return aU(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;De(this._nodes,function(s,o){e(o)&&r.setNode(o,s)}),De(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s))});var i={};function a(s){var o=n.parent(s);return o===void 0||r.hasNode(o)?(i[s]=o,o):o in i?i[o]:a(o)}return this._isCompound&&De(r.nodes(),function(s){r.setParent(s,a(s))}),r}setDefaultEdgeLabel(e){return da(e)||(e=Po(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Lr(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return on(e,function(a,s){return i.length>1?n.setEdge(a,s,r):n.setEdge(a,s),s}),this}setEdge(){var e,r,n,i,a=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,r=s.w,n=s.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=s,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,kr(n)||(n=""+n);var o=l3(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return a&&(this._edgeLabels[o]=i),this;if(!kr(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=a?i:this._defaultEdgeLabelFn(e,r,n);var l=rmt(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,V4e(this._preds[r],e),V4e(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?sU(this._isDirected,arguments[0]):l3(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?sU(this._isDirected,arguments[0]):l3(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?sU(this._isDirected,arguments[0]):l3(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],U4e(this._preds[r],e),U4e(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=Lr(n);return r?sn(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=Lr(n);return r?sn(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}};Yr.prototype._nodeCount=0;Yr.prototype._edgeCount=0});var qo=$(()=>{b();QA()});function H4e(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function nmt(t,e){if(t!=="_next"&&t!=="_prev")return e}var JA,q4e=$(()=>{b();JA=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return H4e(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&H4e(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,nmt)),n=n._prev;return"["+e.join(", ")+"]"}}});function W4e(t,e){if(t.nodeCount()<=1)return[];var r=smt(t,e||imt),n=amt(r.graph,r.buckets,r.zeroIdx);return an(ut(n,function(i){return t.outEdges(i.v,i.w)}))}function amt(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],s;t.nodeCount();){for(;s=a.dequeue();)oU(t,e,r,s);for(;s=i.dequeue();)oU(t,e,r,s);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(s=e[o].dequeue(),s){n=n.concat(oU(t,e,r,s,!0));break}}}return n}function oU(t,e,r,n,i){var a=i?[]:void 0;return De(t.inEdges(n.v),function(s){var o=t.edge(s),l=t.node(s.v);i&&a.push({v:s.v,w:s.w}),l.out-=o,lU(e,r,l)}),De(t.outEdges(n.v),function(s){var o=t.edge(s),l=s.w,u=t.node(l);u.in-=o,lU(e,r,u)}),t.removeNode(n.v),a}function smt(t,e){var r=new Yr,n=0,i=0;De(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),De(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),h=l+u;r.setEdge(o.v,o.w,h),i=Math.max(i,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var a=cc(i+n+3).map(function(){return new JA}),s=n+1;return De(r.nodes(),function(o){lU(a,s,r.node(o))}),{graph:r,buckets:a,zeroIdx:s}}function lU(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}var imt,G4e=$(()=>{b();Xt();qo();q4e();imt=Po(1)});function Y4e(t){var e=t.graph().acyclicer==="greedy"?W4e(t,r(t)):omt(t);De(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,jg("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function omt(t){var e=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,De(t.outEdges(a),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?e.push(s):i(s.w)}),delete r[a])}return De(t.nodes(),i),e}function j4e(t){De(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}var cU=$(()=>{b();Xt();G4e()});function kh(t,e,r,n){var i;do i=jg(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function K4e(t){var e=new Yr().setGraph(t.graph());return De(t.nodes(),function(r){e.setNode(r,t.node(r))}),De(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function e7(t){var e=new Yr({multigraph:t.isMultigraph()}).setGraph(t.graph());return De(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),De(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function uU(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:r+l,y:n+u}}function Op(t){var e=ut(cc(fU(t)+1),function(){return[]});return De(t.nodes(),function(r){var n=t.node(r),i=n.rank;kr(i)||(e[i][n.order]=r)}),e}function Z4e(t){var e=cu(ut(t.nodes(),function(r){return t.node(r).rank}));De(t.nodes(),function(r){var n=t.node(r);zt(n,"rank")&&(n.rank-=e)})}function Q4e(t){var e=cu(ut(t.nodes(),function(a){return t.node(a).rank})),r=[];De(t.nodes(),function(a){var s=t.node(a).rank-e;r[s]||(r[s]=[]),r[s].push(a)});var n=0,i=t.graph().nodeRankFactor;De(r,function(a,s){kr(a)&&s%i!==0?--n:n&&De(a,function(o){t.node(o).rank+=n})})}function hU(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),kh(t,"border",i,e)}function fU(t){return Uo(ut(t.nodes(),function(e){var r=t.node(e).rank;if(!kr(r))return r}))}function J4e(t,e){var r={lhs:[],rhs:[]};return De(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function e3e(t,e){var r=BA();try{return e()}finally{console.log(t+" time: "+(BA()-r)+"ms")}}function t3e(t,e){return e()}var Th=$(()=>{b();Xt();qo()});function n3e(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&De(n,e),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a{b();Xt();Th()});function s3e(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&l3e(t)}function o3e(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&lmt(t),(e==="lr"||e==="rl")&&(cmt(t),l3e(t))}function l3e(t){De(t.nodes(),function(e){a3e(t.node(e))}),De(t.edges(),function(e){a3e(t.edge(e))})}function a3e(t){var e=t.width;t.width=t.height,t.height=e}function lmt(t){De(t.nodes(),function(e){dU(t.node(e))}),De(t.edges(),function(e){var r=t.edge(e);De(r.points,dU),Object.prototype.hasOwnProperty.call(r,"y")&&dU(r)})}function dU(t){t.y=-t.y}function cmt(t){De(t.nodes(),function(e){pU(t.node(e))}),De(t.edges(),function(e){var r=t.edge(e);De(r.points,pU),Object.prototype.hasOwnProperty.call(r,"x")&&pU(r)})}function pU(t){var e=t.x;t.x=t.y,t.y=e}var c3e=$(()=>{b();Xt()});function u3e(t){t.graph().dummyChains=[],De(t.edges(),function(e){hmt(t,e)})}function hmt(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==n+1){t.removeEdge(e);var u=void 0,h,f;for(f=0,++n;n{b();Xt();Th()});function c3(t){var e={};function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=cu(ut(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}De(t.sources(),r)}function Kg(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var t7=$(()=>{b();Xt()});function r7(t){var e=new Yr({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;fmt(e,t){b();Xt();qo();t7()});var d3e=$(()=>{b()});var vU=$(()=>{b()});var RSr,yU=$(()=>{b();Xt();vU();RSr=Po(1)});var p3e=$(()=>{b();yU()});var bU=$(()=>{b()});var g3e=$(()=>{b();bU()});var qSr,m3e=$(()=>{b();Xt();qSr=Po(1)});function xU(t){var e={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new u3;Object.prototype.hasOwnProperty.call(e,a)||(r[a]=!0,e[a]=!0,De(t.predecessors(a),i),delete r[a],n.push(a))}if(De(t.sinks(),i),iU(e)!==t.nodeCount())throw new u3;return n}function u3(){}var wU=$(()=>{b();Xt();xU.CycleException=u3;u3.prototype=new Error});var v3e=$(()=>{b();wU()});function n7(t,e,r){Bt(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return De(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);y3e(t,s,r==="post",a,n,i)}),i}function y3e(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),De(i(e),function(s){y3e(t,s,r,n,i,a)}),r&&a.push(e))}var kU=$(()=>{b();Xt()});function TU(t,e){return n7(t,e,"post")}var b3e=$(()=>{b();kU()});function EU(t,e){return n7(t,e,"pre")}var x3e=$(()=>{b();kU()});var w3e=$(()=>{b();vU();QA()});var k3e=$(()=>{b();d3e();yU();p3e();g3e();m3e();v3e();b3e();x3e();w3e();bU();wU()});function Ip(t){t=K4e(t),c3(t);var e=r7(t);CU(e),SU(e,t);for(var r,n;r=C3e(e);)n=_3e(e,t,r),A3e(e,t,r,n)}function SU(t,e){var r=TU(t,t.nodes());r=r.slice(0,r.length-1),De(r,function(n){bmt(t,e,n)})}function bmt(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=E3e(t,e,r)}function E3e(t,e,r){var n=t.node(r),i=n.parent,a=!0,s=e.edge(r,i),o=0;return s||(a=!1,s=e.edge(i,r)),o=s.weight,De(e.nodeEdges(r),function(l){var u=l.v===r,h=u?l.w:l.v;if(h!==i){var f=u===a,d=e.edge(l).weight;if(o+=f?d:-d,wmt(t,r,h)){var p=t.edge(r,h).cutvalue;o+=f?-p:p}}}),o}function CU(t,e){arguments.length<2&&(e=t.nodes()[0]),S3e(t,{},1,e)}function S3e(t,e,r,n,i){var a=r,s=t.node(n);return e[n]=!0,De(t.neighbors(n),function(o){Object.prototype.hasOwnProperty.call(e,o)||(r=S3e(t,e,r,o,n))}),s.low=a,s.lim=r++,i?s.parent=i:delete s.parent,r}function C3e(t){return io(t.edges(),function(e){return t.edge(e).cutvalue<0})}function _3e(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),s=t.node(i),o=a,l=!1;a.lim>s.lim&&(o=s,l=!0);var u=sn(e.edges(),function(h){return l===T3e(t,t.node(h.v),o)&&l!==T3e(t,t.node(h.w),o)});return Gg(u,function(h){return Kg(e,h)})}function A3e(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),CU(t),SU(t,e),xmt(t,e)}function xmt(t,e){var r=io(t.nodes(),function(i){return!e.node(i).parent}),n=EU(t,r);n=n.slice(1),De(n,function(i){var a=t.node(i).parent,s=e.edge(i,a),o=!1;s||(s=e.edge(a,i),o=!0),e.node(i).rank=e.node(a).rank+(o?s.minlen:-s.minlen)})}function wmt(t,e,r){return t.hasEdge(e,r)}function T3e(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var L3e=$(()=>{b();Xt();k3e();Th();mU();t7();Ip.initLowLimValues=CU;Ip.initCutValues=SU;Ip.calcCutValue=E3e;Ip.leaveEdge=C3e;Ip.enterEdge=_3e;Ip.exchangeEdges=A3e});function _U(t){switch(t.graph().ranker){case"network-simplex":M3e(t);break;case"tight-tree":Tmt(t);break;case"longest-path":kmt(t);break;default:M3e(t)}}function Tmt(t){c3(t),r7(t)}function M3e(t){Ip(t)}var kmt,AU=$(()=>{b();mU();L3e();t7();kmt=c3});function D3e(t){var e=kh(t,"root",{},"_root"),r=Emt(t),n=Uo(Lr(r))-1,i=2*n+1;t.graph().nestingRoot=e,De(t.edges(),function(s){t.edge(s).minlen*=i});var a=Smt(t)+1;De(t.children(),function(s){O3e(t,e,i,a,n,r,s)}),t.graph().nodeRankFactor=i}function O3e(t,e,r,n,i,a,s){var o=t.children(s);if(!o.length){s!==e&&t.setEdge(e,s,{weight:0,minlen:r});return}var l=hU(t,"_bt"),u=hU(t,"_bb"),h=t.node(s);t.setParent(l,s),h.borderTop=l,t.setParent(u,s),h.borderBottom=u,De(o,function(f){O3e(t,e,r,n,i,a,f);var d=t.node(f),p=d.borderTop?d.borderTop:f,g=d.borderBottom?d.borderBottom:f,m=d.borderTop?n:2*n,v=p!==g?1:i-a[s]+1;t.setEdge(l,p,{weight:m,minlen:v,nestingEdge:!0}),t.setEdge(g,u,{weight:m,minlen:v,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,l,{weight:0,minlen:i+a[s]})}function Emt(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&&De(a,function(s){r(s,i+1)}),e[n]=i}return De(t.children(),function(n){r(n,1)}),e}function Smt(t){return on(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function R3e(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,De(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}var I3e=$(()=>{b();Xt();Th()});function N3e(t,e,r){var n={},i;De(r,function(a){for(var s=t.parent(a),o,l;s;){if(o=t.parent(s),o?(l=n[o],n[o]=s):(l=i,i=s),l&&l!==s){e.setEdge(l,s);return}s=o}})}var P3e=$(()=>{b();Xt()});function F3e(t,e,r){var n=_mt(t),i=new Yr({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return De(t.nodes(),function(a){var s=t.node(a),o=t.parent(a);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(i.setNode(a),i.setParent(a,o||n),De(t[r](a),function(l){var u=l.v===a?l.w:l.v,h=i.edge(u,a),f=kr(h)?0:h.weight;i.setEdge(u,a,{weight:t.edge(l).weight+f})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),i}function _mt(t){for(var e;t.hasNode(e=jg("_root")););return e}var B3e=$(()=>{b();Xt();qo()});function z3e(t,e){for(var r=0,n=1;n0;)h%2&&(f+=o[h+1]),h=h-1>>1,o[h]+=u.weight;l+=u.weight*f})),l}var $3e=$(()=>{b();Xt()});function V3e(t){var e={},r=sn(t.nodes(),function(o){return!t.children(o).length}),n=Uo(ut(r,function(o){return t.node(o).rank})),i=ut(cc(n+1),function(){return[]});function a(o){if(!zt(e,o)){e[o]=!0;var l=t.node(o);i[l.rank].push(o),De(t.successors(o),a)}}var s=wh(r,function(o){return t.node(o).rank});return De(s,a),i}var U3e=$(()=>{b();Xt()});function H3e(t,e){return ut(e,function(r){var n=t.inEdges(r);if(n.length){var i=on(n,function(a,s){var o=t.edge(s),l=t.node(s.v);return{sum:a.sum+o.weight*l.order,weight:a.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var q3e=$(()=>{b();Xt()});function W3e(t,e){var r={};De(t,function(i,a){var s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};kr(i.barycenter)||(s.barycenter=i.barycenter,s.weight=i.weight)}),De(e.edges(),function(i){var a=r[i.v],s=r[i.w];!kr(a)&&!kr(s)&&(s.indegree++,a.out.push(r[i.w]))});var n=sn(r,function(i){return!i.indegree});return Lmt(n)}function Lmt(t){var e=[];function r(a){return function(s){s.merged||(kr(s.barycenter)||kr(a.barycenter)||s.barycenter>=a.barycenter)&&Mmt(a,s)}}function n(a){return function(s){s.in.push(a),--s.indegree===0&&t.push(s)}}for(;t.length;){var i=t.pop();e.push(i),De(i.in.reverse(),r(i)),De(i.out,n(i))}return ut(sn(e,function(a){return!a.merged}),function(a){return Yg(a,["vs","i","barycenter","weight"])})}function Mmt(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var G3e=$(()=>{b();Xt()});function j3e(t,e){var r=J4e(t,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),n=r.lhs,i=wh(r.rhs,function(h){return-h.i}),a=[],s=0,o=0,l=0;n.sort(Dmt(!!e)),l=Y3e(a,i,l),De(n,function(h){l+=h.vs.length,a.push(h.vs),s+=h.barycenter*h.weight,o+=h.weight,l=Y3e(a,i,l)});var u={vs:an(a)};return o&&(u.barycenter=s/o,u.weight=o),u}function Y3e(t,e,r){for(var n;e.length&&(n=fs(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function Dmt(t){return function(e,r){return e.barycenterr.barycenter?1:t?r.i-e.i:e.i-r.i}}var X3e=$(()=>{b();Xt();Th()});function LU(t,e,r,n){var i=t.children(e),a=t.node(e),s=a?a.borderLeft:void 0,o=a?a.borderRight:void 0,l={};s&&(i=sn(i,function(g){return g!==s&&g!==o}));var u=H3e(t,i);De(u,function(g){if(t.children(g.v).length){var m=LU(t,g.v,r,n);l[g.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&Rmt(g,m)}});var h=W3e(u,r);Omt(h,l);var f=j3e(h,n);if(s&&(f.vs=an([s,f.vs,o]),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function Omt(t,e){De(t,function(r){r.vs=an(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function Rmt(t,e){kr(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var K3e=$(()=>{b();Xt();q3e();G3e();X3e()});function J3e(t){var e=fU(t),r=Z3e(t,cc(1,e+1),"inEdges"),n=Z3e(t,cc(e-1,-1,-1),"outEdges"),i=V3e(t);Q3e(t,i);for(var a=Number.POSITIVE_INFINITY,s,o=0,l=0;l<4;++o,++l){Imt(o%2?r:n,o%4>=2),i=Op(t);var u=z3e(t,i);u{b();Xt();qo();Th();P3e();B3e();$3e();U3e();K3e()});function t5e(t){var e=Pmt(t);De(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=Nmt(t,e,i.v,i.w),s=a.path,o=a.lca,l=0,u=s[l],h=!0;r!==i.w;){if(n=t.node(r),h){for(;(u=s[l])!==o&&t.node(u).maxRanks||o>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function Pmt(t){var e={},r=0;function n(i){var a=r;De(t.children(i),n),e[i]={low:a,lim:r++}}return De(t.children(),n),e}var r5e=$(()=>{b();Xt()});function Fmt(t,e){var r={};function n(i,a){var s=0,o=0,l=i.length,u=fs(a);return De(a,function(h,f){var d=zmt(t,h),p=d?t.node(d).order:l;(d||h===u)&&(De(a.slice(o,f+1),function(g){De(t.predecessors(g),function(m){var v=t.node(m),y=v.order;(yu)&&n5e(r,d,h)})})}function i(a,s){var o=-1,l,u=0;return De(s,function(h,f){if(t.node(h).dummy==="border"){var d=t.predecessors(h);d.length&&(l=t.node(d[0]).order,n(s,u,f,o,l),u=f,o=l)}n(s,u,s.length,l,a.length)}),s}return on(e,i),r}function zmt(t,e){if(t.node(e).dummy)return io(t.predecessors(e),function(r){return t.node(r).dummy})}function n5e(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function $mt(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function Vmt(t,e,r,n){var i={},a={},s={};return De(e,function(o){De(o,function(l,u){i[l]=l,a[l]=l,s[l]=u})}),De(e,function(o){var l=-1;De(o,function(u){var h=n(u);if(h.length){h=wh(h,function(m){return s[m]});for(var f=(h.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var g=h[d];a[u]===u&&l{b();Xt();qo();Th()});function s5e(t){t=e7(t),Xmt(t),XV(i5e(t),function(e,r){t.node(r).x=e})}function Xmt(t){var e=Op(t),r=t.graph().ranksep,n=0;De(e,function(i){var a=Uo(ut(i,function(s){return t.node(s).height}));De(i,function(s){t.node(s).y=n+a/2}),n+=a+r})}var o5e=$(()=>{b();Xt();Th();a5e()});function Zf(t,e){var r=e&&e.debugTiming?e3e:t3e;r("layout",()=>{var n=r(" buildLayoutGraph",()=>s1t(t));r(" runLayout",()=>Kmt(n,r)),r(" updateInputGraph",()=>Zmt(t,n))})}function Kmt(t,e){e(" makeSpaceForEdgeLabels",()=>o1t(t)),e(" removeSelfEdges",()=>m1t(t)),e(" acyclic",()=>Y4e(t)),e(" nestingGraph.run",()=>D3e(t)),e(" rank",()=>_U(e7(t))),e(" injectEdgeLabelProxies",()=>l1t(t)),e(" removeEmptyRanks",()=>Q4e(t)),e(" nestingGraph.cleanup",()=>R3e(t)),e(" normalizeRanks",()=>Z4e(t)),e(" assignRankMinMax",()=>c1t(t)),e(" removeEdgeLabelProxies",()=>u1t(t)),e(" normalize.run",()=>u3e(t)),e(" parentDummyChains",()=>t5e(t)),e(" addBorderSegments",()=>n3e(t)),e(" order",()=>J3e(t)),e(" insertSelfEdges",()=>v1t(t)),e(" adjustCoordinateSystem",()=>s3e(t)),e(" position",()=>s5e(t)),e(" positionSelfEdges",()=>y1t(t)),e(" removeBorderNodes",()=>g1t(t)),e(" normalize.undo",()=>h3e(t)),e(" fixupEdgeLabelCoords",()=>d1t(t)),e(" undoCoordinateSystem",()=>o3e(t)),e(" translateGraph",()=>h1t(t)),e(" assignNodeIntersects",()=>f1t(t)),e(" reversePoints",()=>p1t(t)),e(" acyclic.undo",()=>j4e(t))}function Zmt(t,e){De(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),De(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function s1t(t){var e=new Yr({multigraph:!0,compound:!0}),r=DU(t.graph());return e.setGraph(wp({},Jmt,MU(r,Qmt),Yg(r,e1t))),De(t.nodes(),function(n){var i=DU(t.node(n));e.setNode(n,Lp(MU(i,t1t),r1t)),e.setParent(n,t.parent(n))}),De(t.edges(),function(n){var i=DU(t.edge(n));e.setEdge(n,wp({},i1t,MU(i,n1t),Yg(i,a1t)))}),e}function o1t(t){var e=t.graph();e.ranksep/=2,De(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function l1t(t){De(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};kh(t,"edge-proxy",a,"_ep")}})}function c1t(t){var e=0;De(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=Uo(e,n.maxRank))}),t.graph().maxRank=e}function u1t(t){De(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function h1t(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),s=a.marginx||0,o=a.marginy||0;function l(u){var h=u.x,f=u.y,d=u.width,p=u.height;e=Math.min(e,h-d/2),r=Math.max(r,h+d/2),n=Math.min(n,f-p/2),i=Math.max(i,f+p/2)}De(t.nodes(),function(u){l(t.node(u))}),De(t.edges(),function(u){var h=t.edge(u);Object.prototype.hasOwnProperty.call(h,"x")&&l(h)}),e-=s,n-=o,De(t.nodes(),function(u){var h=t.node(u);h.x-=e,h.y-=n}),De(t.edges(),function(u){var h=t.edge(u);De(h.points,function(f){f.x-=e,f.y-=n}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=e),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=n)}),a.width=r-e+s,a.height=i-n+o}function f1t(t){De(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=i,s=n),r.points.unshift(uU(n,a)),r.points.push(uU(i,s))})}function d1t(t){De(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function p1t(t){De(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function g1t(t){De(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(fs(r.borderLeft)),s=t.node(fs(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),De(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function m1t(t){De(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function v1t(t){var e=Op(t);De(e,function(r){var n=0;De(r,function(i,a){var s=t.node(i);s.order=a+n,De(s.selfEdges,function(o){kh(t,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:a+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function y1t(t){De(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],r.label.x=r.x,r.label.y=r.y}})}function MU(t,e){return Wg(Yg(t,e),Number)}function DU(t){var e={};return De(t,function(r,n){e[n.toLowerCase()]=r}),e}var Qmt,Jmt,e1t,t1t,r1t,n1t,i1t,a1t,l5e=$(()=>{b();Xt();qo();i3e();c3e();cU();gU();AU();I3e();e5e();r5e();o5e();Th();Qmt=["nodesep","edgesep","ranksep","marginx","marginy"],Jmt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},e1t=["acyclicer","ranker","rankdir","align"],t1t=["width","height"],r1t={width:0,height:0},n1t=["minlen","weight","width","height","labeloffset"],i1t={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},a1t=["labelpos"]});var h3=$(()=>{b();cU();l5e();gU();AU()});function uc(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:b1t(t),edges:x1t(t)};return kr(t.graph())||(e.value=wn(t.graph())),e}function b1t(t){return ut(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return kr(r)||(i.value=r),kr(n)||(i.parent=n),i})}function x1t(t){return ut(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return kr(e.name)||(n.name=e.name),kr(r)||(n.value=r),n})}var OU=$(()=>{b();Xt();QA()});var v5e={};Wt(v5e,{render:()=>C1t});var Mr,Zg,h5e,w1t,i7,k1t,f5e,d5e,T1t,f3,u5e,E1t,p5e,g5e,S1t,m5e,C1t,y5e=$(()=>{b();Xf();lu();Kc();gh();Kl();ro();Qn();Sr();h3();OU();qo();qo();OU();Mr=new Map,Zg=new Map,h5e=new Map,w1t=x(()=>{Zg.clear(),h5e.clear(),Mr.clear()},"clear"),i7=x((t,e)=>{let r=Zg.get(e)||[];return ie.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),k1t=x((t,e)=>{let r=Zg.get(e)||[];return ie.info("Descendants of ",e," is ",r),ie.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||i7(t.v,e)||i7(t.w,e)||r.includes(t.w):(ie.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),f5e=x((t,e,r,n)=>{ie.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),ie.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)f5e(a,e,r,n);else{let s=e.node(a);ie.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(ie.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(ie.debug("Setting parent",a,t),r.setParent(a,t)):(ie.info("In copy ",t,"root",n,"data",e.node(t),n),ie.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let o=e.edges(a);ie.debug("Copying Edges",o),o.forEach(l=>{ie.info("Edge",l);let u=e.edge(l.v,l.w,l.name);ie.info("Edge data",u,n);try{k1t(l,n)?(ie.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),ie.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):ie.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(h){ie.error(h)}})}ie.debug("Removing node",a),e.removeNode(a)})},"copy"),d5e=x((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)h5e.set(i,t),n=[...n,...d5e(i,e)];return n},"extractDescendants"),T1t=x((t,e,r)=>{let n=t.edges().filter(l=>l.v===e||l.w===e),i=t.edges().filter(l=>l.v===r||l.w===r),a=n.map(l=>({v:l.v===e?r:l.v,w:l.w===e?e:l.w})),s=i.map(l=>({v:l.v,w:l.w}));return a.filter(l=>s.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),f3=x((t,e,r)=>{let n=e.children(t);if(ie.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let s=f3(a,e,r),o=T1t(e,r,s);if(s)if(o.length>0)i=s;else return s}return i},"findNonClusterChild"),u5e=x(t=>!Mr.has(t)||!Mr.get(t).externalConnections?t:Mr.has(t)?Mr.get(t).id:t,"getAnchorId"),E1t=x((t,e)=>{if(!t||e>10){ie.debug("Opting out, no graph ");return}else ie.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(ie.warn("Cluster identified",r," Replacement id in edges: ",f3(r,t,r)),Zg.set(r,d5e(r,t)),Mr.set(r,{id:f3(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(ie.debug("Cluster identified",r,Zg),i.forEach(a=>{let s=i7(a.v,r),o=i7(a.w,r);s^o&&(ie.warn("Edge: ",a," leaves cluster ",r),ie.warn("Descendants of XXX ",r,": ",Zg.get(r)),Mr.get(r).externalConnections=!0)})):ie.debug("Not a cluster ",r,Zg)});for(let r of Mr.keys()){let n=Mr.get(r).id,i=t.parent(n);i!==r&&Mr.has(i)&&!Mr.get(i).externalConnections&&(Mr.get(r).id=i)}t.edges().forEach(function(r){let n=t.edge(r);ie.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),ie.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(ie.warn("Fix XXX",Mr,"ids:",r.v,r.w,"Translating: ",Mr.get(r.v)," --- ",Mr.get(r.w)),Mr.get(r.v)||Mr.get(r.w)){if(ie.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=u5e(r.v),a=u5e(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let s=t.parent(i);Mr.get(s).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let s=t.parent(a);Mr.get(s).externalConnections=!0,n.toCluster=r.w}ie.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),ie.warn("Adjusted Graph",uc(t)),p5e(t,0),ie.trace(Mr)},"adjustClustersAndEdges"),p5e=x((t,e)=>{if(ie.warn("extractor - ",e,uc(t),t.children("D")),e>10){ie.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){ie.debug("Done, no node has children",t.nodes());return}ie.debug("Nodes = ",r,e);for(let i of r)if(ie.debug("Extracting node",i,Mr,Mr.has(i)&&!Mr.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!Mr.has(i))ie.debug("Not a cluster",i,e);else if(!Mr.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){ie.warn("Cluster without external connections, without a parent and with children",i,e);let s=t.graph().rankdir==="TB"?"LR":"TB";Mr.get(i)?.clusterData?.dir&&(s=Mr.get(i).clusterData.dir,ie.warn("Fixing dir",Mr.get(i).clusterData.dir,s));let o=new Yr({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});ie.warn("Old graph before copy",uc(t)),f5e(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Mr.get(i).clusterData,label:Mr.get(i).label,graph:o}),ie.warn("New graph after copy node: (",i,")",uc(o)),ie.debug("Old graph after copy",uc(t))}else ie.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Mr.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),ie.debug(Mr);r=t.nodes(),ie.warn("New list of nodes",r);for(let i of r){let a=t.node(i);ie.warn(" Now next level",i,a),a?.clusterNode&&p5e(a.graph,e+1)}},"extractor"),g5e=x((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=g5e(t,i);r=[...r,...a]}),r},"sorter"),S1t=x(t=>g5e(t,t.children()),"sortNodesByHierarchy"),m5e=x(async(t,e,r,n,i,a)=>{ie.warn("Graph in recursive render:XAX",uc(e),i);let s=e.graph().rankdir;ie.trace("Dir in recursive render - dir:",s);let o=t.insert("g").attr("class","root");e.nodes()?ie.info("Recursive render XXX",e.nodes()):ie.info("No nodes found for",e),e.edges().length>0&&ie.info("Recursive edges",e.edge(e.edges()[0]));let l=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),h=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(m){let v=e.node(m);if(i!==void 0){let y=JSON.parse(JSON.stringify(i.clusterData));ie.trace(`Setting data for parent cluster XXX Node.id = `,m,` data=`,y.height,` Parent cluster`,i.height),e.setNode(i.id,y),e.parent(m)||(ie.trace("Setting parent",m,i.id),e.setParent(m,i.id,y))}if(ie.info("(Insert) Node XXX"+m+": "+JSON.stringify(e.node(m))),v?.clusterNode){ie.info("Cluster identified XBX",m,v.width,e.node(m));let{ranksep:y,nodesep:w}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:y+25,nodesep:w});let k=await m5e(f,v.graph,r,n,e.node(m),a),E=k.elem;Kt(v,E),v.diff=k.diff||0,ie.info("New compound node after recursive render XAX",m,"width",v.width,"height",v.height),Pbe(E,v)}else e.children(m).length>0?(ie.trace("Cluster - the non recursive path XBX",m,v.id,v,v.width,"Graph:",e),ie.trace(f3(v.id,e)),Mr.set(v.id,{id:f3(v.id,e),node:v})):(ie.trace("Node - the non recursive path XAX",m,f,e.node(m),s),await $g(f,e.node(m),{config:a,dir:s}))})),await x(async()=>{let m=e.edges().map(async function(v){let y=e.edge(v.v,v.w,v.name);ie.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),ie.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),ie.info("Fix",Mr,"ids:",v.v,v.w,"Translating: ",Mr.get(v.v),Mr.get(v.w)),await J6(h,y)});await Promise.all(m)},"processEdges")(),ie.info("Graph before layout:",JSON.stringify(uc(e))),ie.info("############################################# XXX"),ie.info("### Layout ### XXX"),ie.info("############################################# XXX"),Zf(e),ie.info("Graph after layout:",JSON.stringify(uc(e)));let p=0,{subGraphTitleTotalMargin:g}=Af(a);return await Promise.all(S1t(e).map(async function(m){let v=e.node(m);if(ie.info("Position XBX => "+m+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v?.clusterNode)v.y+=g,ie.info("A tainted cluster node XBX1",m,v.id,v.width,v.height,v.x,v.y,e.parent(m)),Mr.get(v.id).node=v,e3(v);else if(e.children(m).length>0){ie.info("A pure cluster node XBX1",m,v.id,v.x,v.y,v.width,v.height,e.parent(m)),v.height+=g,e.node(v.parentId);let y=v?.padding/2||0,w=v?.labelBBox?.height||0,k=w-y||0;ie.debug("OffsetY",k,"labelHeight",w,"halfPadding",y),await fy(l,v),Mr.get(v.id).node=v}else{let y=e.node(v.parentId);v.y+=g/2,ie.info("A regular node XBX1 - using the padding",v.id,"parent",v.parentId,v.width,v.height,v.x,v.y,"offsetY",v.offsetY,"parent",y,y?.offsetY,v),e3(v)}})),e.edges().forEach(function(m){let v=e.edge(m);ie.info("Edge "+m.v+" -> "+m.w+": "+JSON.stringify(v),v),v.points.forEach(E=>E.y+=g/2);let y=e.node(m.v);var w=e.node(m.w);let k=tA(u,v,Mr,r,y,w,n);eA(v,k)}),e.nodes().forEach(function(m){let v=e.node(m);ie.info(m,v.type,v.diff),v.isGroup&&(p=v.diff)}),ie.warn("Returning from recursive render XAX",o,p),{elem:o,diff:p}},"recursiveRender"),C1t=x(async(t,e)=>{let r=new Yr({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");rA(n,t.markers,t.type,t.diagramId),Fbe(),Vbe(),kye(),w1t(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),ie.debug("Edges:",t.edges),t.edges.forEach(a=>{if(a.start===a.end){let s=a.start,o=s+"---"+s+"---1",l=s+"---"+s+"---2",u=r.node(s);r.setNode(o,{domId:o,id:o,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(o,u.parentId),r.setNode(l,{domId:l,id:l,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(l,u.parentId);let h=structuredClone(a),f=structuredClone(a),d=structuredClone(a);h.label="",h.arrowTypeEnd="none",h.id=s+"-cyclic-special-1",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-mid",d.label="",u.isGroup&&(h.fromCluster=s,d.toCluster=s),d.id=s+"-cyclic-special-2",r.setEdge(s,o,h,s+"-cyclic-special-0"),r.setEdge(o,l,f,s+"-cyclic-special-1"),r.setEdge(l,s,d,s+"-cyc{b();Xf();lu();Qn();Sr();_1t={common:ct,getConfig:rn,insertCluster:fy,insertEdge:tA,insertEdgeLabel:J6,insertMarkers:rA,insertNode:$g,interpolateToCurve:A6,labelHelper:pr,log:ie,positionEdgeLabel:eA},d3={},RU=x(t=>{for(let e of t)d3[e.name]=e},"registerLayoutLoaders"),A1t=x(()=>{RU([{name:"dagre",loader:x(async()=>await Promise.resolve().then(()=>(y5e(),v5e)),"loader")}])},"registerDefaultLayoutLoaders");A1t();Ry=x(async(t,e)=>{if(!(t.layoutAlgorithm in d3))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=d3[t.layoutAlgorithm];return(await r.loader()).render(t,e,_1t,{algorithm:r.algorithm})},"render"),a7=x((t="",{fallback:e="dagre"}={})=>{if(t in d3)return t;if(e in d3)return ie.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")});var p3,IU=$(()=>{b();p3="11.4.1"});var Is,Jf=$(()=>{b();Sr();Cr();Is=x(t=>{let{securityLevel:e}=Te(),r=Je("body");if(e==="sandbox"){let a=Je(`#i${t}`).node()?.contentDocument??document;r=Je(a.body)}return r.select(`#${t}`)},"selectSvgElement")});var FU,Jg,m7,F5e,B5e,z5e,Eh,v7,y7=$(()=>{b();Sr();FU=Vi(kv(),1),Jg=x((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),m7=x((t,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};Jg(t,r).lower()},"drawBackgroundRect"),F5e=x((t,e)=>{let r=e.text.replace(ig," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),B5e=x((t,e,r,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",r);let a=(0,FU.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),z5e=x((t,e,r,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",r);let a=(0,FU.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),Eh=x(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),v7=x(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var Z5e={};Wt(Z5e,{diagram:()=>Tvt});function pc(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=P$(e[t].text,i,n),e[t].textLines=e[t].text.split(ct.lineBreakRegex).length,e[t].width=i,e[t].height=U4(e[t].text,n);else{let a=e[t].text.split(ct.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let o of a)e[t].width=Math.max(Fo(o,n),e[t].width),s=U4(o,n),e[t].height=e[t].height+s}}function qU(t,e,r,n,i){let a=new j5e(i);a.data.widthLimit=r.data.widthLimit/Math.min(zU,n.length);for(let[s,o]of n.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Yt.wrap,h=b7(Yt);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",pc("label",o,u,h,a.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let g=b7(Yt);pc("type",o,u,g,a.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let g=b7(Yt);g.fontSize=g.fontSize-2,pc("descr",o,u,g,a.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(s==0||s%zU===0){let g=r.data.startx+Yt.diagramMarginX,m=r.data.stopy+Yt.diagramMarginY+l;a.setData(g,g,m,m)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+Yt.diagramMarginX:a.data.startx,m=a.data.starty;a.setData(g,g,m,m)}a.name=o.alias;let f=i.db.getC4ShapeArray(o.alias),d=i.db.getC4ShapeKeys(o.alias);d.length>0&&K5e(a,t,f,d),e=o.alias;let p=i.db.getBoundarys(e);p.length>0&&qU(t,e,a,p,i),o.alias!=="global"&&X5e(t,o,a),r.data.stopy=Math.max(a.data.stopy+Yt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Yt.c4ShapeMargin,r.data.stopx),T7=Math.max(T7,r.data.stopx),E7=Math.max(E7,r.data.stopy)}}var W5e,x7,M1t,hu,Pp,ao,uu,Ch,b3,VU,UU,w7,k7,U5e,D1t,O1t,R1t,I1t,N1t,P1t,F1t,B1t,z1t,$1t,V1t,U1t,H1t,q1t,W1t,G1t,Y1t,H5e,j1t,X1t,q5e,K1t,Z1t,Q1t,J1t,Fp,evt,tvt,rvt,nvt,ivt,BU,HU,G5e,avt,svt,ovt,lvt,cvt,uvt,hvt,fvt,dvt,pvt,gvt,mvt,td,Sh,T7,E7,Y5e,zU,Yt,j5e,$U,y3,b7,vvt,X5e,K5e,dc,$5e,yvt,bvt,xvt,V5e,wvt,kvt,Tvt,Q5e=$(()=>{b();y7();Qn();Sr();Cr();W5e=Vi(kv(),1),x7=function(){var t=x(function(et,ze,He,Ee){for(He=He||{},Ee=et.length;Ee--;He[et[Ee]]=ze);return He},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],s=[1,63],o=[1,64],l=[1,65],u=[1,66],h=[1,67],f=[1,68],d=[1,69],p=[1,29],g=[1,30],m=[1,31],v=[1,32],y=[1,33],w=[1,34],k=[1,35],E=[1,36],T=[1,37],S=[1,38],L=[1,39],_=[1,40],M=[1,41],I=[1,42],O=[1,43],C=[1,44],R=[1,45],D=[1,46],P=[1,47],A=[1,48],N=[1,50],F=[1,51],B=[1,52],V=[1,53],z=[1,54],H=[1,55],K=[1,56],X=[1,57],ne=[1,58],j=[1,59],ee=[1,60],Q=[14,42],G=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Z=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],te=[1,82],oe=[1,83],de=[1,84],pe=[1,85],re=[12,14,42],Be=[12,14,33,42],le=[12,14,33,42,76,77,79,80],Se=[12,33],Ye=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],We={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:x(function(ze,He,Ee,Y,ve,ce,me){var q=ce.length-1;switch(ve){case 3:Y.setDirection("TB");break;case 4:Y.setDirection("BT");break;case 5:Y.setDirection("RL");break;case 6:Y.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:Y.setC4Type(ce[q-3]);break;case 19:Y.setTitle(ce[q].substring(6)),this.$=ce[q].substring(6);break;case 20:Y.setAccDescription(ce[q].substring(15)),this.$=ce[q].substring(15);break;case 21:this.$=ce[q].trim(),Y.setTitle(this.$);break;case 22:case 23:this.$=ce[q].trim(),Y.setAccDescription(this.$);break;case 28:ce[q].splice(2,0,"ENTERPRISE"),Y.addPersonOrSystemBoundary(...ce[q]),this.$=ce[q];break;case 29:ce[q].splice(2,0,"SYSTEM"),Y.addPersonOrSystemBoundary(...ce[q]),this.$=ce[q];break;case 30:Y.addPersonOrSystemBoundary(...ce[q]),this.$=ce[q];break;case 31:ce[q].splice(2,0,"CONTAINER"),Y.addContainerBoundary(...ce[q]),this.$=ce[q];break;case 32:Y.addDeploymentNode("node",...ce[q]),this.$=ce[q];break;case 33:Y.addDeploymentNode("nodeL",...ce[q]),this.$=ce[q];break;case 34:Y.addDeploymentNode("nodeR",...ce[q]),this.$=ce[q];break;case 35:Y.popBoundaryParseStack();break;case 39:Y.addPersonOrSystem("person",...ce[q]),this.$=ce[q];break;case 40:Y.addPersonOrSystem("external_person",...ce[q]),this.$=ce[q];break;case 41:Y.addPersonOrSystem("system",...ce[q]),this.$=ce[q];break;case 42:Y.addPersonOrSystem("system_db",...ce[q]),this.$=ce[q];break;case 43:Y.addPersonOrSystem("system_queue",...ce[q]),this.$=ce[q];break;case 44:Y.addPersonOrSystem("external_system",...ce[q]),this.$=ce[q];break;case 45:Y.addPersonOrSystem("external_system_db",...ce[q]),this.$=ce[q];break;case 46:Y.addPersonOrSystem("external_system_queue",...ce[q]),this.$=ce[q];break;case 47:Y.addContainer("container",...ce[q]),this.$=ce[q];break;case 48:Y.addContainer("container_db",...ce[q]),this.$=ce[q];break;case 49:Y.addContainer("container_queue",...ce[q]),this.$=ce[q];break;case 50:Y.addContainer("external_container",...ce[q]),this.$=ce[q];break;case 51:Y.addContainer("external_container_db",...ce[q]),this.$=ce[q];break;case 52:Y.addContainer("external_container_queue",...ce[q]),this.$=ce[q];break;case 53:Y.addComponent("component",...ce[q]),this.$=ce[q];break;case 54:Y.addComponent("component_db",...ce[q]),this.$=ce[q];break;case 55:Y.addComponent("component_queue",...ce[q]),this.$=ce[q];break;case 56:Y.addComponent("external_component",...ce[q]),this.$=ce[q];break;case 57:Y.addComponent("external_component_db",...ce[q]),this.$=ce[q];break;case 58:Y.addComponent("external_component_queue",...ce[q]),this.$=ce[q];break;case 60:Y.addRel("rel",...ce[q]),this.$=ce[q];break;case 61:Y.addRel("birel",...ce[q]),this.$=ce[q];break;case 62:Y.addRel("rel_u",...ce[q]),this.$=ce[q];break;case 63:Y.addRel("rel_d",...ce[q]),this.$=ce[q];break;case 64:Y.addRel("rel_l",...ce[q]),this.$=ce[q];break;case 65:Y.addRel("rel_r",...ce[q]),this.$=ce[q];break;case 66:Y.addRel("rel_b",...ce[q]),this.$=ce[q];break;case 67:ce[q].splice(0,1),Y.addRel("rel",...ce[q]),this.$=ce[q];break;case 68:Y.updateElStyle("update_el_style",...ce[q]),this.$=ce[q];break;case 69:Y.updateRelStyle("update_rel_style",...ce[q]),this.$=ce[q];break;case 70:Y.updateLayoutConfig("update_layout_config",...ce[q]),this.$=ce[q];break;case 71:this.$=[ce[q]];break;case 72:ce[q].unshift(ce[q-1]),this.$=ce[q];break;case 73:case 75:this.$=ce[q].trim();break;case 74:let Le={};Le[ce[q-1].trim()]=ce[q].trim(),this.$=Le;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:w,50:k,51:E,52:T,53:S,54:L,55:_,56:M,57:I,58:O,59:C,60:R,61:D,62:P,63:A,64:N,65:F,66:B,67:V,68:z,69:H,70:K,71:X,72:ne,73:j,74:ee},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:w,50:k,51:E,52:T,53:S,54:L,55:_,56:M,57:I,58:O,59:C,60:R,61:D,62:P,63:A,64:N,65:F,66:B,67:V,68:z,69:H,70:K,71:X,72:ne,73:j,74:ee},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:w,50:k,51:E,52:T,53:S,54:L,55:_,56:M,57:I,58:O,59:C,60:R,61:D,62:P,63:A,64:N,65:F,66:B,67:V,68:z,69:H,70:K,71:X,72:ne,73:j,74:ee},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:w,50:k,51:E,52:T,53:S,54:L,55:_,56:M,57:I,58:O,59:C,60:R,61:D,62:P,63:A,64:N,65:F,66:B,67:V,68:z,69:H,70:K,71:X,72:ne,73:j,74:ee},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:w,50:k,51:E,52:T,53:S,54:L,55:_,56:M,57:I,58:O,59:C,60:R,61:D,62:P,63:A,64:N,65:F,66:B,67:V,68:z,69:H,70:K,71:X,72:ne,73:j,74:ee},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k,51:E,52:T,53:S,54:L,55:_,56:M,57:I,58:O,59:C,60:R,61:D,62:P,63:A,64:N,65:F,66:B,67:V,68:z,69:H,70:K,71:X,72:ne,73:j,74:ee}),t(Q,[2,14]),t(G,[2,16],{12:[1,76]}),t(Q,[2,36],{12:[1,77]}),t(Z,[2,19]),t(Z,[2,20]),{25:[1,78]},{27:[1,79]},t(Z,[2,23]),{35:80,75:81,76:te,77:oe,79:de,80:pe},{35:86,75:81,76:te,77:oe,79:de,80:pe},{35:87,75:81,76:te,77:oe,79:de,80:pe},{35:88,75:81,76:te,77:oe,79:de,80:pe},{35:89,75:81,76:te,77:oe,79:de,80:pe},{35:90,75:81,76:te,77:oe,79:de,80:pe},{35:91,75:81,76:te,77:oe,79:de,80:pe},{35:92,75:81,76:te,77:oe,79:de,80:pe},{35:93,75:81,76:te,77:oe,79:de,80:pe},{35:94,75:81,76:te,77:oe,79:de,80:pe},{35:95,75:81,76:te,77:oe,79:de,80:pe},{35:96,75:81,76:te,77:oe,79:de,80:pe},{35:97,75:81,76:te,77:oe,79:de,80:pe},{35:98,75:81,76:te,77:oe,79:de,80:pe},{35:99,75:81,76:te,77:oe,79:de,80:pe},{35:100,75:81,76:te,77:oe,79:de,80:pe},{35:101,75:81,76:te,77:oe,79:de,80:pe},{35:102,75:81,76:te,77:oe,79:de,80:pe},{35:103,75:81,76:te,77:oe,79:de,80:pe},{35:104,75:81,76:te,77:oe,79:de,80:pe},t(re,[2,59]),{35:105,75:81,76:te,77:oe,79:de,80:pe},{35:106,75:81,76:te,77:oe,79:de,80:pe},{35:107,75:81,76:te,77:oe,79:de,80:pe},{35:108,75:81,76:te,77:oe,79:de,80:pe},{35:109,75:81,76:te,77:oe,79:de,80:pe},{35:110,75:81,76:te,77:oe,79:de,80:pe},{35:111,75:81,76:te,77:oe,79:de,80:pe},{35:112,75:81,76:te,77:oe,79:de,80:pe},{35:113,75:81,76:te,77:oe,79:de,80:pe},{35:114,75:81,76:te,77:oe,79:de,80:pe},{35:115,75:81,76:te,77:oe,79:de,80:pe},{20:116,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:w,50:k,51:E,52:T,53:S,54:L,55:_,56:M,57:I,58:O,59:C,60:R,61:D,62:P,63:A,64:N,65:F,66:B,67:V,68:z,69:H,70:K,71:X,72:ne,73:j,74:ee},{12:[1,118],33:[1,117]},{35:119,75:81,76:te,77:oe,79:de,80:pe},{35:120,75:81,76:te,77:oe,79:de,80:pe},{35:121,75:81,76:te,77:oe,79:de,80:pe},{35:122,75:81,76:te,77:oe,79:de,80:pe},{35:123,75:81,76:te,77:oe,79:de,80:pe},{35:124,75:81,76:te,77:oe,79:de,80:pe},{35:125,75:81,76:te,77:oe,79:de,80:pe},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t(G,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k,51:E,52:T,53:S,54:L,55:_,56:M,57:I,58:O,59:C,60:R,61:D,62:P,63:A,64:N,65:F,66:B,67:V,68:z,69:H,70:K,71:X,72:ne,73:j,74:ee}),t(Z,[2,21]),t(Z,[2,22]),t(re,[2,39]),t(Be,[2,71],{75:81,35:132,76:te,77:oe,79:de,80:pe}),t(le,[2,73]),{78:[1,133]},t(le,[2,75]),t(le,[2,76]),t(re,[2,40]),t(re,[2,41]),t(re,[2,42]),t(re,[2,43]),t(re,[2,44]),t(re,[2,45]),t(re,[2,46]),t(re,[2,47]),t(re,[2,48]),t(re,[2,49]),t(re,[2,50]),t(re,[2,51]),t(re,[2,52]),t(re,[2,53]),t(re,[2,54]),t(re,[2,55]),t(re,[2,56]),t(re,[2,57]),t(re,[2,58]),t(re,[2,60]),t(re,[2,61]),t(re,[2,62]),t(re,[2,63]),t(re,[2,64]),t(re,[2,65]),t(re,[2,66]),t(re,[2,67]),t(re,[2,68]),t(re,[2,69]),t(re,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(Se,[2,28]),t(Se,[2,29]),t(Se,[2,30]),t(Se,[2,31]),t(Se,[2,32]),t(Se,[2,33]),t(Se,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(G,[2,18]),t(Q,[2,38]),t(Be,[2,72]),t(le,[2,74]),t(re,[2,24]),t(re,[2,35]),t(Ye,[2,25]),t(Ye,[2,26],{12:[1,138]}),t(Ye,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:x(function(ze,He){if(He.recoverable)this.trace(ze);else{var Ee=new Error(ze);throw Ee.hash=He,Ee}},"parseError"),parse:x(function(ze){var He=this,Ee=[0],Y=[],ve=[null],ce=[],me=this.table,q="",Le=0,J=0,fe=0,xe=2,Ie=1,Fe=ce.slice.call(arguments,1),ye=Object.create(this.lexer),qe={yy:{}};for(var Re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Re)&&(qe.yy[Re]=this.yy[Re]);ye.setInput(ze,qe.yy),qe.yy.lexer=ye,qe.yy.parser=this,typeof ye.yylloc>"u"&&(ye.yylloc={});var nt=ye.yylloc;ce.push(nt);var mt=ye.options&&ye.options.ranges;typeof qe.yy.parseError=="function"?this.parseError=qe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tt(Et){Ee.length=Ee.length-2*Et,ve.length=ve.length-Et,ce.length=ce.length-Et}x(Tt,"popStack");function ue(){var Et;return Et=Y.pop()||ye.lex()||Ie,typeof Et!="number"&&(Et instanceof Array&&(Y=Et,Et=Y.pop()),Et=He.symbols_[Et]||Et),Et}x(ue,"lex");for(var ae,ke,we,Ne,Ge,st,ot={},at,Ue,it,pt;;){if(we=Ee[Ee.length-1],this.defaultActions[we]?Ne=this.defaultActions[we]:((ae===null||typeof ae>"u")&&(ae=ue()),Ne=me[we]&&me[we][ae]),typeof Ne>"u"||!Ne.length||!Ne[0]){var yt="";pt=[];for(at in me[we])this.terminals_[at]&&at>xe&&pt.push("'"+this.terminals_[at]+"'");ye.showPosition?yt="Parse error on line "+(Le+1)+`: `+ye.showPosition()+` Expecting `+pt.join(", ")+", got '"+(this.terminals_[ae]||ae)+"'":yt="Parse error on line "+(Le+1)+": Unexpected "+(ae==Ie?"end of input":"'"+(this.terminals_[ae]||ae)+"'"),this.parseError(yt,{text:ye.match,token:this.terminals_[ae]||ae,line:ye.yylineno,loc:nt,expected:pt})}if(Ne[0]instanceof Array&&Ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+we+", token: "+ae);switch(Ne[0]){case 1:Ee.push(ae),ve.push(ye.yytext),ce.push(ye.yylloc),Ee.push(Ne[1]),ae=null,ke?(ae=ke,ke=null):(J=ye.yyleng,q=ye.yytext,Le=ye.yylineno,nt=ye.yylloc,fe>0&&fe--);break;case 2:if(Ue=this.productions_[Ne[1]][1],ot.$=ve[ve.length-Ue],ot._$={first_line:ce[ce.length-(Ue||1)].first_line,last_line:ce[ce.length-1].last_line,first_column:ce[ce.length-(Ue||1)].first_column,last_column:ce[ce.length-1].last_column},mt&&(ot._$.range=[ce[ce.length-(Ue||1)].range[0],ce[ce.length-1].range[1]]),st=this.performAction.apply(ot,[q,J,Le,qe.yy,Ne[1],ve,ce].concat(Fe)),typeof st<"u")return st;Ue&&(Ee=Ee.slice(0,-1*Ue*2),ve=ve.slice(0,-1*Ue),ce=ce.slice(0,-1*Ue)),Ee.push(this.productions_[Ne[1]][0]),ve.push(ot.$),ce.push(ot._$),it=me[Ee[Ee.length-2]][Ee[Ee.length-1]],Ee.push(it);break;case 3:return!0}}return!0},"parse")},Ze=function(){var et={EOF:1,parseError:x(function(He,Ee){if(this.yy.parser)this.yy.parser.parseError(He,Ee);else throw new Error(He)},"parseError"),setInput:x(function(ze,He){return this.yy=He||this.yy||{},this._input=ze,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var ze=this._input[0];this.yytext+=ze,this.yyleng++,this.offset++,this.match+=ze,this.matched+=ze;var He=ze.match(/(?:\r\n?|\n).*/g);return He?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ze},"input"),unput:x(function(ze){var He=ze.length,Ee=ze.split(/(?:\r\n?|\n)/g);this._input=ze+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-He),this.offset-=He;var Y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ee.length-1&&(this.yylineno-=Ee.length-1);var ve=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ee?(Ee.length===Y.length?this.yylloc.first_column:0)+Y[Y.length-Ee.length].length-Ee[0].length:this.yylloc.first_column-He},this.options.ranges&&(this.yylloc.range=[ve[0],ve[0]+this.yyleng-He]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(ze){this.unput(this.match.slice(ze))},"less"),pastInput:x(function(){var ze=this.matched.substr(0,this.matched.length-this.match.length);return(ze.length>20?"...":"")+ze.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var ze=this.match;return ze.length<20&&(ze+=this._input.substr(0,20-ze.length)),(ze.substr(0,20)+(ze.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var ze=this.pastInput(),He=new Array(ze.length+1).join("-");return ze+this.upcomingInput()+` `+He+"^"},"showPosition"),test_match:x(function(ze,He){var Ee,Y,ve;if(this.options.backtrack_lexer&&(ve={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ve.yylloc.range=this.yylloc.range.slice(0))),Y=ze[0].match(/(?:\r\n?|\n).*/g),Y&&(this.yylineno+=Y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Y?Y[Y.length-1].length-Y[Y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ze[0].length},this.yytext+=ze[0],this.match+=ze[0],this.matches=ze,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ze[0].length),this.matched+=ze[0],Ee=this.performAction.call(this,this.yy,this,He,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ee)return Ee;if(this._backtrack){for(var ce in ve)this[ce]=ve[ce];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ze,He,Ee,Y;this._more||(this.yytext="",this.match="");for(var ve=this._currentRules(),ce=0;ceHe[0].length)){if(He=Ee,Y=ce,this.options.backtrack_lexer){if(ze=this.test_match(Ee,ve[ce]),ze!==!1)return ze;if(this._backtrack){He=!1;continue}else return!1}else if(!this.options.flex)break}return He?(ze=this.test_match(He,ve[Y]),ze!==!1?ze:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var He=this.next();return He||this.lex()},"lex"),begin:x(function(He){this.conditionStack.push(He)},"begin"),popState:x(function(){var He=this.conditionStack.length-1;return He>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(He){return He=this.conditionStack.length-1-Math.abs(He||0),He>=0?this.conditionStack[He]:"INITIAL"},"topState"),pushState:x(function(He){this.begin(He)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(He,Ee,Y,ve){var ce=ve;switch(Y){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return et}();We.lexer=Ze;function Qe(){this.yy={}}return x(Qe,"Parser"),Qe.prototype=We,We.Parser=Qe,new Qe}();x7.parser=x7;M1t=x7,hu=[],Pp=[""],ao="global",uu="",Ch=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],b3=[],VU="",UU=!1,w7=4,k7=2,D1t=x(function(){return U5e},"getC4Type"),O1t=x(function(t){U5e=Nr(t,Te())},"setC4Type"),R1t=x(function(t,e,r,n,i,a,s,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let u={},h=b3.find(f=>f.from===e&&f.to===r);if(h?u=h:b3.push(u),u.type=t,u.from=e,u.to=r,u.label={text:n},i==null)u.techn={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.techn={text:i};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]={text:d}}else u.descr={text:a};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.sprite=s;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=Fp()},"addRel"),I1t=x(function(t,e,r,n,i,a,s){if(e===null||r===null)return;let o={},l=hu.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,hu.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]={text:h}}else o.descr={text:n};if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=h}else o.sprite=i;if(typeof a=="object"){let[u,h]=Object.entries(a)[0];o[u]=h}else o.tags=a;if(typeof s=="object"){let[u,h]=Object.entries(s)[0];o[u]=h}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=ao,o.wrap=Fp()},"addPersonOrSystem"),N1t=x(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=hu.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,hu.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=Fp(),l.typeC4Shape={text:t},l.parentBoundary=ao},"addContainer"),P1t=x(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=hu.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,hu.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=Fp(),l.typeC4Shape={text:t},l.parentBoundary=ao},"addComponent"),F1t=x(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=Ch.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,Ch.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=ao,a.wrap=Fp(),uu=ao,ao=t,Pp.push(uu)},"addPersonOrSystemBoundary"),B1t=x(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=Ch.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,Ch.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=ao,a.wrap=Fp(),uu=ao,ao=t,Pp.push(uu)},"addContainerBoundary"),z1t=x(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=Ch.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,Ch.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.type={text:"node"};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.type={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.nodeType=t,l.parentBoundary=ao,l.wrap=Fp(),uu=ao,ao=e,Pp.push(uu)},"addDeploymentNode"),$1t=x(function(){ao=uu,Pp.pop(),uu=Pp.pop(),Pp.push(uu)},"popBoundaryParseStack"),V1t=x(function(t,e,r,n,i,a,s,o,l,u,h){let f=hu.find(d=>d.alias===e);if(!(f===void 0&&(f=Ch.find(d=>d.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.fontColor=n;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.borderColor=i;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shadowing=a;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shape=s;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendText=u;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendSprite=h}},"updateElStyle"),U1t=x(function(t,e,r,n,i,a,s){let o=b3.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.textColor=n;if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.lineColor=i;if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(s)}},"updateRelStyle"),H1t=x(function(t,e,r){let n=w7,i=k7;if(typeof e=="object"){let a=Object.values(e)[0];n=parseInt(a)}else n=parseInt(e);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(w7=n),i>=1&&(k7=i)},"updateLayoutConfig"),q1t=x(function(){return w7},"getC4ShapeInRow"),W1t=x(function(){return k7},"getC4BoundaryInRow"),G1t=x(function(){return ao},"getCurrentBoundaryParse"),Y1t=x(function(){return uu},"getParentBoundaryParse"),H5e=x(function(t){return t==null?hu:hu.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),j1t=x(function(t){return hu.find(e=>e.alias===t)},"getC4Shape"),X1t=x(function(t){return Object.keys(H5e(t))},"getC4ShapeKeys"),q5e=x(function(t){return t==null?Ch:Ch.filter(e=>e.parentBoundary===t)},"getBoundaries"),K1t=q5e,Z1t=x(function(){return b3},"getRels"),Q1t=x(function(){return VU},"getTitle"),J1t=x(function(t){UU=t},"setWrap"),Fp=x(function(){return UU},"autoWrap"),evt=x(function(){hu=[],Ch=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],uu="",ao="global",Pp=[""],b3=[],Pp=[""],VU="",UU=!1,w7=4,k7=2},"clear"),tvt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},rvt={FILLED:0,OPEN:1},nvt={LEFTOF:0,RIGHTOF:1,OVER:2},ivt=x(function(t){VU=Nr(t,Te())},"setTitle"),BU={addPersonOrSystem:I1t,addPersonOrSystemBoundary:F1t,addContainer:N1t,addContainerBoundary:B1t,addComponent:P1t,addDeploymentNode:z1t,popBoundaryParseStack:$1t,addRel:R1t,updateElStyle:V1t,updateRelStyle:U1t,updateLayoutConfig:H1t,autoWrap:Fp,setWrap:J1t,getC4ShapeArray:H5e,getC4Shape:j1t,getC4ShapeKeys:X1t,getBoundaries:q5e,getBoundarys:K1t,getCurrentBoundaryParse:G1t,getParentBoundaryParse:Y1t,getRels:Z1t,getTitle:Q1t,getC4Type:D1t,getC4ShapeInRow:q1t,getC4BoundaryInRow:W1t,setAccTitle:Wr,getAccTitle:Xr,getAccDescription:Zr,setAccDescription:Kr,getConfig:x(()=>Te().c4,"getConfig"),clear:evt,LINETYPE:tvt,ARROWTYPE:rvt,PLACEMENT:nvt,setTitle:ivt,setC4Type:O1t},HU=x(function(t,e){return Jg(t,e)},"drawRect"),G5e=x(function(t,e,r,n,i,a){let s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",i);let o=a.startsWith("data:image/png;base64")?a:(0,W5e.sanitizeUrl)(a);s.attr("xlink:href",o)},"drawImage"),avt=x((t,e,r)=>{let n=t.append("g"),i=0;for(let a of e){let s=a.textColor?a.textColor:"#444444",o=a.lineColor?a.lineColor:"#444444",l=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,h="";if(i===0){let d=n.append("line");d.attr("x1",a.startPoint.x),d.attr("y1",a.startPoint.y),d.attr("x2",a.endPoint.x),d.attr("y2",a.endPoint.y),d.attr("stroke-width","1"),d.attr("stroke",o),d.style("fill","none"),a.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)"),i=-1}else{let d=n.append("path");d.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)")}let f=r.messageFont();td(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:s},f),a.techn&&a.techn.text!==""&&(f=r.messageFont(),td(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:s,"font-style":"italic"},f))}},"drawRels"),svt=x(function(t,e,r){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};HU(n,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,td(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,td(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,td(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},"drawBoundary"),ovt=x(function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let o=t.append("g");o.attr("class","person-man");let l=Eh();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},HU(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=mvt(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":G5e(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break}let h=r[e.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,td(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},h),h=r[e.typeC4Shape.text+"Font"](),h.fontColor=a,e.techn&&e.techn?.text!==""?td(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},h):e.type&&e.type.text!==""&&td(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},h),e.descr&&e.descr.text!==""&&(h=r.personFont(),h.fontColor=a,td(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},h)),e.height},"drawC4Shape"),lvt=x(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),cvt=x(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),uvt=x(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),hvt=x(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),fvt=x(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),dvt=x(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),pvt=x(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),gvt=x(function(t){let r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),mvt=x((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),td=function(){function t(i,a,s,o,l,u,h){let f=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(f,h)}x(t,"byText");function e(i,a,s,o,l,u,h,f){let{fontSize:d,fontFamily:p,fontWeight:g}=f,m=i.split(ct.lineBreakRegex);for(let v=0;v=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>Y5e)&&(e=this.nextData.startx+t.margin+Yt.nextLinePaddingX,n=this.nextData.stopy+t.margin*2,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},$U(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},$U=x(function(t){Ni(Yt,t),t.fontFamily&&(Yt.personFontFamily=Yt.systemFontFamily=Yt.messageFontFamily=t.fontFamily),t.fontSize&&(Yt.personFontSize=Yt.systemFontSize=Yt.messageFontSize=t.fontSize),t.fontWeight&&(Yt.personFontWeight=Yt.systemFontWeight=Yt.messageFontWeight=t.fontWeight)},"setConf"),y3=x((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),b7=x(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),vvt=x(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");x(pc,"calcC4ShapeTextWH");X5e=x(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Yt.c4ShapeMargin-35;let n=e.wrap&&Yt.wrap,i=b7(Yt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=Fo(e.label.text,i);pc("label",e,n,i,a),Sh.drawBoundary(t,e,Yt)},"drawBoundary"),K5e=x(function(t,e,r,n){let i=0;for(let a of n){i=0;let s=r[a],o=y3(Yt,s.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,s.typeC4Shape.width=Fo("\xAB"+s.typeC4Shape.text+"\xBB",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=Yt.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let l=s.wrap&&Yt.wrap,u=Yt.width-Yt.c4ShapePadding*2,h=y3(Yt,s.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",pc("label",s,l,h,u),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let p=y3(Yt,s.typeC4Shape.text);pc("type",s,l,p,u),s.type.Y=i+5,i=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let p=y3(Yt,s.techn.text);pc("techn",s,l,p,u),s.techn.Y=i+5,i=s.techn.Y+s.techn.height}let f=i,d=s.label.width;if(s.descr&&s.descr.text!==""){let p=y3(Yt,s.typeC4Shape.text);pc("descr",s,l,p,u),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,d=Math.max(s.label.width,s.descr.width),f=i-s.descr.textLines*5}d=d+Yt.c4ShapePadding,s.width=Math.max(s.width||Yt.width,d,Yt.width),s.height=Math.max(s.height||Yt.height,f,Yt.height),s.margin=s.margin||Yt.c4ShapeMargin,t.insert(s),Sh.drawC4Shape(e,s,Yt)}t.bumpLastMargin(Yt.c4ShapeMargin)},"drawC4ShapeArray"),dc=class{static{x(this,"Point")}constructor(t,e){this.x=t,this.y=e}},$5e=x(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),u=Math.abs(n-a),h=u/l,f=t.height/t.width,d=null;return n==a&&ri?d=new dc(r,o):r==i&&na&&(d=new dc(s,n)),r>i&&n=h?d=new dc(r,o+h*t.width/2):d=new dc(s-l/u*t.height/2,n+t.height):r=h?d=new dc(r+t.width,o+h*t.width/2):d=new dc(s+l/u*t.height/2,n+t.height):ra?f>=h?d=new dc(r+t.width,o-h*t.width/2):d=new dc(s+t.height/2*l/u,n):r>i&&n>a&&(f>=h?d=new dc(r,o-t.width/2*h):d=new dc(s-t.height/2*l/u,n)),d},"getIntersectPoint"),yvt=x(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=$5e(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=$5e(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),bvt=x(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&Yt.wrap,o=vvt(Yt);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let u=Fo(a.label.text,o);pc("label",a,s,o,u),a.techn&&a.techn.text!==""&&(u=Fo(a.techn.text,o),pc("techn",a,s,o,u)),a.descr&&a.descr.text!==""&&(u=Fo(a.descr.text,o),pc("descr",a,s,o,u));let h=r(a.from),f=r(a.to),d=yvt(h,f);a.startPoint=d.startPoint,a.endPoint=d.endPoint}Sh.drawRels(t,e,Yt)},"drawRels");x(qU,"drawInsideBoundary");xvt=x(function(t,e,r,n){Yt=Te().c4;let i=Te().securityLevel,a;i==="sandbox"&&(a=Je("#i"+e));let s=i==="sandbox"?Je(a.nodes()[0].contentDocument.body):Je("body"),o=n.db;n.db.setWrap(Yt.wrap),Y5e=o.getC4ShapeInRow(),zU=o.getC4BoundaryInRow(),ie.debug(`C:${JSON.stringify(Yt,null,2)}`);let l=i==="sandbox"?s.select(`[id="${e}"]`):Je(`[id="${e}"]`);Sh.insertComputerIcon(l),Sh.insertDatabaseIcon(l),Sh.insertClockIcon(l);let u=new j5e(n);u.setData(Yt.diagramMarginX,Yt.diagramMarginX,Yt.diagramMarginY,Yt.diagramMarginY),u.data.widthLimit=screen.availWidth,T7=Yt.diagramMarginX,E7=Yt.diagramMarginY;let h=n.db.getTitle(),f=n.db.getBoundarys("");qU(l,"",u,f,n),Sh.insertArrowHead(l),Sh.insertArrowEnd(l),Sh.insertArrowCrossHead(l),Sh.insertArrowFilledHead(l),bvt(l,n.db.getRels(),n.db.getC4Shape,n),u.data.stopx=T7,u.data.stopy=E7;let d=u.data,g=d.stopy-d.starty+2*Yt.diagramMarginY,v=d.stopx-d.startx+2*Yt.diagramMarginX;h&&l.append("text").text(h).attr("x",(d.stopx-d.startx)/2-4*Yt.diagramMarginX).attr("y",d.starty+Yt.diagramMarginY),mn(l,g,v,Yt.useMaxWidth);let y=h?60:0;l.attr("viewBox",d.startx-Yt.diagramMarginX+" -"+(Yt.diagramMarginY+y)+" "+v+" "+(g+y)),ie.debug("models:",d)},"draw"),V5e={drawPersonOrSystemArray:K5e,drawBoundary:X5e,setConf:$U,draw:xvt},wvt=x(t=>`.person { stroke: ${t.personBorder}; fill: ${t.personBkg}; } `,"getStyles"),kvt=wvt,Tvt={parser:M1t,db:BU,renderer:V5e,styles:kvt,init:x(({c4:t,wrap:e})=>{V5e.setConf(t),BU.setWrap(e)},"init")}});var By,zy,Evt,Svt,Bp=$(()=>{b();Sr();Cr();By=x((t,e)=>{let r;return e==="sandbox"&&(r=Je("#i"+t)),(e==="sandbox"?Je(r.nodes()[0].contentDocument.body):Je("body")).select(`[id="${t}"]`)},"getDiagramElement"),zy=x((t,e,r,n)=>{t.attr("class",r);let{width:i,height:a,x:s,y:o}=Evt(t,e);mn(t,a,i,n);let l=Svt(s,o,i,a,e);t.attr("viewBox",l),ie.debug(`viewBox configured: ${l} with padding: ${e}`)},"setupViewPortForSVG"),Evt=x((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),Svt=x((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")});var D7={};Wt(D7,{diagram:()=>hyt});function C7(t){let e=[];for(let r of t){let n=w3.get(r);n?.styles&&(e=[...e,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(e=[...e,...n.textStyles??[]].map(i=>i.trim()))}return e}var Cvt,J5e,$y,zp,Wo,w3,rd,jU,XU,S7,GU,gc,_7,A7,L7,M7,_vt,Avt,Lvt,Mvt,Dvt,Ovt,Rvt,KU,Ivt,Nvt,Pvt,eke,Fvt,Bvt,tke,rke,nke,zvt,ike,$vt,Vvt,Uvt,Hvt,qvt,x3,ake,ske,Wvt,Gvt,oke,Yvt,jvt,Xvt,Kvt,Zvt,lke,cke,Qvt,Jvt,eyt,tyt,ryt,nyt,WU,iyt,ayt,syt,YU,oyt,lyt,cyt,uyt,hyt,O7=$(()=>{b();Bp();WC();Qf();Xf();lu();Kc();gh();Kl();ro();Qn();Sr();Cr();Cr();ql();Cvt="flowchart-",J5e=0,$y=Te(),zp=new Map,Wo=[],w3=new Map,rd=[],jU=new Map,XU=new Map,S7=0,GU=!0,A7=[],L7=x(t=>ct.sanitizeText(t,$y),"sanitizeText"),M7=x(function(t){for(let e of zp.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),_vt=x(function(t,e,r,n,i,a,s={},o){if(!t||t.trim().length===0)return;let l,u=zp.get(t);if(u===void 0&&(u={id:t,labelType:"text",domId:Cvt+t+"-"+J5e,styles:[],classes:[]},zp.set(t,u)),J5e++,e!==void 0?($y=Te(),l=L7(e.text.trim()),u.labelType=e.type,l.startsWith('"')&&l.endsWith('"')&&(l=l.substring(1,l.length-1)),u.text=l):u.text===void 0&&(u.text=t),r!==void 0&&(u.type=r),n?.forEach(function(h){u.styles.push(h)}),i?.forEach(function(h){u.classes.push(h)}),a!==void 0&&(u.dir=a),u.props===void 0?u.props=s:s!==void 0&&Object.assign(u.props,s),o!==void 0){let h;o.includes(` `)?h=o+` `:h=`{ `+o+` }`;let f=vv(h,{schema:mv});if(f.shape){if(f.shape!==f.shape.toLowerCase()||f.shape.includes("_"))throw new Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);if(!vV(f.shape))throw new Error(`No such shape: ${f.shape}.`);u.type=f?.shape}f?.label&&(u.text=f?.label),f?.icon&&(u.icon=f?.icon,!f.label?.trim()&&u.text===t&&(u.text="")),f?.form&&(u.form=f?.form),f?.pos&&(u.pos=f?.pos),f?.img&&(u.img=f?.img,!f.label?.trim()&&u.text===t&&(u.text="")),f?.constraint&&(u.constraint=f.constraint),f.w&&(u.assetWidth=Number(f.w)),f.h&&(u.assetHeight=Number(f.h))}},"addVertex"),Avt=x(function(t,e,r){let a={start:t,end:e,type:void 0,text:"",labelType:"text"};ie.info("abc78 Got edge...",a);let s=r.text;if(s!==void 0&&(a.text=L7(s.text.trim()),a.text.startsWith('"')&&a.text.endsWith('"')&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=s.type),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),Wo.length<($y.maxEdges??500))ie.info("Pushing edge..."),Wo.push(a);else throw new Error(`Edge limit exceeded. ${Wo.length} edges found, but the limit is ${$y.maxEdges}. Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. You have to call mermaid.initialize.`)},"addSingleLink"),Lvt=x(function(t,e,r){ie.info("addLink",t,e,r);for(let n of t)for(let i of e)Avt(n,i,r)},"addLink"),Mvt=x(function(t,e){t.forEach(function(r){r==="default"?Wo.defaultInterpolate=e:Wo[r].interpolate=e})},"updateLinkInterpolate"),Dvt=x(function(t,e){t.forEach(function(r){if(typeof r=="number"&&r>=Wo.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${Wo.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?Wo.defaultStyle=e:(Wo[r].style=e,(Wo[r]?.style?.length??0)>0&&!Wo[r]?.style?.some(n=>n?.startsWith("fill"))&&Wo[r]?.style?.push("fill:none"))})},"updateLink"),Ovt=x(function(t,e){t.split(",").forEach(function(r){let n=w3.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},w3.set(r,n)),e?.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)})})},"addClass"),Rvt=x(function(t){gc=t,/.*/.exec(gc)&&(gc="LR"),/.*v/.exec(gc)&&(gc="TB"),gc==="TD"&&(gc="TB")},"setDirection"),KU=x(function(t,e){for(let r of t.split(",")){let n=zp.get(r);n&&n.classes.push(e);let i=jU.get(r);i&&i.classes.push(e)}},"setClass"),Ivt=x(function(t,e){if(e!==void 0){e=L7(e);for(let r of t.split(","))XU.set(_7==="gen-1"?M7(r):r,e)}},"setTooltip"),Nvt=x(function(t,e,r){let n=M7(t);if(Te().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),Je(this).classed("hover",!1)})},"setupToolTips");A7.push(ike);$vt=x(function(t="gen-1"){zp=new Map,w3=new Map,Wo=[],A7=[ike],rd=[],jU=new Map,S7=0,XU=new Map,GU=!0,_7=t,$y=Te(),zr()},"clear"),Vvt=x(t=>{_7=t||"gen-2"},"setGen"),Uvt=x(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),Hvt=x(function(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);function a(u){let h={boolean:{},number:{},string:{}},f=[],d;return{nodeList:u.filter(function(g){let m=typeof g;return g.stmt&&g.stmt==="dir"?(d=g.value,!1):g.trim()===""?!1:m in h?h[m].hasOwnProperty(g)?!1:h[m][g]=!0:f.includes(g)?!1:f.push(g)}),dir:d}}x(a,"uniq");let{nodeList:s,dir:o}=a(e.flat());if(_7==="gen-1")for(let u=0;u2e3)return{result:!1,count:0};if(ake[x3]=e,rd[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n=0){let s=ske(t,a);if(s.result)return{result:!0,count:i+s.count};i=i+s.count}n=n+1}return{result:!1,count:i}},"indexNodes2"),Wvt=x(function(t){return ake[t]},"getDepthFirstPos"),Gvt=x(function(){x3=-1,rd.length>0&&ske("none",rd.length-1)},"indexNodes"),oke=x(function(){return rd},"getSubGraphs"),Yvt=x(()=>GU?(GU=!1,!0):!1,"firstGraph"),jvt=x(t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}},"destructStartLink"),Xvt=x((t,e)=>{let r=e.length,n=0;for(let i=0;i{let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1));break}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");let s=Xvt(".",r);return s&&(i="dotted",a=s),{type:n,stroke:i,length:a}},"destructEndLink"),Zvt=x((t,e)=>{let r=Kvt(t),n;if(e){if(n=jvt(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r},"destructLink"),lke=x((t,e)=>{for(let r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),cke=x((t,e)=>{let r=[];return t.nodes.forEach((n,i)=>{lke(e,n)||r.push(t.nodes[i])}),{nodes:r}},"makeUniq"),Qvt={firstGraph:Yvt},Jvt=x(t=>{if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}},"getTypeFromVertex"),eyt=x((t,e)=>t.find(r=>r.id===e),"findNode"),tyt=x(t=>{let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e;break}return{arrowTypeStart:e,arrowTypeEnd:r}},"destructEdgeType"),ryt=x((t,e,r,n,i,a)=>{let s=r.get(t.id),o=n.get(t.id)??!1,l=eyt(e,t.id);if(l)l.cssStyles=t.styles,l.cssCompiledStyles=C7(t.classes),l.cssClasses=t.classes.join(" ");else{let u={id:t.id,label:t.text,labelStyle:"",parentId:s,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:C7(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:eke(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};o?e.push({...u,isGroup:!0,shape:"rect"}):e.push({...u,isGroup:!1,shape:Jvt(t)})}},"addNodeFromVertex");x(C7,"getCompiledStyles");nyt=x(()=>{let t=Te(),e=[],r=[],n=oke(),i=new Map,a=new Map;for(let l=n.length-1;l>=0;l--){let u=n[l];u.nodes.length>0&&a.set(u.id,!0);for(let h of u.nodes)i.set(h,u.id)}for(let l=n.length-1;l>=0;l--){let u=n[l];e.push({id:u.id,label:u.title,labelStyle:"",parentId:i.get(u.id),padding:8,cssCompiledStyles:C7(u.classes),cssClasses:u.classes.join(" "),shape:"rect",dir:u.dir,isGroup:!0,look:t.look})}rke().forEach(l=>{ryt(l,e,i,a,t,t.look||"classic")});let o=nke();return o.forEach((l,u)=>{let{arrowTypeStart:h,arrowTypeEnd:f}=tyt(l.type),d=[...o.defaultStyle??[]];l.style&&d.push(...l.style);let p={id:D6(l.start,l.end,{counter:u,prefix:"L"}),start:l.start,end:l.end,type:l.type??"normal",label:l.text,labelpos:"c",thickness:l.stroke,minlen:l.length,classes:l?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:l?.stroke==="invisible"?"none":h,arrowTypeEnd:l?.stroke==="invisible"?"none":f,arrowheadStyle:"fill: #333",labelStyle:d,style:d,pattern:l.stroke,look:t.look};r.push(p)}),{nodes:e,edges:r,other:{},config:t}},"getData"),WU={defaultConfig:x(()=>OC.flowchart,"defaultConfig"),setAccTitle:Wr,getAccTitle:Xr,getAccDescription:Zr,getData:nyt,setAccDescription:Kr,addVertex:_vt,lookUpDomId:M7,addLink:Lvt,updateLinkInterpolate:Mvt,updateLink:Dvt,addClass:Ovt,setDirection:Rvt,setClass:KU,setTooltip:Ivt,getTooltip:eke,setClickEvent:Fvt,setLink:Pvt,bindFunctions:Bvt,getDirection:tke,getVertices:rke,getEdges:nke,getClasses:zvt,clear:$vt,setGen:Vvt,defaultStyle:Uvt,addSubGraph:Hvt,getDepthFirstPos:Wvt,indexNodes:Gvt,getSubGraphs:oke,destructLink:Zvt,lex:Qvt,exists:lke,makeUniq:cke,setDiagramTitle:Cn,getDiagramTitle:vn},iyt=x(function(t,e){return e.db.getClasses()},"getClasses"),ayt=x(async function(t,e,r,n){ie.info("REF0:"),ie.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=Te(),o;i==="sandbox"&&(o=Je("#i"+e));let l=i==="sandbox"?o.nodes()[0].contentDocument:document;ie.debug("Before getData: ");let u=n.db.getData();ie.debug("Data: ",u);let h=By(e,i),f=tke();u.type=n.type,u.layoutAlgorithm=a7(s),u.layoutAlgorithm==="dagre"&&s==="elk"&&ie.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),u.direction=f,u.nodeSpacing=a?.nodeSpacing||50,u.rankSpacing=a?.rankSpacing||50,u.markers=["point","circle","cross"],u.diagramId=e,ie.debug("REF1:",u),await Ry(u,h);let d=u.config.flowchart?.diagramPadding??8;tr.insertTitle(h,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),zy(h,d,"flowchart",a?.useMaxWidth||!1);for(let p of u.nodes){let g=Je(`#${e} [id="${p.id}"]`);if(!g||!p.link)continue;let m=l.createElementNS("http://www.w3.org/2000/svg","a");m.setAttributeNS("http://www.w3.org/2000/svg","class",p.cssClasses),m.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?m.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):p.linkTarget&&m.setAttributeNS("http://www.w3.org/2000/svg","target",p.linkTarget);let v=g.insert(function(){return m},":first-child"),y=g.select(".label-container");y&&v.append(function(){return y.node()});let w=g.select(".label");w&&v.append(function(){return w.node()})}},"draw"),syt={getClasses:iyt,draw:ayt},YU=function(){var t=x(function(fi,St,Dt,Rt){for(Dt=Dt||{},Rt=fi.length;Rt--;Dt[fi[Rt]]=St);return Dt},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],a=[2,2],s=[1,13],o=[1,14],l=[1,15],u=[1,16],h=[1,23],f=[1,25],d=[1,26],p=[1,27],g=[1,49],m=[1,48],v=[1,29],y=[1,30],w=[1,31],k=[1,32],E=[1,33],T=[1,44],S=[1,46],L=[1,42],_=[1,47],M=[1,43],I=[1,50],O=[1,45],C=[1,51],R=[1,52],D=[1,34],P=[1,35],A=[1,36],N=[1,37],F=[1,57],B=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],V=[1,61],z=[1,60],H=[1,62],K=[8,9,11,75,77],X=[1,77],ne=[1,90],j=[1,95],ee=[1,94],Q=[1,91],G=[1,87],Z=[1,93],te=[1,89],oe=[1,96],de=[1,92],pe=[1,97],re=[1,88],Be=[8,9,10,11,40,75,77],le=[8,9,10,11,40,46,75,77],Se=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],Ye=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],We=[44,60,88,101,104,105,108,110,113,114,115],Ze=[1,123],Qe=[1,122],et=[1,130],ze=[1,144],He=[1,145],Ee=[1,146],Y=[1,147],ve=[1,132],ce=[1,134],me=[1,138],q=[1,139],Le=[1,140],J=[1,141],fe=[1,142],xe=[1,143],Ie=[1,148],Fe=[1,149],ye=[1,128],qe=[1,129],Re=[1,136],nt=[1,131],mt=[1,135],Tt=[1,133],ue=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],ae=[1,151],ke=[1,153],we=[8,9,11],Ne=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],Ge=[1,173],st=[1,169],ot=[1,170],at=[1,174],Ue=[1,171],it=[1,172],pt=[77,115,118],yt=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Et=[10,105],hn=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],qt=[1,242],fn=[1,240],xn=[1,244],qr=[1,238],hi=[1,239],Nn=[1,241],_t=[1,243],Me=[1,245],dt=[1,263],Mt=[8,9,11,105],xr=[8,9,10,11,60,83,104,105,108,109,110,111],Pn={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:x(function(St,Dt,Rt,tt,Pt,be,oa){var _e=be.length-1;switch(Pt){case 2:this.$=[];break;case 3:(!Array.isArray(be[_e])||be[_e].length>0)&&be[_e-1].push(be[_e]),this.$=be[_e-1];break;case 4:case 181:this.$=be[_e];break;case 11:tt.setDirection("TB"),this.$="TB";break;case 12:tt.setDirection(be[_e-1]),this.$=be[_e-1];break;case 27:this.$=be[_e-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=tt.addSubGraph(be[_e-6],be[_e-1],be[_e-4]);break;case 34:this.$=tt.addSubGraph(be[_e-3],be[_e-1],be[_e-3]);break;case 35:this.$=tt.addSubGraph(void 0,be[_e-1],void 0);break;case 37:this.$=be[_e].trim(),tt.setAccTitle(this.$);break;case 38:case 39:this.$=be[_e].trim(),tt.setAccDescription(this.$);break;case 43:this.$=be[_e-1]+be[_e];break;case 44:this.$=be[_e];break;case 45:tt.addVertex(be[_e-1][0],void 0,void 0,void 0,void 0,void 0,void 0,be[_e]),tt.addLink(be[_e-3].stmt,be[_e-1],be[_e-2]),this.$={stmt:be[_e-1],nodes:be[_e-1].concat(be[_e-3].nodes)};break;case 46:tt.addLink(be[_e-2].stmt,be[_e],be[_e-1]),this.$={stmt:be[_e],nodes:be[_e].concat(be[_e-2].nodes)};break;case 47:tt.addLink(be[_e-3].stmt,be[_e-1],be[_e-2]),this.$={stmt:be[_e-1],nodes:be[_e-1].concat(be[_e-3].nodes)};break;case 48:this.$={stmt:be[_e-1],nodes:be[_e-1]};break;case 49:tt.addVertex(be[_e-1][0],void 0,void 0,void 0,void 0,void 0,void 0,be[_e]),this.$={stmt:be[_e-1],nodes:be[_e-1],shapeData:be[_e]};break;case 50:this.$={stmt:be[_e],nodes:be[_e]};break;case 51:this.$=[be[_e]];break;case 52:tt.addVertex(be[_e-5][0],void 0,void 0,void 0,void 0,void 0,void 0,be[_e-4]),this.$=be[_e-5].concat(be[_e]);break;case 53:this.$=be[_e-4].concat(be[_e]);break;case 54:this.$=be[_e];break;case 55:this.$=be[_e-2],tt.setClass(be[_e-2],be[_e]);break;case 56:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"square");break;case 57:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"doublecircle");break;case 58:this.$=be[_e-5],tt.addVertex(be[_e-5],be[_e-2],"circle");break;case 59:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"ellipse");break;case 60:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"stadium");break;case 61:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"subroutine");break;case 62:this.$=be[_e-7],tt.addVertex(be[_e-7],be[_e-1],"rect",void 0,void 0,void 0,Object.fromEntries([[be[_e-5],be[_e-3]]]));break;case 63:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"cylinder");break;case 64:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"round");break;case 65:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"diamond");break;case 66:this.$=be[_e-5],tt.addVertex(be[_e-5],be[_e-2],"hexagon");break;case 67:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"odd");break;case 68:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"trapezoid");break;case 69:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"inv_trapezoid");break;case 70:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"lean_right");break;case 71:this.$=be[_e-3],tt.addVertex(be[_e-3],be[_e-1],"lean_left");break;case 72:this.$=be[_e],tt.addVertex(be[_e]);break;case 73:be[_e-1].text=be[_e],this.$=be[_e-1];break;case 74:case 75:be[_e-2].text=be[_e-1],this.$=be[_e-2];break;case 76:this.$=be[_e];break;case 77:var Pl=tt.destructLink(be[_e],be[_e-2]);this.$={type:Pl.type,stroke:Pl.stroke,length:Pl.length,text:be[_e-1]};break;case 78:this.$={text:be[_e],type:"text"};break;case 79:this.$={text:be[_e-1].text+""+be[_e],type:be[_e-1].type};break;case 80:this.$={text:be[_e],type:"string"};break;case 81:this.$={text:be[_e],type:"markdown"};break;case 82:var Pl=tt.destructLink(be[_e]);this.$={type:Pl.type,stroke:Pl.stroke,length:Pl.length};break;case 83:this.$=be[_e-1];break;case 84:this.$={text:be[_e],type:"text"};break;case 85:this.$={text:be[_e-1].text+""+be[_e],type:be[_e-1].type};break;case 86:this.$={text:be[_e],type:"string"};break;case 87:case 102:this.$={text:be[_e],type:"markdown"};break;case 99:this.$={text:be[_e],type:"text"};break;case 100:this.$={text:be[_e-1].text+""+be[_e],type:be[_e-1].type};break;case 101:this.$={text:be[_e],type:"text"};break;case 103:this.$=be[_e-4],tt.addClass(be[_e-2],be[_e]);break;case 104:this.$=be[_e-4],tt.setClass(be[_e-2],be[_e]);break;case 105:case 113:this.$=be[_e-1],tt.setClickEvent(be[_e-1],be[_e]);break;case 106:case 114:this.$=be[_e-3],tt.setClickEvent(be[_e-3],be[_e-2]),tt.setTooltip(be[_e-3],be[_e]);break;case 107:this.$=be[_e-2],tt.setClickEvent(be[_e-2],be[_e-1],be[_e]);break;case 108:this.$=be[_e-4],tt.setClickEvent(be[_e-4],be[_e-3],be[_e-2]),tt.setTooltip(be[_e-4],be[_e]);break;case 109:this.$=be[_e-2],tt.setLink(be[_e-2],be[_e]);break;case 110:this.$=be[_e-4],tt.setLink(be[_e-4],be[_e-2]),tt.setTooltip(be[_e-4],be[_e]);break;case 111:this.$=be[_e-4],tt.setLink(be[_e-4],be[_e-2],be[_e]);break;case 112:this.$=be[_e-6],tt.setLink(be[_e-6],be[_e-4],be[_e]),tt.setTooltip(be[_e-6],be[_e-2]);break;case 115:this.$=be[_e-1],tt.setLink(be[_e-1],be[_e]);break;case 116:this.$=be[_e-3],tt.setLink(be[_e-3],be[_e-2]),tt.setTooltip(be[_e-3],be[_e]);break;case 117:this.$=be[_e-3],tt.setLink(be[_e-3],be[_e-2],be[_e]);break;case 118:this.$=be[_e-5],tt.setLink(be[_e-5],be[_e-4],be[_e]),tt.setTooltip(be[_e-5],be[_e-2]);break;case 119:this.$=be[_e-4],tt.addVertex(be[_e-2],void 0,void 0,be[_e]);break;case 120:this.$=be[_e-4],tt.updateLink([be[_e-2]],be[_e]);break;case 121:this.$=be[_e-4],tt.updateLink(be[_e-2],be[_e]);break;case 122:this.$=be[_e-8],tt.updateLinkInterpolate([be[_e-6]],be[_e-2]),tt.updateLink([be[_e-6]],be[_e]);break;case 123:this.$=be[_e-8],tt.updateLinkInterpolate(be[_e-6],be[_e-2]),tt.updateLink(be[_e-6],be[_e]);break;case 124:this.$=be[_e-6],tt.updateLinkInterpolate([be[_e-4]],be[_e]);break;case 125:this.$=be[_e-6],tt.updateLinkInterpolate(be[_e-4],be[_e]);break;case 126:case 128:this.$=[be[_e]];break;case 127:case 129:be[_e-2].push(be[_e]),this.$=be[_e-2];break;case 131:this.$=be[_e-1]+be[_e];break;case 179:this.$=be[_e];break;case 180:this.$=be[_e-1]+""+be[_e];break;case 182:this.$=be[_e-1]+""+be[_e];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,83:v,84:y,85:w,86:k,87:E,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R,120:D,121:P,122:A,123:N},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:F,15:53,18:56},t(B,[2,3]),t(B,[2,4]),t(B,[2,5]),t(B,[2,6]),t(B,[2,7]),t(B,[2,8]),{8:V,9:z,11:H,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:V,9:z,11:H,21:66},{8:V,9:z,11:H,21:67},{8:V,9:z,11:H,21:68},{8:V,9:z,11:H,21:69},{8:V,9:z,11:H,21:70},{8:V,9:z,10:[1,71],11:H,21:72},t(B,[2,36]),{35:[1,73]},{37:[1,74]},t(B,[2,39]),t(K,[2,50],{18:75,39:76,10:F,40:X}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:ne,44:j,60:ee,79:[1,85],88:Q,94:[1,82],96:[1,83],100:84,104:G,105:Z,108:te,110:oe,113:de,114:pe,115:re,119:86},t(B,[2,183]),t(B,[2,184]),t(B,[2,185]),t(B,[2,186]),t(Be,[2,51]),t(Be,[2,54],{46:[1,98]}),t(le,[2,72],{112:111,29:[1,99],44:g,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:m,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:T,101:S,104:L,105:_,108:M,110:I,113:O,114:C,115:R}),t(Se,[2,179]),t(Se,[2,140]),t(Se,[2,141]),t(Se,[2,142]),t(Se,[2,143]),t(Se,[2,144]),t(Se,[2,145]),t(Se,[2,146]),t(Se,[2,147]),t(Se,[2,148]),t(Se,[2,149]),t(Se,[2,150]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,112]},t(Ye,[2,26],{18:113,10:F}),t(B,[2,27]),{42:114,43:38,44:g,45:39,47:40,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R},t(B,[2,40]),t(B,[2,41]),t(B,[2,42]),t(We,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:Ze,118:Qe},t([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),t(B,[2,28]),t(B,[2,29]),t(B,[2,30]),t(B,[2,31]),t(B,[2,32]),{10:et,12:ze,14:He,27:Ee,28:124,32:Y,44:ve,60:ce,75:me,79:[1,126],80:[1,127],82:137,83:q,84:Le,85:J,86:fe,87:xe,88:Ie,89:Fe,90:125,104:ye,108:qe,110:Re,113:nt,114:mt,115:Tt},t(ue,a,{5:150}),t(B,[2,37]),t(B,[2,38]),t(K,[2,48],{44:ae}),t(K,[2,49],{18:152,10:F,40:ke}),t(Be,[2,44]),{44:g,47:154,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R},{101:[1,155],102:156,104:[1,157]},{44:g,47:158,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R},{44:g,47:159,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R},t(we,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},t(we,[2,113],{119:164,10:[1,163],14:ne,44:j,60:ee,88:Q,104:G,105:Z,108:te,110:oe,113:de,114:pe,115:re}),t(we,[2,115],{10:[1,165]}),t(Ne,[2,181]),t(Ne,[2,168]),t(Ne,[2,169]),t(Ne,[2,170]),t(Ne,[2,171]),t(Ne,[2,172]),t(Ne,[2,173]),t(Ne,[2,174]),t(Ne,[2,175]),t(Ne,[2,176]),t(Ne,[2,177]),t(Ne,[2,178]),{44:g,47:166,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R},{30:167,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:175,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:177,50:[1,176],67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:178,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:179,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:180,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{108:[1,181]},{30:182,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:183,65:[1,184],67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:185,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:186,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{30:187,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},t(Se,[2,180]),t(i,[2,20]),t(Ye,[2,25]),t(K,[2,46],{39:188,18:189,10:F,40:X}),t(We,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{77:[1,193],78:194,115:Ze,118:Qe},t(pt,[2,78]),t(pt,[2,80]),t(pt,[2,81]),t(pt,[2,166]),t(pt,[2,167]),{8:V,9:z,10:et,11:H,12:ze,14:He,21:196,27:Ee,29:[1,195],32:Y,44:ve,60:ce,75:me,82:137,83:q,84:Le,85:J,86:fe,87:xe,88:Ie,89:Fe,90:197,104:ye,108:qe,110:Re,113:nt,114:mt,115:Tt},t(yt,[2,99]),t(yt,[2,101]),t(yt,[2,102]),t(yt,[2,155]),t(yt,[2,156]),t(yt,[2,157]),t(yt,[2,158]),t(yt,[2,159]),t(yt,[2,160]),t(yt,[2,161]),t(yt,[2,162]),t(yt,[2,163]),t(yt,[2,164]),t(yt,[2,165]),t(yt,[2,88]),t(yt,[2,89]),t(yt,[2,90]),t(yt,[2,91]),t(yt,[2,92]),t(yt,[2,93]),t(yt,[2,94]),t(yt,[2,95]),t(yt,[2,96]),t(yt,[2,97]),t(yt,[2,98]),{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,198],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,83:v,84:y,85:w,86:k,87:E,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R,120:D,121:P,122:A,123:N},{10:F,18:199},{44:[1,200]},t(Be,[2,43]),{10:[1,201],44:g,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:111,113:O,114:C,115:R},{10:[1,202]},{10:[1,203],105:[1,204]},t(Et,[2,126]),{10:[1,205],44:g,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:111,113:O,114:C,115:R},{10:[1,206],44:g,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:111,113:O,114:C,115:R},{79:[1,207]},t(we,[2,107],{10:[1,208]}),t(we,[2,109],{10:[1,209]}),{79:[1,210]},t(Ne,[2,182]),{79:[1,211],97:[1,212]},t(Be,[2,55],{112:111,44:g,60:m,88:T,101:S,104:L,105:_,108:M,110:I,113:O,114:C,115:R}),{31:[1,213],67:Ge,81:214,115:at,116:Ue,117:it},t(hn,[2,84]),t(hn,[2,86]),t(hn,[2,87]),t(hn,[2,151]),t(hn,[2,152]),t(hn,[2,153]),t(hn,[2,154]),{49:[1,215],67:Ge,81:214,115:at,116:Ue,117:it},{30:216,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{51:[1,217],67:Ge,81:214,115:at,116:Ue,117:it},{53:[1,218],67:Ge,81:214,115:at,116:Ue,117:it},{55:[1,219],67:Ge,81:214,115:at,116:Ue,117:it},{57:[1,220],67:Ge,81:214,115:at,116:Ue,117:it},{60:[1,221]},{64:[1,222],67:Ge,81:214,115:at,116:Ue,117:it},{66:[1,223],67:Ge,81:214,115:at,116:Ue,117:it},{30:224,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},{31:[1,225],67:Ge,81:214,115:at,116:Ue,117:it},{67:Ge,69:[1,226],71:[1,227],81:214,115:at,116:Ue,117:it},{67:Ge,69:[1,229],71:[1,228],81:214,115:at,116:Ue,117:it},t(K,[2,45],{18:152,10:F,40:ke}),t(K,[2,47],{44:ae}),t(We,[2,75]),t(We,[2,74]),{62:[1,230],67:Ge,81:214,115:at,116:Ue,117:it},t(We,[2,77]),t(pt,[2,79]),{30:231,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},t(ue,a,{5:232}),t(yt,[2,100]),t(B,[2,35]),{43:233,44:g,45:39,47:40,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R},{10:F,18:234},{10:qt,60:fn,83:xn,91:235,104:qr,106:236,107:237,108:hi,109:Nn,110:_t,111:Me},{10:qt,60:fn,83:xn,91:246,103:[1,247],104:qr,106:236,107:237,108:hi,109:Nn,110:_t,111:Me},{10:qt,60:fn,83:xn,91:248,103:[1,249],104:qr,106:236,107:237,108:hi,109:Nn,110:_t,111:Me},{104:[1,250]},{10:qt,60:fn,83:xn,91:251,104:qr,106:236,107:237,108:hi,109:Nn,110:_t,111:Me},{44:g,47:252,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R},t(we,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},t(we,[2,114]),t(we,[2,116],{10:[1,256]}),t(we,[2,117]),t(le,[2,56]),t(hn,[2,85]),t(le,[2,57]),{51:[1,257],67:Ge,81:214,115:at,116:Ue,117:it},t(le,[2,64]),t(le,[2,59]),t(le,[2,60]),t(le,[2,61]),{108:[1,258]},t(le,[2,63]),t(le,[2,65]),{66:[1,259],67:Ge,81:214,115:at,116:Ue,117:it},t(le,[2,67]),t(le,[2,68]),t(le,[2,70]),t(le,[2,69]),t(le,[2,71]),t([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:Ge,81:214,115:at,116:Ue,117:it},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,261],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,83:v,84:y,85:w,86:k,87:E,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R,120:D,121:P,122:A,123:N},t(Be,[2,53]),{43:262,44:g,45:39,47:40,60:m,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R},t(we,[2,119],{105:dt}),t(Mt,[2,128],{107:264,10:qt,60:fn,83:xn,104:qr,108:hi,109:Nn,110:_t,111:Me}),t(xr,[2,130]),t(xr,[2,132]),t(xr,[2,133]),t(xr,[2,134]),t(xr,[2,135]),t(xr,[2,136]),t(xr,[2,137]),t(xr,[2,138]),t(xr,[2,139]),t(we,[2,120],{105:dt}),{10:[1,265]},t(we,[2,121],{105:dt}),{10:[1,266]},t(Et,[2,127]),t(we,[2,103],{105:dt}),t(we,[2,104],{112:111,44:g,60:m,88:T,101:S,104:L,105:_,108:M,110:I,113:O,114:C,115:R}),t(we,[2,108]),t(we,[2,110],{10:[1,267]}),t(we,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:V,9:z,11:H,21:272},t(B,[2,34]),t(Be,[2,52]),{10:qt,60:fn,83:xn,104:qr,106:273,107:237,108:hi,109:Nn,110:_t,111:Me},t(xr,[2,131]),{14:ne,44:j,60:ee,88:Q,100:274,104:G,105:Z,108:te,110:oe,113:de,114:pe,115:re,119:86},{14:ne,44:j,60:ee,88:Q,100:275,104:G,105:Z,108:te,110:oe,113:de,114:pe,115:re,119:86},{97:[1,276]},t(we,[2,118]),t(le,[2,58]),{30:277,67:Ge,79:st,80:ot,81:168,115:at,116:Ue,117:it},t(le,[2,66]),t(ue,a,{5:278}),t(Mt,[2,129],{107:264,10:qt,60:fn,83:xn,104:qr,108:hi,109:Nn,110:_t,111:Me}),t(we,[2,124],{119:164,10:[1,279],14:ne,44:j,60:ee,88:Q,104:G,105:Z,108:te,110:oe,113:de,114:pe,115:re}),t(we,[2,125],{119:164,10:[1,280],14:ne,44:j,60:ee,88:Q,104:G,105:Z,108:te,110:oe,113:de,114:pe,115:re}),t(we,[2,112]),{31:[1,281],67:Ge,81:214,115:at,116:Ue,117:it},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,282],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,83:v,84:y,85:w,86:k,87:E,88:T,101:S,104:L,105:_,108:M,110:I,112:41,113:O,114:C,115:R,120:D,121:P,122:A,123:N},{10:qt,60:fn,83:xn,91:283,104:qr,106:236,107:237,108:hi,109:Nn,110:_t,111:Me},{10:qt,60:fn,83:xn,91:284,104:qr,106:236,107:237,108:hi,109:Nn,110:_t,111:Me},t(le,[2,62]),t(B,[2,33]),t(we,[2,122],{105:dt}),t(we,[2,123],{105:dt})],defaultActions:{},parseError:x(function(St,Dt){if(Dt.recoverable)this.trace(St);else{var Rt=new Error(St);throw Rt.hash=Dt,Rt}},"parseError"),parse:x(function(St){var Dt=this,Rt=[0],tt=[],Pt=[null],be=[],oa=this.table,_e="",Pl=0,QZ=0,JZ=0,eIe=2,eQ=1,tIe=be.slice.call(arguments,1),Ba=Object.create(this.lexer),T0={yy:{}};for(var l9 in this.yy)Object.prototype.hasOwnProperty.call(this.yy,l9)&&(T0.yy[l9]=this.yy[l9]);Ba.setInput(St,T0.yy),T0.yy.lexer=Ba,T0.yy.parser=this,typeof Ba.yylloc>"u"&&(Ba.yylloc={});var c9=Ba.yylloc;be.push(c9);var rIe=Ba.options&&Ba.options.ranges;typeof T0.yy.parseError=="function"?this.parseError=T0.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function nIe(nl){Rt.length=Rt.length-2*nl,Pt.length=Pt.length-nl,be.length=be.length-nl}x(nIe,"popStack");function tQ(){var nl;return nl=tt.pop()||Ba.lex()||eQ,typeof nl!="number"&&(nl instanceof Array&&(tt=nl,nl=tt.pop()),nl=Dt.symbols_[nl]||nl),nl}x(tQ,"lex");for(var Hs,u9,E0,Fl,mFt,h9,E1={},_T,Xh,rQ,AT;;){if(E0=Rt[Rt.length-1],this.defaultActions[E0]?Fl=this.defaultActions[E0]:((Hs===null||typeof Hs>"u")&&(Hs=tQ()),Fl=oa[E0]&&oa[E0][Hs]),typeof Fl>"u"||!Fl.length||!Fl[0]){var f9="";AT=[];for(_T in oa[E0])this.terminals_[_T]&&_T>eIe&&AT.push("'"+this.terminals_[_T]+"'");Ba.showPosition?f9="Parse error on line "+(Pl+1)+`: `+Ba.showPosition()+` Expecting `+AT.join(", ")+", got '"+(this.terminals_[Hs]||Hs)+"'":f9="Parse error on line "+(Pl+1)+": Unexpected "+(Hs==eQ?"end of input":"'"+(this.terminals_[Hs]||Hs)+"'"),this.parseError(f9,{text:Ba.match,token:this.terminals_[Hs]||Hs,line:Ba.yylineno,loc:c9,expected:AT})}if(Fl[0]instanceof Array&&Fl.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E0+", token: "+Hs);switch(Fl[0]){case 1:Rt.push(Hs),Pt.push(Ba.yytext),be.push(Ba.yylloc),Rt.push(Fl[1]),Hs=null,u9?(Hs=u9,u9=null):(QZ=Ba.yyleng,_e=Ba.yytext,Pl=Ba.yylineno,c9=Ba.yylloc,JZ>0&&JZ--);break;case 2:if(Xh=this.productions_[Fl[1]][1],E1.$=Pt[Pt.length-Xh],E1._$={first_line:be[be.length-(Xh||1)].first_line,last_line:be[be.length-1].last_line,first_column:be[be.length-(Xh||1)].first_column,last_column:be[be.length-1].last_column},rIe&&(E1._$.range=[be[be.length-(Xh||1)].range[0],be[be.length-1].range[1]]),h9=this.performAction.apply(E1,[_e,QZ,Pl,T0.yy,Fl[1],Pt,be].concat(tIe)),typeof h9<"u")return h9;Xh&&(Rt=Rt.slice(0,-1*Xh*2),Pt=Pt.slice(0,-1*Xh),be=be.slice(0,-1*Xh)),Rt.push(this.productions_[Fl[1]][0]),Pt.push(E1.$),be.push(E1._$),rQ=oa[Rt[Rt.length-2]][Rt[Rt.length-1]],Rt.push(rQ);break;case 3:return!0}}return!0},"parse")},jn=function(){var fi={EOF:1,parseError:x(function(Dt,Rt){if(this.yy.parser)this.yy.parser.parseError(Dt,Rt);else throw new Error(Dt)},"parseError"),setInput:x(function(St,Dt){return this.yy=Dt||this.yy||{},this._input=St,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var St=this._input[0];this.yytext+=St,this.yyleng++,this.offset++,this.match+=St,this.matched+=St;var Dt=St.match(/(?:\r\n?|\n).*/g);return Dt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),St},"input"),unput:x(function(St){var Dt=St.length,Rt=St.split(/(?:\r\n?|\n)/g);this._input=St+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Dt),this.offset-=Dt;var tt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Rt.length-1&&(this.yylineno-=Rt.length-1);var Pt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Rt?(Rt.length===tt.length?this.yylloc.first_column:0)+tt[tt.length-Rt.length].length-Rt[0].length:this.yylloc.first_column-Dt},this.options.ranges&&(this.yylloc.range=[Pt[0],Pt[0]+this.yyleng-Dt]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(St){this.unput(this.match.slice(St))},"less"),pastInput:x(function(){var St=this.matched.substr(0,this.matched.length-this.match.length);return(St.length>20?"...":"")+St.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var St=this.match;return St.length<20&&(St+=this._input.substr(0,20-St.length)),(St.substr(0,20)+(St.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var St=this.pastInput(),Dt=new Array(St.length+1).join("-");return St+this.upcomingInput()+` `+Dt+"^"},"showPosition"),test_match:x(function(St,Dt){var Rt,tt,Pt;if(this.options.backtrack_lexer&&(Pt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Pt.yylloc.range=this.yylloc.range.slice(0))),tt=St[0].match(/(?:\r\n?|\n).*/g),tt&&(this.yylineno+=tt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:tt?tt[tt.length-1].length-tt[tt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+St[0].length},this.yytext+=St[0],this.match+=St[0],this.matches=St,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(St[0].length),this.matched+=St[0],Rt=this.performAction.call(this,this.yy,this,Dt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Rt)return Rt;if(this._backtrack){for(var be in Pt)this[be]=Pt[be];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var St,Dt,Rt,tt;this._more||(this.yytext="",this.match="");for(var Pt=this._currentRules(),be=0;beDt[0].length)){if(Dt=Rt,tt=be,this.options.backtrack_lexer){if(St=this.test_match(Rt,Pt[be]),St!==!1)return St;if(this._backtrack){Dt=!1;continue}else return!1}else if(!this.options.flex)break}return Dt?(St=this.test_match(Dt,Pt[tt]),St!==!1?St:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var Dt=this.next();return Dt||this.lex()},"lex"),begin:x(function(Dt){this.conditionStack.push(Dt)},"begin"),popState:x(function(){var Dt=this.conditionStack.length-1;return Dt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(Dt){return Dt=this.conditionStack.length-1-Math.abs(Dt||0),Dt>=0?this.conditionStack[Dt]:"INITIAL"},"topState"),pushState:x(function(Dt){this.begin(Dt)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(Dt,Rt,tt,Pt){var be=Pt;switch(tt){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),Rt.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let oa=/\n\s*/g;return Rt.yytext=Rt.yytext.replace(oa,"
    "),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:return Dt.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return Dt.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return Dt.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 97;case 41:return 97;case 42:return 97;case 43:return 97;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;break;case 68:return this.pushState("edgeText"),75;break;case 69:return 118;case 70:return this.popState(),77;break;case 71:return this.pushState("thickEdgeText"),75;break;case 72:return 118;case 73:return this.popState(),77;break;case 74:return this.pushState("dottedEdgeText"),75;break;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;break;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;break;case 80:return this.popState(),55;break;case 81:return this.pushState("text"),54;break;case 82:return this.popState(),57;break;case 83:return this.pushState("text"),56;break;case 84:return 58;case 85:return this.pushState("text"),67;break;case 86:return this.popState(),64;break;case 87:return this.pushState("text"),63;break;case 88:return this.popState(),49;break;case 89:return this.pushState("text"),48;break;case 90:return this.popState(),69;break;case 91:return this.popState(),71;break;case 92:return 116;case 93:return this.pushState("trapText"),68;break;case 94:return this.pushState("trapText"),70;break;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;break;case 107:return this.pushState("text"),62;break;case 108:return this.popState(),51;break;case 109:return this.pushState("text"),50;break;case 110:return this.popState(),31;break;case 111:return this.pushState("text"),29;break;case 112:return this.popState(),66;break;case 113:return this.pushState("text"),65;break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};return fi}();Pn.lexer=jn;function si(){this.yy={}}return x(si,"Parser"),si.prototype=Pn,Pn.Parser=si,new si}();YU.parser=YU;oyt=YU,lyt=x((t,e)=>{let r=ww,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return ll(n,i,a,e)},"fade"),cyt=x(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .cluster-label text { fill: ${t.titleColor}; } .cluster-label span { color: ${t.titleColor}; } .cluster-label span p { background-color: transparent; } .label text,span { fill: ${t.nodeTextColor||t.textColor}; color: ${t.nodeTextColor||t.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { text-anchor: middle; } // .flowchart-label .text-outer-tspan { // text-anchor: middle; // } // .flowchart-label .text-inner-tspan { // text-anchor: start; // } .node .katex path { fill: #000; stroke: #000; stroke-width: 1px; } .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { text-align: center; } .node.clickable { cursor: pointer; } .root .anchor path { fill: ${t.lineColor} !important; stroke-width: 0; stroke: ${t.lineColor}; } .arrowheadPath { fill: ${t.arrowheadColor}; } .edgePath .path { stroke: ${t.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${t.lineColor}; fill: none; } .edgeLabel { background-color: ${t.edgeLabelBackground}; p { background-color: ${t.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${lyt(t.edgeLabelBackground,.5)}; // background-color: } .cluster rect { fill: ${t.clusterBkg}; stroke: ${t.clusterBorder}; stroke-width: 1px; } .cluster text { fill: ${t.titleColor}; } .cluster span { color: ${t.titleColor}; } /* .cluster div { color: ${t.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${t.fontFamily}; font-size: 12px; background: ${t.tertiaryColor}; border: 1px solid ${t.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } rect.text { fill: none; stroke-width: 0; } .icon-shape, .image-shape { background-color: ${t.edgeLabelBackground}; p { background-color: ${t.edgeLabelBackground}; padding: 2px; } rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } `,"getStyles"),uyt=cyt,hyt={parser:oyt,db:WU,renderer:syt,styles:uyt,init:x(t=>{t.flowchart||(t.flowchart={}),t.layout&&mF({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,mF({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),WU.clear(),WU.setGen("gen-2")},"init")}});var uke,hke=$(()=>{b();uke=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function fyt(t){return typeof t=="string"&&uke.test(t)}var fke,dke=$(()=>{b();hke();fke=fyt});function pke(t,e=0){return ps[t[e+0]]+ps[t[e+1]]+ps[t[e+2]]+ps[t[e+3]]+"-"+ps[t[e+4]]+ps[t[e+5]]+"-"+ps[t[e+6]]+ps[t[e+7]]+"-"+ps[t[e+8]]+ps[t[e+9]]+"-"+ps[t[e+10]]+ps[t[e+11]]+ps[t[e+12]]+ps[t[e+13]]+ps[t[e+14]]+ps[t[e+15]]}var ps,gke=$(()=>{b();ps=[];for(let t=0;t<256;++t)ps.push((t+256).toString(16).slice(1))});function dyt(t){if(!fke(t))throw TypeError("Invalid UUID");let e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var mke,vke=$(()=>{b();dke();mke=dyt});function pyt(t){t=unescape(encodeURIComponent(t));let e=[];for(let r=0;r{b();gke();vke();gyt="6ba7b810-9dad-11d1-80b4-00c04fd430c8",myt="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function vyt(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function QU(t,e){return t<>>32-e}function yyt(t){let e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){let s=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;d=f,f=h,h=QU(u,30)>>>0,u=l,l=m}r[0]=r[0]+l>>>0,r[1]=r[1]+u>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+d>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var bke,xke=$(()=>{b();bke=yyt});var byt,JU,wke=$(()=>{b();yke();xke();byt=ZU("v5",80,bke),JU=byt});var kke=$(()=>{b();wke()});var _ke={};Wt(_ke,{diagram:()=>Uyt});function Cke(t="",e=""){let r=t.replace(Myt,"");return`${tH(e)}${tH(r)}${JU(t,Byt)}`}function tH(t=""){return t.length>0?`${t}-`:""}var eH,xyt,em,rH,wyt,kyt,Eke,Tyt,Eyt,Syt,Cyt,_yt,Ayt,fu,Lyt,du,Myt,Ta,k3,Dyt,Oyt,Ryt,Iyt,Ske,Nyt,Tke,Pyt,Fyt,Byt,zyt,$yt,Vyt,Uyt,Ake=$(()=>{b();Qn();Sr();qo();Cr();h3();kke();eH=function(){var t=x(function(_,M,I,O){for(I=I||{},O=_.length;O--;I[_[O]]=M);return I},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],n=[1,11],i=[1,12],a=[1,13],s=[1,14],o=[1,15],l=[1,21],u=[1,22],h=[1,23],f=[1,24],d=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],g=[1,34],m=[27,28,46,47],v=[41,42,43,44,45],y=[17,34],w=[1,54],k=[1,53],E=[17,34,36,38],T={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:x(function(M,I,O,C,R,D,P){var A=D.length-1;switch(R){case 1:break;case 2:this.$=[];break;case 3:D[A-1].push(D[A]),this.$=D[A-1];break;case 4:case 5:this.$=D[A];break;case 6:case 7:this.$=[];break;case 8:C.addEntity(D[A-4]),C.addEntity(D[A-2]),C.addRelationship(D[A-4],D[A],D[A-2],D[A-3]);break;case 9:C.addEntity(D[A-3]),C.addAttributes(D[A-3],D[A-1]);break;case 10:C.addEntity(D[A-2]);break;case 11:C.addEntity(D[A]);break;case 12:C.addEntity(D[A-6],D[A-4]),C.addAttributes(D[A-6],D[A-1]);break;case 13:C.addEntity(D[A-5],D[A-3]);break;case 14:C.addEntity(D[A-3],D[A-1]);break;case 15:case 16:this.$=D[A].trim(),C.setAccTitle(this.$);break;case 17:case 18:this.$=D[A].trim(),C.setAccDescription(this.$);break;case 19:case 43:this.$=D[A];break;case 20:case 41:case 42:this.$=D[A].replace(/"/g,"");break;case 21:case 29:this.$=[D[A]];break;case 22:D[A].push(D[A-1]),this.$=D[A];break;case 23:this.$={attributeType:D[A-1],attributeName:D[A]};break;case 24:this.$={attributeType:D[A-2],attributeName:D[A-1],attributeKeyTypeList:D[A]};break;case 25:this.$={attributeType:D[A-2],attributeName:D[A-1],attributeComment:D[A]};break;case 26:this.$={attributeType:D[A-3],attributeName:D[A-2],attributeKeyTypeList:D[A-1],attributeComment:D[A]};break;case 27:case 28:case 31:this.$=D[A];break;case 30:D[A-2].push(D[A]),this.$=D[A-2];break;case 32:this.$=D[A].replace(/"/g,"");break;case 33:this.$={cardA:D[A],relType:D[A-1],cardB:D[A-2]};break;case 34:this.$=C.Cardinality.ZERO_OR_ONE;break;case 35:this.$=C.Cardinality.ZERO_OR_MORE;break;case 36:this.$=C.Cardinality.ONE_OR_MORE;break;case 37:this.$=C.Cardinality.ONLY_ONE;break;case 38:this.$=C.Cardinality.MD_PARENT;break;case 39:this.$=C.Identification.NON_IDENTIFYING;break;case 40:this.$=C.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:n,24:i,26:a,27:s,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:n,24:i,26:a,27:s,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:l,42:u,43:h,44:f,45:d}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:s,28:o},{16:30,17:[1,31],29:32,30:33,34:g},{11:35,27:s,28:o},{40:36,46:[1,37],47:[1,38]},t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),t(m,[2,37]),t(m,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:g},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:l,42:u,43:h,44:f,45:d},t(v,[2,39]),t(v,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(y,[2,23],{32:50,33:51,35:52,37:w,38:k}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(y,[2,24],{33:56,36:[1,57],38:k}),t(y,[2,25]),t(E,[2,29]),t(y,[2,32]),t(E,[2,31]),{16:58,17:[1,59],29:32,30:33,34:g},t(y,[2,26]),{35:60,37:w},{17:[1,61]},t(e,[2,13]),t(E,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:x(function(M,I){if(I.recoverable)this.trace(M);else{var O=new Error(M);throw O.hash=I,O}},"parseError"),parse:x(function(M){var I=this,O=[0],C=[],R=[null],D=[],P=this.table,A="",N=0,F=0,B=0,V=2,z=1,H=D.slice.call(arguments,1),K=Object.create(this.lexer),X={yy:{}};for(var ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ne)&&(X.yy[ne]=this.yy[ne]);K.setInput(M,X.yy),X.yy.lexer=K,X.yy.parser=this,typeof K.yylloc>"u"&&(K.yylloc={});var j=K.yylloc;D.push(j);var ee=K.options&&K.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Q(Qe){O.length=O.length-2*Qe,R.length=R.length-Qe,D.length=D.length-Qe}x(Q,"popStack");function G(){var Qe;return Qe=C.pop()||K.lex()||z,typeof Qe!="number"&&(Qe instanceof Array&&(C=Qe,Qe=C.pop()),Qe=I.symbols_[Qe]||Qe),Qe}x(G,"lex");for(var Z,te,oe,de,pe,re,Be={},le,Se,Ye,We;;){if(oe=O[O.length-1],this.defaultActions[oe]?de=this.defaultActions[oe]:((Z===null||typeof Z>"u")&&(Z=G()),de=P[oe]&&P[oe][Z]),typeof de>"u"||!de.length||!de[0]){var Ze="";We=[];for(le in P[oe])this.terminals_[le]&&le>V&&We.push("'"+this.terminals_[le]+"'");K.showPosition?Ze="Parse error on line "+(N+1)+`: `+K.showPosition()+` Expecting `+We.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":Ze="Parse error on line "+(N+1)+": Unexpected "+(Z==z?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(Ze,{text:K.match,token:this.terminals_[Z]||Z,line:K.yylineno,loc:j,expected:We})}if(de[0]instanceof Array&&de.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+Z);switch(de[0]){case 1:O.push(Z),R.push(K.yytext),D.push(K.yylloc),O.push(de[1]),Z=null,te?(Z=te,te=null):(F=K.yyleng,A=K.yytext,N=K.yylineno,j=K.yylloc,B>0&&B--);break;case 2:if(Se=this.productions_[de[1]][1],Be.$=R[R.length-Se],Be._$={first_line:D[D.length-(Se||1)].first_line,last_line:D[D.length-1].last_line,first_column:D[D.length-(Se||1)].first_column,last_column:D[D.length-1].last_column},ee&&(Be._$.range=[D[D.length-(Se||1)].range[0],D[D.length-1].range[1]]),re=this.performAction.apply(Be,[A,F,N,X.yy,de[1],R,D].concat(H)),typeof re<"u")return re;Se&&(O=O.slice(0,-1*Se*2),R=R.slice(0,-1*Se),D=D.slice(0,-1*Se)),O.push(this.productions_[de[1]][0]),R.push(Be.$),D.push(Be._$),Ye=P[O[O.length-2]][O[O.length-1]],O.push(Ye);break;case 3:return!0}}return!0},"parse")},S=function(){var _={EOF:1,parseError:x(function(I,O){if(this.yy.parser)this.yy.parser.parseError(I,O);else throw new Error(I)},"parseError"),setInput:x(function(M,I){return this.yy=I||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var I=M.match(/(?:\r\n?|\n).*/g);return I?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},"input"),unput:x(function(M){var I=M.length,O=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),O.length-1&&(this.yylineno-=O.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:O?(O.length===C.length?this.yylloc.first_column:0)+C[C.length-O.length].length-O[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(M){this.unput(this.match.slice(M))},"less"),pastInput:x(function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var M=this.pastInput(),I=new Array(M.length+1).join("-");return M+this.upcomingInput()+` `+I+"^"},"showPosition"),test_match:x(function(M,I){var O,C,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),C=M[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],O=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),O)return O;if(this._backtrack){for(var D in R)this[D]=R[D];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,I,O,C;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),D=0;DI[0].length)){if(I=O,C=D,this.options.backtrack_lexer){if(M=this.test_match(O,R[D]),M!==!1)return M;if(this._backtrack){I=!1;continue}else return!1}else if(!this.options.flex)break}return I?(M=this.test_match(I,R[C]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var I=this.next();return I||this.lex()},"lex"),begin:x(function(I){this.conditionStack.push(I)},"begin"),popState:x(function(){var I=this.conditionStack.length-1;return I>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(I){return I=this.conditionStack.length-1-Math.abs(I||0),I>=0?this.conditionStack[I]:"INITIAL"},"topState"),pushState:x(function(I){this.begin(I)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(I,O,C,R){var D=R;switch(C){case 0:return this.begin("acc_title"),22;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),24;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;break;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;break;case 22:return O.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return O.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return _}();T.lexer=S;function L(){this.yy={}}return x(L,"Parser"),L.prototype=T,T.Parser=L,new L}();eH.parser=eH;xyt=eH,em=new Map,rH=[],wyt={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},kyt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},Eke=x(function(t,e=void 0){return em.has(t)?!em.get(t).alias&&e&&(em.get(t).alias=e,ie.info(`Add alias '${e}' to entity '${t}'`)):(em.set(t,{attributes:[],alias:e}),ie.info("Added new entity :",t)),em.get(t)},"addEntity"),Tyt=x(()=>em,"getEntities"),Eyt=x(function(t,e){let r=Eke(t),n;for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),ie.debug("Added attribute ",e[n].attributeName)},"addAttributes"),Syt=x(function(t,e,r,n){let i={entityA:t,roleA:e,entityB:r,relSpec:n};rH.push(i),ie.debug("Added new relationship :",i)},"addRelationship"),Cyt=x(()=>rH,"getRelationships"),_yt=x(function(){em=new Map,rH=[],zr()},"clear"),Ayt={Cardinality:wyt,Identification:kyt,getConfig:x(()=>Te().er,"getConfig"),addEntity:Eke,addAttributes:Eyt,getEntities:Tyt,addRelationship:Syt,getRelationships:Cyt,clear:_yt,setAccTitle:Wr,getAccTitle:Xr,setAccDescription:Kr,getAccDescription:Zr,setDiagramTitle:Cn,getDiagramTitle:vn},fu={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},Lyt=x(function(t,e){let r;t.append("defs").append("marker").attr("id",fu.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",fu.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",fu.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",fu.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",fu.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",fu.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",fu.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",fu.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",fu.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",fu.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),du={ERMarkers:fu,insertMarkers:Lyt},Myt=/[^\dA-Za-z](\W)*/g,Ta={},k3=new Map,Dyt=x(function(t){let e=Object.keys(t);for(let r of e)Ta[r]=t[r]},"setConf"),Oyt=x((t,e,r)=>{let n=Ta.entityPadding/3,i=Ta.entityPadding/3,a=Ta.fontSize*.85,s=e.node().getBBox(),o=[],l=!1,u=!1,h=0,f=0,d=0,p=0,g=s.height+n*2,m=1;r.forEach(k=>{k.attributeKeyTypeList!==void 0&&k.attributeKeyTypeList.length>0&&(l=!0),k.attributeComment!==void 0&&(u=!0)}),r.forEach(k=>{let E=`${e.node().id}-attr-${m}`,T=0,S=Sf(k.attributeType),L=t.append("text").classed("er entityLabel",!0).attr("id",`${E}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Te().fontFamily).style("font-size",a+"px").text(S),_=t.append("text").classed("er entityLabel",!0).attr("id",`${E}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Te().fontFamily).style("font-size",a+"px").text(k.attributeName),M={};M.tn=L,M.nn=_;let I=L.node().getBBox(),O=_.node().getBBox();if(h=Math.max(h,I.width),f=Math.max(f,O.width),T=Math.max(I.height,O.height),l){let C=k.attributeKeyTypeList!==void 0?k.attributeKeyTypeList.join(","):"",R=t.append("text").classed("er entityLabel",!0).attr("id",`${E}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Te().fontFamily).style("font-size",a+"px").text(C);M.kn=R;let D=R.node().getBBox();d=Math.max(d,D.width),T=Math.max(T,D.height)}if(u){let C=t.append("text").classed("er entityLabel",!0).attr("id",`${E}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Te().fontFamily).style("font-size",a+"px").text(k.attributeComment||"");M.cn=C;let R=C.node().getBBox();p=Math.max(p,R.width),T=Math.max(T,R.height)}M.height=T,o.push(M),g+=T+n*2,m+=1});let v=4;l&&(v+=2),u&&(v+=2);let y=h+f+d+p,w={width:Math.max(Ta.minEntityWidth,Math.max(s.width+Ta.entityPadding*2,y+i*v)),height:r.length>0?g:Math.max(Ta.minEntityHeight,s.height+Ta.entityPadding*2)};if(r.length>0){let k=Math.max(0,(w.width-y-i*v)/(v/2));e.attr("transform","translate("+w.width/2+","+(n+s.height/2)+")");let E=s.height+n*2,T="attributeBoxOdd";o.forEach(S=>{let L=E+n+S.height/2;S.tn.attr("transform","translate("+i+","+L+")");let _=t.insert("rect","#"+S.tn.node().id).classed(`er ${T}`,!0).attr("x",0).attr("y",E).attr("width",h+i*2+k).attr("height",S.height+n*2),M=parseFloat(_.attr("x"))+parseFloat(_.attr("width"));S.nn.attr("transform","translate("+(M+i)+","+L+")");let I=t.insert("rect","#"+S.nn.node().id).classed(`er ${T}`,!0).attr("x",M).attr("y",E).attr("width",f+i*2+k).attr("height",S.height+n*2),O=parseFloat(I.attr("x"))+parseFloat(I.attr("width"));if(l){S.kn.attr("transform","translate("+(O+i)+","+L+")");let C=t.insert("rect","#"+S.kn.node().id).classed(`er ${T}`,!0).attr("x",O).attr("y",E).attr("width",d+i*2+k).attr("height",S.height+n*2);O=parseFloat(C.attr("x"))+parseFloat(C.attr("width"))}u&&(S.cn.attr("transform","translate("+(O+i)+","+L+")"),t.insert("rect","#"+S.cn.node().id).classed(`er ${T}`,"true").attr("x",O).attr("y",E).attr("width",p+i*2+k).attr("height",S.height+n*2)),E+=S.height+n*2,T=T==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else w.height=Math.max(Ta.minEntityHeight,g),e.attr("transform","translate("+w.width/2+","+w.height/2+")");return w},"drawAttributes"),Ryt=x(function(t,e,r){let n=[...e.keys()],i;return n.forEach(function(a){let s=Cke(a,"entity");k3.set(a,s);let o=t.append("g").attr("id",s);i=i===void 0?s:i;let l="text-"+s,u=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",Te().fontFamily).style("font-size",Ta.fontSize+"px").text(e.get(a).alias??a),{width:h,height:f}=Oyt(o,u,e.get(a).attributes),p=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",f).node().getBBox();r.setNode(s,{width:p.width,height:p.height,shape:"rect",id:s})}),i},"drawEntities"),Iyt=x(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),Ske=x(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),Nyt=x(function(t,e){return t.forEach(function(r){e.setEdge(k3.get(r.entityA),k3.get(r.entityB),{relationship:r},Ske(r))}),t},"addRelationships"),Tke=0,Pyt=x(function(t,e,r,n,i){Tke++;let a=r.edge(k3.get(e.entityA),k3.get(e.entityB),Ske(e)),s=Ro().x(function(m){return m.x}).y(function(m){return m.y}).curve(au),o=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",s(a.points)).style("stroke",Ta.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(Ta.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+du.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+du.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+du.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+du.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+l+"#"+du.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+du.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+du.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+du.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+du.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+l+"#"+du.ERMarkers.MD_PARENT_START+")");break}let u=o.node().getTotalLength(),h=o.node().getPointAtLength(u*.5),f="rel"+Tke,d=e.roleA.split(/
    /g),p=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",h.x).attr("y",h.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",Te().fontFamily).style("font-size",Ta.fontSize+"px");if(d.length==1)p.text(e.roleA);else{let m=-(d.length-1)*.5;d.forEach((v,y)=>{p.append("tspan").attr("x",h.x).attr("dy",`${y===0?m:1}em`).text(v)})}let g=p.node().getBBox();t.insert("rect","#"+f).classed("er relationshipLabelBox",!0).attr("x",h.x-g.width/2).attr("y",h.y-g.height/2).attr("width",g.width).attr("height",g.height)},"drawRelationshipFromLayout"),Fyt=x(function(t,e,r,n){Ta=Te().er,ie.info("Drawing ER diagram");let i=Te().securityLevel,a;i==="sandbox"&&(a=Je("#i"+e));let o=(i==="sandbox"?Je(a.nodes()[0].contentDocument.body):Je("body")).select(`[id='${e}']`);du.insertMarkers(o,Ta);let l;l=new Yr({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ta.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let u=Ryt(o,n.db.getEntities(),l),h=Nyt(n.db.getRelationships(),l);Zf(l),Iyt(o,l),h.forEach(function(m){Pyt(o,m,l,u,n)});let f=Ta.diagramPadding;tr.insertTitle(o,"entityTitleText",Ta.titleTopMargin,n.db.getDiagramTitle());let d=o.node().getBBox(),p=d.width+f*2,g=d.height+f*2;mn(o,g,p,Ta.useMaxWidth),o.attr("viewBox",`${d.x-f} ${d.y-f} ${p} ${g}`)},"draw"),Byt="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";x(Cke,"generateId");x(tH,"strWithHyphen");zyt={setConf:Dyt,draw:Fyt},$yt=x(t=>` .entityBox { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; } .attributeBoxOdd { fill: ${t.attributeBackgroundColorOdd}; stroke: ${t.nodeBorder}; } .attributeBoxEven { fill: ${t.attributeBackgroundColorEven}; stroke: ${t.nodeBorder}; } .relationshipLabelBox { fill: ${t.tertiaryColor}; opacity: 0.7; background-color: ${t.tertiaryColor}; rect { opacity: 0.5; } } .relationshipLine { stroke: ${t.lineColor}; } .entityTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } #MD_PARENT_START { fill: #f5f5f5 !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #MD_PARENT_END { fill: #f5f5f5 !important; stroke: ${t.lineColor} !important; stroke-width: 1; } `,"getStyles"),Vyt=$yt,Uyt={parser:xyt,db:Ayt,renderer:zyt,styles:Vyt}});function nd(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var T3=$(()=>{b();Sr();x(nd,"populateCommonDb")});var Vy,R7=$(()=>{b();Sr();Vy=class{constructor(t){this.init=t,this.records=this.init()}static{x(this,"ImperativeState")}reset(){this.records=this.init()}}});function Bi(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function gs(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function nH(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function rm(t){return typeof t=="object"&&t!==null&&Bi(t.container)&&gs(t.reference)&&typeof t.message=="string"}function Tl(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function $p(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function E3(t){return Tl(t)&&typeof t.fullText=="string"}var tm,mc=$(()=>{b();tm=class{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,r){return Bi(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let i=n[r];if(i!==void 0)return i;{let a=this.computeIsSubtype(e,r);return n[r]=a,a}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),i=[];for(let a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}});function Hyt(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function I7(t){return!!t&&typeof t[Symbol.iterator]=="function"}function bn(...t){if(t.length===1){let e=t[0];if(e instanceof El)return e;if(I7(e))return new El(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new El(()=>({index:0}),r=>r.index1?new El(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex{b();El=class t{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){let n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){let r=e[Symbol.iterator]();return new t(()=>({first:this.startFn(),firstDone:!1}),n=>{let i;if(!n.firstDone){do if(i=this.nextFn(n.first),!i.done)return i;while(!i.done);n.firstDone=!0}do if(i=r.next(),!i.done)return i;while(!i.done);return so})}join(e=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=Hyt(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){let n=this.iterator(),i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new t(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?so:{done:!1,value:e(i)}})}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return so})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){let n=this.iterator(),i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){let i=e.next();if(i.done)return n;let a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:n,value:i}=this.nextFn(r.this);if(!n){let a=e(i);if(I7(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return so})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(I7(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return so})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?so:this.nextFn(r.state)))}distinct(e){let r=new Set;return this.filter(n=>{let i=e?e(n):n;return r.has(i)?!1:(r.add(i),!0)})}exclude(e,r){let n=new Set;for(let i of e){let a=r?r(i):i;n.add(a)}return this.filter(i=>{let a=r?r(i):i;return!n.has(a)})}};S3=new El(()=>{},()=>so),so=Object.freeze({done:!0,value:void 0});_h=class extends El{constructor(e,r,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return so})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}};(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(Uy||(Uy={}))});var P7={};Wt(P7,{DefaultNameRegexp:()=>N7,RangeComparison:()=>id,compareRange:()=>Mke,findCommentNode:()=>oH,findDeclarationNodeAtOffset:()=>Wyt,findLeafNodeAtOffset:()=>lH,findLeafNodeBeforeOffset:()=>Dke,flattenCst:()=>qyt,getInteriorNodes:()=>jyt,getNextNode:()=>Gyt,getPreviousNode:()=>Rke,getStartlineNode:()=>Yyt,inRange:()=>sH,isChildNode:()=>aH,isCommentNode:()=>iH,streamCst:()=>nm,toDocumentSegment:()=>im,tokenToRange:()=>Hy});function nm(t){return new _h(t,e=>Tl(e)?e.content:[],{includeRoot:!0})}function qyt(t){return nm(t).filter($p)}function aH(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Hy(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function im(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function Mke(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>e.end.character)return id.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.lineid.After}function Wyt(t,e,r=N7){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return lH(t,e)}}function oH(t,e){if(t){let r=Rke(t,!0);if(r&&iH(r,e))return r;if(E3(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=t.content[i];if(iH(a,e))return a}}}}function iH(t,e){return $p(t)&&e.includes(t.tokenType.name)}function lH(t,e){if($p(t))return t;if(Tl(t)){let r=Oke(t,e,!1);if(r)return lH(r,e)}}function Dke(t,e){if($p(t))return t;if(Tl(t)){let r=Oke(t,e,!0);if(r)return Dke(r,e)}}function Oke(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){let s=Math.floor((n+i)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,n=s+1):i=s-1}return a}function Rke(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let i=r.content[n];if(e||!i.hidden)return i}t=r}}function Gyt(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n{b();mc();Go();(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside"})(id||(id={}));N7=/^[\w\p{L}]$/u});function Vp(t){throw new Error("Error! The input value was not handled.")}var am,F7=$(()=>{b();am=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}});var M3={};Wt(M3,{AbstractElement:()=>uH,AbstractRule:()=>C3,AbstractType:()=>_3,Action:()=>BH,Alternatives:()=>zH,ArrayLiteral:()=>hH,ArrayType:()=>fH,Assignment:()=>$H,BooleanLiteral:()=>pH,CharacterRange:()=>VH,Condition:()=>B7,Conjunction:()=>mH,CrossReference:()=>HH,Disjunction:()=>yH,EndOfFile:()=>qH,Grammar:()=>xH,GrammarImport:()=>Nke,Group:()=>GH,InferredType:()=>wH,Interface:()=>kH,Keyword:()=>YH,LangiumGrammarAstReflection:()=>qy,LangiumGrammarTerminals:()=>Kyt,NamedArgument:()=>Pke,NegatedToken:()=>jH,Negation:()=>TH,NumberLiteral:()=>SH,Parameter:()=>CH,ParameterReference:()=>_H,ParserRule:()=>LH,ReferenceType:()=>MH,RegexToken:()=>KH,ReturnType:()=>Fke,RuleCall:()=>QH,SimpleType:()=>RH,StringLiteral:()=>IH,TerminalAlternatives:()=>JH,TerminalGroup:()=>tq,TerminalRule:()=>$7,TerminalRuleCall:()=>nq,Type:()=>NH,TypeAttribute:()=>Bke,TypeDefinition:()=>cH,UnionType:()=>PH,UnorderedGroup:()=>iq,UntilToken:()=>aq,ValueLiteral:()=>z7,Wildcard:()=>oq,isAbstractElement:()=>A3,isAbstractRule:()=>Zyt,isAbstractType:()=>Qyt,isAction:()=>ad,isAlternatives:()=>q7,isArrayLiteral:()=>nbt,isArrayType:()=>dH,isAssignment:()=>gu,isBooleanLiteral:()=>gH,isCharacterRange:()=>UH,isCondition:()=>Jyt,isConjunction:()=>vH,isCrossReference:()=>sm,isDisjunction:()=>bH,isEndOfFile:()=>WH,isFeatureName:()=>ebt,isGrammar:()=>ibt,isGrammarImport:()=>abt,isGroup:()=>Up,isInferredType:()=>V7,isInterface:()=>U7,isKeyword:()=>yc,isNamedArgument:()=>sbt,isNegatedToken:()=>XH,isNegation:()=>EH,isNumberLiteral:()=>obt,isParameter:()=>lbt,isParameterReference:()=>AH,isParserRule:()=>Ns,isPrimitiveType:()=>Ike,isReferenceType:()=>DH,isRegexToken:()=>ZH,isReturnType:()=>OH,isRuleCall:()=>mu,isSimpleType:()=>H7,isStringLiteral:()=>cbt,isTerminalAlternatives:()=>eq,isTerminalGroup:()=>rq,isTerminalRule:()=>vc,isTerminalRuleCall:()=>W7,isType:()=>L3,isTypeAttribute:()=>ubt,isTypeDefinition:()=>tbt,isUnionType:()=>FH,isUnorderedGroup:()=>G7,isUntilToken:()=>sq,isValueLiteral:()=>rbt,isWildcard:()=>lq,reflection:()=>yr});function Zyt(t){return yr.isInstance(t,C3)}function Qyt(t){return yr.isInstance(t,_3)}function Jyt(t){return yr.isInstance(t,B7)}function ebt(t){return Ike(t)||t==="current"||t==="entry"||t==="extends"||t==="false"||t==="fragment"||t==="grammar"||t==="hidden"||t==="import"||t==="interface"||t==="returns"||t==="terminal"||t==="true"||t==="type"||t==="infer"||t==="infers"||t==="with"||typeof t=="string"&&/\^?[_a-zA-Z][\w_]*/.test(t)}function Ike(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint"}function tbt(t){return yr.isInstance(t,cH)}function rbt(t){return yr.isInstance(t,z7)}function A3(t){return yr.isInstance(t,uH)}function nbt(t){return yr.isInstance(t,hH)}function dH(t){return yr.isInstance(t,fH)}function gH(t){return yr.isInstance(t,pH)}function vH(t){return yr.isInstance(t,mH)}function bH(t){return yr.isInstance(t,yH)}function ibt(t){return yr.isInstance(t,xH)}function abt(t){return yr.isInstance(t,Nke)}function V7(t){return yr.isInstance(t,wH)}function U7(t){return yr.isInstance(t,kH)}function sbt(t){return yr.isInstance(t,Pke)}function EH(t){return yr.isInstance(t,TH)}function obt(t){return yr.isInstance(t,SH)}function lbt(t){return yr.isInstance(t,CH)}function AH(t){return yr.isInstance(t,_H)}function Ns(t){return yr.isInstance(t,LH)}function DH(t){return yr.isInstance(t,MH)}function OH(t){return yr.isInstance(t,Fke)}function H7(t){return yr.isInstance(t,RH)}function cbt(t){return yr.isInstance(t,IH)}function vc(t){return yr.isInstance(t,$7)}function L3(t){return yr.isInstance(t,NH)}function ubt(t){return yr.isInstance(t,Bke)}function FH(t){return yr.isInstance(t,PH)}function ad(t){return yr.isInstance(t,BH)}function q7(t){return yr.isInstance(t,zH)}function gu(t){return yr.isInstance(t,$H)}function UH(t){return yr.isInstance(t,VH)}function sm(t){return yr.isInstance(t,HH)}function WH(t){return yr.isInstance(t,qH)}function Up(t){return yr.isInstance(t,GH)}function yc(t){return yr.isInstance(t,YH)}function XH(t){return yr.isInstance(t,jH)}function ZH(t){return yr.isInstance(t,KH)}function mu(t){return yr.isInstance(t,QH)}function eq(t){return yr.isInstance(t,JH)}function rq(t){return yr.isInstance(t,tq)}function W7(t){return yr.isInstance(t,nq)}function G7(t){return yr.isInstance(t,iq)}function sq(t){return yr.isInstance(t,aq)}function lq(t){return yr.isInstance(t,oq)}var Kyt,C3,_3,B7,cH,z7,uH,hH,fH,pH,mH,yH,xH,Nke,wH,kH,Pke,TH,SH,CH,_H,LH,MH,Fke,RH,IH,$7,NH,Bke,PH,BH,zH,$H,VH,HH,qH,GH,YH,jH,KH,QH,JH,tq,nq,iq,aq,oq,qy,yr,Ah=$(()=>{b();mc();Kyt={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},C3="AbstractRule";_3="AbstractType";B7="Condition";cH="TypeDefinition";z7="ValueLiteral";uH="AbstractElement";hH="ArrayLiteral";fH="ArrayType";pH="BooleanLiteral";mH="Conjunction";yH="Disjunction";xH="Grammar";Nke="GrammarImport";wH="InferredType";kH="Interface";Pke="NamedArgument";TH="Negation";SH="NumberLiteral";CH="Parameter";_H="ParameterReference";LH="ParserRule";MH="ReferenceType";Fke="ReturnType";RH="SimpleType";IH="StringLiteral";$7="TerminalRule";NH="Type";Bke="TypeAttribute";PH="UnionType";BH="Action";zH="Alternatives";$H="Assignment";VH="CharacterRange";HH="CrossReference";qH="EndOfFile";GH="Group";YH="Keyword";jH="NegatedToken";KH="RegexToken";QH="RuleCall";JH="TerminalAlternatives";tq="TerminalGroup";nq="TerminalRuleCall";iq="UnorderedGroup";aq="UntilToken";oq="Wildcard";qy=class extends tm{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,r){switch(e){case BH:case zH:case $H:case VH:case HH:case qH:case GH:case YH:case jH:case KH:case QH:case JH:case tq:case nq:case iq:case aq:case oq:return this.isSubtype(uH,r);case hH:case SH:case IH:return this.isSubtype(z7,r);case fH:case MH:case RH:case PH:return this.isSubtype(cH,r);case pH:return this.isSubtype(B7,r)||this.isSubtype(z7,r);case mH:case yH:case TH:case _H:return this.isSubtype(B7,r);case wH:case kH:case NH:return this.isSubtype(_3,r);case LH:return this.isSubtype(C3,r)||this.isSubtype(_3,r);case $7:return this.isSubtype(C3,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return _3;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return C3;case"Grammar:usedGrammars":return xH;case"NamedArgument:parameter":case"ParameterReference:parameter":return CH;case"TerminalRuleCall:rule":return $7;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},yr=new qy});var j7={};Wt(j7,{assignMandatoryProperties:()=>hq,copyAstNode:()=>uq,findLocalReferences:()=>fbt,findRootNode:()=>zke,getContainerOfType:()=>om,getDocument:()=>Ea,hasContainerOfType:()=>hbt,linkContentToContainer:()=>Y7,streamAllContents:()=>Lh,streamAst:()=>bc,streamContents:()=>D3,streamReferences:()=>Wy});function Y7(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{Bi(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=i)}):Bi(r)&&(r.$container=t,r.$containerProperty=e))}function om(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function hbt(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function Ea(t){let r=zke(t).$document;if(!r)throw new Error("AST node has no document.");return r}function zke(t){for(;t.$container;)t=t.$container;return t}function D3(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new El(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexD3(r,e))}function bc(t,e){if(t){if(e?.range&&!cq(t,e.range))return new _h(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new _h(t,r=>D3(r,e),{includeRoot:!0})}function cq(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?sH(n,e):!1}function Wy(t){return new El(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex{Wy(n).forEach(i=>{i.reference.ref===t&&r.push(i.reference)})}),bn(r)}function hq(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let i of r.properties)i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=$ke(i.defaultValue))}function $ke(t){return Array.isArray(t)?[...t.map($ke)]:t}function uq(t,e){let r={$type:t.$type};for(let[n,i]of Object.entries(t))if(!n.startsWith("$"))if(Bi(i))r[n]=uq(i,e);else if(gs(i))r[n]=e(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let a=[];for(let s of i)Bi(s)?a.push(uq(s,e)):gs(s)?a.push(e(r,n,s.$refNode,s.$refText)):a.push(s);r[n]=a}else r[n]=i;return Y7(r),r}var oo=$(()=>{b();mc();Go();pu()});function ur(t){return t.charCodeAt(0)}function X7(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Gy(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function lm(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function O3(){throw Error("Internal Error - Should never get here!")}function fq(t){return t.type==="Character"}var dq=$(()=>{b()});var R3,I3,pq,Vke=$(()=>{b();dq();R3=[];for(let t=ur("0");t<=ur("9");t++)R3.push(t);I3=[ur("_")].concat(R3);for(let t=ur("a");t<=ur("z");t++)I3.push(t);for(let t=ur("A");t<=ur("Z");t++)I3.push(t);pq=[ur(" "),ur("\f"),ur(` `),ur("\r"),ur(" "),ur("\v"),ur(" "),ur("\xA0"),ur("\u1680"),ur("\u2000"),ur("\u2001"),ur("\u2002"),ur("\u2003"),ur("\u2004"),ur("\u2005"),ur("\u2006"),ur("\u2007"),ur("\u2008"),ur("\u2009"),ur("\u200A"),ur("\u2028"),ur("\u2029"),ur("\u202F"),ur("\u205F"),ur("\u3000"),ur("\uFEFF")]});var dbt,K7,pbt,cm,Uke=$(()=>{b();dq();Vke();dbt=/[0-9a-fA-F]/,K7=/[0-9]/,pbt=/[1-9]/,cm=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Gy(n,"global");break;case"i":Gy(n,"ignoreCase");break;case"m":Gy(n,"multiLine");break;case"u":Gy(n,"unicode");break;case"y":Gy(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}lm(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return O3()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;lm(r);break}if(!(e===!0&&r===void 0)&&lm(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),lm(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):O3()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[ur(` `),ur("\r"),ur("\u2028"),ur("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=R3;break;case"D":e=R3,r=!0;break;case"s":e=pq;break;case"S":e=pq,r=!0;break;case"w":e=I3;break;case"W":e=I3,r=!0;break}return lm(e)?{type:"Set",value:e,complement:r}:O3()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=ur("\f");break;case"n":e=ur(` `);break;case"r":e=ur("\r");break;case"t":e=ur(" ");break;case"v":e=ur("\v");break}return lm(e)?{type:"Character",value:e}:O3()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:ur("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:ur(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:ur(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(fq(n)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(fq(a)){if(a.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}});var Mh,Hke=$(()=>{b();Mh=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}});var N3=$(()=>{b();Uke();Hke()});var Q7={};Wt(Q7,{NEWLINE_REGEXP:()=>mq,escapeRegExp:()=>hm,getCaseInsensitivePattern:()=>yq,getTerminalParts:()=>gbt,isMultilineComment:()=>vq,isWhitespace:()=>Z7,partialMatches:()=>bq,partialRegExp:()=>Wke});function gbt(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=qke.pattern(t),r=[];for(let n of e.value.value)um.reset(t),um.visit(n),r.push({start:um.startRegexp,end:um.endRegex});return r}catch{return[]}}function vq(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),um.reset(t),um.visit(qke.pattern(t)),um.multiline}catch{return!1}}function Z7(t){return(typeof t=="string"?new RegExp(t):t).test(" ")}function hm(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yq(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:hm(e)).join("")}function bq(t,e){let r=Wke(t),n=e.match(r);return!!n&&n[0].length>0}function Wke(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function i(){let a="",s;function o(u){a+=r.substr(n,u),n+=u}function l(u){a+="(?:"+r.substr(n,u)+"|$)",n+=u}for(;n",n)-n+1);break;default:l(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=n,s=s.exec(r)||[],l(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=n,s=s.exec(r),s?o(s[0].length):l(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":s=n,n+=3,i(),a+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,i(),a+=r.substr(s,n-s);break;default:o(r.indexOf(">",n)-n+1),a+=i()+"|$)";break}break}else o(1),a+=i()+"|$)";break;case")":return++n,a;default:l(1);break}return a}return new RegExp(i(),t.flags)}var mq,qke,gq,um,Yy=$(()=>{b();N3();mq=/\r?\n/gm,qke=new cm,gq=class extends Mh{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===` `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=hm(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){let r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!` `.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},um=new gq});var e8={};Wt(e8,{findAssignment:()=>Aq,findNameAssignment:()=>J7,findNodeForKeyword:()=>Cq,findNodeForProperty:()=>F3,findNodesForKeyword:()=>mbt,findNodesForKeywordInternal:()=>_q,findNodesForProperty:()=>Eq,getActionAtElement:()=>Kke,getActionType:()=>Qke,getAllReachableRules:()=>P3,getCrossReferenceTerminal:()=>kq,getEntryRule:()=>Gke,getExplicitRuleType:()=>Lq,getHiddenRules:()=>Yke,getRuleType:()=>Mq,getTypeName:()=>fm,isArrayCardinality:()=>ybt,isArrayOperator:()=>bbt,isCommentTerminal:()=>Tq,isDataType:()=>xbt,isDataTypeRule:()=>B3,isOptionalCardinality:()=>vbt,terminalRegex:()=>jy});function Gke(t){return t.rules.find(e=>Ns(e)&&e.entry)}function Yke(t){return t.rules.filter(e=>vc(e)&&e.hidden)}function P3(t,e){let r=new Set,n=Gke(t);if(!n)return new Set(t.rules);let i=[n].concat(Yke(t));for(let s of i)jke(s,r,e);let a=new Set;for(let s of t.rules)(r.has(s.name)||vc(s)&&s.hidden)&&a.add(s);return a}function jke(t,e,r){e.add(t.name),Lh(t).forEach(n=>{if(mu(n)||r&&W7(n)){let i=n.rule.ref;i&&!e.has(i.name)&&jke(i,e,r)}})}function kq(t){if(t.terminal)return t.terminal;if(t.type.ref){let e=J7(t.type.ref);return e?.terminal}}function Tq(t){return t.hidden&&!jy(t).test(" ")}function Eq(t,e){return!t||!e?[]:Sq(t,e,t.astNode,!0)}function F3(t,e,r){if(!t||!e)return;let n=Sq(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function Sq(t,e,r,n){if(!n){let i=om(t.grammarSource,gu);if(i&&i.feature===e)return[t]}return Tl(t)&&t.astNode===r?t.content.flatMap(i=>Sq(i,e,r,!1)):[]}function mbt(t,e){return t?_q(t,e,t?.astNode):[]}function Cq(t,e,r){if(!t)return;let n=_q(t,e,t?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function _q(t,e,r){if(t.astNode!==r)return[];if(yc(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=nm(t).iterator(),i,a=[];do if(i=n.next(),!i.done){let s=i.value;s.astNode===r?yc(s.grammarSource)&&s.grammarSource.value===e&&a.push(s):n.prune()}while(!i.done);return a}function Aq(t){var e;let r=t.astNode;for(;r===((e=t.container)===null||e===void 0?void 0:e.astNode);){let n=om(t.grammarSource,gu);if(n)return n;t=t.container}}function J7(t){let e=t;return V7(e)&&(ad(e.$container)?e=e.$container.$container:Ns(e.$container)?e=e.$container:Vp(e.$container)),Xke(t,e,new Map)}function Xke(t,e,r){var n;function i(a,s){let o;return om(a,gu)||(o=Xke(s,s,r)),r.set(t,o),o}if(r.has(t))return r.get(t);r.set(t,void 0);for(let a of Lh(e)){if(gu(a)&&a.feature.toLowerCase()==="name")return r.set(t,a),a;if(mu(a)&&Ns(a.rule.ref))return i(a,a.rule.ref);if(H7(a)&&(!((n=a.typeRef)===null||n===void 0)&&n.ref))return i(a,a.typeRef.ref)}}function Kke(t){let e=t.$container;if(Up(e)){let r=e.elements,n=r.indexOf(t);for(let i=n-1;i>=0;i--){let a=r[i];if(ad(a))return a;{let s=Lh(r[i]).find(ad);if(s)return s}}}if(A3(e))return Kke(e)}function vbt(t,e){return t==="?"||t==="*"||Up(e)&&!!e.guardCondition}function ybt(t){return t==="*"||t==="+"}function bbt(t){return t==="+="}function B3(t){return Zke(t,new Set)}function Zke(t,e){if(e.has(t))return!0;e.add(t);for(let r of Lh(t))if(mu(r)){if(!r.rule.ref||Ns(r.rule.ref)&&!Zke(r.rule.ref,e))return!1}else{if(gu(r))return!1;if(ad(r))return!1}return!!t.definition}function xbt(t){return wq(t.type,new Set)}function wq(t,e){if(e.has(t))return!0;if(e.add(t),dH(t))return!1;if(DH(t))return!1;if(FH(t))return t.types.every(r=>wq(r,e));if(H7(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let r=t.typeRef.ref;return L3(r)?wq(r.type,e):!1}else return!1}else return!1}function Lq(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let e=t.returnType.ref;if(e){if(Ns(e))return e.name;if(U7(e)||L3(e))return e.name}}}function fm(t){var e;if(Ns(t))return B3(t)?t.name:(e=Lq(t))!==null&&e!==void 0?e:t.name;if(U7(t)||L3(t)||OH(t))return t.name;if(ad(t)){let r=Qke(t);if(r)return r}else if(V7(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function Qke(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return fm(t.type.ref)}function Mq(t){var e,r,n;return vc(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":B3(t)?t.name:(n=Lq(t))!==null&&n!==void 0?n:t.name}function jy(t){let e={s:!1,i:!1,u:!1},r=Xy(t.definition,e),n=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Xy(t,e){if(eq(t))return wbt(t);if(rq(t))return kbt(t);if(UH(t))return Sbt(t);if(W7(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return sd(Xy(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(XH(t))return Ebt(t);if(sq(t))return Tbt(t);if(ZH(t)){let r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),sd(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(lq(t))return sd(Dq,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function wbt(t){return sd(t.elements.map(e=>Xy(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function kbt(t){return sd(t.elements.map(e=>Xy(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function Tbt(t){return sd(`${Dq}*?${Xy(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Ebt(t){return sd(`(?!${Xy(t.terminal)})${Dq}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Sbt(t){return t.right?sd(`[${xq(t.left)}-${xq(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):sd(xq(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function xq(t){return hm(t.value)}function sd(t,e){var r;return(e.wrap!==!1||e.lookahead)&&(t=`(${(r=e.lookahead)!==null&&r!==void 0?r:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}var Dq,vu=$(()=>{b();F7();Ah();mc();oo();pu();Yy();Dq=/[\s\S]/.source});function Oq(t){let e=[],r=t.Grammar;for(let n of r.rules)vc(n)&&Tq(n)&&vq(jy(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:N7}}var Rq=$(()=>{b();pu();vu();Yy();Ah()});var Iq=$(()=>{b()});function Ky(t){console&&console.error&&console.error(`Error: ${t}`)}function z3(t){console&&console.warn&&console.warn(`Warning: ${t}`)}var Jke=$(()=>{b()});function $3(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}var eTe=$(()=>{b()});function V3(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}var tTe=$(()=>{b()});var Zy=$(()=>{b();Jke();eTe();tTe()});function Cbt(t){return _bt(t)?t.LABEL:t.name}function _bt(t){return ra(t.LABEL)&&t.LABEL!==""}function t8(t){return ut(t,Qy)}function Qy(t){function e(r){return ut(r,Qy)}if(t instanceof kn){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return ra(t.label)&&(r.label=t.label),r}else{if(t instanceof ei)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Tn)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof ti)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ri)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Qy(new Dr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof qn)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Qy(new Dr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof $r)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Wn)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Dr){let r={type:"Terminal",name:t.terminalType.name,label:Cbt(t.terminalType),idx:t.idx};ra(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=lc(n)?n.source:n),r}else{if(t instanceof lo)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var Sl,kn,lo,ei,Tn,ti,ri,$r,qn,Wn,Dr,r8=$(()=>{b();Xt();Sl=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),De(this.definition,r=>{r.accept(e)})}},kn=class extends Sl{constructor(e){super([]),this.idx=1,hs(this,Ho(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},lo=class extends Sl{constructor(e){super(e.definition),this.orgText="",hs(this,Ho(e,r=>r!==void 0))}},ei=class extends Sl{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,hs(this,Ho(e,r=>r!==void 0))}},Tn=class extends Sl{constructor(e){super(e.definition),this.idx=1,hs(this,Ho(e,r=>r!==void 0))}},ti=class extends Sl{constructor(e){super(e.definition),this.idx=1,hs(this,Ho(e,r=>r!==void 0))}},ri=class extends Sl{constructor(e){super(e.definition),this.idx=1,hs(this,Ho(e,r=>r!==void 0))}},$r=class extends Sl{constructor(e){super(e.definition),this.idx=1,hs(this,Ho(e,r=>r!==void 0))}},qn=class extends Sl{constructor(e){super(e.definition),this.idx=1,hs(this,Ho(e,r=>r!==void 0))}},Wn=class extends Sl{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,hs(this,Ho(e,r=>r!==void 0))}},Dr=class{constructor(e){this.idx=1,hs(this,Ho(e,r=>r!==void 0))}accept(e){e.visit(this)}}});var co,rTe=$(()=>{b();r8();co=class{visit(e){let r=e;switch(r.constructor){case kn:return this.visitNonTerminal(r);case ei:return this.visitAlternative(r);case Tn:return this.visitOption(r);case ti:return this.visitRepetitionMandatory(r);case ri:return this.visitRepetitionMandatoryWithSeparator(r);case qn:return this.visitRepetitionWithSeparator(r);case $r:return this.visitRepetition(r);case Wn:return this.visitAlternation(r);case Dr:return this.visitTerminal(r);case lo:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function Nq(t){return t instanceof ei||t instanceof Tn||t instanceof $r||t instanceof ti||t instanceof ri||t instanceof qn||t instanceof Dr||t instanceof lo}function dm(t,e=[]){return t instanceof Tn||t instanceof $r||t instanceof qn?!0:t instanceof Wn?o3(t.definition,n=>dm(n,e)):t instanceof kn&&ki(e,t)?!1:t instanceof Sl?(t instanceof kn&&e.push(t),Rs(t.definition,n=>dm(n,e))):!1}function Pq(t){return t instanceof Wn}function Yo(t){if(t instanceof kn)return"SUBRULE";if(t instanceof Tn)return"OPTION";if(t instanceof Wn)return"OR";if(t instanceof ti)return"AT_LEAST_ONE";if(t instanceof ri)return"AT_LEAST_ONE_SEP";if(t instanceof qn)return"MANY_SEP";if(t instanceof $r)return"MANY";if(t instanceof Dr)return"CONSUME";throw Error("non exhaustive match")}var nTe=$(()=>{b();Xt();r8()});var uo=$(()=>{b();r8();rTe();nTe()});function iTe(t,e,r){return[new Tn({definition:[new Dr({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var od,n8=$(()=>{b();Xt();uo();od=class{walk(e,r=[]){De(e.definition,(n,i)=>{let a=ta(e.definition,i+1);if(n instanceof kn)this.walkProdRef(n,a,r);else if(n instanceof Dr)this.walkTerminal(n,a,r);else if(n instanceof ei)this.walkFlat(n,a,r);else if(n instanceof Tn)this.walkOption(n,a,r);else if(n instanceof ti)this.walkAtLeastOne(n,a,r);else if(n instanceof ri)this.walkAtLeastOneSep(n,a,r);else if(n instanceof qn)this.walkManySep(n,a,r);else if(n instanceof $r)this.walkMany(n,a,r);else if(n instanceof Wn)this.walkOr(n,a,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Tn({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=iTe(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Tn({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=iTe(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);De(e.definition,a=>{let s=new ei({definition:[a]});this.walk(s,i)})}}});function pm(t){if(t instanceof kn)return pm(t.referencedRule);if(t instanceof Dr)return Mbt(t);if(Nq(t))return Abt(t);if(Pq(t))return Lbt(t);throw Error("non exhaustive match")}function Abt(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=dm(a),e=e.concat(pm(a)),n=n+1,i=r.length>n;return Dy(e)}function Lbt(t){let e=ut(t.definition,r=>pm(r));return Dy(an(e))}function Mbt(t){return[t.terminalType]}var Fq=$(()=>{b();Xt();uo()});var i8,Bq=$(()=>{b();i8="_~IN~_"});function aTe(t){let e={};return De(t,r=>{let n=new zq(r).startWalking();hs(e,n)}),e}function Dbt(t,e){return t.name+e+i8}var zq,sTe=$(()=>{b();n8();Fq();Xt();Bq();uo();zq=class extends od{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=Dbt(e.referencedRule,e.idx)+this.topProd.name,a=r.concat(n),s=new ei({definition:a}),o=pm(s);this.follows[i]=o}}});function Jy(t){let e=t.toString();if(a8.hasOwnProperty(e))return a8[e];{let r=Obt.pattern(e);return a8[e]=r,r}}function oTe(){a8={}}var a8,Obt,s8=$(()=>{b();N3();a8={},Obt=new cm});function uTe(t,e=!1){try{let r=Jy(t);return $q(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===cTe)e&&z3(`${U3} Unable to optimize: < ${t.toString()} > Complement Sets cannot be automatically optimized. This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=` This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Ky(`${U3} Failed parsing: < ${t.toString()} > Using the @chevrotain/regexp-to-ast library Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function $q(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i{if(typeof l=="number")o8(l,e,r);else{let u=l;if(r===!0)for(let h=u.from;h<=u.to;h++)o8(h,e,r);else{for(let h=u.from;h<=u.to&&h=eb){let h=u.from>=eb?u.from:eb,f=u.to,d=Dh(h),p=Dh(f);for(let g=d;g<=p;g++)e[g]=g}}}});break;case"Group":$q(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let o=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&Vq(s)===!1||s.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return Lr(e)}function o8(t,e,r){let n=Dh(t);e[n]=n,r===!0&&Rbt(t,e)}function Rbt(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=Dh(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=Dh(i.charCodeAt(0));e[a]=a}}}function lTe(t,e){return io(t.value,r=>{if(typeof r=="number")return ki(e,r);{let n=r;return io(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function Vq(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?Bt(t.value)?Rs(t.value,Vq):Vq(t.value):!1}function l8(t,e){if(e instanceof RegExp){let r=Jy(e),n=new Uq(t);return n.visit(r),n.found}else return io(e,r=>ki(t,r.charCodeAt(0)))!==void 0}var cTe,U3,Uq,hTe=$(()=>{b();N3();Xt();Zy();s8();Hq();cTe="Complement Sets are not supported for first char optimization",U3=`Unable to use "first char" lexer optimizations: `;Uq=class extends Mh{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){ki(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?lTe(e,this.targetCharCodes)===void 0&&(this.found=!0):lTe(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}});function pTe(t,e){e=Lp(e,{useSticky:Wq,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` `],tracer:(w,k)=>k()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{Zbt()});let n;r("Reject Lexer.NA",()=>{n=Dp(t,w=>w[gm]===Gi.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=ut(n,w=>{let k=w[gm];if(lc(k)){let E=k.source;return E.length===1&&E!=="^"&&E!=="$"&&E!=="."&&!k.ignoreCase?E:E.length===2&&E[0]==="\\"&&!ki(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],E[1])?E[1]:e.useSticky?dTe(k):fTe(k)}else{if(da(k))return i=!0,{exec:k};if(typeof k=="object")return i=!0,k;if(typeof k=="string"){if(k.length===1)return k;{let E=k.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),T=new RegExp(E);return e.useSticky?dTe(T):fTe(T)}}else throw Error("non exhaustive match")}})});let s,o,l,u,h;r("misc mapping",()=>{s=ut(n,w=>w.tokenTypeIdx),o=ut(n,w=>{let k=w.GROUP;if(k!==Gi.SKIPPED){if(ra(k))return k;if(kr(k))return!1;throw Error("non exhaustive match")}}),l=ut(n,w=>{let k=w.LONGER_ALT;if(k)return Bt(k)?ut(k,T=>WA(n,T)):[WA(n,k)]}),u=ut(n,w=>w.PUSH_MODE),h=ut(n,w=>zt(w,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let w=kTe(e.lineTerminatorCharacters);f=ut(n,k=>!1),e.positionTracking!=="onlyOffset"&&(f=ut(n,k=>zt(k,"LINE_BREAKS")?!!k.LINE_BREAKS:wTe(k,w)===!1&&l8(w,k.PATTERN)))});let d,p,g,m;r("Misc Mapping #2",()=>{d=ut(n,bTe),p=ut(a,Xbt),g=on(n,(w,k)=>{let E=k.GROUP;return ra(E)&&E!==Gi.SKIPPED&&(w[E]=[]),w},{}),m=ut(a,(w,k)=>({pattern:a[k],longerAlt:l[k],canLineTerminator:f[k],isCustom:d[k],short:p[k],group:o[k],push:u[k],pop:h[k],tokenTypeIdx:s[k],tokenType:n[k]}))});let v=!0,y=[];return e.safeMode||r("First Char Optimization",()=>{y=on(n,(w,k,E)=>{if(typeof k.PATTERN=="string"){let T=k.PATTERN.charCodeAt(0),S=Dh(T);qq(w,S,m[E])}else if(Bt(k.START_CHARS_HINT)){let T;De(k.START_CHARS_HINT,S=>{let L=typeof S=="string"?S.charCodeAt(0):S,_=Dh(L);T!==_&&(T=_,qq(w,_,m[E]))})}else if(lc(k.PATTERN))if(k.PATTERN.unicode)v=!1,e.ensureOptimizations&&Ky(`${U3} Unable to analyze < ${k.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let T=uTe(k.PATTERN,e.ensureOptimizations);br(T)&&(v=!1),De(T,S=>{qq(w,S,m[E])})}else e.ensureOptimizations&&Ky(`${U3} TokenType: <${k.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),v=!1;return w},[])}),{emptyGroups:g,patternIdxToConfig:m,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:v}}function gTe(t,e){let r=[],n=Nbt(t);r=r.concat(n.errors);let i=Pbt(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(Ibt(a)),r=r.concat(qbt(a)),r=r.concat(Wbt(a,e)),r=r.concat(Gbt(a)),r}function Ibt(t){let e=[],r=sn(t,n=>lc(n[gm]));return e=e.concat(Bbt(r)),e=e.concat(Vbt(r)),e=e.concat(Ubt(r)),e=e.concat(Hbt(r)),e=e.concat(zbt(r)),e}function Nbt(t){let e=sn(t,i=>!zt(i,gm)),r=ut(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Ti.MISSING_PATTERN,tokenTypes:[i]})),n=Mp(t,e);return{errors:r,valid:n}}function Pbt(t){let e=sn(t,i=>{let a=i[gm];return!lc(a)&&!da(a)&&!zt(a,"exec")&&!ra(a)}),r=ut(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Ti.INVALID_PATTERN,tokenTypes:[i]})),n=Mp(t,e);return{errors:r,valid:n}}function Bbt(t){class e extends Mh{constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=sn(t,i=>{let a=i.PATTERN;try{let s=Jy(a),o=new e;return o.visit(s),o.found}catch{return Fbt.test(a.source)}});return ut(r,i=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ti.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function zbt(t){let e=sn(t,n=>n.PATTERN.test(""));return ut(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Ti.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function Vbt(t){class e extends Mh{constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=sn(t,i=>{let a=i.PATTERN;try{let s=Jy(a),o=new e;return o.visit(s),o.found}catch{return $bt.test(a.source)}});return ut(r,i=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ti.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Ubt(t){let e=sn(t,n=>{let i=n[gm];return i instanceof RegExp&&(i.multiline||i.global)});return ut(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ti.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function Hbt(t){let e=[],r=ut(t,a=>on(t,(s,o)=>(a.PATTERN.source===o.PATTERN.source&&!ki(e,o)&&o.PATTERN!==Gi.NA&&(e.push(o),s.push(o)),s),[]));r=xh(r);let n=sn(r,a=>a.length>1);return ut(n,a=>{let s=ut(a,l=>l.name);return{message:`The same RegExp pattern ->${Ga(a).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Ti.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function qbt(t){let e=sn(t,n=>{if(!zt(n,"GROUP"))return!1;let i=n.GROUP;return i!==Gi.SKIPPED&&i!==Gi.NA&&!ra(i)});return ut(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ti.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function Wbt(t,e){let r=sn(t,i=>i.PUSH_MODE!==void 0&&!ki(e,i.PUSH_MODE));return ut(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Ti.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function Gbt(t){let e=[],r=on(t,(n,i,a)=>{let s=i.PATTERN;return s===Gi.NA||(ra(s)?n.push({str:s,idx:a,tokenType:i}):lc(s)&&jbt(s)&&n.push({str:s.source,idx:a,tokenType:i})),n},[]);return De(t,(n,i)=>{De(r,({str:a,idx:s,tokenType:o})=>{if(i${o.name}<- can never be matched. Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:Ti.UNREACHABLE_PATTERN,tokenTypes:[n,o]})}})}),e}function Ybt(t,e){if(lc(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(da(e))return e(t,0,[],{});if(zt(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function jbt(t){return io([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function fTe(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function dTe(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function mTe(t,e,r){let n=[];return zt(t,tb)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+tb+`> property in its definition `,type:Ti.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),zt(t,c8)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+c8+`> property in its definition `,type:Ti.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),zt(t,c8)&&zt(t,tb)&&!zt(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${tb}: <${t.defaultMode}>which does not exist `,type:Ti.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),zt(t,c8)&&De(t.modes,(i,a)=>{De(i,(s,o)=>{if(kr(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${o}> `,type:Ti.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(zt(s,"LONGER_ALT")){let l=Bt(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];De(l,u=>{!kr(u)&&!ki(i,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${s.name}> outside of mode <${a}> `,type:Ti.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function vTe(t,e,r){let n=[],i=!1,a=xh(an(Lr(t.modes))),s=Dp(a,l=>l[gm]===Gi.NA),o=kTe(r);return e&&De(s,l=>{let u=wTe(l,o);if(u!==!1){let f={message:Kbt(l,u),type:u.issue,tokenType:l};n.push(f)}else zt(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(i=!0):l8(o,l.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. This Lexer has been defined to track line and column information, But none of the Token Types can be identified as matching a line terminator. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS for details.`,type:Ti.NO_LINE_BREAKS_FLAGS}),n}function yTe(t){let e={},r=Qr(t);return De(r,n=>{let i=t[n];if(Bt(i))e[n]=[];else throw Error("non exhaustive match")}),e}function bTe(t){let e=t.PATTERN;if(lc(e))return!1;if(da(e))return!0;if(zt(e,"exec"))return!0;if(ra(e))return!1;throw Error("non exhaustive match")}function Xbt(t){return ra(t)&&t.length===1?t.charCodeAt(0):!1}function wTe(t,e){if(zt(t,"LINE_BREAKS"))return!1;if(lc(t.PATTERN)){try{l8(e,t.PATTERN)}catch(r){return{issue:Ti.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(ra(t.PATTERN))return!1;if(bTe(t))return{issue:Ti.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function Kbt(t,e){if(e.issue===Ti.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. The problem is in the <${t.name}> Token Type Root cause: ${e.errMsg}. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Ti.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${t.name}> Token Type For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function kTe(t){return ut(t,r=>ra(r)?r.charCodeAt(0):r)}function qq(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Dh(t){return t255?255+~~(t/255):t}}var gm,tb,c8,Wq,Fbt,$bt,xTe,eb,u8,Hq=$(()=>{b();N3();H3();Xt();Zy();hTe();s8();gm="PATTERN",tb="defaultMode",c8="modes",Wq=typeof new RegExp("(?:)").sticky=="boolean";Fbt=/[^\\][$]/;$bt=/[^\\[][\^]|^\^/;xTe={test:function(t){let e=t.length;for(let r=this.lastIndex;r{r.isParent=r.categoryMatches.length>0})}function Qbt(t){let e=wn(t),r=t,n=!0;for(;n;){r=xh(an(ut(r,a=>a.CATEGORIES)));let i=Mp(r,e);e=e.concat(i),br(i)?n=!1:r=i}return e}function Jbt(t){De(t,e=>{Gq(e)||(STe[TTe]=e,e.tokenTypeIdx=TTe++),ETe(e)&&!Bt(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ETe(e)||(e.CATEGORIES=[]),r2t(e)||(e.categoryMatches=[]),n2t(e)||(e.categoryMatchesMap={})})}function e2t(t){De(t,e=>{e.categoryMatches=[],De(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(STe[n].tokenTypeIdx)})})}function t2t(t){De(t,e=>{CTe([],e)})}function CTe(t,e){De(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),De(e.CATEGORIES,r=>{let n=t.concat(e);ki(n,r)||CTe(n,r)})}function Gq(t){return zt(t,"tokenTypeIdx")}function ETe(t){return zt(t,"CATEGORIES")}function r2t(t){return zt(t,"categoryMatches")}function n2t(t){return zt(t,"categoryMatchesMap")}function _Te(t){return zt(t,"tokenTypeIdx")}var TTe,STe,mm=$(()=>{b();Xt();TTe=1,STe={}});var Yq,jq=$(()=>{b();Yq={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}});var Ti,q3,Gi,H3=$(()=>{b();Hq();Xt();Zy();mm();jq();s8();(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Ti||(Ti={}));q3={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Yq,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(q3);Gi=class{constructor(e,r=q3){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);let{time:o,value:l}=$3(a),u=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return a()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. a boolean 2nd argument is no longer supported`);this.config=hs({},q3,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===q3.lineTerminatorsPattern)this.config.lineTerminatorsPattern=xTe;else if(this.config.lineTerminatorCharacters===q3.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Bt(e)?i={modes:{defaultMode:wn(e)},defaultMode:tb}:(a=!1,i=wn(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(mTe(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(vTe(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},De(i.modes,(o,l)=>{i.modes[l]=Dp(o,u=>kr(u))});let s=Qr(i.modes);if(De(i.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(gTe(o,s))}),br(this.lexerDefinitionErrors)){cd(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=pTe(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=hs({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=i.defaultMode,!br(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let l=ut(this.lexerDefinitionErrors,u=>u.message).join(`----------------------- `);throw new Error(`Errors detected in definition of Lexer: `+l)}De(this.lexerDefinitionWarning,o=>{z3(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Wq?(this.chopInput=Wa,this.match=this.matchWithTest):(this.updateLastIndex=Fi,this.match=this.matchWithExec),a&&(this.handleModes=Fi),this.trackStartLines===!1&&(this.computeNewColumn=Wa),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Fi),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let o=on(this.canModeBeOptimized,(l,u,h)=>(u===!1&&l.push(h),l),[]);if(r.ensureOptimizations&&!br(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{oTe()}),this.TRACE_INIT("toFastProperties",()=>{V3(this)})})}tokenize(e,r=this.defaultMode){if(!br(this.lexerDefinitionErrors)){let i=ut(this.lexerDefinitionErrors,a=>a.message).join(`----------------------- `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: `+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,a,s,o,l,u,h,f,d,p,g,m,v,y,w,k=e,E=k.length,T=0,S=0,L=this.hasCustom?0:Math.floor(e.length/10),_=new Array(L),M=[],I=this.trackStartLines?1:void 0,O=this.trackStartLines?1:void 0,C=yTe(this.emptyGroups),R=this.trackStartLines,D=this.config.lineTerminatorsPattern,P=0,A=[],N=[],F=[],B=[];Object.freeze(B);let V;function z(){return A}function H(ee){let Q=Dh(ee),G=N[Q];return G===void 0?B:G}let K=ee=>{if(F.length===1&&ee.tokenType.PUSH_MODE===void 0){let Q=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(ee);M.push({offset:ee.startOffset,line:ee.startLine,column:ee.startColumn,length:ee.image.length,message:Q})}else{F.pop();let Q=fs(F);A=this.patternIdxToConfig[Q],N=this.charCodeToPatternIdxToConfig[Q],P=A.length;let G=this.canModeBeOptimized[Q]&&this.config.safeMode===!1;N&&G?V=H:V=z}};function X(ee){F.push(ee),N=this.charCodeToPatternIdxToConfig[ee],A=this.patternIdxToConfig[ee],P=A.length,P=A.length;let Q=this.canModeBeOptimized[ee]&&this.config.safeMode===!1;N&&Q?V=H:V=z}X.call(this,r);let ne,j=this.config.recoveryEnabled;for(;Tl.length){l=s,u=h,ne=de;break}}}break}}if(l!==null){if(f=l.length,d=ne.group,d!==void 0&&(p=ne.tokenTypeIdx,g=this.createTokenInstance(l,T,p,ne.tokenType,I,O,f),this.handlePayload(g,u),d===!1?S=this.addToken(_,S,g):C[d].push(g)),e=this.chopInput(e,f),T=T+f,O=this.computeNewColumn(O,f),R===!0&&ne.canLineTerminator===!0){let Z=0,te,oe;D.lastIndex=0;do te=D.test(l),te===!0&&(oe=D.lastIndex-1,Z++);while(te===!0);Z!==0&&(I=I+Z,O=f-oe,this.updateTokenEndLineColumnLocation(g,d,oe,Z,I,O,f))}this.handleModes(ne,K,X,g)}else{let Z=T,te=I,oe=O,de=j===!1;for(;de===!1&&T{b();Xt();H3();mm();i2t="parent",ATe="categories",LTe="label",MTe="group",DTe="push_mode",OTe="pop_mode",RTe="longer_alt",ITe="line_breaks",NTe="start_chars_hint";Cl=h8({name:"EOF",pattern:Gi.NA});cd([Cl])});var hd,PTe,yu,nb=$(()=>{b();ym();Xt();uo();hd={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${Xq(t)?`--> ${ud(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let a="Expecting: ",o=` but found: '`+Ga(e).image+"'";if(n)return a+n+o;{let l=on(t,(d,p)=>d.concat(p),[]),u=ut(l,d=>`[${ut(d,p=>ud(p)).join(", ")}]`),f=`one of these possible Token sequences: ${ut(u,(d,p)=>` ${p+1}. ${d}`).join(` `)}`;return a+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",s=` but found: '`+Ga(e).image+"'";if(r)return i+r+s;{let l=`expecting at least one iteration which starts with one of these possible Token sequences:: <${ut(t,u=>`[${ut(u,h=>ud(h)).join(",")}]`).join(" ,")}>`;return i+l+s}}};Object.freeze(hd);PTe={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- inside top level rule: ->`+t.name+"<-"}},yu={buildDuplicateFoundError(t,e){function r(h){return h instanceof Dr?h.terminalType.name:h instanceof kn?h.nonTerminalName:""}let n=t.name,i=Ga(e),a=i.idx,s=Yo(i),o=r(i),l=a>0,u=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} appears more than once (${e.length} times) in the top level rule: ->${n}<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,` `),u},buildNamespaceConflictError(t){return`Namespace conflict found in grammar. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>. To resolve this make sure each Terminal and Non-Terminal names are unique This is easy to accomplish by using the convention that Terminal names start with an uppercase letter and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){let e=ut(t.prefixPath,i=>ud(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix in inside <${t.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX For Further details.`},buildAlternationAmbiguityError(t){let e=ut(t.prefixPath,i=>ud(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,n},buildEmptyRepetitionError(t){let e=Yo(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: inside <${t.topLevelRule.name}> Rule. has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=ut(t.leftRecursionPath,a=>a.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. rule: <${e}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: ${n} To fix this refactor your grammar to remove the left recursion. see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof lo?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function FTe(t,e){let r=new Kq(t,e);return r.resolveRefs(),r.errors}var Kq,BTe=$(()=>{b();jo();Xt();uo();Kq=class extends co{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){De(Lr(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Sa.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}});function g8(t,e,r=[]){r=wn(r);let n=[],i=0;function a(o){return o.concat(ta(t,i+1))}function s(o){let l=g8(a(o),e,r);return n.concat(l)}for(;r.length{br(l.definition)===!1&&(n=s(l.definition))}),n;if(o instanceof Dr)r.push(o.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:ta(t,i)}),n}function m8(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,u=l-n-1,h=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!br(f);){let d=f.pop();if(d===s){o&&fs(f).idx<=u&&f.pop();continue}let p=d.def,g=d.idx,m=d.ruleStack,v=d.occurrenceStack;if(br(p))continue;let y=p[0];if(y===i){let w={idx:g,def:ta(p),ruleStack:Kf(m),occurrenceStack:Kf(v)};f.push(w)}else if(y instanceof Dr)if(g=0;w--){let k=y.definition[w],E={idx:g,def:k.definition.concat(ta(p)),ruleStack:m,occurrenceStack:v};f.push(E),f.push(s)}else if(y instanceof ei)f.push({idx:g,def:y.definition.concat(ta(p)),ruleStack:m,occurrenceStack:v});else if(y instanceof lo)f.push(s2t(y,g,m,v));else throw Error("non exhaustive match")}return h}function s2t(t,e,r,n){let i=wn(r);i.push(t.name);let a=wn(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}var Zq,f8,ib,d8,G3,p8,Y3,j3=$(()=>{b();Xt();Fq();n8();uo();Zq=class extends od{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=wn(this.path.ruleStack).reverse(),this.occurrenceStack=wn(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){br(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},f8=class extends Zq{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),a=new ei({definition:i});this.possibleTokTypes=pm(a),this.found=!0}}},ib=class extends od{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},d8=class extends ib{walkMany(e,r,n){if(e.idx===this.occurrence){let i=Ga(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Dr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},G3=class extends ib{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=Ga(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Dr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},p8=class extends ib{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=Ga(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Dr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},Y3=class extends ib{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=Ga(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Dr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}}});function X3(t){if(t instanceof Tn||t==="Option")return Ei.OPTION;if(t instanceof $r||t==="Repetition")return Ei.REPETITION;if(t instanceof ti||t==="RepetitionMandatory")return Ei.REPETITION_MANDATORY;if(t instanceof ri||t==="RepetitionMandatoryWithSeparator")return Ei.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof qn||t==="RepetitionWithSeparator")return Ei.REPETITION_WITH_SEPARATOR;if(t instanceof Wn||t==="Alternation")return Ei.ALTERNATION;throw Error("non exhaustive match")}function y8(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=X3(n);return a===Ei.ALTERNATION?ab(e,r,i):sb(e,r,a,i)}function $Te(t,e,r,n,i,a){let s=ab(t,e,r),o=GTe(s)?rb:ld;return a(s,n,o,i)}function VTe(t,e,r,n,i,a){let s=sb(t,e,i,r),o=GTe(s)?rb:ld;return a(s[0],o,n)}function UTe(t,e,r,n){let i=t.length,a=Rs(t,s=>Rs(s,o=>o.length===1));if(e)return function(s){let o=ut(s,l=>l.GATE);for(let l=0;lan(l)),o=on(s,(l,u,h)=>(De(u,f=>{zt(l,f.tokenTypeIdx)||(l[f.tokenTypeIdx]=h),De(f.categoryMatches,d=>{zt(l,d)||(l[d]=h)})}),l),{});return function(){let l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let s=0;sa.length===1),i=t.length;if(n&&!r){let a=an(t);if(a.length===1&&br(a[0].categoryMatches)){let o=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{let s=on(a,(o,l,u)=>(o[l.tokenTypeIdx]=!0,De(l.categoryMatches,h=>{o[h]=!0}),o),[]);return function(){let o=this.LA(1);return s[o.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;ag8([s],1)),n=zTe(r.length),i=ut(r,s=>{let o={};return De(s,l=>{let u=Qq(l.partialPath);De(u,h=>{o[h]=!0})}),o}),a=r;for(let s=1;s<=e;s++){let o=a;a=zTe(o.length);for(let l=0;l{let y=Qq(v.partialPath);De(y,w=>{i[l][w]=!0})})}}}}return n}function ab(t,e,r,n){let i=new v8(t,Ei.ALTERNATION,n);return e.accept(i),qTe(i.result,r)}function sb(t,e,r,n){let i=new v8(t,r);e.accept(i);let a=i.result,o=new Jq(e,t,r).startWalking(),l=new ei({definition:a}),u=new ei({definition:o});return qTe([l,u],n)}function b8(t,e){e:for(let r=0;r{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function GTe(t){return Rs(t,e=>Rs(e,r=>Rs(r,n=>br(n.categoryMatches))))}var Ei,Jq,v8,ob=$(()=>{b();Xt();j3();n8();mm();uo();(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(Ei||(Ei={}));Jq=class extends od{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Ei.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Ei.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Ei.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Ei.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Ei.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},v8=class extends co{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Ei.OPTION)}visitRepetition(e){this.checkIsTarget(e,Ei.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Ei.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Ei.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Ei.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Ei.ALTERNATION)}}});function YTe(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return ut(e,r=>Object.assign({type:Sa.CUSTOM_LOOKAHEAD_VALIDATION},r))}function jTe(t,e,r,n){let i=ds(t,l=>l2t(l,r)),a=p2t(t,e,r),s=ds(t,l=>h2t(l,r)),o=ds(t,l=>u2t(l,t,n,r));return i.concat(a,s,o)}function l2t(t,e){let r=new eW;t.accept(r);let n=r.allProductions,i=KV(n,c2t),a=Ho(i,o=>o.length>1);return ut(Lr(a),o=>{let l=Ga(o),u=e.buildDuplicateFoundError(t,o),h=Yo(l),f={message:u,type:Sa.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:h,occurrence:l.idx},d=XTe(l);return d&&(f.parameter=d),f})}function c2t(t){return`${Yo(t)}_#_${t.idx}_#_${XTe(t)}`}function XTe(t){return t instanceof Dr?t.terminalType.name:t instanceof kn?t.nonTerminalName:""}function u2t(t,e,r,n){let i=[];if(on(e,(s,o)=>o.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:Sa.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function KTe(t,e,r){let n=[],i;return ki(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Sa.INVALID_RULE_OVERRIDE,ruleName:t})),n}function rW(t,e,r,n=[]){let i=[],a=x8(e.definition);if(br(a))return[];{let s=t.name;ki(a,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Sa.LEFT_RECURSION,ruleName:s});let l=Mp(a,n.concat([t])),u=ds(l,h=>{let f=wn(n);return f.push(h),rW(t,h,r,f)});return i.concat(u)}}function x8(t){let e=[];if(br(t))return e;let r=Ga(t);if(r instanceof kn)e.push(r.referencedRule);else if(r instanceof ei||r instanceof Tn||r instanceof ti||r instanceof ri||r instanceof qn||r instanceof $r)e=e.concat(x8(r.definition));else if(r instanceof Wn)e=an(ut(r.definition,a=>x8(a.definition)));else if(!(r instanceof Dr))throw Error("non exhaustive match");let n=dm(r),i=t.length>1;if(n&&i){let a=ta(t);return e.concat(x8(a))}else return e}function ZTe(t,e){let r=new K3;t.accept(r);let n=r.alternations;return ds(n,a=>{let s=Kf(a.definition);return ds(s,(o,l)=>{let u=m8([o],[],ld,1);return br(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:a,emptyChoiceIdx:l}),type:Sa.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:a.idx,alternative:l+1}]:[]})})}function QTe(t,e,r){let n=new K3;t.accept(n);let i=n.alternations;return i=Dp(i,s=>s.ignoreAmbiguities===!0),ds(i,s=>{let o=s.idx,l=s.maxLookahead||e,u=ab(o,t,l,s),h=f2t(u,s,t,r),f=d2t(u,s,t,r);return h.concat(f)})}function h2t(t,e){let r=new K3;t.accept(r);let n=r.alternations;return ds(n,a=>a.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:a}),type:Sa.TOO_MANY_ALTS,ruleName:t.name,occurrence:a.idx}]:[])}function JTe(t,e,r){let n=[];return De(t,i=>{let a=new tW;i.accept(a);let s=a.allProductions;De(s,o=>{let l=X3(o),u=o.maxLookahead||e,h=o.idx,d=sb(h,i,l,u)[0];if(br(an(d))){let p=r.buildEmptyRepetitionError({topLevelRule:i,repetition:o});n.push({message:p,type:Sa.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function f2t(t,e,r,n){let i=[],a=on(t,(o,l,u)=>(e.definition[u].ignoreAmbiguities===!0||De(l,h=>{let f=[u];De(t,(d,p)=>{u!==p&&b8(d,h)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!b8(i,h)&&(i.push(h),o.push({alts:f,path:h}))}),o),[]);return ut(a,o=>{let l=ut(o.alts,h=>h+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:o.path}),type:Sa.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:o.alts}})}function d2t(t,e,r,n){let i=on(t,(s,o,l)=>{let u=ut(o,h=>({idx:l,path:h}));return s.concat(u)},[]);return xh(ds(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let l=s.idx,u=s.path,h=sn(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx{let p=[d.idx+1,l+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:Sa.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:p}})}))}function p2t(t,e,r){let n=[],i=ut(e,a=>a.name);return De(t,a=>{let s=a.name;if(ki(i,s)){let o=r.buildNamespaceConflictError(a);n.push({message:o,type:Sa.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}var eW,K3,tW,Z3=$(()=>{b();Xt();jo();uo();ob();j3();mm();eW=class extends co{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};K3=class extends co{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};tW=class extends co{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}});function eEe(t){let e=Lp(t,{errMsgProvider:PTe}),r={};return De(t.rules,n=>{r[n.name]=n}),FTe(r,e.errMsgProvider)}function tEe(t){return t=Lp(t,{errMsgProvider:yu}),jTe(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var rEe=$(()=>{b();Xt();BTe();Z3();nb()});function Hp(t){return ki(oEe,t.name)}var nEe,iEe,aEe,sEe,oEe,lb,bm,Q3,J3,e5,cb=$(()=>{b();Xt();nEe="MismatchedTokenException",iEe="NoViableAltException",aEe="EarlyExitException",sEe="NotAllInputParsedException",oEe=[nEe,iEe,aEe,sEe];Object.freeze(oEe);lb=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},bm=class extends lb{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=nEe}},Q3=class extends lb{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=iEe}},J3=class extends lb{constructor(e,r){super(e,r),this.name=sEe}},e5=class extends lb{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=aEe}}});function g2t(t,e,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o];if(l===void 0){let d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];l=new a(p,i).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,h=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Cl,h=1),!(u===void 0||h===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,h,s)&&this.tryInRepetitionRecovery(t,e,r,u)}var nW,aW,iW,w8,sW=$(()=>{b();ym();Xt();cb();Bq();jo();nW={},aW="InRuleRecoveryException",iW=class extends Error{constructor(e){super(e),this.name=aW}},w8=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=zt(e,"recoveryEnabled")?e.recoveryEnabled:ho.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=g2t)}getTokenToInsert(e){let r=vm(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let a=this.findReSyncTokenType(),s=this.exportLexerState(),o=[],l=!1,u=this.LA(1),h=this.LA(1),f=()=>{let d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),g=new bm(p,u,this.LA(0));g.resyncedTokens=Kf(o),this.SAVE_ERROR(g)};for(;!l;)if(this.tokenMatcher(h,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(h,a)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,o));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new iW("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||br(r))return!1;let n=this.LA(1);return io(r,a=>this.tokenMatcher(n,a))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return ki(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=io(e,a=>W3(r,a));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return nW;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return ut(e,(n,i)=>i===0?nW:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=ut(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return an(e)}getFollowSetFromFollowKey(e){if(e===nW)return[Cl];let r=e.ruleName+e.idxInCallingRule+i8+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,Cl)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return Kf(r)}attemptInRepetitionRecovery(e,r,n,i,a,s,o){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=wn(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return ut(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}});function k8(t,e,r){return r|e|t}var T8=$(()=>{b()});var fd,oW=$(()=>{b();Xt();nb();jo();Z3();ob();fd=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:ho.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(br(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...a]}return r}validateNoLeftRecursion(e){return ds(e,r=>rW(r,r,yu))}validateEmptyOrAlternatives(e){return ds(e,r=>ZTe(r,yu))}validateAmbiguousAlternationAlternatives(e,r){return ds(e,n=>QTe(n,r,yu))}validateSomeNonEmptyLookaheadPath(e,r){return JTe(e,r,yu)}buildLookaheadForAlternation(e){return $Te(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,UTe)}buildLookaheadForOptional(e){return VTe(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,X3(e.prodType),HTe)}}});function m2t(t){E8.reset(),t.accept(E8);let e=E8.dslMethods;return E8.reset(),e}var S8,lW,E8,lEe=$(()=>{b();Xt();jo();T8();uo();oW();S8=class{initLooksAhead(e){this.dynamicTokensEnabled=zt(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:ho.dynamicTokensEnabled,this.maxLookahead=zt(e,"maxLookahead")?e.maxLookahead:ho.maxLookahead,this.lookaheadStrategy=zt(e,"lookaheadStrategy")?e.lookaheadStrategy:new fd({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){De(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=m2t(r);De(n,u=>{let h=u.idx===0?"":u.idx;this.TRACE_INIT(`${Yo(u)}${h}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=k8(this.fullRuleNameToShort[r.name],256,u.idx);this.setLaFuncCache(d,f)})}),De(i,u=>{this.computeLookaheadFunc(r,u.idx,768,"Repetition",u.maxLookahead,Yo(u))}),De(a,u=>{this.computeLookaheadFunc(r,u.idx,512,"Option",u.maxLookahead,Yo(u))}),De(s,u=>{this.computeLookaheadFunc(r,u.idx,1024,"RepetitionMandatory",u.maxLookahead,Yo(u))}),De(o,u=>{this.computeLookaheadFunc(r,u.idx,1536,"RepetitionMandatoryWithSeparator",u.maxLookahead,Yo(u))}),De(l,u=>{this.computeLookaheadFunc(r,u.idx,1280,"RepetitionWithSeparator",u.maxLookahead,Yo(u))})})})}computeLookaheadFunc(e,r,n,i,a,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),l=k8(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return k8(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},lW=class extends co{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},E8=new lW});function hW(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{b()});function dW(t,e){Object.defineProperty(t,v2t,{enumerable:!1,configurable:!0,writable:!1,value:e})}var v2t,fEe=$(()=>{b();v2t="name"});function y2t(t,e){let r=Qr(t),n=r.length;for(let i=0;is.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: ${a.join(` `).replace(/\n/g,` `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function pEe(t,e,r){let n=function(){};dW(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return De(e,a=>{i[a]=y2t}),n.prototype=i,n.prototype.constructor=n,n}function b2t(t,e){return x2t(t,e)}function x2t(t,e){let r=sn(e,i=>da(t[i])===!1),n=ut(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:pW.MISSING_METHOD,methodName:i}));return xh(n)}var pW,gEe=$(()=>{b();Xt();fEe();(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(pW||(pW={}))});var L8,mEe=$(()=>{b();hEe();Xt();gEe();jo();L8=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=zt(e,"nodeLocationTracking")?e.nodeLocationTracking:ho.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Fi,this.cstFinallyStateUpdate=Fi,this.cstPostTerminal=Fi,this.cstPostNonTerminal=Fi,this.cstPostRule=Fi;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=fW,this.setNodeLocationFromNode=fW,this.cstPostRule=Fi,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Fi,this.setNodeLocationFromNode=Fi,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=hW,this.setNodeLocationFromNode=hW,this.cstPostRule=Fi,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Fi,this.setNodeLocationFromNode=Fi,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Fi,this.setNodeLocationFromNode=Fi,this.cstPostRule=Fi,this.setInitialNodeLocation=Fi;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];cEe(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];uEe(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(kr(this.baseCstVisitorConstructor)){let e=dEe(this.className,Qr(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(kr(this.baseCstVisitorWithDefaultsConstructor)){let e=pEe(this.className,Qr(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}});var M8,vEe=$(()=>{b();jo();M8=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):ub}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?ub:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}});var D8,yEe=$(()=>{b();Xt();cb();jo();nb();Z3();uo();D8=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=hb){if(ki(this.definedRulesNames,e)){let s={message:yu.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Sa.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=hb){let i=KTe(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let a=this.defineRule(e,r,n);return this[e]=a,a}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(Hp(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return t8(Lr(this.gastProductionsCache))}}});var O8,bEe=$(()=>{b();Xt();T8();cb();ob();j3();jo();sW();ym();mm();O8=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=rb,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},zt(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 For Further details.`);if(Bt(e)){if(br(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 For Further details.`)}if(Bt(e))this.tokensMap=on(e,(a,s)=>(a[s.name]=s,a),{});else if(zt(e,"modes")&&Rs(an(Lr(e.modes)),_Te)){let a=an(Lr(e.modes)),s=Dy(a);this.tokensMap=on(s,(o,l)=>(o[l.name]=l,o),{})}else if(Hn(e))this.tokensMap=wn(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Cl;let n=zt(e,"modes")?an(Lr(e.modes)):Lr(e),i=Rs(n,a=>br(a.categoryMatches));this.tokenMatcher=i?rb:ld,cd(Lr(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=zt(n,"resyncEnabled")?n.resyncEnabled:hb.resyncEnabled,a=zt(n,"recoveryValueFunc")?n.recoveryValueFunc:hb.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=function(...h){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,a)}finally{this.ruleFinallyStateUpdate()}}:o=function(...h){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h)}catch(f){return this.invokeRuleCatch(f,i,a)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Hp(e)){let s=e;if(a){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return n(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,s.partialCstResult=l}throw s}}else{if(i)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof e!="function"){a=e.DEF;let s=e.GATE;if(s!==void 0){let o=i;i=()=>s.call(this)&&o.call(this)}}else a=e;if(i.call(this)===!0)return a.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let s=r.GATE;if(s!==void 0){let o=i;i=()=>s.call(this)&&o.call(this)}}else a=r;if(i.call(this)===!0){let s=this.doSingleRepetition(a);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,Ei.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,p8)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let o=()=>this.tokenMatcher(this.LA(1),a);for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,i,Y3],o,1536,e,Y3)}else throw this.raiseEarlyExitException(e,Ei.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let o=r.GATE;if(o!==void 0){let l=i;i=()=>o.call(this)&&l.call(this)}}else a=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,d8,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let o=()=>this.tokenMatcher(this.LA(1),a);for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,i,G3],o,1280,e,G3)}}repetitionSepSecondInternal(e,r,n,i,a){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,a],n,1536,e,a)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=Bt(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new J3(r,e))}}subruleInternal(e,r,n){let i;try{let a=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,a),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(a){throw this.subruleInternalError(a,n,e.ruleName)}}subruleInternalError(e,r,n){throw Hp(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),i=a):this.consumeInternalError(e,a,n)}catch(a){i=this.consumeInternalRecovery(e,r,a)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,a=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new bm(i,r,a))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(a){throw a.name===aW?n:a}}else throw n}saveRecogState(){let e=this.errors,r=wn(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Cl)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var R8,xEe=$(()=>{b();cb();Xt();ob();jo();R8=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=zt(e,"errorMessageProvider")?e.errorMessageProvider:ho.errorMessageProvider}SAVE_ERROR(e){if(Hp(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:wn(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return wn(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=sb(e,a,r,this.maxLookahead)[0],l=[];for(let h=1;h<=this.maxLookahead;h++)l.push(this.LA(h));let u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new e5(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=ab(e,i,this.maxLookahead),s=[];for(let u=1;u<=this.maxLookahead;u++)s.push(this.LA(u));let o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:o,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Q3(l,this.LA(1),o))}}});var I8,wEe=$(()=>{b();j3();Xt();I8=class{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(kr(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return m8([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=Ga(e.ruleStack),i=this.getGAstProductions()[r];return new f8(i,e).startWalking()}}});function r5(t,e,r,n=!1){P8(r);let i=fs(this.recordingProdStack),a=da(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),zt(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),F8}function T2t(t,e){P8(e);let r=fs(this.recordingProdStack),n=Bt(t)===!1,i=n===!1?t:t.DEF,a=new Wn({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});zt(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);let s=o3(i,o=>da(o.GATE));return a.hasPredicates=s,r.definition.push(a),De(i,o=>{let l=new ei({definition:[]});a.definition.push(l),zt(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:zt(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),F8}function EEe(t){return t===0?"":`${t}`}function P8(t){if(t<0||t>TEe){let e=new Error(`Invalid DSL Method idx value: <${t}> Idx value must be a none negative value smaller than ${TEe+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var F8,kEe,TEe,SEe,CEe,k2t,N8,_Ee=$(()=>{b();Xt();uo();H3();mm();ym();jo();T8();F8={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(F8);kEe=!0,TEe=Math.pow(2,8)-1,SEe=h8({name:"RECORDING_PHASE_TOKEN",pattern:Gi.NA});cd([SEe]);CEe=vm(SEe,`This IToken indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(CEe);k2t={name:`This CSTNode indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},N8=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return ub}topLevelRuleRecord(e,r){try{let n=new lo({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` This error was thrown during the "grammar recording phase" For more info see: https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return r5.call(this,Tn,e,r)}atLeastOneInternalRecord(e,r){r5.call(this,ti,r,e)}atLeastOneSepFirstInternalRecord(e,r){r5.call(this,ri,r,e,kEe)}manyInternalRecord(e,r){r5.call(this,$r,r,e)}manySepFirstInternalRecord(e,r){r5.call(this,qn,r,e,kEe)}orInternalRecord(e,r){return T2t.call(this,e,r)}subruleInternalRecord(e,r,n){if(P8(r),!e||zt(e,"ruleName")===!1){let o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=fs(this.recordingProdStack),a=e.ruleName,s=new kn({idx:r,nonTerminalName:a,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?k2t:F8}consumeInternalRecord(e,r,n){if(P8(r),!Gq(e)){let s=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=fs(this.recordingProdStack),a=new Dr({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(a),CEe}}});var B8,AEe=$(()=>{b();Xt();Zy();jo();B8=class{initPerformanceTracer(e){if(zt(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=ho.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:i,value:a}=$3(r),s=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,a}else return r()}}});function LEe(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i]})})}var MEe=$(()=>{b()});function z8(t=void 0){return function(){return t}}var ub,ho,hb,Sa,n5,i5,jo=$(()=>{b();Xt();Zy();sTe();ym();nb();rEe();sW();lEe();mEe();vEe();yEe();bEe();xEe();wEe();_Ee();AEe();MEe();Z3();ub=vm(Cl,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(ub);ho=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:hd,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),hb=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Sa||(Sa={}));n5=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{V3(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),De(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=eEe({rules:Lr(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(br(n)&&this.skipValidations===!1){let i=tEe({rules:Lr(this.gastProductionsCache),tokenTypes:Lr(this.tokensMap),errMsgProvider:yu,grammarName:r}),a=YTe({lookaheadStrategy:this.lookaheadStrategy,rules:Lr(this.gastProductionsCache),tokenTypes:Lr(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),br(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=aTe(Lr(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:Lr(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Lr(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!br(this.definitionErrors))throw e=ut(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: ${e.join(` ------------------------------- `)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),zt(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES For further details.`);this.skipValidations=zt(r,"skipValidations")?r.skipValidations:ho.skipValidations}};n5.DEFER_DEFINITION_ERRORS_HANDLING=!1;LEe(n5,[w8,S8,L8,M8,O8,D8,R8,I8,N8,B8]);i5=class extends n5{constructor(e,r=ho){let n=wn(r);n.outputCst=!1,super(e,n)}}});var DEe=$(()=>{b();uo()});var OEe=$(()=>{b()});var REe=$(()=>{b();DEe();OEe()});var IEe=$(()=>{b();Iq()});var xm=$(()=>{b();Iq();jo();H3();ym();ob();oW();nb();cb();jq();uo();uo();REe();IEe()});function wm(t,e,r){return`${t.name}_${e}_${r}`}function BEe(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};M2t(e,t);let r=t.length;for(let n=0;nzEe(t,e,s));return gb(t,e,n,r,...i)}function P2t(t,e,r){let n=Ya(t,e,r,{type:qp});Wp(t,n);let i=gb(t,e,n,r,km(t,e,r));return F2t(t,e,r,i)}function km(t,e,r){let n=sn(ut(r.definition,i=>zEe(t,e,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:z2t(t,n)}function $Ee(t,e,r,n,i){let a=n.left,s=n.right,o=Ya(t,e,r,{type:L2t});Wp(t,o);let l=Ya(t,e,r,{type:FEe});return a.loopback=o,l.loopback=o,t.decisionMap[wm(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,ga(s,o),i===void 0?(ga(o,a),ga(o,l)):(ga(o,l),ga(o,i.left),ga(i.right,a)),{left:a,right:l}}function VEe(t,e,r,n,i){let a=n.left,s=n.right,o=Ya(t,e,r,{type:A2t});Wp(t,o);let l=Ya(t,e,r,{type:FEe}),u=Ya(t,e,r,{type:_2t});return o.loopback=u,l.loopback=u,ga(o,a),ga(o,l),ga(s,u),i!==void 0?(ga(u,l),ga(u,i.left),ga(i.right,a)):ga(u,o),t.decisionMap[wm(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function F2t(t,e,r,n){let i=n.left,a=n.right;return ga(i,a),t.decisionMap[wm(e,"Option",r.idx)]=i,n}function Wp(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function gb(t,e,r,n,...i){let a=Ya(t,e,n,{type:C2t,start:r});r.end=a;for(let o of i)o!==void 0?(ga(r,o.left),ga(o.right,a)):ga(r,a);let s={left:r,right:a};return t.decisionMap[wm(e,B2t(n),n.idx)]=r,s}function B2t(t){if(t instanceof Wn)return"Alternation";if(t instanceof Tn)return"Option";if(t instanceof $r)return"Repetition";if(t instanceof qn)return"RepetitionWithSeparator";if(t instanceof ti)return"RepetitionMandatory";if(t instanceof ri)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function z2t(t,e){let r=e.length;for(let a=0;a{b();Ay();WV();xm();qp=1,S2t=2,NEe=4,PEe=5,pb=7,C2t=8,_2t=9,A2t=10,L2t=11,FEe=12,a5=class{constructor(e){this.target=e}isEpsilon(){return!1}},fb=class extends a5{constructor(e,r){super(e),this.tokenType=r}},s5=class extends a5{constructor(e){super(e)}isEpsilon(){return!0}},db=class extends a5{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}}});function yW(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}var o5,mb,HEe=$(()=>{b();Ay();o5={},mb=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let r=yW(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return ut(this.configs,e=>e.alt)}get key(){let e="";for(let r in this.map)e+=r+":";return e}}});function H2t(t,e){let r={};return n=>{let i=n.toString(),a=r[i];return a!==void 0||(a={atnStartState:t,decision:e,states:{}},r[i]=a),a}}function WEe(t,e=!0){let r=new Set;for(let n of t){let i=new Set;for(let a of n){if(a===void 0){if(e)break;return!1}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let o of s)if(r.has(o)){if(!i.has(o))return!1}else r.add(o),i.add(o)}}return!0}function q2t(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;nud(i)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${X2t(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,n}function X2t(t){if(t instanceof kn)return"SUBRULE";if(t instanceof Tn)return"OPTION";if(t instanceof Wn)return"OR";if(t instanceof ti)return"AT_LEAST_ONE";if(t instanceof ri)return"AT_LEAST_ONE_SEP";if(t instanceof qn)return"MANY_SEP";if(t instanceof $r)return"MANY";if(t instanceof Dr)return"CONSUME";throw Error("non exhaustive match")}function K2t(t,e,r){let n=ds(e.configs.elements,a=>a.state.transitions),i=I4e(n.filter(a=>a instanceof fb).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:t}}function Z2t(t,e){return t.edges[e.tokenTypeIdx]}function Q2t(t,e,r){let n=new mb,i=[];for(let s of t.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===pb){i.push(s);continue}let o=s.state.transitions.length;for(let l=0;l0&&!nxt(a))for(let s of i)a.add(s);return a}function J2t(t,e){if(t instanceof fb&&W3(e,t.tokenType))return t.target}function ext(t,e){let r;for(let n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function YEe(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function GEe(t,e,r,n){return n=jEe(t,n),e.edges[r.tokenTypeIdx]=n,n}function jEe(t,e){if(e===o5)return e;let r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}function txt(t){let e=new mb,r=t.transitions.length;for(let n=0;n0){let i=[...t.stack],s={state:i.pop(),alt:t.alt,stack:i};V8(s,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let i=0;i1)return!0;return!1}function lxt(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var $8,qEe,l5,XEe=$(()=>{b();xm();UEe();HEe();JV();YV();N4e();Ay();fA();VA();GA();nU();$8=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="",r=this.predicates.length;for(let n=0;nconsole.log(n)}initialize(e){this.atn=BEe(e.rules),this.dfas=q2t(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=wm(n,"Alternation",r),h=this.atn.decisionMap[l].decision,f=ut(y8({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),d=>ut(d,p=>p[0]));if(WEe(f,!1)&&!a){let d=on(f,(p,g,m)=>(De(g,v=>{v&&(p[v.tokenTypeIdx]=m,De(v.categoryMatches,y=>{p[y]=m}))}),p),{});return i?function(p){var g;let m=this.LA(1),v=d[m.tokenTypeIdx];if(p!==void 0&&v!==void 0){let y=(g=p[v])===null||g===void 0?void 0:g.GATE;if(y!==void 0&&y.call(this)===!1)return}return v}:function(){let p=this.LA(1);return d[p.tokenTypeIdx]}}else return i?function(d){let p=new $8,g=d===void 0?0:d.length;for(let v=0;vut(d,p=>p[0]));if(WEe(f)&&f[0][0]&&!a){let d=f[0],p=an(d);if(p.length===1&&br(p[0].categoryMatches)){let m=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===m}}else{let g=on(p,(m,v)=>(v!==void 0&&(m[v.tokenTypeIdx]=!0,De(v.categoryMatches,y=>{m[y]=!0})),m),{});return function(){let m=this.LA(1);return g[m.tokenTypeIdx]===!0}}}return function(){let d=bW.call(this,s,h,qEe,o);return typeof d=="object"?!1:d===0}}}});var KEe=$(()=>{b();XEe()});var ZEe,xW,QEe,U8,ln,Vr,H8,JEe,wW,eSe,tSe,rSe,nSe,kW,iSe,aSe,sSe,q8,vb,yb,TW,bb,oSe,EW,SW,CW,_W,AW,lSe,cSe,LW,uSe,MW,c5,hSe,fSe,dSe,pSe,gSe,mSe,vSe,ySe,W8,bSe,xSe,wSe,kSe,TSe,ESe,SSe,CSe,_Se,ASe,LSe,G8,MSe,DSe,OSe,RSe,ISe,NSe,PSe,FSe,BSe,zSe,$Se,VSe,USe,DW,OW,HSe,qSe,WSe,GSe,YSe,jSe,XSe,KSe,ZSe,RW,Xe,IW=$(()=>{"use strict";b();(function(t){function e(r){return typeof r=="string"}t.is=e})(ZEe||(ZEe={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(xW||(xW={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(QEe||(QEe={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(U8||(U8={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=U8.MAX_VALUE),i===Number.MAX_VALUE&&(i=U8.MAX_VALUE),{line:n,character:i}}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Xe.uinteger(i.line)&&Xe.uinteger(i.character)}t.is=r})(ln||(ln={}));(function(t){function e(n,i,a,s){if(Xe.uinteger(n)&&Xe.uinteger(i)&&Xe.uinteger(a)&&Xe.uinteger(s))return{start:ln.create(n,i),end:ln.create(a,s)};if(ln.is(n)&&ln.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${s}]`)}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&ln.is(i.start)&&ln.is(i.end)}t.is=r})(Vr||(Vr={}));(function(t){function e(n,i){return{uri:n,range:i}}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Vr.is(i.range)&&(Xe.string(i.uri)||Xe.undefined(i.uri))}t.is=r})(H8||(H8={}));(function(t){function e(n,i,a,s){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:s}}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Vr.is(i.targetRange)&&Xe.string(i.targetUri)&&Vr.is(i.targetSelectionRange)&&(Vr.is(i.originSelectionRange)||Xe.undefined(i.originSelectionRange))}t.is=r})(JEe||(JEe={}));(function(t){function e(n,i,a,s){return{red:n,green:i,blue:a,alpha:s}}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Xe.numberRange(i.red,0,1)&&Xe.numberRange(i.green,0,1)&&Xe.numberRange(i.blue,0,1)&&Xe.numberRange(i.alpha,0,1)}t.is=r})(wW||(wW={}));(function(t){function e(n,i){return{range:n,color:i}}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Vr.is(i.range)&&wW.is(i.color)}t.is=r})(eSe||(eSe={}));(function(t){function e(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a}}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Xe.string(i.label)&&(Xe.undefined(i.textEdit)||yb.is(i))&&(Xe.undefined(i.additionalTextEdits)||Xe.typedArray(i.additionalTextEdits,yb.is))}t.is=r})(tSe||(tSe={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(rSe||(rSe={}));(function(t){function e(n,i,a,s,o,l){let u={startLine:n,endLine:i};return Xe.defined(a)&&(u.startCharacter=a),Xe.defined(s)&&(u.endCharacter=s),Xe.defined(o)&&(u.kind=o),Xe.defined(l)&&(u.collapsedText=l),u}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Xe.uinteger(i.startLine)&&Xe.uinteger(i.startLine)&&(Xe.undefined(i.startCharacter)||Xe.uinteger(i.startCharacter))&&(Xe.undefined(i.endCharacter)||Xe.uinteger(i.endCharacter))&&(Xe.undefined(i.kind)||Xe.string(i.kind))}t.is=r})(nSe||(nSe={}));(function(t){function e(n,i){return{location:n,message:i}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&H8.is(i.location)&&Xe.string(i.message)}t.is=r})(kW||(kW={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(iSe||(iSe={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(aSe||(aSe={}));(function(t){function e(r){let n=r;return Xe.objectLiteral(n)&&Xe.string(n.href)}t.is=e})(sSe||(sSe={}));(function(t){function e(n,i,a,s,o,l){let u={range:n,message:i};return Xe.defined(a)&&(u.severity=a),Xe.defined(s)&&(u.code=s),Xe.defined(o)&&(u.source=o),Xe.defined(l)&&(u.relatedInformation=l),u}t.create=e;function r(n){var i;let a=n;return Xe.defined(a)&&Vr.is(a.range)&&Xe.string(a.message)&&(Xe.number(a.severity)||Xe.undefined(a.severity))&&(Xe.integer(a.code)||Xe.string(a.code)||Xe.undefined(a.code))&&(Xe.undefined(a.codeDescription)||Xe.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&(Xe.string(a.source)||Xe.undefined(a.source))&&(Xe.undefined(a.relatedInformation)||Xe.typedArray(a.relatedInformation,kW.is))}t.is=r})(q8||(q8={}));(function(t){function e(n,i,...a){let s={title:n,command:i};return Xe.defined(a)&&a.length>0&&(s.arguments=a),s}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Xe.string(i.title)&&Xe.string(i.command)}t.is=r})(vb||(vb={}));(function(t){function e(a,s){return{range:a,newText:s}}t.replace=e;function r(a,s){return{range:{start:a,end:a},newText:s}}t.insert=r;function n(a){return{range:a,newText:""}}t.del=n;function i(a){let s=a;return Xe.objectLiteral(s)&&Xe.string(s.newText)&&Vr.is(s.range)}t.is=i})(yb||(yb={}));(function(t){function e(n,i,a){let s={label:n};return i!==void 0&&(s.needsConfirmation=i),a!==void 0&&(s.description=a),s}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Xe.string(i.label)&&(Xe.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(Xe.string(i.description)||i.description===void 0)}t.is=r})(TW||(TW={}));(function(t){function e(r){let n=r;return Xe.string(n)}t.is=e})(bb||(bb={}));(function(t){function e(a,s,o){return{range:a,newText:s,annotationId:o}}t.replace=e;function r(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}t.insert=r;function n(a,s){return{range:a,newText:"",annotationId:s}}t.del=n;function i(a){let s=a;return yb.is(s)&&(TW.is(s.annotationId)||bb.is(s.annotationId))}t.is=i})(oSe||(oSe={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&LW.is(i.textDocument)&&Array.isArray(i.edits)}t.is=r})(EW||(EW={}));(function(t){function e(n,i,a){let s={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&Xe.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||Xe.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Xe.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||bb.is(i.annotationId))}t.is=r})(SW||(SW={}));(function(t){function e(n,i,a,s){let o={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&Xe.string(i.oldUri)&&Xe.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||Xe.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Xe.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||bb.is(i.annotationId))}t.is=r})(CW||(CW={}));(function(t){function e(n,i,a){let s={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&Xe.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||Xe.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||Xe.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||bb.is(i.annotationId))}t.is=r})(_W||(_W={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>Xe.string(i.kind)?SW.is(i)||CW.is(i)||_W.is(i):EW.is(i)))}t.is=e})(AW||(AW={}));(function(t){function e(n){return{uri:n}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Xe.string(i.uri)}t.is=r})(lSe||(lSe={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Xe.string(i.uri)&&Xe.integer(i.version)}t.is=r})(cSe||(cSe={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Xe.string(i.uri)&&(i.version===null||Xe.integer(i.version))}t.is=r})(LW||(LW={}));(function(t){function e(n,i,a,s){return{uri:n,languageId:i,version:a,text:s}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Xe.string(i.uri)&&Xe.string(i.languageId)&&Xe.integer(i.version)&&Xe.string(i.text)}t.is=r})(uSe||(uSe={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}t.is=e})(MW||(MW={}));(function(t){function e(r){let n=r;return Xe.objectLiteral(r)&&MW.is(n.kind)&&Xe.string(n.value)}t.is=e})(c5||(c5={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(hSe||(hSe={}));(function(t){t.PlainText=1,t.Snippet=2})(fSe||(fSe={}));(function(t){t.Deprecated=1})(dSe||(dSe={}));(function(t){function e(n,i,a){return{newText:n,insert:i,replace:a}}t.create=e;function r(n){let i=n;return i&&Xe.string(i.newText)&&Vr.is(i.insert)&&Vr.is(i.replace)}t.is=r})(pSe||(pSe={}));(function(t){t.asIs=1,t.adjustIndentation=2})(gSe||(gSe={}));(function(t){function e(r){let n=r;return n&&(Xe.string(n.detail)||n.detail===void 0)&&(Xe.string(n.description)||n.description===void 0)}t.is=e})(mSe||(mSe={}));(function(t){function e(r){return{label:r}}t.create=e})(vSe||(vSe={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}t.create=e})(ySe||(ySe={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(n){let i=n;return Xe.string(i)||Xe.objectLiteral(i)&&Xe.string(i.language)&&Xe.string(i.value)}t.is=r})(W8||(W8={}));(function(t){function e(r){let n=r;return!!n&&Xe.objectLiteral(n)&&(c5.is(n.contents)||W8.is(n.contents)||Xe.typedArray(n.contents,W8.is))&&(r.range===void 0||Vr.is(r.range))}t.is=e})(bSe||(bSe={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}t.create=e})(xSe||(xSe={}));(function(t){function e(r,n,...i){let a={label:r};return Xe.defined(n)&&(a.documentation=n),Xe.defined(i)?a.parameters=i:a.parameters=[],a}t.create=e})(wSe||(wSe={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(kSe||(kSe={}));(function(t){function e(r,n){let i={range:r};return Xe.number(n)&&(i.kind=n),i}t.create=e})(TSe||(TSe={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(ESe||(ESe={}));(function(t){t.Deprecated=1})(SSe||(SSe={}));(function(t){function e(r,n,i,a,s){let o={name:r,kind:n,location:{uri:a,range:i}};return s&&(o.containerName=s),o}t.create=e})(CSe||(CSe={}));(function(t){function e(r,n,i,a){return a!==void 0?{name:r,kind:n,location:{uri:i,range:a}}:{name:r,kind:n,location:{uri:i}}}t.create=e})(_Se||(_Se={}));(function(t){function e(n,i,a,s,o,l){let u={name:n,detail:i,kind:a,range:s,selectionRange:o};return l!==void 0&&(u.children=l),u}t.create=e;function r(n){let i=n;return i&&Xe.string(i.name)&&Xe.number(i.kind)&&Vr.is(i.range)&&Vr.is(i.selectionRange)&&(i.detail===void 0||Xe.string(i.detail))&&(i.deprecated===void 0||Xe.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=r})(ASe||(ASe={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(LSe||(LSe={}));(function(t){t.Invoked=1,t.Automatic=2})(G8||(G8={}));(function(t){function e(n,i,a){let s={diagnostics:n};return i!=null&&(s.only=i),a!=null&&(s.triggerKind=a),s}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Xe.typedArray(i.diagnostics,q8.is)&&(i.only===void 0||Xe.typedArray(i.only,Xe.string))&&(i.triggerKind===void 0||i.triggerKind===G8.Invoked||i.triggerKind===G8.Automatic)}t.is=r})(MSe||(MSe={}));(function(t){function e(n,i,a){let s={title:n},o=!0;return typeof i=="string"?(o=!1,s.kind=i):vb.is(i)?s.command=i:s.edit=i,o&&a!==void 0&&(s.kind=a),s}t.create=e;function r(n){let i=n;return i&&Xe.string(i.title)&&(i.diagnostics===void 0||Xe.typedArray(i.diagnostics,q8.is))&&(i.kind===void 0||Xe.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||vb.is(i.command))&&(i.isPreferred===void 0||Xe.boolean(i.isPreferred))&&(i.edit===void 0||AW.is(i.edit))}t.is=r})(DSe||(DSe={}));(function(t){function e(n,i){let a={range:n};return Xe.defined(i)&&(a.data=i),a}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Vr.is(i.range)&&(Xe.undefined(i.command)||vb.is(i.command))}t.is=r})(OSe||(OSe={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Xe.uinteger(i.tabSize)&&Xe.boolean(i.insertSpaces)}t.is=r})(RSe||(RSe={}));(function(t){function e(n,i,a){return{range:n,target:i,data:a}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Vr.is(i.range)&&(Xe.undefined(i.target)||Xe.string(i.target))}t.is=r})(ISe||(ISe={}));(function(t){function e(n,i){return{range:n,parent:i}}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&Vr.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=r})(NSe||(NSe={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(PSe||(PSe={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(FSe||(FSe={}));(function(t){function e(r){let n=r;return Xe.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}t.is=e})(BSe||(BSe={}));(function(t){function e(n,i){return{range:n,text:i}}t.create=e;function r(n){let i=n;return i!=null&&Vr.is(i.range)&&Xe.string(i.text)}t.is=r})(zSe||(zSe={}));(function(t){function e(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a}}t.create=e;function r(n){let i=n;return i!=null&&Vr.is(i.range)&&Xe.boolean(i.caseSensitiveLookup)&&(Xe.string(i.variableName)||i.variableName===void 0)}t.is=r})($Se||($Se={}));(function(t){function e(n,i){return{range:n,expression:i}}t.create=e;function r(n){let i=n;return i!=null&&Vr.is(i.range)&&(Xe.string(i.expression)||i.expression===void 0)}t.is=r})(VSe||(VSe={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}t.create=e;function r(n){let i=n;return Xe.defined(i)&&Vr.is(n.stoppedLocation)}t.is=r})(USe||(USe={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(DW||(DW={}));(function(t){function e(n){return{value:n}}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&(i.tooltip===void 0||Xe.string(i.tooltip)||c5.is(i.tooltip))&&(i.location===void 0||H8.is(i.location))&&(i.command===void 0||vb.is(i.command))}t.is=r})(OW||(OW={}));(function(t){function e(n,i,a){let s={position:n,label:i};return a!==void 0&&(s.kind=a),s}t.create=e;function r(n){let i=n;return Xe.objectLiteral(i)&&ln.is(i.position)&&(Xe.string(i.label)||Xe.typedArray(i.label,OW.is))&&(i.kind===void 0||DW.is(i.kind))&&i.textEdits===void 0||Xe.typedArray(i.textEdits,yb.is)&&(i.tooltip===void 0||Xe.string(i.tooltip)||c5.is(i.tooltip))&&(i.paddingLeft===void 0||Xe.boolean(i.paddingLeft))&&(i.paddingRight===void 0||Xe.boolean(i.paddingRight))}t.is=r})(HSe||(HSe={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(qSe||(qSe={}));(function(t){function e(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a}}t.create=e})(WSe||(WSe={}));(function(t){function e(r){return{items:r}}t.create=e})(GSe||(GSe={}));(function(t){t.Invoked=0,t.Automatic=1})(YSe||(YSe={}));(function(t){function e(r,n){return{range:r,text:n}}t.create=e})(jSe||(jSe={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}t.create=e})(XSe||(XSe={}));(function(t){function e(r){let n=r;return Xe.objectLiteral(n)&&xW.is(n.uri)&&Xe.string(n.name)}t.is=e})(KSe||(KSe={}));(function(t){function e(a,s,o,l){return new RW(a,s,o,l)}t.create=e;function r(a){let s=a;return!!(Xe.defined(s)&&Xe.string(s.uri)&&(Xe.undefined(s.languageId)||Xe.string(s.languageId))&&Xe.uinteger(s.lineCount)&&Xe.func(s.getText)&&Xe.func(s.positionAt)&&Xe.func(s.offsetAt))}t.is=r;function n(a,s){let o=a.getText(),l=i(s,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=o.length;for(let h=l.length-1;h>=0;h--){let f=l[h],d=a.offsetAt(f.range.start),p=a.offsetAt(f.range.end);if(p<=u)o=o.substring(0,d)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");u=d}return o}t.applyEdits=n;function i(a,s){if(a.length<=1)return a;let o=a.length/2|0,l=a.slice(0,o),u=a.slice(o);i(l,s),i(u,s);let h=0,f=0,d=0;for(;h0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return ln.create(0,e);for(;ne?i=s:n=s+1}let a=n-1;return ln.create(a,e-r[a])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],i=e.line+1"u"}t.undefined=n;function i(p){return p===!0||p===!1}t.boolean=i;function a(p){return e.call(p)==="[object String]"}t.string=a;function s(p){return e.call(p)==="[object Number]"}t.number=s;function o(p,g,m){return e.call(p)==="[object Number]"&&g<=p&&p<=m}t.numberRange=o;function l(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=l;function u(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=u;function h(p){return e.call(p)==="[object Function]"}t.func=h;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,g){return Array.isArray(p)&&p.every(g)}t.typedArray=d})(Xe||(Xe={}))});var u5,h5,Tm,Em,NW,xb,Y8=$(()=>{b();IW();mc();pu();u5=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){return this.rootNode=new xb(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let r=new Em;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){let n=new Tm(e.startOffset,e.image.length,Hy(e),e.tokenType,!1);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let r=e.container;if(r){let n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}construct(e){let r=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=r;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}addHiddenTokens(e){for(let r of e){let n=new Tm(r.startOffset,r.image.length,Hy(r),r.tokenType,!0);n.root=this.rootNode,this.addHiddenToken(this.rootNode,n)}}addHiddenToken(e,r){let{offset:n,end:i}=r;for(let a=0;ao&&i=0;e--){let r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},NW=class t extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(let r of e)r.container=this.parent}},xb=class extends Em{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function PW(t){return t.$type===j8}var j8,QSe,JSe,f5,d5,X8,wb,p5,cxt,FW,g5=$(()=>{b();xm();KEe();Ah();vu();oo();Y8();j8=Symbol("Datatype");QSe="\u200B",JSe=t=>t.endsWith(QSe)?t:t+QSe,f5=class{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition;this.wrapper=new FW(r,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},d5=class extends f5{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new u5,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){let n=e.fragment?void 0:B3(e)?j8:fm(e),i=this.wrapper.DEFINE_RULE(JSe(e.name),this.startImplementation(n,r).bind(this));return e.entry&&(this.mainRule=i),i}parse(e){this.nodeBuilder.buildRootNode(e);let r=this.lexer.tokenize(e);this.wrapper.input=r.tokens;let n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(r.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:r.errors,parserErrors:this.wrapper.errors}}startImplementation(e,r){return n=>{if(!this.isRecording()){let a={$type:e};this.stack.push(a),e===j8&&(a.value="")}let i;try{i=r(n)}catch{i=void 0}return!this.isRecording()&&i===void 0&&(i=this.construct()),i}}consume(e,r,n){let i=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(i)){let a=this.nodeBuilder.buildLeafNode(i,n),{assignment:s,isCrossRef:o}=this.getAssignment(n),l=this.current;if(s){let u=yc(n)?i.image:this.converter.convert(i.image,a);this.assign(s.operator,s.feature,u,a,o)}else if(PW(l)){let u=i.image;yc(n)||(u=this.converter.convert(u,a).toString()),l.value+=u}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,i){let a;this.isRecording()||(a=this.nodeBuilder.buildCompositeNode(n));let s=this.wrapper.wrapSubrule(e,r,i);!this.isRecording()&&a&&a.length>0&&this.performSubruleAssignment(s,n,a)}performSubruleAssignment(e,r,n){let{assignment:i,isCrossRef:a}=this.getAssignment(r);if(i)this.assign(i.operator,i.feature,e,n,a);else if(!i){let s=this.current;if(PW(s))s.value+=e.toString();else if(typeof e=="object"&&e){let o=e.$type,l=this.assignWithoutOverride(e,s);o&&(l.$type=o);let u=l;this.stack.pop(),this.stack.push(u)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&r.feature&&r.operator){n=this.construct(!1);let a=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(a)}let i={$type:e};this.stack.pop(),this.stack.push(i),r.feature&&r.operator&&this.assign(r.operator,r.feature,n,n.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;let r=this.current;return Y7(r),this.nodeBuilder.construct(r),e&&this.stack.pop(),PW(r)?this.converter.convert(r.value,r.$cstNode):(hq(this.astReflection,r),r)}getAssignment(e){if(!this.assignmentMap.has(e)){let r=om(e,gu);this.assignmentMap.set(e,{assignment:r,isCrossRef:r?sm(r.terminal):!1})}return this.assignmentMap.get(e)}assign(e,r,n,i,a){let s=this.current,o;switch(a&&typeof n=="string"?o=this.linker.buildReference(s,r,i,n):o=n,e){case"=":{s[r]=o;break}case"?=":{s[r]=!0;break}case"+=":Array.isArray(s[r])||(s[r]=[]),s[r].push(o)}}assignWithoutOverride(e,r){for(let[n,i]of Object.entries(r)){let a=e[n];a===void 0?e[n]=i:Array.isArray(a)&&Array.isArray(i)&&(i.push(...a),e[n]=i)}return e}get definitionErrors(){return this.wrapper.definitionErrors}},X8=class{buildMismatchTokenMessage(e){return hd.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return hd.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return hd.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return hd.buildEarlyExitMessage(e)}},wb=class extends X8{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},p5=class extends f5{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let r=this.lexer.tokenize(e);return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){let n=this.wrapper.DEFINE_RULE(JSe(e.name),this.startImplementation(r).bind(this));return e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{let n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,i){this.before(n),this.wrapper.wrapSubrule(e,r,i),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},cxt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new wb},FW=class extends i5{constructor(e,r){let n=r&&"maxLookahead"in r;super(e,Object.assign(Object.assign(Object.assign({},cxt),{lookaheadStrategy:n?new fd({maxLookahead:r.maxLookahead}):new l5}),r))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r){return this.RULE(e,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}}});function Z8(t,e,r){return uxt({parser:e,tokens:r,rules:new Map,ruleNames:new Map},t),e}function uxt(t,e){let r=P3(e,!1),n=bn(e.rules).filter(Ns).filter(i=>r.has(i));for(let i of n){let a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});a.rules.set(i.name,t.parser.rule(i,Sm(a,i.definition)))}}function Sm(t,e,r=!1){let n;if(yc(e))n=vxt(t,e);else if(ad(e))n=hxt(t,e);else if(gu(e))n=Sm(t,e.terminal);else if(sm(e))n=eCe(t,e);else if(mu(e))n=fxt(t,e);else if(q7(e))n=pxt(t,e);else if(G7(e))n=gxt(t,e);else if(Up(e))n=mxt(t,e);else if(WH(e)){let i=t.consume++;n=()=>t.parser.consume(i,Cl,e)}else throw new am(e.$cstNode,`Unexpected element type: ${e.$type}`);return tCe(t,r?void 0:K8(e),n,e.cardinality)}function hxt(t,e){let r=fm(e);return()=>t.parser.action(r,e)}function fxt(t,e){let r=e.rule.ref;if(Ns(r)){let n=t.subrule++,i=e.arguments.length>0?dxt(r,e.arguments):()=>({});return a=>t.parser.subrule(n,rCe(t,r),e,i(a))}else if(vc(r)){let n=t.consume++,i=BW(t,r.name);return()=>t.parser.consume(n,i,e)}else if(r)Vp(r);else throw new am(e.$cstNode,`Undefined rule type: ${e.$type}`)}function dxt(t,e){let r=e.map(n=>dd(n.value));return n=>{let i={};for(let a=0;ae(n)||r(n)}else if(vH(t)){let e=dd(t.left),r=dd(t.right);return n=>e(n)&&r(n)}else if(EH(t)){let e=dd(t.value);return r=>!e(r)}else if(AH(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(gH(t)){let e=!!t.true;return()=>e}Vp(t)}function pxt(t,e){if(e.elements.length===1)return Sm(t,e.elements[0]);{let r=[];for(let i of e.elements){let a={ALT:Sm(t,i,!0)},s=K8(i);s&&(a.GATE=dd(s)),r.push(a)}let n=t.or++;return i=>t.parser.alternatives(n,r.map(a=>{let s={ALT:()=>a.ALT(i)},o=a.GATE;return o&&(s.GATE=()=>o(i)),s}))}}function gxt(t,e){if(e.elements.length===1)return Sm(t,e.elements[0]);let r=[];for(let o of e.elements){let l={ALT:Sm(t,o,!0)},u=K8(o);u&&(l.GATE=dd(u)),r.push(l)}let n=t.or++,i=(o,l)=>{let u=l.getRuleStack().join("-");return`uGroup_${o}_${u}`},a=o=>t.parser.alternatives(n,r.map((l,u)=>{let h={ALT:()=>!0},f=t.parser;h.ALT=()=>{if(l.ALT(o),!f.isRecording()){let p=i(n,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);let g=f.unorderedGroups.get(p);typeof g?.[u]>"u"&&(g[u]=!0)}};let d=l.GATE;return d?h.GATE=()=>d(o):h.GATE=()=>{let p=f.unorderedGroups.get(i(n,f));return!p?.[u]},h})),s=tCe(t,K8(e),a,"*");return o=>{s(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}function mxt(t,e){let r=e.elements.map(n=>Sm(t,n));return n=>r.forEach(i=>i(n))}function K8(t){if(Up(t))return t.guardCondition}function eCe(t,e,r=e.terminal){if(r)if(mu(r)&&Ns(r.rule.ref)){let n=t.subrule++;return i=>t.parser.subrule(n,rCe(t,r.rule.ref),e,i)}else if(mu(r)&&vc(r.rule.ref)){let n=t.consume++,i=BW(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}else if(yc(r)){let n=t.consume++,i=BW(t,r.value);return()=>t.parser.consume(n,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);let n=J7(e.type.ref),i=n?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+fm(e.type.ref));return eCe(t,e,i)}}function vxt(t,e){let r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}function tCe(t,e,r,n){let i=e&&dd(e);if(!n)if(i){let a=t.or++;return s=>t.parser.alternatives(a,[{ALT:()=>r(s),GATE:()=>i(s)},{ALT:z8(),GATE:()=>!i(s)}])}else return r;if(n==="*"){let a=t.many++;return s=>t.parser.many(a,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else if(n==="+"){let a=t.many++;if(i){let s=t.or++;return o=>t.parser.alternatives(s,[{ALT:()=>t.parser.atLeastOne(a,{DEF:()=>r(o)}),GATE:()=>i(o)},{ALT:z8(),GATE:()=>!i(o)}])}else return s=>t.parser.atLeastOne(a,{DEF:()=>r(s)})}else if(n==="?"){let a=t.optional++;return s=>t.parser.optional(a,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else Vp(n)}function rCe(t,e){let r=yxt(t,e),n=t.rules.get(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function yxt(t,e){if(Ns(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!Ns(n);)(Up(n)||q7(n)||G7(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,t.ruleNames.set(e,i),i}}function BW(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}var zW=$(()=>{b();xm();Ah();F7();Go();vu()});function $W(t){let e=t.Grammar,r=t.parser.Lexer,n=new p5(t);return Z8(e,n,r.definition),n.finalize(),n}var VW=$(()=>{b();g5();zW()});function UW(t){let e=nCe(t);return e.finalize(),e}function nCe(t){let e=t.Grammar,r=t.parser.Lexer,n=new d5(t);return Z8(e,n,r.definition)}var HW=$(()=>{b();g5();zW()});var Cm,qW=$(()=>{b();xm();Ah();oo();vu();Yy();Go();Cm=class{buildTokens(e,r){let n=bn(P3(e,!1)),i=this.buildTerminalTokens(n),a=this.buildKeywordTokens(n,i,r);return i.forEach(s=>{let o=s.PATTERN;typeof o=="object"&&o&&"test"in o&&Z7(o)?a.unshift(s):a.push(s)}),a}buildTerminalTokens(e){return e.filter(vc).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){let r=jy(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:e.name,PATTERN:n,LINE_BREAKS:!0};return e.hidden&&(i.GROUP=Z7(r)?Gi.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")?!0:!!(e.source.includes("?<=")||e.source.includes("?(r.lastIndex=i,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(Ns).flatMap(i=>Lh(i).filter(yc)).distinct(i=>i.value).toArray().sort((i,a)=>a.value.length-i.value.length).map(i=>this.buildKeywordToken(i,r,!!n?.caseInsensitive))}buildKeywordToken(e,r,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,r)}}buildKeywordPattern(e,r){return r?new RegExp(yq(e.value)):e.value}findLongerAlt(e,r){return r.reduce((n,i)=>{let a=i?.PATTERN;return a?.source&&bq("^"+a.source+"$",e.value)&&n.push(i),n},[])}}});var _m,Oh,WW=$(()=>{b();Ah();vu();_m=class{convert(e,r){let n=r.grammarSource;if(sm(n)&&(n=kq(n)),mu(n)){let i=n.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,r)}return e}runConverter(e,r,n){var i;switch(e.name.toUpperCase()){case"INT":return Oh.convertInt(r);case"STRING":return Oh.convertString(r);case"ID":return Oh.convertID(r)}switch((i=Mq(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return Oh.convertNumber(r);case"boolean":return Oh.convertBoolean(r);case"bigint":return Oh.convertBigint(r);case"date":return Oh.convertDate(r);default:return r}}};(function(t){function e(u){let h="";for(let f=1;f{"use strict";b();Object.defineProperty(jW,"__esModule",{value:!0});var GW;function YW(){if(GW===void 0)throw new Error("No runtime abstraction layer installed");return GW}(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");GW=r}t.install=e})(YW||(YW={}));jW.default=YW});var sCe=Ke(Ps=>{"use strict";b();Object.defineProperty(Ps,"__esModule",{value:!0});Ps.stringArray=Ps.array=Ps.func=Ps.error=Ps.number=Ps.string=Ps.boolean=void 0;function bxt(t){return t===!0||t===!1}Ps.boolean=bxt;function iCe(t){return typeof t=="string"||t instanceof String}Ps.string=iCe;function xxt(t){return typeof t=="number"||t instanceof Number}Ps.number=xxt;function wxt(t){return t instanceof Error}Ps.error=wxt;function kxt(t){return typeof t=="function"}Ps.func=kxt;function aCe(t){return Array.isArray(t)}Ps.array=aCe;function Txt(t){return aCe(t)&&t.every(e=>iCe(e))}Ps.stringArray=Txt});var ZW=Ke(kb=>{"use strict";b();Object.defineProperty(kb,"__esModule",{value:!0});kb.Emitter=kb.Event=void 0;var Ext=XW(),oCe;(function(t){let e={dispose(){}};t.None=function(){return e}})(oCe||(kb.Event=oCe={}));var KW=class{add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,r)})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,a=this._callbacks.length;i{this._callbacks||(this._callbacks=new KW),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,r),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};kb.Emitter=Q8;Q8._noop=function(){}});var lCe=Ke(Tb=>{"use strict";b();Object.defineProperty(Tb,"__esModule",{value:!0});Tb.CancellationTokenSource=Tb.CancellationToken=void 0;var Sxt=XW(),Cxt=sCe(),QW=ZW(),J8;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:QW.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:QW.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||Cxt.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}t.is=e})(J8||(Tb.CancellationToken=J8={}));var _xt=Object.freeze(function(t,e){let r=(0,Sxt.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),eL=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?_xt:(this._emitter||(this._emitter=new QW.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},JW=class{get token(){return this._token||(this._token=new eL),this._token}cancel(){this._token?this._token.cancel():this._token=J8.Cancelled}dispose(){this._token?this._token instanceof eL&&this._token.dispose():this._token=J8.None}};Tb.CancellationTokenSource=JW});var Or={};var xc=$(()=>{b();Tr(Or,Vi(lCe(),1))});function tG(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}function uCe(){return eG=Date.now(),new Or.CancellationTokenSource}function hCe(t){cCe=t}function Gp(t){return t===Rh}async function Ca(t){if(t===Or.CancellationToken.None)return;let e=Date.now();if(e-eG>=cCe&&(eG=e,await tG()),t.isCancellationRequested)throw Rh}var eG,cCe,Rh,fo,wc=$(()=>{b();xc();eG=0,cCe=10;Rh=Symbol("OperationCancelled");fo=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}}});function rG(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);rG(n,e),rG(i,e);let a=0,s=0,o=0;for(;ar.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function Axt(t){let e=pCe(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var tL,Eb,gCe=$(()=>{"use strict";b();tL=class t{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let i=pCe(n.range),a=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(s,this._content.length);let o=Math.max(i.start.line,0),l=Math.max(i.end.line,0),u=this._lineOffsets,h=fCe(n.text,!1,a);if(l-o===h.length)for(let d=0,p=h.length;de?i=s:n=s+1}let a=n-1;return e=this.ensureBeforeEOL(e,r[a]),{line:a,character:e-r[a]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let i=e.line+1r&&dCe(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(i,a,s,o){return new tL(i,a,s,o)}t.create=e;function r(i,a,s){if(i instanceof tL)return i.update(a,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function n(i,a){let s=i.getText(),o=rG(a.map(Axt),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,u=[];for(let h of o){let f=i.offsetAt(h.range.start);if(fl&&u.push(s.substring(l,f)),h.newText.length&&u.push(h.newText),l=i.offsetAt(h.range.end)}return u.push(s.substr(l)),u.join("")}t.applyEdits=n})(Eb||(Eb={}))});var mCe,Xo,Sb,nG=$(()=>{b();(()=>{"use strict";var t={470:i=>{function a(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function s(l,u){for(var h,f="",d=0,p=-1,g=0,m=0;m<=l.length;++m){if(m2){var v=f.lastIndexOf("/");if(v!==f.length-1){v===-1?(f="",d=0):d=(f=f.slice(0,v)).length-1-f.lastIndexOf("/"),p=m,g=0;continue}}else if(f.length===2||f.length===1){f="",d=0,p=m,g=0;continue}}u&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+l.slice(p+1,m):f=l.slice(p+1,m),d=m-p-1;p=m,g=0}else h===46&&g!==-1?++g:g=-1}return f}var o={resolve:function(){for(var l,u="",h=!1,f=arguments.length-1;f>=-1&&!h;f--){var d;f>=0?d=arguments[f]:(l===void 0&&(l=process.cwd()),d=l),a(d),d.length!==0&&(u=d+"/"+u,h=d.charCodeAt(0)===47)}return u=s(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(l){if(a(l),l.length===0)return".";var u=l.charCodeAt(0)===47,h=l.charCodeAt(l.length-1)===47;return(l=s(l,!u)).length!==0||u||(l="."),l.length>0&&h&&(l+="/"),u?"/"+l:l},isAbsolute:function(l){return a(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,u=0;u0&&(l===void 0?l=h:l+="/"+h)}return l===void 0?".":o.normalize(l)},relative:function(l,u){if(a(l),a(u),l===u||(l=o.resolve(l))===(u=o.resolve(u)))return"";for(var h=1;hm){if(u.charCodeAt(p+y)===47)return u.slice(p+y+1);if(y===0)return u.slice(p+y)}else d>m&&(l.charCodeAt(h+y)===47?v=y:y===0&&(v=0));break}var w=l.charCodeAt(h+y);if(w!==u.charCodeAt(p+y))break;w===47&&(v=y)}var k="";for(y=h+v+1;y<=f;++y)y!==f&&l.charCodeAt(y)!==47||(k.length===0?k+="..":k+="/..");return k.length>0?k+u.slice(p+v):(p+=v,u.charCodeAt(p)===47&&++p,u.slice(p))},_makeLong:function(l){return l},dirname:function(l){if(a(l),l.length===0)return".";for(var u=l.charCodeAt(0),h=u===47,f=-1,d=!0,p=l.length-1;p>=1;--p)if((u=l.charCodeAt(p))===47){if(!d){f=p;break}}else d=!1;return f===-1?h?"/":".":h&&f===1?"//":l.slice(0,f)},basename:function(l,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');a(l);var h,f=0,d=-1,p=!0;if(u!==void 0&&u.length>0&&u.length<=l.length){if(u.length===l.length&&u===l)return"";var g=u.length-1,m=-1;for(h=l.length-1;h>=0;--h){var v=l.charCodeAt(h);if(v===47){if(!p){f=h+1;break}}else m===-1&&(p=!1,m=h+1),g>=0&&(v===u.charCodeAt(g)?--g==-1&&(d=h):(g=-1,d=m))}return f===d?d=m:d===-1&&(d=l.length),l.slice(f,d)}for(h=l.length-1;h>=0;--h)if(l.charCodeAt(h)===47){if(!p){f=h+1;break}}else d===-1&&(p=!1,d=h+1);return d===-1?"":l.slice(f,d)},extname:function(l){a(l);for(var u=-1,h=0,f=-1,d=!0,p=0,g=l.length-1;g>=0;--g){var m=l.charCodeAt(g);if(m!==47)f===-1&&(d=!1,f=g+1),m===46?u===-1?u=g:p!==1&&(p=1):u!==-1&&(p=-1);else if(!d){h=g+1;break}}return u===-1||f===-1||p===0||p===1&&u===f-1&&u===h+1?"":l.slice(u,f)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return function(u,h){var f=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return f?f===h.root?f+d:f+"/"+d:d}(0,l)},parse:function(l){a(l);var u={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return u;var h,f=l.charCodeAt(0),d=f===47;d?(u.root="/",h=1):h=0;for(var p=-1,g=0,m=-1,v=!0,y=l.length-1,w=0;y>=h;--y)if((f=l.charCodeAt(y))!==47)m===-1&&(v=!1,m=y+1),f===46?p===-1?p=y:w!==1&&(w=1):p!==-1&&(w=-1);else if(!v){g=y+1;break}return p===-1||m===-1||w===0||w===1&&p===m-1&&p===g+1?m!==-1&&(u.base=u.name=g===0&&d?l.slice(1,m):l.slice(g,m)):(g===0&&d?(u.name=l.slice(1,p),u.base=l.slice(1,m)):(u.name=l.slice(g,p),u.base=l.slice(g,m)),u.ext=l.slice(p,m)),g>0?u.dir=l.slice(0,g-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function r(i){var a=e[i];if(a!==void 0)return a.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports}r.d=(i,a)=>{for(var s in a)r.o(a,s)&&!r.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:a[s]})},r.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var n={};(()=>{let i;r.r(n),r.d(n,{URI:()=>d,Utils:()=>I}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(O,C){if(!O.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!a.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!s.test(O.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let u="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(C){return C instanceof d||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,R,D,P,A,N=!1){typeof C=="object"?(this.scheme=C.scheme||u,this.authority=C.authority||u,this.path=C.path||u,this.query=C.query||u,this.fragment=C.fragment||u):(this.scheme=function(F,B){return F||B?F:"file"}(C,N),this.authority=R||u,this.path=function(F,B){switch(F){case"https":case"http":case"file":B?B[0]!==h&&(B=h+B):B=h}return B}(this.scheme,D||u),this.query=P||u,this.fragment=A||u,l(this,N))}get fsPath(){return w(this,!1)}with(C){if(!C)return this;let{scheme:R,authority:D,path:P,query:A,fragment:N}=C;return R===void 0?R=this.scheme:R===null&&(R=u),D===void 0?D=this.authority:D===null&&(D=u),P===void 0?P=this.path:P===null&&(P=u),A===void 0?A=this.query:A===null&&(A=u),N===void 0?N=this.fragment:N===null&&(N=u),R===this.scheme&&D===this.authority&&P===this.path&&A===this.query&&N===this.fragment?this:new g(R,D,P,A,N)}static parse(C,R=!1){let D=f.exec(C);return D?new g(D[2]||u,S(D[4]||u),S(D[5]||u),S(D[7]||u),S(D[9]||u),R):new g(u,u,u,u,u)}static file(C){let R=u;if(i&&(C=C.replace(/\\/g,h)),C[0]===h&&C[1]===h){let D=C.indexOf(h,2);D===-1?(R=C.substring(2),C=h):(R=C.substring(2,D),C=C.substring(D)||h)}return new g("file",R,C,u,u)}static from(C){let R=new g(C.scheme,C.authority,C.path,C.query,C.fragment);return l(R,!0),R}toString(C=!1){return k(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof d)return C;{let R=new g(C);return R._formatted=C.external,R._fsPath=C._sep===p?C.fsPath:null,R}}return C}}let p=i?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath}toString(C=!1){return C?k(this,!0):(this._formatted||(this._formatted=k(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=p),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(O,C,R){let D,P=-1;for(let A=0;A=97&&N<=122||N>=65&&N<=90||N>=48&&N<=57||N===45||N===46||N===95||N===126||C&&N===47||R&&N===91||R&&N===93||R&&N===58)P!==-1&&(D+=encodeURIComponent(O.substring(P,A)),P=-1),D!==void 0&&(D+=O.charAt(A));else{D===void 0&&(D=O.substr(0,A));let F=m[N];F!==void 0?(P!==-1&&(D+=encodeURIComponent(O.substring(P,A)),P=-1),D+=F):P===-1&&(P=A)}}return P!==-1&&(D+=encodeURIComponent(O.substring(P))),D!==void 0?D:O}function y(O){let C;for(let R=0;R1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?C?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,i&&(R=R.replace(/\//g,"\\")),R}function k(O,C){let R=C?y:v,D="",{scheme:P,authority:A,path:N,query:F,fragment:B}=O;if(P&&(D+=P,D+=":"),(A||P==="file")&&(D+=h,D+=h),A){let V=A.indexOf("@");if(V!==-1){let z=A.substr(0,V);A=A.substr(V+1),V=z.lastIndexOf(":"),V===-1?D+=R(z,!1,!1):(D+=R(z.substr(0,V),!1,!1),D+=":",D+=R(z.substr(V+1),!1,!0)),D+="@"}A=A.toLowerCase(),V=A.lastIndexOf(":"),V===-1?D+=R(A,!1,!0):(D+=R(A.substr(0,V),!1,!0),D+=A.substr(V))}if(N){if(N.length>=3&&N.charCodeAt(0)===47&&N.charCodeAt(2)===58){let V=N.charCodeAt(1);V>=65&&V<=90&&(N=`/${String.fromCharCode(V+32)}:${N.substr(3)}`)}else if(N.length>=2&&N.charCodeAt(1)===58){let V=N.charCodeAt(0);V>=65&&V<=90&&(N=`${String.fromCharCode(V+32)}:${N.substr(2)}`)}D+=R(N,!0,!1)}return F&&(D+="?",D+=R(F,!1,!1)),B&&(D+="#",D+=C?B:v(B,!1,!1)),D}function E(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+E(O.substr(3)):O}}let T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(O){return O.match(T)?O.replace(T,C=>E(C)):O}var L=r(470);let _=L.posix||L,M="/";var I;(function(O){O.joinPath=function(C,...R){return C.with({path:_.join(C.path,...R)})},O.resolvePath=function(C,...R){let D=C.path,P=!1;D[0]!==M&&(D=M+D,P=!0);let A=_.resolve(D,...R);return P&&A[0]===M&&!C.authority&&(A=A.substring(1)),C.with({path:A})},O.dirname=function(C){if(C.path.length===0||C.path===M)return C;let R=_.dirname(C.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),C.with({path:R})},O.basename=function(C){return _.basename(C.path)},O.extname=function(C){return _.extname(C.path)}})(I||(I={}))})(),mCe=n})();({URI:Xo,Utils:Sb}=mCe)});var po,Ih=$(()=>{b();nG();(function(t){t.basename=Sb.basename,t.dirname=Sb.dirname,t.extname=Sb.extname,t.joinPath=Sb.joinPath,t.resolvePath=Sb.resolvePath;function e(n,i){return n?.toString()===i?.toString()}t.equals=e;function r(n,i){let a=typeof n=="string"?n:n.path,s=typeof i=="string"?i:i.path,o=a.split("/").filter(d=>d.length>0),l=s.split("/").filter(d=>d.length>0),u=0;for(;u{b();gCe();Cb();xc();Go();Ih();(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(Gn||(Gn={}));m5=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=Or.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??Xo.parse(e.uri),n?this.createAsync(r,e,n):this.create(r,e)}fromString(e,r,n){return n?this.createAsync(r,e,n):this.create(r,e)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r){if(typeof r=="string"){let n=this.parse(e,r);return this.createLangiumDocument(n,e,void 0,r)}else if("$model"in r){let n={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,r.getText());return this.createLangiumDocument(n,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){let i=await this.parseAsync(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else{let i=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}createLangiumDocument(e,r,n,i){let a;if(n)a={parseResult:e,uri:r,state:Gn.Parsed,references:[],textDocument:n};else{let s=this.createTextDocumentGetter(r,i);a={parseResult:e,uri:r,state:Gn.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=a,a}async update(e,r){var n,i;let a=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText,s=(i=this.textDocuments)===null||i===void 0?void 0:i.get(e.uri.toString()),o=s?s.getText():await this.fileSystemProvider.readFile(e.uri);if(s)Object.defineProperty(e,"textDocument",{value:s});else{let l=this.createTextDocumentGetter(e.uri,o);Object.defineProperty(e,"textDocument",{get:l})}return a!==o&&(e.parseResult=await this.parseAsync(e.uri,o,r),e.parseResult.value.$document=e),e.state=Gn.Parsed,e}parse(e,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){let n=this.serviceRegistry,i;return()=>i??(i=Eb.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},v5=class{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return bn(this.documentMap.values())}addDocument(e){let r=e.uri.toString();if(this.documentMap.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentMap.set(r,e)}getDocument(e){let r=e.toString();return this.documentMap.get(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=Gn.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=Gn.Changed,this.documentMap.delete(r)),n}}});var y5,iG=$(()=>{b();xc();mc();oo();wc();Cb();y5=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,r=Or.CancellationToken.None){for(let n of bc(e.parseResult.value))await Ca(r),Wy(n).forEach(i=>this.doLink(i,e))}doLink(e,r){let n=e.reference;if(n._ref===void 0)try{let i=this.getCandidate(e);if(rm(i))n._ref=i;else if(n._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){let a=this.loadAstNode(i);n._ref=a??this.createLinkingError(e,i)}}catch(i){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${i}`})}r.references.push(n)}unlink(e){for(let r of e.references)delete r._ref,delete r._nodeDescription;e.references=[]}getCandidate(e){let n=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return n??this.createLinkingError(e)}buildReference(e,r,n,i){let a=this,s={$refNode:n,$refText:i,get ref(){var o;if(Bi(this._ref))return this._ref;if(nH(this._nodeDescription)){let l=a.loadAstNode(this._nodeDescription);this._ref=l??a.createLinkingError({reference:s,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){let l=a.getLinkedNode({reference:s,container:e,property:r});if(l.error&&Ea(e).state{b();vu();b5=class{getName(e){if(vCe(e))return e.name}getNameNode(e){return F3(e.$cstNode,"name")}}});var x5,sG=$(()=>{b();vu();mc();oo();pu();Go();Ih();x5=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){let r=Aq(e),n=e.astNode;if(r&&n){let i=n[r.feature];if(gs(i))return i.ref;if(Array.isArray(i)){for(let a of i)if(gs(a)&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return a.ref}}if(n){let i=this.nameProvider.getNameNode(n);if(i&&(i===e||aH(e,i)))return n}}}findDeclarationNode(e){let r=this.findDeclaration(e);if(r?.$cstNode){let n=this.nameProvider.getNameNode(r);return n??r.$cstNode}}findReferences(e,r){let n=[];if(r.includeDeclaration){let a=this.getReferenceToSelf(e);a&&n.push(a)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(i=i.filter(a=>po.equals(a.sourceUri,r.documentUri))),n.push(...i),bn(n)}getReferenceToSelf(e){let r=this.nameProvider.getNameNode(e);if(r){let n=Ea(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:i,targetUri:n.uri,targetPath:i,segment:im(r),local:!0}}}}});var Nh,Am,_b=$(()=>{b();Go();Nh=class{constructor(e){if(this.map=new Map,e)for(let[r,n]of e)this.add(r,n)}get size(){return Uy.sum(bn(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let i=n.indexOf(r);if(i>=0)return n.length===1?this.map.delete(e):n.splice(i,1),!0}return!1}}get(e){var r;return(r=this.map.get(e))!==null&&r!==void 0?r:[]}has(e,r){if(r===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(i=>e(i,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return bn(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return bn(this.map.keys())}values(){return bn(this.map.values()).flat()}entriesGroupedByKey(){return bn(this.map.entries())}},Am=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}}});var w5,oG=$(()=>{b();xc();oo();_b();wc();w5=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,r=Or.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,r)}async computeExportsForNode(e,r,n=D3,i=Or.CancellationToken.None){let a=[];this.exportNode(e,a,r);for(let s of n(e))await Ca(i),this.exportNode(s,a,r);return a}exportNode(e,r,n){let i=this.nameProvider.getName(e);i&&r.push(this.descriptions.createDescription(e,i,n))}async computeLocalScopes(e,r=Or.CancellationToken.None){let n=e.parseResult.value,i=new Nh;for(let a of Lh(n))await Ca(r),this.processNode(a,e,i);return i}processNode(e,r,n){let i=e.$container;if(i){let a=this.nameProvider.getName(e);a&&n.add(i,this.descriptions.createDescription(e,a,r))}}}});var Ab,k5,Lxt,lG=$(()=>{b();Go();Ab=class{constructor(e,r,n){var i;this.elements=e,this.outerScope=r,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===e.toLowerCase()):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}},k5=class{constructor(e,r,n){var i;this.elements=new Map,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1;for(let a of e){let s=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(s,a)}this.outerScope=r}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=bn(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Lxt={getElement(){},getAllElements(){return S3}}});var Lb,T5,Lm,rL,Mb,nL=$(()=>{b();Lb=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},T5=class extends Lb{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){let n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},Lm=class extends Lb{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();let i=this.cacheForContext(e);if(i.has(r))return i.get(r);if(n){let a=n();return i.set(r,a),a}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){let r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){let r=this.converter(e),n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},rL=class extends Lm{constructor(e){super(r=>r.toString()),this.onDispose(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let i=r.concat(n);for(let a of i)this.clear(a)}))}},Mb=class extends T5{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var E5,cG=$(()=>{b();lG();oo();Go();nL();E5=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new Mb(e.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=Ea(e.container).precomputedScopes;if(i){let s=e.container;do{let o=i.get(s);o.length>0&&r.push(bn(o).filter(l=>this.reflection.isSubtype(l.type,n))),s=s.$container}while(s)}let a=this.getGlobalScope(n,e);for(let s=r.length-1;s>=0;s--)a=this.createScope(r[s],a);return a}createScope(e,r,n){return new Ab(bn(e),r,n)}createScopeForNodes(e,r,n){let i=bn(e).map(a=>{let s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s)}).nonNullable();return new Ab(i,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new k5(this.indexManager.allElements(e)))}}});function uG(t){return typeof t.$comment=="string"}function yCe(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}var S5,iL=$(()=>{b();nG();mc();oo();vu();S5=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r={}){let n=r?.replacer,i=(s,o)=>this.replacer(s,o,r),a=n?(s,o)=>n(s,o,i):i;try{return this.currentDocument=Ea(e),JSON.stringify(e,a,r?.space)}finally{this.currentDocument=void 0}}deserialize(e,r={}){let n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){var l,u,h,f;if(!this.ignoreProperties.has(e))if(gs(r)){let d=r.ref,p=n?r.$refText:void 0;if(d){let g=Ea(d),m="";this.currentDocument&&this.currentDocument!==g&&(o?m=o(g.uri,r):m=g.uri.toString());let v=this.astNodeLocator.getAstNodePath(d);return{$ref:`${m}#${v}`,$refText:p}}else return{$error:(u=(l=r.error)===null||l===void 0?void 0:l.message)!==null&&u!==void 0?u:"Could not resolve reference",$refText:p}}else if(Bi(r)){let d;if(a&&(d=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!e||r.$document)&&d?.$textRegion&&(d.$textRegion.documentURI=(h=this.currentDocument)===null||h===void 0?void 0:h.uri.toString())),i&&!e&&(d??(d=Object.assign({},r)),d.$sourceText=(f=r.$cstNode)===null||f===void 0?void 0:f.text),s){d??(d=Object.assign({},r));let p=this.commentProvider.getComment(r);p&&(d.$comment=p.replace(/\r/g,""))}return d??r}else return r}addAstNodeRegionWithAssignmentsTo(e){let r=n=>({offset:n.offset,end:n.end,length:n.length,range:n.range});if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),i=n.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let s=Eq(e.$cstNode,a).map(r);s.length!==0&&(i[a]=s)}),e}}linkNode(e,r,n,i,a,s){for(let[l,u]of Object.entries(e))if(Array.isArray(u))for(let h=0;h{b();Ih();C5=class{register(e){if(!this.singleton&&!this.map){this.singleton=e;return}if(!this.map&&(this.map={},this.singleton)){for(let r of this.singleton.LanguageMetaData.fileExtensions)this.map[r]=this.singleton;this.singleton=void 0}for(let r of e.LanguageMetaData.fileExtensions)this.map[r]!==void 0&&this.map[r]!==e&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${e.LanguageMetaData.languageId}'.`),this.map[r]=e}getServices(e){if(this.singleton!==void 0)return this.singleton;if(this.map===void 0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let r=po.extname(e),n=this.map[r];if(!n)throw new Error(`The service registry contains no services for the extension '${r}'.`);return n}get all(){return this.singleton!==void 0?[this.singleton]:this.map!==void 0?Object.values(this.map):[]}}});function aL(t){return{code:t}}var Db,_5,A5=$(()=>{b();_b();wc();Go();(function(t){t.all=["fast","slow","built-in"]})(Db||(Db={}));_5=class{constructor(e){this.entries=new Nh,this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(let[i,a]of Object.entries(e)){let s=a;if(Array.isArray(s))for(let o of s){let l={check:this.wrapValidationException(o,r),category:n};this.addEntry(i,l)}else if(typeof s=="function"){let o={check:this.wrapValidationException(s,r),category:n};this.addEntry(i,o)}}}wrapValidationException(e,r){return async(n,i,a)=>{try{await e.call(r,n,i,a)}catch(s){if(Gp(s))throw s;console.error("An error occurred during validation:",s);let o=s instanceof Error?s.message:String(s);s instanceof Error&&s.stack&&console.error(s.stack),i("error","An error occurred during validation: "+o,{node:n})}}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=bn(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check)}}});function bCe(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=F3(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=Cq(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function sL(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}var L5,pd,fG=$(()=>{b();xc();vu();oo();pu();wc();A5();L5=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,r={},n=Or.CancellationToken.None){let i=e.parseResult,a=[];if(await Ca(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,a,r),r.stopAfterLexingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===pd.LexingError})||(this.processParsingErrors(i,a,r),r.stopAfterParsingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===pd.ParsingError}))||(this.processLinkingErrors(e,a,r),r.stopAfterLinkingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===pd.LinkingError}))))return a;try{a.push(...await this.validateAst(i.value,r,n))}catch(s){if(Gp(s))throw s;console.error("An error occurred during validation:",s)}return await Ca(n),a}processLexingErrors(e,r,n){for(let i of e.lexerErrors){let a={severity:sL("error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:aL(pd.LexingError),source:this.getSource()};r.push(a)}}processParsingErrors(e,r,n){for(let i of e.parserErrors){let a;if(isNaN(i.token.startOffset)){if("previousToken"in i){let s=i.previousToken;if(isNaN(s.startOffset)){let o={line:0,character:0};a={start:o,end:o}}else{let o={line:s.endLine-1,character:s.endColumn};a={start:o,end:o}}}}else a=Hy(i.token);if(a){let s={severity:sL("error"),range:a,message:i.message,data:aL(pd.ParsingError),source:this.getSource()};r.push(s)}}}processLinkingErrors(e,r,n){for(let i of e.references){let a=i.error;if(a){let s={node:a.container,property:a.property,index:a.index,data:{code:pd.LinkingError,containerType:a.container.$type,property:a.property,refText:a.reference.$refText}};r.push(this.toDiagnostic("error",a.message,s))}}}async validateAst(e,r,n=Or.CancellationToken.None){let i=[],a=(s,o,l)=>{i.push(this.toDiagnostic(s,o,l))};return await Promise.all(bc(e).map(async s=>{await Ca(n);let o=this.validationRegistry.getChecks(s.$type,r.categories);for(let l of o)await l(s,a,n)})),i}toDiagnostic(e,r,n){return{message:r,range:bCe(n),severity:sL(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};(function(t){t.LexingError="lexing-error",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(pd||(pd={}))});var M5,D5,dG=$(()=>{b();xc();mc();oo();pu();wc();Ih();M5=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n=Ea(e)){r??(r=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let a,s=()=>{var o;return a??(a=im((o=this.nameProvider.getNameNode(e))!==null&&o!==void 0?o:e.$cstNode))};return{node:e,name:r,get nameSegment(){return s()},selectionSegment:im(e.$cstNode),type:e.$type,documentUri:n.uri,path:i}}},D5=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=Or.CancellationToken.None){let n=[],i=e.parseResult.value;for(let a of bc(i))await Ca(r),Wy(a).filter(s=>!rm(s)).forEach(s=>{let o=this.createDescription(s);o&&n.push(o)});return n}createDescription(e){let r=e.reference.$nodeDescription,n=e.reference.$refNode;if(!r||!n)return;let i=Ea(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:im(n),local:po.equals(r.documentUri,i)}}}});var O5,pG=$(()=>{b();O5=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((i,a)=>{if(!i||a.length===0)return i;let s=a.indexOf(this.indexSeparator);if(s>0){let o=a.substring(0,s),l=parseInt(a.substring(s+1)),u=i[o];return u?.[l]}return i[a]},e)}}});var R5,gG=$(()=>{b();wc();R5=class{constructor(e){this._ready=new fo,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r,n;this.workspaceConfig=(n=(r=e.capabilities.workspace)===null||r===void 0?void 0:r.configuration)!==null&&n!==void 0?n:!1}async initialized(e){if(this.workspaceConfig){if(e.register){let r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let r=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((i,a)=>{this.updateSectionConfiguration(i.section,n[a])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(r=>{this.updateSectionConfiguration(r,e.settings[r])})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}}});var Mm,mG=$(()=>{b();(function(t){function e(r){return{dispose:async()=>await r()}}t.create=e})(Mm||(Mm={}))});var I5,vG=$(()=>{b();xc();mG();_b();wc();Go();A5();Cb();I5=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Nh,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Gn.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=Or.CancellationToken.None){var i,a;for(let s of e){let o=s.uri.toString();if(s.state===Gn.Validated){if(typeof r.validation=="boolean"&&r.validation)s.state=Gn.IndexedReferences,s.diagnostics=void 0,this.buildState.delete(o);else if(typeof r.validation=="object"){let l=this.buildState.get(o),u=(i=l?.result)===null||i===void 0?void 0:i.validationChecks;if(u){let f=((a=r.validation.categories)!==null&&a!==void 0?a:Db.all).filter(d=>!u.includes(d));f.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:f})},result:l.result}),s.state=Gn.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=Gn.Changed,await this.emitUpdate(e.map(s=>s.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=Or.CancellationToken.None){this.currentState=Gn.Changed;for(let s of r)this.langiumDocuments.deleteDocument(s),this.buildState.delete(s.toString()),this.indexManager.remove(s);for(let s of e){if(!this.langiumDocuments.invalidateDocument(s)){let l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);l.state=Gn.Changed,this.langiumDocuments.addDocument(l)}this.buildState.delete(s.toString())}let i=bn(e).concat(r).map(s=>s.toString()).toSet();this.langiumDocuments.all.filter(s=>!i.has(s.uri.toString())&&this.shouldRelink(s,i)).forEach(s=>{this.serviceRegistry.getServices(s.uri).references.Linker.unlink(s),s.state=Math.min(s.state,Gn.ComputedScopes),s.diagnostics=void 0}),await this.emitUpdate(e,r),await Ca(n);let a=this.langiumDocuments.all.filter(s=>{var o;return s.staten(e,r)))}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),Mm.create(()=>{let r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,Gn.Parsed,n,a=>this.langiumDocumentFactory.update(a,n)),await this.runCancelable(e,Gn.IndexedContent,n,a=>this.indexManager.updateContent(a,n)),await this.runCancelable(e,Gn.ComputedScopes,n,async a=>{let s=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.precomputedScopes=await s.computeLocalScopes(a,n)}),await this.runCancelable(e,Gn.Linked,n,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,n)),await this.runCancelable(e,Gn.IndexedReferences,n,a=>this.indexManager.updateReferences(a,n));let i=e.filter(a=>this.shouldValidate(a));await this.runCancelable(i,Gn.Validated,n,a=>this.validate(a,n));for(let a of e){let s=this.buildState.get(a.uri.toString());s&&(s.completed=!0)}}prepareBuild(e,r){for(let n of e){let i=n.uri.toString(),a=this.buildState.get(i);(!a||a.completed)&&this.buildState.set(i,{completed:!1,options:r,result:a?.result})}}async runCancelable(e,r,n,i){let a=e.filter(s=>s.state{this.buildPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let i;if(r&&"path"in r?i=r:n=r,n??(n=Or.CancellationToken.None),i){let a=this.langiumDocuments.getDocument(i);if(a&&a.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(Rh):new Promise((a,s)=>{let o=this.onBuildPhase(e,()=>{if(o.dispose(),l.dispose(),i){let u=this.langiumDocuments.getDocument(i);a(u?.uri)}else a(void 0)}),l=n.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(Rh)})})}async notifyBuildPhase(e,r,n){if(e.length===0)return;let i=this.buildPhaseListeners.get(r);for(let a of i)await Ca(n),await a(e,n)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){var n,i;let a=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,o=typeof s=="object"?s:void 0,l=await a.validateDocument(e,o,r);e.diagnostics?e.diagnostics.push(...l):e.diagnostics=l;let u=this.buildState.get(e.uri.toString());if(u){(n=u.result)!==null&&n!==void 0||(u.result={});let h=(i=o?.categories)!==null&&i!==void 0?i:Db.all;u.result.validationChecks?u.result.validationChecks.push(...h):u.result.validationChecks=[...h]}}getBuildOptions(e){var r,n;return(n=(r=this.buildState.get(e.uri.toString()))===null||r===void 0?void 0:r.options)!==null&&n!==void 0?n:{}}}});var N5,yG=$(()=>{b();oo();nL();xc();Go();Ih();N5=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Lm,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){let n=Ea(e).uri,i=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{po.equals(s.targetUri,n)&&s.targetPath===r&&i.push(s)})}),bn(i)}allElements(e,r){let n=bn(this.symbolIndex.keys());return r&&(n=n.filter(i=>!r||r.has(i))),n.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,r){var n;return r?this.symbolByTypeIndex.get(e,r,()=>{var a;return((a=this.symbolIndex.get(e))!==null&&a!==void 0?a:[]).filter(o=>this.astReflection.isSubtype(o.type,r))}):(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[]}remove(e){let r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r),this.referenceIndex.delete(r)}async updateContent(e,r=Or.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,r),a=e.uri.toString();this.symbolIndex.set(a,i),this.symbolByTypeIndex.clear(a)}async updateReferences(e,r=Or.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,r){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(i=>!i.local&&r.has(i.targetUri.toString())):!1}}});var P5,bG=$(()=>{b();xc();wc();Ih();P5=class{constructor(e){this.initialBuildOptions={},this._ready=new fo,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var r;this.folders=(r=e.workspaceFolders)!==null&&r!==void 0?r:void 0}initialized(e){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!==null&&n!==void 0?n:[],r)})}async initializeWorkspace(e,r=Or.CancellationToken.None){let n=await this.performStartup(e);await Ca(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){let r=this.serviceRegistry.all.flatMap(a=>a.LanguageMetaData.fileExtensions),n=[],i=a=>{n.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(a=>[a,this.getRootFolder(a)]).map(async a=>this.traverseFolder(...a,r,i))),this._ready.resolve(),n}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return Xo.parse(e.uri)}async traverseFolder(e,r,n,i){let a=await this.fileSystemProvider.readDirectory(r);await Promise.all(a.map(async s=>{if(this.includeEntry(e,s,n)){if(s.isDirectory)await this.traverseFolder(e,s.uri,n,i);else if(s.isFile){let o=await this.langiumDocuments.getOrCreateDocument(s.uri);i(o)}}}))}includeEntry(e,r,n){let i=po.basename(r.uri);if(i.startsWith("."))return!1;if(r.isDirectory)return i!=="node_modules"&&i!=="out";if(r.isFile){let a=po.extname(r.uri);return n.includes(a)}return!1}}});function xCe(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function wG(t){return t&&"modes"in t&&"defaultMode"in t}function xG(t){return!xCe(t)&&!wG(t)}var F5,kG=$(()=>{b();xm();F5=class{constructor(e){let r=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=xG(r)?Object.values(r):r;this.chevrotainLexer=new Gi(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var r;let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:(r=n.groups.hidden)!==null&&r!==void 0?r:[]}}toTokenTypeDictionary(e){if(xG(e))return e;let r=wG(e)?Object.values(e.modes).flat():e,n={};return r.forEach(i=>n[i.name]=i),n}}});function SG(t,e,r){let n,i;typeof t=="string"?(i=e,n=r):(i=t.range.start,n=e),i||(i=ln.create(0,0));let a=TCe(t),s=_G(n),o=Dxt({lines:a,position:i,options:s});return Pxt({index:0,tokens:o,position:i})}function CG(t,e){let r=_G(e),n=TCe(t);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],s=r.start,o=r.end;return!!s?.exec(i)&&!!o?.exec(a)}function TCe(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(mq)}function Dxt(t){var e,r,n;let i=[],a=t.position.line,s=t.position.character;for(let o=0;o=h.length){if(i.length>0){let p=ln.create(a,s);i.push({type:"break",content:"",range:Vr.create(p,p)})}}else{wCe.lastIndex=f;let p=wCe.exec(h);if(p){let g=p[0],m=p[1],v=ln.create(a,s+f),y=ln.create(a,s+f+g.length);i.push({type:"tag",content:m,range:Vr.create(v,y)}),f+=g.length,f=EG(h,f)}if(f0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function Oxt(t,e,r,n){let i=[];if(t.length===0){let a=ln.create(r,n),s=ln.create(r,n+e.length);i.push({type:"text",content:e,range:Vr.create(a,s)})}else{let a=0;for(let o of t){let l=o.index,u=e.substring(a,l);u.length>0&&i.push({type:"text",content:e.substring(a,l),range:Vr.create(ln.create(r,a+n),ln.create(r,l+n))});let h=u.length+1,f=o[1];if(i.push({type:"inline-tag",content:f,range:Vr.create(ln.create(r,a+h+n),ln.create(r,a+h+f.length+n))}),h+=f.length,o.length===4){h+=o[2].length;let d=o[3];i.push({type:"text",content:d,range:Vr.create(ln.create(r,a+h+n),ln.create(r,a+h+d.length+n))})}else i.push({type:"text",content:"",range:Vr.create(ln.create(r,a+h+n),ln.create(r,a+h+n))});a=l+o[0].length}let s=e.substring(a);s.length>0&&i.push({type:"text",content:s,range:Vr.create(ln.create(r,a+n),ln.create(r,a+n+s.length))})}return i}function EG(t,e){let r=t.substring(e).match(Rxt);return r?e+r.index:t.length}function Nxt(t){let e=t.match(Ixt);if(e&&typeof e.index=="number")return e.index}function Pxt(t){var e,r,n,i;let a=ln.create(t.position.line,t.position.character);if(t.tokens.length===0)return new oL([],Vr.create(a,a));let s=[];for(;t.index0){let l=EG(e,a);s=e.substring(l),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(s=`\`${s}\``),(i=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,e,s))!==null&&i!==void 0?i:Vxt(e,s)}}function Vxt(t,e){try{return Xo.parse(t,!0),`[${e}](${t})`}catch{return t}}function kCe(t){return t.endsWith(` `)?` `:` `}var wCe,Mxt,Rxt,Ixt,oL,B5,z5,lL,AG=$(()=>{b();IW();Yy();Ih();wCe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Mxt=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;Rxt=/\S/,Ixt=/\s*$/;oL=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let r of this.elements)if(e.length===0)e=r.toString();else{let n=r.toString();e+=kCe(e)+n}return e.trim()}toMarkdown(e){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{let i=n.toMarkdown(e);r+=kCe(r)+i}return r.trim()}},B5=class{constructor(e,r,n,i){this.name=e,this.content=r,this.inline=n,this.range=i}toString(){let e=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e} ${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r,n;return(n=(r=e?.renderTag)===null||r===void 0?void 0:r.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){let r=this.content.toMarkdown(e);if(this.inline){let a=$xt(this.name,r,e??{});if(typeof a=="string")return a}let n="";e?.tag==="italic"||e?.tag===void 0?n="*":e?.tag==="bold"?n="**":e?.tag==="bold-italic"&&(n="***");let i=`${n}@${this.name}${n}`;return this.content.inlines.length===1?i=`${i} \u2014 ${r}`:this.content.inlines.length>1&&(i=`${i} ${r}`),this.inline?`{${i}}`:i}};z5=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;rn.range.start.line&&(e+=` `)}return e}toMarkdown(e){let r="";for(let n=0;ni.range.start.line&&(r+=` `)}return r}},lL=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}}});var $5,LG=$(()=>{b();oo();AG();$5=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&CG(r))return SG(r).toMarkdown({renderLink:(i,a)=>this.documentationLinkRenderer(e,i,a),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,r,n){var i;let a=(i=this.findNameInPrecomputedScopes(e,r))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){let s=a.nameSegment.range.start.line+1,o=a.nameSegment.range.start.character+1,l=a.documentUri.with({fragment:`L${s},${o}`});return`[${n}](${l.toString()})`}else return}documentationTagRenderer(e,r){}findNameInPrecomputedScopes(e,r){let i=Ea(e).precomputedScopes;if(!i)return;let a=e;do{let o=i.get(a).find(l=>l.name===r);if(o)return o;a=a.$container}while(a)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(i=>i.name===r)}}});var V5,MG=$(()=>{b();iL();pu();V5=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return uG(e)?e.$comment:(r=oH(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text}}});var Si={};var DG=$(()=>{b();Tr(Si,Vi(ZW(),1))});var U5,OG,RG,IG=$(()=>{b();wc();DG();U5=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}},OG=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){let n=await this.acquireParserWorker(r),i=new fo,a,s=r.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(o=>{let l=this.hydrator.hydrate(o);i.resolve(l)}).catch(o=>{i.reject(o)}).finally(()=>{s.dispose(),clearTimeout(a)}),i.promise}terminateWorker(e){e.terminate();let r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new fo;return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(Rh)}),this.queue.push(r),r.promise}},RG=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,i){this.onReadyEmitter=new Si.Emitter,this.deferred=new fo,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,r(a=>{let s=a;this.deferred.resolve(s),this.unlock()}),n(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(Rh),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new fo,this.sendMessage(e),this.deferred.promise}}});var H5,NG=$(()=>{b();xc();wc();H5=class{constructor(){this.previousTokenSource=new Or.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let r=new Or.CancellationTokenSource;return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n){let i=new fo,a={action:r,deferred:i,cancellationToken:n??Or.CancellationToken.None};return e.push(a),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:i})=>{try{let a=await Promise.resolve().then(()=>r(i));n.resolve(a)}catch(a){Gp(a)?n.resolve(void 0):n.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var q5,PG=$(()=>{b();Y8();Ah();mc();oo();_b();pu();q5=class{constructor(e){this.grammarElementIdMap=new Am,this.tokenTypeIdMap=new Am,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map(r=>Object.assign({},r)),parserErrors:e.parserErrors.map(r=>Object.assign({},r)),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){let r=new Map,n=new Map;for(let i of bc(e))r.set(i,{});if(e.$cstNode)for(let i of nm(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let o of a)Bi(o)?s.push(this.dehydrateAstNode(o,r)):gs(o)?s.push(this.dehydrateReference(o,r)):s.push(o)}else Bi(a)?n[i]=this.dehydrateAstNode(a,r):gs(a)?n[i]=this.dehydrateReference(a,r):a!==void 0&&(n[i]=a);return n}dehydrateReference(e,r){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){let n=r.cstNodes.get(e);return E3(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),Tl(e)?n.content=e.content.map(i=>this.dehydrateCstNode(i,r)):$p(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){let r=new Map,n=new Map;for(let a of bc(e))r.set(a,{});let i;if(e.$cstNode)for(let a of nm(e.$cstNode)){let s;"fullText"in a?(s=new xb(a.fullText),i=s):"content"in a?s=new Em:"tokenType"in a&&(s=this.hydrateCstLeafNode(a)),s&&(n.set(a,s),s.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let o of a)Bi(o)?s.push(this.setParent(this.hydrateAstNode(o,r),n)):gs(o)?s.push(this.hydrateReference(o,n,i,r)):s.push(o)}else Bi(a)?n[i]=this.setParent(this.hydrateAstNode(a,r),n):gs(a)?n[i]=this.hydrateReference(a,n,i,r):a!==void 0&&(n[i]=a);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,i){return this.linker.buildReference(r,n,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){let i=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=r.astNodes.get(e.astNode),Tl(i))for(let a of e.content){let s=this.hydrateCstNode(a,r,n++);i.content.push(s)}return i}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,i=e.length,a=e.startLine,s=e.startColumn,o=e.endLine,l=e.endColumn,u=e.hidden;return new Tm(n,i,{start:{line:a,character:s},end:{line:o,character:l}},r,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap();let r=this.grammarElementIdMap.getKey(e);if(r)return r;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(let r of bc(this.grammar))A3(r)&&this.grammarElementIdMap.set(r,e++)}}});function _l(t){return{documentation:{CommentProvider:e=>new V5(e),DocumentationProvider:e=>new $5(e)},parser:{AsyncParser:e=>new U5(e),GrammarConfig:e=>Oq(e),LangiumParser:e=>UW(e),CompletionParser:e=>$W(e),ValueConverter:()=>new _m,TokenBuilder:()=>new Cm,Lexer:e=>new F5(e),ParserErrorMessageProvider:()=>new wb},workspace:{AstNodeLocator:()=>new O5,AstNodeDescriptionProvider:e=>new M5(e),ReferenceDescriptionProvider:e=>new D5(e)},references:{Linker:e=>new y5(e),NameProvider:()=>new b5,ScopeProvider:e=>new E5(e),ScopeComputation:e=>new w5(e),References:e=>new x5(e)},serializer:{Hydrator:e=>new q5(e),JsonSerializer:e=>new S5(e)},validation:{DocumentValidator:e=>new L5(e),ValidationRegistry:e=>new _5(e)},shared:()=>t.shared}}function Al(t){return{ServiceRegistry:()=>new C5,workspace:{LangiumDocuments:e=>new v5(e),LangiumDocumentFactory:e=>new m5(e),DocumentBuilder:e=>new I5(e),IndexManager:e=>new N5(e),WorkspaceManager:e=>new P5(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new H5,ConfigurationProvider:e=>new R5(e)}}}var FG=$(()=>{b();Rq();VW();HW();qW();WW();iG();aG();sG();oG();cG();iL();hG();fG();A5();dG();pG();gG();vG();Cb();yG();bG();kG();LG();MG();g5();IG();NG();PG()});function _a(t,e,r,n,i,a,s,o,l){let u=[t,e,r,n,i,a,s,o,l].reduce(cL,{});return MCe(u)}function LCe(t){if(t&&t[zG])for(let e of Object.values(t))LCe(e);return t}function MCe(t,e){let r=new Proxy({},{deleteProperty:()=>!1,get:(n,i)=>ACe(n,i,t,e||r),getOwnPropertyDescriptor:(n,i)=>(ACe(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),has:(n,i)=>i in t,ownKeys:()=>[...Reflect.ownKeys(t),zG]});return r[zG]=!0,r}function ACe(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===_Ce)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){let i=r[e];t[e]=_Ce;try{t[e]=typeof i=="function"?i(n):MCe(i,n)}catch(a){throw t[e]=a instanceof Error?a:void 0,a}return t[e]}else return}function cL(t,e){if(e){for(let[r,n]of Object.entries(e))if(n!==void 0){let i=t[r];i!==null&&n!==null&&typeof i=="object"&&typeof n=="object"?t[r]=cL(i,n):t[r]=n}}return t}var BG,zG,_Ce,$G=$(()=>{b();(function(t){t.merge=(e,r)=>cL(cL({},e),r)})(BG||(BG={}));zG=Symbol("isProxy");_Ce=Symbol()});var DCe=$(()=>{b()});var OCe=$(()=>{b();MG();LG();AG()});var RCe=$(()=>{b()});var ICe=$(()=>{b();Rq();RCe()});var NCe=$(()=>{b()});var PCe=$(()=>{b();IG();VW();Y8();HW();g5();kG();NCe();qW();WW()});var FCe=$(()=>{b();iG();aG();sG();lG();oG();cG()});var BCe=$(()=>{b();PG();iL()});var uL,Ll,VG=$(()=>{b();uL=class{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},Ll={fileSystemProvider:()=>new uL}});function qxt(){let t=_a(Al(Ll),Hxt),e=_a(_l({shared:t}),Uxt);return t.ServiceRegistry.register(e),e}function Yp(t){var e;let r=qxt(),n=r.serializer.JsonSerializer.deserialize(t);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,Xo.parse(`memory://${(e=n.name)!==null&&e!==void 0?e:"grammar"}.langium`)),n}var Uxt,Hxt,zCe=$(()=>{b();FG();$G();Ah();VG();Ih();Uxt={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},Hxt={AstReflection:()=>new qy}});var Ur={};Wt(Ur,{AstUtils:()=>j7,BiMap:()=>Am,Cancellation:()=>Or,ContextCache:()=>Lm,CstUtils:()=>P7,DONE_RESULT:()=>so,Deferred:()=>fo,Disposable:()=>Mm,DisposableCache:()=>Lb,DocumentCache:()=>rL,EMPTY_STREAM:()=>S3,ErrorWithLocation:()=>am,GrammarUtils:()=>e8,MultiMap:()=>Nh,OperationCancelled:()=>Rh,Reduction:()=>Uy,RegExpUtils:()=>Q7,SimpleCache:()=>T5,StreamImpl:()=>El,TreeStreamImpl:()=>_h,URI:()=>Xo,UriUtils:()=>po,WorkspaceCache:()=>Mb,assertUnreachable:()=>Vp,delayNextTick:()=>tG,interruptAndCheck:()=>Ca,isOperationCancelled:()=>Gp,loadGrammarFromJson:()=>Yp,setInterruptionPeriod:()=>hCe,startCancelableOperation:()=>uCe,stream:()=>bn});var $Ce=$(()=>{b();nL();DG();Tr(Ur,Si);_b();mG();F7();zCe();wc();Go();Ih();oo();xc();pu();vu();Yy()});var VCe=$(()=>{b();fG();A5()});var UCe=$(()=>{b();dG();pG();gG();vG();Cb();VG();yG();NG();bG()});var ja={};Wt(ja,{AbstractAstReflection:()=>tm,AbstractCstNode:()=>h5,AbstractLangiumParser:()=>f5,AbstractParserErrorMessageProvider:()=>X8,AbstractThreadedAsyncParser:()=>OG,AstUtils:()=>j7,BiMap:()=>Am,Cancellation:()=>Or,CompositeCstNodeImpl:()=>Em,ContextCache:()=>Lm,CstNodeBuilder:()=>u5,CstUtils:()=>P7,DONE_RESULT:()=>so,DatatypeSymbol:()=>j8,DefaultAstNodeDescriptionProvider:()=>M5,DefaultAstNodeLocator:()=>O5,DefaultAsyncParser:()=>U5,DefaultCommentProvider:()=>V5,DefaultConfigurationProvider:()=>R5,DefaultDocumentBuilder:()=>I5,DefaultDocumentValidator:()=>L5,DefaultHydrator:()=>q5,DefaultIndexManager:()=>N5,DefaultJsonSerializer:()=>S5,DefaultLangiumDocumentFactory:()=>m5,DefaultLangiumDocuments:()=>v5,DefaultLexer:()=>F5,DefaultLinker:()=>y5,DefaultNameProvider:()=>b5,DefaultReferenceDescriptionProvider:()=>D5,DefaultReferences:()=>x5,DefaultScopeComputation:()=>w5,DefaultScopeProvider:()=>E5,DefaultServiceRegistry:()=>C5,DefaultTokenBuilder:()=>Cm,DefaultValueConverter:()=>_m,DefaultWorkspaceLock:()=>H5,DefaultWorkspaceManager:()=>P5,Deferred:()=>fo,Disposable:()=>Mm,DisposableCache:()=>Lb,DocumentCache:()=>rL,DocumentState:()=>Gn,DocumentValidator:()=>pd,EMPTY_SCOPE:()=>Lxt,EMPTY_STREAM:()=>S3,EmptyFileSystem:()=>Ll,EmptyFileSystemProvider:()=>uL,ErrorWithLocation:()=>am,GrammarAST:()=>M3,GrammarUtils:()=>e8,JSDocDocumentationProvider:()=>$5,LangiumCompletionParser:()=>p5,LangiumParser:()=>d5,LangiumParserErrorMessageProvider:()=>wb,LeafCstNodeImpl:()=>Tm,MapScope:()=>k5,Module:()=>BG,MultiMap:()=>Nh,OperationCancelled:()=>Rh,ParserWorker:()=>RG,Reduction:()=>Uy,RegExpUtils:()=>Q7,RootCstNodeImpl:()=>xb,SimpleCache:()=>T5,StreamImpl:()=>El,StreamScope:()=>Ab,TextDocument:()=>Eb,TreeStreamImpl:()=>_h,URI:()=>Xo,UriUtils:()=>po,ValidationCategory:()=>Db,ValidationRegistry:()=>_5,ValueConverter:()=>Oh,WorkspaceCache:()=>Mb,assertUnreachable:()=>Vp,createCompletionParser:()=>$W,createDefaultCoreModule:()=>_l,createDefaultSharedCoreModule:()=>Al,createGrammarConfig:()=>Oq,createLangiumParser:()=>UW,delayNextTick:()=>tG,diagnosticData:()=>aL,eagerLoad:()=>LCe,getDiagnosticRange:()=>bCe,inject:()=>_a,interruptAndCheck:()=>Ca,isAstNode:()=>Bi,isAstNodeDescription:()=>nH,isAstNodeWithComment:()=>uG,isCompositeCstNode:()=>Tl,isIMultiModeLexerDefinition:()=>wG,isJSDoc:()=>CG,isLeafCstNode:()=>$p,isLinkingError:()=>rm,isNamed:()=>vCe,isOperationCancelled:()=>Gp,isReference:()=>gs,isRootCstNode:()=>E3,isTokenTypeArray:()=>xCe,isTokenTypeDictionary:()=>xG,loadGrammarFromJson:()=>Yp,parseJSDoc:()=>SG,prepareLangiumParser:()=>nCe,setInterruptionPeriod:()=>hCe,startCancelableOperation:()=>uCe,stream:()=>bn,toDiagnosticSeverity:()=>sL});var Ph=$(()=>{b();FG();$G();hG();DCe();mc();OCe();ICe();PCe();FCe();BCe();$Ce();Tr(ja,Ur);VCe();UCe();Ah()});function KCe(t){return bu.isInstance(t,XCe)}function ZCe(t){return bu.isInstance(t,UG)}function QCe(t){return bu.isInstance(t,HG)}function JCe(t){return bu.isInstance(t,jxt)}function e_e(t){return bu.isInstance(t,qG)}function r_e(t){return bu.isInstance(t,t_e)}function n_e(t){return bu.isInstance(t,WG)}function a_e(t){return bu.isInstance(t,i_e)}function o_e(t){return bu.isInstance(t,s_e)}function c_e(t){return bu.isInstance(t,l_e)}function h_e(t){return bu.isInstance(t,u_e)}var Wxt,$t,jCe,XCe,UG,Gxt,Yxt,HG,jxt,qG,t_e,WG,i_e,s_e,l_e,u_e,Xxt,f_e,bu,HCe,Kxt,qCe,Zxt,WCe,Qxt,GCe,Jxt,YCe,ewt,twt,rwt,nwt,iwt,awt,xu,GG,YG,jG,XG,KG,swt,owt,lwt,cwt,Ob,Dm,kc,uwt,Tc=$(()=>{b();Ph();Ph();Ph();Ph();Wxt=Object.defineProperty,$t=(t,e)=>Wxt(t,"name",{value:e,configurable:!0}),jCe="Statement",XCe="Architecture";$t(KCe,"isArchitecture");UG="Branch";$t(ZCe,"isBranch");Gxt="Checkout",Yxt="CherryPicking",HG="Commit";$t(QCe,"isCommit");jxt="Common";$t(JCe,"isCommon");qG="GitGraph";$t(e_e,"isGitGraph");t_e="Info";$t(r_e,"isInfo");WG="Merge";$t(n_e,"isMerge");i_e="Packet";$t(a_e,"isPacket");s_e="PacketBlock";$t(o_e,"isPacketBlock");l_e="Pie";$t(c_e,"isPie");u_e="PieSection";$t(h_e,"isPieSection");Xxt="Direction",f_e=class extends tm{static{$t(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(t,e){switch(t){case UG:case Gxt:case Yxt:case HG:case WG:return this.isSubtype(jCe,e);case Xxt:return this.isSubtype(qG,e);default:return!1}}getReferenceType(t){let e=`${t.container.$type}:${t.property}`;switch(e){default:throw new Error(`${e} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},bu=new f_e,Kxt=$t(()=>HCe??(HCe=Yp('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),Zxt=$t(()=>qCe??(qCe=Yp(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),Qxt=$t(()=>WCe??(WCe=Yp('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),Jxt=$t(()=>GCe??(GCe=Yp('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"ArchitectureGrammar"),ewt=$t(()=>YCe??(YCe=Yp(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),twt={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},rwt={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},nwt={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},iwt={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},awt={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},xu={AstReflection:$t(()=>new f_e,"AstReflection")},GG={Grammar:$t(()=>Kxt(),"Grammar"),LanguageMetaData:$t(()=>twt,"LanguageMetaData"),parser:{}},YG={Grammar:$t(()=>Zxt(),"Grammar"),LanguageMetaData:$t(()=>rwt,"LanguageMetaData"),parser:{}},jG={Grammar:$t(()=>Qxt(),"Grammar"),LanguageMetaData:$t(()=>nwt,"LanguageMetaData"),parser:{}},XG={Grammar:$t(()=>Jxt(),"Grammar"),LanguageMetaData:$t(()=>iwt,"LanguageMetaData"),parser:{}},KG={Grammar:$t(()=>ewt(),"Grammar"),LanguageMetaData:$t(()=>awt,"LanguageMetaData"),parser:{}},swt=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,owt=/accTitle[\t ]*:([^\n\r]*)/,lwt=/title([\t ][^\n\r]*|)/,cwt={ACC_DESCR:swt,ACC_TITLE:owt,TITLE:lwt},Ob=class extends _m{static{$t(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){let n=this.runCommonConverter(t,e,r);return n===void 0&&(n=this.runCustomConverter(t,e,r)),n===void 0?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){let n=cwt[t.name];if(n===void 0)return;let i=n.exec(e);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` `)}}},Dm=class extends Ob{static{$t(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},kc=class extends Cm{static{$t(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){let n=super.buildKeywordTokens(t,e,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},uwt=class extends kc{static{$t(this,"CommonTokenBuilder")}}});function fL(t=Ll){let e=_a(Al(t),xu),r=_a(_l({shared:e}),KG,hL);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}var hwt,hL,ZG=$(()=>{b();Tc();Ph();hwt=class extends kc{static{$t(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},hL={parser:{TokenBuilder:$t(()=>new hwt,"TokenBuilder"),ValueConverter:$t(()=>new Dm,"ValueConverter")}};$t(fL,"createGitGraphServices")});function pL(t=Ll){let e=_a(Al(t),xu),r=_a(_l({shared:e}),GG,dL);return e.ServiceRegistry.register(r),{shared:e,Info:r}}var fwt,dL,QG=$(()=>{b();Tc();Ph();fwt=class extends kc{static{$t(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},dL={parser:{TokenBuilder:$t(()=>new fwt,"TokenBuilder"),ValueConverter:$t(()=>new Dm,"ValueConverter")}};$t(pL,"createInfoServices")});function mL(t=Ll){let e=_a(Al(t),xu),r=_a(_l({shared:e}),YG,gL);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}var dwt,gL,JG=$(()=>{b();Tc();Ph();dwt=class extends kc{static{$t(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},gL={parser:{TokenBuilder:$t(()=>new dwt,"TokenBuilder"),ValueConverter:$t(()=>new Dm,"ValueConverter")}};$t(mL,"createPacketServices")});function yL(t=Ll){let e=_a(Al(t),xu),r=_a(_l({shared:e}),jG,vL);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}var pwt,gwt,vL,eY=$(()=>{b();Tc();Ph();pwt=class extends kc{static{$t(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},gwt=class extends Ob{static{$t(this,"PieValueConverter")}runCustomConverter(t,e,r){if(t.name==="PIE_SECTION_LABEL")return e.replace(/"/g,"").trim()}},vL={parser:{TokenBuilder:$t(()=>new pwt,"TokenBuilder"),ValueConverter:$t(()=>new gwt,"ValueConverter")}};$t(yL,"createPieServices")});function xL(t=Ll){let e=_a(Al(t),xu),r=_a(_l({shared:e}),XG,bL);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}var mwt,vwt,bL,tY=$(()=>{b();Tc();Ph();mwt=class extends kc{static{$t(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},vwt=class extends Ob{static{$t(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){if(t.name==="ARCH_ICON")return e.replace(/[()]/g,"").trim();if(t.name==="ARCH_TEXT_ICON")return e.replace(/["()]/g,"");if(t.name==="ARCH_TITLE")return e.replace(/[[\]]/g,"").trim()}},bL={parser:{TokenBuilder:$t(()=>new mwt,"TokenBuilder"),ValueConverter:$t(()=>new vwt,"ValueConverter")}};$t(xL,"createArchitectureServices")});var d_e={};Wt(d_e,{InfoModule:()=>dL,createInfoServices:()=>pL});var p_e=$(()=>{b();QG();Tc()});var g_e={};Wt(g_e,{PacketModule:()=>gL,createPacketServices:()=>mL});var m_e=$(()=>{b();JG();Tc()});var v_e={};Wt(v_e,{PieModule:()=>vL,createPieServices:()=>yL});var y_e=$(()=>{b();eY();Tc()});var b_e={};Wt(b_e,{ArchitectureModule:()=>bL,createArchitectureServices:()=>xL});var x_e=$(()=>{b();tY();Tc()});var w_e={};Wt(w_e,{GitGraphModule:()=>hL,createGitGraphServices:()=>fL});var k_e=$(()=>{b();ZG();Tc()});async function wu(t,e){let r=ywt[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);Om[t]||await r();let i=Om[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new bwt(i);return i.value}var Om,ywt,bwt,Rb=$(()=>{b();ZG();QG();JG();eY();tY();Tc();Om={},ywt={info:$t(async()=>{let{createInfoServices:t}=await Promise.resolve().then(()=>(p_e(),d_e)),e=t().Info.parser.LangiumParser;Om.info=e},"info"),packet:$t(async()=>{let{createPacketServices:t}=await Promise.resolve().then(()=>(m_e(),g_e)),e=t().Packet.parser.LangiumParser;Om.packet=e},"packet"),pie:$t(async()=>{let{createPieServices:t}=await Promise.resolve().then(()=>(y_e(),v_e)),e=t().Pie.parser.LangiumParser;Om.pie=e},"pie"),architecture:$t(async()=>{let{createArchitectureServices:t}=await Promise.resolve().then(()=>(x_e(),b_e)),e=t().Architecture.parser.LangiumParser;Om.architecture=e},"architecture"),gitGraph:$t(async()=>{let{createGitGraphServices:t}=await Promise.resolve().then(()=>(k_e(),w_e)),e=t().GitGraph.parser.LangiumParser;Om.gitGraph=e},"gitGraph")};$t(wu,"parse");bwt=class extends Error{constructor(t){let e=t.lexerErrors.map(n=>n.message).join(` `),r=t.parserErrors.map(n=>n.message).join(` `);super(`Parsing failed: ${e} ${r}`),this.result=t}static{$t(this,"MermaidParseError")}}});var M_e={};Wt(M_e,{diagram:()=>d4t});function TL(){return N$({length:7})}function E_e(t,e){let r=Object.create(null);return t.reduce((n,i)=>{let a=e(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}function rY(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function nY(t){let e=t.reduce((i,a)=>i.seq>a.seq?i:a,t[0]),r="";t.forEach(function(i){i===e?r+=" *":r+=" |"});let n=[r,e.id,e.seq];for(let i in At.records.branches)At.records.branches.get(i)===e.id&&n.push(i);if(ie.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let i=At.records.commits.get(e.parents[0]);rY(t,e,i),e.parents[1]&&t.push(At.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){let i=At.records.commits.get(e.parents[0]);rY(t,e,i)}}t=E_e(t,i=>i.id),nY(t)}var An,xwt,Im,At,wwt,kwt,Twt,Ewt,Swt,Cwt,_wt,S_e,Awt,Lwt,Mwt,Dwt,Owt,C_e,Rwt,Iwt,Nwt,__e,Pwt,Fwt,Bwt,zwt,$wt,Vwt,Uwt,Hwt,qwt,Ec,Xp,Kp,Fh,gd,Rm,Ko,Zo,wL,W5,kL,jp,Hr,Wwt,A_e,L_e,Gwt,Ywt,jwt,Xwt,Kwt,Zwt,Qwt,Jwt,e4t,t4t,r4t,n4t,T_e,i4t,G5,a4t,s4t,o4t,l4t,c4t,u4t,h4t,f4t,d4t,D_e=$(()=>{b();T3();R7();Qn();Sr();Rb();Cr();An={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},xwt=Er.gitGraph,Im=x(()=>Bo({...xwt,...rn().gitGraph}),"getConfig"),At=new Vy(()=>{let t=Im(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});x(TL,"getID");x(E_e,"uniqBy");wwt=x(function(t){At.records.direction=t},"setDirection"),kwt=x(function(t){ie.debug("options str",t),t=t?.trim(),t=t||"{}";try{At.records.options=JSON.parse(t)}catch(e){ie.error("error while parsing gitGraph options",e.message)}},"setOptions"),Twt=x(function(){return At.records.options},"getOptions"),Ewt=x(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags;ie.info("commit",e,r,n,i),ie.debug("Entering commit:",e,r,n,i);let a=Im();r=ct.sanitizeText(r,a),e=ct.sanitizeText(e,a),i=i?.map(o=>ct.sanitizeText(o,a));let s={id:r||At.records.seq+"-"+TL(),message:e,seq:At.records.seq++,type:n??An.NORMAL,tags:i??[],parents:At.records.head==null?[]:[At.records.head.id],branch:At.records.currBranch};At.records.head=s,ie.info("main branch",a.mainBranchName),At.records.commits.set(s.id,s),At.records.branches.set(At.records.currBranch,s.id),ie.debug("in pushCommit "+s.id)},"commit"),Swt=x(function(t){let e=t.name,r=t.order;if(e=ct.sanitizeText(e,Im()),At.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);At.records.branches.set(e,At.records.head!=null?At.records.head.id:null),At.records.branchConfig.set(e,{name:e,order:r}),S_e(e),ie.debug("in createBranch")},"branch"),Cwt=x(t=>{let e=t.branch,r=t.id,n=t.type,i=t.tags,a=Im();e=ct.sanitizeText(e,a),r&&(r=ct.sanitizeText(r,a));let s=At.records.branches.get(At.records.currBranch),o=At.records.branches.get(e),l=s?At.records.commits.get(s):void 0,u=o?At.records.commits.get(o):void 0;if(l&&u&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(At.records.currBranch===e){let d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(l===void 0||!l){let d=new Error(`Incorrect usage of "merge". Current branch (${At.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!At.records.branches.has(e)){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(u===void 0||!u){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},d}if(l===u){let d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(r&&At.records.commits.has(r)){let d=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id");throw d.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},d}let h=o||"",f={id:r||`${At.records.seq}-${TL()}`,message:`merged branch ${e} into ${At.records.currBranch}`,seq:At.records.seq++,parents:At.records.head==null?[]:[At.records.head.id,h],branch:At.records.currBranch,type:An.MERGE,customType:n,customId:!!r,tags:i??[]};At.records.head=f,At.records.commits.set(f.id,f),At.records.branches.set(At.records.currBranch,f.id),ie.debug(At.records.branches),ie.debug("in mergeBranch")},"merge"),_wt=x(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;ie.debug("Entering cherryPick:",e,r,n);let a=Im();if(e=ct.sanitizeText(e,a),r=ct.sanitizeText(r,a),n=n?.map(l=>ct.sanitizeText(l,a)),i=ct.sanitizeText(i,a),!e||!At.records.commits.has(e)){let l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},l}let s=At.records.commits.get(e);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===An.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!At.records.commits.has(r)){if(o===At.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let l=At.records.branches.get(At.records.currBranch);if(l===void 0||!l){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${At.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let u=At.records.commits.get(l);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${At.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let h={id:At.records.seq+"-"+TL(),message:`cherry-picked ${s?.message} into ${At.records.currBranch}`,seq:At.records.seq++,parents:At.records.head==null?[]:[At.records.head.id,s.id],branch:At.records.currBranch,type:An.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===An.MERGE?`|parent:${i}`:""}`]};At.records.head=h,At.records.commits.set(h.id,h),At.records.branches.set(At.records.currBranch,h.id),ie.debug(At.records.branches),ie.debug("in cherryPick")}},"cherryPick"),S_e=x(function(t){if(t=ct.sanitizeText(t,Im()),At.records.branches.has(t)){At.records.currBranch=t;let e=At.records.branches.get(At.records.currBranch);e===void 0||!e?At.records.head=null:At.records.head=At.records.commits.get(e)??null}else{let e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");x(rY,"upsert");x(nY,"prettyPrintCommitHistory");Awt=x(function(){ie.debug(At.records.commits);let t=C_e()[0];nY([t])},"prettyPrint"),Lwt=x(function(){At.reset(),zr()},"clear"),Mwt=x(function(){return[...At.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${r}`)}).sort((e,r)=>(e.order??0)-(r.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Dwt=x(function(){return At.records.branches},"getBranches"),Owt=x(function(){return At.records.commits},"getCommits"),C_e=x(function(){let t=[...At.records.commits.values()];return t.forEach(function(e){ie.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),Rwt=x(function(){return At.records.currBranch},"getCurrentBranch"),Iwt=x(function(){return At.records.direction},"getDirection"),Nwt=x(function(){return At.records.head},"getHead"),__e={commitType:An,getConfig:Im,setDirection:wwt,setOptions:kwt,getOptions:Twt,commit:Ewt,branch:Swt,merge:Cwt,cherryPick:_wt,checkout:S_e,prettyPrint:Awt,clear:Lwt,getBranchesAsObjArray:Mwt,getBranches:Dwt,getCommits:Owt,getCommitsArray:C_e,getCurrentBranch:Rwt,getDirection:Iwt,getHead:Nwt,setAccTitle:Wr,getAccTitle:Xr,getAccDescription:Zr,setAccDescription:Kr,setDiagramTitle:Cn,getDiagramTitle:vn},Pwt=x((t,e)=>{nd(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)Fwt(r,e)},"populate"),Fwt=x((t,e)=>{let n={Commit:x(i=>e.commit(Bwt(i)),"Commit"),Branch:x(i=>e.branch(zwt(i)),"Branch"),Merge:x(i=>e.merge($wt(i)),"Merge"),Checkout:x(i=>e.checkout(Vwt(i)),"Checkout"),CherryPicking:x(i=>e.cherryPick(Uwt(i)),"CherryPicking")}[t.$type];n?n(t):ie.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Bwt=x(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?An[t.type]:An.NORMAL,tags:t.tags??void 0}),"parseCommit"),zwt=x(t=>({name:t.name,order:t.order??0}),"parseBranch"),$wt=x(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?An[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Vwt=x(t=>t.branch,"parseCheckout"),Uwt=x(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Hwt={parse:x(async t=>{let e=await wu("gitGraph",t);ie.debug(e),Pwt(e,__e)},"parse")},qwt=Te(),Ec=qwt?.gitGraph,Xp=10,Kp=40,Fh=4,gd=2,Rm=8,Ko=new Map,Zo=new Map,wL=30,W5=new Map,kL=[],jp=0,Hr="LR",Wwt=x(()=>{Ko.clear(),Zo.clear(),W5.clear(),jp=0,kL=[],Hr="LR"},"clear"),A_e=x(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i)}),e},"drawText"),L_e=x(t=>{let e,r,n;return Hr==="BT"?(r=x((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=x((i,a)=>i>=a,"comparisonFunc"),n=0),t.forEach(i=>{let a=Hr==="TB"||Hr=="BT"?Zo.get(i)?.y:Zo.get(i)?.x;a!==void 0&&r(a,n)&&(e=i,n=a)}),e},"findClosestParent"),Gwt=x(t=>{let e="",r=1/0;return t.forEach(n=>{let i=Zo.get(n).y;i<=r&&(e=n,r=i)}),e||void 0},"findClosestParentBT"),Ywt=x((t,e,r)=>{let n=r,i=r,a=[];t.forEach(s=>{let o=e.get(s);if(!o)throw new Error(`Commit not found for key ${s}`);o.parents.length?(n=Xwt(o),i=Math.max(n,i)):a.push(o),Kwt(o,n)}),n=i,a.forEach(s=>{Zwt(s,n,r)}),t.forEach(s=>{let o=e.get(s);if(o?.parents.length){let l=Gwt(o.parents);n=Zo.get(l).y-Kp,n<=i&&(i=n);let u=Ko.get(o.branch).pos,h=n-Xp;Zo.set(o.id,{x:u,y:h})}})},"setParallelBTPos"),jwt=x(t=>{let e=L_e(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=Zo.get(e)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),Xwt=x(t=>jwt(t)+Kp,"calculateCommitPosition"),Kwt=x((t,e)=>{let r=Ko.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,i=e+Xp;return Zo.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),Zwt=x((t,e,r)=>{let n=Ko.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let i=e+r,a=n.pos;Zo.set(t.id,{x:a,y:i})},"setRootPosition"),Qwt=x((t,e,r,n,i,a)=>{if(a===An.HIGHLIGHT)t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%Rm} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%Rm} ${n}-inner`);else if(a===An.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`);else{let s=t.append("circle");if(s.attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===An.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%Rm}`),a===An.MERGE){let o=t.append("circle");o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",6),o.attr("class",`commit ${n} ${e.id} commit${i%Rm}`)}a===An.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${e.id} commit${i%Rm}`)}},"drawCommitBullet"),Jwt=x((t,e,r,n)=>{if(e.type!==An.CHERRY_PICK&&(e.customId&&e.type===An.MERGE||e.type!==An.MERGE)&&Ec?.showCommitLabel){let i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),s=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),o=s.node()?.getBBox();if(o&&(a.attr("x",r.posWithOffset-o.width/2-gd).attr("y",r.y+13.5).attr("width",o.width+2*gd).attr("height",o.height+2*gd),Hr==="TB"||Hr==="BT"?(a.attr("x",r.x-(o.width+4*Fh+5)).attr("y",r.y-12),s.attr("x",r.x-(o.width+4*Fh)).attr("y",r.y+o.height-12)):s.attr("x",r.posWithOffset-o.width/2),Ec.rotateCommitLabel))if(Hr==="TB"||Hr==="BT")s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let l=-7.5-(o.width+10)/25*9.5,u=10+o.width/25*8.5;i.attr("transform","translate("+l+", "+u+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),e4t=x((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,s=0,o=[];for(let l of e.tags.reverse()){let u=t.insert("polygon"),h=t.append("circle"),f=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(l),d=f.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),s=Math.max(s,d.height),f.attr("x",r.posWithOffset-d.width/2),o.push({tag:f,hole:h,rect:u,yOffset:i}),i+=20}for(let{tag:l,hole:u,rect:h,yOffset:f}of o){let d=s/2,p=r.y-19.2-f;if(h.attr("class","tag-label-bkg").attr("points",` ${n-a/2-Fh/2},${p+gd} ${n-a/2-Fh/2},${p-gd} ${r.posWithOffset-a/2-Fh},${p-d-gd} ${r.posWithOffset+a/2+Fh},${p-d-gd} ${r.posWithOffset+a/2+Fh},${p+d+gd} ${r.posWithOffset-a/2-Fh},${p+d+gd}`),u.attr("cy",p).attr("cx",n-a/2+Fh/2).attr("r",1.5).attr("class","tag-hole"),Hr==="TB"||Hr==="BT"){let g=n+f;h.attr("class","tag-label-bkg").attr("points",` ${r.x},${g+2} ${r.x},${g-2} ${r.x+Xp},${g-d-2} ${r.x+Xp+a+4},${g-d-2} ${r.x+Xp+a+4},${g+d+2} ${r.x+Xp},${g+d+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("cx",r.x+Fh/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),l.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),t4t=x(t=>{switch(t.customType??t.type){case An.NORMAL:return"commit-normal";case An.REVERSE:return"commit-reverse";case An.HIGHLIGHT:return"commit-highlight";case An.MERGE:return"commit-merge";case An.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),r4t=x((t,e,r,n)=>{let i={x:0,y:0};if(t.parents.length>0){let a=L_e(t.parents);if(a){let s=n.get(a)??i;return e==="TB"?s.y+Kp:e==="BT"?(n.get(t.id)??i).y-Kp:s.x+Kp}}else return e==="TB"?wL:e==="BT"?(n.get(t.id)??i).y-Kp:0;return 0},"calculatePosition"),n4t=x((t,e,r)=>{let n=Hr==="BT"&&r?e:e+Xp,i=Hr==="TB"||Hr==="BT"?n:Ko.get(t.branch)?.pos,a=Hr==="TB"||Hr==="BT"?Ko.get(t.branch)?.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:n}},"getCommitPosition"),T_e=x((t,e,r)=>{if(!Ec)throw new Error("GitGraph config not found");let n=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels"),a=Hr==="TB"||Hr==="BT"?wL:0,s=[...e.keys()],o=Ec?.parallelCommits??!1,l=x((h,f)=>{let d=e.get(h)?.seq,p=e.get(f)?.seq;return d!==void 0&&p!==void 0?d-p:0},"sortKeys"),u=s.sort(l);Hr==="BT"&&(o&&Ywt(u,e,a),u=u.reverse()),u.forEach(h=>{let f=e.get(h);if(!f)throw new Error(`Commit not found for key ${h}`);o&&(a=r4t(f,Hr,a,Zo));let d=n4t(f,a,o);if(r){let p=t4t(f),g=f.customType??f.type,m=Ko.get(f.branch)?.index??0;Qwt(n,f,d,p,m,g),Jwt(i,f,d,a),e4t(i,f,d,a)}Hr==="TB"||Hr==="BT"?Zo.set(f.id,{x:d.x,y:d.posWithOffset}):Zo.set(f.id,{x:d.posWithOffset,y:d.y}),a=Hr==="BT"&&o?a+Kp:a+Kp+Xp,a>jp&&(jp=a)})},"drawCommits"),i4t=x((t,e,r,n,i)=>{let s=(Hr==="TB"||Hr==="BT"?r.xu.branch===s,"isOnBranchToGetCurve"),l=x(u=>u.seq>t.seq&&u.seql(u)&&o(u))},"shouldRerouteArrow"),G5=x((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(kL.every(s=>Math.abs(s-n)>=10))return kL.push(n),n;let a=Math.abs(t-e);return G5(t,e-a/5,r+1)},"findLane"),a4t=x((t,e,r,n)=>{let i=Zo.get(e.id),a=Zo.get(r.id);if(i===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);let s=i4t(e,r,i,a,n),o="",l="",u=0,h=0,f=Ko.get(r.branch)?.index;r.type===An.MERGE&&e.id!==r.parents[0]&&(f=Ko.get(e.branch)?.index);let d;if(s){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,h=10;let p=i.ya.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===An.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${l} ${i.x-h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x+u} ${i.y} ${o} ${a.x} ${i.y+h} L ${a.x} ${a.y}`),i.x===a.x&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):Hr==="BT"?(i.xa.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===An.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${o} ${i.x-h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`),i.x===a.x&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.ya.y&&(r.type===An.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${l} ${i.x+h} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+f%Rm)},"drawArrow"),s4t=x((t,e)=>{let r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{let i=e.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{a4t(r,e.get(a),i,e)})})},"drawArrows"),o4t=x((t,e)=>{let r=t.append("g");e.forEach((n,i)=>{let a=i%Rm,s=Ko.get(n.name)?.pos;if(s===void 0)throw new Error(`Position not found for branch ${n.name}`);let o=r.append("line");o.attr("x1",0),o.attr("y1",s),o.attr("x2",jp),o.attr("y2",s),o.attr("class","branch branch"+a),Hr==="TB"?(o.attr("y1",wL),o.attr("x1",s),o.attr("y2",jp),o.attr("x2",s)):Hr==="BT"&&(o.attr("y1",jp),o.attr("x1",s),o.attr("y2",wL),o.attr("x2",s)),kL.push(s);let l=n.name,u=A_e(l),h=r.insert("rect"),d=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);d.node().appendChild(u);let p=u.getBBox();h.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-p.width-4-(Ec?.rotateCommitLabel===!0?30:0)).attr("y",-p.height/2+8).attr("width",p.width+18).attr("height",p.height+4),d.attr("transform","translate("+(-p.width-14-(Ec?.rotateCommitLabel===!0?30:0))+", "+(s-p.height/2-1)+")"),Hr==="TB"?(h.attr("x",s-p.width/2-10).attr("y",0),d.attr("transform","translate("+(s-p.width/2-5)+", 0)")):Hr==="BT"?(h.attr("x",s-p.width/2-10).attr("y",jp),d.attr("transform","translate("+(s-p.width/2-5)+", "+jp+")")):h.attr("transform","translate(-19, "+(s-p.height/2)+")")})},"drawBranches"),l4t=x(function(t,e,r,n,i){return Ko.set(t,{pos:e,index:r}),e+=50+(i?40:0)+(Hr==="TB"||Hr==="BT"?n.width/2:0),e},"setBranchPosition"),c4t=x(function(t,e,r,n){if(Wwt(),ie.debug("in gitgraph renderer",t+` `,"id:",e,r),!Ec)throw new Error("GitGraph config not found");let i=Ec.rotateCommitLabel??!1,a=n.db;W5=a.getCommits();let s=a.getBranchesAsObjArray();Hr=a.getDirection();let o=Je(`[id="${e}"]`),l=0;s.forEach((u,h)=>{let f=A_e(u.name),d=o.append("g"),p=d.insert("g").attr("class","branchLabel"),g=p.insert("g").attr("class","label branch-label");g.node()?.appendChild(f);let m=f.getBBox();l=l4t(u.name,l,h,m,i),g.remove(),p.remove(),d.remove()}),T_e(o,W5,!1),Ec.showBranches&&o4t(o,s),s4t(o,W5),T_e(o,W5,!0),tr.insertTitle(o,"gitTitleText",Ec.titleTopMargin??0,a.getDiagramTitle()),yF(void 0,o,Ec.diagramPadding,Ec.useMaxWidth)},"draw"),u4t={draw:c4t},h4t=x(t=>` .commit-id, .commit-msg, .branch-label { fill: lightgrey; color: lightgrey; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); } ${[0,1,2,3,4,5,6,7].map(e=>` .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } .label${e} { fill: ${t["git"+e]}; } .arrow${e} { stroke: ${t["git"+e]}; } `).join(` `)} .branch { stroke-width: 1; stroke: ${t.lineColor}; stroke-dasharray: 2; } .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } .tag-hole { fill: ${t.textColor}; } .commit-merge { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; } .commit-reverse { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; stroke-width: 3; } .commit-highlight-outer { } .commit-highlight-inner { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; } .arrow { stroke-width: 8; stroke-linecap: round; fill: none} .gitTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } `,"getStyles"),f4t=h4t,d4t={parser:Hwt,db:__e,renderer:u4t,styles:f4t}});var O_e=Ke((iY,aY)=>{b();(function(t,e){typeof iY=="object"&&typeof aY<"u"?aY.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(iY,function(){"use strict";var t="day";return function(e,r,n){var i=function(o){return o.add(4-o.isoWeekday(),t)},a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(o){if(!this.$utils().u(o))return this.add(7*(o-this.isoWeek()),t);var l,u,h,f,d=i(this),p=(l=this.isoWeekYear(),u=this.$u,h=(u?n.utc:n)().year(l).startOf("year"),f=4-h.isoWeekday(),h.isoWeekday()>4&&(f+=7),h.add(f,t));return d.diff(p,"week")+1},a.isoWeekday=function(o){return this.$utils().u(o)?this.day()||7:this.day(this.day()%7?o:o-7)};var s=a.startOf;a.startOf=function(o,l){var u=this.$utils(),h=!!u.u(l)||l;return u.p(o)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(o,l)}}})});var R_e=Ke((sY,oY)=>{b();(function(t,e){typeof sY=="object"&&typeof oY<"u"?oY.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(sY,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},o=function(g){return(g=+g)+(g>68?1900:2e3)},l=function(g){return function(m){this[g]=+m}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(m){if(!m||m==="Z")return 0;var v=m.match(/([+-]|\d\d)/g),y=60*v[1]+(+v[2]||0);return y===0?0:v[0]==="+"?-y:y}(g)}],h=function(g){var m=s[g];return m&&(m.indexOf?m:m.s.concat(m.f))},f=function(g,m){var v,y=s.meridiem;if(y){for(var w=1;w<=24;w+=1)if(g.indexOf(y(w,0,m))>-1){v=w>12;break}}else v=g===(m?"pm":"PM");return v},d={A:[a,function(g){this.afternoon=f(g,!1)}],a:[a,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[a,function(g){var m=s.ordinal,v=g.match(/\d+/);if(this.day=v[0],m)for(var y=1;y<=31;y+=1)m(y).replace(/\[|\]/g,"")===g&&(this.day=y)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MMM:[a,function(g){var m=h("months"),v=(h("monthsShort")||m.map(function(y){return y.slice(0,3)})).indexOf(g)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[a,function(g){var m=h("months").indexOf(g)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(g){this.year=o(g)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function p(g){var m,v;m=g,v=s&&s.formats;for(var y=(g=m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,M,I){var O=I&&I.toUpperCase();return M||v[I]||t[I]||v[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,R,D){return R||D.slice(1)})})).match(e),w=y.length,k=0;k-1)return new Date((A==="X"?1e3:1)*P);var B=p(A)(P),V=B.year,z=B.month,H=B.day,K=B.hours,X=B.minutes,ne=B.seconds,j=B.milliseconds,ee=B.zone,Q=B.week,G=new Date,Z=H||(V||z?1:G.getDate()),te=V||G.getFullYear(),oe=0;V&&!z||(oe=z>0?z-1:G.getMonth());var de,pe=K||0,re=X||0,Be=ne||0,le=j||0;return ee?new Date(Date.UTC(te,oe,Z,pe,re,Be,le+60*ee.offset*1e3)):N?new Date(Date.UTC(te,oe,Z,pe,re,Be,le)):(de=new Date(te,oe,Z,pe,re,Be,le),Q&&(de=F(de).week(Q).toDate()),de)}catch{return new Date("")}}(E,L,T,v),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),I&&E!=this.format(L)&&(this.$d=new Date("")),s={}}else if(L instanceof Array)for(var C=L.length,R=1;R<=C;R+=1){S[1]=L[R-1];var D=v.apply(this,S);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}R===C&&(this.$d=new Date(""))}else w.call(this,k)}}})});var I_e=Ke((lY,cY)=>{b();(function(t,e){typeof lY=="object"&&typeof cY<"u"?cY.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(lY,function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(i){var a=this,s=this.$locale();if(!this.isValid())return n.bind(this)(i);var o=this.$utils(),l=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(u){switch(u){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return o.s(a.week(),u==="w"?1:2,"0");case"W":case"WW":return o.s(a.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return o.s(String(a.$H===0?24:a.$H),u==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return u}});return n.bind(this)(l)}}})});var K_e={};Wt(K_e,{diagram:()=>n3t});function TY(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",s=new RegExp(a);t[0].match(s)&&(e[i]=!0,t.shift(1),n=!0)})}var B_e,Ml,z_e,$_e,V_e,CL,uY,p4t,N_e,Bh,pY,gY,mY,Y5,j5,vY,yY,_L,Nb,bY,U_e,xY,X5,wY,kY,AL,hY,g4t,m4t,v4t,y4t,b4t,x4t,w4t,k4t,T4t,E4t,S4t,C4t,_4t,A4t,L4t,M4t,D4t,O4t,R4t,I4t,N4t,P4t,F4t,H_e,B4t,z4t,$4t,q_e,V4t,fY,W_e,G_e,EL,Ib,U4t,H4t,dY,SL,Aa,Y_e,q4t,Nm,W4t,P_e,G4t,j_e,Y4t,X_e,j4t,X4t,K4t,Z4t,F_e,Q4t,md,J4t,e3t,t3t,r3t,n3t,Z_e=$(()=>{b();Qn();Sr();B_e=Vi(kv(),1),Ml=Vi(HS(),1),z_e=Vi(O_e(),1),$_e=Vi(R_e(),1),V_e=Vi(I_e(),1),CL=Vi(HS(),1);Cr();uY=function(){var t=x(function(R,D,P,A){for(P=P||{},A=R.length;A--;P[R[A]]=D);return P},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],a=[1,29],s=[1,30],o=[1,31],l=[1,32],u=[1,33],h=[1,34],f=[1,9],d=[1,10],p=[1,11],g=[1,12],m=[1,13],v=[1,14],y=[1,15],w=[1,16],k=[1,19],E=[1,20],T=[1,21],S=[1,22],L=[1,23],_=[1,25],M=[1,35],I={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:x(function(D,P,A,N,F,B,V){var z=B.length-1;switch(F){case 1:return B[z-1];case 2:this.$=[];break;case 3:B[z-1].push(B[z]),this.$=B[z-1];break;case 4:case 5:this.$=B[z];break;case 6:case 7:this.$=[];break;case 8:N.setWeekday("monday");break;case 9:N.setWeekday("tuesday");break;case 10:N.setWeekday("wednesday");break;case 11:N.setWeekday("thursday");break;case 12:N.setWeekday("friday");break;case 13:N.setWeekday("saturday");break;case 14:N.setWeekday("sunday");break;case 15:N.setWeekend("friday");break;case 16:N.setWeekend("saturday");break;case 17:N.setDateFormat(B[z].substr(11)),this.$=B[z].substr(11);break;case 18:N.enableInclusiveEndDates(),this.$=B[z].substr(18);break;case 19:N.TopAxis(),this.$=B[z].substr(8);break;case 20:N.setAxisFormat(B[z].substr(11)),this.$=B[z].substr(11);break;case 21:N.setTickInterval(B[z].substr(13)),this.$=B[z].substr(13);break;case 22:N.setExcludes(B[z].substr(9)),this.$=B[z].substr(9);break;case 23:N.setIncludes(B[z].substr(9)),this.$=B[z].substr(9);break;case 24:N.setTodayMarker(B[z].substr(12)),this.$=B[z].substr(12);break;case 27:N.setDiagramTitle(B[z].substr(6)),this.$=B[z].substr(6);break;case 28:this.$=B[z].trim(),N.setAccTitle(this.$);break;case 29:case 30:this.$=B[z].trim(),N.setAccDescription(this.$);break;case 31:N.addSection(B[z].substr(8)),this.$=B[z].substr(8);break;case 33:N.addTask(B[z-1],B[z]),this.$="task";break;case 34:this.$=B[z-1],N.setClickEvent(B[z-1],B[z],null);break;case 35:this.$=B[z-2],N.setClickEvent(B[z-2],B[z-1],B[z]);break;case 36:this.$=B[z-2],N.setClickEvent(B[z-2],B[z-1],null),N.setLink(B[z-2],B[z]);break;case 37:this.$=B[z-3],N.setClickEvent(B[z-3],B[z-2],B[z-1]),N.setLink(B[z-3],B[z]);break;case 38:this.$=B[z-2],N.setClickEvent(B[z-2],B[z],null),N.setLink(B[z-2],B[z-1]);break;case 39:this.$=B[z-3],N.setClickEvent(B[z-3],B[z-1],B[z]),N.setLink(B[z-3],B[z-2]);break;case 40:this.$=B[z-1],N.setLink(B[z-1],B[z]);break;case 41:case 47:this.$=B[z-1]+" "+B[z];break;case 42:case 43:case 45:this.$=B[z-2]+" "+B[z-1]+" "+B[z];break;case 44:case 46:this.$=B[z-3]+" "+B[z-2]+" "+B[z-1]+" "+B[z];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:v,28:y,29:w,30:k,31:E,33:T,35:S,36:L,37:24,38:_,40:M},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:v,28:y,29:w,30:k,31:E,33:T,35:S,36:L,37:24,38:_,40:M},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:x(function(D,P){if(P.recoverable)this.trace(D);else{var A=new Error(D);throw A.hash=P,A}},"parseError"),parse:x(function(D){var P=this,A=[0],N=[],F=[null],B=[],V=this.table,z="",H=0,K=0,X=0,ne=2,j=1,ee=B.slice.call(arguments,1),Q=Object.create(this.lexer),G={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(G.yy[Z]=this.yy[Z]);Q.setInput(D,G.yy),G.yy.lexer=Q,G.yy.parser=this,typeof Q.yylloc>"u"&&(Q.yylloc={});var te=Q.yylloc;B.push(te);var oe=Q.options&&Q.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function de(Y){A.length=A.length-2*Y,F.length=F.length-Y,B.length=B.length-Y}x(de,"popStack");function pe(){var Y;return Y=N.pop()||Q.lex()||j,typeof Y!="number"&&(Y instanceof Array&&(N=Y,Y=N.pop()),Y=P.symbols_[Y]||Y),Y}x(pe,"lex");for(var re,Be,le,Se,Ye,We,Ze={},Qe,et,ze,He;;){if(le=A[A.length-1],this.defaultActions[le]?Se=this.defaultActions[le]:((re===null||typeof re>"u")&&(re=pe()),Se=V[le]&&V[le][re]),typeof Se>"u"||!Se.length||!Se[0]){var Ee="";He=[];for(Qe in V[le])this.terminals_[Qe]&&Qe>ne&&He.push("'"+this.terminals_[Qe]+"'");Q.showPosition?Ee="Parse error on line "+(H+1)+`: `+Q.showPosition()+` Expecting `+He.join(", ")+", got '"+(this.terminals_[re]||re)+"'":Ee="Parse error on line "+(H+1)+": Unexpected "+(re==j?"end of input":"'"+(this.terminals_[re]||re)+"'"),this.parseError(Ee,{text:Q.match,token:this.terminals_[re]||re,line:Q.yylineno,loc:te,expected:He})}if(Se[0]instanceof Array&&Se.length>1)throw new Error("Parse Error: multiple actions possible at state: "+le+", token: "+re);switch(Se[0]){case 1:A.push(re),F.push(Q.yytext),B.push(Q.yylloc),A.push(Se[1]),re=null,Be?(re=Be,Be=null):(K=Q.yyleng,z=Q.yytext,H=Q.yylineno,te=Q.yylloc,X>0&&X--);break;case 2:if(et=this.productions_[Se[1]][1],Ze.$=F[F.length-et],Ze._$={first_line:B[B.length-(et||1)].first_line,last_line:B[B.length-1].last_line,first_column:B[B.length-(et||1)].first_column,last_column:B[B.length-1].last_column},oe&&(Ze._$.range=[B[B.length-(et||1)].range[0],B[B.length-1].range[1]]),We=this.performAction.apply(Ze,[z,K,H,G.yy,Se[1],F,B].concat(ee)),typeof We<"u")return We;et&&(A=A.slice(0,-1*et*2),F=F.slice(0,-1*et),B=B.slice(0,-1*et)),A.push(this.productions_[Se[1]][0]),F.push(Ze.$),B.push(Ze._$),ze=V[A[A.length-2]][A[A.length-1]],A.push(ze);break;case 3:return!0}}return!0},"parse")},O=function(){var R={EOF:1,parseError:x(function(P,A){if(this.yy.parser)this.yy.parser.parseError(P,A);else throw new Error(P)},"parseError"),setInput:x(function(D,P){return this.yy=P||this.yy||{},this._input=D,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var D=this._input[0];this.yytext+=D,this.yyleng++,this.offset++,this.match+=D,this.matched+=D;var P=D.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),D},"input"),unput:x(function(D){var P=D.length,A=D.split(/(?:\r\n?|\n)/g);this._input=D+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var N=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var F=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===N.length?this.yylloc.first_column:0)+N[N.length-A.length].length-A[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(D){this.unput(this.match.slice(D))},"less"),pastInput:x(function(){var D=this.matched.substr(0,this.matched.length-this.match.length);return(D.length>20?"...":"")+D.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var D=this.match;return D.length<20&&(D+=this._input.substr(0,20-D.length)),(D.substr(0,20)+(D.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var D=this.pastInput(),P=new Array(D.length+1).join("-");return D+this.upcomingInput()+` `+P+"^"},"showPosition"),test_match:x(function(D,P){var A,N,F;if(this.options.backtrack_lexer&&(F={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(F.yylloc.range=this.yylloc.range.slice(0))),N=D[0].match(/(?:\r\n?|\n).*/g),N&&(this.yylineno+=N.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:N?N[N.length-1].length-N[N.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+D[0].length},this.yytext+=D[0],this.match+=D[0],this.matches=D,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(D[0].length),this.matched+=D[0],A=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var B in F)this[B]=F[B];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var D,P,A,N;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),B=0;BP[0].length)){if(P=A,N=B,this.options.backtrack_lexer){if(D=this.test_match(A,F[B]),D!==!1)return D;if(this._backtrack){P=!1;continue}else return!1}else if(!this.options.flex)break}return P?(D=this.test_match(P,F[N]),D!==!1?D:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var P=this.next();return P||this.lex()},"lex"),begin:x(function(P){this.conditionStack.push(P)},"begin"),popState:x(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},"topState"),pushState:x(function(P){this.begin(P)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(P,A,N,F){var B=F;switch(N){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return R}();I.lexer=O;function C(){this.yy={}}return x(C,"Parser"),C.prototype=I,I.Parser=C,new C}();uY.parser=uY;p4t=uY;Ml.default.extend(z_e.default);Ml.default.extend($_e.default);Ml.default.extend(V_e.default);N_e={friday:5,saturday:6},Bh="",pY="",gY=void 0,mY="",Y5=[],j5=[],vY=new Map,yY=[],_L=[],Nb="",bY="",U_e=["active","done","crit","milestone"],xY=[],X5=!1,wY=!1,kY="sunday",AL="saturday",hY=0,g4t=x(function(){yY=[],_L=[],Nb="",xY=[],EL=0,dY=void 0,SL=void 0,Aa=[],Bh="",pY="",bY="",gY=void 0,mY="",Y5=[],j5=[],X5=!1,wY=!1,hY=0,vY=new Map,zr(),kY="sunday",AL="saturday"},"clear"),m4t=x(function(t){pY=t},"setAxisFormat"),v4t=x(function(){return pY},"getAxisFormat"),y4t=x(function(t){gY=t},"setTickInterval"),b4t=x(function(){return gY},"getTickInterval"),x4t=x(function(t){mY=t},"setTodayMarker"),w4t=x(function(){return mY},"getTodayMarker"),k4t=x(function(t){Bh=t},"setDateFormat"),T4t=x(function(){X5=!0},"enableInclusiveEndDates"),E4t=x(function(){return X5},"endDatesAreInclusive"),S4t=x(function(){wY=!0},"enableTopAxis"),C4t=x(function(){return wY},"topAxisEnabled"),_4t=x(function(t){bY=t},"setDisplayMode"),A4t=x(function(){return bY},"getDisplayMode"),L4t=x(function(){return Bh},"getDateFormat"),M4t=x(function(t){Y5=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),D4t=x(function(){return Y5},"getIncludes"),O4t=x(function(t){j5=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),R4t=x(function(){return j5},"getExcludes"),I4t=x(function(){return vY},"getLinks"),N4t=x(function(t){Nb=t,yY.push(t)},"addSection"),P4t=x(function(){return yY},"getSections"),F4t=x(function(){let t=P_e(),e=10,r=0;for(;!t&&r[\d\w- ]+)/.exec(r);if(i!==null){let s=null;for(let l of i.groups.ids.split(" ")){let u=Nm(l);u!==void 0&&(!s||u.endTime>s.endTime)&&(s=u)}if(s)return s.endTime;let o=new Date;return o.setHours(0,0,0,0),o}let a=(0,Ml.default)(r,e.trim(),!0);if(a.isValid())return a.toDate();{ie.debug("Invalid date:"+r),ie.debug("With date format:"+e.trim());let s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s}},"getStartDate"),W_e=x(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),G_e=x(function(t,e,r,n=!1){r=r.trim();let a=/^until\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let h=null;for(let d of a.groups.ids.split(" ")){let p=Nm(d);p!==void 0&&(!h||p.startTime{window.open(r,"_self")}),vY.set(n,r))}),j_e(t,"clickable")},"setLink"),j_e=x(function(t,e){t.split(",").forEach(function(r){let n=Nm(r);n!==void 0&&n.classes.push(e)})},"setClass"),Y4t=x(function(t,e,r){if(Te().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{tr.runFunc(e,...n)})},"setClickFun"),X_e=x(function(t,e){xY.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),j4t=x(function(t,e,r){t.split(",").forEach(function(n){Y4t(n,e,r)}),j_e(t,"clickable")},"setClickEvent"),X4t=x(function(t){xY.forEach(function(e){e(t)})},"bindFunctions"),K4t={getConfig:x(()=>Te().gantt,"getConfig"),clear:g4t,setDateFormat:k4t,getDateFormat:L4t,enableInclusiveEndDates:T4t,endDatesAreInclusive:E4t,enableTopAxis:S4t,topAxisEnabled:C4t,setAxisFormat:m4t,getAxisFormat:v4t,setTickInterval:y4t,getTickInterval:b4t,setTodayMarker:x4t,getTodayMarker:w4t,setAccTitle:Wr,getAccTitle:Xr,setDiagramTitle:Cn,getDiagramTitle:vn,setDisplayMode:_4t,getDisplayMode:A4t,setAccDescription:Kr,getAccDescription:Zr,addSection:N4t,getSections:P4t,getTasks:F4t,addTask:q4t,findTaskById:Nm,addTaskOrg:W4t,setIncludes:M4t,getIncludes:D4t,setExcludes:O4t,getExcludes:R4t,setClickEvent:j4t,setLink:G4t,getLinks:I4t,bindFunctions:X4t,parseDuration:W_e,isInvalidDate:H_e,setWeekday:B4t,getWeekday:z4t,setWeekend:$4t};x(TY,"getTaskTags");Z4t=x(function(){ie.debug("Something is calling, setConf, remove the call")},"setConf"),F_e={monday:cp,tuesday:H_,wednesday:q_,thursday:lh,friday:W_,saturday:G_,sunday:ru},Q4t=x((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(let a of n)for(let s=0;s=r[s]){r[s]=a.endTime,a.order=s+e,s>i&&(i=s);break}return i},"getMaxIntersections"),J4t=x(function(t,e,r,n){let i=Te().gantt,a=Te().securityLevel,s;a==="sandbox"&&(s=Je("#i"+e));let o=a==="sandbox"?Je(s.nodes()[0].contentDocument.body):Je("body"),l=a==="sandbox"?s.nodes()[0].contentDocument:document,u=l.getElementById(e);md=u.parentElement.offsetWidth,md===void 0&&(md=1200),i.useWidth!==void 0&&(md=i.useWidth);let h=n.db.getTasks(),f=[];for(let _ of h)f.push(_.type);f=L(f);let d={},p=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let _={};for(let I of h)_[I.section]===void 0?_[I.section]=[I]:_[I.section].push(I);let M=0;for(let I of Object.keys(_)){let O=Q4t(_[I],M)+1;M+=O,p+=O*(i.barHeight+i.barGap),d[I]=O}}else{p+=h.length*(i.barHeight+i.barGap);for(let _ of f)d[_]=h.filter(M=>M.type===_).length}u.setAttribute("viewBox","0 0 "+md+" "+p);let g=o.select(`[id="${e}"]`),m=X_().domain([t_(h,function(_){return _.startTime}),e_(h,function(_){return _.endTime})]).rangeRound([0,md-i.leftPadding-i.rightPadding]);function v(_,M){let I=_.startTime,O=M.startTime,C=0;return I>O?C=1:IV.order))].map(V=>_.find(z=>z.order===V));g.append("g").selectAll("rect").data(A).enter().append("rect").attr("x",0).attr("y",function(V,z){return z=V.order,z*M+I-2}).attr("width",function(){return D-i.rightPadding/2}).attr("height",M).attr("class",function(V){for(let[z,H]of f.entries())if(V.type===H)return"section section"+z%i.numberSectionStyles;return"section section0"});let N=g.append("g").selectAll("rect").data(_).enter(),F=n.db.getLinks();if(N.append("rect").attr("id",function(V){return V.id}).attr("rx",3).attr("ry",3).attr("x",function(V){return V.milestone?m(V.startTime)+O+.5*(m(V.endTime)-m(V.startTime))-.5*C:m(V.startTime)+O}).attr("y",function(V,z){return z=V.order,z*M+I}).attr("width",function(V){return V.milestone?C:m(V.renderEndTime||V.endTime)-m(V.startTime)}).attr("height",C).attr("transform-origin",function(V,z){return z=V.order,(m(V.startTime)+O+.5*(m(V.endTime)-m(V.startTime))).toString()+"px "+(z*M+I+.5*C).toString()+"px"}).attr("class",function(V){let z="task",H="";V.classes.length>0&&(H=V.classes.join(" "));let K=0;for(let[ne,j]of f.entries())V.type===j&&(K=ne%i.numberSectionStyles);let X="";return V.active?V.crit?X+=" activeCrit":X=" active":V.done?V.crit?X=" doneCrit":X=" done":V.crit&&(X+=" crit"),X.length===0&&(X=" task"),V.milestone&&(X=" milestone "+X),X+=K,X+=" "+H,z+X}),N.append("text").attr("id",function(V){return V.id+"-text"}).text(function(V){return V.task}).attr("font-size",i.fontSize).attr("x",function(V){let z=m(V.startTime),H=m(V.renderEndTime||V.endTime);V.milestone&&(z+=.5*(m(V.endTime)-m(V.startTime))-.5*C),V.milestone&&(H=z+C);let K=this.getBBox().width;return K>H-z?H+K+1.5*i.leftPadding>D?z+O-5:H+O+5:(H-z)/2+z+O}).attr("y",function(V,z){return z=V.order,z*M+i.barHeight/2+(i.fontSize/2-2)+I}).attr("text-height",C).attr("class",function(V){let z=m(V.startTime),H=m(V.endTime);V.milestone&&(H=z+C);let K=this.getBBox().width,X="";V.classes.length>0&&(X=V.classes.join(" "));let ne=0;for(let[ee,Q]of f.entries())V.type===Q&&(ne=ee%i.numberSectionStyles);let j="";return V.active&&(V.crit?j="activeCritText"+ne:j="activeText"+ne),V.done?V.crit?j=j+" doneCritText"+ne:j=j+" doneText"+ne:V.crit&&(j=j+" critText"+ne),V.milestone&&(j+=" milestoneText"),K>H-z?H+K+1.5*i.leftPadding>D?X+" taskTextOutsideLeft taskTextOutside"+ne+" "+j:X+" taskTextOutsideRight taskTextOutside"+ne+" "+j+" width-"+K:X+" taskText taskText"+ne+" "+j+" width-"+K}),Te().securityLevel==="sandbox"){let V;V=Je("#i"+e);let z=V.nodes()[0].contentDocument;N.filter(function(H){return F.has(H.id)}).each(function(H){var K=z.querySelector("#"+H.id),X=z.querySelector("#"+H.id+"-text");let ne=K.parentNode;var j=z.createElement("a");j.setAttribute("xlink:href",F.get(H.id)),j.setAttribute("target","_top"),ne.appendChild(j),j.appendChild(K),j.appendChild(X)})}}x(w,"drawRects");function k(_,M,I,O,C,R,D,P){if(D.length===0&&P.length===0)return;let A,N;for(let{startTime:K,endTime:X}of R)(A===void 0||KN)&&(N=X);if(!A||!N)return;if((0,CL.default)(N).diff((0,CL.default)(A),"year")>5){ie.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let F=n.db.getDateFormat(),B=[],V=null,z=(0,CL.default)(A);for(;z.valueOf()<=N;)n.db.isInvalidDate(z,F,D,P)?V?V.end=z:V={start:z,end:z}:V&&(B.push(V),V=null),z=z.add(1,"d");g.append("g").selectAll("rect").data(B).enter().append("rect").attr("id",function(K){return"exclude-"+K.start.format("YYYY-MM-DD")}).attr("x",function(K){return m(K.start)+I}).attr("y",i.gridLineStartPadding).attr("width",function(K){let X=K.end.add(1,"day");return m(X)-m(K.start)}).attr("height",C-M-i.gridLineStartPadding).attr("transform-origin",function(K,X){return(m(K.start)+I+.5*(m(K.end)-m(K.start))).toString()+"px "+(X*_+.5*C).toString()+"px"}).attr("class","exclude-range")}x(k,"drawExcludeDays");function E(_,M,I,O){let C=sB(m).tickSize(-O+M+i.gridLineStartPadding).tickFormat(Ag(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d")),D=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(D!==null){let P=D[1],A=D[2],N=n.db.getWeekday()||i.weekday;switch(A){case"millisecond":C.ticks(sh.every(P));break;case"second":C.ticks(dl.every(P));break;case"minute":C.ticks(Pf.every(P));break;case"hour":C.ticks(Ff.every(P));break;case"day":C.ticks(Zl.every(P));break;case"week":C.ticks(F_e[N].every(P));break;case"month":C.ticks(Bf.every(P));break}}if(g.append("g").attr("class","grid").attr("transform","translate("+_+", "+(O-50)+")").call(C).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let P=aB(m).tickSize(-O+M+i.gridLineStartPadding).tickFormat(Ag(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(D!==null){let A=D[1],N=D[2],F=n.db.getWeekday()||i.weekday;switch(N){case"millisecond":P.ticks(sh.every(A));break;case"second":P.ticks(dl.every(A));break;case"minute":P.ticks(Pf.every(A));break;case"hour":P.ticks(Ff.every(A));break;case"day":P.ticks(Zl.every(A));break;case"week":P.ticks(F_e[F].every(A));break;case"month":P.ticks(Bf.every(A));break}}g.append("g").attr("class","grid").attr("transform","translate("+_+", "+M+")").call(P).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}x(E,"makeGrid");function T(_,M){let I=0,O=Object.keys(d).map(C=>[C,d[C]]);g.append("g").selectAll("text").data(O).enter().append(function(C){let R=C[0].split(ct.lineBreakRegex),D=-(R.length-1)/2,P=l.createElementNS("http://www.w3.org/2000/svg","text");P.setAttribute("dy",D+"em");for(let[A,N]of R.entries()){let F=l.createElementNS("http://www.w3.org/2000/svg","tspan");F.setAttribute("alignment-baseline","central"),F.setAttribute("x","10"),A>0&&F.setAttribute("dy","1em"),F.textContent=N,P.appendChild(F)}return P}).attr("x",10).attr("y",function(C,R){if(R>0)for(let D=0;D` .mermaid-main-font { font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); } .exclude-range { fill: ${t.excludeBkgColor}; } .section { stroke: none; opacity: 0.2; } .section0 { fill: ${t.sectionBkgColor}; } .section2 { fill: ${t.sectionBkgColor2}; } .section1, .section3 { fill: ${t.altSectionBkgColor}; opacity: 0.2; } .sectionTitle0 { fill: ${t.titleColor}; } .sectionTitle1 { fill: ${t.titleColor}; } .sectionTitle2 { fill: ${t.titleColor}; } .sectionTitle3 { fill: ${t.titleColor}; } .sectionTitle { text-anchor: start; font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); } /* Grid and axis */ .grid .tick { stroke: ${t.gridColor}; opacity: 0.8; shape-rendering: crispEdges; } .grid .tick text { font-family: ${t.fontFamily}; fill: ${t.textColor}; } .grid path { stroke-width: 0; } /* Today line */ .today { fill: none; stroke: ${t.todayLineColor}; stroke-width: 2px; } /* Task styling */ /* Default task */ .task { stroke-width: 2; } .taskText { text-anchor: middle; font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); } .taskTextOutsideRight { fill: ${t.taskTextDarkColor}; text-anchor: start; font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); } .taskTextOutsideLeft { fill: ${t.taskTextDarkColor}; text-anchor: end; } /* Special case clickable */ .task.clickable { cursor: pointer; } .taskText.clickable { cursor: pointer; fill: ${t.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideLeft.clickable { cursor: pointer; fill: ${t.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideRight.clickable { cursor: pointer; fill: ${t.taskTextClickableColor} !important; font-weight: bold; } /* Specific task settings for the sections*/ .taskText0, .taskText1, .taskText2, .taskText3 { fill: ${t.taskTextColor}; } .task0, .task1, .task2, .task3 { fill: ${t.taskBkgColor}; stroke: ${t.taskBorderColor}; } .taskTextOutside0, .taskTextOutside2 { fill: ${t.taskTextOutsideColor}; } .taskTextOutside1, .taskTextOutside3 { fill: ${t.taskTextOutsideColor}; } /* Active task */ .active0, .active1, .active2, .active3 { fill: ${t.activeTaskBkgColor}; stroke: ${t.activeTaskBorderColor}; } .activeText0, .activeText1, .activeText2, .activeText3 { fill: ${t.taskTextDarkColor} !important; } /* Completed task */ .done0, .done1, .done2, .done3 { stroke: ${t.doneTaskBorderColor}; fill: ${t.doneTaskBkgColor}; stroke-width: 2; } .doneText0, .doneText1, .doneText2, .doneText3 { fill: ${t.taskTextDarkColor} !important; } /* Tasks on the critical line */ .crit0, .crit1, .crit2, .crit3 { stroke: ${t.critBorderColor}; fill: ${t.critBkgColor}; stroke-width: 2; } .activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: ${t.critBorderColor}; fill: ${t.activeTaskBkgColor}; stroke-width: 2; } .doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: ${t.critBorderColor}; fill: ${t.doneTaskBkgColor}; stroke-width: 2; cursor: pointer; shape-rendering: crispEdges; } .milestone { transform: rotate(45deg) scale(0.8,0.8); } .milestoneText { font-style: italic; } .doneCritText0, .doneCritText1, .doneCritText2, .doneCritText3 { fill: ${t.taskTextDarkColor} !important; } .activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { fill: ${t.taskTextDarkColor} !important; } .titleText { text-anchor: middle; font-size: 18px; fill: ${t.titleColor||t.textColor}; font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); } `,"getStyles"),r3t=t3t,n3t={parser:p4t,db:K4t,renderer:e3t,styles:r3t}});var Q_e={};Wt(Q_e,{diagram:()=>u3t});var i3t,a3t,s3t,o3t,l3t,c3t,u3t,J_e=$(()=>{b();IU();Jf();Sr();Rb();i3t={parse:x(async t=>{let e=await wu("info",t);ie.debug(e)},"parse")},a3t={version:p3},s3t=x(()=>a3t.version,"getVersion"),o3t={getVersion:s3t},l3t=x((t,e,r)=>{ie.debug(`rendering info diagram `+t);let n=Is(e);mn(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),c3t={draw:l3t},u3t={parser:i3t,db:o3t,renderer:c3t}});var r6e={};Wt(r6e,{diagram:()=>S3t});var e6e,EY,LL,SY,h3t,f3t,d3t,p3t,g3t,m3t,v3t,t6e,y3t,b3t,x3t,w3t,k3t,T3t,E3t,S3t,n6e=$(()=>{b();T3();Qn();Jf();Sr();Rb();Cr();e6e=Er.pie,EY={sections:new Map,showData:!1,config:e6e},LL=EY.sections,SY=EY.showData,h3t=structuredClone(e6e),f3t=x(()=>structuredClone(h3t),"getConfig"),d3t=x(()=>{LL=new Map,SY=EY.showData,zr()},"clear"),p3t=x(({label:t,value:e})=>{LL.has(t)||(LL.set(t,e),ie.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),g3t=x(()=>LL,"getSections"),m3t=x(t=>{SY=t},"setShowData"),v3t=x(()=>SY,"getShowData"),t6e={getConfig:f3t,clear:d3t,setDiagramTitle:Cn,getDiagramTitle:vn,setAccTitle:Wr,getAccTitle:Xr,setAccDescription:Kr,getAccDescription:Zr,addSection:p3t,getSections:g3t,setShowData:m3t,getShowData:v3t},y3t=x((t,e)=>{nd(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),b3t={parse:x(async t=>{let e=await wu("pie",t);ie.debug(e),y3t(e,t6e)},"parse")},x3t=x(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; opacity : ${t.pieOpacity}; } .pieOuterCircle{ stroke: ${t.pieOuterStrokeColor}; stroke-width: ${t.pieOuterStrokeWidth}; fill: none; } .pieTitleText { text-anchor: middle; font-size: ${t.pieTitleTextSize}; fill: ${t.pieTitleTextColor}; font-family: ${t.fontFamily}; } .slice { font-family: ${t.fontFamily}; fill: ${t.pieSectionTextColor}; font-size:${t.pieSectionTextSize}; // fill: white; } .legend text { fill: ${t.pieLegendTextColor}; font-family: ${t.fontFamily}; font-size: ${t.pieLegendTextSize}; } `,"getStyles"),w3t=x3t,k3t=x(t=>{let e=[...t.entries()].map(n=>({label:n[0],value:n[1]})).sort((n,i)=>i.value-n.value);return Bz().value(n=>n.value)(e)},"createPieArcs"),T3t=x((t,e,r,n)=>{ie.debug(`rendering pie chart `+t);let i=n.db,a=Te(),s=Bo(i.getConfig(),a.pie),o=40,l=18,u=4,h=450,f=h,d=Is(e),p=d.append("g");p.attr("transform","translate("+f/2+","+h/2+")");let{themeVariables:g}=a,[m]=sc(g.pieOuterStrokeWidth);m??=2;let v=s.textPosition,y=Math.min(f,h)/2-o,w=ch().innerRadius(0).outerRadius(y),k=ch().innerRadius(y*v).outerRadius(y*v);p.append("circle").attr("cx",0).attr("cy",0).attr("r",y+m/2).attr("class","pieOuterCircle");let E=i.getSections(),T=k3t(E),S=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],L=If(S);p.selectAll("mySlices").data(T).enter().append("path").attr("d",w).attr("fill",C=>L(C.data.label)).attr("class","pieCircle");let _=0;E.forEach(C=>{_+=C}),p.selectAll("mySlices").data(T).enter().append("text").text(C=>(C.data.value/_*100).toFixed(0)+"%").attr("transform",C=>"translate("+k.centroid(C)+")").style("text-anchor","middle").attr("class","slice"),p.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText");let M=p.selectAll(".legend").data(L.domain()).enter().append("g").attr("class","legend").attr("transform",(C,R)=>{let D=l+u,P=D*L.domain().length/2,A=12*l,N=R*D-P;return"translate("+A+","+N+")"});M.append("rect").attr("width",l).attr("height",l).style("fill",L).style("stroke",L),M.data(T).append("text").attr("x",l+u).attr("y",l-u).text(C=>{let{label:R,value:D}=C.data;return i.getShowData()?`${R} [${D}]`:R});let I=Math.max(...M.selectAll("text").nodes().map(C=>C?.getBoundingClientRect().width??0)),O=f+o+l+u+I;d.attr("viewBox",`0 0 ${O} ${h}`),mn(d,h,O,s.useMaxWidth)},"draw"),E3t={draw:T3t},S3t={parser:b3t,db:t6e,renderer:E3t,styles:w3t}});var b6e={};Wt(b6e,{diagram:()=>R3t});function _Y(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function i6e(t){return!/^\d+$/.test(t)}function a6e(t){return!/^\d+px$/.test(t)}function zh(t){return Nr(t.trim(),A3t)}function s6e(t){ms.setData({quadrant1Text:zh(t.text)})}function o6e(t){ms.setData({quadrant2Text:zh(t.text)})}function l6e(t){ms.setData({quadrant3Text:zh(t.text)})}function c6e(t){ms.setData({quadrant4Text:zh(t.text)})}function u6e(t){ms.setData({xAxisLeftText:zh(t.text)})}function h6e(t){ms.setData({xAxisRightText:zh(t.text)})}function f6e(t){ms.setData({yAxisTopText:zh(t.text)})}function d6e(t){ms.setData({yAxisBottomText:zh(t.text)})}function DL(t){let e={};for(let r of t){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(i6e(i))throw new ML(n,i,"number");e.radius=parseInt(i)}else if(n==="color"){if(_Y(i))throw new ML(n,i,"hex code");e.color=i}else if(n==="stroke-color"){if(_Y(i))throw new ML(n,i,"hex code");e.strokeColor=i}else if(n==="stroke-width"){if(a6e(i))throw new ML(n,i,"number of pixels (eg. 10px)");e.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return e}function p6e(t,e,r,n,i){let a=DL(i);ms.addPoints([{x:r,y:n,text:zh(t.text),className:e,...a}])}function g6e(t,e){ms.addClass(t,DL(e))}function m6e(t){ms.setConfig({chartWidth:t})}function v6e(t){ms.setConfig({chartHeight:t})}function y6e(){let t=Te(),{themeVariables:e,quadrantChart:r}=t;return r&&ms.setConfig(r),ms.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),ms.setData({titleText:vn()}),ms.build()}var CY,C3t,go,_3t,ML,A3t,ms,L3t,M3t,D3t,O3t,R3t,x6e=$(()=>{b();Sr();Cr();Cr();CY=function(){var t=x(function(Le,J,fe,xe){for(fe=fe||{},xe=Le.length;xe--;fe[Le[xe]]=J);return fe},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],s=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],h=[1,37],f=[1,36],d=[1,38],p=[1,35],g=[1,43],m=[1,41],v=[1,14],y=[1,23],w=[1,18],k=[1,19],E=[1,20],T=[1,21],S=[1,22],L=[1,24],_=[1,25],M=[1,26],I=[1,27],O=[1,28],C=[1,29],R=[1,32],D=[1,33],P=[1,34],A=[1,39],N=[1,40],F=[1,42],B=[1,44],V=[1,62],z=[1,61],H=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],K=[1,65],X=[1,66],ne=[1,67],j=[1,68],ee=[1,69],Q=[1,70],G=[1,71],Z=[1,72],te=[1,73],oe=[1,74],de=[1,75],pe=[1,76],re=[4,5,6,7,8,9,10,11,12,13,14,15,18],Be=[1,90],le=[1,91],Se=[1,92],Ye=[1,99],We=[1,93],Ze=[1,96],Qe=[1,94],et=[1,95],ze=[1,97],He=[1,98],Ee=[1,102],Y=[10,55,56,57],ve=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ce={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:x(function(J,fe,xe,Ie,Fe,ye,qe){var Re=ye.length-1;switch(Fe){case 23:this.$=ye[Re];break;case 24:this.$=ye[Re-1]+""+ye[Re];break;case 26:this.$=ye[Re-1]+ye[Re];break;case 27:this.$=[ye[Re].trim()];break;case 28:ye[Re-2].push(ye[Re].trim()),this.$=ye[Re-2];break;case 29:this.$=ye[Re-4],Ie.addClass(ye[Re-2],ye[Re]);break;case 37:this.$=[];break;case 42:this.$=ye[Re].trim(),Ie.setDiagramTitle(this.$);break;case 43:this.$=ye[Re].trim(),Ie.setAccTitle(this.$);break;case 44:case 45:this.$=ye[Re].trim(),Ie.setAccDescription(this.$);break;case 46:Ie.addSection(ye[Re].substr(8)),this.$=ye[Re].substr(8);break;case 47:Ie.addPoint(ye[Re-3],"",ye[Re-1],ye[Re],[]);break;case 48:Ie.addPoint(ye[Re-4],ye[Re-3],ye[Re-1],ye[Re],[]);break;case 49:Ie.addPoint(ye[Re-4],"",ye[Re-2],ye[Re-1],ye[Re]);break;case 50:Ie.addPoint(ye[Re-5],ye[Re-4],ye[Re-2],ye[Re-1],ye[Re]);break;case 51:Ie.setXAxisLeftText(ye[Re-2]),Ie.setXAxisRightText(ye[Re]);break;case 52:ye[Re-1].text+=" \u27F6 ",Ie.setXAxisLeftText(ye[Re-1]);break;case 53:Ie.setXAxisLeftText(ye[Re]);break;case 54:Ie.setYAxisBottomText(ye[Re-2]),Ie.setYAxisTopText(ye[Re]);break;case 55:ye[Re-1].text+=" \u27F6 ",Ie.setYAxisBottomText(ye[Re-1]);break;case 56:Ie.setYAxisBottomText(ye[Re]);break;case 57:Ie.setQuadrant1Text(ye[Re]);break;case 58:Ie.setQuadrant2Text(ye[Re]);break;case 59:Ie.setQuadrant3Text(ye[Re]);break;case 60:Ie.setQuadrant4Text(ye[Re]);break;case 64:this.$={text:ye[Re],type:"text"};break;case 65:this.$={text:ye[Re-1].text+""+ye[Re],type:ye[Re-1].type};break;case 66:this.$={text:ye[Re],type:"text"};break;case 67:this.$={text:ye[Re],type:"markdown"};break;case 68:this.$=ye[Re];break;case 69:this.$=ye[Re-1]+""+ye[Re];break}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:i,57:a},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:i,57:a},{18:e,26:9,27:2,28:r,55:n,56:i,57:a},t(s,[2,33],{29:10}),t(o,[2,61]),t(o,[2,62]),t(o,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:f,10:d,12:p,13:g,14:m,18:v,25:y,35:w,37:k,39:E,41:T,42:S,48:L,50:_,51:M,52:I,53:O,54:C,60:R,61:D,63:P,64:A,65:N,66:F,67:B}),t(s,[2,34]),{27:45,55:n,56:i,57:a},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:h,5:f,10:d,12:p,13:g,14:m,18:v,25:y,35:w,37:k,39:E,41:T,42:S,48:L,50:_,51:M,52:I,53:O,54:C,60:R,61:D,63:P,64:A,65:N,66:F,67:B}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(l,[2,45]),t(l,[2,46]),{18:[1,50]},{4:h,5:f,10:d,12:p,13:g,14:m,43:51,58:31,60:R,61:D,63:P,64:A,65:N,66:F,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:52,58:31,60:R,61:D,63:P,64:A,65:N,66:F,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:53,58:31,60:R,61:D,63:P,64:A,65:N,66:F,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:54,58:31,60:R,61:D,63:P,64:A,65:N,66:F,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:55,58:31,60:R,61:D,63:P,64:A,65:N,66:F,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:56,58:31,60:R,61:D,63:P,64:A,65:N,66:F,67:B},{4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,44:[1,57],47:[1,58],58:60,59:59,63:P,64:A,65:N,66:F,67:B},t(H,[2,64]),t(H,[2,66]),t(H,[2,67]),t(H,[2,70]),t(H,[2,71]),t(H,[2,72]),t(H,[2,73]),t(H,[2,74]),t(H,[2,75]),t(H,[2,76]),t(H,[2,77]),t(H,[2,78]),t(H,[2,79]),t(H,[2,80]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:64,4:K,5:X,6:ne,7:j,8:ee,9:Q,10:G,11:Z,12:te,13:oe,14:de,15:pe,21:63},t(l,[2,53],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,49:[1,77],63:P,64:A,65:N,66:F,67:B}),t(l,[2,56],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,49:[1,78],63:P,64:A,65:N,66:F,67:B}),t(l,[2,57],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,63:P,64:A,65:N,66:F,67:B}),t(l,[2,58],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,63:P,64:A,65:N,66:F,67:B}),t(l,[2,59],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,63:P,64:A,65:N,66:F,67:B}),t(l,[2,60],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,63:P,64:A,65:N,66:F,67:B}),{45:[1,79]},{44:[1,80]},t(H,[2,65]),t(H,[2,81]),t(H,[2,82]),t(H,[2,83]),{3:82,4:K,5:X,6:ne,7:j,8:ee,9:Q,10:G,11:Z,12:te,13:oe,14:de,15:pe,18:[1,81]},t(re,[2,23]),t(re,[2,1]),t(re,[2,2]),t(re,[2,3]),t(re,[2,4]),t(re,[2,5]),t(re,[2,6]),t(re,[2,7]),t(re,[2,8]),t(re,[2,9]),t(re,[2,10]),t(re,[2,11]),t(re,[2,12]),t(l,[2,52],{58:31,43:83,4:h,5:f,10:d,12:p,13:g,14:m,60:R,61:D,63:P,64:A,65:N,66:F,67:B}),t(l,[2,55],{58:31,43:84,4:h,5:f,10:d,12:p,13:g,14:m,60:R,61:D,63:P,64:A,65:N,66:F,67:B}),{46:[1,85]},{45:[1,86]},{4:Be,5:le,6:Se,8:Ye,11:We,13:Ze,16:89,17:Qe,18:et,19:ze,20:He,22:88,23:87},t(re,[2,24]),t(l,[2,51],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,63:P,64:A,65:N,66:F,67:B}),t(l,[2,54],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:g,14:m,18:z,63:P,64:A,65:N,66:F,67:B}),t(l,[2,47],{22:88,16:89,23:100,4:Be,5:le,6:Se,8:Ye,11:We,13:Ze,17:Qe,18:et,19:ze,20:He}),{46:[1,101]},t(l,[2,29],{10:Ee}),t(Y,[2,27],{16:103,4:Be,5:le,6:Se,8:Ye,11:We,13:Ze,17:Qe,18:et,19:ze,20:He}),t(ve,[2,25]),t(ve,[2,13]),t(ve,[2,14]),t(ve,[2,15]),t(ve,[2,16]),t(ve,[2,17]),t(ve,[2,18]),t(ve,[2,19]),t(ve,[2,20]),t(ve,[2,21]),t(ve,[2,22]),t(l,[2,49],{10:Ee}),t(l,[2,48],{22:88,16:89,23:104,4:Be,5:le,6:Se,8:Ye,11:We,13:Ze,17:Qe,18:et,19:ze,20:He}),{4:Be,5:le,6:Se,8:Ye,11:We,13:Ze,16:89,17:Qe,18:et,19:ze,20:He,22:105},t(ve,[2,26]),t(l,[2,50],{10:Ee}),t(Y,[2,28],{16:103,4:Be,5:le,6:Se,8:Ye,11:We,13:Ze,17:Qe,18:et,19:ze,20:He})],defaultActions:{8:[2,30],9:[2,31]},parseError:x(function(J,fe){if(fe.recoverable)this.trace(J);else{var xe=new Error(J);throw xe.hash=fe,xe}},"parseError"),parse:x(function(J){var fe=this,xe=[0],Ie=[],Fe=[null],ye=[],qe=this.table,Re="",nt=0,mt=0,Tt=0,ue=2,ae=1,ke=ye.slice.call(arguments,1),we=Object.create(this.lexer),Ne={yy:{}};for(var Ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ge)&&(Ne.yy[Ge]=this.yy[Ge]);we.setInput(J,Ne.yy),Ne.yy.lexer=we,Ne.yy.parser=this,typeof we.yylloc>"u"&&(we.yylloc={});var st=we.yylloc;ye.push(st);var ot=we.options&&we.options.ranges;typeof Ne.yy.parseError=="function"?this.parseError=Ne.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function at(Me){xe.length=xe.length-2*Me,Fe.length=Fe.length-Me,ye.length=ye.length-Me}x(at,"popStack");function Ue(){var Me;return Me=Ie.pop()||we.lex()||ae,typeof Me!="number"&&(Me instanceof Array&&(Ie=Me,Me=Ie.pop()),Me=fe.symbols_[Me]||Me),Me}x(Ue,"lex");for(var it,pt,yt,Et,hn,qt,fn={},xn,qr,hi,Nn;;){if(yt=xe[xe.length-1],this.defaultActions[yt]?Et=this.defaultActions[yt]:((it===null||typeof it>"u")&&(it=Ue()),Et=qe[yt]&&qe[yt][it]),typeof Et>"u"||!Et.length||!Et[0]){var _t="";Nn=[];for(xn in qe[yt])this.terminals_[xn]&&xn>ue&&Nn.push("'"+this.terminals_[xn]+"'");we.showPosition?_t="Parse error on line "+(nt+1)+`: `+we.showPosition()+` Expecting `+Nn.join(", ")+", got '"+(this.terminals_[it]||it)+"'":_t="Parse error on line "+(nt+1)+": Unexpected "+(it==ae?"end of input":"'"+(this.terminals_[it]||it)+"'"),this.parseError(_t,{text:we.match,token:this.terminals_[it]||it,line:we.yylineno,loc:st,expected:Nn})}if(Et[0]instanceof Array&&Et.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yt+", token: "+it);switch(Et[0]){case 1:xe.push(it),Fe.push(we.yytext),ye.push(we.yylloc),xe.push(Et[1]),it=null,pt?(it=pt,pt=null):(mt=we.yyleng,Re=we.yytext,nt=we.yylineno,st=we.yylloc,Tt>0&&Tt--);break;case 2:if(qr=this.productions_[Et[1]][1],fn.$=Fe[Fe.length-qr],fn._$={first_line:ye[ye.length-(qr||1)].first_line,last_line:ye[ye.length-1].last_line,first_column:ye[ye.length-(qr||1)].first_column,last_column:ye[ye.length-1].last_column},ot&&(fn._$.range=[ye[ye.length-(qr||1)].range[0],ye[ye.length-1].range[1]]),qt=this.performAction.apply(fn,[Re,mt,nt,Ne.yy,Et[1],Fe,ye].concat(ke)),typeof qt<"u")return qt;qr&&(xe=xe.slice(0,-1*qr*2),Fe=Fe.slice(0,-1*qr),ye=ye.slice(0,-1*qr)),xe.push(this.productions_[Et[1]][0]),Fe.push(fn.$),ye.push(fn._$),hi=qe[xe[xe.length-2]][xe[xe.length-1]],xe.push(hi);break;case 3:return!0}}return!0},"parse")},me=function(){var Le={EOF:1,parseError:x(function(fe,xe){if(this.yy.parser)this.yy.parser.parseError(fe,xe);else throw new Error(fe)},"parseError"),setInput:x(function(J,fe){return this.yy=fe||this.yy||{},this._input=J,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var J=this._input[0];this.yytext+=J,this.yyleng++,this.offset++,this.match+=J,this.matched+=J;var fe=J.match(/(?:\r\n?|\n).*/g);return fe?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),J},"input"),unput:x(function(J){var fe=J.length,xe=J.split(/(?:\r\n?|\n)/g);this._input=J+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-fe),this.offset-=fe;var Ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),xe.length-1&&(this.yylineno-=xe.length-1);var Fe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:xe?(xe.length===Ie.length?this.yylloc.first_column:0)+Ie[Ie.length-xe.length].length-xe[0].length:this.yylloc.first_column-fe},this.options.ranges&&(this.yylloc.range=[Fe[0],Fe[0]+this.yyleng-fe]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(J){this.unput(this.match.slice(J))},"less"),pastInput:x(function(){var J=this.matched.substr(0,this.matched.length-this.match.length);return(J.length>20?"...":"")+J.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var J=this.match;return J.length<20&&(J+=this._input.substr(0,20-J.length)),(J.substr(0,20)+(J.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var J=this.pastInput(),fe=new Array(J.length+1).join("-");return J+this.upcomingInput()+` `+fe+"^"},"showPosition"),test_match:x(function(J,fe){var xe,Ie,Fe;if(this.options.backtrack_lexer&&(Fe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Fe.yylloc.range=this.yylloc.range.slice(0))),Ie=J[0].match(/(?:\r\n?|\n).*/g),Ie&&(this.yylineno+=Ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ie?Ie[Ie.length-1].length-Ie[Ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+J[0].length},this.yytext+=J[0],this.match+=J[0],this.matches=J,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(J[0].length),this.matched+=J[0],xe=this.performAction.call(this,this.yy,this,fe,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),xe)return xe;if(this._backtrack){for(var ye in Fe)this[ye]=Fe[ye];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var J,fe,xe,Ie;this._more||(this.yytext="",this.match="");for(var Fe=this._currentRules(),ye=0;yefe[0].length)){if(fe=xe,Ie=ye,this.options.backtrack_lexer){if(J=this.test_match(xe,Fe[ye]),J!==!1)return J;if(this._backtrack){fe=!1;continue}else return!1}else if(!this.options.flex)break}return fe?(J=this.test_match(fe,Fe[Ie]),J!==!1?J:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var fe=this.next();return fe||this.lex()},"lex"),begin:x(function(fe){this.conditionStack.push(fe)},"begin"),popState:x(function(){var fe=this.conditionStack.length-1;return fe>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(fe){return fe=this.conditionStack.length-1-Math.abs(fe||0),fe>=0?this.conditionStack[fe]:"INITIAL"},"topState"),pushState:x(function(fe){this.begin(fe)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(fe,xe,Ie,Fe){var ye=Fe;switch(Ie){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return Le}();ce.lexer=me;function q(){this.yy={}}return x(q,"Parser"),q.prototype=ce,ce.Parser=q,new q}();CY.parser=CY;C3t=CY,go=$w(),_3t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{x(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:Er.quadrantChart?.chartWidth||500,chartWidth:Er.quadrantChart?.chartHeight||500,titlePadding:Er.quadrantChart?.titlePadding||10,titleFontSize:Er.quadrantChart?.titleFontSize||20,quadrantPadding:Er.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:Er.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:Er.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:Er.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:Er.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:Er.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:Er.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:Er.quadrantChart?.pointTextPadding||5,pointLabelFontSize:Er.quadrantChart?.pointLabelFontSize||12,pointRadius:Er.quadrantChart?.pointRadius||5,xAxisPosition:Er.quadrantChart?.xAxisPosition||"top",yAxisPosition:Er.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:Er.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:Er.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:go.quadrant1Fill,quadrant2Fill:go.quadrant2Fill,quadrant3Fill:go.quadrant3Fill,quadrant4Fill:go.quadrant4Fill,quadrant1TextFill:go.quadrant1TextFill,quadrant2TextFill:go.quadrant2TextFill,quadrant3TextFill:go.quadrant3TextFill,quadrant4TextFill:go.quadrant4TextFill,quadrantPointFill:go.quadrantPointFill,quadrantPointTextFill:go.quadrantPointTextFill,quadrantXAxisTextFill:go.quadrantXAxisTextFill,quadrantYAxisTextFill:go.quadrantYAxisTextFill,quadrantTitleFill:go.quadrantTitleFill,quadrantInternalBorderStrokeFill:go.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:go.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,ie.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){ie.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){ie.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:t==="top"&&e?i:0,bottom:t==="bottom"&&e?i:0},s=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,o={left:this.config.yAxisPosition==="left"&&r?s:0,right:this.config.yAxisPosition==="right"&&r?s:0},l=this.config.titleFontSize+this.config.titlePadding*2,u={top:n?l:0},h=this.config.quadrantPadding+o.left,f=this.config.quadrantPadding+a.top+u.top,d=this.config.chartWidth-this.config.quadrantPadding*2-o.left-o.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-u.top,g=d/2,m=p/2;return{xAxisSpace:a,yAxisSpace:o,titleSpace:u,quadrantSpace:{quadrantLeft:h,quadrantTop:f,quadrantWidth:d,quadrantHalfWidth:g,quadrantHeight:p,quadrantHalfHeight:m}}}getAxisLabels(t,e,r,n){let{quadrantSpace:i,titleSpace:a}=n,{quadrantHalfHeight:s,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:u,quadrantTop:h,quadrantWidth:f}=i,d=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?u/2:0),y:t==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+u+(d?u/2:0),y:t==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+o-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+s-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){let{quadrantSpace:e}=t,{quadrantHalfHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a}=e,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a,width:i,height:r,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a,width:i,height:r,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant4Fill}];for(let o of s)o.text.x=o.x+o.width/2,this.data.points.length===0?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return s}getQuadrantPoints(t){let{quadrantSpace:e}=t,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=e,s=tu().domain([0,1]).range([n,a+n]),o=tu().domain([0,1]).range([r+i,i]);return this.data.points.map(u=>{let h=this.classes.get(u.className);return h&&(u={...h,...u}),{x:s(u.x),y:o(u.y),fill:u.color??this.themeConfig.quadrantPointFill,radius:u.radius??this.config.pointRadius,text:{text:u.text,fill:this.themeConfig.quadrantPointTextFill,x:s(u.x),y:o(u.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:u.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:u.strokeWidth??"0px"}})}getBorders(t){let e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:r}=t,{quadrantHalfHeight:n,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:o,quadrantWidth:l}=r;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o,x2:a+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:o+e,x2:a+l,y2:o+i-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o+i,x2:a+l+e,y2:o+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:o+e,x2:a,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:o+e,x2:a+s,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+e,y1:o+n,x2:a+l-e,y2:o+n}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),e=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,t,e,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}},ML=class extends Error{static{x(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid ${r}`),this.name="InvalidStyleError"}};x(_Y,"validateHexCode");x(i6e,"validateNumber");x(a6e,"validateSizeInPixels");A3t=Te();x(zh,"textSanitizer");ms=new _3t;x(s6e,"setQuadrant1Text");x(o6e,"setQuadrant2Text");x(l6e,"setQuadrant3Text");x(c6e,"setQuadrant4Text");x(u6e,"setXAxisLeftText");x(h6e,"setXAxisRightText");x(f6e,"setYAxisTopText");x(d6e,"setYAxisBottomText");x(DL,"parseStyles");x(p6e,"addPoint");x(g6e,"addClass");x(m6e,"setWidth");x(v6e,"setHeight");x(y6e,"getQuadrantData");L3t=x(function(){ms.clear(),zr()},"clear"),M3t={setWidth:m6e,setHeight:v6e,setQuadrant1Text:s6e,setQuadrant2Text:o6e,setQuadrant3Text:l6e,setQuadrant4Text:c6e,setXAxisLeftText:u6e,setXAxisRightText:h6e,setYAxisTopText:f6e,setYAxisBottomText:d6e,parseStyles:DL,addPoint:p6e,addClass:g6e,getQuadrantData:y6e,clear:L3t,setAccTitle:Wr,getAccTitle:Xr,setDiagramTitle:Cn,getDiagramTitle:vn,getAccDescription:Zr,setAccDescription:Kr},D3t=x((t,e,r,n)=>{function i(_){return _==="top"?"hanging":"middle"}x(i,"getDominantBaseLine");function a(_){return _==="left"?"start":"middle"}x(a,"getTextAnchor");function s(_){return`translate(${_.x}, ${_.y}) rotate(${_.rotation||0})`}x(s,"getTransformation");let o=Te();ie.debug(`Rendering quadrant chart `+t);let l=o.securityLevel,u;l==="sandbox"&&(u=Je("#i"+e));let f=(l==="sandbox"?Je(u.nodes()[0].contentDocument.body):Je("body")).select(`[id="${e}"]`),d=f.append("g").attr("class","main"),p=o.quadrantChart?.chartWidth??500,g=o.quadrantChart?.chartHeight??500;mn(f,g,p,o.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+p+" "+g),n.db.setHeight(g),n.db.setWidth(p);let m=n.db.getQuadrantData(),v=d.append("g").attr("class","quadrants"),y=d.append("g").attr("class","border"),w=d.append("g").attr("class","data-points"),k=d.append("g").attr("class","labels"),E=d.append("g").attr("class","title");m.title&&E.append("text").attr("x",0).attr("y",0).attr("fill",m.title.fill).attr("font-size",m.title.fontSize).attr("dominant-baseline",i(m.title.horizontalPos)).attr("text-anchor",a(m.title.verticalPos)).attr("transform",s(m.title)).text(m.title.text),m.borderLines&&y.selectAll("line").data(m.borderLines).enter().append("line").attr("x1",_=>_.x1).attr("y1",_=>_.y1).attr("x2",_=>_.x2).attr("y2",_=>_.y2).style("stroke",_=>_.strokeFill).style("stroke-width",_=>_.strokeWidth);let T=v.selectAll("g.quadrant").data(m.quadrants).enter().append("g").attr("class","quadrant");T.append("rect").attr("x",_=>_.x).attr("y",_=>_.y).attr("width",_=>_.width).attr("height",_=>_.height).attr("fill",_=>_.fill),T.append("text").attr("x",0).attr("y",0).attr("fill",_=>_.text.fill).attr("font-size",_=>_.text.fontSize).attr("dominant-baseline",_=>i(_.text.horizontalPos)).attr("text-anchor",_=>a(_.text.verticalPos)).attr("transform",_=>s(_.text)).text(_=>_.text.text),k.selectAll("g.label").data(m.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(_=>_.text).attr("fill",_=>_.fill).attr("font-size",_=>_.fontSize).attr("dominant-baseline",_=>i(_.horizontalPos)).attr("text-anchor",_=>a(_.verticalPos)).attr("transform",_=>s(_));let L=w.selectAll("g.data-point").data(m.points).enter().append("g").attr("class","data-point");L.append("circle").attr("cx",_=>_.x).attr("cy",_=>_.y).attr("r",_=>_.radius).attr("fill",_=>_.fill).attr("stroke",_=>_.strokeColor).attr("stroke-width",_=>_.strokeWidth),L.append("text").attr("x",0).attr("y",0).text(_=>_.text.text).attr("fill",_=>_.text.fill).attr("font-size",_=>_.text.fontSize).attr("dominant-baseline",_=>i(_.text.horizontalPos)).attr("text-anchor",_=>a(_.text.verticalPos)).attr("transform",_=>s(_.text))},"draw"),O3t={draw:D3t},R3t={parser:C3t,db:M3t,renderer:O3t,styles:x(()=>"","styles")}});var $6e={};Wt($6e,{diagram:()=>Y3t});function LY(t){return t.type==="bar"}function OY(t){return t.type==="band"}function Pb(t){return t.type==="linear"}function MY(t,e,r,n){let i=new T6e(n);return OY(t)?new N3t(e,r,t.categories,t.title,i):new P3t(e,r,[t.min,t.max],t.title,i)}function S6e(t,e,r,n){let i=new T6e(n);return new F3t(i,t,e,r)}function C6e(t,e,r){return new $3t(t,e,r)}function IY(){let t=$w(),e=rn();return Bo(t.xyChart,e.themeVariables.xyChart)}function NY(){let t=rn();return Bo(Er.xyChart,t.xyChart)}function PY(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function RL(t){let e=rn();return Nr(t.trim(),e)}function A6e(t){_6e=t}function L6e(t){t==="horizontal"?Z5.chartOrientation="horizontal":Z5.chartOrientation="vertical"}function M6e(t){Ln.xAxis.title=RL(t.text)}function FY(t,e){Ln.xAxis={type:"linear",title:Ln.xAxis.title,min:t,max:e},OL=!0}function D6e(t){Ln.xAxis={type:"band",title:Ln.xAxis.title,categories:t.map(e=>RL(e.text))},OL=!0}function O6e(t){Ln.yAxis.title=RL(t.text)}function R6e(t,e){Ln.yAxis={type:"linear",title:Ln.yAxis.title,min:t,max:e},RY=!0}function I6e(t){let e=Math.min(...t),r=Math.max(...t),n=Pb(Ln.yAxis)?Ln.yAxis.min:1/0,i=Pb(Ln.yAxis)?Ln.yAxis.max:-1/0;Ln.yAxis={type:"linear",title:Ln.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function BY(t){let e=[];if(t.length===0)return e;if(!OL){let r=Pb(Ln.xAxis)?Ln.xAxis.min:1/0,n=Pb(Ln.xAxis)?Ln.xAxis.max:-1/0;FY(Math.min(r,1),Math.max(n,t.length))}if(RY||I6e(t),OY(Ln.xAxis)&&(e=Ln.xAxis.categories.map((r,n)=>[r,t[n]])),Pb(Ln.xAxis)){let r=Ln.xAxis.min,n=Ln.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let s=r;s<=n;s+=i)a.push(`${s}`);e=a.map((s,o)=>[s,t[o]])}return e}function zY(t){return DY[t===0?0:t%DY.length]}function N6e(t,e){let r=BY(e);Ln.plots.push({type:"line",strokeFill:zY(K5),strokeWidth:2,data:r}),K5++}function P6e(t,e){let r=BY(e);Ln.plots.push({type:"bar",fill:zY(K5),data:r}),K5++}function F6e(){if(Ln.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return Ln.title=vn(),U3t.build(Z5,Ln,Q5,_6e)}function B6e(){return Q5}function z6e(){return Z5}var AY,I3t,T6e,w6e,k6e,E6e,N3t,P3t,F3t,B3t,z3t,$3t,V3t,U3t,K5,_6e,Z5,Q5,Ln,DY,OL,RY,H3t,q3t,W3t,G3t,Y3t,V6e=$(()=>{b();ro();Qn();Jf();Sr();Cr();Cr();Cr();AY=function(){var t=x(function(P,A,N,F){for(N=N||{},F=P.length;F--;N[P[F]]=A);return N},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],s=[1,7],o=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,32],m=[1,33],v=[1,34],y=[1,35],w=[1,36],k=[1,37],E=[1,43],T=[1,42],S=[1,47],L=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],M=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],I=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],O=[1,64],C={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:x(function(A,N,F,B,V,z,H){var K=z.length-1;switch(V){case 5:B.setOrientation(z[K]);break;case 9:B.setDiagramTitle(z[K].text.trim());break;case 12:B.setLineData({text:"",type:"text"},z[K]);break;case 13:B.setLineData(z[K-1],z[K]);break;case 14:B.setBarData({text:"",type:"text"},z[K]);break;case 15:B.setBarData(z[K-1],z[K]);break;case 16:this.$=z[K].trim(),B.setAccTitle(this.$);break;case 17:case 18:this.$=z[K].trim(),B.setAccDescription(this.$);break;case 19:this.$=z[K-1];break;case 20:this.$=[Number(z[K-2]),...z[K]];break;case 21:this.$=[Number(z[K])];break;case 22:B.setXAxisTitle(z[K]);break;case 23:B.setXAxisTitle(z[K-1]);break;case 24:B.setXAxisTitle({type:"text",text:""});break;case 25:B.setXAxisBand(z[K]);break;case 26:B.setXAxisRangeData(Number(z[K-2]),Number(z[K]));break;case 27:this.$=z[K-1];break;case 28:this.$=[z[K-2],...z[K]];break;case 29:this.$=[z[K]];break;case 30:B.setYAxisTitle(z[K]);break;case 31:B.setYAxisTitle(z[K-1]);break;case 32:B.setYAxisTitle({type:"text",text:""});break;case 33:B.setYAxisRangeData(Number(z[K-2]),Number(z[K]));break;case 37:this.$={text:z[K],type:"text"};break;case 38:this.$={text:z[K],type:"text"};break;case 39:this.$={text:z[K],type:"markdown"};break;case 40:this.$=z[K];break;case 41:this.$=z[K-1]+""+z[K];break}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:s}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:s}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,34]),t(o,[2,35]),t(o,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:s}),{1:[2,3]},t(o,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:s}),{11:23,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k},{11:39,13:38,24:E,27:T,29:40,30:41,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k},{11:45,15:44,27:S,33:46,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k},{11:49,17:48,24:L,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k},{11:52,17:51,24:L,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(M,[2,37],{40:55,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k}),t(M,[2,38]),t(M,[2,39]),t(I,[2,40]),t(I,[2,42]),t(I,[2,43]),t(I,[2,44]),t(I,[2,45]),t(I,[2,46]),t(I,[2,47]),t(I,[2,48]),t(I,[2,49]),t(I,[2,50]),t(I,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:E,27:T}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k},t(_,[2,11]),t(_,[2,30],{33:60,27:S}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:L},{25:63,27:O},t(_,[2,14]),{17:65,24:L},t(_,[2,16]),t(_,[2,17]),t(I,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:w,50:k},t(_,[2,33]),t(_,[2,19]),{25:73,27:O},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:x(function(A,N){if(N.recoverable)this.trace(A);else{var F=new Error(A);throw F.hash=N,F}},"parseError"),parse:x(function(A){var N=this,F=[0],B=[],V=[null],z=[],H=this.table,K="",X=0,ne=0,j=0,ee=2,Q=1,G=z.slice.call(arguments,1),Z=Object.create(this.lexer),te={yy:{}};for(var oe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,oe)&&(te.yy[oe]=this.yy[oe]);Z.setInput(A,te.yy),te.yy.lexer=Z,te.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var de=Z.yylloc;z.push(de);var pe=Z.options&&Z.options.ranges;typeof te.yy.parseError=="function"?this.parseError=te.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(ce){F.length=F.length-2*ce,V.length=V.length-ce,z.length=z.length-ce}x(re,"popStack");function Be(){var ce;return ce=B.pop()||Z.lex()||Q,typeof ce!="number"&&(ce instanceof Array&&(B=ce,ce=B.pop()),ce=N.symbols_[ce]||ce),ce}x(Be,"lex");for(var le,Se,Ye,We,Ze,Qe,et={},ze,He,Ee,Y;;){if(Ye=F[F.length-1],this.defaultActions[Ye]?We=this.defaultActions[Ye]:((le===null||typeof le>"u")&&(le=Be()),We=H[Ye]&&H[Ye][le]),typeof We>"u"||!We.length||!We[0]){var ve="";Y=[];for(ze in H[Ye])this.terminals_[ze]&&ze>ee&&Y.push("'"+this.terminals_[ze]+"'");Z.showPosition?ve="Parse error on line "+(X+1)+`: `+Z.showPosition()+` Expecting `+Y.join(", ")+", got '"+(this.terminals_[le]||le)+"'":ve="Parse error on line "+(X+1)+": Unexpected "+(le==Q?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(ve,{text:Z.match,token:this.terminals_[le]||le,line:Z.yylineno,loc:de,expected:Y})}if(We[0]instanceof Array&&We.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ye+", token: "+le);switch(We[0]){case 1:F.push(le),V.push(Z.yytext),z.push(Z.yylloc),F.push(We[1]),le=null,Se?(le=Se,Se=null):(ne=Z.yyleng,K=Z.yytext,X=Z.yylineno,de=Z.yylloc,j>0&&j--);break;case 2:if(He=this.productions_[We[1]][1],et.$=V[V.length-He],et._$={first_line:z[z.length-(He||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(He||1)].first_column,last_column:z[z.length-1].last_column},pe&&(et._$.range=[z[z.length-(He||1)].range[0],z[z.length-1].range[1]]),Qe=this.performAction.apply(et,[K,ne,X,te.yy,We[1],V,z].concat(G)),typeof Qe<"u")return Qe;He&&(F=F.slice(0,-1*He*2),V=V.slice(0,-1*He),z=z.slice(0,-1*He)),F.push(this.productions_[We[1]][0]),V.push(et.$),z.push(et._$),Ee=H[F[F.length-2]][F[F.length-1]],F.push(Ee);break;case 3:return!0}}return!0},"parse")},R=function(){var P={EOF:1,parseError:x(function(N,F){if(this.yy.parser)this.yy.parser.parseError(N,F);else throw new Error(N)},"parseError"),setInput:x(function(A,N){return this.yy=N||this.yy||{},this._input=A,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var N=A.match(/(?:\r\n?|\n).*/g);return N?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),A},"input"),unput:x(function(A){var N=A.length,F=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;var B=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),F.length-1&&(this.yylineno-=F.length-1);var V=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:F?(F.length===B.length?this.yylloc.first_column:0)+B[B.length-F.length].length-F[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(A){this.unput(this.match.slice(A))},"less"),pastInput:x(function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var A=this.match;return A.length<20&&(A+=this._input.substr(0,20-A.length)),(A.substr(0,20)+(A.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var A=this.pastInput(),N=new Array(A.length+1).join("-");return A+this.upcomingInput()+` `+N+"^"},"showPosition"),test_match:x(function(A,N){var F,B,V;if(this.options.backtrack_lexer&&(V={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(V.yylloc.range=this.yylloc.range.slice(0))),B=A[0].match(/(?:\r\n?|\n).*/g),B&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+A[0].length},this.yytext+=A[0],this.match+=A[0],this.matches=A,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(A[0].length),this.matched+=A[0],F=this.performAction.call(this,this.yy,this,N,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),F)return F;if(this._backtrack){for(var z in V)this[z]=V[z];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,N,F,B;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),z=0;zN[0].length)){if(N=F,B=z,this.options.backtrack_lexer){if(A=this.test_match(F,V[z]),A!==!1)return A;if(this._backtrack){N=!1;continue}else return!1}else if(!this.options.flex)break}return N?(A=this.test_match(N,V[B]),A!==!1?A:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var N=this.next();return N||this.lex()},"lex"),begin:x(function(N){this.conditionStack.push(N)},"begin"),popState:x(function(){var N=this.conditionStack.length-1;return N>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(N){return N=this.conditionStack.length-1-Math.abs(N||0),N>=0?this.conditionStack[N]:"INITIAL"},"topState"),pushState:x(function(N){this.begin(N)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(N,F,B,V){var z=V;switch(B){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return P}();C.lexer=R;function D(){this.yy={}}return x(D,"Parser"),D.prototype=C,C.Parser=D,new D}();AY.parser=AY;I3t=AY;x(LY,"isBarPlot");x(OY,"isBandAxisData");x(Pb,"isLinearAxisData");T6e=class{constructor(t){this.parentGroup=t}static{x(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((i,a)=>Math.max(a.length,i),0)*e,height:e};let r={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(let i of t){let a=X$(n,1,i),s=a?a.width:i.length*e,o=a?a.height:e;r.width=Math.max(r.width,s),r.height=Math.max(r.height,o)}return n.remove(),r}},w6e=.7,k6e=.2,E6e=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{x(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){w6e*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(w6e*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),n=k6e*t.width;this.outerPadding=Math.min(r.width/2,n);let i=r.height+this.axisConfig.labelPadding*2;this.labelTextHeight=r.height,i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),n=k6e*t.height;this.outerPadding=Math.min(r.height/2,n);let i=r.width+this.axisConfig.labelPadding*2;i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${e},${this.getScaleValue(r)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(r)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${e} L ${this.getScaleValue(r)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(r)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},N3t=class extends E6e{static{x(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=Iv().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Iv().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),ie.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},P3t=class extends E6e{static{x(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=tu().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=tu().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};x(MY,"getAxis");F3t=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{x(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),r=Math.max(e.width,t.width),n=e.height+2*this.chartConfig.titlePadding;return e.width<=r&&e.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=r,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};x(S6e,"getChartTitleComponent");B3t=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{x(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(r=>[this.xAxis.getScaleValue(r[0]),this.yAxis.getScaleValue(r[1])]),e;return this.orientation==="horizontal"?e=Ro().y(r=>r[0]).x(r=>r[1])(t):e=Ro().x(r=>r[0]).y(r=>r[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},z3t=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{x(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),r=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=r/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(i=>({x:this.boundingRect.x,y:i[0]-n,height:r,width:i[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(i=>({x:i[0]-n,y:i[1],width:r,height:this.boundingRect.y+this.boundingRect.height-i[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},$3t=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{x(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[e,r]of this.chartData.plots.entries())switch(r.type){case"line":{let n=new B3t(r,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break;case"bar":{let n=new z3t(r,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break}return t}};x(C6e,"getPlotComponent");V3t=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:S6e(t,e,r,n),plot:C6e(t,e,r),xAxis:MY(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:MY(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{x(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,e-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=s.height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),s=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=s.height,this.componentStore.yAxis.setAxisPosition("left"),s=this.componentStore.yAxis.calculateSpace({width:t,height:e}),r=s.width,t-=s.width,t>0&&(i+=t,t=0),e>0&&(a+=e,e=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(o=>LY(o))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,e-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),r=o.height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=o.width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=o.height,i=r+o.height,t>0&&(a+=t,t=0),e>0&&(s+=e,e=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(l=>LY(l))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},U3t=class{static{x(this,"XYChartBuilder")}static build(t,e,r,n){return new V3t(t,e,r,n).getDrawableElement()}},K5=0,Z5=NY(),Q5=IY(),Ln=PY(),DY=Q5.plotColorPalette.split(",").map(t=>t.trim()),OL=!1,RY=!1;x(IY,"getChartDefaultThemeConfig");x(NY,"getChartDefaultConfig");x(PY,"getChartDefaultData");x(RL,"textSanitizer");x(A6e,"setTmpSVGG");x(L6e,"setOrientation");x(M6e,"setXAxisTitle");x(FY,"setXAxisRangeData");x(D6e,"setXAxisBand");x(O6e,"setYAxisTitle");x(R6e,"setYAxisRangeData");x(I6e,"setYAxisRangeFromPlotData");x(BY,"transformDataWithoutCategory");x(zY,"getPlotColorFromPalette");x(N6e,"setLineData");x(P6e,"setBarData");x(F6e,"getDrawableElem");x(B6e,"getChartThemeConfig");x(z6e,"getChartConfig");H3t=x(function(){zr(),K5=0,Z5=NY(),Ln=PY(),Q5=IY(),DY=Q5.plotColorPalette.split(",").map(t=>t.trim()),OL=!1,RY=!1},"clear"),q3t={getDrawableElem:F6e,clear:H3t,setAccTitle:Wr,getAccTitle:Xr,setDiagramTitle:Cn,getDiagramTitle:vn,getAccDescription:Zr,setAccDescription:Kr,setOrientation:L6e,setXAxisTitle:M6e,setXAxisRangeData:FY,setXAxisBand:D6e,setYAxisTitle:O6e,setYAxisRangeData:R6e,setLineData:N6e,setBarData:P6e,setTmpSVGG:A6e,getChartThemeConfig:B6e,getChartConfig:z6e},W3t=x((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig();function o(v){return v==="top"?"text-before-edge":"middle"}x(o,"getDominantBaseLine");function l(v){return v==="left"?"start":v==="right"?"end":"middle"}x(l,"getTextAnchor");function u(v){return`translate(${v.x}, ${v.y}) rotate(${v.rotation||0})`}x(u,"getTextTransformation"),ie.debug(`Rendering xychart chart `+t);let h=Is(e),f=h.append("g").attr("class","main"),d=f.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");mn(h,s.height,s.width,!0),h.attr("viewBox",`0 0 ${s.width} ${s.height}`),d.attr("fill",a.backgroundColor),i.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group"));let p=i.getDrawableElem(),g={};function m(v){let y=f,w="";for(let[k]of v.entries()){let E=f;k>0&&g[w]&&(E=g[w]),w+=v[k],y=g[w],y||(y=g[w]=E.append("g").attr("class",v[k]))}return y}x(m,"getGroup");for(let v of p){if(v.data.length===0)continue;let y=m(v.groupTexts);switch(v.type){case"rect":y.selectAll("rect").data(v.data).enter().append("rect").attr("x",w=>w.x).attr("y",w=>w.y).attr("width",w=>w.width).attr("height",w=>w.height).attr("fill",w=>w.fill).attr("stroke",w=>w.strokeFill).attr("stroke-width",w=>w.strokeWidth);break;case"text":y.selectAll("text").data(v.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",w=>w.fill).attr("font-size",w=>w.fontSize).attr("dominant-baseline",w=>o(w.verticalPos)).attr("text-anchor",w=>l(w.horizontalPos)).attr("transform",w=>u(w)).text(w=>w.text);break;case"path":y.selectAll("path").data(v.data).enter().append("path").attr("d",w=>w.path).attr("fill",w=>w.fill?w.fill:"none").attr("stroke",w=>w.strokeFill).attr("stroke-width",w=>w.strokeWidth);break}}},"draw"),G3t={draw:W3t},Y3t={parser:I3t,db:q3t,renderer:G3t}});var Y6e={};Wt(Y6e,{diagram:()=>E5t});var $Y,j3t,UY,Qo,J5,Zp,ek,X3t,K3t,Z3t,Q3t,J3t,e5t,t5t,r5t,n5t,i5t,a5t,s5t,o5t,l5t,c5t,u5t,h5t,f5t,d5t,p5t,VY,g5t,H6e,Yi,U6e,q6e,W6e,G6e,m5t,v5t,y5t,b5t,x5t,w5t,Fb,k5t,T5t,E5t,j6e=$(()=>{b();Sr();Cr();h3();qo();$Y=function(){var t=x(function(ne,j,ee,Q){for(ee=ee||{},Q=ne.length;Q--;ee[ne[Q]]=j);return ee},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],s=[1,18],o=[2,7],l=[1,22],u=[1,23],h=[1,24],f=[1,25],d=[1,26],p=[1,27],g=[1,20],m=[1,28],v=[1,29],y=[62,63],w=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],k=[1,47],E=[1,48],T=[1,49],S=[1,50],L=[1,51],_=[1,52],M=[1,53],I=[53,54],O=[1,64],C=[1,60],R=[1,61],D=[1,62],P=[1,63],A=[1,65],N=[1,69],F=[1,70],B=[1,67],V=[1,68],z=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],H={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:x(function(j,ee,Q,G,Z,te,oe){var de=te.length-1;switch(Z){case 4:this.$=te[de].trim(),G.setAccTitle(this.$);break;case 5:case 6:this.$=te[de].trim(),G.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:G.addRequirement(te[de-3],te[de-4]);break;case 14:G.setNewReqId(te[de-2]);break;case 15:G.setNewReqText(te[de-2]);break;case 16:G.setNewReqRisk(te[de-2]);break;case 17:G.setNewReqVerifyMethod(te[de-2]);break;case 20:this.$=G.RequirementType.REQUIREMENT;break;case 21:this.$=G.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=G.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=G.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=G.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=G.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=G.RiskLevel.LOW_RISK;break;case 27:this.$=G.RiskLevel.MED_RISK;break;case 28:this.$=G.RiskLevel.HIGH_RISK;break;case 29:this.$=G.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=G.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=G.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=G.VerifyType.VERIFY_TEST;break;case 33:G.addElement(te[de-3]);break;case 34:G.setNewElementType(te[de-2]);break;case 35:G.setNewElementDocRef(te[de-2]);break;case 38:G.addRelationship(te[de-2],te[de],te[de-4]);break;case 39:G.addRelationship(te[de-2],te[de-4],te[de]);break;case 40:this.$=G.Relationships.CONTAINS;break;case 41:this.$=G.Relationships.COPIES;break;case 42:this.$=G.Relationships.DERIVES;break;case 43:this.$=G.Relationships.SATISFIES;break;case 44:this.$=G.Relationships.VERIFIES;break;case 45:this.$=G.Relationships.REFINES;break;case 46:this.$=G.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:v},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:s,7:31,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:v},{4:17,5:s,7:32,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:v},{4:17,5:s,7:33,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:v},{4:17,5:s,7:34,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:v},{4:17,5:s,7:35,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:v},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},t(y,[2,20]),t(y,[2,21]),t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),t(w,[2,49]),t(w,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:k,56:E,57:T,58:S,59:L,60:_,61:M},{52:54,55:k,56:E,57:T,58:S,59:L,60:_,61:M},{5:[1,55]},{5:[1,56]},{53:[1,57]},t(I,[2,40]),t(I,[2,41]),t(I,[2,42]),t(I,[2,43]),t(I,[2,44]),t(I,[2,45]),t(I,[2,46]),{54:[1,58]},{5:O,20:59,21:C,24:R,26:D,28:P,30:A},{5:N,30:F,46:66,47:B,49:V},{23:71,62:m,63:v},{23:72,62:m,63:v},t(z,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:O,20:77,21:C,24:R,26:D,28:P,30:A},t(z,[2,19]),t(z,[2,33]),{22:[1,78]},{22:[1,79]},{5:N,30:F,46:80,47:B,49:V},t(z,[2,37]),t(z,[2,38]),t(z,[2,39]),{23:81,62:m,63:v},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},t(z,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},t(z,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:O,20:106,21:C,24:R,26:D,28:P,30:A},{5:O,20:107,21:C,24:R,26:D,28:P,30:A},{5:O,20:108,21:C,24:R,26:D,28:P,30:A},{5:O,20:109,21:C,24:R,26:D,28:P,30:A},{5:N,30:F,46:110,47:B,49:V},{5:N,30:F,46:111,47:B,49:V},t(z,[2,14]),t(z,[2,15]),t(z,[2,16]),t(z,[2,17]),t(z,[2,34]),t(z,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:x(function(j,ee){if(ee.recoverable)this.trace(j);else{var Q=new Error(j);throw Q.hash=ee,Q}},"parseError"),parse:x(function(j){var ee=this,Q=[0],G=[],Z=[null],te=[],oe=this.table,de="",pe=0,re=0,Be=0,le=2,Se=1,Ye=te.slice.call(arguments,1),We=Object.create(this.lexer),Ze={yy:{}};for(var Qe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qe)&&(Ze.yy[Qe]=this.yy[Qe]);We.setInput(j,Ze.yy),Ze.yy.lexer=We,Ze.yy.parser=this,typeof We.yylloc>"u"&&(We.yylloc={});var et=We.yylloc;te.push(et);var ze=We.options&&We.options.ranges;typeof Ze.yy.parseError=="function"?this.parseError=Ze.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function He(qe){Q.length=Q.length-2*qe,Z.length=Z.length-qe,te.length=te.length-qe}x(He,"popStack");function Ee(){var qe;return qe=G.pop()||We.lex()||Se,typeof qe!="number"&&(qe instanceof Array&&(G=qe,qe=G.pop()),qe=ee.symbols_[qe]||qe),qe}x(Ee,"lex");for(var Y,ve,ce,me,q,Le,J={},fe,xe,Ie,Fe;;){if(ce=Q[Q.length-1],this.defaultActions[ce]?me=this.defaultActions[ce]:((Y===null||typeof Y>"u")&&(Y=Ee()),me=oe[ce]&&oe[ce][Y]),typeof me>"u"||!me.length||!me[0]){var ye="";Fe=[];for(fe in oe[ce])this.terminals_[fe]&&fe>le&&Fe.push("'"+this.terminals_[fe]+"'");We.showPosition?ye="Parse error on line "+(pe+1)+`: `+We.showPosition()+` Expecting `+Fe.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ye="Parse error on line "+(pe+1)+": Unexpected "+(Y==Se?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ye,{text:We.match,token:this.terminals_[Y]||Y,line:We.yylineno,loc:et,expected:Fe})}if(me[0]instanceof Array&&me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ce+", token: "+Y);switch(me[0]){case 1:Q.push(Y),Z.push(We.yytext),te.push(We.yylloc),Q.push(me[1]),Y=null,ve?(Y=ve,ve=null):(re=We.yyleng,de=We.yytext,pe=We.yylineno,et=We.yylloc,Be>0&&Be--);break;case 2:if(xe=this.productions_[me[1]][1],J.$=Z[Z.length-xe],J._$={first_line:te[te.length-(xe||1)].first_line,last_line:te[te.length-1].last_line,first_column:te[te.length-(xe||1)].first_column,last_column:te[te.length-1].last_column},ze&&(J._$.range=[te[te.length-(xe||1)].range[0],te[te.length-1].range[1]]),Le=this.performAction.apply(J,[de,re,pe,Ze.yy,me[1],Z,te].concat(Ye)),typeof Le<"u")return Le;xe&&(Q=Q.slice(0,-1*xe*2),Z=Z.slice(0,-1*xe),te=te.slice(0,-1*xe)),Q.push(this.productions_[me[1]][0]),Z.push(J.$),te.push(J._$),Ie=oe[Q[Q.length-2]][Q[Q.length-1]],Q.push(Ie);break;case 3:return!0}}return!0},"parse")},K=function(){var ne={EOF:1,parseError:x(function(ee,Q){if(this.yy.parser)this.yy.parser.parseError(ee,Q);else throw new Error(ee)},"parseError"),setInput:x(function(j,ee){return this.yy=ee||this.yy||{},this._input=j,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var j=this._input[0];this.yytext+=j,this.yyleng++,this.offset++,this.match+=j,this.matched+=j;var ee=j.match(/(?:\r\n?|\n).*/g);return ee?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),j},"input"),unput:x(function(j){var ee=j.length,Q=j.split(/(?:\r\n?|\n)/g);this._input=j+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ee),this.offset-=ee;var G=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Q.length-1&&(this.yylineno-=Q.length-1);var Z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Q?(Q.length===G.length?this.yylloc.first_column:0)+G[G.length-Q.length].length-Q[0].length:this.yylloc.first_column-ee},this.options.ranges&&(this.yylloc.range=[Z[0],Z[0]+this.yyleng-ee]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(j){this.unput(this.match.slice(j))},"less"),pastInput:x(function(){var j=this.matched.substr(0,this.matched.length-this.match.length);return(j.length>20?"...":"")+j.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var j=this.match;return j.length<20&&(j+=this._input.substr(0,20-j.length)),(j.substr(0,20)+(j.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var j=this.pastInput(),ee=new Array(j.length+1).join("-");return j+this.upcomingInput()+` `+ee+"^"},"showPosition"),test_match:x(function(j,ee){var Q,G,Z;if(this.options.backtrack_lexer&&(Z={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Z.yylloc.range=this.yylloc.range.slice(0))),G=j[0].match(/(?:\r\n?|\n).*/g),G&&(this.yylineno+=G.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:G?G[G.length-1].length-G[G.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],Q=this.performAction.call(this,this.yy,this,ee,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Q)return Q;if(this._backtrack){for(var te in Z)this[te]=Z[te];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var j,ee,Q,G;this._more||(this.yytext="",this.match="");for(var Z=this._currentRules(),te=0;teee[0].length)){if(ee=Q,G=te,this.options.backtrack_lexer){if(j=this.test_match(Q,Z[te]),j!==!1)return j;if(this._backtrack){ee=!1;continue}else return!1}else if(!this.options.flex)break}return ee?(j=this.test_match(ee,Z[G]),j!==!1?j:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var ee=this.next();return ee||this.lex()},"lex"),begin:x(function(ee){this.conditionStack.push(ee)},"begin"),popState:x(function(){var ee=this.conditionStack.length-1;return ee>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(ee){return ee=this.conditionStack.length-1-Math.abs(ee||0),ee>=0?this.conditionStack[ee]:"INITIAL"},"topState"),pushState:x(function(ee){this.begin(ee)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(ee,Q,G,Z){var te=Z;switch(G){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return Q.yytext=Q.yytext.trim(),62;break}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return ne}();H.lexer=K;function X(){this.yy={}}return x(X,"Parser"),X.prototype=H,H.Parser=X,new X}();$Y.parser=$Y;j3t=$Y,UY=[],Qo={},J5=new Map,Zp={},ek=new Map,X3t={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},K3t={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},Z3t={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Q3t={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},J3t=x((t,e)=>(J5.has(t)||J5.set(t,{name:t,type:e,id:Qo.id,text:Qo.text,risk:Qo.risk,verifyMethod:Qo.verifyMethod}),Qo={},J5.get(t)),"addRequirement"),e5t=x(()=>J5,"getRequirements"),t5t=x(t=>{Qo!==void 0&&(Qo.id=t)},"setNewReqId"),r5t=x(t=>{Qo!==void 0&&(Qo.text=t)},"setNewReqText"),n5t=x(t=>{Qo!==void 0&&(Qo.risk=t)},"setNewReqRisk"),i5t=x(t=>{Qo!==void 0&&(Qo.verifyMethod=t)},"setNewReqVerifyMethod"),a5t=x(t=>(ek.has(t)||(ek.set(t,{name:t,type:Zp.type,docRef:Zp.docRef}),ie.info("Added new requirement: ",t)),Zp={},ek.get(t)),"addElement"),s5t=x(()=>ek,"getElements"),o5t=x(t=>{Zp!==void 0&&(Zp.type=t)},"setNewElementType"),l5t=x(t=>{Zp!==void 0&&(Zp.docRef=t)},"setNewElementDocRef"),c5t=x((t,e,r)=>{UY.push({type:t,src:e,dst:r})},"addRelationship"),u5t=x(()=>UY,"getRelationships"),h5t=x(()=>{UY=[],Qo={},J5=new Map,Zp={},ek=new Map,zr()},"clear"),f5t={RequirementType:X3t,RiskLevel:K3t,VerifyType:Z3t,Relationships:Q3t,getConfig:x(()=>Te().req,"getConfig"),addRequirement:J3t,getRequirements:e5t,setNewReqId:t5t,setNewReqText:r5t,setNewReqRisk:n5t,setNewReqVerifyMethod:i5t,setAccTitle:Wr,getAccTitle:Xr,setAccDescription:Kr,getAccDescription:Zr,addElement:a5t,getElements:s5t,setNewElementType:o5t,setNewElementDocRef:l5t,addRelationship:c5t,getRelationships:u5t,clear:h5t},d5t=x(t=>` marker { fill: ${t.relationColor}; stroke: ${t.relationColor}; } marker.cross { stroke: ${t.lineColor}; } svg { font-family: ${t.fontFamily}; font-size: ${t.fontSize}; } .reqBox { fill: ${t.requirementBackground}; fill-opacity: 1.0; stroke: ${t.requirementBorderColor}; stroke-width: ${t.requirementBorderSize}; } .reqTitle, .reqLabel{ fill: ${t.requirementTextColor}; } .reqLabelBox { fill: ${t.relationLabelBackground}; fill-opacity: 1.0; } .req-title-line { stroke: ${t.requirementBorderColor}; stroke-width: ${t.requirementBorderSize}; } .relationshipLine { stroke: ${t.relationColor}; stroke-width: 1; } .relationshipLabel { fill: ${t.relationLabelColor}; } `,"getStyles"),p5t=d5t,VY={CONTAINS:"contains",ARROW:"arrow"},g5t=x((t,e)=>{let r=t.append("defs").append("marker").attr("id",VY.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",VY.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0 L${e.line_height},${e.line_height/2} M${e.line_height},${e.line_height/2} L0,${e.line_height}`).attr("stroke-width",1)},"insertLineEndings"),H6e={ReqMarkers:VY,insertLineEndings:g5t},Yi={},U6e=0,q6e=x((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Yi.rect_min_width+"px").attr("height",Yi.rect_min_height+"px"),"newRectNode"),W6e=x((t,e,r)=>{let n=Yi.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",Yi.rect_padding).attr("dominant-baseline","hanging"),a=0;r.forEach(u=>{a==0?i.append("tspan").attr("text-anchor","middle").attr("x",Yi.rect_min_width/2).attr("dy",0).text(u):i.append("tspan").attr("text-anchor","middle").attr("x",Yi.rect_min_width/2).attr("dy",Yi.line_height*.75).text(u),a++});let s=1.5*Yi.rect_padding,o=a*Yi.line_height*.75,l=s+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Yi.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:i,y:l}},"newTitleNode"),G6e=x((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Yi.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,s=30,o=[];return r.forEach(l=>{let u=l.length;for(;u>s&&a<3;){let h=l.substring(0,s);l=l.substring(s,l.length),u=l.length,o[o.length]=h,a++}if(a==3){let h=o[o.length-1];o[o.length-1]=h.substring(0,h.length-4)+"..."}else o[o.length]=l;a=0}),o.forEach(l=>{i.append("tspan").attr("x",Yi.rect_padding).attr("dy",Yi.line_height).text(l)}),i},"newBodyNode"),m5t=x((t,e,r,n)=>{let i=e.node().getTotalLength(),a=e.node().getPointAtLength(i*.5),s="rel"+U6e;U6e++;let l=t.append("text").attr("class","req relationshipLabel").attr("id",s).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+s).attr("class","req reqLabelBox").attr("x",a.x-l.width/2).attr("y",a.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),v5t=x(function(t,e,r,n,i){let a=r.edge(Fb(e.src),Fb(e.dst)),s=Ro().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",s(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?o.attr("marker-start","url("+ct.getUrl(Yi.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+ct.getUrl(Yi.arrowMarkerAbsolute)+"#"+H6e.ReqMarkers.ARROW+"_line_ending)")),m5t(t,o,Yi,`<<${e.type}>>`)},"drawRelationshipFromLayout"),y5t=x((t,e,r)=>{t.forEach((n,i)=>{i=Fb(i),ie.info("Added new requirement: ",i);let a=r.append("g").attr("id",i),s="req-"+i,o=q6e(a,s),l=[],u=W6e(a,i+"_title",[`<<${n.type}>>`,`${n.name}`]);l.push(u.titleNode);let h=G6e(a,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],u.y);l.push(h);let f=o.node().getBBox();e.setNode(i,{width:f.width,height:f.height,shape:"rect",id:i})})},"drawReqs"),b5t=x((t,e,r)=>{t.forEach((n,i)=>{let a=Fb(i),s=r.append("g").attr("id",a),o="element-"+a,l=q6e(s,o),u=[],h=W6e(s,o+"_title",["<>",`${i}`]);u.push(h.titleNode);let f=G6e(s,o+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],h.y);u.push(f);let d=l.node().getBBox();e.setNode(a,{width:d.width,height:d.height,shape:"rect",id:a})})},"drawElements"),x5t=x((t,e)=>(t.forEach(function(r){let n=Fb(r.src),i=Fb(r.dst);e.setEdge(n,i,{relationship:r})}),t),"addRelationships"),w5t=x(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},"adjustEntities"),Fb=x(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),k5t=x((t,e,r,n)=>{Yi=Te().requirement;let i=Yi.securityLevel,a;i==="sandbox"&&(a=Je("#i"+e));let o=(i==="sandbox"?Je(a.nodes()[0].contentDocument.body):Je("body")).select(`[id='${e}']`);H6e.insertLineEndings(o,Yi);let l=new Yr({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Yi.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),u=n.db.getRequirements(),h=n.db.getElements(),f=n.db.getRelationships();y5t(u,l,o),b5t(h,l,o),x5t(f,l),Zf(l),w5t(o,l),f.forEach(function(v){v5t(o,v,l,e,n)});let d=Yi.rect_padding,p=o.node().getBBox(),g=p.width+d*2,m=p.height+d*2;mn(o,m,g,Yi.useMaxWidth),o.attr("viewBox",`${p.x-d} ${p.y-d} ${g} ${m}`)},"draw"),T5t={draw:k5t},E5t={parser:j3t,db:f5t,renderer:T5t,styles:p5t}});var vAe={};Wt(vAe,{diagram:()=>Ekt});function NL(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}function YY(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}function rAe(){jt.records.currentBox=void 0}async function hAe(t,e){ht.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=e,a=ct.splitBreaks(i).length,s=xa(i),o=s?await hv(i,Te()):tr.calculateTextDimensions(i,Bm($e));if(!s){let f=o.height/a;e.height+=f,ht.bumpVerticalPos(f)}let l,u=o.height-10,h=o.width;if(r===n){l=ht.getVerticalPos()+u,$e.rightAngles||(u+=$e.boxMargin,l=ht.getVerticalPos()+u),u+=30;let f=ct.getMax(h/2,$e.width/2);ht.insert(r-f,ht.getVerticalPos()-10+u,n+f,ht.getVerticalPos()+30+u)}else u+=$e.boxMargin,l=ht.getVerticalPos()+u,ht.insert(r,l-10,n,l);return ht.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,ht.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}function ku(t,e,r,n,i){ht.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){let s=t[e.id].width,o=Bm($e);e.message=tr.wrapLabel(`[${e.message}]`,s-2*$e.wrapPadding,o),e.width=s,e.wrap=!0;let l=tr.calculateTextDimensions(e.message,o),u=ct.getMax(l.height,$e.labelBoxHeight);a=n+u,ie.debug(`${u} - ${e.message}`)}i(e),ht.bumpVerticalPos(a)}function pAe(t,e,r,n,i,a,s){function o(u,h){u.x{let s=Bm($e),o=a.actorKeys.reduce((h,f)=>h+=t.get(f).width+(t.get(f).margin||0),0);o-=2*$e.boxTextMargin,a.wrap&&(a.name=tr.wrapLabel(a.name,o-2*$e.wrapPadding,s));let l=tr.calculateTextDimensions(a.name,s);i=ct.getMax(l.height,i);let u=ct.getMax(o,l.width+2*$e.wrapPadding);if(a.margin=$e.boxTextMargin,oa.textMaxHeight=i),ct.getMax(n,$e.height)}var jY,HY,S5t,jt,C5t,qY,_5t,A5t,na,L5t,M5t,D5t,O5t,R5t,I5t,N5t,rk,P5t,F5t,B5t,z5t,$5t,Q6e,Fm,V5t,U5t,H5t,tk,q5t,W5t,J6e,eAe,G5t,tAe,nAe,Y5t,iAe,X6e,j5t,X5t,Pm,aAe,sAe,K5t,K6e,XY,Z5t,Q5t,IL,zb,oAe,$h,lAe,J5t,ekt,tkt,rkt,nkt,ikt,akt,cAe,skt,okt,lkt,ckt,ukt,hkt,fkt,uAe,dkt,KY,pkt,ia,$e,ht,gkt,Bm,Bb,WY,mkt,vkt,GY,fAe,dAe,PL,Z6e,ykt,bkt,xkt,wkt,kkt,Tkt,Ekt,yAe=$(()=>{b();y7();R7();Qn();Sr();Cr();jY=Vi(kv(),1),HY=function(){var t=x(function(G,Z,te,oe){for(te=te||{},oe=G.length;oe--;te[G[oe]]=Z);return te},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,13],l=[1,14],u=[1,16],h=[1,17],f=[1,18],d=[1,24],p=[1,25],g=[1,26],m=[1,27],v=[1,28],y=[1,29],w=[1,30],k=[1,31],E=[1,32],T=[1,33],S=[1,34],L=[1,35],_=[1,36],M=[1,37],I=[1,38],O=[1,39],C=[1,41],R=[1,42],D=[1,43],P=[1,44],A=[1,45],N=[1,46],F=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],B=[4,5,16,50,52,53],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],H=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],K=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],X=[68,69,70],ne=[1,122],j={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:x(function(Z,te,oe,de,pe,re,Be){var le=re.length-1;switch(pe){case 3:return de.apply(re[le]),re[le];break;case 4:case 9:this.$=[];break;case 5:case 10:re[le-1].push(re[le]),this.$=re[le-1];break;case 6:case 7:case 11:case 12:this.$=re[le];break;case 8:case 13:this.$=[];break;case 15:re[le].type="createParticipant",this.$=re[le];break;case 16:re[le-1].unshift({type:"boxStart",boxData:de.parseBoxData(re[le-2])}),re[le-1].push({type:"boxEnd",boxText:re[le-2]}),this.$=re[le-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(re[le-2]),sequenceIndexStep:Number(re[le-1]),sequenceVisible:!0,signalType:de.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(re[le-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:de.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:de.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:de.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:de.LINETYPE.ACTIVE_START,actor:re[le-1].actor};break;case 23:this.$={type:"activeEnd",signalType:de.LINETYPE.ACTIVE_END,actor:re[le-1].actor};break;case 29:de.setDiagramTitle(re[le].substring(6)),this.$=re[le].substring(6);break;case 30:de.setDiagramTitle(re[le].substring(7)),this.$=re[le].substring(7);break;case 31:this.$=re[le].trim(),de.setAccTitle(this.$);break;case 32:case 33:this.$=re[le].trim(),de.setAccDescription(this.$);break;case 34:re[le-1].unshift({type:"loopStart",loopText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.LOOP_START}),re[le-1].push({type:"loopEnd",loopText:re[le-2],signalType:de.LINETYPE.LOOP_END}),this.$=re[le-1];break;case 35:re[le-1].unshift({type:"rectStart",color:de.parseMessage(re[le-2]),signalType:de.LINETYPE.RECT_START}),re[le-1].push({type:"rectEnd",color:de.parseMessage(re[le-2]),signalType:de.LINETYPE.RECT_END}),this.$=re[le-1];break;case 36:re[le-1].unshift({type:"optStart",optText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.OPT_START}),re[le-1].push({type:"optEnd",optText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.OPT_END}),this.$=re[le-1];break;case 37:re[le-1].unshift({type:"altStart",altText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.ALT_START}),re[le-1].push({type:"altEnd",signalType:de.LINETYPE.ALT_END}),this.$=re[le-1];break;case 38:re[le-1].unshift({type:"parStart",parText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.PAR_START}),re[le-1].push({type:"parEnd",signalType:de.LINETYPE.PAR_END}),this.$=re[le-1];break;case 39:re[le-1].unshift({type:"parStart",parText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.PAR_OVER_START}),re[le-1].push({type:"parEnd",signalType:de.LINETYPE.PAR_END}),this.$=re[le-1];break;case 40:re[le-1].unshift({type:"criticalStart",criticalText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.CRITICAL_START}),re[le-1].push({type:"criticalEnd",signalType:de.LINETYPE.CRITICAL_END}),this.$=re[le-1];break;case 41:re[le-1].unshift({type:"breakStart",breakText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.BREAK_START}),re[le-1].push({type:"breakEnd",optText:de.parseMessage(re[le-2]),signalType:de.LINETYPE.BREAK_END}),this.$=re[le-1];break;case 43:this.$=re[le-3].concat([{type:"option",optionText:de.parseMessage(re[le-1]),signalType:de.LINETYPE.CRITICAL_OPTION},re[le]]);break;case 45:this.$=re[le-3].concat([{type:"and",parText:de.parseMessage(re[le-1]),signalType:de.LINETYPE.PAR_AND},re[le]]);break;case 47:this.$=re[le-3].concat([{type:"else",altText:de.parseMessage(re[le-1]),signalType:de.LINETYPE.ALT_ELSE},re[le]]);break;case 48:re[le-3].draw="participant",re[le-3].type="addParticipant",re[le-3].description=de.parseMessage(re[le-1]),this.$=re[le-3];break;case 49:re[le-1].draw="participant",re[le-1].type="addParticipant",this.$=re[le-1];break;case 50:re[le-3].draw="actor",re[le-3].type="addParticipant",re[le-3].description=de.parseMessage(re[le-1]),this.$=re[le-3];break;case 51:re[le-1].draw="actor",re[le-1].type="addParticipant",this.$=re[le-1];break;case 52:re[le-1].type="destroyParticipant",this.$=re[le-1];break;case 53:this.$=[re[le-1],{type:"addNote",placement:re[le-2],actor:re[le-1].actor,text:re[le]}];break;case 54:re[le-2]=[].concat(re[le-1],re[le-1]).slice(0,2),re[le-2][0]=re[le-2][0].actor,re[le-2][1]=re[le-2][1].actor,this.$=[re[le-1],{type:"addNote",placement:de.PLACEMENT.OVER,actor:re[le-2].slice(0,2),text:re[le]}];break;case 55:this.$=[re[le-1],{type:"addLinks",actor:re[le-1].actor,text:re[le]}];break;case 56:this.$=[re[le-1],{type:"addALink",actor:re[le-1].actor,text:re[le]}];break;case 57:this.$=[re[le-1],{type:"addProperties",actor:re[le-1].actor,text:re[le]}];break;case 58:this.$=[re[le-1],{type:"addDetails",actor:re[le-1].actor,text:re[le]}];break;case 61:this.$=[re[le-2],re[le]];break;case 62:this.$=re[le];break;case 63:this.$=de.PLACEMENT.LEFTOF;break;case 64:this.$=de.PLACEMENT.RIGHTOF;break;case 65:this.$=[re[le-4],re[le-1],{type:"addMessage",from:re[le-4].actor,to:re[le-1].actor,signalType:re[le-3],msg:re[le],activate:!0},{type:"activeStart",signalType:de.LINETYPE.ACTIVE_START,actor:re[le-1].actor}];break;case 66:this.$=[re[le-4],re[le-1],{type:"addMessage",from:re[le-4].actor,to:re[le-1].actor,signalType:re[le-3],msg:re[le]},{type:"activeEnd",signalType:de.LINETYPE.ACTIVE_END,actor:re[le-4].actor}];break;case 67:this.$=[re[le-3],re[le-1],{type:"addMessage",from:re[le-3].actor,to:re[le-1].actor,signalType:re[le-2],msg:re[le]}];break;case 68:this.$={type:"addParticipant",actor:re[le]};break;case 69:this.$=de.LINETYPE.SOLID_OPEN;break;case 70:this.$=de.LINETYPE.DOTTED_OPEN;break;case 71:this.$=de.LINETYPE.SOLID;break;case 72:this.$=de.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=de.LINETYPE.DOTTED;break;case 74:this.$=de.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=de.LINETYPE.SOLID_CROSS;break;case 76:this.$=de.LINETYPE.DOTTED_CROSS;break;case 77:this.$=de.LINETYPE.SOLID_POINT;break;case 78:this.$=de.LINETYPE.DOTTED_POINT;break;case 79:this.$=de.parseMessage(re[le].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},t(F,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},t(F,[2,7]),t(F,[2,8]),t(F,[2,14]),{12:48,50:M,52:I,53:O},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:N},{22:55,70:N},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(F,[2,29]),t(F,[2,30]),{32:[1,61]},{34:[1,62]},t(F,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:N},{22:72,70:N},{22:73,70:N},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:N},{22:90,70:N},{22:91,70:N},{22:92,70:N},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(F,[2,6]),t(F,[2,15]),t(B,[2,9],{10:93}),t(F,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(F,[2,21]),{5:[1,97]},{5:[1,98]},t(F,[2,24]),t(F,[2,25]),t(F,[2,26]),t(F,[2,27]),t(F,[2,28]),t(F,[2,31]),t(F,[2,32]),t(V,i,{7:99}),t(V,i,{7:100}),t(V,i,{7:101}),t(z,i,{40:102,7:103}),t(H,i,{42:104,7:105}),t(H,i,{7:105,42:106}),t(K,i,{45:107,7:108}),t(V,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:N},t(X,[2,69]),t(X,[2,70]),t(X,[2,71]),t(X,[2,72]),t(X,[2,73]),t(X,[2,74]),t(X,[2,75]),t(X,[2,76]),t(X,[2,77]),t(X,[2,78]),{22:118,70:N},{22:120,58:119,70:N},{70:[2,63]},{70:[2,64]},{56:121,81:ne},{56:123,81:ne},{56:124,81:ne},{56:125,81:ne},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:M,52:I,53:O},{5:[1,131]},t(F,[2,19]),t(F,[2,20]),t(F,[2,22]),t(F,[2,23]),{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,132],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,133],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,134],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},{16:[1,135]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,49:[1,136],50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},{16:[1,137]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,48:[1,138],50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},{16:[1,139]},{16:[1,140]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,47:[1,141],50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,142],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:w,38:k,39:E,41:T,43:S,44:L,46:_,50:M,52:I,53:O,54:C,59:R,60:D,61:P,62:A,70:N},{15:[1,143]},t(F,[2,49]),{15:[1,144]},t(F,[2,51]),t(F,[2,52]),{22:145,70:N},{22:146,70:N},{56:147,81:ne},{56:148,81:ne},{56:149,81:ne},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(F,[2,16]),t(B,[2,10]),{12:151,50:M,52:I,53:O},t(B,[2,12]),t(B,[2,13]),t(F,[2,18]),t(F,[2,34]),t(F,[2,35]),t(F,[2,36]),t(F,[2,37]),{15:[1,152]},t(F,[2,38]),{15:[1,153]},t(F,[2,39]),t(F,[2,40]),{15:[1,154]},t(F,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ne},{56:158,81:ne},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:N},t(B,[2,11]),t(z,i,{7:103,40:160}),t(H,i,{7:105,42:161}),t(K,i,{7:108,45:162}),t(F,[2,48]),t(F,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:x(function(Z,te){if(te.recoverable)this.trace(Z);else{var oe=new Error(Z);throw oe.hash=te,oe}},"parseError"),parse:x(function(Z){var te=this,oe=[0],de=[],pe=[null],re=[],Be=this.table,le="",Se=0,Ye=0,We=0,Ze=2,Qe=1,et=re.slice.call(arguments,1),ze=Object.create(this.lexer),He={yy:{}};for(var Ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ee)&&(He.yy[Ee]=this.yy[Ee]);ze.setInput(Z,He.yy),He.yy.lexer=ze,He.yy.parser=this,typeof ze.yylloc>"u"&&(ze.yylloc={});var Y=ze.yylloc;re.push(Y);var ve=ze.options&&ze.options.ranges;typeof He.yy.parseError=="function"?this.parseError=He.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(Tt){oe.length=oe.length-2*Tt,pe.length=pe.length-Tt,re.length=re.length-Tt}x(ce,"popStack");function me(){var Tt;return Tt=de.pop()||ze.lex()||Qe,typeof Tt!="number"&&(Tt instanceof Array&&(de=Tt,Tt=de.pop()),Tt=te.symbols_[Tt]||Tt),Tt}x(me,"lex");for(var q,Le,J,fe,xe,Ie,Fe={},ye,qe,Re,nt;;){if(J=oe[oe.length-1],this.defaultActions[J]?fe=this.defaultActions[J]:((q===null||typeof q>"u")&&(q=me()),fe=Be[J]&&Be[J][q]),typeof fe>"u"||!fe.length||!fe[0]){var mt="";nt=[];for(ye in Be[J])this.terminals_[ye]&&ye>Ze&&nt.push("'"+this.terminals_[ye]+"'");ze.showPosition?mt="Parse error on line "+(Se+1)+`: `+ze.showPosition()+` Expecting `+nt.join(", ")+", got '"+(this.terminals_[q]||q)+"'":mt="Parse error on line "+(Se+1)+": Unexpected "+(q==Qe?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(mt,{text:ze.match,token:this.terminals_[q]||q,line:ze.yylineno,loc:Y,expected:nt})}if(fe[0]instanceof Array&&fe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+q);switch(fe[0]){case 1:oe.push(q),pe.push(ze.yytext),re.push(ze.yylloc),oe.push(fe[1]),q=null,Le?(q=Le,Le=null):(Ye=ze.yyleng,le=ze.yytext,Se=ze.yylineno,Y=ze.yylloc,We>0&&We--);break;case 2:if(qe=this.productions_[fe[1]][1],Fe.$=pe[pe.length-qe],Fe._$={first_line:re[re.length-(qe||1)].first_line,last_line:re[re.length-1].last_line,first_column:re[re.length-(qe||1)].first_column,last_column:re[re.length-1].last_column},ve&&(Fe._$.range=[re[re.length-(qe||1)].range[0],re[re.length-1].range[1]]),Ie=this.performAction.apply(Fe,[le,Ye,Se,He.yy,fe[1],pe,re].concat(et)),typeof Ie<"u")return Ie;qe&&(oe=oe.slice(0,-1*qe*2),pe=pe.slice(0,-1*qe),re=re.slice(0,-1*qe)),oe.push(this.productions_[fe[1]][0]),pe.push(Fe.$),re.push(Fe._$),Re=Be[oe[oe.length-2]][oe[oe.length-1]],oe.push(Re);break;case 3:return!0}}return!0},"parse")},ee=function(){var G={EOF:1,parseError:x(function(te,oe){if(this.yy.parser)this.yy.parser.parseError(te,oe);else throw new Error(te)},"parseError"),setInput:x(function(Z,te){return this.yy=te||this.yy||{},this._input=Z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var te=Z.match(/(?:\r\n?|\n).*/g);return te?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},"input"),unput:x(function(Z){var te=Z.length,oe=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-te),this.offset-=te;var de=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),oe.length-1&&(this.yylineno-=oe.length-1);var pe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:oe?(oe.length===de.length?this.yylloc.first_column:0)+de[de.length-oe.length].length-oe[0].length:this.yylloc.first_column-te},this.options.ranges&&(this.yylloc.range=[pe[0],pe[0]+this.yyleng-te]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(Z){this.unput(this.match.slice(Z))},"less"),pastInput:x(function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var Z=this.pastInput(),te=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+` `+te+"^"},"showPosition"),test_match:x(function(Z,te){var oe,de,pe;if(this.options.backtrack_lexer&&(pe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(pe.yylloc.range=this.yylloc.range.slice(0))),de=Z[0].match(/(?:\r\n?|\n).*/g),de&&(this.yylineno+=de.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:de?de[de.length-1].length-de[de.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Z[0].length),this.matched+=Z[0],oe=this.performAction.call(this,this.yy,this,te,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var re in pe)this[re]=pe[re];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,te,oe,de;this._more||(this.yytext="",this.match="");for(var pe=this._currentRules(),re=0;rete[0].length)){if(te=oe,de=re,this.options.backtrack_lexer){if(Z=this.test_match(oe,pe[re]),Z!==!1)return Z;if(this._backtrack){te=!1;continue}else return!1}else if(!this.options.flex)break}return te?(Z=this.test_match(te,pe[de]),Z!==!1?Z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var te=this.next();return te||this.lex()},"lex"),begin:x(function(te){this.conditionStack.push(te)},"begin"),popState:x(function(){var te=this.conditionStack.length-1;return te>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(te){return te=this.conditionStack.length-1-Math.abs(te||0),te>=0?this.conditionStack[te]:"INITIAL"},"topState"),pushState:x(function(te){this.begin(te)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(te,oe,de,pe){var re=pe;switch(de){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return oe.yytext=oe.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return oe.yytext=oe.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return G}();j.lexer=ee;function Q(){this.yy={}}return x(Q,"Parser"),Q.prototype=j,j.Parser=Q,new Q}();HY.parser=HY;S5t=HY,jt=new Vy(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),C5t=x(function(t){jt.records.boxes.push({name:t.text,wrap:t.wrap??Fm(),fill:t.color,actorKeys:[]}),jt.records.currentBox=jt.records.boxes.slice(-1)[0]},"addBox"),qY=x(function(t,e,r,n){let i=jt.records.currentBox,a=jt.records.actors.get(t);if(a){if(jt.records.currentBox&&a.box&&jt.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${jt.records.currentBox.name}' at the same time.`);if(i=a.box?a.box:jt.records.currentBox,a.box=i,a&&e===a.name&&r==null)return}if(r?.text==null&&(r={text:e,type:n}),(n==null||r.text==null)&&(r={text:e,type:n}),jt.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??Fm(),prevActor:jt.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),jt.records.prevActor){let s=jt.records.actors.get(jt.records.prevActor);s&&(s.nextActor=t)}jt.records.currentBox&&jt.records.currentBox.actorKeys.push(t),jt.records.prevActor=t},"addActor"),_5t=x(t=>{let e,r=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return jt.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??Fm(),type:n,activate:i}),!0},"addSignal"),L5t=x(function(){return jt.records.boxes.length>0},"hasAtLeastOneBox"),M5t=x(function(){return jt.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),D5t=x(function(){return jt.records.messages},"getMessages"),O5t=x(function(){return jt.records.boxes},"getBoxes"),R5t=x(function(){return jt.records.actors},"getActors"),I5t=x(function(){return jt.records.createdActors},"getCreatedActors"),N5t=x(function(){return jt.records.destroyedActors},"getDestroyedActors"),rk=x(function(t){return jt.records.actors.get(t)},"getActor"),P5t=x(function(){return[...jt.records.actors.keys()]},"getActorKeys"),F5t=x(function(){jt.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),B5t=x(function(){jt.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),z5t=x(()=>jt.records.sequenceNumbersEnabled,"showSequenceNumbers"),$5t=x(function(t){jt.records.wrapEnabled=t},"setWrap"),Q6e=x(t=>{if(t===void 0)return{};t=t.trim();let e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),Fm=x(()=>jt.records.wrapEnabled!==void 0?jt.records.wrapEnabled:Te().sequence?.wrap??!1,"autoWrap"),V5t=x(function(){jt.reset(),zr()},"clear"),U5t=x(function(t){let e=t.trim(),{wrap:r,cleanedText:n}=Q6e(e),i={text:n,wrap:r};return ie.debug(`parseMessage: ${JSON.stringify(i)}`),i},"parseMessage"),H5t=x(function(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{let s=new Option().style;s.color=r,s.color!==r&&(r="transparent",n=t.trim())}let{wrap:i,cleanedText:a}=Q6e(n);return{text:a?Nr(a,Te()):void 0,color:r,wrap:i}},"parseBoxData"),tk={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},q5t={FILLED:0,OPEN:1},W5t={LEFTOF:0,RIGHTOF:1,OVER:2},J6e=x(function(t,e,r){let n={actor:t,placement:e,message:r.text,wrap:r.wrap??Fm()},i=[].concat(t,t);jt.records.notes.push(n),jt.records.messages.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap??Fm(),type:tk.NOTE,placement:e})},"addNote"),eAe=x(function(t,e){let r=rk(t);try{let n=Nr(e.text,Te());n=n.replace(/&/g,"&"),n=n.replace(/=/g,"=");let i=JSON.parse(n);NL(r,i)}catch(n){ie.error("error while parsing actor link text",n)}},"addLinks"),G5t=x(function(t,e){let r=rk(t);try{let n={},i=Nr(e.text,Te()),a=i.indexOf("@");i=i.replace(/&/g,"&"),i=i.replace(/=/g,"=");let s=i.slice(0,a-1).trim(),o=i.slice(a+1).trim();n[s]=o,NL(r,n)}catch(n){ie.error("error while parsing actor link text",n)}},"addALink");x(NL,"insertLinks");tAe=x(function(t,e){let r=rk(t);try{let n=Nr(e.text,Te()),i=JSON.parse(n);YY(r,i)}catch(n){ie.error("error while parsing actor properties text",n)}},"addProperties");x(YY,"insertProperties");x(rAe,"boxEnd");nAe=x(function(t,e){let r=rk(t),n=document.getElementById(e.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&YY(r,a.properties),a.links&&NL(r,a.links)}catch(i){ie.error("error while parsing actor details text",i)}},"addDetails"),Y5t=x(function(t,e){if(t?.properties!==void 0)return t.properties[e]},"getActorProperty"),iAe=x(function(t){if(Array.isArray(t))t.forEach(function(e){iAe(e)});else switch(t.type){case"sequenceIndex":jt.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":qY(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(jt.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");jt.records.lastCreated=t.actor,qY(t.actor,t.actor,t.description,t.draw),jt.records.createdActors.set(t.actor,jt.records.messages.length);break;case"destroyParticipant":jt.records.lastDestroyed=t.actor,jt.records.destroyedActors.set(t.actor,jt.records.messages.length);break;case"activeStart":na(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":na(t.actor,void 0,void 0,t.signalType);break;case"addNote":J6e(t.actor,t.placement,t.text);break;case"addLinks":eAe(t.actor,t.text);break;case"addALink":G5t(t.actor,t.text);break;case"addProperties":tAe(t.actor,t.text);break;case"addDetails":nAe(t.actor,t.text);break;case"addMessage":if(jt.records.lastCreated){if(t.to!==jt.records.lastCreated)throw new Error("The created participant "+jt.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");jt.records.lastCreated=void 0}else if(jt.records.lastDestroyed){if(t.to!==jt.records.lastDestroyed&&t.from!==jt.records.lastDestroyed)throw new Error("The destroyed participant "+jt.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");jt.records.lastDestroyed=void 0}na(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":C5t(t.boxData);break;case"boxEnd":rAe();break;case"loopStart":na(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":na(void 0,void 0,void 0,t.signalType);break;case"rectStart":na(void 0,void 0,t.color,t.signalType);break;case"rectEnd":na(void 0,void 0,void 0,t.signalType);break;case"optStart":na(void 0,void 0,t.optText,t.signalType);break;case"optEnd":na(void 0,void 0,void 0,t.signalType);break;case"altStart":na(void 0,void 0,t.altText,t.signalType);break;case"else":na(void 0,void 0,t.altText,t.signalType);break;case"altEnd":na(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":Wr(t.text);break;case"parStart":na(void 0,void 0,t.parText,t.signalType);break;case"and":na(void 0,void 0,t.parText,t.signalType);break;case"parEnd":na(void 0,void 0,void 0,t.signalType);break;case"criticalStart":na(void 0,void 0,t.criticalText,t.signalType);break;case"option":na(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":na(void 0,void 0,void 0,t.signalType);break;case"breakStart":na(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":na(void 0,void 0,void 0,t.signalType);break}},"apply"),X6e={addActor:qY,addMessage:A5t,addSignal:na,addLinks:eAe,addDetails:nAe,addProperties:tAe,autoWrap:Fm,setWrap:$5t,enableSequenceNumbers:F5t,disableSequenceNumbers:B5t,showSequenceNumbers:z5t,getMessages:D5t,getActors:R5t,getCreatedActors:I5t,getDestroyedActors:N5t,getActor:rk,getActorKeys:P5t,getActorProperty:Y5t,getAccTitle:Xr,getBoxes:O5t,getDiagramTitle:vn,setDiagramTitle:Cn,getConfig:x(()=>Te().sequence,"getConfig"),clear:V5t,parseMessage:U5t,parseBoxData:H5t,LINETYPE:tk,ARROWTYPE:q5t,PLACEMENT:W5t,addNote:J6e,setAccTitle:Wr,apply:iAe,setAccDescription:Kr,getAccDescription:Zr,hasAtLeastOneBox:L5t,hasAtLeastOneBoxWithTitle:M5t},j5t=x(t=>`.actor { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; } text.actor > tspan { fill: ${t.actorTextColor}; stroke: none; } .actor-line { stroke: ${t.actorLineColor}; } .messageLine0 { stroke-width: 1.5; stroke-dasharray: none; stroke: ${t.signalColor}; } .messageLine1 { stroke-width: 1.5; stroke-dasharray: 2, 2; stroke: ${t.signalColor}; } #arrowhead path { fill: ${t.signalColor}; stroke: ${t.signalColor}; } .sequenceNumber { fill: ${t.sequenceNumberColor}; } #sequencenumber { fill: ${t.signalColor}; } #crosshead path { fill: ${t.signalColor}; stroke: ${t.signalColor}; } .messageText { fill: ${t.signalTextColor}; stroke: none; } .labelBox { stroke: ${t.labelBoxBorderColor}; fill: ${t.labelBoxBkgColor}; } .labelText, .labelText > tspan { fill: ${t.labelTextColor}; stroke: none; } .loopText, .loopText > tspan { fill: ${t.loopTextColor}; stroke: none; } .loopLine { stroke-width: 2px; stroke-dasharray: 2, 2; stroke: ${t.labelBoxBorderColor}; fill: ${t.labelBoxBorderColor}; } .note { //stroke: #decc93; stroke: ${t.noteBorderColor}; fill: ${t.noteBkgColor}; } .noteText, .noteText > tspan { fill: ${t.noteTextColor}; stroke: none; } .activation0 { fill: ${t.activationBkgColor}; stroke: ${t.activationBorderColor}; } .activation1 { fill: ${t.activationBkgColor}; stroke: ${t.activationBorderColor}; } .activation2 { fill: ${t.activationBkgColor}; stroke: ${t.activationBorderColor}; } .actorPopupMenu { position: absolute; } .actorPopupMenuPanel { position: absolute; fill: ${t.actorBkg}; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); } .actor-man line { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; } .actor-man circle, line { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; stroke-width: 2px; } `,"getStyles"),X5t=j5t,Pm=18*2,aAe="actor-top",sAe="actor-bottom",K5t="actor-box",K6e="actor-man",XY=x(function(t,e){return Jg(t,e)},"drawRect"),Z5t=x(function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let a=e.links,s=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");let u=t.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l);var h="";o.class!==void 0&&(h=" "+o.class);let f=o.width>r?o.width:r,d=u.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),a!=null){var p=20;for(let v in a){var g=u.append("a"),m=(0,jY.sanitizeUrl)(a[v]);g.attr("xlink:href",m),g.attr("target","_blank"),pkt(n)(v,g,o.x+10,o.height+p,f,20,{class:"actor"},n),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},"drawPopup"),Q5t=x(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),IL=x(async function(t,e,r=null){let n=t.append("foreignObject"),i=await ep(e.text,rn()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),e.class==="noteText"){let o=t.node().firstChild;o.setAttribute("height",s.height+2*e.textMargin);let l=o.getBBox();n.attr("x",Math.round(l.x+l.width/2-s.width/2)).attr("y",Math.round(l.y+l.height/2-s.height/2))}else if(r){let{startx:o,stopx:l,starty:u}=r;if(o>l){let h=o;o=l,l=h}n.attr("x",Math.round(o+Math.abs(o-l)/2-s.width/2)),e.class==="loopText"?n.attr("y",Math.round(u)):n.attr("y",Math.round(u-s.height))}return[n]},"drawKatex"),zb=x(function(t,e){let r=0,n=0,i=e.text.split(ct.lineBreakRegex),[a,s]=sc(e.fontSize),o=[],l=0,u=x(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":u=x(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":u=x(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":u=x(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[h,f]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(l=h*a);let d=t.append("text");d.attr("x",e.x),d.attr("y",u()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),s!==void 0&&d.style("font-size",s),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):l!==0&&d.attr("dy",l);let p=f||D$;if(e.tspan){let g=d.append("tspan");g.attr("x",e.x),e.fill!==void 0&&g.attr("fill",e.fill),g.text(p)}else d.text(p);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),o.push(d)}return o},"drawText"),oAe=x(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}x(r,"genPoints");let n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,zb(t,e),n},"drawLabel"),$h=-1,lAe=x((t,e,r,n)=>{t.select&&r.forEach(i=>{let a=e.get(i),s=t.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):n.mirrorActors&&s.attr("y2",a.stopy)})},"fixLifeLineHeights"),J5t=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t.append("g").lower();var l=o;n||($h++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",Q5t(`actor${$h}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+$h).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),l=o.append("g"),e.actorCnt=$h,e.links!=null&&l.attr("id","root-"+$h));let u=Eh();var h="actor";e.properties?.class?h=e.properties.class:u.fill="#eaeaea",n?h+=` ${sAe}`:h+=` ${aAe}`,u.x=e.x,u.y=i,u.width=e.width,u.height=e.height,u.class=h,u.rx=3,u.ry=3,u.name=e.name;let f=XY(l,u);if(e.rectData=u,e.properties?.icon){let p=e.properties.icon.trim();p.charAt(0)==="@"?z5e(l,u.x+u.width-20,u.y+10,p.substr(1)):B5e(l,u.x+u.width-20,u.y+10,p)}KY(r,xa(e.description))(e.description,l,u.x,u.y,u.width,u.height,{class:`actor ${K5t}`},r);let d=e.height;if(f.node){let p=f.node().getBBox();e.height=p.height,d=p.height}return d},"drawActorTypeParticipant"),ekt=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower();n||($h++,o.append("line").attr("id","actor"+$h).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=$h);let l=t.append("g"),u=K6e;n?u+=` ${sAe}`:u+=` ${aAe}`,l.attr("class",u),l.attr("name",e.name);let h=Eh();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+$h).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+$h).attr("x1",a-Pm/2).attr("y1",i+33).attr("x2",a+Pm/2).attr("y2",i+33),l.append("line").attr("x1",a-Pm/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+Pm/2-2).attr("y2",i+60);let f=l.append("circle");f.attr("cx",e.x+e.width/2),f.attr("cy",i+10),f.attr("r",15),f.attr("width",e.width),f.attr("height",e.height);let d=l.node().getBBox();return e.height=d.height,KY(r,xa(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:`actor ${K6e}`},r),e.height},"drawActorTypeActor"),tkt=x(async function(t,e,r,n){switch(e.type){case"actor":return await ekt(t,e,r,n);case"participant":return await J5t(t,e,r,n)}},"drawActor"),rkt=x(function(t,e,r){let i=t.append("g");cAe(i,e),e.name&&KY(r)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),i.lower()},"drawBox"),nkt=x(function(t){return t.append("g")},"anchorElement"),ikt=x(function(t,e,r,n,i){let a=Eh(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,XY(s,a)},"drawActivation"),akt=x(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:h}=n,f=t.append("g"),d=x(function(m,v,y,w){return f.append("line").attr("x1",m).attr("y1",v).attr("x2",y).attr("y2",w).attr("class","loopLine")},"drawLoopLine");d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(m){d(e.startx,m.y,e.stopx,m.y).style("stroke-dasharray","3, 3")});let p=v7();p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",oAe(f,p),p=uAe(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=!0;let g=xa(p.text)?await IL(f,p,e):zb(f,p);if(e.sectionTitles!==void 0){for(let[m,v]of Object.entries(e.sectionTitles))if(v.message){p.text=v.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[m].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=e.wrap,xa(p.text)?(e.starty=e.sections[m].y,await IL(f,p,e)):zb(f,p);let y=Math.round(g.map(w=>(w._groups||w)[0][0].getBBox().height).reduce((w,k)=>w+k));e.sections[m].height+=y-(i+a)}}return e.height=Math.round(e.stopy-e.starty),f},"drawLoop"),cAe=x(function(t,e){m7(t,e)},"drawBackgroundRect"),skt=x(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),okt=x(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),lkt=x(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),ckt=x(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),ukt=x(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),hkt=x(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),fkt=x(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),uAe=x(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),dkt=x(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),KY=function(){function t(a,s,o,l,u,h,f){let d=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(a);i(d,f)}x(t,"byText");function e(a,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:g,actorFontWeight:m}=d,[v,y]=sc(p),w=a.split(ct.lineBreakRegex);for(let k=0;kt.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:x(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:x(function(t){this.boxes.push(t)},"addBox"),addActor:x(function(t){this.actors.push(t)},"addActor"),addLoop:x(function(t){this.loops.push(t)},"addLoop"),addMessage:x(function(t){this.messages.push(t)},"addMessage"),addNote:x(function(t){this.notes.push(t)},"addNote"),lastActor:x(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:x(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:x(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:x(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:x(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,dAe(Te())},"init"),updateVal:x(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:x(function(t,e,r,n){let i=this,a=0;function s(o){return x(function(u){a++;let h=i.sequenceItems.length-a+1;i.updateVal(u,"starty",e-h*$e.boxMargin,Math.min),i.updateVal(u,"stopy",n+h*$e.boxMargin,Math.max),i.updateVal(ht.data,"startx",t-h*$e.boxMargin,Math.min),i.updateVal(ht.data,"stopx",r+h*$e.boxMargin,Math.max),o!=="activation"&&(i.updateVal(u,"startx",t-h*$e.boxMargin,Math.min),i.updateVal(u,"stopx",r+h*$e.boxMargin,Math.max),i.updateVal(ht.data,"starty",e-h*$e.boxMargin,Math.min),i.updateVal(ht.data,"stopy",n+h*$e.boxMargin,Math.max))},"updateItemBounds")}x(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:x(function(t,e,r,n){let i=ct.getMin(t,r),a=ct.getMax(t,r),s=ct.getMin(e,n),o=ct.getMax(e,n);this.updateVal(ht.data,"startx",i,Math.min),this.updateVal(ht.data,"starty",s,Math.min),this.updateVal(ht.data,"stopx",a,Math.max),this.updateVal(ht.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),newActivation:x(function(t,e,r){let n=r.get(t.from),i=PL(t.from).length||0,a=n.x+n.width/2+(i-1)*$e.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+$e.activationWidth,stopy:void 0,actor:t.from,anchored:ia.anchorElement(e)})},"newActivation"),endActivation:x(function(t){let e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:x(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:x(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:x(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:x(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:x(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:ht.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:x(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:x(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:x(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=ct.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return{bounds:this.data,models:this.models}},"getBounds")},gkt=x(async function(t,e){ht.bumpVerticalPos($e.boxMargin),e.height=$e.boxMargin,e.starty=ht.getVerticalPos();let r=Eh();r.x=e.startx,r.y=e.starty,r.width=e.width||$e.width,r.class="note";let n=t.append("g"),i=ia.drawRect(n,r),a=v7();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=$e.noteFontFamily,a.fontSize=$e.noteFontSize,a.fontWeight=$e.noteFontWeight,a.anchor=$e.noteAlign,a.textMargin=$e.noteMargin,a.valign="center";let s=xa(a.text)?await IL(n,a):zb(n,a),o=Math.round(s.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));i.attr("height",o+2*$e.noteMargin),e.height+=o+2*$e.noteMargin,ht.bumpVerticalPos(o+2*$e.noteMargin),e.stopy=e.starty+o+2*$e.noteMargin,e.stopx=e.startx+r.width,ht.insert(e.startx,e.starty,e.stopx,e.stopy),ht.models.addNote(e)},"drawNote"),Bm=x(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Bb=x(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),WY=x(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");x(hAe,"boundMessage");mkt=x(async function(t,e,r,n){let{startx:i,stopx:a,starty:s,message:o,type:l,sequenceIndex:u,sequenceVisible:h}=e,f=tr.calculateTextDimensions(o,Bm($e)),d=v7();d.x=i,d.y=s+10,d.width=a-i,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=$e.messageFontFamily,d.fontSize=$e.messageFontSize,d.fontWeight=$e.messageFontWeight,d.anchor=$e.messageAlign,d.valign="center",d.textMargin=$e.wrapPadding,d.tspan=!1,xa(d.text)?await IL(t,d,{startx:i,stopx:a,starty:r}):zb(t,d);let p=f.width,g;i===a?$e.rightAngles?g=t.append("path").attr("d",`M ${i},${r} H ${i+ct.getMax($e.width/2,p/2)} V ${r+25} H ${i}`):g=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=t.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",a),g.attr("y2",r)),l===n.db.LINETYPE.DOTTED||l===n.db.LINETYPE.DOTTED_CROSS||l===n.db.LINETYPE.DOTTED_POINT||l===n.db.LINETYPE.DOTTED_OPEN||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let m="";$e.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(l===n.db.LINETYPE.SOLID||l===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+m+"#arrowhead)"),(l===n.db.LINETYPE.BIDIRECTIONAL_SOLID||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+m+"#arrowhead)"),g.attr("marker-end","url("+m+"#arrowhead)")),(l===n.db.LINETYPE.SOLID_POINT||l===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+m+"#filled-head)"),(l===n.db.LINETYPE.SOLID_CROSS||l===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+m+"#crosshead)"),(h||$e.showSequenceNumbers)&&(g.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(u))},"drawMessage"),vkt=x(function(t,e,r,n,i,a,s){let o=0,l=0,u,h=0;for(let f of n){let d=e.get(f),p=d.box;u&&u!=p&&(s||ht.models.addBox(u),l+=$e.boxMargin+u.margin),p&&p!=u&&(s||(p.x=o+l,p.y=i),l+=p.margin),d.width=d.width||$e.width,d.height=ct.getMax(d.height||$e.height,$e.height),d.margin=d.margin||$e.actorMargin,h=ct.getMax(h,d.height),r.get(d.name)&&(l+=d.width/2),d.x=o+l,d.starty=ht.getVerticalPos(),ht.insert(d.x,i,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,ht.models.addActor(d)}u&&!s&&ht.models.addBox(u),ht.bumpVerticalPos(h)},"addActorRenderingData"),GY=x(async function(t,e,r,n){if(n){let i=0;ht.bumpVerticalPos($e.boxMargin*2);for(let a of r){let s=e.get(a);s.stopy||(s.stopy=ht.getVerticalPos());let o=await ia.drawActor(t,s,$e,!0);i=ct.getMax(i,o)}ht.bumpVerticalPos(i+$e.boxMargin)}else for(let i of r){let a=e.get(i);await ia.drawActor(t,a,$e,!1)}},"drawActors"),fAe=x(function(t,e,r,n){let i=0,a=0;for(let s of r){let o=e.get(s),l=bkt(o),u=ia.drawPopup(t,o,l,$e,$e.forceMenus,n);u.height>i&&(i=u.height),u.width+o.x>a&&(a=u.width+o.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),dAe=x(function(t){Ni($e,t),t.fontFamily&&($e.actorFontFamily=$e.noteFontFamily=$e.messageFontFamily=t.fontFamily),t.fontSize&&($e.actorFontSize=$e.noteFontSize=$e.messageFontSize=t.fontSize),t.fontWeight&&($e.actorFontWeight=$e.noteFontWeight=$e.messageFontWeight=t.fontWeight)},"setConf"),PL=x(function(t){return ht.activations.filter(function(e){return e.actor===t})},"actorActivations"),Z6e=x(function(t,e){let r=e.get(t),n=PL(t),i=n.reduce(function(s,o){return ct.getMin(s,o.startx)},r.x+r.width/2-1),a=n.reduce(function(s,o){return ct.getMax(s,o.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");x(ku,"adjustLoopHeightForWrap");x(pAe,"adjustCreatedDestroyedData");ykt=x(async function(t,e,r,n){let{securityLevel:i,sequence:a}=Te();$e=a;let s;i==="sandbox"&&(s=Je("#i"+e));let o=i==="sandbox"?Je(s.nodes()[0].contentDocument.body):Je("body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document;ht.init(),ie.debug(n.db);let u=i==="sandbox"?o.select(`[id="${e}"]`):Je(`[id="${e}"]`),h=n.db.getActors(),f=n.db.getCreatedActors(),d=n.db.getDestroyedActors(),p=n.db.getBoxes(),g=n.db.getActorKeys(),m=n.db.getMessages(),v=n.db.getDiagramTitle(),y=n.db.hasAtLeastOneBox(),w=n.db.hasAtLeastOneBoxWithTitle(),k=await gAe(h,m,n);if($e.height=await mAe(h,k,p),ia.insertComputerIcon(u),ia.insertDatabaseIcon(u),ia.insertClockIcon(u),y&&(ht.bumpVerticalPos($e.boxMargin),w&&ht.bumpVerticalPos(p[0].textMaxHeight)),$e.hideUnusedParticipants===!0){let F=new Set;m.forEach(B=>{F.add(B.from),F.add(B.to)}),g=g.filter(B=>F.has(B))}vkt(u,h,f,g,0,m,!1);let E=await kkt(m,h,k,n);ia.insertArrowHead(u),ia.insertArrowCrossHead(u),ia.insertArrowFilledHead(u),ia.insertSequenceNumber(u);function T(F,B){let V=ht.endActivation(F);V.starty+18>B&&(V.starty=B-6,B+=12),ia.drawActivation(u,V,B,$e,PL(F.from).length),ht.insert(V.startx,B-10,V.stopx,B)}x(T,"activeEnd");let S=1,L=1,_=[],M=[],I=0;for(let F of m){let B,V,z;switch(F.type){case n.db.LINETYPE.NOTE:ht.resetVerticalPos(),V=F.noteModel,await gkt(u,V);break;case n.db.LINETYPE.ACTIVE_START:ht.newActivation(F,u,h);break;case n.db.LINETYPE.ACTIVE_END:T(F,ht.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:ku(E,F,$e.boxMargin,$e.boxMargin+$e.boxTextMargin,H=>ht.newLoop(H));break;case n.db.LINETYPE.LOOP_END:B=ht.endLoop(),await ia.drawLoop(u,B,"loop",$e),ht.bumpVerticalPos(B.stopy-ht.getVerticalPos()),ht.models.addLoop(B);break;case n.db.LINETYPE.RECT_START:ku(E,F,$e.boxMargin,$e.boxMargin,H=>ht.newLoop(void 0,H.message));break;case n.db.LINETYPE.RECT_END:B=ht.endLoop(),M.push(B),ht.models.addLoop(B),ht.bumpVerticalPos(B.stopy-ht.getVerticalPos());break;case n.db.LINETYPE.OPT_START:ku(E,F,$e.boxMargin,$e.boxMargin+$e.boxTextMargin,H=>ht.newLoop(H));break;case n.db.LINETYPE.OPT_END:B=ht.endLoop(),await ia.drawLoop(u,B,"opt",$e),ht.bumpVerticalPos(B.stopy-ht.getVerticalPos()),ht.models.addLoop(B);break;case n.db.LINETYPE.ALT_START:ku(E,F,$e.boxMargin,$e.boxMargin+$e.boxTextMargin,H=>ht.newLoop(H));break;case n.db.LINETYPE.ALT_ELSE:ku(E,F,$e.boxMargin+$e.boxTextMargin,$e.boxMargin,H=>ht.addSectionToLoop(H));break;case n.db.LINETYPE.ALT_END:B=ht.endLoop(),await ia.drawLoop(u,B,"alt",$e),ht.bumpVerticalPos(B.stopy-ht.getVerticalPos()),ht.models.addLoop(B);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:ku(E,F,$e.boxMargin,$e.boxMargin+$e.boxTextMargin,H=>ht.newLoop(H)),ht.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:ku(E,F,$e.boxMargin+$e.boxTextMargin,$e.boxMargin,H=>ht.addSectionToLoop(H));break;case n.db.LINETYPE.PAR_END:B=ht.endLoop(),await ia.drawLoop(u,B,"par",$e),ht.bumpVerticalPos(B.stopy-ht.getVerticalPos()),ht.models.addLoop(B);break;case n.db.LINETYPE.AUTONUMBER:S=F.message.start||S,L=F.message.step||L,F.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:ku(E,F,$e.boxMargin,$e.boxMargin+$e.boxTextMargin,H=>ht.newLoop(H));break;case n.db.LINETYPE.CRITICAL_OPTION:ku(E,F,$e.boxMargin+$e.boxTextMargin,$e.boxMargin,H=>ht.addSectionToLoop(H));break;case n.db.LINETYPE.CRITICAL_END:B=ht.endLoop(),await ia.drawLoop(u,B,"critical",$e),ht.bumpVerticalPos(B.stopy-ht.getVerticalPos()),ht.models.addLoop(B);break;case n.db.LINETYPE.BREAK_START:ku(E,F,$e.boxMargin,$e.boxMargin+$e.boxTextMargin,H=>ht.newLoop(H));break;case n.db.LINETYPE.BREAK_END:B=ht.endLoop(),await ia.drawLoop(u,B,"break",$e),ht.bumpVerticalPos(B.stopy-ht.getVerticalPos()),ht.models.addLoop(B);break;default:try{z=F.msgModel,z.starty=ht.getVerticalPos(),z.sequenceIndex=S,z.sequenceVisible=n.db.showSequenceNumbers();let H=await hAe(u,z);pAe(F,z,H,I,h,f,d),_.push({messageModel:z,lineStartY:H}),ht.models.addMessage(z)}catch(H){ie.error("error while drawing message",H)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(F.type)&&(S=S+L),I++}ie.debug("createdActors",f),ie.debug("destroyedActors",d),await GY(u,h,g,!1);for(let F of _)await mkt(u,F.messageModel,F.lineStartY,n);$e.mirrorActors&&await GY(u,h,g,!0),M.forEach(F=>ia.drawBackgroundRect(u,F)),lAe(u,h,g,$e);for(let F of ht.models.boxes)F.height=ht.getVerticalPos()-F.y,ht.insert(F.x,F.y,F.x+F.width,F.height),F.startx=F.x,F.starty=F.y,F.stopx=F.startx+F.width,F.stopy=F.starty+F.height,F.stroke="rgb(0,0,0, 0.5)",ia.drawBox(u,F,$e);y&&ht.bumpVerticalPos($e.boxMargin);let O=fAe(u,h,g,l),{bounds:C}=ht.getBounds();C.startx===void 0&&(C.startx=0),C.starty===void 0&&(C.starty=0),C.stopx===void 0&&(C.stopx=0),C.stopy===void 0&&(C.stopy=0);let R=C.stopy-C.starty;R2,f=x(m=>o?-m:m,"adjustValue");t.from===t.to?u=l:(t.activate&&!h&&(u+=f($e.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(u+=f(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=f(3)));let d=[n,i,a,s],p=Math.abs(l-u);t.wrap&&t.message&&(t.message=tr.wrapLabel(t.message,ct.getMax(p+2*$e.wrapPadding,$e.width),Bm($e)));let g=tr.calculateTextDimensions(t.message,Bm($e));return{width:ct.getMax(t.wrap?0:g.width+2*$e.wrapPadding,p+2*$e.wrapPadding,$e.width),height:0,startx:l,stopx:u,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,d),toBounds:Math.max.apply(null,d)}},"buildMessageModel"),kkt=x(async function(t,e,r,n){let i={},a=[],s,o,l;for(let u of t){switch(u.id=tr.random({length:10}),u.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=a.pop(),i[s.id]=s,i[u.id]=s,a.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{let f=e.get(u.from?u.from:u.to.actor),d=PL(u.from?u.from:u.to.actor).length,p=f.x+f.width/2+(d-1)*$e.activationWidth/2,g={startx:p,stopx:p+$e.activationWidth,actor:u.from,enabled:!0};ht.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let f=ht.activations.map(d=>d.actor).lastIndexOf(u.from);ht.activations.splice(f,1).splice(0,1)}break}u.placement!==void 0?(o=await xkt(u,e,n),u.noteModel=o,a.forEach(f=>{s=f,s.from=ct.getMin(s.from,o.startx),s.to=ct.getMax(s.to,o.startx+o.width),s.width=ct.getMax(s.width,Math.abs(s.from-s.to))-$e.labelBoxWidth})):(l=wkt(u,e,n),u.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(f=>{if(s=f,l.startx===l.stopx){let d=e.get(u.from),p=e.get(u.to);s.from=ct.getMin(d.x-l.width/2,d.x-d.width/2,s.from),s.to=ct.getMax(p.x+l.width/2,p.x+d.width/2,s.to),s.width=ct.getMax(s.width,Math.abs(s.to-s.from))-$e.labelBoxWidth}else s.from=ct.getMin(l.startx,s.from),s.to=ct.getMax(l.stopx,s.to),s.width=ct.getMax(s.width,l.width)-$e.labelBoxWidth}))}return ht.activations=[],ie.debug("Loop type widths:",i),i},"calculateLoopBounds"),Tkt={bounds:ht,drawActors:GY,drawActorsPopup:fAe,setConf:dAe,draw:ykt},Ekt={parser:S5t,db:X6e,renderer:Tkt,styles:X5t,init:x(({wrap:t})=>{X6e.setWrap(t)},"init")}});function JY(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}var ZY,FL,bAe,xAe,BL,zL,ni,wAe,nk,Vb,kAe,Tu,QY,ik,zm,$m,Skt,$b,TAe,EAe,Ckt,_kt,Akt,Lkt,Mkt,Dkt,Okt,SAe,Rkt,Ikt,Nkt,ej,Pkt,Fkt,Bkt,zkt,$kt,Vkt,Ukt,Hkt,Qp,CAe,tj,_Ae,qkt,Wkt,Gkt,Ykt,jkt,Xkt,Kkt,Ub,Zkt,$L,Qkt,Jkt,eTt,VL,rj=$(()=>{b();Bp();Qf();Qn();Sr();Cr();ZY=function(){var t=x(function(He,Ee,Y,ve){for(Y=Y||{},ve=He.length;ve--;Y[He[ve]]=Ee);return Y},"o"),e=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,42],s=[1,26],o=[1,24],l=[1,25],u=[1,32],h=[1,33],f=[1,34],d=[1,45],p=[1,35],g=[1,36],m=[1,37],v=[1,38],y=[1,27],w=[1,28],k=[1,29],E=[1,30],T=[1,31],S=[1,44],L=[1,46],_=[1,43],M=[1,47],I=[1,9],O=[1,8,9],C=[1,58],R=[1,59],D=[1,60],P=[1,61],A=[1,62],N=[1,63],F=[1,64],B=[1,8,9,41],V=[1,76],z=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],H=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],K=[13,58,84,99,101,102],X=[13,58,71,72,84,99,101,102],ne=[13,58,66,67,68,69,70,84,99,101,102],j=[1,98],ee=[1,115],Q=[1,107],G=[1,113],Z=[1,108],te=[1,109],oe=[1,110],de=[1,111],pe=[1,112],re=[1,114],Be=[22,58,59,80,84,85,86,87,88,89],le=[1,8,9,39,41,44],Se=[1,8,9,22],Ye=[1,143],We=[1,8,9,59],Ze=[1,8,9,22,58,59,80,84,85,86,87,88,89],Qe={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:x(function(Ee,Y,ve,ce,me,q,Le){var J=q.length-1;switch(me){case 8:this.$=q[J-1];break;case 9:case 12:case 14:this.$=q[J];break;case 10:case 13:this.$=q[J-2]+"."+q[J];break;case 11:case 15:this.$=q[J-1]+q[J];break;case 16:case 17:this.$=q[J-1]+"~"+q[J]+"~";break;case 18:ce.addRelation(q[J]);break;case 19:q[J-1].title=ce.cleanupLabel(q[J]),ce.addRelation(q[J-1]);break;case 30:this.$=q[J].trim(),ce.setAccTitle(this.$);break;case 31:case 32:this.$=q[J].trim(),ce.setAccDescription(this.$);break;case 33:ce.addClassesToNamespace(q[J-3],q[J-1]);break;case 34:ce.addClassesToNamespace(q[J-4],q[J-1]);break;case 35:this.$=q[J],ce.addNamespace(q[J]);break;case 36:this.$=[q[J]];break;case 37:this.$=[q[J-1]];break;case 38:q[J].unshift(q[J-2]),this.$=q[J];break;case 40:ce.setCssClass(q[J-2],q[J]);break;case 41:ce.addMembers(q[J-3],q[J-1]);break;case 42:ce.setCssClass(q[J-5],q[J-3]),ce.addMembers(q[J-5],q[J-1]);break;case 43:this.$=q[J],ce.addClass(q[J]);break;case 44:this.$=q[J-1],ce.addClass(q[J-1]),ce.setClassLabel(q[J-1],q[J]);break;case 45:ce.addAnnotation(q[J],q[J-2]);break;case 46:case 59:this.$=[q[J]];break;case 47:q[J].push(q[J-1]),this.$=q[J];break;case 48:break;case 49:ce.addMember(q[J-1],ce.cleanupLabel(q[J]));break;case 50:break;case 51:break;case 52:this.$={id1:q[J-2],id2:q[J],relation:q[J-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:q[J-3],id2:q[J],relation:q[J-1],relationTitle1:q[J-2],relationTitle2:"none"};break;case 54:this.$={id1:q[J-3],id2:q[J],relation:q[J-2],relationTitle1:"none",relationTitle2:q[J-1]};break;case 55:this.$={id1:q[J-4],id2:q[J],relation:q[J-2],relationTitle1:q[J-3],relationTitle2:q[J-1]};break;case 56:ce.addNote(q[J],q[J-1]);break;case 57:ce.addNote(q[J]);break;case 58:this.$=q[J-2],ce.defineClass(q[J-1],q[J]);break;case 60:this.$=q[J-2].concat([q[J]]);break;case 61:ce.setDirection("TB");break;case 62:ce.setDirection("BT");break;case 63:ce.setDirection("RL");break;case 64:ce.setDirection("LR");break;case 65:this.$={type1:q[J-2],type2:q[J],lineType:q[J-1]};break;case 66:this.$={type1:"none",type2:q[J],lineType:q[J-1]};break;case 67:this.$={type1:q[J-1],type2:"none",lineType:q[J]};break;case 68:this.$={type1:"none",type2:"none",lineType:q[J]};break;case 69:this.$=ce.relationType.AGGREGATION;break;case 70:this.$=ce.relationType.EXTENSION;break;case 71:this.$=ce.relationType.COMPOSITION;break;case 72:this.$=ce.relationType.DEPENDENCY;break;case 73:this.$=ce.relationType.LOLLIPOP;break;case 74:this.$=ce.lineType.LINE;break;case 75:this.$=ce.lineType.DOTTED_LINE;break;case 76:case 82:this.$=q[J-2],ce.setClickEvent(q[J-1],q[J]);break;case 77:case 83:this.$=q[J-3],ce.setClickEvent(q[J-2],q[J-1]),ce.setTooltip(q[J-2],q[J]);break;case 78:this.$=q[J-2],ce.setLink(q[J-1],q[J]);break;case 79:this.$=q[J-3],ce.setLink(q[J-2],q[J-1],q[J]);break;case 80:this.$=q[J-3],ce.setLink(q[J-2],q[J-1]),ce.setTooltip(q[J-2],q[J]);break;case 81:this.$=q[J-4],ce.setLink(q[J-3],q[J-2],q[J]),ce.setTooltip(q[J-3],q[J-1]);break;case 84:this.$=q[J-3],ce.setClickEvent(q[J-2],q[J-1],q[J]);break;case 85:this.$=q[J-4],ce.setClickEvent(q[J-3],q[J-2],q[J-1]),ce.setTooltip(q[J-3],q[J]);break;case 86:this.$=q[J-3],ce.setLink(q[J-2],q[J]);break;case 87:this.$=q[J-4],ce.setLink(q[J-3],q[J-1],q[J]);break;case 88:this.$=q[J-4],ce.setLink(q[J-3],q[J-1]),ce.setTooltip(q[J-3],q[J]);break;case 89:this.$=q[J-5],ce.setLink(q[J-4],q[J-2],q[J]),ce.setTooltip(q[J-4],q[J-1]);break;case 90:this.$=q[J-2],ce.setCssStyle(q[J-1],q[J]);break;case 91:ce.setCssClass(q[J-1],q[J]);break;case 92:this.$=[q[J]];break;case 93:q[J-2].push(q[J]),this.$=q[J-2];break;case 95:this.$=q[J-1]+q[J];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:g,62:m,63:v,73:y,74:w,76:k,80:E,81:T,84:S,99:L,101:_,102:M},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(I,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,18],{22:[1,50]}),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),{34:[1,51]},{36:[1,52]},t(O,[2,32]),t(O,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:C,67:R,68:D,69:P,70:A,71:N,72:F}),{39:[1,65]},t(B,[2,39],{39:[1,67],44:[1,66]}),t(O,[2,50]),t(O,[2,51]),{16:68,58:d,84:S,99:L,101:_},{16:39,18:69,19:40,58:d,84:S,99:L,101:_,102:M},{16:39,18:70,19:40,58:d,84:S,99:L,101:_,102:M},{16:39,18:71,19:40,58:d,84:S,99:L,101:_,102:M},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:d,84:S,99:L,101:_,102:M},{13:V,53:75},{56:77,58:[1,78]},t(O,[2,61]),t(O,[2,62]),t(O,[2,63]),t(O,[2,64]),t(z,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:d,84:S,99:L,101:_,102:M}),t(z,[2,14],{20:[1,82]}),{15:83,16:84,58:d,84:S,99:L,101:_},{16:39,18:85,19:40,58:d,84:S,99:L,101:_,102:M},t(H,[2,118]),t(H,[2,119]),t(H,[2,120]),t(H,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(I,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:e,35:r,37:n,42:i,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:g,62:m,63:v,73:y,74:w,76:k,80:E,81:T,84:S,99:L,101:_,102:M}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:g,62:m,63:v,73:y,74:w,76:k,80:E,81:T,84:S,99:L,101:_,102:M},t(O,[2,19]),t(O,[2,30]),t(O,[2,31]),{13:[1,89],16:39,18:88,19:40,58:d,84:S,99:L,101:_,102:M},{51:90,64:56,65:57,66:C,67:R,68:D,69:P,70:A,71:N,72:F},t(O,[2,49]),{65:91,71:N,72:F},t(K,[2,68],{64:92,66:C,67:R,68:D,69:P,70:A}),t(X,[2,69]),t(X,[2,70]),t(X,[2,71]),t(X,[2,72]),t(X,[2,73]),t(ne,[2,74]),t(ne,[2,75]),{8:[1,94],24:95,40:93,43:23,46:a},{16:96,58:d,84:S,99:L,101:_},{45:97,49:j},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:ee,57:104,58:Q,80:G,82:105,83:106,84:Z,85:te,86:oe,87:de,88:pe,89:re},{58:[1,116]},{13:V,53:117},t(O,[2,57]),t(O,[2,123]),{22:ee,57:118,58:Q,59:[1,119],80:G,82:105,83:106,84:Z,85:te,86:oe,87:de,88:pe,89:re},t(Be,[2,59]),{16:39,18:120,19:40,58:d,84:S,99:L,101:_,102:M},t(z,[2,15]),t(z,[2,16]),t(z,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:d,84:S,99:L,101:_},t(le,[2,43],{11:123,12:[1,124]}),t(I,[2,7]),{9:[1,125]},t(Se,[2,52]),{16:39,18:126,19:40,58:d,84:S,99:L,101:_,102:M},{13:[1,128],16:39,18:127,19:40,58:d,84:S,99:L,101:_,102:M},t(K,[2,67],{64:129,66:C,67:R,68:D,69:P,70:A}),t(K,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:a},{8:[1,132],41:[2,36]},t(B,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:j},{16:39,18:136,19:40,58:d,84:S,99:L,101:_,102:M},t(O,[2,76],{13:[1,137]}),t(O,[2,78],{13:[1,139],75:[1,138]}),t(O,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(O,[2,90],{59:Ye}),t(We,[2,92],{83:144,22:ee,58:Q,80:G,84:Z,85:te,86:oe,87:de,88:pe,89:re}),t(Ze,[2,94]),t(Ze,[2,96]),t(Ze,[2,97]),t(Ze,[2,98]),t(Ze,[2,99]),t(Ze,[2,100]),t(Ze,[2,101]),t(Ze,[2,102]),t(Ze,[2,103]),t(Ze,[2,104]),t(O,[2,91]),t(O,[2,56]),t(O,[2,58],{59:Ye}),{58:[1,145]},t(z,[2,13]),{15:146,16:84,58:d,84:S,99:L,101:_},{39:[2,11]},t(le,[2,44]),{13:[1,147]},{1:[2,4]},t(Se,[2,54]),t(Se,[2,53]),{16:39,18:148,19:40,58:d,84:S,99:L,101:_,102:M},t(K,[2,65]),t(O,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:a},{45:151,49:j},t(B,[2,41]),{41:[2,47]},t(O,[2,45]),t(O,[2,77]),t(O,[2,79]),t(O,[2,80],{75:[1,152]}),t(O,[2,83]),t(O,[2,84],{13:[1,153]}),t(O,[2,86],{13:[1,155],75:[1,154]}),{22:ee,58:Q,80:G,82:156,83:106,84:Z,85:te,86:oe,87:de,88:pe,89:re},t(Ze,[2,95]),t(Be,[2,60]),{39:[2,10]},{14:[1,157]},t(Se,[2,55]),t(O,[2,34]),{41:[2,38]},{41:[1,158]},t(O,[2,81]),t(O,[2,85]),t(O,[2,87]),t(O,[2,88],{75:[1,159]}),t(We,[2,93],{83:144,22:ee,58:Q,80:G,84:Z,85:te,86:oe,87:de,88:pe,89:re}),t(le,[2,8]),t(B,[2,42]),t(O,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:x(function(Ee,Y){if(Y.recoverable)this.trace(Ee);else{var ve=new Error(Ee);throw ve.hash=Y,ve}},"parseError"),parse:x(function(Ee){var Y=this,ve=[0],ce=[],me=[null],q=[],Le=this.table,J="",fe=0,xe=0,Ie=0,Fe=2,ye=1,qe=q.slice.call(arguments,1),Re=Object.create(this.lexer),nt={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(nt.yy[mt]=this.yy[mt]);Re.setInput(Ee,nt.yy),nt.yy.lexer=Re,nt.yy.parser=this,typeof Re.yylloc>"u"&&(Re.yylloc={});var Tt=Re.yylloc;q.push(Tt);var ue=Re.options&&Re.options.ranges;typeof nt.yy.parseError=="function"?this.parseError=nt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(qt){ve.length=ve.length-2*qt,me.length=me.length-qt,q.length=q.length-qt}x(ae,"popStack");function ke(){var qt;return qt=ce.pop()||Re.lex()||ye,typeof qt!="number"&&(qt instanceof Array&&(ce=qt,qt=ce.pop()),qt=Y.symbols_[qt]||qt),qt}x(ke,"lex");for(var we,Ne,Ge,st,ot,at,Ue={},it,pt,yt,Et;;){if(Ge=ve[ve.length-1],this.defaultActions[Ge]?st=this.defaultActions[Ge]:((we===null||typeof we>"u")&&(we=ke()),st=Le[Ge]&&Le[Ge][we]),typeof st>"u"||!st.length||!st[0]){var hn="";Et=[];for(it in Le[Ge])this.terminals_[it]&&it>Fe&&Et.push("'"+this.terminals_[it]+"'");Re.showPosition?hn="Parse error on line "+(fe+1)+`: `+Re.showPosition()+` Expecting `+Et.join(", ")+", got '"+(this.terminals_[we]||we)+"'":hn="Parse error on line "+(fe+1)+": Unexpected "+(we==ye?"end of input":"'"+(this.terminals_[we]||we)+"'"),this.parseError(hn,{text:Re.match,token:this.terminals_[we]||we,line:Re.yylineno,loc:Tt,expected:Et})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ge+", token: "+we);switch(st[0]){case 1:ve.push(we),me.push(Re.yytext),q.push(Re.yylloc),ve.push(st[1]),we=null,Ne?(we=Ne,Ne=null):(xe=Re.yyleng,J=Re.yytext,fe=Re.yylineno,Tt=Re.yylloc,Ie>0&&Ie--);break;case 2:if(pt=this.productions_[st[1]][1],Ue.$=me[me.length-pt],Ue._$={first_line:q[q.length-(pt||1)].first_line,last_line:q[q.length-1].last_line,first_column:q[q.length-(pt||1)].first_column,last_column:q[q.length-1].last_column},ue&&(Ue._$.range=[q[q.length-(pt||1)].range[0],q[q.length-1].range[1]]),at=this.performAction.apply(Ue,[J,xe,fe,nt.yy,st[1],me,q].concat(qe)),typeof at<"u")return at;pt&&(ve=ve.slice(0,-1*pt*2),me=me.slice(0,-1*pt),q=q.slice(0,-1*pt)),ve.push(this.productions_[st[1]][0]),me.push(Ue.$),q.push(Ue._$),yt=Le[ve[ve.length-2]][ve[ve.length-1]],ve.push(yt);break;case 3:return!0}}return!0},"parse")},et=function(){var He={EOF:1,parseError:x(function(Y,ve){if(this.yy.parser)this.yy.parser.parseError(Y,ve);else throw new Error(Y)},"parseError"),setInput:x(function(Ee,Y){return this.yy=Y||this.yy||{},this._input=Ee,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var Ee=this._input[0];this.yytext+=Ee,this.yyleng++,this.offset++,this.match+=Ee,this.matched+=Ee;var Y=Ee.match(/(?:\r\n?|\n).*/g);return Y?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ee},"input"),unput:x(function(Ee){var Y=Ee.length,ve=Ee.split(/(?:\r\n?|\n)/g);this._input=Ee+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Y),this.offset-=Y;var ce=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ve.length-1&&(this.yylineno-=ve.length-1);var me=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ve?(ve.length===ce.length?this.yylloc.first_column:0)+ce[ce.length-ve.length].length-ve[0].length:this.yylloc.first_column-Y},this.options.ranges&&(this.yylloc.range=[me[0],me[0]+this.yyleng-Y]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(Ee){this.unput(this.match.slice(Ee))},"less"),pastInput:x(function(){var Ee=this.matched.substr(0,this.matched.length-this.match.length);return(Ee.length>20?"...":"")+Ee.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var Ee=this.match;return Ee.length<20&&(Ee+=this._input.substr(0,20-Ee.length)),(Ee.substr(0,20)+(Ee.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var Ee=this.pastInput(),Y=new Array(Ee.length+1).join("-");return Ee+this.upcomingInput()+` `+Y+"^"},"showPosition"),test_match:x(function(Ee,Y){var ve,ce,me;if(this.options.backtrack_lexer&&(me={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(me.yylloc.range=this.yylloc.range.slice(0))),ce=Ee[0].match(/(?:\r\n?|\n).*/g),ce&&(this.yylineno+=ce.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ce?ce[ce.length-1].length-ce[ce.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ee[0].length},this.yytext+=Ee[0],this.match+=Ee[0],this.matches=Ee,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ee[0].length),this.matched+=Ee[0],ve=this.performAction.call(this,this.yy,this,Y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ve)return ve;if(this._backtrack){for(var q in me)this[q]=me[q];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ee,Y,ve,ce;this._more||(this.yytext="",this.match="");for(var me=this._currentRules(),q=0;qY[0].length)){if(Y=ve,ce=q,this.options.backtrack_lexer){if(Ee=this.test_match(ve,me[q]),Ee!==!1)return Ee;if(this._backtrack){Y=!1;continue}else return!1}else if(!this.options.flex)break}return Y?(Ee=this.test_match(Y,me[ce]),Ee!==!1?Ee:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var Y=this.next();return Y||this.lex()},"lex"),begin:x(function(Y){this.conditionStack.push(Y)},"begin"),popState:x(function(){var Y=this.conditionStack.length-1;return Y>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(Y){return Y=this.conditionStack.length-1-Math.abs(Y||0),Y>=0?this.conditionStack[Y]:"INITIAL"},"topState"),pushState:x(function(Y){this.begin(Y)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(Y,ve,ce,me){var q=me;switch(ce){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:return this.popState(),41;break;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;break;case 39:return this.popState(),8;break;case 40:break;case 41:return this.popState(),this.popState(),41;break;case 42:return this.begin("class-body"),39;break;case 43:return this.popState(),41;break;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return He}();Qe.lexer=et;function ze(){this.yy={}}return x(ze,"Parser"),ze.prototype=Qe,Qe.Parser=ze,new ze}();ZY.parser=ZY;FL=ZY,bAe=["#","+","~","-",""],xAe=class{static{x(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";let r=Nr(t,Te());this.parseMember(r)}getDisplayDetails(){let t=this.visibility+Sf(this.id);this.memberType==="method"&&(t+=`(${Sf(this.parameters.trim())})`,this.returnType&&(t+=" : "+Sf(this.returnType))),t=t.trim();let e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(i){let a=i[1]?i[1].trim():"";if(bAe.includes(a)&&(this.visibility=a),this.id=i[2],this.parameters=i[3]?i[3].trim():"",e=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",e===""){let s=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(s)&&(e=s,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=t.length,i=t.substring(0,1),a=t.substring(n-1);bAe.includes(i)&&(this.visibility=i),/[$*]/.exec(a)&&(e=a),this.id=t.substring(this.visibility===""?0:1,e===""?n:n-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let r=`${this.visibility?"\\"+this.visibility:""}${Sf(this.id)}${this.memberType==="method"?`(${Sf(this.parameters)})${this.returnType?" : "+Sf(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},BL="classId-",zL=[],ni=new Map,wAe=new Map,nk=[],Vb=[],kAe=0,Tu=new Map,QY=0,ik=[],zm=x(t=>ct.sanitizeText(t,Te()),"sanitizeText"),$m=x(function(t){let e=ct.sanitizeText(t,Te()),r="",n=e;if(e.indexOf("~")>0){let i=e.split("~");n=zm(i[0]),r=zm(i[1])}return{className:n,type:r}},"splitClassNameAndType"),Skt=x(function(t,e){let r=ct.sanitizeText(t,Te());e&&(e=zm(e));let{className:n}=$m(r);ni.get(n).label=e,ni.get(n).text=`${e}${ni.get(n).type?`<${ni.get(n).type}>`:""}`},"setClassLabel"),$b=x(function(t){let e=ct.sanitizeText(t,Te()),{className:r,type:n}=$m(e);if(ni.has(r))return;let i=ct.sanitizeText(r,Te());ni.set(i,{id:i,type:n,label:i,text:`${i}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:BL+i+"-"+kAe}),kAe++},"addClass"),TAe=x(function(t,e){let r={id:`interface${Vb.length}`,label:t,classId:e};Vb.push(r)},"addInterface"),EAe=x(function(t){let e=ct.sanitizeText(t,Te());if(ni.has(e))return ni.get(e).domId;throw new Error("Class not found: "+e)},"lookUpDomId"),Ckt=x(function(){zL=[],ni=new Map,nk=[],Vb=[],ik=[],ik.push(CAe),Tu=new Map,QY=0,tj="TB",zr()},"clear"),_kt=x(function(t){return ni.get(t)},"getClass"),Akt=x(function(){return ni},"getClasses"),Lkt=x(function(){return zL},"getRelations"),Mkt=x(function(){return nk},"getNotes"),Dkt=x(function(t){ie.debug("Adding relation: "+JSON.stringify(t));let e=[Qp.LOLLIPOP,Qp.AGGREGATION,Qp.COMPOSITION,Qp.DEPENDENCY,Qp.EXTENSION];t.relation.type1===Qp.LOLLIPOP&&!e.includes(t.relation.type2)?($b(t.id2),TAe(t.id1,t.id2),t.id1=`interface${Vb.length-1}`):t.relation.type2===Qp.LOLLIPOP&&!e.includes(t.relation.type1)?($b(t.id1),TAe(t.id2,t.id1),t.id2=`interface${Vb.length-1}`):($b(t.id1),$b(t.id2)),t.id1=$m(t.id1).className,t.id2=$m(t.id2).className,t.relationTitle1=ct.sanitizeText(t.relationTitle1.trim(),Te()),t.relationTitle2=ct.sanitizeText(t.relationTitle2.trim(),Te()),zL.push(t)},"addRelation"),Okt=x(function(t,e){let r=$m(t).className;ni.get(r).annotations.push(e)},"addAnnotation"),SAe=x(function(t,e){$b(t);let r=$m(t).className,n=ni.get(r);if(typeof e=="string"){let i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(zm(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(new xAe(i,"method")):i&&n.members.push(new xAe(i,"attribute"))}},"addMember"),Rkt=x(function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>SAe(t,r)))},"addMembers"),Ikt=x(function(t,e){let r={id:`note${nk.length}`,class:e,text:t};nk.push(r)},"addNote"),Nkt=x(function(t){return t.startsWith(":")&&(t=t.substring(1)),zm(t.trim())},"cleanupLabel"),ej=x(function(t,e){t.split(",").forEach(function(r){let n=r;/\d/.exec(r[0])&&(n=BL+n);let i=ni.get(n);i&&(i.cssClasses+=" "+e)})},"setCssClass"),Pkt=x(function(t,e){for(let r of t){let n=wAe.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},wAe.set(r,n)),e&&e.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)}),ni.forEach(i=>{i.cssClasses.includes(r)&&i.styles.push(...e.flatMap(a=>a.split(",")))})}},"defineClass"),Fkt=x(function(t,e){t.split(",").forEach(function(r){e!==void 0&&(ni.get(r).tooltip=zm(e))})},"setTooltip"),Bkt=x(function(t,e){return e&&Tu.has(e)?Tu.get(e).classes.get(t).tooltip:ni.get(t).tooltip},"getTooltip"),zkt=x(function(t,e,r){let n=Te();t.split(",").forEach(function(i){let a=i;/\d/.exec(i[0])&&(a=BL+a);let s=ni.get(a);s&&(s.link=tr.formatUrl(e,n),n.securityLevel==="sandbox"?s.linkTarget="_top":typeof r=="string"?s.linkTarget=zm(r):s.linkTarget="_blank")}),ej(t,"clickable")},"setLink"),$kt=x(function(t,e,r){t.split(",").forEach(function(n){Vkt(n,e,r),ni.get(n).haveCallback=!0}),ej(t,"clickable")},"setClickEvent"),Vkt=x(function(t,e,r){let n=ct.sanitizeText(t,Te());if(Te().securityLevel!=="loose"||e===void 0)return;let a=n;if(ni.has(a)){let s=EAe(a),o=[];if(typeof r=="string"){o=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),Je(this).classed("hover",!1)})},"setupToolTips");ik.push(CAe);tj="TB",_Ae=x(()=>tj,"getDirection"),qkt=x(t=>{tj=t},"setDirection"),Wkt=x(function(t){Tu.has(t)||(Tu.set(t,{id:t,classes:new Map,children:{},domId:BL+t+"-"+QY}),QY++)},"addNamespace"),Gkt=x(function(t){return Tu.get(t)},"getNamespace"),Ykt=x(function(){return Tu},"getNamespaces"),jkt=x(function(t,e){if(Tu.has(t))for(let r of e){let{className:n}=$m(r);ni.get(n).parent=t,Tu.get(t).classes.set(n,ni.get(n))}},"addClassesToNamespace"),Xkt=x(function(t,e){let r=ni.get(t);if(!(!e||!r))for(let n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle");x(JY,"getArrowMarker");Kkt=x(()=>{let t=[],e=[],r=Te();for(let i of Tu.keys()){let a=Tu.get(i);if(a){let s={id:a.id,label:a.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:r.look};t.push(s)}}for(let i of ni.keys()){let a=ni.get(i);if(a){let s=a;s.parentId=a.parent,s.look=r.look,t.push(s)}}let n=0;for(let i of nk){n++;let a={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look};t.push(a);let s=ni.get(i.class)?.id??"";if(s){let o={id:`edgeNote${n}`,start:i.id,end:s,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};e.push(o)}}for(let i of Vb){let a={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};t.push(a)}n=0;for(let i of zL){n++;let a={id:D6(i.id1,i.id2,{prefix:"id",counter:n}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:JY(i.relation.type1),arrowTypeEnd:JY(i.relation.type2),startLabelRight:i.relationTitle1==="none"?"":i.relationTitle1,endLabelLeft:i.relationTitle2==="none"?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:i.relation.lineType==1?"dashed":"solid",look:r.look};e.push(a)}return{nodes:t,edges:e,other:{},config:r,direction:_Ae()}},"getData"),Ub={setAccTitle:Wr,getAccTitle:Xr,getAccDescription:Zr,setAccDescription:Kr,getConfig:x(()=>Te().class,"getConfig"),addClass:$b,bindFunctions:Ukt,clear:Ckt,getClass:_kt,getClasses:Akt,getNotes:Mkt,addAnnotation:Okt,addNote:Ikt,getRelations:Lkt,addRelation:Dkt,getDirection:_Ae,setDirection:qkt,addMember:SAe,addMembers:Rkt,cleanupLabel:Nkt,lineType:Hkt,relationType:Qp,setClickEvent:$kt,setCssClass:ej,defineClass:Pkt,setLink:zkt,getTooltip:Bkt,setTooltip:Fkt,lookUpDomId:EAe,setDiagramTitle:Cn,getDiagramTitle:vn,setClassLabel:Skt,addNamespace:Wkt,addClassesToNamespace:jkt,getNamespace:Gkt,getNamespaces:Ykt,setCssStyle:Xkt,getData:Kkt},Zkt=x(t=>`g.classGroup text { fill: ${t.nodeBorder||t.classText}; stroke: none; font-family: ${t.fontFamily}; font-size: 10px; .title { font-weight: bolder; } } .nodeLabel, .edgeLabel { color: ${t.classText}; } .edgeLabel .label rect { fill: ${t.mainBkg}; } .label text { fill: ${t.classText}; } .labelBkg { background: ${t.mainBkg}; } .edgeLabel .label span { background: ${t.mainBkg}; } .classTitle { font-weight: bolder; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .divider { stroke: ${t.nodeBorder}; stroke-width: 1; } g.clickable { cursor: pointer; } g.classGroup rect { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; } g.classGroup line { stroke: ${t.nodeBorder}; stroke-width: 1; } .classLabel .box { stroke: none; stroke-width: 0; fill: ${t.mainBkg}; opacity: 0.5; } .classLabel .label { fill: ${t.nodeBorder}; font-size: 10px; } .relation { stroke: ${t.lineColor}; stroke-width: 1; fill: none; } .dashed-line{ stroke-dasharray: 3; } .dotted-line{ stroke-dasharray: 1 2; } #compositionStart, .composition { fill: ${t.lineColor} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #compositionEnd, .composition { fill: ${t.lineColor} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #dependencyStart, .dependency { fill: ${t.lineColor} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #dependencyStart, .dependency { fill: ${t.lineColor} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #extensionStart, .extension { fill: transparent !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #extensionEnd, .extension { fill: transparent !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #aggregationStart, .aggregation { fill: transparent !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #aggregationEnd, .aggregation { fill: transparent !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #lollipopStart, .lollipop { fill: ${t.mainBkg} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #lollipopEnd, .lollipop { fill: ${t.mainBkg} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } .edgeTerminals { font-size: 11px; line-height: initial; } .classTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } `,"getStyles"),$L=Zkt,Qkt=x((t,e="TB")=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Jkt=x(function(t,e){return e.db.getClasses()},"getClasses"),eTt=x(async function(t,e,r,n){ie.info("REF0:"),ie.info("Drawing class diagram (v3)",e);let{securityLevel:i,state:a,layout:s}=Te(),o=n.db.getData(),l=By(e,i);o.type=n.type,o.layoutAlgorithm=a7(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await Ry(o,l);let u=8;tr.insertTitle(l,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),zy(l,u,"classDiagram",a?.useMaxWidth??!0)},"draw"),VL={getClasses:Jkt,draw:eTt,getDir:Qkt}});var AAe={};Wt(AAe,{diagram:()=>tTt});var tTt,LAe=$(()=>{b();rj();Bp();Qf();Xf();lu();Kc();gh();Kl();ro();Qn();Sr();tTt={parser:FL,db:Ub,renderer:VL,styles:$L,init:x(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ub.clear()},"init")}});var MAe={};Wt(MAe,{diagram:()=>rTt});var rTt,DAe=$(()=>{b();rj();Bp();Qf();Xf();lu();Kc();gh();Kl();ro();Qn();Sr();rTt={parser:FL,db:Ub,renderer:VL,styles:$L,init:x(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ub.clear()},"init")}});function qL(t="",e=0,r="",n=lj){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${wTt}-${t}${i}-${e}`}function ak(t,e,r){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{if(r.get(i)){let a=r.get(i);e.cssCompiledStyles=[...e.cssCompiledStyles,...a.styles]}}));let n=t.find(i=>i.id===e.id);n?Object.assign(n,e):t.push(e)}function ZAe(t){return t?.classes?.join(" ")??""}function QAe(t){return t?.styles??[]}function uj(){return new Map}function KL(t=""){let e=t;return t===cj&&(ok++,e=`${JAe}${ok}`),e}function ZL(t="",e=lk){return t===cj?JAe:e}function s7e(t=""){let e=t;return t===e7e&&(ok++,e=`${t7e}${ok}`),e}function o7e(t="",e=lk){return t===e7e?t7e:e}function l7e(t,e,r){let n=KL(t.id.trim()),i=ZL(t.id.trim(),t.type),a=KL(e.id.trim()),s=ZL(e.id.trim(),e.type);e0(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),e0(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Jo.relations.push({id1:n,id2:a,relationTitle:ct.sanitizeText(r,Te())})}var aj,QL,nTt,zAe,GL,oj,iTt,aTt,sTt,lk,$Ae,VAe,UAe,HAe,qAe,WAe,nj,ij,oTt,lTt,OAe,RAe,cTt,uTt,ck,hTt,fTt,GAe,dTt,pTt,gTt,mTt,vTt,yTt,bTt,xTt,YAe,jAe,wTt,lj,kTt,IAe,XAe,TTt,ETt,KAe,HL,Jp,STt,NAe,sk,CTt,cj,JAe,e7e,t7e,PAe,FAe,_Tt,ATt,YL,hj,r7e,jL,Hb,n7e,XL,Jo,ok,BAe,LTt,MTt,UL,DTt,OTt,WL,fj,RTt,e0,i7e,Vm,a7e,ITt,NTt,c7e,sj,PTt,FTt,u7e,BTt,dj,zTt,$Tt,VTt,UTt,HTt,qTt,Eu,WTt,JL,pj=$(()=>{b();Bp();Qf();Qn();Sr();aj=function(){var t=x(function(F,B,V,z){for(V=V||{},z=F.length;z--;V[F[z]]=B);return V},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,32],d=[1,20],p=[1,21],g=[1,22],m=[1,23],v=[1,24],y=[1,26],w=[1,27],k=[1,28],E=[1,29],T=[1,30],S=[1,31],L=[1,34],_=[1,35],M=[1,36],I=[1,37],O=[1,33],C=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],R=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],D=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],P={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:x(function(B,V,z,H,K,X,ne){var j=X.length-1;switch(K){case 3:return H.setRootDoc(X[j]),X[j];break;case 4:this.$=[];break;case 5:X[j]!="nl"&&(X[j-1].push(X[j]),this.$=X[j-1]);break;case 6:case 7:this.$=X[j];break;case 8:this.$="nl";break;case 12:this.$=X[j];break;case 13:let Z=X[j-1];Z.description=H.trimColon(X[j]),this.$=Z;break;case 14:this.$={stmt:"relation",state1:X[j-2],state2:X[j]};break;case 15:let te=H.trimColon(X[j]);this.$={stmt:"relation",state1:X[j-3],state2:X[j-1],description:te};break;case 19:this.$={stmt:"state",id:X[j-3],type:"default",description:"",doc:X[j-1]};break;case 20:var ee=X[j],Q=X[j-2].trim();if(X[j].match(":")){var G=X[j].split(":");ee=G[0],Q=[Q,G[1]]}this.$={stmt:"state",id:ee,type:"default",description:Q};break;case 21:this.$={stmt:"state",id:X[j-3],type:"default",description:X[j-5],doc:X[j-1]};break;case 22:this.$={stmt:"state",id:X[j],type:"fork"};break;case 23:this.$={stmt:"state",id:X[j],type:"join"};break;case 24:this.$={stmt:"state",id:X[j],type:"choice"};break;case 25:this.$={stmt:"state",id:H.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:X[j-1].trim(),note:{position:X[j-2].trim(),text:X[j].trim()}};break;case 29:this.$=X[j].trim(),H.setAccTitle(this.$);break;case 30:case 31:this.$=X[j].trim(),H.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:X[j-1].trim(),classes:X[j].trim()};break;case 34:this.$={stmt:"style",id:X[j-1].trim(),styleClass:X[j].trim()};break;case 35:this.$={stmt:"applyClass",id:X[j-1].trim(),styleClass:X[j].trim()};break;case 36:H.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:H.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:H.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:H.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:X[j].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:X[j-2].trim(),classes:[X[j].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:X[j-2].trim(),classes:[X[j].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:v,32:25,33:y,35:w,37:k,38:E,42:T,45:S,48:L,49:_,50:M,51:I,54:O},t(C,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:v,32:25,33:y,35:w,37:k,38:E,42:T,45:S,48:L,49:_,50:M,51:I,54:O},t(C,[2,7]),t(C,[2,8]),t(C,[2,9]),t(C,[2,10]),t(C,[2,11]),t(C,[2,12],{14:[1,39],15:[1,40]}),t(C,[2,16]),{18:[1,41]},t(C,[2,18],{20:[1,42]}),{23:[1,43]},t(C,[2,22]),t(C,[2,23]),t(C,[2,24]),t(C,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(C,[2,28]),{34:[1,48]},{36:[1,49]},t(C,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(R,[2,42],{55:[1,54]}),t(R,[2,43],{55:[1,55]}),t(C,[2,36]),t(C,[2,37]),t(C,[2,38]),t(C,[2,39]),t(C,[2,6]),t(C,[2,13]),{13:56,24:f,54:O},t(C,[2,17]),t(D,i,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(C,[2,29]),t(C,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(C,[2,14],{14:[1,67]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,68],22:h,24:f,25:d,26:p,27:g,28:m,29:v,32:25,33:y,35:w,37:k,38:E,42:T,45:S,48:L,49:_,50:M,51:I,54:O},t(C,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t(C,[2,35]),t(R,[2,44]),t(R,[2,45]),t(C,[2,15]),t(C,[2,19]),t(D,i,{7:72}),t(C,[2,26]),t(C,[2,27]),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,73],22:h,24:f,25:d,26:p,27:g,28:m,29:v,32:25,33:y,35:w,37:k,38:E,42:T,45:S,48:L,49:_,50:M,51:I,54:O},t(C,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:x(function(B,V){if(V.recoverable)this.trace(B);else{var z=new Error(B);throw z.hash=V,z}},"parseError"),parse:x(function(B){var V=this,z=[0],H=[],K=[null],X=[],ne=this.table,j="",ee=0,Q=0,G=0,Z=2,te=1,oe=X.slice.call(arguments,1),de=Object.create(this.lexer),pe={yy:{}};for(var re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,re)&&(pe.yy[re]=this.yy[re]);de.setInput(B,pe.yy),pe.yy.lexer=de,pe.yy.parser=this,typeof de.yylloc>"u"&&(de.yylloc={});var Be=de.yylloc;X.push(Be);var le=de.options&&de.options.ranges;typeof pe.yy.parseError=="function"?this.parseError=pe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(Le){z.length=z.length-2*Le,K.length=K.length-Le,X.length=X.length-Le}x(Se,"popStack");function Ye(){var Le;return Le=H.pop()||de.lex()||te,typeof Le!="number"&&(Le instanceof Array&&(H=Le,Le=H.pop()),Le=V.symbols_[Le]||Le),Le}x(Ye,"lex");for(var We,Ze,Qe,et,ze,He,Ee={},Y,ve,ce,me;;){if(Qe=z[z.length-1],this.defaultActions[Qe]?et=this.defaultActions[Qe]:((We===null||typeof We>"u")&&(We=Ye()),et=ne[Qe]&&ne[Qe][We]),typeof et>"u"||!et.length||!et[0]){var q="";me=[];for(Y in ne[Qe])this.terminals_[Y]&&Y>Z&&me.push("'"+this.terminals_[Y]+"'");de.showPosition?q="Parse error on line "+(ee+1)+`: `+de.showPosition()+` Expecting `+me.join(", ")+", got '"+(this.terminals_[We]||We)+"'":q="Parse error on line "+(ee+1)+": Unexpected "+(We==te?"end of input":"'"+(this.terminals_[We]||We)+"'"),this.parseError(q,{text:de.match,token:this.terminals_[We]||We,line:de.yylineno,loc:Be,expected:me})}if(et[0]instanceof Array&&et.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Qe+", token: "+We);switch(et[0]){case 1:z.push(We),K.push(de.yytext),X.push(de.yylloc),z.push(et[1]),We=null,Ze?(We=Ze,Ze=null):(Q=de.yyleng,j=de.yytext,ee=de.yylineno,Be=de.yylloc,G>0&&G--);break;case 2:if(ve=this.productions_[et[1]][1],Ee.$=K[K.length-ve],Ee._$={first_line:X[X.length-(ve||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(ve||1)].first_column,last_column:X[X.length-1].last_column},le&&(Ee._$.range=[X[X.length-(ve||1)].range[0],X[X.length-1].range[1]]),He=this.performAction.apply(Ee,[j,Q,ee,pe.yy,et[1],K,X].concat(oe)),typeof He<"u")return He;ve&&(z=z.slice(0,-1*ve*2),K=K.slice(0,-1*ve),X=X.slice(0,-1*ve)),z.push(this.productions_[et[1]][0]),K.push(Ee.$),X.push(Ee._$),ce=ne[z[z.length-2]][z[z.length-1]],z.push(ce);break;case 3:return!0}}return!0},"parse")},A=function(){var F={EOF:1,parseError:x(function(V,z){if(this.yy.parser)this.yy.parser.parseError(V,z);else throw new Error(V)},"parseError"),setInput:x(function(B,V){return this.yy=V||this.yy||{},this._input=B,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var B=this._input[0];this.yytext+=B,this.yyleng++,this.offset++,this.match+=B,this.matched+=B;var V=B.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),B},"input"),unput:x(function(B){var V=B.length,z=B.split(/(?:\r\n?|\n)/g);this._input=B+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var H=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var K=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===H.length?this.yylloc.first_column:0)+H[H.length-z.length].length-z[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[K[0],K[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(B){this.unput(this.match.slice(B))},"less"),pastInput:x(function(){var B=this.matched.substr(0,this.matched.length-this.match.length);return(B.length>20?"...":"")+B.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var B=this.match;return B.length<20&&(B+=this._input.substr(0,20-B.length)),(B.substr(0,20)+(B.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var B=this.pastInput(),V=new Array(B.length+1).join("-");return B+this.upcomingInput()+` `+V+"^"},"showPosition"),test_match:x(function(B,V){var z,H,K;if(this.options.backtrack_lexer&&(K={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(K.yylloc.range=this.yylloc.range.slice(0))),H=B[0].match(/(?:\r\n?|\n).*/g),H&&(this.yylineno+=H.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:H?H[H.length-1].length-H[H.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+B[0].length},this.yytext+=B[0],this.match+=B[0],this.matches=B,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(B[0].length),this.matched+=B[0],z=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var X in K)this[X]=K[X];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,V,z,H;this._more||(this.yytext="",this.match="");for(var K=this._currentRules(),X=0;XV[0].length)){if(V=z,H=X,this.options.backtrack_lexer){if(B=this.test_match(z,K[X]),B!==!1)return B;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(B=this.test_match(V,K[H]),B!==!1?B:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var V=this.next();return V||this.lex()},"lex"),begin:x(function(V){this.conditionStack.push(V)},"begin"),popState:x(function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},"topState"),pushState:x(function(V){this.begin(V)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(V,z,H,K){var X=K;switch(H){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;break;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;break;case 16:return this.popState(),"acc_title_value";break;case 17:return this.begin("acc_descr"),35;break;case 18:return this.popState(),"acc_descr_value";break;case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;break;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 24:return this.popState(),this.pushState("CLASSDEFID"),39;break;case 25:return this.popState(),40;break;case 26:return this.pushState("CLASS"),45;break;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;break;case 28:return this.popState(),47;break;case 29:return this.pushState("STYLE"),42;break;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;break;case 31:return this.popState(),44;break;case 32:return this.pushState("SCALE"),17;break;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 37:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 38:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 39:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";break;case 48:return this.popState(),"ID";break;case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;break;case 54:break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),56;break;case 59:return this.popState(),this.pushState("NOTE_ID"),57;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";break;case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),z.yytext=z.yytext.substr(2).trim(),31;break;case 67:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return z.yytext=z.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return F}();P.lexer=A;function N(){this.yy={}}return x(N,"Parser"),N.prototype=P,P.Parser=N,new N}();aj.parser=aj;QL=aj,nTt="LR",zAe="TB",GL="state",oj="relation",iTt="classDef",aTt="style",sTt="applyClass",lk="default",$Ae="divider",VAe="fill:none",UAe="fill: #333",HAe="c",qAe="text",WAe="normal",nj="rect",ij="rectWithTitle",oTt="stateStart",lTt="stateEnd",OAe="divider",RAe="roundedWithTitle",cTt="note",uTt="noteGroup",ck="statediagram",hTt="state",fTt=`${ck}-${hTt}`,GAe="transition",dTt="note",pTt="note-edge",gTt=`${GAe} ${pTt}`,mTt=`${ck}-${dTt}`,vTt="cluster",yTt=`${ck}-${vTt}`,bTt="cluster-alt",xTt=`${ck}-${bTt}`,YAe="parent",jAe="note",wTt="state",lj="----",kTt=`${lj}${jAe}`,IAe=`${lj}${YAe}`,XAe=x((t,e=zAe)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),TTt=x(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),ETt=x(async function(t,e,r,n){ie.info("REF0:"),ie.info("Drawing state diagram (v2)",e);let{securityLevel:i,state:a,layout:s}=Te();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=By(e,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await Ry(o,l);let u=8;tr.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),zy(l,u,ck,a?.useMaxWidth??!0)},"draw"),KAe={getClasses:TTt,draw:ETt,getDir:XAe},HL=new Map,Jp=0;x(qL,"stateDomId");STt=x((t,e,r,n,i,a,s,o)=>{ie.trace("items",e),e.forEach(l=>{switch(l.stmt){case GL:sk(t,l,r,n,i,a,s,o);break;case lk:sk(t,l,r,n,i,a,s,o);break;case oj:{sk(t,l.state1,r,n,i,a,s,o),sk(t,l.state2,r,n,i,a,s,o);let u={id:"edge"+Jp,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:VAe,labelStyle:"",label:ct.sanitizeText(l.description,Te()),arrowheadStyle:UAe,labelpos:HAe,labelType:qAe,thickness:WAe,classes:GAe,look:s};i.push(u),Jp++}break}})},"setupDoc"),NAe=x((t,e=zAe)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");x(ak,"insertOrUpdateNode");x(ZAe,"getClassesFromDbInfo");x(QAe,"getStylesFromDbInfo");sk=x((t,e,r,n,i,a,s,o)=>{let l=e.id,u=r.get(l),h=ZAe(u),f=QAe(u);if(ie.info("dataFetcher parsedItem",e,u,f),l!=="root"){let d=nj;e.start===!0?d=oTt:e.start===!1&&(d=lTt),e.type!==lk&&(d=e.type),HL.get(l)||HL.set(l,{id:l,shape:d,description:ct.sanitizeText(l,Te()),cssClasses:`${h} ${fTt}`,cssStyles:f});let p=HL.get(l);e.description&&(Array.isArray(p.description)?(p.shape=ij,p.description.push(e.description)):p.description?.length>0?(p.shape=ij,p.description===l?p.description=[e.description]:p.description=[p.description,e.description]):(p.shape=nj,p.description=e.description),p.description=ct.sanitizeTextOrArray(p.description,Te())),p.description?.length===1&&p.shape===ij&&(p.type==="group"?p.shape=RAe:p.shape=nj),!p.type&&e.doc&&(ie.info("Setting cluster for XCX",l,NAe(e)),p.type="group",p.isGroup=!0,p.dir=NAe(e),p.shape=e.type===$Ae?OAe:RAe,p.cssClasses=`${p.cssClasses} ${yTt} ${a?xTt:""}`);let g={labelStyle:"",shape:p.shape,label:p.description,cssClasses:p.cssClasses,cssCompiledStyles:[],cssStyles:p.cssStyles,id:l,dir:p.dir,domId:qL(l,Jp),type:p.type,isGroup:p.type==="group",padding:8,rx:10,ry:10,look:s};if(g.shape===OAe&&(g.label=""),t&&t.id!=="root"&&(ie.trace("Setting node ",l," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){let m={labelStyle:"",shape:cTt,label:e.note.text,cssClasses:mTt,cssStyles:[],cssCompilesStyles:[],id:l+kTt+"-"+Jp,domId:qL(l,Jp,jAe),type:p.type,isGroup:p.type==="group",padding:Te().flowchart.padding,look:s,position:e.note.position},v=l+IAe,y={labelStyle:"",shape:uTt,label:e.note.text,cssClasses:p.cssClasses,cssStyles:[],id:l+IAe,domId:qL(l,Jp,YAe),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};Jp++,y.id=v,m.parentId=v,ak(n,y,o),ak(n,m,o),ak(n,g,o);let w=l,k=m.id;e.note.position==="left of"&&(w=m.id,k=l),i.push({id:w+"-"+k,start:w,end:k,arrowhead:"none",arrowTypeEnd:"",style:VAe,labelStyle:"",classes:gTt,arrowheadStyle:UAe,labelpos:HAe,labelType:qAe,thickness:WAe,look:s})}else ak(n,g,o)}e.doc&&(ie.trace("Adding nodes children "),STt(e,e.doc,r,n,i,!a,s,o))},"dataFetcher"),CTt=x(()=>{HL.clear(),Jp=0},"reset"),cj="[*]",JAe="start",e7e=cj,t7e="end",PAe="color",FAe="fill",_Tt="bgFill",ATt=",";x(uj,"newClassesList");YL=[],hj=[],r7e=nTt,jL=[],Hb=uj(),n7e=x(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),XL={root:n7e()},Jo=XL.root,ok=0,BAe=0,LTt={LINE:0,DOTTED_LINE:1},MTt={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},UL=x(t=>JSON.parse(JSON.stringify(t)),"clone"),DTt=x(t=>{ie.info("Setting root doc",t),jL=t},"setRootDoc"),OTt=x(()=>jL,"getRootDoc"),WL=x((t,e,r)=>{if(e.stmt===oj)WL(t,e.state1,!0),WL(t,e.state2,!1);else if(e.stmt===GL&&(e.id==="[*]"?(e.id=r?t.id+"_start":t.id+"_end",e.start=r):e.id=e.id.trim()),e.doc){let n=[],i=[],a;for(a=0;a0&&i.length>0){let s={stmt:GL,id:I$(),type:"divider",doc:UL(i)};n.push(UL(s)),e.doc=n}e.doc.forEach(s=>WL(e,s,!0))}},"docTranslator"),fj=x(()=>(WL({id:"root"},{id:"root",doc:jL},!0),{id:"root",doc:jL}),"getRootDocV2"),RTt=x(t=>{let e;t.doc?e=t.doc:e=t,ie.info(e),i7e(!0),ie.info("Extract initial document:",e),e.forEach(a=>{switch(ie.warn("Statement",a.stmt),a.stmt){case GL:e0(a.id.trim(),a.type,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles);break;case oj:c7e(a.state1,a.state2,a.description);break;case iTt:u7e(a.id.trim(),a.classes);break;case aTt:{let s=a.id.trim().split(","),o=a.styleClass.split(",");s.forEach(l=>{let u=Vm(l);if(u===void 0){let h=l.trim();e0(h),u=Vm(h)}u.styles=o.map(h=>h.replace(/;/g,"")?.trim())})}break;case sTt:dj(a.id.trim(),a.styleClass);break}});let r=a7e(),i=Te().look;CTt(),sk(void 0,fj(),r,YL,hj,!0,i,Hb),YL.forEach(a=>{if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+a.id+"]");a.label=a.label[0]}})},"extract"),e0=x(function(t,e=lk,r=null,n=null,i=null,a=null,s=null,o=null){let l=t?.trim();if(Jo.states.has(l)?(Jo.states.get(l).doc||(Jo.states.get(l).doc=r),Jo.states.get(l).type||(Jo.states.get(l).type=e)):(ie.info("Adding state ",l,n),Jo.states.set(l,{id:l,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]})),n&&(ie.info("Setting state description",l,n),typeof n=="string"&&sj(l,n.trim()),typeof n=="object"&&n.forEach(u=>sj(l,u.trim()))),i){let u=Jo.states.get(l);u.note=i,u.note.text=ct.sanitizeText(u.note.text,Te())}a&&(ie.info("Setting state classes",l,a),(typeof a=="string"?[a]:a).forEach(h=>dj(l,h.trim()))),s&&(ie.info("Setting state styles",l,s),(typeof s=="string"?[s]:s).forEach(h=>zTt(l,h.trim()))),o&&(ie.info("Setting state styles",l,s),(typeof o=="string"?[o]:o).forEach(h=>$Tt(l,h.trim())))},"addState"),i7e=x(function(t){YL=[],hj=[],XL={root:n7e()},Jo=XL.root,ok=0,Hb=uj(),t||zr()},"clear"),Vm=x(function(t){return Jo.states.get(t)},"getState"),a7e=x(function(){return Jo.states},"getStates"),ITt=x(function(){ie.info("Documents = ",XL)},"logDocuments"),NTt=x(function(){return Jo.relations},"getRelations");x(KL,"startIdIfNeeded");x(ZL,"startTypeIfNeeded");x(s7e,"endIdIfNeeded");x(o7e,"endTypeIfNeeded");x(l7e,"addRelationObjs");c7e=x(function(t,e,r){if(typeof t=="object")l7e(t,e,r);else{let n=KL(t.trim()),i=ZL(t),a=s7e(e.trim()),s=o7e(e);e0(n,i),e0(a,s),Jo.relations.push({id1:n,id2:a,title:ct.sanitizeText(r,Te())})}},"addRelation"),sj=x(function(t,e){let r=Jo.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(ct.sanitizeText(n,Te()))},"addDescription"),PTt=x(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),FTt=x(()=>(BAe++,"divider-id-"+BAe),"getDividerId"),u7e=x(function(t,e=""){Hb.has(t)||Hb.set(t,{id:t,styles:[],textStyles:[]});let r=Hb.get(t);e?.split(ATt).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(PAe).exec(n)){let s=i.replace(FAe,_Tt).replace(PAe,FAe);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),BTt=x(function(){return Hb},"getClasses"),dj=x(function(t,e){t.split(",").forEach(function(r){let n=Vm(r);if(n===void 0){let i=r.trim();e0(i),n=Vm(i)}n.classes.push(e)})},"setCssClass"),zTt=x(function(t,e){let r=Vm(t);r!==void 0&&r.styles.push(e)},"setStyle"),$Tt=x(function(t,e){let r=Vm(t);r!==void 0&&r.textStyles.push(e)},"setTextStyle"),VTt=x(()=>r7e,"getDirection"),UTt=x(t=>{r7e=t},"setDirection"),HTt=x(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),qTt=x(()=>{let t=Te();return{nodes:YL,edges:hj,other:{},config:t,direction:XAe(fj())}},"getData"),Eu={getConfig:x(()=>Te().state,"getConfig"),getData:qTt,addState:e0,clear:i7e,getState:Vm,getStates:a7e,getRelations:NTt,getClasses:BTt,getDirection:VTt,addRelation:c7e,getDividerId:FTt,setDirection:UTt,cleanupLabel:PTt,lineType:LTt,relationType:MTt,logDocuments:ITt,getRootDoc:OTt,setRootDoc:DTt,getRootDocV2:fj,extract:RTt,trimColon:HTt,getAccTitle:Xr,setAccTitle:Wr,getAccDescription:Zr,setAccDescription:Kr,addStyleClass:u7e,setCssClass:dj,addDescription:sj,setDiagramTitle:Cn,getDiagramTitle:vn},WTt=x(t=>` defs #statediagram-barbEnd { fill: ${t.transitionColor}; stroke: ${t.transitionColor}; } g.stateGroup text { fill: ${t.nodeBorder}; stroke: none; font-size: 10px; } g.stateGroup text { fill: ${t.textColor}; stroke: none; font-size: 10px; } g.stateGroup .state-title { font-weight: bolder; fill: ${t.stateLabelColor}; } g.stateGroup rect { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; } g.stateGroup line { stroke: ${t.lineColor}; stroke-width: 1; } .transition { stroke: ${t.transitionColor}; stroke-width: 1; fill: none; } .stateGroup .composit { fill: ${t.background}; border-bottom: 1px } .stateGroup .alt-composit { fill: #e0e0e0; border-bottom: 1px } .state-note { stroke: ${t.noteBorderColor}; fill: ${t.noteBkgColor}; text { fill: ${t.noteTextColor}; stroke: none; font-size: 10px; } } .stateLabel .box { stroke: none; stroke-width: 0; fill: ${t.mainBkg}; opacity: 0.5; } .edgeLabel .label rect { fill: ${t.labelBackgroundColor}; opacity: 0.5; } .edgeLabel { background-color: ${t.edgeLabelBackground}; p { background-color: ${t.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } .edgeLabel .label text { fill: ${t.transitionLabelColor||t.tertiaryTextColor}; } .label div .edgeLabel { color: ${t.transitionLabelColor||t.tertiaryTextColor}; } .stateLabel text { fill: ${t.stateLabelColor}; font-size: 10px; font-weight: bold; } .node circle.state-start { fill: ${t.specialStateColor}; stroke: ${t.specialStateColor}; } .node .fork-join { fill: ${t.specialStateColor}; stroke: ${t.specialStateColor}; } .node circle.state-end { fill: ${t.innerEndBackground}; stroke: ${t.background}; stroke-width: 1.5 } .end-state-inner { fill: ${t.compositeBackground||t.background}; // stroke: ${t.background}; stroke-width: 1.5 } .node rect { fill: ${t.stateBkg||t.mainBkg}; stroke: ${t.stateBorder||t.nodeBorder}; stroke-width: 1px; } .node polygon { fill: ${t.mainBkg}; stroke: ${t.stateBorder||t.nodeBorder};; stroke-width: 1px; } #statediagram-barbEnd { fill: ${t.lineColor}; } .statediagram-cluster rect { fill: ${t.compositeTitleBackground}; stroke: ${t.stateBorder||t.nodeBorder}; stroke-width: 1px; } .cluster-label, .nodeLabel { color: ${t.stateLabelColor}; // line-height: 1; } .statediagram-cluster rect.outer { rx: 5px; ry: 5px; } .statediagram-state .divider { stroke: ${t.stateBorder||t.nodeBorder}; } .statediagram-state .title-state { rx: 5px; ry: 5px; } .statediagram-cluster.statediagram-cluster .inner { fill: ${t.compositeBackground||t.background}; } .statediagram-cluster.statediagram-cluster-alt .inner { fill: ${t.altBackground?t.altBackground:"#efefef"}; } .statediagram-cluster .inner { rx:0; ry:0; } .statediagram-state rect.basic { rx: 5px; ry: 5px; } .statediagram-state rect.divider { stroke-dasharray: 10,10; fill: ${t.altBackground?t.altBackground:"#efefef"}; } .note-edge { stroke-dasharray: 5; } .statediagram-note rect { fill: ${t.noteBkgColor}; stroke: ${t.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note rect { fill: ${t.noteBkgColor}; stroke: ${t.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note text { fill: ${t.noteTextColor}; } .statediagram-note .nodeLabel { color: ${t.noteTextColor}; } .statediagram .edgeLabel { color: red; // ${t.noteTextColor}; } #dependencyStart, #dependencyEnd { fill: ${t.lineColor}; stroke: ${t.lineColor}; stroke-width: 1; } .statediagramTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } `,"getStyles"),JL=WTt});var g7e={};Wt(g7e,{diagram:()=>hEt});var mj,GTt,YTt,d7e,jTt,XTt,KTt,ZTt,QTt,JTt,eEt,tEt,rEt,nEt,iEt,h7e,f7e,aEt,Dl,gj,sEt,oEt,lEt,cEt,p7e,uEt,hEt,m7e=$(()=>{b();pj();Bp();Qf();Xf();lu();Kc();gh();Kl();ro();Qn();Sr();Cr();h3();qo();Cr();mj={},GTt=x((t,e)=>{mj[t]=e},"set"),YTt=x(t=>mj[t],"get"),d7e=x(()=>Object.keys(mj),"keys"),jTt=x(()=>d7e().length,"size"),XTt={get:YTt,set:GTt,keys:d7e,size:jTt},KTt=x(t=>t.append("circle").attr("class","start-state").attr("r",Te().state.sizeUnit).attr("cx",Te().state.padding+Te().state.sizeUnit).attr("cy",Te().state.padding+Te().state.sizeUnit),"drawStartState"),ZTt=x(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Te().state.textHeight).attr("class","divider").attr("x2",Te().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),QTt=x((t,e)=>{let r=t.append("text").attr("x",2*Te().state.padding).attr("y",Te().state.textHeight+2*Te().state.padding).attr("font-size",Te().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",Te().state.padding).attr("y",Te().state.padding).attr("width",n.width+2*Te().state.padding).attr("height",n.height+2*Te().state.padding).attr("rx",Te().state.radius),r},"drawSimpleState"),JTt=x((t,e)=>{let r=x(function(d,p,g){let m=d.append("tspan").attr("x",2*Te().state.padding).text(p);g||m.attr("dy",Te().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*Te().state.padding).attr("y",Te().state.textHeight+1.3*Te().state.padding).attr("font-size",Te().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,s=t.append("text").attr("x",Te().state.padding).attr("y",a+Te().state.padding*.4+Te().state.dividerMargin+Te().state.textHeight).attr("class","state-description"),o=!0,l=!0;e.descriptions.forEach(function(d){o||(r(s,d,l),l=!1),o=!1});let u=t.append("line").attr("x1",Te().state.padding).attr("y1",Te().state.padding+a+Te().state.dividerMargin/2).attr("y2",Te().state.padding+a+Te().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),f=Math.max(h.width,i.width);return u.attr("x2",f+3*Te().state.padding),t.insert("rect",":first-child").attr("x",Te().state.padding).attr("y",Te().state.padding).attr("width",f+2*Te().state.padding).attr("height",h.height+a+2*Te().state.padding).attr("rx",Te().state.radius),t},"drawDescrState"),eEt=x((t,e,r)=>{let n=Te().state.padding,i=2*Te().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",Te().state.titleShift).attr("font-size",Te().state.fontSize).attr("class","state-title").text(e.id),h=l.node().getBBox().width+i,f=Math.max(h,s);f===s&&(f=f+i);let d,p=t.node().getBBox();e.doc,d=o-n,h>s&&(d=(s-f)/2+n),Math.abs(o-p.x)s&&(d=o-(h-s)/2);let g=1-Te().state.textHeight;return t.insert("rect",":first-child").attr("x",d).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+Te().state.textHeight+Te().state.titleShift+1).attr("rx","0"),l.attr("x",d+n),h<=s&&l.attr("x",o+(f-i)/2-h/2+n),t.insert("rect",":first-child").attr("x",d).attr("y",Te().state.titleShift-Te().state.textHeight-Te().state.padding).attr("width",f).attr("height",Te().state.textHeight*3).attr("rx",Te().state.radius),t.insert("rect",":first-child").attr("x",d).attr("y",Te().state.titleShift-Te().state.textHeight-Te().state.padding).attr("width",f).attr("height",p.height+3+2*Te().state.textHeight).attr("rx",Te().state.radius),t},"addTitleAndBox"),tEt=x(t=>(t.append("circle").attr("class","end-state-outer").attr("r",Te().state.sizeUnit+Te().state.miniPadding).attr("cx",Te().state.padding+Te().state.sizeUnit+Te().state.miniPadding).attr("cy",Te().state.padding+Te().state.sizeUnit+Te().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Te().state.sizeUnit).attr("cx",Te().state.padding+Te().state.sizeUnit+2).attr("cy",Te().state.padding+Te().state.sizeUnit+2)),"drawEndState"),rEt=x((t,e)=>{let r=Te().state.forkWidth,n=Te().state.forkHeight;if(e.parentId){let i=r;r=n,n=i}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",Te().state.padding).attr("y",Te().state.padding)},"drawForkJoinState"),nEt=x((t,e,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");let o=s.split(ct.lineBreakRegex),l=1.25*Te().state.noteMargin;for(let u of o){let h=u.trim();if(h.length>0){let f=a.append("tspan");if(f.text(h),l===0){let d=f.node().getBBox();l+=d.height}i+=l,f.attr("x",e+Te().state.noteMargin),f.attr("y",r+i+1.25*Te().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),iEt=x((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",Te().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=nEt(t,0,0,n);return r.attr("height",a+2*Te().state.noteMargin),r.attr("width",i+Te().state.noteMargin*2),r},"drawNote"),h7e=x(function(t,e){let r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&KTt(i),e.type==="end"&&tEt(i),(e.type==="fork"||e.type==="join")&&rEt(i,e),e.type==="note"&&iEt(e.note.text,i),e.type==="divider"&&ZTt(i),e.type==="default"&&e.descriptions.length===0&&QTt(i,e),e.type==="default"&&e.descriptions.length>0&&JTt(i,e);let a=i.node().getBBox();return n.width=a.width+2*Te().state.padding,n.height=a.height+2*Te().state.padding,XTt.set(r,n),n},"drawState"),f7e=0,aEt=x(function(t,e,r){let n=x(function(l){switch(l){case Eu.relationType.AGGREGATION:return"aggregation";case Eu.relationType.EXTENSION:return"extension";case Eu.relationType.COMPOSITION:return"composition";case Eu.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(l=>!Number.isNaN(l.y));let i=e.points,a=Ro().x(function(l){return l.x}).y(function(l){return l.y}).curve(au),s=t.append("path").attr("d",a(i)).attr("id","edge"+f7e).attr("class","transition"),o="";if(Te().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),s.attr("marker-end","url("+o+"#"+n(Eu.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let l=t.append("g").attr("class","stateLabel"),{x:u,y:h}=tr.calcLabelPosition(e.points),f=ct.getRows(r.title),d=0,p=[],g=0,m=0;for(let w=0;w<=f.length;w++){let k=l.append("text").attr("text-anchor","middle").text(f[w]).attr("x",u).attr("y",h+d),E=k.node().getBBox();g=Math.max(g,E.width),m=Math.min(m,E.x),ie.info(E.x,u,h+d),d===0&&(d=k.node().getBBox().height,ie.info("Title height",d,h)),p.push(k)}let v=d*f.length;if(f.length>1){let w=(f.length-1)*d*.5;p.forEach((k,E)=>k.attr("y",h+E*d-w)),v=d*f.length}let y=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-g/2-Te().state.padding/2).attr("y",h-v/2-Te().state.padding/2-3.5).attr("width",g+Te().state.padding).attr("height",v+Te().state.padding),ie.info(y)}f7e++},"drawEdge"),gj={},sEt=x(function(){},"setConf"),oEt=x(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),lEt=x(function(t,e,r,n){Dl=Te().state;let i=Te().securityLevel,a;i==="sandbox"&&(a=Je("#i"+e));let s=i==="sandbox"?Je(a.nodes()[0].contentDocument.body):Je("body"),o=i==="sandbox"?a.nodes()[0].contentDocument:document;ie.debug("Rendering diagram "+t);let l=s.select(`[id='${e}']`);oEt(l);let u=n.db.getRootDoc();p7e(u,l,void 0,!1,s,o,n);let h=Dl.padding,f=l.node().getBBox(),d=f.width+h*2,p=f.height+h*2,g=d*1.75;mn(l,p,g,Dl.useMaxWidth),l.attr("viewBox",`${f.x-Dl.padding} ${f.y-Dl.padding} `+d+" "+p)},"draw"),cEt=x(t=>t?t.length*Dl.fontSizeFactor:1,"getLabelWidth"),p7e=x((t,e,r,n,i,a,s)=>{let o=new Yr({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l{let T=E.parentElement,S=0,L=0;T&&(T.parentElement&&(S=T.parentElement.getBBox().width),L=parseInt(T.getAttribute("data-x-shift"),10),Number.isNaN(L)&&(L=0)),E.setAttribute("x1",0-L+8),E.setAttribute("x2",S-L-8)})):ie.debug("No Node "+w+": "+JSON.stringify(o.node(w)))});let v=m.getBBox();o.edges().forEach(function(w){w!==void 0&&o.edge(w)!==void 0&&(ie.debug("Edge "+w.v+" -> "+w.w+": "+JSON.stringify(o.edge(w))),aEt(e,o.edge(w),o.edge(w).relation))}),v=m.getBBox();let y={id:r||"root",label:r||"root",width:0,height:0};return y.width=v.width+2*Dl.padding,y.height=v.height+2*Dl.padding,ie.debug("Doc rendered",y,o),y},"renderDoc"),uEt={setConf:sEt,draw:lEt},hEt={parser:QL,db:Eu,renderer:uEt,styles:JL,init:x(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Eu.clear()},"init")}});var v7e={};Wt(v7e,{diagram:()=>fEt});var fEt,y7e=$(()=>{b();pj();Bp();Qf();Xf();lu();Kc();gh();Kl();ro();Qn();Sr();fEt={parser:QL,db:Eu,renderer:KAe,styles:JL,init:x(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Eu.clear()},"init")}});var A7e={};Wt(A7e,{diagram:()=>REt});function _7e(t){let e=Te().journey,r=60;Object.keys(vd).forEach(n=>{let i=vd[n].color,a={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:vd[n].position};fk.drawCircle(t,a);let s={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};fk.drawText(t,s),r+=20})}var yj,dEt,qb,bj,uk,hk,pEt,gEt,mEt,vEt,yEt,bEt,xEt,b7e,wEt,x7e,kEt,TEt,xj,EEt,E7e,S7e,SEt,CEt,w7e,_Et,AEt,C7e,LEt,fk,MEt,vd,eM,Um,DEt,Sc,vj,k7e,OEt,T7e,REt,L7e=$(()=>{b();y7();Sr();Cr();Cr();yj=function(){var t=x(function(f,d,p,g){for(p=p||{},g=f.length;g--;p[f[g]]=d);return p},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,14],l={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:x(function(d,p,g,m,v,y,w){var k=y.length-1;switch(v){case 1:return y[k-1];case 2:this.$=[];break;case 3:y[k-1].push(y[k]),this.$=y[k-1];break;case 4:case 5:this.$=y[k];break;case 6:case 7:this.$=[];break;case 8:m.setDiagramTitle(y[k].substr(6)),this.$=y[k].substr(6);break;case 9:this.$=y[k].trim(),m.setAccTitle(this.$);break;case 10:case 11:this.$=y[k].trim(),m.setAccDescription(this.$);break;case 12:m.addSection(y[k].substr(8)),this.$=y[k].substr(8);break;case 13:m.addTask(y[k-1],y[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:s,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:x(function(d,p){if(p.recoverable)this.trace(d);else{var g=new Error(d);throw g.hash=p,g}},"parseError"),parse:x(function(d){var p=this,g=[0],m=[],v=[null],y=[],w=this.table,k="",E=0,T=0,S=0,L=2,_=1,M=y.slice.call(arguments,1),I=Object.create(this.lexer),O={yy:{}};for(var C in this.yy)Object.prototype.hasOwnProperty.call(this.yy,C)&&(O.yy[C]=this.yy[C]);I.setInput(d,O.yy),O.yy.lexer=I,O.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var R=I.yylloc;y.push(R);var D=I.options&&I.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function P(G){g.length=g.length-2*G,v.length=v.length-G,y.length=y.length-G}x(P,"popStack");function A(){var G;return G=m.pop()||I.lex()||_,typeof G!="number"&&(G instanceof Array&&(m=G,G=m.pop()),G=p.symbols_[G]||G),G}x(A,"lex");for(var N,F,B,V,z,H,K={},X,ne,j,ee;;){if(B=g[g.length-1],this.defaultActions[B]?V=this.defaultActions[B]:((N===null||typeof N>"u")&&(N=A()),V=w[B]&&w[B][N]),typeof V>"u"||!V.length||!V[0]){var Q="";ee=[];for(X in w[B])this.terminals_[X]&&X>L&&ee.push("'"+this.terminals_[X]+"'");I.showPosition?Q="Parse error on line "+(E+1)+`: `+I.showPosition()+` Expecting `+ee.join(", ")+", got '"+(this.terminals_[N]||N)+"'":Q="Parse error on line "+(E+1)+": Unexpected "+(N==_?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Q,{text:I.match,token:this.terminals_[N]||N,line:I.yylineno,loc:R,expected:ee})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+N);switch(V[0]){case 1:g.push(N),v.push(I.yytext),y.push(I.yylloc),g.push(V[1]),N=null,F?(N=F,F=null):(T=I.yyleng,k=I.yytext,E=I.yylineno,R=I.yylloc,S>0&&S--);break;case 2:if(ne=this.productions_[V[1]][1],K.$=v[v.length-ne],K._$={first_line:y[y.length-(ne||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(ne||1)].first_column,last_column:y[y.length-1].last_column},D&&(K._$.range=[y[y.length-(ne||1)].range[0],y[y.length-1].range[1]]),H=this.performAction.apply(K,[k,T,E,O.yy,V[1],v,y].concat(M)),typeof H<"u")return H;ne&&(g=g.slice(0,-1*ne*2),v=v.slice(0,-1*ne),y=y.slice(0,-1*ne)),g.push(this.productions_[V[1]][0]),v.push(K.$),y.push(K._$),j=w[g[g.length-2]][g[g.length-1]],g.push(j);break;case 3:return!0}}return!0},"parse")},u=function(){var f={EOF:1,parseError:x(function(p,g){if(this.yy.parser)this.yy.parser.parseError(p,g);else throw new Error(p)},"parseError"),setInput:x(function(d,p){return this.yy=p||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var p=d.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:x(function(d){var p=d.length,g=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===m.length?this.yylloc.first_column:0)+m[m.length-g.length].length-g[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(d){this.unput(this.match.slice(d))},"less"),pastInput:x(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var d=this.pastInput(),p=new Array(d.length+1).join("-");return d+this.upcomingInput()+` `+p+"^"},"showPosition"),test_match:x(function(d,p){var g,m,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),m=d[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],g=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var y in v)this[y]=v[y];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,p,g,m;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),y=0;yp[0].length)){if(p=g,m=y,this.options.backtrack_lexer){if(d=this.test_match(g,v[y]),d!==!1)return d;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(d=this.test_match(p,v[m]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var p=this.next();return p||this.lex()},"lex"),begin:x(function(p){this.conditionStack.push(p)},"begin"),popState:x(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:x(function(p){this.begin(p)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(p,g,m,v){var y=v;switch(m){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return f}();l.lexer=u;function h(){this.yy={}}return x(h,"Parser"),h.prototype=l,l.Parser=h,new h}();yj.parser=yj;dEt=yj,qb="",bj=[],uk=[],hk=[],pEt=x(function(){bj.length=0,uk.length=0,qb="",hk.length=0,zr()},"clear"),gEt=x(function(t){qb=t,bj.push(t)},"addSection"),mEt=x(function(){return bj},"getSections"),vEt=x(function(){let t=b7e(),e=100,r=0;for(;!t&&r{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},"updateActors"),bEt=x(function(t,e){let r=e.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let a=i.map(o=>o.trim()),s={section:qb,type:qb,people:a,task:t,score:n};hk.push(s)},"addTask"),xEt=x(function(t){let e={section:qb,type:qb,description:t,task:t,classes:[]};uk.push(e)},"addTaskOrg"),b7e=x(function(){let t=x(function(r){return hk[r].processed},"compileTask"),e=!0;for(let[r,n]of hk.entries())t(r),e=e&&n.processed;return e},"compileTasks"),wEt=x(function(){return yEt()},"getActors"),x7e={getConfig:x(()=>Te().journey,"getConfig"),clear:pEt,setDiagramTitle:Cn,getDiagramTitle:vn,setAccTitle:Wr,getAccTitle:Xr,setAccDescription:Kr,getAccDescription:Zr,addSection:gEt,getSections:mEt,getTasks:vEt,addTask:bEt,addTaskOrg:xEt,getActors:wEt},kEt=x(t=>`.label { font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); color: ${t.textColor}; } .mouth { stroke: #666; } line { stroke: ${t.textColor} } .legend { fill: ${t.textColor}; } .label text { fill: #333; } .label { color: ${t.textColor} } .face { ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; stroke: #999; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${t.arrowheadColor}; } .edgePath .path { stroke: ${t.lineColor}; stroke-width: 1.5px; } .flowchart-link { stroke: ${t.lineColor}; fill: none; } .edgeLabel { background-color: ${t.edgeLabelBackground}; rect { opacity: 0.5; } text-align: center; } .cluster rect { } .cluster text { fill: ${t.titleColor}; } div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); font-size: 12px; background: ${t.tertiaryColor}; border: 1px solid ${t.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .task-type-0, .section-type-0 { ${t.fillType0?`fill: ${t.fillType0}`:""}; } .task-type-1, .section-type-1 { ${t.fillType0?`fill: ${t.fillType1}`:""}; } .task-type-2, .section-type-2 { ${t.fillType0?`fill: ${t.fillType2}`:""}; } .task-type-3, .section-type-3 { ${t.fillType0?`fill: ${t.fillType3}`:""}; } .task-type-4, .section-type-4 { ${t.fillType0?`fill: ${t.fillType4}`:""}; } .task-type-5, .section-type-5 { ${t.fillType0?`fill: ${t.fillType5}`:""}; } .task-type-6, .section-type-6 { ${t.fillType0?`fill: ${t.fillType6}`:""}; } .task-type-7, .section-type-7 { ${t.fillType0?`fill: ${t.fillType7}`:""}; } .actor-0 { ${t.actor0?`fill: ${t.actor0}`:""}; } .actor-1 { ${t.actor1?`fill: ${t.actor1}`:""}; } .actor-2 { ${t.actor2?`fill: ${t.actor2}`:""}; } .actor-3 { ${t.actor3?`fill: ${t.actor3}`:""}; } .actor-4 { ${t.actor4?`fill: ${t.actor4}`:""}; } .actor-5 { ${t.actor5?`fill: ${t.actor5}`:""}; } `,"getStyles"),TEt=kEt,xj=x(function(t,e){return Jg(t,e)},"drawRect"),EEt=x(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=ch().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}x(a,"smile");function s(l){let u=ch().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}x(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return x(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),E7e=x(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),S7e=x(function(t,e){return F5e(t,e)},"drawText"),SEt=x(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}x(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,S7e(t,e)},"drawLabel"),CEt=x(function(t,e,r){let n=t.append("g"),i=Eh();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,xj(n,i),C7e(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),w7e=-1,_Et=x(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");w7e++;let a=300+5*30;i.append("line").attr("id","task"+w7e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),EEt(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=Eh();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,xj(i,s);let o=e.x+14;e.people.forEach(l=>{let u=e.actors[l].color,h={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};E7e(i,h),o+=10}),C7e(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),AEt=x(function(t,e){m7(t,e)},"drawBackgroundRect"),C7e=function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}x(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(//gi);for(let v=0;v{vd[y]={color:i.actorColours[d%i.actorColours.length],position:d},d++}),_7e(l),Sc.insert(0,0,Um,Object.keys(vd).length*50),OEt(l,u,0);let p=Sc.getBounds();h&&l.append("text").text(h).attr("x",Um).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);let g=p.stopy-p.starty+2*i.diagramMarginY,m=Um+p.stopx+2*i.diagramMarginX;mn(l,g,m,i.useMaxWidth),l.append("line").attr("x1",Um).attr("y1",i.height*4).attr("x2",m-Um-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let v=h?70:0;l.attr("viewBox",`${p.startx} -25 ${m} ${g+v}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",g+v+25)},"draw"),Sc={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:x(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:x(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:x(function(t,e,r,n){let i=Te().journey,a=this,s=0;function o(l){return x(function(h){s++;let f=a.sequenceItems.length-s+1;a.updateVal(h,"starty",e-f*i.boxMargin,Math.min),a.updateVal(h,"stopy",n+f*i.boxMargin,Math.max),a.updateVal(Sc.data,"startx",t-f*i.boxMargin,Math.min),a.updateVal(Sc.data,"stopx",r+f*i.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",t-f*i.boxMargin,Math.min),a.updateVal(h,"stopx",r+f*i.boxMargin,Math.max),a.updateVal(Sc.data,"starty",e-f*i.boxMargin,Math.min),a.updateVal(Sc.data,"stopy",n+f*i.boxMargin,Math.max))},"updateItemBounds")}x(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:x(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(Sc.data,"startx",i,Math.min),this.updateVal(Sc.data,"starty",s,Math.min),this.updateVal(Sc.data,"stopx",a,Math.max),this.updateVal(Sc.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),bumpVerticalPos:x(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return this.data},"getBounds")},vj=eM.sectionFills,k7e=eM.sectionColours,OEt=x(function(t,e,r){let n=Te().journey,i="",a=n.height*2+n.diagramMarginY,s=r+a,o=0,l="#CCC",u="black",h=0;for(let[f,d]of e.entries()){if(i!==d.section){l=vj[o%vj.length],h=o%vj.length,u=k7e[o%k7e.length];let g=0,m=d.section;for(let y=f;y(vd[m]&&(g[m]=vd[m]),g),{});d.x=f*n.taskMargin+f*n.width+Um,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=u,d.fill=l,d.num=h,d.actors=p,fk.drawTask(t,d,n),Sc.insert(d.x,d.y,d.x+d.width+n.taskMargin,300+5*30)}},"drawTasks"),T7e={setConf:MEt,draw:DEt},REt={parser:dEt,db:x7e,renderer:T7e,styles:TEt,init:x(t=>{T7e.setConf(t.journey),x7e.clear()},"init")}});var W7e={};Wt(W7e,{diagram:()=>eSt});function Ej(t,e){t.each(function(){var r=Je(this),n=r.text().split(/(\s+|
    )/).reverse(),i,a=[],s=1.1,o=r.attr("y"),l=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",l+"em");for(let h=0;he||i==="
    ")&&(a.pop(),u.text(a.join(" ").trim()),i==="
    "?a=[""]:a=[i],u=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(i))})}var wj,IEt,R7e,Wb,I7e,kj,tM,Gb,N7e,P7e,F7e,B7e,z7e,$7e,V7e,U7e,M7e,NEt,PEt,rM,FEt,BEt,H7e,zEt,$Et,D7e,VEt,UEt,HEt,Tj,q7e,qEt,WEt,GEt,YEt,Hm,jEt,O7e,XEt,KEt,ZEt,QEt,JEt,eSt,G7e=$(()=>{b();Sr();Cr();Cr();ql();wj=function(){var t=x(function(d,p,g,m){for(g=g||{},m=d.length;m--;g[d[m]]=p);return g},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,16],l=[1,17],u={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:x(function(p,g,m,v,y,w,k){var E=w.length-1;switch(y){case 1:return w[E-1];case 2:this.$=[];break;case 3:w[E-1].push(w[E]),this.$=w[E-1];break;case 4:case 5:this.$=w[E];break;case 6:case 7:this.$=[];break;case 8:v.getCommonDb().setDiagramTitle(w[E].substr(6)),this.$=w[E].substr(6);break;case 9:this.$=w[E].trim(),v.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=w[E].trim(),v.getCommonDb().setAccDescription(this.$);break;case 12:v.addSection(w[E].substr(8)),this.$=w[E].substr(8);break;case 15:v.addTask(w[E],0,""),this.$=w[E];break;case 16:v.addEvent(w[E].substr(2)),this.$=w[E];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:x(function(p,g){if(g.recoverable)this.trace(p);else{var m=new Error(p);throw m.hash=g,m}},"parseError"),parse:x(function(p){var g=this,m=[0],v=[],y=[null],w=[],k=this.table,E="",T=0,S=0,L=0,_=2,M=1,I=w.slice.call(arguments,1),O=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);O.setInput(p,C.yy),C.yy.lexer=O,C.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var D=O.yylloc;w.push(D);var P=O.options&&O.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function A(Z){m.length=m.length-2*Z,y.length=y.length-Z,w.length=w.length-Z}x(A,"popStack");function N(){var Z;return Z=v.pop()||O.lex()||M,typeof Z!="number"&&(Z instanceof Array&&(v=Z,Z=v.pop()),Z=g.symbols_[Z]||Z),Z}x(N,"lex");for(var F,B,V,z,H,K,X={},ne,j,ee,Q;;){if(V=m[m.length-1],this.defaultActions[V]?z=this.defaultActions[V]:((F===null||typeof F>"u")&&(F=N()),z=k[V]&&k[V][F]),typeof z>"u"||!z.length||!z[0]){var G="";Q=[];for(ne in k[V])this.terminals_[ne]&&ne>_&&Q.push("'"+this.terminals_[ne]+"'");O.showPosition?G="Parse error on line "+(T+1)+`: `+O.showPosition()+` Expecting `+Q.join(", ")+", got '"+(this.terminals_[F]||F)+"'":G="Parse error on line "+(T+1)+": Unexpected "+(F==M?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(G,{text:O.match,token:this.terminals_[F]||F,line:O.yylineno,loc:D,expected:Q})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+F);switch(z[0]){case 1:m.push(F),y.push(O.yytext),w.push(O.yylloc),m.push(z[1]),F=null,B?(F=B,B=null):(S=O.yyleng,E=O.yytext,T=O.yylineno,D=O.yylloc,L>0&&L--);break;case 2:if(j=this.productions_[z[1]][1],X.$=y[y.length-j],X._$={first_line:w[w.length-(j||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-(j||1)].first_column,last_column:w[w.length-1].last_column},P&&(X._$.range=[w[w.length-(j||1)].range[0],w[w.length-1].range[1]]),K=this.performAction.apply(X,[E,S,T,C.yy,z[1],y,w].concat(I)),typeof K<"u")return K;j&&(m=m.slice(0,-1*j*2),y=y.slice(0,-1*j),w=w.slice(0,-1*j)),m.push(this.productions_[z[1]][0]),y.push(X.$),w.push(X._$),ee=k[m[m.length-2]][m[m.length-1]],m.push(ee);break;case 3:return!0}}return!0},"parse")},h=function(){var d={EOF:1,parseError:x(function(g,m){if(this.yy.parser)this.yy.parser.parseError(g,m);else throw new Error(g)},"parseError"),setInput:x(function(p,g){return this.yy=g||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var g=p.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:x(function(p){var g=p.length,m=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===v.length?this.yylloc.first_column:0)+v[v.length-m.length].length-m[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(p){this.unput(this.match.slice(p))},"less"),pastInput:x(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var p=this.pastInput(),g=new Array(p.length+1).join("-");return p+this.upcomingInput()+` `+g+"^"},"showPosition"),test_match:x(function(p,g){var m,v,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),v=p[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],m=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var w in y)this[w]=y[w];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,g,m,v;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),w=0;wg[0].length)){if(g=m,v=w,this.options.backtrack_lexer){if(p=this.test_match(m,y[w]),p!==!1)return p;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(p=this.test_match(g,y[v]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var g=this.next();return g||this.lex()},"lex"),begin:x(function(g){this.conditionStack.push(g)},"begin"),popState:x(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:x(function(g){this.begin(g)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(g,m,v,y){var w=y;switch(v){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return d}();u.lexer=h;function f(){this.yy={}}return x(f,"Parser"),f.prototype=u,u.Parser=f,new f}();wj.parser=wj;IEt=wj,R7e={};sF(R7e,{addEvent:()=>V7e,addSection:()=>F7e,addTask:()=>$7e,addTaskOrg:()=>U7e,clear:()=>P7e,default:()=>NEt,getCommonDb:()=>N7e,getSections:()=>B7e,getTasks:()=>z7e});Wb="",I7e=0,kj=[],tM=[],Gb=[],N7e=x(()=>DC,"getCommonDb"),P7e=x(function(){kj.length=0,tM.length=0,Wb="",Gb.length=0,zr()},"clear"),F7e=x(function(t){Wb=t,kj.push(t)},"addSection"),B7e=x(function(){return kj},"getSections"),z7e=x(function(){let t=M7e(),e=100,r=0;for(;!t&&rr.id===I7e-1).events.push(t)},"addEvent"),U7e=x(function(t){let e={section:Wb,type:Wb,description:t,task:t,classes:[]};tM.push(e)},"addTaskOrg"),M7e=x(function(){let t=x(function(r){return Gb[r].processed},"compileTask"),e=!0;for(let[r,n]of Gb.entries())t(r),e=e&&n.processed;return e},"compileTasks"),NEt={clear:P7e,getCommonDb:N7e,addSection:F7e,getSections:B7e,getTasks:z7e,addTask:$7e,addTaskOrg:U7e,addEvent:V7e},PEt=12,rM=x(function(t,e){let r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),FEt=x(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=ch().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}x(a,"smile");function s(l){let u=ch().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}x(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return x(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),BEt=x(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),H7e=x(function(t,e){let r=e.text.replace(//gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),zEt=x(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}x(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,H7e(t,e)},"drawLabel"),$Et=x(function(t,e,r){let n=t.append("g"),i=Tj();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,rM(n,i),q7e(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),D7e=-1,VEt=x(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");D7e++;let a=300+5*30;i.append("line").attr("id","task"+D7e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),FEt(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=Tj();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,rM(i,s),q7e(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),UEt=x(function(t,e){rM(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),HEt=x(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),Tj=x(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),q7e=function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}x(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(//gi);for(let v=0;v0?d.forEach(M=>{let I=h.filter(D=>D.section===M),O={number:k,descr:M,section:k,width:200*Math.max(I.length,1)-50,padding:20,maxHeight:p};ie.debug("sectionNode",O);let C=u.append("g"),R=Hm.drawNode(C,O,k,i);ie.debug("sectionNode output",R),C.attr("transform",`translate(${y}, ${v})`),w+=p+50,I.length>0&&O7e(u,I,k,y,w,g,i,T,S,p,!1),y+=200*Math.max(I.length,1),w=v,k++}):(E=!1,O7e(u,h,k,y,w,g,i,T,S,p,!0));let L=u.node().getBBox();ie.debug("bounds",L),f&&u.append("text").text(f).attr("x",L.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),m=E?p+g+150:g+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",m).attr("x2",L.width+3*a).attr("y2",m).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),jc(void 0,u,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),O7e=x(function(t,e,r,n,i,a,s,o,l,u,h){for(let f of e){let d={descr:f.task,section:r,number:r,width:150,padding:20,maxHeight:a};ie.debug("taskNode",d);let p=t.append("g").attr("class","taskWrapper"),m=Hm.drawNode(p,d,r,s).height;if(ie.debug("taskHeight after draw",m),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,m),f.events){let v=t.append("g").attr("class","lineWrapper"),y=a;i+=100,y=y+XEt(t,f.events,r,n,i,s),i-=100,v.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+(h?a:u)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,h&&!s.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),XEt=x(function(t,e,r,n,i,a){let s=0,o=i;i=i+100;for(let l of e){let u={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50};ie.debug("eventNode",u);let h=t.append("g").attr("class","eventWrapper"),d=Hm.drawNode(h,u,r,a).height;s=s+d,h.attr("transform",`translate(${n}, ${i})`),i=i+10+d}return i=o,s},"drawEvents"),KEt={setConf:x(()=>{},"setConf"),draw:jEt},ZEt=x(t=>{let e="";for(let r=0;r` .edge { stroke-width: 3; } ${ZEt(t)} .section-root rect, .section-root path, .section-root circle { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .eventWrapper { filter: brightness(120%); } `,"getStyles"),JEt=QEt,eSt={db:R7e,renderer:KEt,parser:IEt,styles:JEt}});function Da(t){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(t)}function eX(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y7e(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){s=!0,o=l},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(s)throw o}}}}function _St(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ASt(t,e){return e={exports:{}},t(e,e.exports),e.exports}function NSt(t){for(var e=t.length;e--&&ISt.test(t.charAt(e)););return e}function BSt(t){return t&&t.slice(0,PSt(t)+1).replace(FSt,"")}function HSt(t){var e=VSt.call(t,dk),r=t[dk];try{t[dk]=void 0;var n=!0}catch{}var i=USt.call(t);return n&&(e?t[dk]=r:delete t[dk]),i}function YSt(t){return GSt.call(t)}function ZSt(t){return t==null?t===void 0?KSt:XSt:Z7e&&Z7e in Object(t)?qSt(t):jSt(t)}function QSt(t){return t!=null&&typeof t=="object"}function tCt(t){return typeof t=="symbol"||JSt(t)&&bLe(t)==eCt}function sCt(t){if(typeof t=="number")return t;if(Bk(t))return Q7e;if(Zm(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Zm(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=zSt(t);var r=nCt.test(t);return r||iCt.test(t)?aCt(t.slice(2),r?2:8):rCt.test(t)?Q7e:+t}function uCt(t,e,r){var n,i,a,s,o,l,u=0,h=!1,f=!1,d=!0;if(typeof t!="function")throw new TypeError(oCt);e=J7e(e)||0,Zm(r)&&(h=!!r.leading,f="maxWait"in r,a=f?lCt(J7e(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d);function p(S){var L=n,_=i;return n=i=void 0,u=S,s=t.apply(_,L),s}function g(S){return u=S,o=setTimeout(y,e),h?p(S):s}function m(S){var L=S-l,_=S-u,M=e-L;return f?cCt(M,a-_):M}function v(S){var L=S-l,_=S-u;return l===void 0||L>=e||L<0||f&&_>=a}function y(){var S=Sj();if(v(S))return w(S);o=setTimeout(y,m(S))}function w(S){return o=void 0,d&&n?p(S):(n=i=void 0,s)}function k(){o!==void 0&&clearTimeout(o),u=0,n=l=i=o=void 0}function E(){return o===void 0?s:w(Sj())}function T(){var S=Sj(),L=v(S);if(n=arguments,i=this,l=S,L){if(o===void 0)return g(l);if(f)return clearTimeout(o),o=setTimeout(y,e),p(l)}return o===void 0&&(o=setTimeout(y,e)),s}return T.cancel=k,T.flush=E,T}function $M(t,e,r,n,i,a){var s;return zi(t)?s=t:s=o2[t]||o2.euclidean,e===0&&zi(t)?s(i,a):s(e,r,n,i,a)}function r6t(t,e){if(VM(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Bk(t)?!0:t6t.test(t)||!e6t.test(t)||e!=null&&t in Object(e)}function l6t(t){if(!Zm(t))return!1;var e=bLe(t);return e==a6t||e==s6t||e==i6t||e==o6t}function h6t(t){return!!b8e&&b8e in t}function g6t(t){if(t!=null){try{return p6t.call(t)}catch{}try{return t+""}catch{}}return""}function E6t(t){if(!Zm(t)||f6t(t))return!1;var e=c6t(t)?T6t:y6t;return e.test(m6t(t))}function C6t(t,e){return t?.[e]}function A6t(t,e){var r=_6t(t,e);return S6t(r)?r:void 0}function M6t(){this.__data__=Dk?Dk(null):{},this.size=0}function O6t(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function F6t(t){var e=this.__data__;if(Dk){var r=e[t];return r===I6t?void 0:r}return P6t.call(e,t)?e[t]:void 0}function V6t(t){var e=this.__data__;return Dk?e[t]!==void 0:$6t.call(e,t)}function q6t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Dk&&e===void 0?H6t:e,this}function h2(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}function iAt(t,e){var r=this.__data__,n=UM(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function f2(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t0;){var h=i.shift();e(h),a.add(h.id()),o&&n(i,a,h)}return t}function QLe(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i0&&arguments[0]!==void 0?arguments[0]:U7t,e=arguments.length>1?arguments[1]:void 0,r=0;r0?C=D:O=D;while(Math.abs(R)>s&&++P=a?w(I,P):A===0?P:E(I,O,O+u)}var S=!1;function L(){S=!0,(t!==e||r!==n)&&k()}var _=function(O){return S||L(),t===e&&r===n?O:O===0?0:O===1?1:v(T(O),e,n)};_.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var M="generateBezier("+[t,e,r,n]+")";return _.toString=function(){return M},_}function B8e(t,e,r,n,i){if(n===1||e===r)return r;var a=i(e,r,n);return t==null||((t.roundValue||t.color)&&(a=Math.round(a)),t.min!==void 0&&(a=Math.max(a,t.min)),t.max!==void 0&&(a=Math.min(a,t.max))),a}function z8e(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Xb(t,e,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var s=z8e(t,i),o=z8e(e,i);if(Ct(s)&&Ct(o))return B8e(a,s,o,r,n);if(Yn(s)&&Yn(o)){for(var l=[],u=0;u0?(p==="spring"&&g.push(s.duration),s.easingImpl=bM[p].apply(null,g)):s.easingImpl=bM[p]}var m=s.easingImpl,v;if(s.duration===0?v=1:v=(r-l)/s.duration,s.applying&&(v=s.progress),v<0?v=0:v>1&&(v=1),s.delay==null){var y=s.startPosition,w=s.position;if(w&&i&&!t.locked()){var k={};vk(y.x,w.x)&&(k.x=Xb(y.x,w.x,v,m)),vk(y.y,w.y)&&(k.y=Xb(y.y,w.y,v,m)),t.position(k)}var E=s.startPan,T=s.pan,S=a.pan,L=T!=null&&n;L&&(vk(E.x,T.x)&&(S.x=Xb(E.x,T.x,v,m)),vk(E.y,T.y)&&(S.y=Xb(E.y,T.y,v,m)),t.emit("pan"));var _=s.startZoom,M=s.zoom,I=M!=null&&n;I&&(vk(_,M)&&(a.zoom=Lk(a.minZoom,Xb(_,M,v,m),a.maxZoom)),t.emit("zoom")),(L||I)&&t.emit("viewport");var O=s.style;if(O&&O.length>0&&i){for(var C=0;C=0;L--){var _=S[L];_()}S.splice(0,S.length)},w=p.length-1;w>=0;w--){var k=p[w],E=k._private;if(E.stopped){p.splice(w,1),E.hooked=!1,E.playing=!1,E.started=!1,y(E.frames);continue}!E.playing&&!E.applying||(E.playing&&E.applying&&(E.applying=!1),E.started||r8t(h,k,t),t8t(h,k,t,f),E.applying&&(E.applying=!1),y(E.frames),E.step!=null&&E.step(t),k.completed()&&(p.splice(w,1),E.hooked=!1,E.playing=!1,E.started=!1,y(E.completes)),m=!0)}return!f&&p.length===0&&g.length===0&&n.push(h),m}for(var a=!1,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}function gMe(t){this.options=cr({},u8t,h8t,t)}function mMe(t){this.options=cr({},f8t,t)}function vMe(t){this.options=cr({},d8t,t)}function KM(t){this.options=cr({},p8t,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(i){var a=i.source().data("id"),s=i.target().data("id"),o=e.some(function(u){return u.data("id")===a}),l=e.some(function(u){return u.data("id")===s});return!o||!l});this.options.eles=this.options.eles.not(n)}function bMe(t){this.options=cr({},D8t,t)}function bX(t){this.options=cr({},O8t,t)}function xMe(t){this.options=cr({},R8t,t)}function wMe(t){this.options=cr({},I8t,t)}function kMe(t){this.options=t,this.notifications=0}function SMe(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function wX(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(F8t(t,e,r,n,i),{cx:Gj,cy:Yj,radius:jm,startX:TMe,startY:EMe,stopX:jj,stopY:Xj,startAngle:Uh.ang+Math.PI/2*Xm,endAngle:Cc.ang-Math.PI/2*Xm,counterClockwise:kM})}function CMe(t){var e=[];if(t!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+n-a,r),t.quadraticCurveTo(e+n,r,e+n,r+a),t.lineTo(e+n,r+i-a),t.quadraticCurveTo(e+n,r+i,e+n-a,r+i),t.lineTo(e+a,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),s?t.stroke():t.fill()}function SLt(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),i=new Uint8Array(n),a=0;a{b();La=typeof window>"u"?null:window,X7e=La?La.navigator:null;La&&La.document;iSt=Da(""),hLe=Da({}),aSt=Da(function(){}),sSt=typeof HTMLElement>"u"?"undefined":Da(HTMLElement),Pk=function(e){return e&&e.instanceString&&zi(e.instanceString)?e.instanceString():null},nr=function(e){return e!=null&&Da(e)==iSt},zi=function(e){return e!=null&&Da(e)===aSt},Yn=function(e){return!Ol(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},en=function(e){return e!=null&&Da(e)===hLe&&!Yn(e)&&e.constructor===Object},oSt=function(e){return e!=null&&Da(e)===hLe},Ct=function(e){return e!=null&&Da(e)===Da(1)&&!isNaN(e)},lSt=function(e){return Ct(e)&&Math.floor(e)===e},EM=function(e){if(sSt!=="undefined")return e!=null&&e instanceof HTMLElement},Ol=function(e){return Fk(e)||fLe(e)},Fk=function(e){return Pk(e)==="collection"&&e._private.single},fLe=function(e){return Pk(e)==="collection"&&!e._private.single},rX=function(e){return Pk(e)==="core"},dLe=function(e){return Pk(e)==="stylesheet"},cSt=function(e){return Pk(e)==="event"},o0=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},uSt=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},hSt=function(e){return en(e)&&Ct(e.x1)&&Ct(e.x2)&&Ct(e.y1)&&Ct(e.y2)},fSt=function(e){return oSt(e)&&zi(e.then)},dSt=function(){return X7e&&X7e.userAgent.match(/msie|trident|edge/i)},Sk=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],s=0;sr?1:0},xSt=function(e,r){return-1*gLe(e,r)},cr=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(v-=1),v<1/6?g+(m-g)*6*v:v<1/2?m:v<2/3?g+(m-g)*(2/3-v)*6:g}var f=new RegExp("^"+mSt+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(f[2]),i<0||i>100||(i=i/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(i===0)o=l=u=Math.round(a*255);else{var d=a<.5?a*(1+i):a+i-a*i,p=2*a-d;o=Math.round(255*h(p,d,n+1/3)),l=Math.round(255*h(p,d,n)),u=Math.round(255*h(p,d,n-1/3))}r=[o,l,u,s]}return r},TSt=function(e){var r,n=new RegExp("^"+pSt+"$").exec(e);if(n){r=[];for(var i=[],a=1;a<=3;a++){var s=n[a];if(s[s.length-1]==="%"&&(i[a]=!0),s=parseFloat(s),i[a]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=i[1]||i[2]||i[3],l=i[1]&&i[2]&&i[3];if(o&&!l)return;var u=n[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},ESt=function(e){return CSt[e.toLowerCase()]},SSt=function(e){return(Yn(e)?e:null)||ESt(e)||wSt(e)||TSt(e)||kSt(e)},CSt={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},mLe=function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a1&&arguments[1]!==void 0?arguments[1]:Qb,n=r,i;i=e.next(),!i.done;)n=n*wLe+i.value|0;return n},Ck=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qb;return r*wLe+e|0},_k=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bk;return(r<<5)+r+e|0},fCt=function(e,r){return e*2097152+r},t0=function(e){return e[0]*2097152+e[1]},nM=function(e,r){return[Ck(e[0],r[0]),_k(e[1],r[1])]},dCt=function(e,r){var n={value:0,done:!1},i=0,a=e.length,s={next:function(){return i=0&&!(e[i]===r&&(e.splice(i,1),n));i--);},sX=function(e){e.splice(0,e.length)},xCt=function(e,r){for(var n=0;n"u"?"undefined":Da(Set))!==kCt?Set:TCt,BM=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!rX(e)){ji("An element must have a core reference and parameters set");return}var i=r.group;if(i==null&&(r.data&&r.data.source!=null&&r.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){ji("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?i==="edges":!!r.pannable,active:!1,classes:new c2,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();a.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Yn(r.classes)?u=r.classes:nr(r.classes)&&(u=r.classes.split(/\s+/));for(var h=0,f=u.length;hw?1:0},h=function(y,w,k,E,T){var S;if(k==null&&(k=0),T==null&&(T=n),k<0)throw new Error("lo must be non-negative");for(E==null&&(E=y.length);kI;0<=I?M++:M--)_.push(M);return _}.apply(this).reverse(),L=[],E=0,T=S.length;EO;0<=O?++_:--_)C.push(s(y,k));return C},m=function(y,w,k,E){var T,S,L;for(E==null&&(E=n),T=y[k];k>w;){if(L=k-1>>1,S=y[L],E(T,S)<0){y[k]=S,k=L;continue}break}return y[k]=T},v=function(y,w,k){var E,T,S,L,_;for(k==null&&(k=n),T=y.length,_=w,S=y[w],E=2*w+1;E0;){var S=w.pop(),L=v(S),_=S.id();if(d[_]=L,L!==1/0)for(var M=S.neighborhood().intersect(g),I=0;I0)for(F.unshift(N);f[V];){var z=f[V];F.unshift(z.edge),F.unshift(z.node),B=z.node,V=B.id()}return o.spawn(F)}}}},_Ct={kruskal:function(e){e=e||function(k){return 1};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,s=new Array(a),o=n,l=function(E){for(var T=0;T0;){if(T(),L++,E===h){for(var _=[],M=a,I=h,O=y[I];_.unshift(M),O!=null&&_.unshift(O),M=v[I],M!=null;)I=M.id(),O=y[I];return{found:!0,distance:f[E],path:this.spawn(_),steps:L}}p[E]=!0;for(var C=k._private.edges,R=0;RO&&(g[I]=O,w[I]=M,k[I]=T),!a){var C=M*h+_;!a&&g[C]>O&&(g[C]=O,w[C]=_,k[C]=T)}}}for(var R=0;R1&&arguments[1]!==void 0?arguments[1]:s,We=k(Se),Ze=[],Qe=We;;){if(Qe==null)return r.spawn();var et=w(Qe),ze=et.edge,He=et.pred;if(Ze.unshift(Qe[0]),Qe.same(Ye)&&Ze.length>0)break;ze!=null&&Ze.unshift(ze),Qe=He}return l.spawn(Ze)},S=0;S=0;h--){var f=u[h],d=f[1],p=f[2];(r[d]===o&&r[p]===l||r[d]===l&&r[p]===o)&&u.splice(h,1)}for(var g=0;gi;){var a=Math.floor(Math.random()*r.length);r=NCt(a,e,r),n--}return r},PCt={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(F){return F.isLoop()});var a=n.length,s=i.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),l=Math.floor(a/ICt);if(a<2){ji("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],h=0;h1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(r,n):(n0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}a&&e.sort(function(d,p){return d-p});var h=e.length,f=Math.floor(h/2);return h%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},UCt=function(e){return Math.PI*e/180},iM=function(e,r){return Math.atan2(r,e)-Math.PI/2},oX=Math.log2||function(t){return Math.log(t)/Math.log(2)},LLe=function(e){return e>0?1:e<0?-1:0},Jm=function(e,r){return Math.sqrt(Gm(e,r))},Gm=function(e,r){var n=r.x-e.x,i=r.y-e.y;return n*n+i*i},HCt=function(e){for(var r=e.length,n=0,i=0;i=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},WCt=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},GCt=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},YCt=function(e,r,n){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h}},MLe=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},jCt=function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},gM=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},mM=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,s;if(r.length===1)n=i=a=s=r[0];else if(r.length===2)n=a=r[0],s=i=r[1];else if(r.length===4){var o=Su(r,4);n=o[0],i=o[1],a=o[2],s=o[3]}return e.x1-=s,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},n8e=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},lX=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},s2=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},XCt=function(e,r){return s2(e,r.x,r.y)},DLe=function(e,r){return s2(e,r.x1,r.y1)&&s2(e,r.x2,r.y2)},OLe=function(e,r,n,i,a,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?e1(a,s):l,h=a/2,f=s/2;u=Math.min(u,h,f);var d=u!==h,p=u!==f,g;if(d){var m=n-h+u-o,v=i-f-o,y=n+h-u+o,w=v;if(g=i0(e,r,n,i,m,v,y,w,!1),g.length>0)return g}if(p){var k=n+h+o,E=i-f+u-o,T=k,S=i+f-u+o;if(g=i0(e,r,n,i,k,E,T,S,!1),g.length>0)return g}if(d){var L=n-h+u-o,_=i+f+o,M=n+h-u+o,I=_;if(g=i0(e,r,n,i,L,_,M,I,!1),g.length>0)return g}if(p){var O=n-h-o,C=i-f+u-o,R=O,D=i+f-u+o;if(g=i0(e,r,n,i,O,C,R,D,!1),g.length>0)return g}var P;{var A=n-h+u,N=i-f+u;if(P=xk(e,r,n,i,A,N,u+o),P.length>0&&P[0]<=A&&P[1]<=N)return[P[0],P[1]]}{var F=n+h-u,B=i-f+u;if(P=xk(e,r,n,i,F,B,u+o),P.length>0&&P[0]>=F&&P[1]<=B)return[P[0],P[1]]}{var V=n+h-u,z=i+f-u;if(P=xk(e,r,n,i,V,z,u+o),P.length>0&&P[0]>=V&&P[1]>=z)return[P[0],P[1]]}{var H=n-h+u,K=i+f-u;if(P=xk(e,r,n,i,H,K,u+o),P.length>0&&P[0]<=H&&P[1]>=K)return[P[0],P[1]]}return[]},KCt=function(e,r,n,i,a,s,o){var l=o,u=Math.min(n,a),h=Math.max(n,a),f=Math.min(i,s),d=Math.max(i,s);return u-l<=e&&e<=h+l&&f-l<=r&&r<=d+l},ZCt=function(e,r,n,i,a,s,o,l,u){var h={x1:Math.min(n,o,a)-u,x2:Math.max(n,o,a)+u,y1:Math.min(i,l,s)-u,y2:Math.max(i,l,s)+u};return!(eh.x2||rh.y2)},QCt=function(e,r,n,i){n-=i;var a=r*r-4*e*n;if(a<0)return[];var s=Math.sqrt(a),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},JCt=function(e,r,n,i,a){var s=1e-5;e===0&&(e=s),r/=e,n/=e,i/=e;var o,l,u,h,f,d,p,g;if(l=(3*n-r*r)/9,u=-(27*i)+r*(9*n-2*(r*r)),u/=54,o=l*l*l+u*u,a[1]=0,p=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=u-Math.sqrt(o),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),a[0]=-p+f+d,p+=(f+d)/2,a[4]=a[2]=-p,p=Math.sqrt(3)*(-d+f)/2,a[3]=p,a[5]=-p;return}if(a[5]=a[3]=0,o===0){g=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),a[0]=-p+2*g,a[4]=a[2]=-(g+p);return}l=-l,h=l*l*l,h=Math.acos(u/Math.sqrt(h)),g=2*Math.sqrt(l),a[0]=-p+g*Math.cos(h/3),a[2]=-p+g*Math.cos((h+2*Math.PI)/3),a[4]=-p+g*Math.cos((h+4*Math.PI)/3)},e_t=function(e,r,n,i,a,s,o,l){var u=1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+i*i-4*i*s+2*i*l+4*s*s-4*s*l+l*l,h=1*9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*i*s-3*i*i-3*i*l-6*s*s+3*s*l,f=1*3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*i*i-6*i*s+i*l-i*r+2*s*s+2*s*r-l*r,d=1*n*a-n*n+n*e-a*e+i*s-i*i+i*r-s*r,p=[];JCt(u,h,f,d,p);for(var g=1e-7,m=[],v=0;v<6;v+=2)Math.abs(p[v+1])=0&&p[v]<=1&&m.push(p[v]);m.push(1),m.push(0);for(var y=-1,w,k,E,T=0;T=0?Eu?(e-a)*(e-a)+(r-s)*(r-s):h-d},el=function(e,r,n){for(var i,a,s,o,l,u=0,h=0;h=e&&e>=s||i<=e&&e<=s)l=(e-i)/(s-i)*(o-a)+a,l>r&&u++;else continue;return u%2!==0},xd=function(e,r,n,i,a,s,o,l,u){var h=new Array(n.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var d=Math.cos(-f),p=Math.sin(-f),g=0;g0){var v=AM(h,-u);m=_M(v)}else m=h;return el(e,r,m)},r_t=function(e,r,n,i,a,s,o,l){for(var u=new Array(n.length*2),h=0;h=0&&v<=1&&w.push(v),y>=0&&y<=1&&w.push(y),w.length===0)return[];var k=w[0]*l[0]+e,E=w[0]*l[1]+r;if(w.length>1){if(w[0]==w[1])return[k,E];var T=w[1]*l[0]+e,S=w[1]*l[1]+r;return[k,E,T,S]}else return[k,E]},Aj=function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},i0=function(e,r,n,i,a,s,o,l,u){var h=e-a,f=n-e,d=o-a,p=r-s,g=i-r,m=l-s,v=d*p-m*h,y=f*p-g*h,w=m*f-d*g;if(w!==0){var k=v/w,E=y/w,T=.001,S=0-T,L=1+T;return S<=k&&k<=L&&S<=E&&E<=L?[e+k*f,r+k*g]:u?[e+k*f,r+k*g]:[]}else return v===0||y===0?Aj(e,n,o)===o?[o,l]:Aj(e,n,a)===a?[a,s]:Aj(a,o,n)===n?[n,i]:[]:[]},Mk=function(e,r,n,i,a,s,o,l){var u=[],h,f=new Array(n.length),d=!0;s==null&&(d=!1);var p;if(d){for(var g=0;g0){var m=AM(f,-l);p=_M(m)}else p=f}else p=n;for(var v,y,w,k,E=0;E2){for(var g=[h[0],h[1]],m=Math.pow(g[0]-e,2)+Math.pow(g[1]-r,2),v=1;vh&&(h=E)},get:function(k){return u[k]}},d=0;d0?A=P.edgesTo(D)[0]:A=D.edgesTo(P)[0];var N=i(A);D=D.id(),_[D]>_[C]+N&&(_[D]=_[C]+N,M.nodes.indexOf(D)<0?M.push(D):M.updateItem(D),L[D]=0,S[D]=[]),_[D]==_[C]+N&&(L[D]=L[D]+L[C],S[D].push(C))}else for(var F=0;F0;){for(var H=T.pop(),K=0;K0&&o.push(n[l]);o.length!==0&&a.push(i.collection(o))}return a},y_t=function(e,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:w_t,o=i,l,u,h=0;h=2?pk(e,r,n,0,l8e,k_t):pk(e,r,n,0,o8e)},squaredEuclidean:function(e,r,n){return pk(e,r,n,0,l8e)},manhattan:function(e,r,n){return pk(e,r,n,0,o8e)},max:function(e,r,n){return pk(e,r,n,-1/0,T_t)}};o2["squared-euclidean"]=o2.squaredEuclidean;o2.squaredeuclidean=o2.squaredEuclidean;E_t=xs({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),uX=function(e){return E_t(e)},LM=function(e,r,n,i,a){var s=a!=="kMedoids",o=s?function(f){return n[f]}:function(f){return i[f](n)},l=function(d){return i[d](r)},u=n,h=r;return $M(e,i.length,o,l,u,h)},Lj=function(e,r,n){for(var i=n.length,a=new Array(i),s=new Array(i),o=new Array(r),l=null,u=0;un)return!1}return!0},__t=function(e,r,n){for(var i=0;io&&(o=r[u][h],l=h);a[l].push(e[u])}for(var f=0;f=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var g=r[s],m=r[i[s]],v;a.mode==="dendrogram"?v={left:g,right:m,key:g.key}:v={value:g.value.concat(m.value),key:g.key},e[g.index]=v,e.splice(m.index,1),r[g.key]=v;for(var y=0;yn[m.key][w.key]&&(l=n[m.key][w.key])):a.linkage==="max"?(l=n[g.key][w.key],n[g.key][w.key]0&&i.push(a);return i},p8e=function(e,r,n){for(var i=[],a=0;ao&&(s=u,o=r[a*e+u])}s>0&&i.push(s)}for(var h=0;hu&&(l=h,u=f)}n[a]=s[l]}return i=p8e(e,r,n),i},g8e=function(e){for(var r=this.cy(),n=this.nodes(),i=V_t(e),a={},s=0;s=O?(C=O,O=D,R=P):D>C&&(C=D);for(var A=0;A0?1:0;L[M%i.minIterations*o+H]=K,z+=K}if(z>0&&(M>=i.minIterations-1||M==i.maxIterations-1)){for(var X=0,ne=0;ne1||S>1)&&(o=!0),f[k]=[],w.outgoers().forEach(function(_){_.isEdge()&&f[k].push(_.id())})}else d[k]=[void 0,w.target().id()]}):s.forEach(function(w){var k=w.id();if(w.isNode()){var E=w.degree(!0);E%2&&(l?u?o=!0:u=k:l=k),f[k]=[],w.connectedEdges().forEach(function(T){return f[k].push(T.id())})}else d[k]=[w.source().id(),w.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(u&&l)if(a){if(h&&u!=h)return p;h=u}else{if(h&&u!=h&&l!=h)return p;h||(h=u)}else h||(h=s[0].id());var g=function(k){for(var E=k,T=[k],S,L,_;f[E].length;)S=f[E].shift(),L=d[S][0],_=d[S][1],E!=_?(f[_]=f[_].filter(function(M){return M!=S}),E=_):!a&&E!=L&&(f[L]=f[L].filter(function(M){return M!=S}),E=L),T.unshift(S),T.unshift(E);return T},m=[],v=[];for(v=g(h);v.length!=1;)f[v[0]].length==0?(m.unshift(s.getElementById(v.shift())),m.unshift(s.getElementById(v.shift()))):v=g(v.shift()).concat(v);m.unshift(s.getElementById(v.shift()));for(var y in f)if(f[y].length)return p;return p.found=!0,p.trail=this.spawn(m,!0),p}},oM=function(){var e=this,r={},n=0,i=0,a=[],s=[],o={},l=function(d,p){for(var g=s.length-1,m=[],v=e.spawn();s[g].x!=d||s[g].y!=p;)m.push(s.pop().edge),g--;m.push(s.pop().edge),m.forEach(function(y){var w=y.connectedNodes().intersection(e);v.merge(y),w.forEach(function(k){var E=k.id(),T=k.connectedEdges().intersection(e);v.merge(k),r[E].cutVertex?v.merge(T.filter(function(S){return S.isLoop()})):v.merge(T)})}),a.push(v)},u=function f(d,p,g){d===g&&(i+=1),r[p]={id:n,low:n++,cutVertex:!1};var m=e.getElementById(p).connectedEdges().intersection(e);if(m.size()===0)a.push(e.spawn(e.getElementById(p)));else{var v,y,w,k;m.forEach(function(E){v=E.source().id(),y=E.target().id(),w=v===p?y:v,w!==g&&(k=E.id(),o[k]||(o[k]=!0,s.push({x:p,y:w,edge:E})),w in r?r[p].low=Math.min(r[p].low,r[w].id):(f(d,w,p),r[p].low=Math.min(r[p].low,r[w].low),r[p].id<=r[w].low&&(r[p].cutVertex=!0,l(p,w))))})}};e.forEach(function(f){if(f.isNode()){var d=f.id();d in r||(i=0,u(d,d),r[d].cutVertex=i>1)}});var h=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(h),components:a}},X_t={hopcroftTarjanBiconnected:oM,htbc:oM,htb:oM,hopcroftTarjanBiconnectedComponents:oM},lM=function(){var e=this,r={},n=0,i=[],a=[],s=e.spawn(e),o=function l(u){a.push(u),r[u]={index:n,low:n++,explored:!1};var h=e.getElementById(u).connectedEdges().intersection(e);if(h.forEach(function(m){var v=m.target().id();v!==u&&(v in r||l(v),r[v].explored||(r[u].low=Math.min(r[u].low,r[v].low)))}),r[u].index===r[u].low){for(var f=e.spawn();;){var d=a.pop();if(f.merge(e.getElementById(d)),r[d].low=r[u].index,r[d].explored=!0,d===u)break}var p=f.edgesWith(f),g=f.merge(p);i.push(g),s=s.difference(g)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:i}},K_t={tarjanStronglyConnected:lM,tsc:lM,tscc:lM,tarjanStronglyConnectedComponents:lM},zLe={};[Ak,CCt,_Ct,LCt,DCt,RCt,PCt,o_t,r2,n2,$j,x_t,R_t,z_t,G_t,j_t,X_t,K_t].forEach(function(t){cr(zLe,t)});$Le=0,VLe=1,ULe=2,wd=function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=$Le,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};wd.prototype={fulfill:function(e){return m8e(this,VLe,"fulfillValue",e)},reject:function(e){return m8e(this,ULe,"rejectReason",e)},then:function(e,r){var n=this,i=new wd;return n.onFulfilled.push(y8e(e,i,"fulfill")),n.onRejected.push(y8e(r,i,"reject")),HLe(n),i.proxy}};m8e=function(e,r,n,i){return e.state===$Le&&(e.state=r,e[n]=i,HLe(e)),e},HLe=function(e){e.state===VLe?v8e(e,"onFulfilled",e.fulfillValue):e.state===ULe&&v8e(e,"onRejected",e.rejectReason)},v8e=function(e,r,n){if(e[r].length!==0){var i=e[r];e[r]=[];var a=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var s=0;s0&&this.spawn(i).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){Yn(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=r===void 0,a=[],s=0,o=n.length;s0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n}};vM.className=vM.classNames=vM.classes;Jr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ma,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Jr.variable="(?:[\\w-.]|(?:\\\\"+Jr.metaChar+"))+";Jr.className="(?:[\\w-]|(?:\\\\"+Jr.metaChar+"))+";Jr.value=Jr.string+"|"+Jr.number;Jr.id=Jr.variable;(function(){var t,e,r;for(t=Jr.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(Jr.comparatorOp+="|\\!"+e)})();In=function(){return{checks:[]}},Vt={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Uj=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return xSt(t.selector,e.selector)}),c7t=function(){for(var t={},e,r=0;r0&&h.edgeCount>0)return Sn("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(h.edgeCount>1)return Sn("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;h.edgeCount===1&&Sn("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},g7t=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(h){return h??""},r=function(h){return nr(h)?'"'+h+'"':e(h)},n=function(h){return" "+h+" "},i=function(h,f){var d=h.type,p=h.value;switch(d){case Vt.GROUP:{var g=e(p);return g.substring(0,g.length-1)}case Vt.DATA_COMPARE:{var m=h.field,v=h.operator;return"["+m+n(e(v))+r(p)+"]"}case Vt.DATA_BOOL:{var y=h.operator,w=h.field;return"["+e(y)+w+"]"}case Vt.DATA_EXIST:{var k=h.field;return"["+k+"]"}case Vt.META_COMPARE:{var E=h.operator,T=h.field;return"[["+T+n(e(E))+r(p)+"]]"}case Vt.STATE:return p;case Vt.ID:return"#"+p;case Vt.CLASS:return"."+p;case Vt.PARENT:case Vt.CHILD:return a(h.parent,f)+n(">")+a(h.child,f);case Vt.ANCESTOR:case Vt.DESCENDANT:return a(h.ancestor,f)+" "+a(h.descendant,f);case Vt.COMPOUND_SPLIT:{var S=a(h.left,f),L=a(h.subject,f),_=a(h.right,f);return S+(S.length>0?" ":"")+L+_}case Vt.TRUE:return""}},a=function(h,f){return h.checks.reduce(function(d,p,g){return d+(f===h&&g===0?"$":"")+i(p,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),h=!0),(a||o||h)&&(l=!a&&!s?"":""+e,u=""+n),h&&(e=l=l.toLowerCase(),n=u=u.toLowerCase()),r){case"*=":i=l.indexOf(u)>=0;break;case"$=":i=l.indexOf(u,l.length-u.length)>=0;break;case"^=":i=l.indexOf(u)===0;break;case"=":i=e===n;break;case">":d=!0,i=e>n;break;case">=":d=!0,i=e>=n;break;case"<":d=!0,i=e1&&arguments[1]!==void 0?arguments[1]:!0;return gX(this,t,e,QLe)};l2.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return gX(this,t,e,JLe)};l2.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return gX(this,t,e,T7t)};l2.ancestors=l2.parents;Ok=eMe={data:En.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:En.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:En.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:En.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:En.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:En.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};Ok.attr=Ok.data;Ok.removeAttr=Ok.removeData;E7t=eMe,qM={};cr(qM,{degree:Dj(function(t,e){return e.source().same(e.target())?2:1}),indegree:Dj(function(t,e){return e.target().same(t)?1:0}),outdegree:Dj(function(t,e){return e.source().same(t)?1:0})});cr(qM,{minDegree:jb("degree",function(t,e){return te}),minIndegree:jb("indegree",function(t,e){return te}),minOutdegree:jb("outdegree",function(t,e){return te})});cr(qM,{totalDegree:function(e){for(var r=0,n=this.nodes(),i=0;i0,d=f;f&&(h=h[0]);var p=d?h.position():{x:0,y:0};r!==void 0?u.position(e,r+p[e]):a!==void 0&&u.position({x:a.x+p.x,y:a.y+p.y})}else{var g=n.position(),m=o?n.parent():null,v=m&&m.length>0,y=v;v&&(m=m[0]);var w=y?m.position():{x:0,y:0};return a={x:g.x-w.x,y:g.y-w.y},e===void 0?a:a[e]}else if(!s)return;return this}};Au.modelPosition=Au.point=Au.position;Au.modelPositions=Au.points=Au.positions;Au.renderedPoint=Au.renderedPosition;Au.relativePoint=Au.relativePosition;S7t=tMe;i2=f0={};f0.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,s=e.x2*n+i.x,o=e.y1*n+i.y,l=e.y2*n+i.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}};f0.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};f0.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",h={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),d=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function p(M,I,O){var C=0,R=0,D=I+O;return M>0&&D>0&&(C=I/D*M,R=O/D*M),{biasDiff:C,biasComplementDiff:R}}function g(M,I,O,C){if(O.units==="%")switch(C){case"width":return M>0?O.pfValue*M:0;case"height":return I>0?O.pfValue*I:0;case"average":return M>0&&I>0?O.pfValue*(M+I)/2:0;case"min":return M>0&&I>0?M>I?O.pfValue*I:O.pfValue*M:0;case"max":return M>0&&I>0?M>I?O.pfValue*M:O.pfValue*I:0;default:return 0}else return O.units==="px"?O.pfValue:0}var m=h.width.left.value;h.width.left.units==="px"&&h.width.val>0&&(m=m*100/h.width.val);var v=h.width.right.value;h.width.right.units==="px"&&h.width.val>0&&(v=v*100/h.width.val);var y=h.height.top.value;h.height.top.units==="px"&&h.height.val>0&&(y=y*100/h.height.val);var w=h.height.bottom.value;h.height.bottom.units==="px"&&h.height.val>0&&(w=w*100/h.height.val);var k=p(h.width.val-f.w,m,v),E=k.biasDiff,T=k.biasComplementDiff,S=p(h.height.val-f.h,y,w),L=S.biasDiff,_=S.biasComplementDiff;o.autoPadding=g(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,h.width.val),d.x=(-E+f.x1+f.x2+T)/2,o.autoHeight=Math.max(f.h,h.height.val),d.y=(-L+f.y1+f.y2+_)/2}for(var n=0;ne.x2?i:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},Ym=function(e,r){return r==null?e:Cu(e,r.x1,r.y1,r.x2,r.y2)},gk=function(e,r,n){return _u(e,r,n)},cM=function(e,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,s=a.arrowWidth/2,o=r.pstyle(n+"-arrow-shape").value,l,u;if(o!=="none"){n==="source"?(l=a.srcX,u=a.srcY):n==="target"?(l=a.tgtX,u=a.tgtY):(l=a.midX,u=a.midY);var h=i.arrowBounds=i.arrowBounds||{},f=h[n]=h[n]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,gM(f,1),Cu(e,f.x1,f.y1,f.x2,f.y2)}}},Oj=function(e,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,s=a.rstyle,o=r.pstyle(i+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),h=gk(s,"labelWidth",n),f=gk(s,"labelHeight",n),d=gk(s,"labelX",n),p=gk(s,"labelY",n),g=r.pstyle(i+"text-margin-x").pfValue,m=r.pstyle(i+"text-margin-y").pfValue,v=r.isEdge(),y=r.pstyle(i+"text-rotation"),w=r.pstyle("text-outline-width").pfValue,k=r.pstyle("text-border-width").pfValue,E=k/2,T=r.pstyle("text-background-padding").pfValue,S=2,L=f,_=h,M=_/2,I=L/2,O,C,R,D;if(v)O=d-M,C=d+M,R=p-I,D=p+I;else{switch(l.value){case"left":O=d-_,C=d;break;case"center":O=d-M,C=d+M;break;case"right":O=d,C=d+_;break}switch(u.value){case"top":R=p-L,D=p;break;case"center":R=p-I,D=p+I;break;case"bottom":R=p,D=p+L;break}}var P=g-Math.max(w,E)-T-S,A=g+Math.max(w,E)+T+S,N=m-Math.max(w,E)-T-S,F=m+Math.max(w,E)+T+S;O+=P,C+=A,R+=N,D+=F;var B=n||"main",V=a.labelBounds,z=V[B]=V[B]||{};z.x1=O,z.y1=R,z.x2=C,z.y2=D,z.w=C-O,z.h=D-R,z.leftPad=P,z.rightPad=A,z.topPad=N,z.botPad=F;var H=v&&y.strValue==="autorotate",K=y.pfValue!=null&&y.pfValue!==0;if(H||K){var X=H?gk(a.rstyle,"labelAngle",n):y.pfValue,ne=Math.cos(X),j=Math.sin(X),ee=(O+C)/2,Q=(R+D)/2;if(!v){switch(l.value){case"left":ee=C;break;case"right":ee=O;break}switch(u.value){case"top":Q=D;break;case"bottom":Q=R;break}}var G=function(le,Se){return le=le-ee,Se=Se-Q,{x:le*ne-Se*j+ee,y:le*j+Se*ne+Q}},Z=G(O,R),te=G(O,D),oe=G(C,R),de=G(C,D);O=Math.min(Z.x,te.x,oe.x,de.x),C=Math.max(Z.x,te.x,oe.x,de.x),R=Math.min(Z.y,te.y,oe.y,de.y),D=Math.max(Z.y,te.y,oe.y,de.y)}var pe=B+"Rot",re=V[pe]=V[pe]||{};re.x1=O,re.y1=R,re.x2=C,re.y2=D,re.w=C-O,re.h=D-R,Cu(e,O,R,C,D),Cu(a.labelBounds.all,O,R,C,D)}return e}},C7t=function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value;if(n>0&&i>0){var a=r.pstyle("outline-offset").value,s=r.pstyle("shape").value,o=i+a,l=(e.w+o*2)/e.w,u=(e.h+o*2)/e.h,h=0,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+o*2.4)/e.w,f=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+o*2.4)/e.w:s==="star"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.6)/e.h,f=-o/3.8):s==="triangle"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.4)/e.h,f=-o/1.4):s==="vee"&&(l=(e.w+o*4.4)/e.w,u=(e.h+o*3.8)/e.h,f=-o*.5);var d=e.h*u-e.h,p=e.w*l-e.w;if(mM(e,[Math.ceil(d/2),Math.ceil(p/2)]),h!=0||f!==0){var g=YCt(e,h,f);MLe(e,g)}}}},_7t=function(e,r){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),s=tl(),o=e._private,l=e.isNode(),u=e.isEdge(),h,f,d,p,g,m,v=o.rstyle,y=l&&i?e.pstyle("bounds-expansion").pfValue:[0],w=function(Be){return Be.pstyle("display").value!=="none"},k=!i||w(e)&&(!u||w(e.source())&&w(e.target()));if(k){var E=0,T=0;i&&r.includeOverlays&&(E=e.pstyle("overlay-opacity").value,E!==0&&(T=e.pstyle("overlay-padding").value));var S=0,L=0;i&&r.includeUnderlays&&(S=e.pstyle("underlay-opacity").value,S!==0&&(L=e.pstyle("underlay-padding").value));var _=Math.max(T,L),M=0,I=0;if(i&&(M=e.pstyle("width").pfValue,I=M/2),l&&r.includeNodes){var O=e.position();g=O.x,m=O.y;var C=e.outerWidth(),R=C/2,D=e.outerHeight(),P=D/2;h=g-R,f=g+R,d=m-P,p=m+P,Cu(s,h,d,f,p),i&&r.includeOutlines&&C7t(s,e)}else if(u&&r.includeEdges)if(i&&!a){var A=e.pstyle("curve-style").strValue;if(h=Math.min(v.srcX,v.midX,v.tgtX),f=Math.max(v.srcX,v.midX,v.tgtX),d=Math.min(v.srcY,v.midY,v.tgtY),p=Math.max(v.srcY,v.midY,v.tgtY),h-=I,f+=I,d-=I,p+=I,Cu(s,h,d,f,p),A==="haystack"){var N=v.haystackPts;if(N&&N.length===2){if(h=N[0].x,d=N[0].y,f=N[1].x,p=N[1].y,h>f){var F=h;h=f,f=F}if(d>p){var B=d;d=p,p=B}Cu(s,h-I,d-I,f+I,p+I)}}else if(A==="bezier"||A==="unbundled-bezier"||A.endsWith("segments")||A.endsWith("taxi")){var V;switch(A){case"bezier":case"unbundled-bezier":V=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":V=v.linePts;break}if(V!=null)for(var z=0;zf){var ee=h;h=f,f=ee}if(d>p){var Q=d;d=p,p=Q}h-=I,f+=I,d-=I,p+=I,Cu(s,h,d,f,p)}if(i&&r.includeEdges&&u&&(cM(s,e,"mid-source"),cM(s,e,"mid-target"),cM(s,e,"source"),cM(s,e,"target")),i){var G=e.pstyle("ghost").value==="yes";if(G){var Z=e.pstyle("ghost-offset-x").pfValue,te=e.pstyle("ghost-offset-y").pfValue;Cu(s,s.x1+Z,s.y1+te,s.x2+Z,s.y2+te)}}var oe=o.bodyBounds=o.bodyBounds||{};n8e(oe,s),mM(oe,y),gM(oe,1),i&&(h=s.x1,f=s.x2,d=s.y1,p=s.y2,Cu(s,h-_,d-_,f+_,p+_));var de=o.overlayBounds=o.overlayBounds||{};n8e(de,s),mM(de,y),gM(de,1);var pe=o.labelBounds=o.labelBounds||{};pe.all!=null?GCt(pe.all):pe.all=tl(),i&&r.includeLabels&&(r.includeMainLabels&&Oj(s,e,null),u&&(r.includeSourceLabels&&Oj(s,e,"source"),r.includeTargetLabels&&Oj(s,e,"target")))}return s.x1=_c(s.x1),s.y1=_c(s.y1),s.x2=_c(s.x2),s.y2=_c(s.y2),s.w=_c(s.x2-s.x1),s.h=_c(s.y2-s.y1),s.w>0&&s.h>0&&k&&(mM(s,y),gM(s,1)),s},nMe=function(e){var r=0,n=function(s){return(s?1:0)<=0;o--)s(o);return this};h0.removeAllListeners=function(){return this.removeListener("*")};h0.emit=h0.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,Yn(e)||(e=[e]),H7t(this,function(a,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],i=n.length);for(var o=function(h){var f=n[h];if(f.type===s.type&&(!f.namespace||f.namespace===s.namespace||f.namespace===V7t)&&a.eventMatches(a.context,f,s)){var d=[s];e!=null&&xCt(d,e),a.beforeEmit(a.context,f,s),f.conf&&f.conf.one&&(a.listeners=a.listeners.filter(function(m){return m!==f}));var p=a.callbackContext(a.context,f,s),g=f.callback.apply(p,d);a.afterEmit(a.context,f,s),g===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,a.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,n=e._private.data.id,i=r.map,a=i.get(n);if(!a)return this;var s=a.index;return this.unmergeAt(s),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&nr(e)){var n=e;e=r.mutableElements().filter(n)}for(var i=0;i=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],i=this,a=0;an&&(n=l,i=o)}return{value:n,ele:i}},min:function(e,r){for(var n=1/0,i,a=this,s=0;s=0&&a"u"?"undefined":Da(Symbol))!=e&&Da(Symbol.iterator)!=e;r&&(MM[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,s=this.length;return lLe({next:function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return a??(r?i.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},style:function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(en(e)){var s=e;a.applyBypass(this,s,i),this.emitAndNotify("style")}else if(nr(e))if(r===void 0){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}else a.applyBypass(this,e,r,i),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?a.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style(),a=this;if(e===void 0)for(var s=0;s0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});Bs.neighbourhood=Bs.neighborhood;Bs.closedNeighbourhood=Bs.closedNeighborhood;Bs.openNeighbourhood=Bs.openNeighborhood;cr(Bs,{source:Ac(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:Ac(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:N8e({attr:"source"}),targets:N8e({attr:"target"})});cr(Bs,{edgesWith:Ac(P8e(),"edgesWith"),edgesTo:Ac(P8e({thisIsSrc:!0}),"edgesTo")});cr(Bs,{connectedEdges:Ac(function(t){for(var e=[],r=this,n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});Bs.componentsOf=Bs.components;bs=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){ji("A collection must have a reference to the core");return}var a=new qh,s=!1;if(!r)r=[];else if(r.length>0&&en(r[0])&&!Fk(r[0])){s=!0;for(var o=[],l=new c2,u=0,h=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),i=n._private,a=[],s=[],o,l=0,u=r.length;l0){for(var B=o.length===r.length?r:new bs(n,o),V=0;V0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],i={},a=r._private.cy;function s(D){for(var P=D._private.edges,A=0;A0&&(t?O.emitAndNotify("remove"):e&&O.emit("remove"));for(var C=0;Ch&&Math.abs(g.v)>h;);return d?function(m){return l[m*(l.length-1)|0]}:u}}(),ii=function(e,r,n,i){var a=J7t(e,r,n,i);return function(s,o,l){return s+(o-s)*a(l)}},bM={linear:function(e,r,n){return e+(r-e)*n},ease:ii(.25,.1,.25,1),"ease-in":ii(.42,0,1,1),"ease-out":ii(0,0,.58,1),"ease-in-out":ii(.42,0,.58,1),"ease-in-sine":ii(.47,0,.745,.715),"ease-out-sine":ii(.39,.575,.565,1),"ease-in-out-sine":ii(.445,.05,.55,.95),"ease-in-quad":ii(.55,.085,.68,.53),"ease-out-quad":ii(.25,.46,.45,.94),"ease-in-out-quad":ii(.455,.03,.515,.955),"ease-in-cubic":ii(.55,.055,.675,.19),"ease-out-cubic":ii(.215,.61,.355,1),"ease-in-out-cubic":ii(.645,.045,.355,1),"ease-in-quart":ii(.895,.03,.685,.22),"ease-out-quart":ii(.165,.84,.44,1),"ease-in-out-quart":ii(.77,0,.175,1),"ease-in-quint":ii(.755,.05,.855,.06),"ease-out-quint":ii(.23,1,.32,1),"ease-in-out-quint":ii(.86,0,.07,1),"ease-in-expo":ii(.95,.05,.795,.035),"ease-out-expo":ii(.19,1,.22,1),"ease-in-out-expo":ii(1,0,0,1),"ease-in-circ":ii(.6,.04,.98,.335),"ease-out-circ":ii(.075,.82,.165,1),"ease-in-out-circ":ii(.785,.135,.15,.86),spring:function(e,r,n){if(n===0)return bM.linear;var i=e8t(e,r,n);return function(a,s,o){return a+(s-a)*i(o)}},"cubic-bezier":ii};n8t={animate:En.animate(),animation:En.animation(),animated:En.animated(),clearQueue:En.clearQueue(),delay:En.delay(),delayAnimation:En.delayAnimation(),stop:En.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&SM(function(a){$8e(a,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(a,s){$8e(s,e)},n.beforeRenderPriorities.animations):r()}},i8t={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&Fk(n.target)&&i.matches(n.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e}},fM=function(e){return nr(e)?new c0(e):e},pMe={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new WM(i8t,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,fM(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,fM(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,fM(r),n),this},once:function(e,r,n){return this.emitter().one(e,fM(r),n),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};En.eventAliasesOn(pMe);qj={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};qj.jpeg=qj.jpg;xM={layout:function(e){var r=this;if(e==null){ji("Layout options must be specified to make a layout");return}if(e.name==null){ji("A `name` must be specified to make a layout");return}var n=e.name,i=r.extension("layout",n);if(i==null){ji("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;nr(e.eles)?a=r.$(e.eles):a=e.eles!=null?e.eles:r.$();var s=new i(cr({},e,{cy:r,eles:a}));return s}};xM.createLayout=xM.makeLayout=xM.layout;a8t={notify:function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&i.merge(r);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?r.notify(n):r.notify(n,i)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),i=0;i0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Wj.invalidateDimensions=Wj.resize;wM={collection:function(e,r){return nr(e)?this.$(e):Ol(e)?e.collection():Yn(e)?(r||(r={}),new bs(this,e,r.unique,r.removed)):new bs(this)},nodes:function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};wM.elements=wM.filter=wM.$;$s={},Tk="t",o8t="f";$s.apply=function(t){for(var e=this,r=e._private,n=r.cy,i=n.collection(),a=0;a0;if(d||f&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var m=0;m1&&(E=1),o.color){var S=n.valueMin[0],L=n.valueMax[0],_=n.valueMin[1],M=n.valueMax[1],I=n.valueMin[2],O=n.valueMax[2],C=n.valueMin[3]==null?1:n.valueMin[3],R=n.valueMax[3]==null?1:n.valueMax[3],D=[Math.round(S+(L-S)*E),Math.round(_+(M-_)*E),Math.round(I+(O-I)*E),Math.round(C+(R-C)*E)];a={bypass:n.bypass,name:n.name,value:D,strValue:"rgb("+D[0]+", "+D[1]+", "+D[2]+")"}}else if(o.number){var P=n.valueMin+(n.valueMax-n.valueMin)*E;a=this.parse(n.name,P,n.bypass,d)}else return!1;if(!a)return m(),!1;a.mapping=n,n=a;break}case s.data:{for(var A=n.field.split("."),N=f.data,F=0;F0&&a>0){for(var o={},l=!1,u=0;u0?t.delayAnimation(s).play().promise().then(k):k()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)};$s.checkTrigger=function(t,e,r,n,i,a){var s=this.properties[e],o=i(s);o!=null&&o(r,n)&&a(s)};$s.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",t)})};$s.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBounds},function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),i.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||n==="bezier")&&t.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()}),i.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||n==="none")&&t.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};$s.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)};Vk={};Vk.applyBypass=function(t,e,r,n){var i=this,a=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;oi.length?n=n.substr(i.length):n=""}function l(){a.length>s.length?a=a.substr(s.length):a=""}for(;;){var u=n.match(/^\s*$/);if(u)break;var h=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!h){Sn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=h[0];var f=h[1];if(f!=="core"){var d=new c0(f);if(d.invalid){Sn("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var p=h[2],g=!1;a=p;for(var m=[];;){var v=a.match(/^\s*$/);if(v)break;var y=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!y){Sn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),g=!0;break}s=y[0];var w=y[1],k=y[2],E=e.properties[w];if(!E){Sn("Skipping property: Invalid property name in: "+s),l();continue}var T=r.parse(w,k);if(!T){Sn("Skipping property: Invalid property definition in: "+s),l();continue}m.push({name:w,val:k}),l()}if(g){o();break}r.selector(f);for(var S=0;S=7&&e[0]==="d"&&(h=new RegExp(o.data.regex).exec(e))){if(r)return!1;var d=o.data;return{name:t,value:h,strValue:""+e,mapped:d,field:h[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var p=o.mapData;if(!(u.color||u.number))return!1;var g=this.parse(t,f[4]);if(!g||g.mapped)return!1;var m=this.parse(t,f[5]);if(!m||m.mapped)return!1;if(g.pfValue===m.pfValue||g.strValue===m.strValue)return Sn("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(u.color){var v=g.value,y=m.value,w=v[0]===y[0]&&v[1]===y[1]&&v[2]===y[2]&&(v[3]===y[3]||(v[3]==null||v[3]===1)&&(y[3]==null||y[3]===1));if(w)return!1}return{name:t,value:f,strValue:""+e,mapped:p,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:g.value,valueMax:m.value,bypass:r}}}if(u.multiple&&n!=="multiple"){var k;if(l?k=e.split(/\s+/):Yn(e)?k=e:k=[e],u.evenMultiple&&k.length%2!==0)return null;for(var E=[],T=[],S=[],L="",_=!1,M=0;M0?" ":"")+I.strValue}return u.validate&&!u.validate(E,T)?null:u.singleEnum&&_?E.length===1&&nr(E[0])?{name:t,value:E[0],strValue:E[0],bypass:r}:null:{name:t,value:E,pfValue:S,strValue:L,bypass:r,units:T}}var O=function(){for(var G=0;Gu.max||u.strictMax&&e===u.max))return null;var A={name:t,value:e,strValue:""+e+(C||""),units:C,bypass:r};return u.unitless||C!=="px"&&C!=="em"?A.pfValue=e:A.pfValue=C==="px"||!C?e:this.getEmSizeInPixels()*e,(C==="ms"||C==="s")&&(A.pfValue=C==="ms"?e:1e3*e),(C==="deg"||C==="rad")&&(A.pfValue=C==="rad"?e:UCt(e)),C==="%"&&(A.pfValue=e/100),A}else if(u.propList){var N=[],F=""+e;if(F!=="none"){for(var B=F.split(/\s*,\s*|\s+/),V=0;V0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){l=Math.min((s-2*r)/n.w,(o-2*r)/n.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=n.minZoom&&(n.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,n=r.pan,i=r.zoom,a,s,o=!1;if(r.zoomingEnabled||(o=!0),Ct(e)?s=e:en(e)&&(s=e.level,e.position!=null?a=zM(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,a.push("zoom"))}if(i&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;Ct(u.x)&&(r.pan.x=u.x,o=!1),Ct(u.y)&&(r.pan.y=u.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(nr(e)){var n=e;e=this.mutableElements().filter(n)}else Ol(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(a-r*(i.x1+i.x2))/2,y:(s-r*(i.y1+i.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var i=n.window().getComputedStyle(r),a=function(o){return parseFloat(i.getPropertyValue(o))};return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};r1.centre=r1.center;r1.autolockNodes=r1.autolock;r1.autoungrabifyNodes=r1.autoungrabify;Ik={data:En.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:En.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:En.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:En.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Ik.attr=Ik.data;Ik.removeAttr=Ik.removeData;Nk=function(e){var r=this;e=cr({},e);var n=e.container;n&&!EM(n)&&EM(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=r;var s=La!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=cr({name:s?"grid":"null"},o.layout),o.renderer=cr({name:s?"canvas":"null"},o.renderer);var l=function(g,m,v){return m!==void 0?m:v!==void 0?v:g},u=this._private={container:n,ready:!1,options:o,elements:new bs(this),listeners:[],aniEles:new bs(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:Ct(o.zoom)?o.zoom:1,pan:{x:en(o.pan)&&Ct(o.pan.x)?o.pan.x:0,y:en(o.pan)&&Ct(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var h=function(g,m){var v=g.some(fSt);if(v)return u2.all(g).then(m);m(g)};u.styleEnabled&&r.setStyle([]);var f=cr({},o,o.renderer);r.initRenderer(f);var d=function(g,m,v){r.notifications(!1);var y=r.mutableElements();y.length>0&&y.remove(),g!=null&&(en(g)||Yn(g))&&r.add(g),r.one("layoutready",function(k){r.notifications(!0),r.emit(k),r.one("load",m),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",v),r.emit("done")});var w=cr({},r._private.options.layout);w.eles=r.elements(),r.layout(w).run()};h([o.style,o.elements],function(p){var g=p[0],m=p[1];u.styleEnabled&&r.style().append(g),d(m,function(){r.startAnimationLoop(),u.ready=!0,zi(o.ready)&&r.on("ready",o.ready);for(var v=0;v0,l=tl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),u;if(Ol(e.roots))u=e.roots;else if(Yn(e.roots)){for(var h=[],f=0;f0;){var P=D(),A=I(P,C);if(A)P.outgoers().filter(function(pe){return pe.isNode()&&n.has(pe)}).forEach(R);else if(A===null){Sn("Detected double maximal shift for node `"+P.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}M();var N=0;if(e.avoidOverlap)for(var F=0;F0&&y[0].length<=3?Qe/2:0),He=2*Math.PI/y[le].length*Se;return le===0&&y[0].length===1&&(ze=1),{x:te.x+ze*Math.cos(He),y:te.y+ze*Math.sin(He)}}else{var et={x:te.x+(Se+1-(Ye+1)/2)*We,y:(le+1)*Ze};return et}};return n.nodes().layoutPositions(this,e,de),this};f8t={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};mMe.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var s=tl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,u=l/Math.max(1,a.length-1),h,f=0,d=0;d1&&e.avoidOverlap){f*=1.75;var y=Math.cos(u)-Math.cos(0),w=Math.sin(u)-Math.sin(0),k=Math.sqrt(f*f/(y*y+w*w));h=Math.max(k,h)}var E=function(S,L){var _=e.startAngle+L*u*(i?1:-1),M=h*Math.cos(_),I=h*Math.sin(_),O={x:o.x+M,y:o.y+I};return O};return n.nodes().layoutPositions(this,e,E),this};d8t={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};vMe.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(":parent"),s=tl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,h=0;h0){var T=Math.abs(w[0].value-E.value);T>=v&&(w=[],y.push(w))}w.push(E)}var S=u+e.minNodeSpacing;if(!e.avoidOverlap){var L=y.length>0&&y[0].length>1,_=Math.min(s.w,s.h)/2-S,M=_/(y.length+L?1:0);S=Math.min(S,M)}for(var I=0,O=0;O1&&e.avoidOverlap){var P=Math.cos(D)-Math.cos(0),A=Math.sin(D)-Math.sin(0),N=Math.sqrt(S*S/(P*P+A*A));I=Math.max(N,I)}C.r=I,I+=S}if(e.equidistant){for(var F=0,B=0,V=0;V=t.numIter||(w8t(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature=t.animationThreshold&&a(),SM(f)}};h()}else{for(;u;)u=s(l),l++;H8e(n,t),o()}return this};KM.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};KM.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};g8t=function(e,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),s=tl(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=n.eles.components(),u={},h=0;h0){o.graphSet.push(_);for(var h=0;h<_.length;h++)y[++k]=_[h]}}for(var h=0;hi.count?0:i.graph},v8t=function t(e,r,n,i){var a=i.graphSet[n];if(-10)var f=i.nodeOverlap*h,d=Math.sqrt(o*o+l*l),p=f*o/d,g=f*l/d;else var m=OM(e,o,l),v=OM(r,-1*o,-1*l),y=v.x-m.x,w=v.y-m.y,k=y*y+w*w,d=Math.sqrt(k),f=(e.nodeRepulsion+r.nodeRepulsion)/k,p=f*y/d,g=f*w/d;e.isLocked||(e.offsetX-=p,e.offsetY-=g),r.isLocked||(r.offsetX+=p,r.offsetY+=g)}},E8t=function(e,r,n,i){if(n>0)var a=e.maxX-r.minX;else var a=r.maxX-e.minX;if(i>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return a>=0&&s>=0?Math.sqrt(a*a+s*s):0},OM=function(e,r,n){var i=e.positionX,a=e.positionY,s=e.height||1,o=e.width||1,l=n/r,u=s/o,h={};return r===0&&0n?(h.x=i,h.y=a+s/2,h):0r&&-1*u<=l&&l<=u?(h.x=i-o/2,h.y=a-o*n/2/r,h):0=u)?(h.x=i+s*r/2/n,h.y=a+s/2,h):(0>n&&(l<=-1*u||l>=u)&&(h.x=i-s*r/2/n,h.y=a-s/2),h)},S8t=function(e,r){for(var n=0;nn){var v=r.gravity*p/m,y=r.gravity*g/m;d.offsetX+=v,d.offsetY+=y}}}}},_8t=function(e,r){var n=[],i=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;i<=a;){var s=n[i++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0n)var a={x:n*e/i,y:n*r/i};else var a={x:e,y:r};return a},M8t=function t(e,r){var n=e.parentId;if(n!=null){var i=r.layoutNodes[r.idToIndex[n]],a=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(i.minX==null||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTopy&&(g+=v+r.componentSpacing,p=0,m=0,v=0)}}},D8t={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};bMe.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=tl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,e,function(K){return{x:a.x1,y:a.y1}});else{var s=i.size(),o=Math.sqrt(s*a.h/a.w),l=Math.round(o),u=Math.round(a.w/a.h*o),h=function(X){if(X==null)return Math.min(l,u);var ne=Math.min(l,u);ne==l?l=X:u=X},f=function(X){if(X==null)return Math.max(l,u);var ne=Math.max(l,u);ne==l?l=X:u=X},d=e.rows,p=e.cols!=null?e.cols:e.columns;if(d!=null&&p!=null)l=d,u=p;else if(d!=null&&p==null)l=d,u=Math.ceil(s/l);else if(d==null&&p!=null)u=p,l=Math.ceil(s/u);else if(u*l>s){var g=h(),m=f();(g-1)*m>=s?h(g-1):(m-1)*g>=s&&f(m-1)}else for(;u*l=s?f(y+1):h(v+1)}var w=a.w/u,k=a.h/l;if(e.condense&&(w=0,k=0),e.avoidOverlap)for(var E=0;E=u&&(P=0,D++)},N={},F=0;F(P=t_t(t,e,A[N],A[N+1],A[N+2],A[N+3])))return v(L,P),!0}else if(M.edgeType==="bezier"||M.edgeType==="multibezier"||M.edgeType==="self"||M.edgeType==="compound"){for(var A=M.allpts,N=0;N+5(P=e_t(t,e,A[N],A[N+1],A[N+2],A[N+3],A[N+4],A[N+5])))return v(L,P),!0}for(var F=F||_.source,B=B||_.target,V=i.getArrowWidth(I,O),z=[{name:"source",x:M.arrowStartX,y:M.arrowStartY,angle:M.srcArrowAngle},{name:"target",x:M.arrowEndX,y:M.arrowEndY,angle:M.tgtArrowAngle},{name:"mid-source",x:M.midX,y:M.midY,angle:M.midsrcArrowAngle},{name:"mid-target",x:M.midX,y:M.midY,angle:M.midtgtArrowAngle}],N=0;N0&&(y(F),y(B))}function k(L,_,M){return _u(L,_,M)}function E(L,_){var M=L._private,I=d,O;_?O=_+"-":O="",L.boundingBox();var C=M.labelBounds[_||"main"],R=L.pstyle(O+"label").value,D=L.pstyle("text-events").strValue==="yes";if(!(!D||!R)){var P=k(M.rscratch,"labelX",_),A=k(M.rscratch,"labelY",_),N=k(M.rscratch,"labelAngle",_),F=L.pstyle(O+"text-margin-x").pfValue,B=L.pstyle(O+"text-margin-y").pfValue,V=C.x1-I-F,z=C.x2+I-F,H=C.y1-I-B,K=C.y2+I-B;if(N){var X=Math.cos(N),ne=Math.sin(N),j=function(de,pe){return de=de-P,pe=pe-A,{x:de*X-pe*ne+P,y:de*ne+pe*X+A}},ee=j(V,H),Q=j(V,K),G=j(z,H),Z=j(z,K),te=[ee.x+F,ee.y+B,G.x+F,G.y+B,Z.x+F,Z.y+B,Q.x+F,Q.y+B];if(el(t,e,te))return v(L),!0}else if(s2(C,t,e))return v(L),!0}}for(var T=s.length-1;T>=0;T--){var S=s[T];S.isNode()?y(S)||E(S):w(S)||E(S)||E(S,"source")||E(S,"target")}return o};i1.getAllInBox=function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=[],s=Math.min(t,r),o=Math.max(t,r),l=Math.min(e,n),u=Math.max(e,n);t=s,r=o,e=l,n=u;for(var h=tl({x1:t,y1:e,x2:r,y2:n}),f=0;f0?-(Math.PI-e.ang):Math.PI+e.ang},F8t=function(e,r,n,i,a){if(e!==j8e?X8e(r,e,Uh):P8t(Cc,Uh),X8e(r,n,Cc),G8e=Uh.nx*Cc.ny-Uh.ny*Cc.nx,Y8e=Uh.nx*Cc.nx-Uh.ny*-Cc.ny,yd=Math.asin(Math.max(-1,Math.min(1,G8e))),Math.abs(yd)<1e-6){Gj=r.x,Yj=r.y,jm=Zb=0;return}Xm=1,kM=!1,Y8e<0?yd<0?yd=Math.PI+yd:(yd=Math.PI-yd,Xm=-1,kM=!0):yd>0&&(Xm=-1,kM=!0),r.radius!==void 0?Zb=r.radius:Zb=i,qm=yd/2,dM=Math.min(Uh.len/2,Cc.len/2),a?(Vh=Math.abs(Math.cos(qm)*Zb/Math.sin(qm)),Vh>dM?(Vh=dM,jm=Math.abs(Vh*Math.sin(qm)/Math.cos(qm))):jm=Zb):(Vh=Math.min(dM,Zb),jm=Math.abs(Vh*Math.sin(qm)/Math.cos(qm))),jj=r.x+Cc.nx*Vh,Xj=r.y+Cc.ny*Vh,Gj=jj-Cc.ny*jm*Xm,Yj=Xj+Cc.nx*jm*Xm,TMe=r.x+Uh.nx*Vh,EMe=r.y+Uh.ny*Vh,j8e=r};Vs={};Vs.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(T,S,L,_){var M=_-S,I=L-T,O=Math.sqrt(I*I+M*M);return{x:-M/O,y:I/O}},h=t.pstyle("edge-distances").value;switch(h){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(l){var f=this.manualEndptToPx(t.source()[0],s),d=Su(f,2),p=d[0],g=d[1],m=this.manualEndptToPx(t.target()[0],o),v=Su(m,2),y=v[0],w=v[1],k={x1:p,y1:g,x2:y,y2:w};i=u(p,g,y,w),a=k}else Sn("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};Vs.findHaystackPoints=function(t){for(var e=0;e0?Math.max(J-fe,0):Math.min(J+fe,0)},R=C(I,_),D=C(O,M),P=!1;w===u?y=Math.abs(R)>Math.abs(D)?i:n:w===l||w===o?(y=n,P=!0):(w===a||w===s)&&(y=i,P=!0);var A=y===n,N=A?D:R,F=A?O:I,B=LLe(F),V=!1;!(P&&(E||S))&&(w===o&&F<0||w===l&&F>0||w===a&&F>0||w===s&&F<0)&&(B*=-1,N=B*Math.abs(N),V=!0);var z;if(E){var H=T<0?1+T:T;z=H*N}else{var K=T<0?N:0;z=K+T*B}var X=function(J){return Math.abs(J)=Math.abs(N)},ne=X(z),j=X(Math.abs(N)-Math.abs(z)),ee=ne||j;if(ee&&!V)if(A){var Q=Math.abs(F)<=d/2,G=Math.abs(I)<=p/2;if(Q){var Z=(h.x1+h.x2)/2,te=h.y1,oe=h.y2;r.segpts=[Z,te,Z,oe]}else if(G){var de=(h.y1+h.y2)/2,pe=h.x1,re=h.x2;r.segpts=[pe,de,re,de]}else r.segpts=[h.x1,h.y2]}else{var Be=Math.abs(F)<=f/2,le=Math.abs(O)<=g/2;if(Be){var Se=(h.y1+h.y2)/2,Ye=h.x1,We=h.x2;r.segpts=[Ye,Se,We,Se]}else if(le){var Ze=(h.x1+h.x2)/2,Qe=h.y1,et=h.y2;r.segpts=[Ze,Qe,Ze,et]}else r.segpts=[h.x2,h.y1]}else if(A){var ze=h.y1+z+(v?d/2*B:0),He=h.x1,Ee=h.x2;r.segpts=[He,ze,Ee,ze]}else{var Y=h.x1+z+(v?f/2*B:0),ve=h.y1,ce=h.y2;r.segpts=[Y,ve,Y,ce]}if(r.isRound){var me=t.pstyle("taxi-radius").value,q=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(me),r.isArcRadius=new Array(r.segpts.length/2).fill(q)}};Vs.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,h=e.tgtShape,f=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,g=e.tgtRs,m=!Ct(r.startX)||!Ct(r.startY),v=!Ct(r.arrowStartX)||!Ct(r.arrowStartY),y=!Ct(r.endX)||!Ct(r.endY),w=!Ct(r.arrowEndX)||!Ct(r.arrowEndY),k=3,E=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,T=k*E,S=Jm({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),L=SD.poolIndex()){var P=R;R=D,D=P}var A=M.srcPos=R.position(),N=M.tgtPos=D.position(),F=M.srcW=R.outerWidth(),B=M.srcH=R.outerHeight(),V=M.tgtW=D.outerWidth(),z=M.tgtH=D.outerHeight(),H=M.srcShape=r.nodeShapes[e.getNodeShape(R)],K=M.tgtShape=r.nodeShapes[e.getNodeShape(D)],X=M.srcCornerRadius=R.pstyle("corner-radius").value==="auto"?"auto":R.pstyle("corner-radius").pfValue,ne=M.tgtCornerRadius=D.pstyle("corner-radius").value==="auto"?"auto":D.pstyle("corner-radius").pfValue,j=M.tgtRs=D._private.rscratch,ee=M.srcRs=R._private.rscratch;M.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var Q=0;Q0){var oe=a,de=Gm(oe,Jb(r)),pe=Gm(oe,Jb(te)),re=de;if(pe2){var Be=Gm(oe,{x:te[2],y:te[3]});Be0){var ce=s,me=Gm(ce,Jb(r)),q=Gm(ce,Jb(ve)),Le=me;if(q2){var J=Gm(ce,{x:ve[2],y:ve[3]});J=g||L){v={cp:E,segment:S};break}}if(v)break}var _=v.cp,M=v.segment,I=(g-y)/M.length,O=M.t1-M.t0,C=p?M.t0+O*I:M.t1-O*I;C=Lk(0,C,1),e=t2(_.p0,_.p1,_.p2,C),d=z8t(_.p0,_.p1,_.p2,C);break}case"straight":case"segments":case"haystack":{for(var R=0,D,P,A,N,F=n.allpts.length,B=0;B+3=g));B+=2);var V=g-P,z=V/D;z=Lk(0,z,1),e=qCt(A,N,z),d=AMe(A,N);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,d)}};u("source"),u("target"),this.applyLabelDimensions(t)}};Gh.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};Gh.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,n),a=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,o=_u(r.rscratch,"labelWrapCachedLines",e)||[],l=s!=="wrap"?1:Math.max(o.length,1),u=i.height/l,h=u*a,f=i.width,d=i.height+(l-1)*(a-1)*u;n0(r.rstyle,"labelWidth",e,f),n0(r.rscratch,"labelWidth",e,f),n0(r.rstyle,"labelHeight",e,d),n0(r.rscratch,"labelHeight",e,d),n0(r.rscratch,"labelLineHeight",e,h)};Gh.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,s=function(K,X){return X?(n0(r.rscratch,K,e,X),X):_u(r.rscratch,K,e)};if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="\u200B",h=i.split(` `),f=t.pstyle("text-max-width").pfValue,d=t.pstyle("text-overflow-wrap").value,p=d==="anywhere",g=[],m=/[\s\u200b]+|$/g,v=0;vf){var T=y.matchAll(m),S="",L=0,_=uLe(T),M;try{for(_.s();!(M=_.n()).done;){var I=M.value,O=I[0],C=y.substring(L,I.index);L=I.index+O.length;var R=S.length===0?C:S+C+O,D=this.calculateLabelDimensions(t,R),P=D.width;P<=f?S+=C+O:(S&&g.push(S),S=C+O)}}catch(H){_.e(H)}finally{_.f()}S.match(/^[\s\u200b]+$/)||g.push(S)}else g.push(y)}s("labelWrapCachedLines",g),i=s("labelWrapCachedText",g.join(` `)),s("labelWrapKey",l)}else if(o==="ellipsis"){var A=t.pstyle("text-max-width").pfValue,N="",F="\u2026",B=!1;if(this.calculateLabelDimensions(t,i).widthA)break;N+=i[V],V===i.length-1&&(B=!0)}return B||(N+=F),N}return i};Gh.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Gh.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),i=n.document,a=Qm(e,t._private.labelDimsKey),s=r.labelDimCache||(r.labelDimCache=[]),o=s[a];if(o!=null)return o;var l=0,u=t.pstyle("font-style").strValue,h=t.pstyle("font-size").pfValue,f=t.pstyle("font-family").strValue,d=t.pstyle("font-weight").strValue,p=this.labelCalcCanvas,g=this.labelCalcCanvasContext;if(!p){p=this.labelCalcCanvas=i.createElement("canvas"),g=this.labelCalcCanvasContext=p.getContext("2d");var m=p.style;m.position="absolute",m.left="-9999px",m.top="-9999px",m.zIndex="-1",m.visibility="hidden",m.pointerEvents="none"}g.font="".concat(u," ").concat(d," ").concat(h,"px ").concat(f);for(var v=0,y=0,w=e.split(` `),k=0;k1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=t.desktopTapThreshold2}var Ne=a(Y);mt&&(t.hoverData.tapholdCancelled=!0);var Ge=function(){var qt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];qt.length===0?(qt.push(Re[0]),qt.push(Re[1])):(qt[0]+=Re[0],qt[1]+=Re[1])};ce=!0,i(Fe,["mousemove","vmousemove","tapdrag"],Y,{x:J[0],y:J[1]});var st=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||me.emit({originalEvent:Y,type:"boxstart",position:{x:J[0],y:J[1]}}),Ie[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(mt){var ot={originalEvent:Y,type:"cxtdrag",position:{x:J[0],y:J[1]}};qe?qe.emit(ot):me.emit(ot),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||Fe!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:Y,type:"cxtdragout",position:{x:J[0],y:J[1]}}),t.hoverData.cxtOver=Fe,Fe&&Fe.emit({originalEvent:Y,type:"cxtdragover",position:{x:J[0],y:J[1]}}))}}else if(t.hoverData.dragging){if(ce=!0,me.panningEnabled()&&me.userPanningEnabled()){var at;if(t.hoverData.justStartedPan){var Ue=t.hoverData.mdownPos;at={x:(J[0]-Ue[0])*q,y:(J[1]-Ue[1])*q},t.hoverData.justStartedPan=!1}else at={x:Re[0]*q,y:Re[1]*q};me.panBy(at),me.emit("dragpan"),t.hoverData.dragged=!0}J=t.projectIntoViewport(Y.clientX,Y.clientY)}else if(Ie[4]==1&&(qe==null||qe.pannable())){if(mt){if(!t.hoverData.dragging&&me.boxSelectionEnabled()&&(Ne||!me.panningEnabled()||!me.userPanningEnabled()))st();else if(!t.hoverData.selecting&&me.panningEnabled()&&me.userPanningEnabled()){var it=s(qe,t.hoverData.downs);it&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Ie[4]=0,t.data.bgActivePosistion=Jb(fe),t.redrawHint("select",!0),t.redraw())}qe&&qe.pannable()&&qe.active()&&qe.unactivate()}}else{if(qe&&qe.pannable()&&qe.active()&&qe.unactivate(),(!qe||!qe.grabbed())&&Fe!=ye&&(ye&&i(ye,["mouseout","tapdragout"],Y,{x:J[0],y:J[1]}),Fe&&i(Fe,["mouseover","tapdragover"],Y,{x:J[0],y:J[1]}),t.hoverData.last=Fe),qe)if(mt){if(me.boxSelectionEnabled()&&Ne)qe&&qe.grabbed()&&(y(nt),qe.emit("freeon"),nt.emit("free"),t.dragData.didDrag&&(qe.emit("dragfreeon"),nt.emit("dragfree"))),st();else if(qe&&qe.grabbed()&&t.nodeIsDraggable(qe)){var pt=!t.dragData.didDrag;pt&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||m(nt,{inDragLayer:!0});var yt={x:0,y:0};if(Ct(Re[0])&&Ct(Re[1])&&(yt.x+=Re[0],yt.y+=Re[1],pt)){var Et=t.hoverData.dragDelta;Et&&Ct(Et[0])&&Ct(Et[1])&&(yt.x+=Et[0],yt.y+=Et[1])}t.hoverData.draggingEles=!0,nt.silentShift(yt).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else Ge();ce=!0}if(Ie[2]=J[0],Ie[3]=J[1],ce)return Y.stopPropagation&&Y.stopPropagation(),Y.preventDefault&&Y.preventDefault(),!1}},!1);var C,R,D;t.registerBinding(e,"mouseup",function(Y){if(!(t.hoverData.which===1&&Y.which!==1&&t.hoverData.capture)){var ve=t.hoverData.capture;if(ve){t.hoverData.capture=!1;var ce=t.cy,me=t.projectIntoViewport(Y.clientX,Y.clientY),q=t.selection,Le=t.findNearestElement(me[0],me[1],!0,!1),J=t.dragData.possibleDragElements,fe=t.hoverData.down,xe=a(Y);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,fe&&fe.unactivate(),t.hoverData.which===3){var Ie={originalEvent:Y,type:"cxttapend",position:{x:me[0],y:me[1]}};if(fe?fe.emit(Ie):ce.emit(Ie),!t.hoverData.cxtDragged){var Fe={originalEvent:Y,type:"cxttap",position:{x:me[0],y:me[1]}};fe?fe.emit(Fe):ce.emit(Fe)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(i(Le,["mouseup","tapend","vmouseup"],Y,{x:me[0],y:me[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(i(fe,["click","tap","vclick"],Y,{x:me[0],y:me[1]}),R=!1,Y.timeStamp-D<=ce.multiClickDebounceTime()?(C&&clearTimeout(C),R=!0,D=null,i(fe,["dblclick","dbltap","vdblclick"],Y,{x:me[0],y:me[1]})):(C=setTimeout(function(){R||i(fe,["oneclick","onetap","voneclick"],Y,{x:me[0],y:me[1]})},ce.multiClickDebounceTime()),D=Y.timeStamp)),fe==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(Y)&&(ce.$(r).unselect(["tapunselect"]),J.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=J=ce.collection()),Le==fe&&!t.dragData.didDrag&&!t.hoverData.selecting&&Le!=null&&Le._private.selectable&&(t.hoverData.dragging||(ce.selectionType()==="additive"||xe?Le.selected()?Le.unselect(["tapunselect"]):Le.select(["tapselect"]):xe||(ce.$(r).unmerge(Le).unselect(["tapunselect"]),Le.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var ye=ce.collection(t.getAllInBox(q[0],q[1],q[2],q[3]));t.redrawHint("select",!0),ye.length>0&&t.redrawHint("eles",!0),ce.emit({type:"boxend",originalEvent:Y,position:{x:me[0],y:me[1]}});var qe=function(mt){return mt.selectable()&&!mt.selected()};ce.selectionType()==="additive"||xe||ce.$(r).unmerge(ye).unselect(),ye.emit("box").stdFilter(qe).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!q[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var Re=fe&&fe.grabbed();y(J),Re&&(fe.emit("freeon"),J.emit("free"),t.dragData.didDrag&&(fe.emit("dragfreeon"),J.emit("dragfree")))}}q[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var P=function(Y){if(!t.scrollingPage){var ve=t.cy,ce=ve.zoom(),me=ve.pan(),q=t.projectIntoViewport(Y.clientX,Y.clientY),Le=[q[0]*ce+me.x,q[1]*ce+me.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||M()){Y.preventDefault();return}if(ve.panningEnabled()&&ve.userPanningEnabled()&&ve.zoomingEnabled()&&ve.userZoomingEnabled()){Y.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var J;Y.deltaY!=null?J=Y.deltaY/-250:Y.wheelDeltaY!=null?J=Y.wheelDeltaY/1e3:J=Y.wheelDelta/1e3,J=J*t.wheelSensitivity;var fe=Y.deltaMode===1;fe&&(J*=33);var xe=ve.zoom()*Math.pow(10,J);Y.type==="gesturechange"&&(xe=t.gestureStartZoom*Y.scale),ve.zoom({level:xe,renderedPosition:{x:Le[0],y:Le[1]}}),ve.emit(Y.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",P,!0),t.registerBinding(e,"scroll",function(Y){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(Y){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||Y.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(Ee){t.hasTouchStarted||P(Ee)},!0),t.registerBinding(t.container,"mouseout",function(Y){var ve=t.projectIntoViewport(Y.clientX,Y.clientY);t.cy.emit({originalEvent:Y,type:"mouseout",position:{x:ve[0],y:ve[1]}})},!1),t.registerBinding(t.container,"mouseover",function(Y){var ve=t.projectIntoViewport(Y.clientX,Y.clientY);t.cy.emit({originalEvent:Y,type:"mouseover",position:{x:ve[0],y:ve[1]}})},!1);var A,N,F,B,V,z,H,K,X,ne,j,ee,Q,G=function(Y,ve,ce,me){return Math.sqrt((ce-Y)*(ce-Y)+(me-ve)*(me-ve))},Z=function(Y,ve,ce,me){return(ce-Y)*(ce-Y)+(me-ve)*(me-ve)},te;t.registerBinding(t.container,"touchstart",te=function(Y){if(t.hasTouchStarted=!0,!!I(Y)){k(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var ve=t.cy,ce=t.touchData.now,me=t.touchData.earlier;if(Y.touches[0]){var q=t.projectIntoViewport(Y.touches[0].clientX,Y.touches[0].clientY);ce[0]=q[0],ce[1]=q[1]}if(Y.touches[1]){var q=t.projectIntoViewport(Y.touches[1].clientX,Y.touches[1].clientY);ce[2]=q[0],ce[3]=q[1]}if(Y.touches[2]){var q=t.projectIntoViewport(Y.touches[2].clientX,Y.touches[2].clientY);ce[4]=q[0],ce[5]=q[1]}if(Y.touches[1]){t.touchData.singleTouchMoved=!0,y(t.dragData.touchDragEles);var Le=t.findContainerClientCoords();X=Le[0],ne=Le[1],j=Le[2],ee=Le[3],A=Y.touches[0].clientX-X,N=Y.touches[0].clientY-ne,F=Y.touches[1].clientX-X,B=Y.touches[1].clientY-ne,Q=0<=A&&A<=j&&0<=F&&F<=j&&0<=N&&N<=ee&&0<=B&&B<=ee;var J=ve.pan(),fe=ve.zoom();V=G(A,N,F,B),z=Z(A,N,F,B),H=[(A+F)/2,(N+B)/2],K=[(H[0]-J.x)/fe,(H[1]-J.y)/fe];var xe=200,Ie=xe*xe;if(z=1){for(var ue=t.touchData.startPosition=[null,null,null,null,null,null],ae=0;ae=t.touchTapThreshold2}if(ve&&t.touchData.cxt){Y.preventDefault();var ue=Y.touches[0].clientX-X,ae=Y.touches[0].clientY-ne,ke=Y.touches[1].clientX-X,we=Y.touches[1].clientY-ne,Ne=Z(ue,ae,ke,we),Ge=Ne/z,st=150,ot=st*st,at=1.5,Ue=at*at;if(Ge>=Ue||Ne>=ot){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var it={originalEvent:Y,type:"cxttapend",position:{x:q[0],y:q[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(it),t.touchData.start=null):me.emit(it)}}if(ve&&t.touchData.cxt){var it={originalEvent:Y,type:"cxtdrag",position:{x:q[0],y:q[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(it):me.emit(it),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var pt=t.findNearestElement(q[0],q[1],!0,!0);(!t.touchData.cxtOver||pt!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:Y,type:"cxtdragout",position:{x:q[0],y:q[1]}}),t.touchData.cxtOver=pt,pt&&pt.emit({originalEvent:Y,type:"cxtdragover",position:{x:q[0],y:q[1]}}))}else if(ve&&Y.touches[2]&&me.boxSelectionEnabled())Y.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||me.emit({originalEvent:Y,type:"boxstart",position:{x:q[0],y:q[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,ce[4]=1,!ce||ce.length===0||ce[0]===void 0?(ce[0]=(q[0]+q[2]+q[4])/3,ce[1]=(q[1]+q[3]+q[5])/3,ce[2]=(q[0]+q[2]+q[4])/3+1,ce[3]=(q[1]+q[3]+q[5])/3+1):(ce[2]=(q[0]+q[2]+q[4])/3,ce[3]=(q[1]+q[3]+q[5])/3),t.redrawHint("select",!0),t.redraw();else if(ve&&Y.touches[1]&&!t.touchData.didSelect&&me.zoomingEnabled()&&me.panningEnabled()&&me.userZoomingEnabled()&&me.userPanningEnabled()){Y.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var yt=t.dragData.touchDragEles;if(yt){t.redrawHint("drag",!0);for(var Et=0;Et0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var de;t.registerBinding(e,"touchcancel",de=function(Y){var ve=t.touchData.start;t.touchData.capture=!1,ve&&ve.unactivate()});var pe,re,Be,le;if(t.registerBinding(e,"touchend",pe=function(Y){var ve=t.touchData.start,ce=t.touchData.capture;if(ce)Y.touches.length===0&&(t.touchData.capture=!1),Y.preventDefault();else return;var me=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var q=t.cy,Le=q.zoom(),J=t.touchData.now,fe=t.touchData.earlier;if(Y.touches[0]){var xe=t.projectIntoViewport(Y.touches[0].clientX,Y.touches[0].clientY);J[0]=xe[0],J[1]=xe[1]}if(Y.touches[1]){var xe=t.projectIntoViewport(Y.touches[1].clientX,Y.touches[1].clientY);J[2]=xe[0],J[3]=xe[1]}if(Y.touches[2]){var xe=t.projectIntoViewport(Y.touches[2].clientX,Y.touches[2].clientY);J[4]=xe[0],J[5]=xe[1]}ve&&ve.unactivate();var Ie;if(t.touchData.cxt){if(Ie={originalEvent:Y,type:"cxttapend",position:{x:J[0],y:J[1]}},ve?ve.emit(Ie):q.emit(Ie),!t.touchData.cxtDragged){var Fe={originalEvent:Y,type:"cxttap",position:{x:J[0],y:J[1]}};ve?ve.emit(Fe):q.emit(Fe)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!Y.touches[2]&&q.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var ye=q.collection(t.getAllInBox(me[0],me[1],me[2],me[3]));me[0]=void 0,me[1]=void 0,me[2]=void 0,me[3]=void 0,me[4]=0,t.redrawHint("select",!0),q.emit({type:"boxend",originalEvent:Y,position:{x:J[0],y:J[1]}});var qe=function(ot){return ot.selectable()&&!ot.selected()};ye.emit("box").stdFilter(qe).select().emit("boxselect"),ye.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(ve?.unactivate(),Y.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!Y.touches[1]){if(!Y.touches[0]){if(!Y.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Re=t.dragData.touchDragEles;if(ve!=null){var nt=ve._private.grabbed;y(Re),t.redrawHint("drag",!0),t.redrawHint("eles",!0),nt&&(ve.emit("freeon"),Re.emit("free"),t.dragData.didDrag&&(ve.emit("dragfreeon"),Re.emit("dragfree"))),i(ve,["touchend","tapend","vmouseup","tapdragout"],Y,{x:J[0],y:J[1]}),ve.unactivate(),t.touchData.start=null}else{var mt=t.findNearestElement(J[0],J[1],!0,!0);i(mt,["touchend","tapend","vmouseup","tapdragout"],Y,{x:J[0],y:J[1]})}var Tt=t.touchData.startPosition[0]-J[0],ue=Tt*Tt,ae=t.touchData.startPosition[1]-J[1],ke=ae*ae,we=ue+ke,Ne=we*Le*Le;t.touchData.singleTouchMoved||(ve||q.$(":selected").unselect(["tapunselect"]),i(ve,["tap","vclick"],Y,{x:J[0],y:J[1]}),re=!1,Y.timeStamp-le<=q.multiClickDebounceTime()?(Be&&clearTimeout(Be),re=!0,le=null,i(ve,["dbltap","vdblclick"],Y,{x:J[0],y:J[1]})):(Be=setTimeout(function(){re||i(ve,["onetap","voneclick"],Y,{x:J[0],y:J[1]})},q.multiClickDebounceTime()),le=Y.timeStamp)),ve!=null&&!t.dragData.didDrag&&ve._private.selectable&&Ne"u"){var Se=[],Ye=function(Y){return{clientX:Y.clientX,clientY:Y.clientY,force:1,identifier:Y.pointerId,pageX:Y.pageX,pageY:Y.pageY,radiusX:Y.width/2,radiusY:Y.height/2,screenX:Y.screenX,screenY:Y.screenY,target:Y.target}},We=function(Y){return{event:Y,touch:Ye(Y)}},Ze=function(Y){Se.push(We(Y))},Qe=function(Y){for(var ve=0;ve0)return H[0]}return null},g=Object.keys(d),m=0;m0?p:OLe(a,s,e,r,n,i,o,l)},checkPoint:function(e,r,n,i,a,s,o,l){l=l==="auto"?e1(i,a):l;var u=2*l;if(xd(e,r,this.points,s,o,i,a-u,[0,-1],n)||xd(e,r,this.points,s,o,i-u,a,[0,-1],n))return!0;var h=i/2+2*n,f=a/2+2*n,d=[s-h,o-f,s-h,o,s+h,o,s+h,o-f];return!!(el(e,r,d)||Km(e,r,u,u,s+i/2-l,o+a/2-l,n)||Km(e,r,u,u,s-i/2+l,o+a/2-l,n))}}};kd.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",mo(3,0)),this.generateRoundPolygon("round-triangle",mo(3,0)),this.generatePolygon("rectangle",mo(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",mo(5,0)),this.generateRoundPolygon("round-pentagon",mo(5,0)),this.generatePolygon("hexagon",mo(6,0)),this.generateRoundPolygon("round-hexagon",mo(6,0)),this.generatePolygon("heptagon",mo(7,0)),this.generateRoundPolygon("round-heptagon",mo(7,0)),this.generatePolygon("octagon",mo(8,0)),this.generateRoundPolygon("round-octagon",mo(8,0));var n=new Array(20);{var i=Bj(5,0),a=Bj(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*E)break}else if(u){if(w>=e.deqCost*p||w>=e.deqAvgCost*d)break}else if(k>=e.deqNoDrawCost*Nj)break;var T=e.deq(n,v,m);if(T.length>0)for(var S=0;S0&&(e.onDeqd(n,g),!u&&e.shouldRedraw(n,g,v,m)&&a())},o=e.priority||aX;i.beforeRender(s,o(n))}}}},V8t=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:CM;eX(this,t),this.idsByKey=new qh,this.keyForId=new qh,this.cachesByLvl=new qh,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return tX(t,[{key:"getIdsFor",value:function(r){r==null&&ji("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new c2,n.set(r,i)),i}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new qh,n.set(r,a),i.push(r)),a}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a}},{key:"getForCachedKey",value:function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var i=this.getKey(r);return this.hasCache(i,n)}},{key:"setCache",value:function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i)}},{key:"set",value:function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var i=this.getKey(r);this.deleteCache(i,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i)})}},{key:"invalidate",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0}}]),t}(),J8e=25,pM=50,TM=-4,Kj=3,U8t=7.99,H8t=8,q8t=1024,W8t=1024,G8t=1024,Y8t=.2,j8t=.8,X8t=10,K8t=.15,Z8t=.1,Q8t=.9,J8t=.9,eLt=100,tLt=1,e2={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},rLt=xs({getKey:null,doesEleInvalidateKey:CM,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ELe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),kk=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var i=rLt(r);cr(n,i),n.lookup=new V8t(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},Oa=kk.prototype;Oa.reasons=e2;Oa.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Oa.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};Oa.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new zk(function(r,n){return n.reqs-r.reqs});return e};Oa.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Oa.getElement=function(t,e,r,n,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(oX(o*r))),n=U8t||n>Kj)return null;var u=Math.pow(2,n),h=e.h*u,f=e.w*u,d=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,d))return null;var p=l.get(t,n);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var g;if(h<=J8e?g=J8e:h<=pM?g=pM:g=Math.ceil(h/pM)*pM,h>G8t||f>W8t)return null;var m=a.getTextureQueue(g),v=m[m.length-2],y=function(){return a.recycleTexture(g,f)||a.addTexture(g,f)};v||(v=m[m.length-1]),v||(v=y()),v.width-v.usedWidthn;O--)M=a.getElement(t,e,r,O,e2.downscale);I()}else return a.queueElement(t,S.level-1),S;else{var C;if(!k&&!E&&!T)for(var R=n-1;R>=TM;R--){var D=l.get(t,R);if(D){C=D;break}}if(w(C))return a.queueElement(t,n),C;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,t,e,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return p={x:v.usedWidth,texture:v,level:n,scale:u,width:f,height:h,scaledLabelShown:d},v.usedWidth+=Math.ceil(f+H8t),v.eleCaches.push(p),l.set(t,n,p),a.checkTextureFullness(v),p};Oa.invalidateElements=function(t){for(var e=0;e=Y8t*t.width&&this.retireTexture(t)};Oa.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>j8t&&t.fullnessChecks>=X8t?l0(r,t):t.fullnessChecks++};Oa.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),i=this.lookup;l0(n,t),t.retired=!0;for(var a=t.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,sX(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),l0(i,s),n.push(s),s}};Oa.queueElement=function(t,e){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(t),s=i[a];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,n.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:a};n.push(o),i[a]=o}};Oa.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],h=a.hasCache(u,o.level);if(n[l]=null,h)continue;i.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,t,o.level,e2.dequeue)}return i};Oa.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=iX,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(t))};Oa.onDequeue=function(t){this.onDequeues.push(t)};Oa.offDequeue=function(t){l0(this.onDequeues,t)};Oa.setupDequeueing=RMe.setupDequeueing({deqRedrawThreshold:eLt,deqCost:K8t,deqAvgCost:Z8t,deqNoDrawCost:Q8t,deqFastCost:J8t,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n=iLt||r>IM)return null}n.validateLayersElesOrdering(r,t);var l=n.layersByLevel,u=Math.pow(2,r),h=l[r]=l[r]||[],f,d=n.levelIsComplete(r,t),p,g=function(){var I=function(P){if(n.validateLayersElesOrdering(P,t),n.levelIsComplete(P,t))return p=l[P],!0},O=function(P){if(!p)for(var A=r+P;Ek<=A&&A<=IM&&!I(A);A+=P);};O(1),O(-1);for(var C=h.length-1;C>=0;C--){var R=h[C];R.invalid&&l0(h,R)}};if(!d)g();else return h;var m=function(){if(!f){f=tl();for(var I=0;ItLe||R>tLe)return null;var D=C*R;if(D>fLt)return null;var P=n.makeLayer(f,r);if(O!=null){var A=h.indexOf(O)+1;h.splice(A,0,P)}else(I.insert===void 0||I.insert)&&h.unshift(P);return P};if(n.skipping&&!o)return null;for(var y=null,w=t.length/nLt,k=!o,E=0;E=w||!DLe(y.bb,T.boundingBox()))&&(y=v({insert:!0,after:y}),!y))return null;p||k?n.queueLayer(y,T):n.drawEleInLayer(y,T,r,e),y.eles.push(T),L[r]=y}return p||(k?null:h)};ws.getEleLevelForLayerLevel=function(t,e){return t};ws.drawEleInLayer=function(t,e,r,n){var i=this,a=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(s,!1),a.drawCachedElement(s,e,null,null,r,dLt),a.setImgSmoothing(s,!0))};ws.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var i=0,a=0;a0||s.invalid)return!1;i+=s.eles.length}return i===e.length};ws.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){e=!0;break}}return e};ws.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=bd(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(n,i,a){e.invalidateLayer(n)}))};ws.invalidateLayer=function(t){if(this.lastInvalidationTime=bd(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];l0(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(a&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=a?e.pstyle("opacity").value:1,h=a?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,m=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,y=u*h,w=u*h,k=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;f==="straight-triangle"?(s.eleStrokeStyle(t,e,P),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=p,t.lineCap=g,s.eleStrokeStyle(t,e,P),s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},E=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;if(t.lineWidth=p+m,t.lineCap=g,m>0)s.colorStrokeStyle(t,v[0],v[1],v[2],P);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},T=function(){i&&s.drawEdgeOverlay(t,e)},S=function(){i&&s.drawEdgeUnderlay(t,e)},L=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w;s.drawArrowheads(t,e,P)},_=function(){s.drawElementText(t,e,null,n)};t.lineJoin="round";var M=e.pstyle("ghost").value==="yes";if(M){var I=e.pstyle("ghost-offset-x").pfValue,O=e.pstyle("ghost-offset-y").pfValue,C=e.pstyle("ghost-opacity").value,R=y*C;t.translate(I,O),k(R),L(R),t.translate(-I,-O)}else E();S(),k(),L(),T(),_(),r&&t.translate(l.x1,l.y1)}};PMe=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(i!==0){var a=this,s=a.usePaths(),o=n._private.rscratch,l=n.pstyle("".concat(e,"-padding")).pfValue,u=2*l,h=n.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,h[0],h[1],h[2],i),a.drawEdgePath(n,r,o.allpts,"solid")}}}};Td.drawEdgeOverlay=PMe("overlay");Td.drawEdgeUnderlay=PMe("underlay");Td.drawEdgePath=function(t,e,r,n){var i=t._private.rscratch,a=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),d=i.pathCacheKey&&i.pathCacheKey===f;d?(s=e=i.pathCache,o=!0):(s=e=new Path2D,i.pathCacheKey=f,i.pathCache=s)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=h;break;case"solid":a.setLineDash([]);break}if(!o&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(a&&!s.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,h=e.pstyle("label"),f=e.pstyle("source-label"),d=e.pstyle("target-label");if(u||(!h||!h.value)&&(!f||!f.value)&&(!d||!d.value))return;t.textAlign="center",t.textBaseline="bottom"}var p=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),i==null?(s.drawText(t,e,null,p,a),e.isEdge()&&(s.drawText(t,e,"source",p,a),s.drawText(t,e,"target",p,a))):s.drawText(t,e,i,p,a),r&&t.translate(g.x1,g.y1)};a1.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)};a1.getTextAngle=function(t,e){var r,n=t._private,i=n.rscratch,a=e?e+"-":"",s=t.pstyle(a+"text-rotation"),o=_u(i,"labelAngle",e);return s.strValue==="autorotate"?r=t.isEdge()?o:0:s.strValue==="none"?r=0:r=s.pfValue,r};a1.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,s=a.rscratch,o=i?e.effectiveOpacity():1;if(!(i&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=_u(s,"labelX",r),u=_u(s,"labelY",r),h,f,d=this.getLabelText(e,r);if(d!=null&&d!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,i);var p=r?r+"-":"",g=_u(s,"labelWidth",r),m=_u(s,"labelHeight",r),v=e.pstyle(p+"text-margin-x").pfValue,y=e.pstyle(p+"text-margin-y").pfValue,w=e.isEdge(),k=e.pstyle("text-halign").value,E=e.pstyle("text-valign").value;w&&(k="center",E="center"),l+=v,u+=y;var T;switch(n?T=this.getTextAngle(e,r):T=0,T!==0&&(h=l,f=u,t.translate(h,f),t.rotate(T),l=0,u=0),E){case"top":break;case"center":u+=m/2;break;case"bottom":u+=m;break}var S=e.pstyle("text-background-opacity").value,L=e.pstyle("text-border-opacity").value,_=e.pstyle("text-border-width").pfValue,M=e.pstyle("text-background-padding").pfValue,I=e.pstyle("text-background-shape").strValue,O=I.indexOf("round")===0,C=2;if(S>0||_>0&&L>0){var R=l-M;switch(k){case"left":R-=g;break;case"center":R-=g/2;break}var D=u-m-M,P=g+2*M,A=m+2*M;if(S>0){var N=t.fillStyle,F=e.pstyle("text-background-color").value;t.fillStyle="rgba("+F[0]+","+F[1]+","+F[2]+","+S*o+")",O?Fj(t,R,D,P,A,C):t.fillRect(R,D,P,A),t.fillStyle=N}if(_>0&&L>0){var B=t.strokeStyle,V=t.lineWidth,z=e.pstyle("text-border-color").value,H=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+z[0]+","+z[1]+","+z[2]+","+L*o+")",t.lineWidth=_,t.setLineDash)switch(H){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=_/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(O?Fj(t,R,D,P,A,C,"stroke"):t.strokeRect(R,D,P,A),H==="double"){var K=_/2;O?Fj(t,R+K,D+K,P-K*2,A-K*2,C,"stroke"):t.strokeRect(R+K,D+K,P-K*2,A-K*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=V,t.strokeStyle=B}}var X=2*e.pstyle("text-outline-width").pfValue;if(X>0&&(t.lineWidth=X),e.pstyle("text-wrap").value==="wrap"){var ne=_u(s,"labelWrapCachedLines",r),j=_u(s,"labelLineHeight",r),ee=g/2,Q=this.getLabelJustification(e);switch(Q==="auto"||(k==="left"?Q==="left"?l+=-g:Q==="center"&&(l+=-ee):k==="center"?Q==="left"?l+=-ee:Q==="right"&&(l+=ee):k==="right"&&(Q==="center"?l+=ee:Q==="right"&&(l+=g))),E){case"top":u-=(ne.length-1)*j;break;case"center":case"bottom":u-=(ne.length-1)*j;break}for(var G=0;G0&&t.strokeText(ne[G],l,u),t.fillText(ne[G],l,u),u+=j}else X>0&&t.strokeText(d,l,u),t.fillText(d,l,u);T!==0&&(t.rotate(-T),t.translate(-h,-f))}}};y2={};y2.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,h=u.rscratch,f=e.position();if(!(!Ct(f.x)||!Ct(f.y))&&!(a&&!e.visible())){var d=a?e.effectiveOpacity():1,p=s.usePaths(),g,m=!1,v=e.padding();o=e.width()+2*v,l=e.height()+2*v;var y;r&&(y=r,t.translate(-y.x1,-y.y1));for(var w=e.pstyle("background-image"),k=w.value,E=new Array(k.length),T=new Array(k.length),S=0,L=0;L0&&arguments[0]!==void 0?arguments[0]:R;s.eleFillStyle(t,e,me)},G=function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z;s.colorStrokeStyle(t,D[0],D[1],D[2],me)},Z=function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ne;s.colorStrokeStyle(t,K[0],K[1],K[2],me)},te=function(me,q,Le,J){var fe=s.nodePathCache=s.nodePathCache||[],xe=TLe(Le==="polygon"?Le+","+J.join(","):Le,""+q,""+me,""+ee),Ie=fe[xe],Fe,ye=!1;return Ie!=null?(Fe=Ie,ye=!0,h.pathCache=Fe):(Fe=new Path2D,fe[xe]=h.pathCache=Fe),{path:Fe,cacheHit:ye}},oe=e.pstyle("shape").strValue,de=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(f.x,f.y);var pe=te(o,l,oe,de);g=pe.path,m=pe.cacheHit}var re=function(){if(!m){var me=f;p&&(me={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(g||t,me.x,me.y,o,l,ee,h)}p?t.fill(g):t.fill()},Be=function(){for(var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Le=u.backgrounding,J=0,fe=0;fe0&&arguments[0]!==void 0?arguments[0]:!1,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasPie(e)&&(s.drawPie(t,e,q),me&&(p||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,ee,h)))},Se=function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,q=(O>0?O:-O)*me,Le=O>0?0:255;O!==0&&(s.colorFillStyle(t,Le,Le,Le,q),p?t.fill(g):t.fill())},Ye=function(){if(C>0){if(t.lineWidth=C,t.lineCap=N,t.lineJoin=A,t.setLineDash)switch(P){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(B),t.lineDashOffset=V;break;case"solid":case"double":t.setLineDash([]);break}if(F!=="center"){if(t.save(),t.lineWidth*=2,F==="inside")p?t.clip(g):t.clip();else{var me=new Path2D;me.rect(-o/2-C,-l/2-C,o+2*C,l+2*C),me.addPath(g),t.clip(me,"evenodd")}p?t.stroke(g):t.stroke(),t.restore()}else p?t.stroke(g):t.stroke();if(P==="double"){t.lineWidth=C/3;var q=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(g):t.stroke(),t.globalCompositeOperation=q}t.setLineDash&&t.setLineDash([])}},We=function(){if(H>0){if(t.lineWidth=H,t.lineCap="butt",t.setLineDash)switch(X){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var me=f;p&&(me={x:0,y:0});var q=s.getNodeShape(e),Le=C;F==="inside"&&(Le=0),F==="outside"&&(Le*=2);var J=(o+Le+(H+j))/o,fe=(l+Le+(H+j))/l,xe=o*J,Ie=l*fe,Fe=s.nodeShapes[q].points,ye;if(p){var qe=te(xe,Ie,q,Fe);ye=qe.path}if(q==="ellipse")s.drawEllipsePath(ye||t,me.x,me.y,xe,Ie);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(q)){var Re=0,nt=0,mt=0;q==="round-diamond"?Re=(Le+j+H)*1.4:q==="round-heptagon"?(Re=(Le+j+H)*1.075,mt=-(Le/2+j+H)/35):q==="round-hexagon"?Re=(Le+j+H)*1.12:q==="round-pentagon"?(Re=(Le+j+H)*1.13,mt=-(Le/2+j+H)/15):q==="round-tag"?(Re=(Le+j+H)*1.12,nt=(Le/2+H+j)*.07):q==="round-triangle"&&(Re=(Le+j+H)*(Math.PI/2),mt=-(Le+j/2+H)/Math.PI),Re!==0&&(J=(o+Re)/o,xe=o*J,["round-hexagon","round-tag"].includes(q)||(fe=(l+Re)/l,Ie=l*fe)),ee=ee==="auto"?ILe(xe,Ie):ee;for(var Tt=xe/2,ue=Ie/2,ae=ee+(Le+H+j)/2,ke=new Array(Fe.length/2),we=new Array(Fe.length/2),Ne=0;Ne0){if(i=i||n.position(),a==null||s==null){var p=n.padding();a=n.width()+2*p,s=n.height()+2*p}o.colorFillStyle(r,h[0],h[1],h[2],u),o.nodeShapes[f].draw(r,i.x,i.y,a+l*2,s+l*2,d),r.fill()}}}};y2.drawNodeOverlay=FMe("overlay");y2.drawNodeUnderlay=FMe("underlay");y2.hasPie=function(t){return t=t[0],t._private.hasPie};y2.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),s=n.x,o=n.y,l=e.width(),u=e.height(),h=Math.min(l,u)/2,f=0,d=this.usePaths();d&&(s=0,o=0),a.units==="%"?h=h*a.pfValue:a.pfValue!==void 0&&(h=a.pfValue/2);for(var p=1;p<=i.pieBackgroundN;p++){var g=e.pstyle("pie-"+p+"-background-size").value,m=e.pstyle("pie-"+p+"-background-color").value,v=e.pstyle("pie-"+p+"-background-opacity").value*r,y=g/100;y+f>1&&(y=1-f);var w=1.5*Math.PI+2*Math.PI*f,k=2*Math.PI*y,E=w+k;g===0||f>=1||f+y>1||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,h,w,E),t.closePath(),this.colorFillStyle(t,m[0],m[1],m[2],v),t.fill(),f+=y)}};Rl={},ELt=100;Rl.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};Rl.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;is.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!f&&(h[s.NODE]=!0,h[s.SELECT_BOX]=!0);var w=l.style(),k=l.zoom(),E=i!==void 0?i:k,T=l.pan(),S={x:T.x,y:T.y},L={zoom:k,pan:{x:T.x,y:T.y}},_=s.prevViewport,M=_===void 0||L.zoom!==_.zoom||L.pan.x!==_.pan.x||L.pan.y!==_.pan.y;!M&&!(m&&!g)&&(s.motionBlurPxRatio=1),a&&(S=a),E*=o,S.x*=o,S.y*=o;var I=s.getCachedZSortedEles();function O(pe,re,Be,le,Se){var Ye=pe.globalCompositeOperation;pe.globalCompositeOperation="destination-out",s.colorFillStyle(pe,255,255,255,s.motionBlurTransparency),pe.fillRect(re,Be,le,Se),pe.globalCompositeOperation=Ye}function C(pe,re){var Be,le,Se,Ye;!s.clearingMotionBlur&&(pe===u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]||pe===u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG])?(Be={x:T.x*p,y:T.y*p},le=k*p,Se=s.canvasWidth*p,Ye=s.canvasHeight*p):(Be=S,le=E,Se=s.canvasWidth,Ye=s.canvasHeight),pe.setTransform(1,0,0,1,0,0),re==="motionBlur"?O(pe,0,0,Se,Ye):!e&&(re===void 0||re)&&pe.clearRect(0,0,Se,Ye),r||(pe.translate(Be.x,Be.y),pe.scale(le,le)),a&&pe.translate(a.x,a.y),i&&pe.scale(i,i)}if(f||(s.textureDrawLastFrame=!1),f){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=l.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var R=s.data.bufferContexts[s.TEXTURE_BUFFER];R.setTransform(1,0,0,1,0,0),R.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:R,drawOnlyNodeLayer:!0,forcedPxRatio:o*s.textureMult});var L=s.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:s.canvasWidth,height:s.canvasHeight};L.mpan={x:(0-L.pan.x)/L.zoom,y:(0-L.pan.y)/L.zoom}}h[s.DRAG]=!1,h[s.NODE]=!1;var D=u.contexts[s.NODE],P=s.textureCache.texture,L=s.textureCache.viewport;D.setTransform(1,0,0,1,0,0),d?O(D,0,0,L.width,L.height):D.clearRect(0,0,L.width,L.height);var A=w.core("outside-texture-bg-color").value,N=w.core("outside-texture-bg-opacity").value;s.colorFillStyle(D,A[0],A[1],A[2],N),D.fillRect(0,0,L.width,L.height);var k=l.zoom();C(D,!1),D.clearRect(L.mpan.x,L.mpan.y,L.width/L.zoom/o,L.height/L.zoom/o),D.drawImage(P,L.mpan.x,L.mpan.y,L.width/L.zoom/o,L.height/L.zoom/o)}else s.textureOnViewport&&!e&&(s.textureCache=null);var F=l.extent(),B=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),V=s.hideEdgesOnViewport&&B,z=[];if(z[s.NODE]=!h[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,z[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),z[s.DRAG]=!h[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,z[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),h[s.NODE]||r||n||z[s.NODE]){var H=d&&!z[s.NODE]&&p!==1,D=e||(H?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),K=d&&!H?"motionBlur":void 0;C(D,K),V?s.drawCachedNodes(D,I.nondrag,o,F):s.drawLayeredElements(D,I.nondrag,o,F),s.debug&&s.drawDebugPoints(D,I.nondrag),!r&&!d&&(h[s.NODE]=!1)}if(!n&&(h[s.DRAG]||r||z[s.DRAG])){var H=d&&!z[s.DRAG]&&p!==1,D=e||(H?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]);C(D,d&&!H?"motionBlur":void 0),V?s.drawCachedNodes(D,I.drag,o,F):s.drawCachedElements(D,I.drag,o,F),s.debug&&s.drawDebugPoints(D,I.drag),!r&&!d&&(h[s.DRAG]=!1)}if(s.showFps||!n&&h[s.SELECT_BOX]&&!r){var D=e||u.contexts[s.SELECT_BOX];if(C(D),s.selection[4]==1&&(s.hoverData.selecting||s.touchData.selecting)){var k=s.cy.zoom(),X=w.core("selection-box-border-width").value/k;D.lineWidth=X,D.fillStyle="rgba("+w.core("selection-box-color").value[0]+","+w.core("selection-box-color").value[1]+","+w.core("selection-box-color").value[2]+","+w.core("selection-box-opacity").value+")",D.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),X>0&&(D.strokeStyle="rgba("+w.core("selection-box-border-color").value[0]+","+w.core("selection-box-border-color").value[1]+","+w.core("selection-box-border-color").value[2]+","+w.core("selection-box-opacity").value+")",D.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(u.bgActivePosistion&&!s.hoverData.selecting){var k=s.cy.zoom(),ne=u.bgActivePosistion;D.fillStyle="rgba("+w.core("active-bg-color").value[0]+","+w.core("active-bg-color").value[1]+","+w.core("active-bg-color").value[2]+","+w.core("active-bg-opacity").value+")",D.beginPath(),D.arc(ne.x,ne.y,w.core("active-bg-size").pfValue/k,0,2*Math.PI),D.fill()}var j=s.lastRedrawTime;if(s.showFps&&j){j=Math.round(j);var ee=Math.round(1e3/j);D.setTransform(1,0,0,1,0,0),D.fillStyle="rgba(255, 0, 0, 0.75)",D.strokeStyle="rgba(255, 0, 0, 0.75)",D.lineWidth=1,D.fillText("1 frame = "+j+" ms = "+ee+" fps",0,20);var Q=60;D.strokeRect(0,30,250,20),D.fillRect(0,30,250*Math.min(ee/Q,1),20)}r||(h[s.SELECT_BOX]=!1)}if(d&&p!==1){var G=u.contexts[s.NODE],Z=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],te=u.contexts[s.DRAG],oe=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],de=function(re,Be,le){re.setTransform(1,0,0,1,0,0),le||!y?re.clearRect(0,0,s.canvasWidth,s.canvasHeight):O(re,0,0,s.canvasWidth,s.canvasHeight);var Se=p;re.drawImage(Be,0,0,s.canvasWidth*Se,s.canvasHeight*Se,0,0,s.canvasWidth,s.canvasHeight)};(h[s.NODE]||z[s.NODE])&&(de(G,Z,z[s.NODE]),h[s.NODE]=!1),(h[s.DRAG]||z[s.DRAG])&&(de(te,oe,z[s.DRAG]),h[s.DRAG]=!1)}s.prevViewport=L,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),d&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!f,s.mbFrames=0,h[s.NODE]=!0,h[s.DRAG]=!0,s.redraw()},ELt)),e||l.emit("render")};d0={};d0.drawPolygonPath=function(t,e,r,n,i,a){var s=n/2,o=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],r+o*a[1]);for(var l=1;l0&&s>0){p.clearRect(0,0,a,s),p.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(t.full)p.translate(-n.x1*u,-n.y1*u),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(n.x1*u,n.y1*u);else{var m=e.pan(),v={x:m.x*u,y:m.y*u};u*=e.zoom(),p.translate(v.x,v.y),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(-v.x,-v.y)}t.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=t.bg,p.rect(0,0,a,s),p.fill())}return d};qk.png=function(t){return zMe(t,this.bufferCanvasImage(t),"image/png")};qk.jpg=function(t){return zMe(t,this.bufferCanvasImage(t),"image/jpeg")};$Me={};$Me.nodeShapeImpl=function(t,e,r,n,i,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,o);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}};CLt=VMe,cn=VMe.prototype;cn.CANVAS_LAYERS=3;cn.SELECT_BOX=0;cn.DRAG=1;cn.NODE=2;cn.BUFFER_COUNT=3;cn.TEXTURE_BUFFER=0;cn.MOTIONBLUR_BUFFER_NODE=1;cn.MOTIONBLUR_BUFFER_DRAG=2;cn.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[cn.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[cn.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[cn.SELECT_BOX]=e;break}};_Lt=typeof Path2D<"u";cn.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};cn.usePaths=function(){return _Lt&&this.pathsEnabled};cn.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};cn.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};cn.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":Da(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),i=n.document;r=i.createElement("canvas"),r.width=t,r.height=e}return r};[NMe,Yh,Td,TX,a1,y2,Rl,d0,qk,$Me].forEach(function(t){cr(cn,t)});ALt=[{name:"null",impl:kMe},{name:"base",impl:OMe},{name:"canvas",impl:CLt}],LLt=[{type:"layout",extensions:N8t},{type:"renderer",extensions:ALt}],UMe={},HMe={};Jj=function(){if(arguments.length===2)return WMe.apply(null,arguments);if(arguments.length===3)return qMe.apply(null,arguments);if(arguments.length===4)return DLt.apply(null,arguments);if(arguments.length===5)return MLt.apply(null,arguments);ji("Invalid extension access syntax")};Nk.prototype.extension=Jj;LLt.forEach(function(t){t.extensions.forEach(function(e){qMe(t.type,e.name,e.impl)})});GMe=function t(){if(!(this instanceof t))return new t;this.length=0},n1=GMe.prototype;n1.instanceString=function(){return"stylesheet"};n1.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};n1.css=function(t,e){var r=this.length-1;if(nr(t))this[r].properties.push({name:t,value:e});else if(en(t))for(var n=t,i=Object.keys(n),a=0;a{b();(function(e,r){typeof Wk=="object"&&typeof SX=="object"?SX.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Wk=="object"?Wk.layoutBase=r():e.layoutBase=r()})(Wk,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=26)}([function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(4);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>p&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-p)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-p),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,v){if(m==null&&v==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var w=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(m.owner==v.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=v.owner?null:(w.source=m,w.target=v,w.isInterGraph=!1,this.getEdges().push(w),m.edges.push(w),v!=m&&v.edges.push(w),w)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=m.edges.slice(),y,w=v.length,k=0;k-1&&S>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(T,1),y.target!=y.source&&y.target.edges.splice(S,1);var E=y.source.owner.getEdges().indexOf(y);if(E==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(E,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,v,y,w,k=this.getNodes(),E=k.length,T=0;Tv&&(g=v),m>y&&(m=y)}return g==i.MAX_VALUE?null:(k[0].getParent().paddingLeft!=null?w=k[0].getParent().paddingLeft:w=this.margin,this.left=m-w,this.top=g-w,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,v=-i.MAX_VALUE,y=i.MAX_VALUE,w=-i.MAX_VALUE,k,E,T,S,L,_=this.nodes,M=_.length,I=0;Ik&&(m=k),vT&&(y=T),wk&&(m=k),vT&&(y=T),w=this.nodes.length){var M=0;v.forEach(function(I){I.owner==g&&M++}),M==this.nodes.length&&(this.isConnected=!0)}},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(5),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=_,!1;if(uh)return o[0]=d,o[1]=u,o[2]=S,o[3]=f,!1;if(lh?(o[0]=m,o[1]=v,C=!0):(o[0]=g,o[1]=p,C=!0):D===A&&(l>h?(o[0]=d,o[1]=p,C=!0):(o[0]=y,o[1]=v,C=!0)),-P===A?h>l?(o[2]=L,o[3]=_,R=!0):(o[2]=S,o[3]=T,R=!0):P===A&&(h>l?(o[2]=E,o[3]=T,R=!0):(o[2]=M,o[3]=_,R=!0)),C&&R)return!1;if(l>h?u>f?(N=this.getCardinalDirection(D,A,4),F=this.getCardinalDirection(P,A,2)):(N=this.getCardinalDirection(-D,A,3),F=this.getCardinalDirection(-P,A,1)):u>f?(N=this.getCardinalDirection(-D,A,1),F=this.getCardinalDirection(-P,A,3)):(N=this.getCardinalDirection(D,A,2),F=this.getCardinalDirection(P,A,4)),!C)switch(N){case 1:V=p,B=l+-k/A,o[0]=B,o[1]=V;break;case 2:B=y,V=u+w*A,o[0]=B,o[1]=V;break;case 3:V=v,B=l+k/A,o[0]=B,o[1]=V;break;case 4:B=m,V=u+-w*A,o[0]=B,o[1]=V;break}if(!R)switch(F){case 1:H=T,z=h+-O/A,o[2]=z,o[3]=H;break;case 2:z=M,H=f+I*A,o[2]=z,o[3]=H;break;case 3:H=_,z=h+O/A,o[2]=z,o[3]=H;break;case 4:z=L,H=f+-I*A,o[2]=z,o[3]=H;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,v=l.y,y=void 0,w=void 0,k=void 0,E=void 0,T=void 0,S=void 0,L=void 0,_=void 0,M=void 0;return k=d-h,T=u-f,L=f*h-u*d,E=v-g,S=p-m,_=m*g-p*v,M=k*S-E*T,M===0?null:(y=(T*_-S*L)/M,w=(E*L-k*_)/M,new n(y,w))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i},function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(k.push(T[0]);k.length>0&&g;){var S=k[0];k.splice(0,1),w.add(S);for(var L=S.getEdges(),y=0;y-1&&T.splice(O,1)}w=new Set,E=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,v=this.graphManager.calcLowestCommonAncestor(p.source,p.target),y=0;y0){for(var v=this.edgeToDummyNodes.get(m),y=0;y=0&&g.splice(_,1);var M=E.getNeighborsList();M.forEach(function(C){if(m.indexOf(C)<0){var R=v.get(C),D=R-1;D==1&&S.push(C),v.set(C,D)}})}m=m.concat(S),(g.length==1||g.length==2)&&(y=!0,w=g[0])}return w},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(4);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i},function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,v,y=this.getAllNodes(),w;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),w=new Set,p=0;pk||w>k)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*v)):(k=d.getEstimatedSize()*this.compoundGravityRangeFactor,(y>k||w>k)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=y.length||k>=y[0].length)){for(var E=0;Eu}}]),o}();t.exports=s},function(t,e,r){"use strict";var n=function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{b();(function(e,r){typeof Gk=="object"&&typeof _X=="object"?_X.exports=r(CX()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Gk=="object"?Gk.coseBase=r(CX()):e.coseBase=r(e.layoutBase)})(Gk,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=7)}([function(e,r){e.exports=t},function(e,r,n){"use strict";var i=n(0).FDLayoutConstants;function a(){}for(var s in i)a[s]=i[s];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutEdge;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraph;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraphManager;function a(o){i.call(this,o)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function s(l,u,h,f){i.call(this,l,u,h,f)}s.prototype=Object.create(i.prototype);for(var o in i)s[o]=i[o];s.prototype.move=function(){var l=this.graphManager.getLayout();this.displacementX=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),l.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(l,u){for(var h=this.getChild().getNodes(),f,d=0;d0)this.positionNodesRadially(T);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var S=new Set(this.getAllNodes()),L=this.nodesWithGravity.filter(function(_){return S.has(_)});this.graphManager.setAllNodesToApplyGravitation(L),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},k.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),S=this.nodesWithGravity.filter(function(M){return T.has(M)});this.graphManager.setAllNodesToApplyGravitation(S),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var L=!this.isTreeGrowing&&!this.isGrowthFinished,_=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(L,_),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var T=this.graphManager.getAllNodes(),S={},L=0;L1){var C;for(C=0;C_&&(_=Math.floor(O.y)),I=Math.floor(O.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(f.WORLD_CENTER_X-O.x/2,f.WORLD_CENTER_Y-O.y/2))},k.radialLayout=function(T,S,L){var _=Math.max(this.maxDiagonalInTree(T),u.DEFAULT_RADIAL_SEPARATION);k.branchRadialLayout(S,null,0,359,0,_);var M=y.calculateBounds(T),I=new w;I.setDeviceOrgX(M.getMinX()),I.setDeviceOrgY(M.getMinY()),I.setWorldOrgX(L.x),I.setWorldOrgY(L.y);for(var O=0;O1;){var K=H[0];H.splice(0,1);var X=N.indexOf(K);X>=0&&N.splice(X,1),V--,F--}S!=null?z=(N.indexOf(H[0])+1)%V:z=0;for(var ne=Math.abs(_-L)/F,j=z;B!=F;j=++j%V){var ee=N[j].getOtherEnd(T);if(ee!=S){var Q=(L+B*ne)%360,G=(Q+ne)%360;k.branchRadialLayout(ee,T,Q,G,M+I,I),B++}}},k.maxDiagonalInTree=function(T){for(var S=m.MIN_VALUE,L=0;LS&&(S=M)}return S},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var T=this,S={};this.memberGroups={},this.idToDummyNode={};for(var L=[],_=this.graphManager.getAllNodes(),M=0;M<_.length;M++){var I=_[M],O=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(O.id==null||!this.getToBeTiled(O))&&L.push(I)}for(var M=0;M"u"&&(S[C]=[]),S[C]=S[C].concat(I)}Object.keys(S).forEach(function(R){if(S[R].length>1){var D="DummyCompound_"+R;T.memberGroups[D]=S[R];var P=S[R][0].getParent(),A=new o(T.graphManager);A.id=D,A.paddingLeft=P.paddingLeft||0,A.paddingRight=P.paddingRight||0,A.paddingBottom=P.paddingBottom||0,A.paddingTop=P.paddingTop||0,T.idToDummyNode[D]=A;var N=T.getGraphManager().add(T.newGraph(),A),F=P.getChild();F.add(A);for(var B=0;B=0;T--){var S=this.compoundOrder[T],L=S.id,_=S.paddingLeft,M=S.paddingTop;this.adjustLocations(this.tiledMemberPack[L],S.rect.x,S.rect.y,_,M)}},k.prototype.repopulateZeroDegreeMembers=function(){var T=this,S=this.tiledZeroDegreePack;Object.keys(S).forEach(function(L){var _=T.idToDummyNode[L],M=_.paddingLeft,I=_.paddingTop;T.adjustLocations(S[L],_.rect.x,_.rect.y,M,I)})},k.prototype.getToBeTiled=function(T){var S=T.id;if(this.toBeTiled[S]!=null)return this.toBeTiled[S];var L=T.getChild();if(L==null)return this.toBeTiled[S]=!1,!1;for(var _=L.getNodes(),M=0;M<_.length;M++){var I=_[M];if(this.getNodeDegree(I)>0)return this.toBeTiled[S]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[S]=!1,!1}return this.toBeTiled[S]=!0,!0},k.prototype.getNodeDegree=function(T){for(var S=T.id,L=T.getEdges(),_=0,M=0;MR&&(R=P.rect.height)}L+=R+T.verticalPadding}},k.prototype.tileCompoundMembers=function(T,S){var L=this;this.tiledMemberPack=[],Object.keys(T).forEach(function(_){var M=S[_];L.tiledMemberPack[_]=L.tileNodes(T[_],M.paddingLeft+M.paddingRight),M.rect.width=L.tiledMemberPack[_].width,M.rect.height=L.tiledMemberPack[_].height})},k.prototype.tileNodes=function(T,S){var L=u.TILING_PADDING_VERTICAL,_=u.TILING_PADDING_HORIZONTAL,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:S,verticalPadding:L,horizontalPadding:_};T.sort(function(C,R){return C.rect.width*C.rect.height>R.rect.width*R.rect.height?-1:C.rect.width*C.rect.height0&&(O+=T.horizontalPadding),T.rowWidth[L]=O,T.width0&&(C+=T.verticalPadding);var R=0;C>T.rowHeight[L]&&(R=T.rowHeight[L],T.rowHeight[L]=C,R=T.rowHeight[L]-R),T.height+=R,T.rows[L].push(S)},k.prototype.getShortestRowIndex=function(T){for(var S=-1,L=Number.MAX_VALUE,_=0;_L&&(S=_,L=T.rowWidth[_]);return S},k.prototype.canAddHorizontal=function(T,S,L){var _=this.getShortestRowIndex(T);if(_<0)return!0;var M=T.rowWidth[_];if(M+T.horizontalPadding+S<=T.width)return!0;var I=0;T.rowHeight[_]0&&(I=L+T.verticalPadding-T.rowHeight[_]);var O;T.width-M>=S+T.horizontalPadding?O=(T.height+I)/(M+S+T.horizontalPadding):O=(T.height+I)/T.width,I=L+T.verticalPadding;var C;return T.widthI&&S!=L){_.splice(-1,1),T.rows[L].push(M),T.rowWidth[S]=T.rowWidth[S]-I,T.rowWidth[L]=T.rowWidth[L]+I,T.width=T.rowWidth[instance.getLongestRowIndex(T)];for(var O=Number.MIN_VALUE,C=0;C<_.length;C++)_[C].height>O&&(O=_[C].height);S>0&&(O+=T.verticalPadding);var R=T.rowHeight[S]+T.rowHeight[L];T.rowHeight[S]=O,T.rowHeight[L]0)for(var F=M;F<=I;F++)N[0]+=this.grid[F][O-1].length+this.grid[F][O].length-1;if(I0)for(var F=O;F<=C;F++)N[3]+=this.grid[M-1][F].length+this.grid[M][F].length-1;for(var B=m.MAX_VALUE,V,z,H=0;H{b();(function(e,r){typeof Yk=="object"&&typeof LX=="object"?LX.exports=r(AX()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof Yk=="object"?Yk.cytoscapeCoseBilkent=r(AX()):e.cytoscapeCoseBilkent=r(e.coseBase)})(Yk,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=1)}([function(e,r){e.exports=t},function(e,r,n){"use strict";var i=n(0).layoutBase.LayoutConstants,a=n(0).layoutBase.FDLayoutConstants,s=n(0).CoSEConstants,o=n(0).CoSELayout,l=n(0).CoSENode,u=n(0).layoutBase.PointD,h=n(0).layoutBase.DimensionD,f={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(v,y){var w={};for(var k in v)w[k]=v[k];for(var k in y)w[k]=y[k];return w}function p(v){this.options=d(f,v),g(this.options)}var g=function(y){y.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=y.nodeRepulsion),y.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=y.idealEdgeLength),y.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=y.edgeElasticity),y.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=y.nestingFactor),y.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=y.gravity),y.numIter!=null&&(s.MAX_ITERATIONS=a.MAX_ITERATIONS=y.numIter),y.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=y.gravityRange),y.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=y.gravityCompound),y.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=y.gravityRangeCompound),y.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=y.initialEnergyOnIncremental),y.quality=="draft"?i.QUALITY=0:y.quality=="proof"?i.QUALITY=2:i.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=y.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!y.randomize,s.ANIMATE=a.ANIMATE=i.ANIMATE=y.animate,s.TILE=y.tile,s.TILING_PADDING_VERTICAL=typeof y.tilingPaddingVertical=="function"?y.tilingPaddingVertical.call():y.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof y.tilingPaddingHorizontal=="function"?y.tilingPaddingHorizontal.call():y.tilingPaddingHorizontal};p.prototype.run=function(){var v,y,w=this.options,k=this.idToLNode={},E=this.layout=new o,T=this;T.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var S=E.newGraphManager();this.gm=S;var L=this.options.eles.nodes(),_=this.options.eles.edges();this.root=S.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(L),E);for(var M=0;M<_.length;M++){var I=_[M],O=this.idToLNode[I.data("source")],C=this.idToLNode[I.data("target")];if(O!==C&&O.getEdgesBetween(C).length==0){var R=S.add(E.newEdge(),O,C);R.id=I.id()}}var D=function(N,F){typeof N=="number"&&(N=F);var B=N.data("id"),V=T.idToLNode[B];return{x:V.getRect().getCenterX(),y:V.getRect().getCenterY()}},P=function A(){for(var N=function(){w.fit&&w.cy.fit(w.eles,w.padding),v||(v=!0,T.cy.one("layoutready",w.ready),T.cy.trigger({type:"layoutready",layout:T}))},F=T.options.refresh,B,V=0;V0){var C;C=w.getGraphManager().add(w.newGraph(),L),this.processChildrenList(C,S,w)}}},p.prototype.stop=function(){return this.stopped=!0,this};var m=function(y){y("layout","cose-bilkent",p)};typeof cytoscape<"u"&&m(cytoscape),e.exports=m}])})});var eDe={};Wt(eDe,{diagram:()=>oMt});function KMe(t,e,r,n,i){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+(i.width-e)/2+", "+r+")")}async function OX(t,e,r,n,i){await eMt(t,e,r,n,i),r.children&&await Promise.all(r.children.map((a,s)=>OX(t,e,a,n<0?s:n,i)))}function ZMe(t,e){e.edges().map((r,n)=>{let i=r.data();if(r[0]._private.bodyBounds){let a=r[0]._private.rscratch;ie.trace("Edge: ",n,i),t.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}})}function RX(t,e,r,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(i=>{RX(i,e,r,n+1),e.add({group:"edges",data:{id:`${t.id}_${i.id}`,source:t.id,target:i.id,depth:n,section:i.section}})})}function QMe(t,e){return new Promise(r=>{let n=Je("body").append("div").attr("id","cy").attr("style","display:none"),i=Lc({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),RX(t,i,e,0),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height}}}),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready(a=>{ie.info("Ready",a),r(i)})})}function JMe(t,e){e.nodes().map((r,n)=>{let i=r.data();i.x=r.position().x,i.y=r.position().y,tMt(t,i);let a=t.getElementById(i.nodeId);ie.info("Id:",n,"Position: (",r.position().x,", ",r.position().y,")",i),a.attr("transform",`translate(${r.position().x-i.width/2}, ${r.position().y-i.height/2})`),a.attr("attr",`apa-${n})`)})}var XMe,MX,RLt,Lu,jMe,DX,ILt,NLt,PLt,FLt,Ra,BLt,zLt,$Lt,VLt,ULt,HLt,qLt,WLt,GLt,YLt,jLt,XLt,KLt,ZLt,QLt,JLt,eMt,tMt,rMt,nMt,iMt,aMt,sMt,oMt,tDe=$(()=>{b();ro();Qn();Jf();Sr();EX();XMe=Vi(YMe(),1);Cr();ql();MX=function(){var t=x(function(E,T,S,L){for(S=S||{},L=E.length;L--;S[E[L]]=T);return S},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],v=[1,6,7,11,13,15,16,19,22],y={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:x(function(T,S,L,_,M,I,O){var C=I.length-1;switch(M){case 6:case 7:return _;case 8:_.getLogger().trace("Stop NL ");break;case 9:_.getLogger().trace("Stop EOF ");break;case 11:_.getLogger().trace("Stop NL2 ");break;case 12:_.getLogger().trace("Stop EOF2 ");break;case 15:_.getLogger().info("Node: ",I[C].id),_.addNode(I[C-1].length,I[C].id,I[C].descr,I[C].type);break;case 16:_.getLogger().trace("Icon: ",I[C]),_.decorateNode({icon:I[C]});break;case 17:case 21:_.decorateNode({class:I[C]});break;case 18:_.getLogger().trace("SPACELIST");break;case 19:_.getLogger().trace("Node: ",I[C].id),_.addNode(0,I[C].id,I[C].descr,I[C].type);break;case 20:_.decorateNode({icon:I[C]});break;case 25:_.getLogger().trace("node found ..",I[C-2]),this.$={id:I[C-1],descr:I[C-1],type:_.getType(I[C-2],I[C])};break;case 26:this.$={id:I[C],descr:I[C],type:_.nodeType.DEFAULT};break;case 27:_.getLogger().trace("node found ..",I[C-3]),this.$={id:I[C-3],descr:I[C-1],type:_.getType(I[C-2],I[C])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:f},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(p,[2,14],{7:g,11:m}),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:g,11:m}),t(v,[2,11]),t(v,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(T,S){if(S.recoverable)this.trace(T);else{var L=new Error(T);throw L.hash=S,L}},"parseError"),parse:x(function(T){var S=this,L=[0],_=[],M=[null],I=[],O=this.table,C="",R=0,D=0,P=0,A=2,N=1,F=I.slice.call(arguments,1),B=Object.create(this.lexer),V={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(V.yy[z]=this.yy[z]);B.setInput(T,V.yy),V.yy.lexer=B,V.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var H=B.yylloc;I.push(H);var K=B.options&&B.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(Se){L.length=L.length-2*Se,M.length=M.length-Se,I.length=I.length-Se}x(X,"popStack");function ne(){var Se;return Se=_.pop()||B.lex()||N,typeof Se!="number"&&(Se instanceof Array&&(_=Se,Se=_.pop()),Se=S.symbols_[Se]||Se),Se}x(ne,"lex");for(var j,ee,Q,G,Z,te,oe={},de,pe,re,Be;;){if(Q=L[L.length-1],this.defaultActions[Q]?G=this.defaultActions[Q]:((j===null||typeof j>"u")&&(j=ne()),G=O[Q]&&O[Q][j]),typeof G>"u"||!G.length||!G[0]){var le="";Be=[];for(de in O[Q])this.terminals_[de]&&de>A&&Be.push("'"+this.terminals_[de]+"'");B.showPosition?le="Parse error on line "+(R+1)+`: `+B.showPosition()+` Expecting `+Be.join(", ")+", got '"+(this.terminals_[j]||j)+"'":le="Parse error on line "+(R+1)+": Unexpected "+(j==N?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(le,{text:B.match,token:this.terminals_[j]||j,line:B.yylineno,loc:H,expected:Be})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+j);switch(G[0]){case 1:L.push(j),M.push(B.yytext),I.push(B.yylloc),L.push(G[1]),j=null,ee?(j=ee,ee=null):(D=B.yyleng,C=B.yytext,R=B.yylineno,H=B.yylloc,P>0&&P--);break;case 2:if(pe=this.productions_[G[1]][1],oe.$=M[M.length-pe],oe._$={first_line:I[I.length-(pe||1)].first_line,last_line:I[I.length-1].last_line,first_column:I[I.length-(pe||1)].first_column,last_column:I[I.length-1].last_column},K&&(oe._$.range=[I[I.length-(pe||1)].range[0],I[I.length-1].range[1]]),te=this.performAction.apply(oe,[C,D,R,V.yy,G[1],M,I].concat(F)),typeof te<"u")return te;pe&&(L=L.slice(0,-1*pe*2),M=M.slice(0,-1*pe),I=I.slice(0,-1*pe)),L.push(this.productions_[G[1]][0]),M.push(oe.$),I.push(oe._$),re=O[L[L.length-2]][L[L.length-1]],L.push(re);break;case 3:return!0}}return!0},"parse")},w=function(){var E={EOF:1,parseError:x(function(S,L){if(this.yy.parser)this.yy.parser.parseError(S,L);else throw new Error(S)},"parseError"),setInput:x(function(T,S){return this.yy=S||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var S=T.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:x(function(T){var S=T.length,L=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),L.length-1&&(this.yylineno-=L.length-1);var M=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:L?(L.length===_.length?this.yylloc.first_column:0)+_[_.length-L.length].length-L[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(T){this.unput(this.match.slice(T))},"less"),pastInput:x(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var T=this.pastInput(),S=new Array(T.length+1).join("-");return T+this.upcomingInput()+` `+S+"^"},"showPosition"),test_match:x(function(T,S){var L,_,M;if(this.options.backtrack_lexer&&(M={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(M.yylloc.range=this.yylloc.range.slice(0))),_=T[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],L=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),L)return L;if(this._backtrack){for(var I in M)this[I]=M[I];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,S,L,_;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),I=0;IS[0].length)){if(S=L,_=I,this.options.backtrack_lexer){if(T=this.test_match(L,M[I]),T!==!1)return T;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(T=this.test_match(S,M[_]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var S=this.next();return S||this.lex()},"lex"),begin:x(function(S){this.conditionStack.push(S)},"begin"),popState:x(function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},"topState"),pushState:x(function(S){this.begin(S)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(S,L,_,M){var I=M;switch(_){case 0:return S.getLogger().trace("Found comment",L.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:S.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return S.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:S.getLogger().trace("end icon"),this.popState();break;case 10:return S.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return S.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return S.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return S.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:S.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return S.getLogger().trace("description:",L.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),S.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),S.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),S.getLogger().trace("node end ...",L.yytext),"NODE_DEND";break;case 30:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),S.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),S.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return S.getLogger().trace("Long description:",L.yytext),20;break;case 36:return S.getLogger().trace("Long description:",L.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return E}();y.lexer=w;function k(){this.yy={}}return x(k,"Parser"),k.prototype=y,y.Parser=k,new k}();MX.parser=MX;RLt=MX,Lu=[],jMe=0,DX={},ILt=x(()=>{Lu=[],jMe=0,DX={}},"clear"),NLt=x(function(t){for(let e=Lu.length-1;e>=0;e--)if(Lu[e].levelLu.length>0?Lu[0]:null,"getMindmap"),FLt=x((t,e,r,n)=>{ie.info("addNode",t,e,r,n);let i=Te(),a=i.mindmap?.padding??Er.mindmap.padding;switch(n){case Ra.ROUNDED_RECT:case Ra.RECT:case Ra.HEXAGON:a*=2}let s={id:jMe++,nodeId:Nr(e,i),level:t,descr:Nr(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??Er.mindmap.maxNodeWidth,padding:a},o=NLt(t);if(o)o.children.push(s),Lu.push(s);else if(Lu.length===0)Lu.push(s);else throw new Error('There can be only one root. No parent could be found for ("'+s.descr+'")')},"addNode"),Ra={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},BLt=x((t,e)=>{switch(ie.debug("In get type",t,e),t){case"[":return Ra.RECT;case"(":return e===")"?Ra.ROUNDED_RECT:Ra.CLOUD;case"((":return Ra.CIRCLE;case")":return Ra.CLOUD;case"))":return Ra.BANG;case"{{":return Ra.HEXAGON;default:return Ra.DEFAULT}},"getType"),zLt=x((t,e)=>{DX[t]=e},"setElementForId"),$Lt=x(t=>{if(!t)return;let e=Te(),r=Lu[Lu.length-1];t.icon&&(r.icon=Nr(t.icon,e)),t.class&&(r.class=Nr(t.class,e))},"decorateNode"),VLt=x(t=>{switch(t){case Ra.DEFAULT:return"no-border";case Ra.RECT:return"rect";case Ra.ROUNDED_RECT:return"rounded-rect";case Ra.CIRCLE:return"circle";case Ra.CLOUD:return"cloud";case Ra.BANG:return"bang";case Ra.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),ULt=x(()=>ie,"getLogger"),HLt=x(t=>DX[t],"getElementById"),qLt={clear:ILt,addNode:FLt,getMindmap:PLt,nodeType:Ra,getType:BLt,setElementForId:zLt,decorateNode:$Lt,type2Str:VLt,getLogger:ULt,getElementById:HLt},WLt=qLt,GLt=12,YLt=x(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${-r.height+2*5} q0,-5 5,-5 h${r.width-2*5} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),jLt=x(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),XLt=x(function(t,e,r){let n=r.width,i=r.height,a=.15*n,s=.25*n,o=.35*n,l=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${n*.25},${-1*n*.1} a${o},${o} 1 0,1 ${n*.4},${-1*n*.1} a${s},${s} 1 0,1 ${n*.35},${1*n*.2} a${a},${a} 1 0,1 ${n*.15},${1*i*.35} a${l},${l} 1 0,1 ${-1*n*.15},${1*i*.65} a${s},${a} 1 0,1 ${-1*n*.25},${n*.15} a${o},${o} 1 0,1 ${-1*n*.5},0 a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15} a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35} a${l},${l} 1 0,1 ${n*.1},${-1*i*.65} H0 V0 Z`)},"cloudBkg"),KLt=x(function(t,e,r){let n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${n*.25},${-1*i*.1} a${a},${a} 1 0,0 ${n*.25},0 a${a},${a} 1 0,0 ${n*.25},0 a${a},${a} 1 0,0 ${n*.25},${1*i*.1} a${a},${a} 1 0,0 ${n*.15},${1*i*.33} a${a*.8},${a*.8} 1 0,0 0,${1*i*.34} a${a},${a} 1 0,0 ${-1*n*.15},${1*i*.33} a${a},${a} 1 0,0 ${-1*n*.25},${i*.15} a${a},${a} 1 0,0 ${-1*n*.25},0 a${a},${a} 1 0,0 ${-1*n*.25},0 a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15} a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33} a${a*.8},${a*.8} 1 0,0 0,${-1*i*.34} a${a},${a} 1 0,0 ${n*.1},${-1*i*.33} H0 V0 Z`)},"bangBkg"),ZLt=x(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg");x(KMe,"insertPolygonShape");QLt=x(function(t,e,r){let n=r.height,a=n/4,s=r.width-r.padding+2*a,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-n/2},{x:s-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}];KMe(e,s,n,o,r)},"hexagonBkg"),JLt=x(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),eMt=x(async function(t,e,r,n,i){let a=i.htmlLabels,s=n%(GLt-1),o=e.append("g");r.section=s;let l="section-"+s;s<0&&(l+=" section-root"),o.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+l);let u=o.append("g"),h=o.append("g"),f=r.descr.replace(/()/g,` `);await ls(h,f,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let d=h.node().getBBox(),[p]=sc(i.fontSize);if(r.height=d.height+p*1.1*.5+r.padding,r.width=d.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,o.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let g=r.height;r.height=Math.max(g,60);let m=Math.abs(r.height-g);o.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+m/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+(25+r.width/2)+", "+(m/2+r.padding/2)+")")}else if(a){let g=(r.width-d.width)/2,m=(r.height-d.height)/2;h.attr("transform","translate("+g+", "+m+")")}else{let g=r.width/2,m=r.padding/2;h.attr("transform","translate("+g+", "+m+")")}switch(r.type){case t.nodeType.DEFAULT:YLt(t,u,r,s);break;case t.nodeType.ROUNDED_RECT:JLt(t,u,r,s);break;case t.nodeType.RECT:jLt(t,u,r,s);break;case t.nodeType.CIRCLE:u.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),ZLt(t,u,r,s);break;case t.nodeType.CLOUD:XLt(t,u,r,s);break;case t.nodeType.BANG:KLt(t,u,r,s);break;case t.nodeType.HEXAGON:QLt(t,u,r,s);break}return t.setElementForId(r.id,o),r.height},"drawNode"),tMt=x(function(t,e){let r=t.getElementById(e.id),n=e.x||0,i=e.y||0;r.attr("transform","translate("+n+","+i+")")},"positionNode");Lc.use(XMe.default);x(OX,"drawNodes");x(ZMe,"drawEdges");x(RX,"addNodes");x(QMe,"layoutMindmap");x(JMe,"positionNodes");rMt=x(async(t,e,r,n)=>{ie.debug(`Rendering mindmap diagram `+t);let i=n.db,a=i.getMindmap();if(!a)return;let s=Te();s.htmlLabels=!1;let o=Is(e),l=o.append("g");l.attr("class","mindmap-edges");let u=o.append("g");u.attr("class","mindmap-nodes"),await OX(i,u,a,-1,s);let h=await QMe(a,s);ZMe(l,h),JMe(i,h),jc(void 0,o,s.mindmap?.padding??Er.mindmap.padding,s.mindmap?.useMaxWidth??Er.mindmap.useMaxWidth)},"draw"),nMt={draw:rMt},iMt=x(t=>{let e="";for(let r=0;r` .edge { stroke-width: 3; } ${iMt(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .mindmap-node-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } `,"getStyles"),sMt=aMt,oMt={db:WLt,renderer:nMt,parser:RLt,styles:sMt}});var nDe={};Wt(nDe,{diagram:()=>CMt});var IX,lMt,Mc,PX,NX,FX,cMt,uMt,rDe,hMt,fMt,Ia,dMt,pMt,gMt,mMt,vMt,yMt,bMt,xMt,wMt,kMt,TMt,EMt,SMt,CMt,iDe=$(()=>{b();WC();lu();Kc();Kl();ro();Qn();Jf();Sr();ql();IX=function(){var t=x(function(L,_,M,I){for(M=M||{},I=L.length;I--;M[L[I]]=_);return M},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],v=[1,35],y=[1,36],w=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:x(function(_,M,I,O,C,R,D){var P=R.length-1;switch(C){case 6:case 7:return O;case 8:O.getLogger().trace("Stop NL ");break;case 9:O.getLogger().trace("Stop EOF ");break;case 11:O.getLogger().trace("Stop NL2 ");break;case 12:O.getLogger().trace("Stop EOF2 ");break;case 15:O.getLogger().info("Node: ",R[P-1].id),O.addNode(R[P-2].length,R[P-1].id,R[P-1].descr,R[P-1].type,R[P]);break;case 16:O.getLogger().info("Node: ",R[P].id),O.addNode(R[P-1].length,R[P].id,R[P].descr,R[P].type);break;case 17:O.getLogger().trace("Icon: ",R[P]),O.decorateNode({icon:R[P]});break;case 18:case 23:O.decorateNode({class:R[P]});break;case 19:O.getLogger().trace("SPACELIST");break;case 20:O.getLogger().trace("Node: ",R[P-1].id),O.addNode(0,R[P-1].id,R[P-1].descr,R[P-1].type,R[P]);break;case 21:O.getLogger().trace("Node: ",R[P].id),O.addNode(0,R[P].id,R[P].descr,R[P].type);break;case 22:O.decorateNode({icon:R[P]});break;case 27:O.getLogger().trace("node found ..",R[P-2]),this.$={id:R[P-1],descr:R[P-1],type:O.getType(R[P-2],R[P])};break;case 28:this.$={id:R[P],descr:R[P],type:0};break;case 29:O.getLogger().trace("node found ..",R[P-3]),this.$={id:R[P-3],descr:R[P-1],type:O.getType(R[P-2],R[P])};break;case 30:this.$=R[P-1]+R[P];break;case 31:this.$=R[P];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:u,7:h,10:23,11:f},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(g,[2,25]),t(g,[2,26]),t(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:h,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(m,[2,14],{7:v,11:y}),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(g,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:v,11:y}),t(w,[2,11]),t(w,[2,12]),t(d,[2,15],{24:k}),t(g,[2,30]),{22:[1,41]},t(g,[2,27]),t(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(_,M){if(M.recoverable)this.trace(_);else{var I=new Error(_);throw I.hash=M,I}},"parseError"),parse:x(function(_){var M=this,I=[0],O=[],C=[null],R=[],D=this.table,P="",A=0,N=0,F=0,B=2,V=1,z=R.slice.call(arguments,1),H=Object.create(this.lexer),K={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(K.yy[X]=this.yy[X]);H.setInput(_,K.yy),K.yy.lexer=H,K.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var ne=H.yylloc;R.push(ne);var j=H.options&&H.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(Ze){I.length=I.length-2*Ze,C.length=C.length-Ze,R.length=R.length-Ze}x(ee,"popStack");function Q(){var Ze;return Ze=O.pop()||H.lex()||V,typeof Ze!="number"&&(Ze instanceof Array&&(O=Ze,Ze=O.pop()),Ze=M.symbols_[Ze]||Ze),Ze}x(Q,"lex");for(var G,Z,te,oe,de,pe,re={},Be,le,Se,Ye;;){if(te=I[I.length-1],this.defaultActions[te]?oe=this.defaultActions[te]:((G===null||typeof G>"u")&&(G=Q()),oe=D[te]&&D[te][G]),typeof oe>"u"||!oe.length||!oe[0]){var We="";Ye=[];for(Be in D[te])this.terminals_[Be]&&Be>B&&Ye.push("'"+this.terminals_[Be]+"'");H.showPosition?We="Parse error on line "+(A+1)+`: `+H.showPosition()+` Expecting `+Ye.join(", ")+", got '"+(this.terminals_[G]||G)+"'":We="Parse error on line "+(A+1)+": Unexpected "+(G==V?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(We,{text:H.match,token:this.terminals_[G]||G,line:H.yylineno,loc:ne,expected:Ye})}if(oe[0]instanceof Array&&oe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+te+", token: "+G);switch(oe[0]){case 1:I.push(G),C.push(H.yytext),R.push(H.yylloc),I.push(oe[1]),G=null,Z?(G=Z,Z=null):(N=H.yyleng,P=H.yytext,A=H.yylineno,ne=H.yylloc,F>0&&F--);break;case 2:if(le=this.productions_[oe[1]][1],re.$=C[C.length-le],re._$={first_line:R[R.length-(le||1)].first_line,last_line:R[R.length-1].last_line,first_column:R[R.length-(le||1)].first_column,last_column:R[R.length-1].last_column},j&&(re._$.range=[R[R.length-(le||1)].range[0],R[R.length-1].range[1]]),pe=this.performAction.apply(re,[P,N,A,K.yy,oe[1],C,R].concat(z)),typeof pe<"u")return pe;le&&(I=I.slice(0,-1*le*2),C=C.slice(0,-1*le),R=R.slice(0,-1*le)),I.push(this.productions_[oe[1]][0]),C.push(re.$),R.push(re._$),Se=D[I[I.length-2]][I[I.length-1]],I.push(Se);break;case 3:return!0}}return!0},"parse")},T=function(){var L={EOF:1,parseError:x(function(M,I){if(this.yy.parser)this.yy.parser.parseError(M,I);else throw new Error(M)},"parseError"),setInput:x(function(_,M){return this.yy=M||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var M=_.match(/(?:\r\n?|\n).*/g);return M?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},"input"),unput:x(function(_){var M=_.length,I=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),I.length-1&&(this.yylineno-=I.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:I?(I.length===O.length?this.yylloc.first_column:0)+O[O.length-I.length].length-I[0].length:this.yylloc.first_column-M},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-M]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(_){this.unput(this.match.slice(_))},"less"),pastInput:x(function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var _=this.pastInput(),M=new Array(_.length+1).join("-");return _+this.upcomingInput()+` `+M+"^"},"showPosition"),test_match:x(function(_,M){var I,O,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),O=_[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_[0].length),this.matched+=_[0],I=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),I)return I;if(this._backtrack){for(var R in C)this[R]=C[R];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,M,I,O;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),R=0;RM[0].length)){if(M=I,O=R,this.options.backtrack_lexer){if(_=this.test_match(I,C[R]),_!==!1)return _;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(_=this.test_match(M,C[O]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var M=this.next();return M||this.lex()},"lex"),begin:x(function(M){this.conditionStack.push(M)},"begin"),popState:x(function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},"topState"),pushState:x(function(M){this.begin(M)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(M,I,O,C){var R=C;switch(O){case 0:return this.pushState("shapeData"),I.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let D=/\n\s*/g;return I.yytext=I.yytext.replace(D,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return M.getLogger().trace("Found comment",I.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:M.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return M.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:M.getLogger().trace("end icon"),this.popState();break;case 16:return M.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return M.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return M.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return M.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:M.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return M.getLogger().trace("description:",I.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),M.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),M.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),M.getLogger().trace("node end ...",I.yytext),"NODE_DEND";break;case 36:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),M.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),M.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return M.getLogger().trace("Long description:",I.yytext),21;break;case 42:return M.getLogger().trace("Long description:",I.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return L}();E.lexer=T;function S(){this.yy={}}return x(S,"Parser"),S.prototype=E,E.Parser=S,new S}();IX.parser=IX;lMt=IX,Mc=[],PX=[],NX=0,FX={},cMt=x(()=>{Mc=[],PX=[],NX=0,FX={}},"clear"),uMt=x(t=>{if(Mc.length===0)return null;let e=Mc[0].level,r=null;for(let n=Mc.length-1;n>=0;n--)if(Mc[n].level===e&&!r&&(r=Mc[n]),Mc[n].levelo.parentId===i.id);for(let o of s){let l={id:o.id,parentId:i.id,label:Nr(o.label??"",n),isGroup:!1,ticket:o?.ticket,priority:o?.priority,assigned:o?.assigned,icon:o?.icon,shape:"kanbanItem",level:o.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(l)}}return{nodes:e,edges:t,other:{},config:Te()}},"getData"),fMt=x((t,e,r,n,i)=>{let a=Te(),s=a.mindmap?.padding??Er.mindmap.padding;switch(n){case Ia.ROUNDED_RECT:case Ia.RECT:case Ia.HEXAGON:s*=2}let o={id:Nr(e,a)||"kbn"+NX++,level:t,label:Nr(r,a),width:a.mindmap?.maxNodeWidth??Er.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(i!==void 0){let u;i.includes(` `)?u=i+` `:u=`{ `+i+` }`;let h=vv(u,{schema:mv});if(h.shape&&(h.shape!==h.shape.toLowerCase()||h.shape.includes("_")))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);h?.shape&&h.shape==="kanbanItem"&&(o.shape=h?.shape),h?.label&&(o.label=h?.label),h?.icon&&(o.icon=h?.icon.toString()),h?.assigned&&(o.assigned=h?.assigned.toString()),h?.ticket&&(o.ticket=h?.ticket.toString()),h?.priority&&(o.priority=h?.priority)}let l=uMt(t);l?o.parentId=l.id||"kbn"+NX++:PX.push(o),Mc.push(o)},"addNode"),Ia={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},dMt=x((t,e)=>{switch(ie.debug("In get type",t,e),t){case"[":return Ia.RECT;case"(":return e===")"?Ia.ROUNDED_RECT:Ia.CLOUD;case"((":return Ia.CIRCLE;case")":return Ia.CLOUD;case"))":return Ia.BANG;case"{{":return Ia.HEXAGON;default:return Ia.DEFAULT}},"getType"),pMt=x((t,e)=>{FX[t]=e},"setElementForId"),gMt=x(t=>{if(!t)return;let e=Te(),r=Mc[Mc.length-1];t.icon&&(r.icon=Nr(t.icon,e)),t.class&&(r.cssClasses=Nr(t.class,e))},"decorateNode"),mMt=x(t=>{switch(t){case Ia.DEFAULT:return"no-border";case Ia.RECT:return"rect";case Ia.ROUNDED_RECT:return"rounded-rect";case Ia.CIRCLE:return"circle";case Ia.CLOUD:return"cloud";case Ia.BANG:return"bang";case Ia.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),vMt=x(()=>ie,"getLogger"),yMt=x(t=>FX[t],"getElementById"),bMt={clear:cMt,addNode:fMt,getSections:rDe,getData:hMt,nodeType:Ia,getType:dMt,setElementForId:pMt,decorateNode:gMt,type2Str:mMt,getLogger:vMt,getElementById:yMt},xMt=bMt,wMt=x(async(t,e,r,n)=>{ie.debug(`Rendering kanban diagram `+t);let a=n.db.getData(),s=Te();s.htmlLabels=!1;let o=Is(e),l=o.append("g");l.attr("class","sections");let u=o.append("g");u.attr("class","items");let h=a.nodes.filter(v=>v.isGroup),f=0,d=10,p=[],g=25;for(let v of h){let y=s?.kanban?.sectionWidth||200;f=f+1,v.x=y*f+(f-1)*d/2,v.width=y,v.y=0,v.height=y*3,v.rx=5,v.ry=5,v.cssClasses=v.cssClasses+" section-"+f;let w=await fy(l,v);g=Math.max(g,w?.labelBBox?.height),p.push(w)}let m=0;for(let v of h){let y=p[m];m=m+1;let w=s?.kanban?.sectionWidth||200,k=-w*3/2+g,E=k,T=a.nodes.filter(_=>_.parentId===v.id);for(let _ of T){if(_.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");_.x=v.x,_.width=w-1.5*d;let I=(await $g(u,_,{config:s})).node().getBBox();_.y=E+I.height/2,await e3(_),E=_.y+I.height/2+d/2}let S=y.cluster.select("rect"),L=Math.max(E-k+3*d,50)+(g-25);S.attr("height",L)}jc(void 0,o,s.mindmap?.padding??Er.kanban.padding,s.mindmap?.useMaxWidth??Er.kanban.useMaxWidth)},"draw"),kMt={draw:wMt},TMt=x(t=>{let e="";for(let n=0;nt.darkMode?Ut(n,i):It(n,i),"adjuster");for(let n=0;n` .edge { stroke-width: 3; } ${TMt(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .cluster-label, .label { color: ${t.textColor}; fill: ${t.textColor}; } .kanban-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } `,"getStyles"),SMt=EMt,CMt={db:xMt,renderer:kMt,parser:lMt,styles:SMt}});function jk(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var aDe=$(()=>{b()});function b2(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var sDe=$(()=>{b()});function x2(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}var oDe=$(()=>{b()});var BX=$(()=>{b();aDe();sDe();oDe()});function _Mt(t){return t.target.depth}function zX(t){return t.depth}function $X(t,e){return e-1-t.height}function Xk(t,e){return t.sourceLinks.length?t.depth:e-1}function VX(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?b2(t.sourceLinks,_Mt)-1:0}var UX=$(()=>{b();BX()});function w2(t){return function(){return t}}var lDe=$(()=>{b()});function cDe(t,e){return JM(t.source,e.source)||t.index-e.index}function uDe(t,e){return JM(t.target,e.target)||t.index-e.index}function JM(t,e){return t.y0-e.y0}function HX(t){return t.value}function AMt(t){return t.index}function LMt(t){return t.nodes}function MMt(t){return t.links}function hDe(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function fDe({nodes:t}){for(let e of t){let r=e.y0,n=r;for(let i of e.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of e.targetLinks)i.y1=n+i.width/2,n+=i.width}}function eD(){let t=0,e=0,r=1,n=1,i=24,a=8,s,o=AMt,l=Xk,u,h,f=LMt,d=MMt,p=6;function g(){let P={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return m(P),v(P),y(P),w(P),T(P),fDe(P),P}g.update=function(P){return fDe(P),P},g.nodeId=function(P){return arguments.length?(o=typeof P=="function"?P:w2(P),g):o},g.nodeAlign=function(P){return arguments.length?(l=typeof P=="function"?P:w2(P),g):l},g.nodeSort=function(P){return arguments.length?(u=P,g):u},g.nodeWidth=function(P){return arguments.length?(i=+P,g):i},g.nodePadding=function(P){return arguments.length?(a=s=+P,g):a},g.nodes=function(P){return arguments.length?(f=typeof P=="function"?P:w2(P),g):f},g.links=function(P){return arguments.length?(d=typeof P=="function"?P:w2(P),g):d},g.linkSort=function(P){return arguments.length?(h=P,g):h},g.size=function(P){return arguments.length?(t=e=0,r=+P[0],n=+P[1],g):[r-t,n-e]},g.extent=function(P){return arguments.length?(t=+P[0][0],r=+P[1][0],e=+P[0][1],n=+P[1][1],g):[[t,e],[r,n]]},g.iterations=function(P){return arguments.length?(p=+P,g):p};function m({nodes:P,links:A}){for(let[F,B]of P.entries())B.index=F,B.sourceLinks=[],B.targetLinks=[];let N=new Map(P.map((F,B)=>[o(F,B,P),F]));for(let[F,B]of A.entries()){B.index=F;let{source:V,target:z}=B;typeof V!="object"&&(V=B.source=hDe(N,V)),typeof z!="object"&&(z=B.target=hDe(N,z)),V.sourceLinks.push(B),z.targetLinks.push(B)}if(h!=null)for(let{sourceLinks:F,targetLinks:B}of P)F.sort(h),B.sort(h)}function v({nodes:P}){for(let A of P)A.value=A.fixedValue===void 0?Math.max(x2(A.sourceLinks,HX),x2(A.targetLinks,HX)):A.fixedValue}function y({nodes:P}){let A=P.length,N=new Set(P),F=new Set,B=0;for(;N.size;){for(let V of N){V.depth=B;for(let{target:z}of V.sourceLinks)F.add(z)}if(++B>A)throw new Error("circular link");N=F,F=new Set}}function w({nodes:P}){let A=P.length,N=new Set(P),F=new Set,B=0;for(;N.size;){for(let V of N){V.height=B;for(let{source:z}of V.targetLinks)F.add(z)}if(++B>A)throw new Error("circular link");N=F,F=new Set}}function k({nodes:P}){let A=jk(P,B=>B.depth)+1,N=(r-t-i)/(A-1),F=new Array(A);for(let B of P){let V=Math.max(0,Math.min(A-1,Math.floor(l.call(null,B,A))));B.layer=V,B.x0=t+V*N,B.x1=B.x0+i,F[V]?F[V].push(B):F[V]=[B]}if(u)for(let B of F)B.sort(u);return F}function E(P){let A=b2(P,N=>(n-e-(N.length-1)*s)/x2(N,HX));for(let N of P){let F=e;for(let B of N){B.y0=F,B.y1=F+B.value*A,F=B.y1+s;for(let V of B.sourceLinks)V.width=V.value*A}F=(n-F+s)/(N.length+1);for(let B=0;BN.length)-1)),E(A);for(let N=0;N0))continue;let X=(H/K-z.y0)*A;z.y0+=X,z.y1+=X,O(z)}u===void 0&&V.sort(JM),_(V,N)}}function L(P,A,N){for(let F=P.length,B=F-2;B>=0;--B){let V=P[B];for(let z of V){let H=0,K=0;for(let{target:ne,value:j}of z.sourceLinks){let ee=j*(ne.layer-z.layer);H+=D(z,ne)*ee,K+=ee}if(!(K>0))continue;let X=(H/K-z.y0)*A;z.y0+=X,z.y1+=X,O(z)}u===void 0&&V.sort(JM),_(V,N)}}function _(P,A){let N=P.length>>1,F=P[N];I(P,F.y0-s,N-1,A),M(P,F.y1+s,N+1,A),I(P,n,P.length-1,A),M(P,e,0,A)}function M(P,A,N,F){for(;N1e-6&&(B.y0+=V,B.y1+=V),A=B.y1+s}}function I(P,A,N,F){for(;N>=0;--N){let B=P[N],V=(B.y1-A)*F;V>1e-6&&(B.y0-=V,B.y1-=V),A=B.y0-s}}function O({sourceLinks:P,targetLinks:A}){if(h===void 0){for(let{source:{sourceLinks:N}}of A)N.sort(uDe);for(let{target:{targetLinks:N}}of P)N.sort(cDe)}}function C(P){if(h===void 0)for(let{sourceLinks:A,targetLinks:N}of P)A.sort(uDe),N.sort(cDe)}function R(P,A){let N=P.y0-(P.sourceLinks.length-1)*s/2;for(let{target:F,width:B}of P.sourceLinks){if(F===A)break;N+=B+s}for(let{source:F,width:B}of A.targetLinks){if(F===P)break;N-=B}return N}function D(P,A){let N=A.y0-(A.targetLinks.length-1)*s/2;for(let{source:F,width:B}of A.targetLinks){if(F===P)break;N+=B+s}for(let{target:F,width:B}of P.sourceLinks){if(F===A)break;N-=B}return N}return g}var dDe=$(()=>{b();BX();UX();lDe()});function GX(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pDe(){return new GX}var qX,WX,s1,DMt,YX,gDe=$(()=>{b();qX=Math.PI,WX=2*qX,s1=1e-6,DMt=WX-s1;GX.prototype=pDe.prototype={constructor:GX,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-t,l=n-e,u=a-t,h=s-e,f=u*u+h*h;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>s1)if(!(Math.abs(h*o-l*u)>s1)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var d=r-a,p=n-s,g=o*o+l*l,m=d*d+p*p,v=Math.sqrt(g),y=Math.sqrt(f),w=i*Math.tan((qX-Math.acos((g+f-m)/(2*v*y)))/2),k=w/y,E=w/v;Math.abs(k-1)>s1&&(this._+="L"+(t+k*u)+","+(e+k*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>u*p)+","+(this._x1=t+E*o)+","+(this._y1=e+E*l)}},arc:function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,u=e+o,h=1^a,f=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>s1||Math.abs(this._y1-u)>s1)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%WX+WX),f>DMt?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):f>s1&&(this._+="A"+r+","+r+",0,"+ +(f>=qX)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};YX=pDe});var mDe=$(()=>{b();gDe()});function jX(t){return function(){return t}}var vDe=$(()=>{b()});function yDe(t){return t[0]}function bDe(t){return t[1]}var xDe=$(()=>{b()});var wDe,kDe=$(()=>{b();wDe=Array.prototype.slice});function OMt(t){return t.source}function RMt(t){return t.target}function IMt(t){var e=OMt,r=RMt,n=yDe,i=bDe,a=null;function s(){var o,l=wDe.call(arguments),u=e.apply(this,l),h=r.apply(this,l);if(a||(a=o=YX()),t(a,+n.apply(this,(l[0]=u,l)),+i.apply(this,l),+n.apply(this,(l[0]=h,l)),+i.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(e=o,s):e},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(n=typeof o=="function"?o:jX(+o),s):n},s.y=function(o){return arguments.length?(i=typeof o=="function"?o:jX(+o),s):i},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function NMt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function XX(){return IMt(NMt)}var TDe=$(()=>{b();mDe();kDe();vDe();xDe()});var EDe=$(()=>{b();TDe()});function PMt(t){return[t.source.x1,t.y0]}function FMt(t){return[t.target.x0,t.y1]}function KX(){return XX().source(PMt).target(FMt)}var SDe=$(()=>{b();EDe()});var CDe=$(()=>{b();dDe();UX();SDe()});var ADe={};Wt(ADe,{diagram:()=>QMt});var ZX,tD,nD,iD,rD,BMt,zMt,$Mt,VMt,UMt,HMt,qMt,WMt,GMt,_De,YMt,jMt,XMt,KMt,ZMt,QMt,LDe=$(()=>{b();Sr();Cr();CDe();ZX=function(){var t=x(function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],i={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:x(function(l,u,h,f,d,p,g){var m=p.length-1;switch(d){case 7:let v=f.findOrCreateNode(p[m-4].trim().replaceAll('""','"')),y=f.findOrCreateNode(p[m-2].trim().replaceAll('""','"')),w=parseFloat(p[m].trim());f.addLink(v,y,w);break;case 8:case 9:case 11:this.$=p[m];break;case 10:this.$=p[m-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:x(function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},"parseError"),parse:x(function(l){var u=this,h=[0],f=[],d=[null],p=[],g=this.table,m="",v=0,y=0,w=0,k=2,E=1,T=p.slice.call(arguments,1),S=Object.create(this.lexer),L={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(L.yy[_]=this.yy[_]);S.setInput(l,L.yy),L.yy.lexer=S,L.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var M=S.yylloc;p.push(M);var I=S.options&&S.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(ne){h.length=h.length-2*ne,d.length=d.length-ne,p.length=p.length-ne}x(O,"popStack");function C(){var ne;return ne=f.pop()||S.lex()||E,typeof ne!="number"&&(ne instanceof Array&&(f=ne,ne=f.pop()),ne=u.symbols_[ne]||ne),ne}x(C,"lex");for(var R,D,P,A,N,F,B={},V,z,H,K;;){if(P=h[h.length-1],this.defaultActions[P]?A=this.defaultActions[P]:((R===null||typeof R>"u")&&(R=C()),A=g[P]&&g[P][R]),typeof A>"u"||!A.length||!A[0]){var X="";K=[];for(V in g[P])this.terminals_[V]&&V>k&&K.push("'"+this.terminals_[V]+"'");S.showPosition?X="Parse error on line "+(v+1)+`: `+S.showPosition()+` Expecting `+K.join(", ")+", got '"+(this.terminals_[R]||R)+"'":X="Parse error on line "+(v+1)+": Unexpected "+(R==E?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(X,{text:S.match,token:this.terminals_[R]||R,line:S.yylineno,loc:M,expected:K})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+R);switch(A[0]){case 1:h.push(R),d.push(S.yytext),p.push(S.yylloc),h.push(A[1]),R=null,D?(R=D,D=null):(y=S.yyleng,m=S.yytext,v=S.yylineno,M=S.yylloc,w>0&&w--);break;case 2:if(z=this.productions_[A[1]][1],B.$=d[d.length-z],B._$={first_line:p[p.length-(z||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(z||1)].first_column,last_column:p[p.length-1].last_column},I&&(B._$.range=[p[p.length-(z||1)].range[0],p[p.length-1].range[1]]),F=this.performAction.apply(B,[m,y,v,L.yy,A[1],d,p].concat(T)),typeof F<"u")return F;z&&(h=h.slice(0,-1*z*2),d=d.slice(0,-1*z),p=p.slice(0,-1*z)),h.push(this.productions_[A[1]][0]),d.push(B.$),p.push(B._$),H=g[h[h.length-2]][h[h.length-1]],h.push(H);break;case 3:return!0}}return!0},"parse")},a=function(){var o={EOF:1,parseError:x(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:x(function(l,u){return this.yy=u||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:x(function(l){var u=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(l){this.unput(this.match.slice(l))},"less"),pastInput:x(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+` `+u+"^"},"showPosition"),test_match:x(function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in d)this[p]=d[p];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;pu[0].length)){if(u=h,f=p,this.options.backtrack_lexer){if(l=this.test_match(h,d[p]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var u=this.next();return u||this.lex()},"lex"),begin:x(function(u){this.conditionStack.push(u)},"begin"),popState:x(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:x(function(u){this.begin(u)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(u,h,f,d){var p=d;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;break;case 5:return 20;case 6:return this.popState("escaped_text"),18;break;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return o}();i.lexer=a;function s(){this.yy={}}return x(s,"Parser"),s.prototype=i,i.Parser=s,new s}();ZX.parser=ZX;tD=ZX,nD=[],iD=[],rD=new Map,BMt=x(()=>{nD=[],iD=[],rD=new Map,zr()},"clear"),zMt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{x(this,"SankeyLink")}},$Mt=x((t,e,r)=>{nD.push(new zMt(t,e,r))},"addLink"),VMt=class{constructor(t){this.ID=t}static{x(this,"SankeyNode")}},UMt=x(t=>{t=ct.sanitizeText(t,Te());let e=rD.get(t);return e===void 0&&(e=new VMt(t),rD.set(t,e),iD.push(e)),e},"findOrCreateNode"),HMt=x(()=>iD,"getNodes"),qMt=x(()=>nD,"getLinks"),WMt=x(()=>({nodes:iD.map(t=>({id:t.ID})),links:nD.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),GMt={nodesMap:rD,getConfig:x(()=>Te().sankey,"getConfig"),getNodes:HMt,getLinks:qMt,getGraph:WMt,addLink:$Mt,findOrCreateNode:UMt,getAccTitle:Xr,setAccTitle:Wr,getAccDescription:Zr,setAccDescription:Kr,getDiagramTitle:vn,setDiagramTitle:Cn,clear:BMt},_De=class QX{static{x(this,"Uid")}static{this.count=0}static next(e){return new QX(e+ ++QX.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},YMt={left:zX,right:$X,center:VX,justify:Xk},jMt=x(function(t,e,r,n){let{securityLevel:i,sankey:a}=Te(),s=OC.sankey,o;i==="sandbox"&&(o=Je("#i"+e));let l=i==="sandbox"?Je(o.nodes()[0].contentDocument.body):Je("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):Je(`[id="${e}"]`),h=a?.width??s.width,f=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,m=a?.suffix??s.suffix,v=a?.showValues??s.showValues,y=n.db.getGraph(),w=YMt[p];eD().nodeId(I=>I.id).nodeWidth(10).nodePadding(10+(v?15:0)).nodeAlign(w).extent([[0,0],[h,f]])(y);let T=If(Oz);u.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",I=>(I.uid=_De.next("node-")).id).attr("transform",function(I){return"translate("+I.x0+","+I.y0+")"}).attr("x",I=>I.x0).attr("y",I=>I.y0).append("rect").attr("height",I=>I.y1-I.y0).attr("width",I=>I.x1-I.x0).attr("fill",I=>T(I.id));let S=x(({id:I,value:O})=>v?`${I} ${g}${Math.round(O*100)/100}${m}`:I,"getText");u.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",I=>I.x0(I.y1+I.y0)/2).attr("dy",`${v?"0":"0.35"}em`).attr("text-anchor",I=>I.x0(O.uid=_De.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",O=>O.source.x1).attr("x2",O=>O.target.x0);I.append("stop").attr("offset","0%").attr("stop-color",O=>T(O.source.id)),I.append("stop").attr("offset","100%").attr("stop-color",O=>T(O.target.id))}let M;switch(_){case"gradient":M=x(I=>I.uid,"coloring");break;case"source":M=x(I=>T(I.source.id),"coloring");break;case"target":M=x(I=>T(I.target.id),"coloring");break;default:M=_}L.append("path").attr("d",KX()).attr("stroke",M).attr("stroke-width",I=>Math.max(1,I.width)),jc(void 0,u,0,d)},"draw"),XMt={draw:jMt},KMt=x(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` `).trim(),"prepareTextForParsing"),ZMt=tD.parse.bind(tD);tD.parse=t=>ZMt(KMt(t));QMt={parser:tD,db:GMt,renderer:XMt}});var DDe={};Wt(DDe,{diagram:()=>dDt});var MDe,JX,JMt,eDt,tDt,rDt,nDt,k2,iDt,aDt,sDt,oDt,lDt,cDt,uDt,hDt,fDt,dDt,ODe=$(()=>{b();T3();Qn();Jf();Sr();Rb();MDe={packet:[]},JX=structuredClone(MDe),JMt=Er.packet,eDt=x(()=>{let t=Bo({...JMt,...rn().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),tDt=x(()=>JX.packet,"getPacket"),rDt=x(t=>{t.length>0&&JX.packet.push(t)},"pushWord"),nDt=x(()=>{zr(),JX=structuredClone(MDe)},"clear"),k2={pushWord:rDt,getPacket:tDt,getConfig:eDt,clear:nDt,setAccTitle:Wr,getAccTitle:Xr,setDiagramTitle:Cn,getDiagramTitle:vn,getAccDescription:Zr,setAccDescription:Kr},iDt=1e4,aDt=x(t=>{nd(t,k2);let e=-1,r=[],n=1,{bitsPerRow:i}=k2.getConfig();for(let{start:a,end:s,label:o}of t.blocks){if(s&&s{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),oDt={parse:x(async t=>{let e=await wu("packet",t);ie.debug(e),aDt(e)},"parse")},lDt=x((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:u}=a,h=i.getPacket(),f=i.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(f?0:s),g=l*u+2,m=Is(e);m.attr("viewbox",`0 0 ${g} ${p}`),mn(m,p,g,a.useMaxWidth);for(let[v,y]of h.entries())cDt(m,y,v,a);m.append("text").text(f).attr("x",g/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),cDt=x((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{let u=t.append("g"),h=r*(n+a)+a;for(let f of e){let d=f.start%o*s+1,p=(f.end-f.start+1)*s-i;if(u.append("rect").attr("x",d).attr("y",h).attr("width",p).attr("height",n).attr("class","packetBlock"),u.append("text").attr("x",d+p/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!l)continue;let g=f.end===f.start,m=h-2;u.append("text").attr("x",d+(g?p/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(f.start),g||u.append("text").attr("x",d+p).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),uDt={draw:lDt},hDt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},fDt=x(({packet:t}={})=>{let e=Bo(hDt,t);return` .packetByte { font-size: ${e.byteFontSize}; } .packetByte.start { fill: ${e.startByteColor}; } .packetByte.end { fill: ${e.endByteColor}; } .packetLabel { fill: ${e.labelColor}; font-size: ${e.labelFontSize}; } .packetTitle { fill: ${e.titleColor}; font-size: ${e.titleFontSize}; } .packetBlock { stroke: ${e.blockStrokeColor}; stroke-width: ${e.blockStrokeWidth}; fill: ${e.blockFillColor}; } `},"styles"),dDt={parser:oDt,db:k2,renderer:uDt,styles:fDt}});var l9e={};Wt(l9e,{diagram:()=>B9t});function qDe(t){switch(ie.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return ie.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function WDe(t){switch(ie.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}function GDe(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}function YDe(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n}}function lD(t,e,r=0,n=0){ie.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(let p of t.children)lD(p,e);let s=jDt(t);i=s.width,a=s.height,ie.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let p of t.children)p.size&&(ie.debug(`abc95 Setting size of children of ${t.id} id=${p.id} ${i} ${a} ${JSON.stringify(p.size)}`),p.size.width=i*(p.widthInColumns??1)+aa*((p.widthInColumns??1)-1),p.size.height=a,p.size.x=0,p.size.y=0,ie.debug(`abc95 updating size of ${t.id} children child:${p.id} maxWidth:${i} maxHeight:${a}`));for(let p of t.children)lD(p,e,i,a);let o=t.columns??-1,l=0;for(let p of t.children)l+=p.widthInColumns??1;let u=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(p>0){let g=(f-p*aa-aa)/p;ie.debug("abc95 (growing to fit) width",t.id,f,t.size?.width,g);for(let m of t.children)m.size&&(m.size.width=g)}}t.size={width:f,height:d,x:0,y:0}}ie.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function oK(t,e){ie.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(ie.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*aa;ie.debug("widthOfChildren 88",i,"posX");let a=0;ie.debug("abc91 block?.size?.x",t.id,t?.size?.x);let s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-aa,o=0;for(let l of t.children){let u=t;if(!l.size)continue;let{width:h,height:f}=l.size,{px:d,py:p}=YDe(r,a);if(p!=o&&(o=p,s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-aa,ie.debug("New row in layout for block",t.id," and child ",l.id,o)),ie.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${a} (px, py) ${d},${p} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${h}${aa}`),u.size){let g=h/2;l.size.x=s+aa+g,ie.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${g} padding=${aa} width=${h} halfWidth=${g} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${h*(l?.widthInColumns??1)/2}`),s=l.size.x+g,l.size.y=u.size.y-u.size.height/2+p*(f+aa)+f/2+aa,ie.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${aa}${g}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${h*(l?.widthInColumns??1)/2}`)}l.children&&oK(l,e),a+=l?.widthInColumns??1,ie.debug("abc88 columnsPos",l,a)}}ie.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function lK(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:a,y:s,width:o,height:l}=t.size;a-o/2n&&(n=a+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=lK(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function jDe(t){let e=t.getBlock("root");if(!e)return;lD(e,t,0,0),oK(e,t),ie.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=lK(e),s=a-n,o=i-r;return{x:r,y:n,width:o,height:s}}function rK(t,e){e&&t.attr("style",e)}function XDe(t){let e=Je(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),rK(a,t.labelStyle),a.attr("class",i),rK(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}function Kk(t,e){Te().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function KDe(t,e){return t.intersect(e)}function ZDe(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function t9e(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(g){s=Math.min(s,g.x),o=Math.min(o,g.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-s,u=i-t.height/2-o,h=0;h1&&a.sort(function(g,m){var v=g.x-r.x,y=g.y-r.y,w=Math.sqrt(v*v+y*y),k=m.x-r.x,E=m.y-r.y,T=Math.sqrt(k*k+E*E);return w{i.push(o,0)},"addBorder"),s=x(o=>{i.push(0,o)},"skipBorder");e.includes("t")?(ie.debug("add top border"),a(r)):s(r),e.includes("r")?(ie.debug("add right border"),a(n)):s(n),e.includes("b")?(ie.debug("add bottom border"),a(r)):s(r),e.includes("l")?(ie.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "))}function cK(t,e,r=!1){let n=t,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",o;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}let l=L6(n?.styles??[]),u=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:i,style:l.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:o??rn()?.block?.padding??0}}async function n9e(t,e,r){let n=cK(e,r,!1);if(n.type==="group")return;let i=rn(),a=await r9e(t,n,{config:i}),s=a.node().getBBox(),o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(o),a.remove()}async function i9e(t,e,r){let n=cK(e,r,!0);if(r.getBlock(n.id).type!=="space"){let a=rn();await r9e(t,n,{config:a}),e.intersect=n?.intersect,I9t(n)}}async function uD(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&await uD(t,i.children,r,n)}async function a9e(t,e,r){await uD(t,e,r,n9e)}async function s9e(t,e,r){await uD(t,e,r,i9e)}async function o9e(t,e,r,n,i){let a=new Yr({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of e)if(s.start&&s.end){let o=n.getBlock(s.start),l=n.getBlock(s.end);if(o?.size&&l?.size){let u=o.size,h=l.size,f=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}];r9t(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await QDt(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),JDt({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var eK,pDt,Mu,aK,tK,RDe,IDe,gDt,UDe,mDt,oD,vDt,yDt,bDt,xDt,HDe,sK,Zk,wDt,NDe,kDt,TDt,EDt,SDt,CDt,_Dt,ADt,LDt,MDt,DDt,ODt,RDt,aD,IDt,NDt,PDt,FDt,BDt,zDt,$Dt,VDt,UDt,HDt,qDt,WDt,GDt,YDt,aa,jDt,XDt,Dc,KDt,ZDt,PDe,nK,Us,QDt,JDt,e9t,t9t,FDe,r9t,n9t,i9t,a9t,QDe,s9t,o9t,l9t,c9t,u9t,Ci,Ka,Ki,h9t,f9t,BDe,Il,zDe,d9t,p9t,g9t,m9t,v9t,y9t,b9t,x9t,w9t,k9t,T9t,E9t,S9t,C9t,_9t,A9t,L9t,M9t,D9t,$De,O9t,R9t,VDe,sD,r9e,I9t,N9t,P9t,F9t,B9t,c9e=$(()=>{b();gh();Kl();ro();Qn();Sr();OV();ql();Cr();qo();Cr();Cr();Cr();Cr();eK=function(){var t=x(function(k,E,T,S){for(T=T||{},S=k.length;S--;T[k[S]]=E);return T},"o"),e=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],o=[1,17],l=[1,18],u=[8,30],h=[8,21,28,29,30,31,32,40,44,47],f=[1,23],d=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],g=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],v={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:x(function(E,T,S,L,_,M,I){var O=M.length-1;switch(_){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",M[O-1]),L.setHierarchy(M[O-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",M[O]),typeof M[O].length=="number"?this.$=M[O]:this.$=[M[O]];break;case 13:L.getLogger().debug("Rule: statement #2: ",M[O-1]),this.$=[M[O-1]].concat(M[O]);break;case 14:L.getLogger().debug("Rule: link: ",M[O],E),this.$={edgeTypeStr:M[O],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",M[O-3],M[O-1],M[O]),this.$={edgeTypeStr:M[O],label:M[O-1]};break;case 18:let C=parseInt(M[O]),R=L.generateId();this.$={id:R,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",M[O-2],M[O-1],M[O]," typestr: ",M[O-1].edgeTypeStr);let D=L.edgeStrToEdgeData(M[O-1].edgeTypeStr);this.$=[{id:M[O-2].id,label:M[O-2].label,type:M[O-2].type,directions:M[O-2].directions},{id:M[O-2].id+"-"+M[O].id,start:M[O-2].id,end:M[O].id,label:M[O-1].label,type:"edge",directions:M[O].directions,arrowTypeEnd:D,arrowTypeStart:"arrow_open"},{id:M[O].id,label:M[O].label,type:L.typeStr2Type(M[O].typeStr),directions:M[O].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",M[O-1],M[O]),this.$={id:M[O-1].id,label:M[O-1].label,type:L.typeStr2Type(M[O-1].typeStr),directions:M[O-1].directions,widthInColumns:parseInt(M[O],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",M[O]),this.$={id:M[O].id,label:M[O].label,type:L.typeStr2Type(M[O].typeStr),directions:M[O].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",M[O]),this.$={type:"column-setting",columns:M[O]==="auto"?-1:parseInt(M[O])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",M[O-2],M[O-1]);let P=L.generateId();this.$={...M[O-2],type:"composite",children:M[O-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",M[O-2],M[O-1],M[O]);let A=L.generateId();this.$={id:A,type:"composite",label:"",children:M[O-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",M[O]),this.$={id:M[O]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",M[O-1],M[O]),this.$={id:M[O-1],label:M[O].label,typeStr:M[O].typeStr,directions:M[O].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",M[O]),this.$=[M[O]];break;case 32:L.getLogger().debug("Rule: dirList: ",M[O-1],M[O]),this.$=[M[O-1]].concat(M[O]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",M[O-2],M[O-1],M[O]),this.$={typeStr:M[O-2]+M[O],label:M[O-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",M[O-3],M[O-2]," #3:",M[O-1],M[O]),this.$={typeStr:M[O-3]+M[O],label:M[O-2],directions:M[O-1]};break;case 35:case 36:this.$={type:"classDef",id:M[O-1].trim(),css:M[O].trim()};break;case 37:this.$={type:"applyClass",id:M[O-1].trim(),styleClass:M[O].trim()};break;case 38:this.$={type:"applyStyles",id:M[O-1].trim(),stylesStr:M[O].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:r,29:n,31:i,32:a,40:s,44:o,47:l}),t(h,[2,16],{14:22,15:f,16:d}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(g,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},t(p,[2,24]),{11:37,13:4,14:22,15:f,16:d,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},t(h,[2,27]),t(g,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},t(g,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:x(function(E,T){if(T.recoverable)this.trace(E);else{var S=new Error(E);throw S.hash=T,S}},"parseError"),parse:x(function(E){var T=this,S=[0],L=[],_=[null],M=[],I=this.table,O="",C=0,R=0,D=0,P=2,A=1,N=M.slice.call(arguments,1),F=Object.create(this.lexer),B={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(B.yy[V]=this.yy[V]);F.setInput(E,B.yy),B.yy.lexer=F,B.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var z=F.yylloc;M.push(z);var H=F.options&&F.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function K(le){S.length=S.length-2*le,_.length=_.length-le,M.length=M.length-le}x(K,"popStack");function X(){var le;return le=L.pop()||F.lex()||A,typeof le!="number"&&(le instanceof Array&&(L=le,le=L.pop()),le=T.symbols_[le]||le),le}x(X,"lex");for(var ne,j,ee,Q,G,Z,te={},oe,de,pe,re;;){if(ee=S[S.length-1],this.defaultActions[ee]?Q=this.defaultActions[ee]:((ne===null||typeof ne>"u")&&(ne=X()),Q=I[ee]&&I[ee][ne]),typeof Q>"u"||!Q.length||!Q[0]){var Be="";re=[];for(oe in I[ee])this.terminals_[oe]&&oe>P&&re.push("'"+this.terminals_[oe]+"'");F.showPosition?Be="Parse error on line "+(C+1)+`: `+F.showPosition()+` Expecting `+re.join(", ")+", got '"+(this.terminals_[ne]||ne)+"'":Be="Parse error on line "+(C+1)+": Unexpected "+(ne==A?"end of input":"'"+(this.terminals_[ne]||ne)+"'"),this.parseError(Be,{text:F.match,token:this.terminals_[ne]||ne,line:F.yylineno,loc:z,expected:re})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ee+", token: "+ne);switch(Q[0]){case 1:S.push(ne),_.push(F.yytext),M.push(F.yylloc),S.push(Q[1]),ne=null,j?(ne=j,j=null):(R=F.yyleng,O=F.yytext,C=F.yylineno,z=F.yylloc,D>0&&D--);break;case 2:if(de=this.productions_[Q[1]][1],te.$=_[_.length-de],te._$={first_line:M[M.length-(de||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(de||1)].first_column,last_column:M[M.length-1].last_column},H&&(te._$.range=[M[M.length-(de||1)].range[0],M[M.length-1].range[1]]),Z=this.performAction.apply(te,[O,R,C,B.yy,Q[1],_,M].concat(N)),typeof Z<"u")return Z;de&&(S=S.slice(0,-1*de*2),_=_.slice(0,-1*de),M=M.slice(0,-1*de)),S.push(this.productions_[Q[1]][0]),_.push(te.$),M.push(te._$),pe=I[S[S.length-2]][S[S.length-1]],S.push(pe);break;case 3:return!0}}return!0},"parse")},y=function(){var k={EOF:1,parseError:x(function(T,S){if(this.yy.parser)this.yy.parser.parseError(T,S);else throw new Error(T)},"parseError"),setInput:x(function(E,T){return this.yy=T||this.yy||{},this._input=E,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var E=this._input[0];this.yytext+=E,this.yyleng++,this.offset++,this.match+=E,this.matched+=E;var T=E.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),E},"input"),unput:x(function(E){var T=E.length,S=E.split(/(?:\r\n?|\n)/g);this._input=E+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1&&(this.yylineno-=S.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:S?(S.length===L.length?this.yylloc.first_column:0)+L[L.length-S.length].length-S[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(E){this.unput(this.match.slice(E))},"less"),pastInput:x(function(){var E=this.matched.substr(0,this.matched.length-this.match.length);return(E.length>20?"...":"")+E.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var E=this.match;return E.length<20&&(E+=this._input.substr(0,20-E.length)),(E.substr(0,20)+(E.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var E=this.pastInput(),T=new Array(E.length+1).join("-");return E+this.upcomingInput()+` `+T+"^"},"showPosition"),test_match:x(function(E,T){var S,L,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),L=E[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+E[0].length},this.yytext+=E[0],this.match+=E[0],this.matches=E,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(E[0].length),this.matched+=E[0],S=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var M in _)this[M]=_[M];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var E,T,S,L;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),M=0;M<_.length;M++)if(S=this._input.match(this.rules[_[M]]),S&&(!T||S[0].length>T[0].length)){if(T=S,L=M,this.options.backtrack_lexer){if(E=this.test_match(S,_[M]),E!==!1)return E;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(E=this.test_match(T,_[L]),E!==!1?E:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var T=this.next();return T||this.lex()},"lex"),begin:x(function(T){this.conditionStack.push(T)},"begin"),popState:x(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:x(function(T){this.begin(T)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(T,S,L,_){var M=_;switch(L){case 0:return 10;case 1:return T.getLogger().debug("Found space-block"),31;break;case 2:return T.getLogger().debug("Found nl-block"),31;break;case 3:return T.getLogger().debug("Found space-block"),29;break;case 4:T.getLogger().debug(".",S.yytext);break;case 5:T.getLogger().debug("_",S.yytext);break;case 6:return 5;case 7:return S.yytext=-1,28;break;case 8:return S.yytext=S.yytext.replace(/columns\s+/,""),T.getLogger().debug("COLUMNS (LEX)",S.yytext),28;break;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:T.getLogger().debug("LEX: POPPING STR:",S.yytext),this.popState();break;case 14:return T.getLogger().debug("LEX: STR end:",S.yytext),"STR";break;case 15:return S.yytext=S.yytext.replace(/space\:/,""),T.getLogger().debug("SPACE NUM (LEX)",S.yytext),21;break;case 16:return S.yytext="1",T.getLogger().debug("COLUMNS (LEX)",S.yytext),21;break;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;break;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 22:return this.popState(),this.pushState("CLASSDEFID"),41;break;case 23:return this.popState(),42;break;case 24:return this.pushState("CLASS"),44;break;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;break;case 26:return this.popState(),46;break;case 27:return this.pushState("STYLE_STMNT"),47;break;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;break;case 29:return this.popState(),49;break;case 30:return this.pushState("acc_title"),"acc_title";break;case 31:return this.popState(),"acc_title_value";break;case 32:return this.pushState("acc_descr"),"acc_descr";break;case 33:return this.popState(),"acc_descr_value";break;case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 40:return this.popState(),T.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 41:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 43:return this.popState(),T.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 44:return this.popState(),T.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 45:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 46:return this.popState(),T.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 47:return this.popState(),T.getLogger().debug("Lex: ("),"NODE_DEND";break;case 48:return this.popState(),T.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 49:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 51:return this.popState(),T.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 52:return this.popState(),T.getLogger().debug("Lex: )"),"NODE_DEND";break;case 53:return this.popState(),T.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 54:return this.popState(),T.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 55:return T.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;break;case 56:return T.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;break;case 57:return T.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;break;case 58:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 59:return T.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;break;case 60:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 61:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 62:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 63:return T.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;break;case 64:return T.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;break;case 65:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 66:return this.pushState("NODE"),36;break;case 67:return this.pushState("NODE"),36;break;case 68:return this.pushState("NODE"),36;break;case 69:return this.pushState("NODE"),36;break;case 70:return this.pushState("NODE"),36;break;case 71:return this.pushState("NODE"),36;break;case 72:return this.pushState("NODE"),36;break;case 73:return T.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;break;case 74:return this.pushState("BLOCK_ARROW"),T.getLogger().debug("LEX ARR START"),38;break;case 75:return T.getLogger().debug("Lex: NODE_ID",S.yytext),32;break;case 76:return T.getLogger().debug("Lex: EOF",S.yytext),8;break;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:T.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:T.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return T.getLogger().debug("LEX: NODE_DESCR:",S.yytext),"NODE_DESCR";break;case 84:T.getLogger().debug("LEX POPPING"),this.popState();break;case 85:T.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (right): dir:",S.yytext),"DIR";break;case 87:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (left):",S.yytext),"DIR";break;case 88:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (x):",S.yytext),"DIR";break;case 89:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (y):",S.yytext),"DIR";break;case 90:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (up):",S.yytext),"DIR";break;case 91:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (down):",S.yytext),"DIR";break;case 92:return S.yytext="]>",T.getLogger().debug("Lex (ARROW_DIR end):",S.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 93:return T.getLogger().debug("Lex: LINK","#"+S.yytext+"#"),15;break;case 94:return T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 95:return T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 96:return T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 97:return T.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 98:return T.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 99:return T.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 100:this.pushState("md_string");break;case 101:return T.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 102:return this.popState(),T.getLogger().debug("Lex: LINK","#"+S.yytext+"#"),15;break;case 103:return this.popState(),T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 104:return this.popState(),T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 105:return T.getLogger().debug("Lex: COLON",S.yytext),S.yytext=S.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return k}();v.lexer=y;function w(){this.yy={}}return x(w,"Parser"),w.prototype=v,v.Parser=w,new w}();eK.parser=eK;pDt=eK,Mu=new Map,aK=[],tK=new Map,RDe="color",IDe="fill",gDt="bgFill",UDe=",",mDt=Te(),oD=new Map,vDt=x(t=>ct.sanitizeText(t,mDt),"sanitizeText"),yDt=x(function(t,e=""){let r=oD.get(t);r||(r={id:t,styles:[],textStyles:[]},oD.set(t,r)),e?.split(UDe).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(RDe).exec(n)){let s=i.replace(IDe,gDt).replace(RDe,IDe);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),bDt=x(function(t,e=""){let r=Mu.get(t);e!=null&&(r.styles=e.split(UDe))},"addStyle2Node"),xDt=x(function(t,e){t.split(",").forEach(function(r){let n=Mu.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Mu.set(i,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),HDe=x((t,e)=>{let r=t.flat(),n=[];for(let i of r){if(i.label&&(i.label=vDt(i.label)),i.type==="classDef"){yDt(i.id,i.css);continue}if(i.type==="applyClass"){xDt(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){i?.stylesStr&&bDt(i.id,i?.stylesStr);continue}if(i.type==="column-setting")e.columns=i.columns??-1;else if(i.type==="edge"){let a=(tK.get(i.id)??0)+1;tK.set(i.id,a),i.id=a+"-"+i.id,aK.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);let a=Mu.get(i.id);if(a===void 0?Mu.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&HDe(i.children,i),i.type==="space"){let s=i.width??1;for(let o=0;o{ie.debug("Clear called"),zr(),Zk={id:"root",type:"composite",children:[],columns:-1},Mu=new Map([["root",Zk]]),sK=[],oD=new Map,aK=[],tK=new Map},"clear");x(qDe,"typeStr2Type");x(WDe,"edgeTypeStr2Type");x(GDe,"edgeStrToEdgeData");NDe=0,kDt=x(()=>(NDe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+NDe),"generateId"),TDt=x(t=>{Zk.children=t,HDe(t,Zk),sK=Zk.children},"setHierarchy"),EDt=x(t=>{let e=Mu.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),SDt=x(()=>[...Mu.values()],"getBlocksFlat"),CDt=x(()=>sK||[],"getBlocks"),_Dt=x(()=>aK,"getEdges"),ADt=x(t=>Mu.get(t),"getBlock"),LDt=x(t=>{Mu.set(t.id,t)},"setBlock"),MDt=x(()=>console,"getLogger"),DDt=x(function(){return oD},"getClasses"),ODt={getConfig:x(()=>rn().block,"getConfig"),typeStr2Type:qDe,edgeTypeStr2Type:WDe,edgeStrToEdgeData:GDe,getLogger:MDt,getBlocksFlat:SDt,getBlocks:CDt,getEdges:_Dt,setHierarchy:TDt,getBlock:ADt,setBlock:LDt,getColumns:EDt,getClasses:DDt,clear:wDt,generateId:kDt},RDt=ODt,aD=x((t,e)=>{let r=ww,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return ll(n,i,a,e)},"fade"),IDt=x(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .cluster-label text { fill: ${t.titleColor}; } .cluster-label span,p { color: ${t.titleColor}; } .label text,span,p { fill: ${t.nodeTextColor||t.textColor}; color: ${t.nodeTextColor||t.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .flowchart-label text { text-anchor: middle; } // .flowchart-label .text-outer-tspan { // text-anchor: middle; // } // .flowchart-label .text-inner-tspan { // text-anchor: start; // } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${t.arrowheadColor}; } .edgePath .path { stroke: ${t.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${t.lineColor}; fill: none; } .edgeLabel { background-color: ${t.edgeLabelBackground}; rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${aD(t.edgeLabelBackground,.5)}; // background-color: } .node .cluster { // fill: ${aD(t.mainBkg,.5)}; fill: ${aD(t.clusterBkg,.5)}; stroke: ${aD(t.clusterBorder,.2)}; box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; stroke-width: 1px; } .cluster text { fill: ${t.titleColor}; } .cluster span,p { color: ${t.titleColor}; } /* .cluster div { color: ${t.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${t.fontFamily}; font-size: 12px; background: ${t.tertiaryColor}; border: 1px solid ${t.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } `,"getStyles"),NDt=IDt,PDt=x((t,e,r,n)=>{e.forEach(i=>{GDt[i](t,r,n)})},"insertMarkers"),FDt=x((t,e,r)=>{ie.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),BDt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),zDt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),$Dt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),VDt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),UDt=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),HDt=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),qDt=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),WDt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),GDt={extension:FDt,composition:BDt,aggregation:zDt,dependency:$Dt,lollipop:VDt,point:UDt,circle:HDt,cross:qDt,barb:WDt},YDt=PDt,aa=Te()?.block?.padding??8;x(YDe,"calculateBlockPosition");jDt=x(t=>{let e=0,r=0;for(let n of t.children){let{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};ie.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),n.type!=="space"&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");x(lD,"setBlockSizes");x(oK,"layoutBlocks");x(lK,"findBounds");x(jDe,"layout");x(rK,"applyStyle");x(XDe,"addHtmlLabel");XDt=x((t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),gn(Te().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),ie.debug("vertexText"+i);let a={isNode:n,label:z6(vl(i)),labelStyle:e.replace("fill:","color:")};return XDe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Dc=XDt,KDt=x((t,e,r,n,i)=>{e.arrowTypeStart&&PDe(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&PDe(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),ZDt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},PDe=x((t,e,r,n,i,a)=>{let s=ZDt[r];if(!s){ie.warn(`Unknown arrow type: ${r}`);return}let o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),nK={},Us={},QDt=x((t,e)=>{let r=Te(),n=gn(r.flowchart.htmlLabels),i=e.labelType==="markdown"?ls(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):Dc(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();if(n){let u=i.children[0],h=Je(i);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),nK[e.id]=a,e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){let u=Dc(e.startLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Us[e.id]||(Us[e.id]={}),Us[e.id].startLeft=h,Kk(l,e.startLabelLeft)}if(e.startLabelRight){let u=Dc(e.startLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Us[e.id]||(Us[e.id]={}),Us[e.id].startRight=h,Kk(l,e.startLabelRight)}if(e.endLabelLeft){let u=Dc(e.endLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),Us[e.id]||(Us[e.id]={}),Us[e.id].endLeft=h,Kk(l,e.endLabelLeft)}if(e.endLabelRight){let u=Dc(e.endLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),Us[e.id]||(Us[e.id]={}),Us[e.id].endRight=h,Kk(l,e.endLabelRight)}return i},"insertEdgeLabel");x(Kk,"setTerminalWidth");JDt=x((t,e)=>{ie.debug("Moving label abc88 ",t.id,t.label,nK[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=Te(),{subGraphTitleTotalMargin:i}=Af(n);if(t.label){let a=nK[t.id],s=t.x,o=t.y;if(r){let l=tr.calcLabelPosition(r);ie.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=Us[t.id].startLeft,s=t.x,o=t.y;if(r){let l=tr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=Us[t.id].startRight,s=t.x,o=t.y;if(r){let l=tr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=Us[t.id].endLeft,s=t.x,o=t.y;if(r){let l=tr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=Us[t.id].endRight,s=t.x,o=t.y;if(r){let l=tr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),e9t=x((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),t9t=x((t,e,r)=>{ie.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{ie.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!e9t(e,a)&&!i){let s=t9t(e,n,a),o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),r9t=x(function(t,e,r,n,i,a,s){let o=r.points;ie.debug("abc88 InsertEdge: edge=",r,"e=",e);let l=!1,u=a.node(e.v);var h=a.node(e.w);h?.intersect&&u?.intersect&&(o=o.slice(1,r.points.length-1),o.unshift(u.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(ie.debug("to cluster abc88",n[r.toCluster]),o=FDe(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(ie.debug("from cluster abc88",n[r.fromCluster]),o=FDe(o.reverse(),n[r.fromCluster].node).reverse(),l=!0);let f=o.filter(E=>!Number.isNaN(E.y)),d=au;r.curve&&(i==="graph"||i==="flowchart")&&(d=r.curve);let{x:p,y:g}=Z6(r),m=Ro().x(p).y(g).curve(d),v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}let y=t.append("path").attr("d",m(f)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style),w="";(Te().flowchart.arrowMarkerAbsolute||Te().state.arrowMarkerAbsolute)&&(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,w=w.replace(/\(/g,"\\("),w=w.replace(/\)/g,"\\)")),KDt(y,r,w,s,i);let k={};return l&&(k.updatedPath=o),k.originalPath=r.points,k},"insertEdge"),n9t=x(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),i9t=x((t,e,r)=>{let n=n9t(t),i=2,a=e.height+2*r.padding,s=a/i,o=e.width+2*s+r.padding,l=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:o/2,y:2*l},{x:o-s,y:0},{x:o,y:0},{x:o,y:-a/3},{x:o+2*l,y:-a/2},{x:o,y:-2*a/3},{x:o,y:-a},{x:o-s,y:-a},{x:o/2,y:-a-2*l},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*l,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:o-s,y:-a},{x:o,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:-s},{x:o,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:o,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:o,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:o,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:o,y:0},{x:0,y:-s},{x:o,y:-a}]:n.has("left")&&n.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-a}]:n.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a+l}]:n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l}]:n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");x(KDe,"intersectNode");a9t=KDe;x(ZDe,"intersectEllipse");QDe=ZDe;x(JDe,"intersectCircle");s9t=JDe;x(e9e,"intersectLine");x(iK,"sameSign");o9t=e9e,l9t=t9e;x(t9e,"intersectPolygon");c9t=x((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),u9t=c9t,Ci={node:a9t,circle:s9t,ellipse:QDe,polygon:l9t,rect:u9t},Ka=x(async(t,e,r,n)=>{let i=Te(),a,s=e.useHtmlLabels||gn(i.flowchart.htmlLabels);r?a=r:a="node default";let o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),u;e.labelText===void 0?u="":u=typeof e.labelText=="string"?e.labelText:e.labelText[0];let h=l.node(),f;e.labelType==="markdown"?f=ls(l,Nr(vl(u),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):f=h.appendChild(Dc(Nr(vl(u),i),e.labelStyle,!1,n));let d=f.getBBox(),p=e.padding/2;if(gn(i.flowchart.htmlLabels)){let g=f.children[0],m=Je(f),v=g.getElementsByTagName("img");if(v){let y=u.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(w=>new Promise(k=>{function E(){if(w.style.display="flex",w.style.flexDirection="column",y){let T=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,L=parseInt(T,10)*5+"px";w.style.minWidth=L,w.style.maxWidth=L}else w.style.width="100%";k(w)}x(E,"setupImage"),setTimeout(()=>{w.complete&&E()}),w.addEventListener("error",E),w.addEventListener("load",E)})))}d=g.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),Ki=x((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");x(Du,"insertPolygonShape");h9t=x(async(t,e)=>{e.useHtmlLabels||Te().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await Ka(t,e,"node "+e.classes,!0);ie.info("Classes = ",e.classes);let s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Ki(e,s),e.intersect=function(o){return Ci.rect(e,o)},n},"note"),f9t=h9t,BDe=x(t=>t?" "+t:"","formatClass"),Il=x((t,e)=>`${e||"node default"}${BDe(t.classes)} ${BDe(t.class)}`,"getClassesFromNode"),zDe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];ie.info("Question main (Circle)");let l=Du(r,s,s,o);return l.attr("style",e.style),Ki(e,l),e.intersect=function(u){return ie.warn("Intersect called"),Ci.polygon(e,o,u)},r},"question"),d9t=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return Ci.circle(e,14,s)},r},"choice"),p9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=4,a=n.height+e.padding,s=a/i,o=n.width+2*s+e.padding,l=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],u=Du(r,o,a,l);return u.attr("style",e.style),Ki(e,u),e.intersect=function(h){return Ci.polygon(e,l,h)},r},"hexagon"),g9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,void 0,!0),i=2,a=n.height+2*e.padding,s=a/i,o=n.width+2*s+e.padding,l=i9t(e.directions,n,e),u=Du(r,o,a,l);return u.attr("style",e.style),Ki(e,u),e.intersect=function(h){return Ci.polygon(e,l,h)},r},"block_arrow"),m9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Du(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(l){return Ci.polygon(e,s,l)},r},"rect_left_inv_arrow"),v9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=Du(r,i,a,s);return o.attr("style",e.style),Ki(e,o),e.intersect=function(l){return Ci.polygon(e,s,l)},r},"lean_right"),y9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=Du(r,i,a,s);return o.attr("style",e.style),Ki(e,o),e.intersect=function(l){return Ci.polygon(e,s,l)},r},"lean_left"),b9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=Du(r,i,a,s);return o.attr("style",e.style),Ki(e,o),e.intersect=function(l){return Ci.polygon(e,s,l)},r},"trapezoid"),x9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=Du(r,i,a,s);return o.attr("style",e.style),Ki(e,o),e.intersect=function(l){return Ci.polygon(e,s,l)},r},"inv_trapezoid"),w9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=Du(r,i,a,s);return o.attr("style",e.style),Ki(e,o),e.intersect=function(l){return Ci.polygon(e,s,l)},r},"rect_right_inv_arrow"),k9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),o=n.height+s+e.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return Ki(e,u),e.intersect=function(h){let f=Ci.rect(e,h),d=f.x-e.x;if(a!=0&&(Math.abs(d)e.height/2-s)){let p=s*s*(1-d*d/(a*a));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-e.y>0&&(p=-p),f.y+=p}return f},r},"cylinder"),T9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ka(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(cD(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{ie.warn(`Unknown node property ${f}`)})}return Ki(e,a),e.intersect=function(h){return Ci.rect(e,h)},r},"rect"),E9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ka(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(cD(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{ie.warn(`Unknown node property ${f}`)})}return Ki(e,a),e.intersect=function(h){return Ci.rect(e,h)},r},"composite"),S9t=x(async(t,e)=>{let{shapeSvg:r}=await Ka(t,e,"label",!0);ie.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){let s=new Set(Object.keys(e.props));e.props.borders&&(cD(n,e.props.borders,i,a),s.delete("borders")),s.forEach(o=>{ie.warn(`Unknown node property ${o}`)})}return Ki(e,n),e.intersect=function(s){return Ci.rect(e,s)},r},"labelRect");x(cD,"applyNodePropertyBorders");C9t=x((t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l="";typeof o=="object"?l=o[0]:l=o,ie.info("Label text abc79",l,o,typeof o=="object");let u=s.node().appendChild(Dc(l,e.labelStyle,!0,!0)),h={width:0,height:0};if(gn(Te().flowchart.htmlLabels)){let m=u.children[0],v=Je(u);h=m.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}ie.info("Text 2",o);let f=o.slice(1,o.length),d=u.getBBox(),p=s.node().appendChild(Dc(f.join?f.join("
    "):f,e.labelStyle,!0,!0));if(gn(Te().flowchart.htmlLabels)){let m=p.children[0],v=Je(p);h=m.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}let g=e.padding/2;return Je(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+g+5)+")"),Je(u).attr("transform","translate( "+(h.width{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return Ki(e,s),e.intersect=function(o){return Ci.rect(e,o)},r},"stadium"),A9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ka(t,e,Il(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),ie.info("Circle main"),Ki(e,a),e.intersect=function(s){return ie.info("Circle intersect",e,n.width/2+i,s),Ci.circle(e,n.width/2+i,s)},r},"circle"),L9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ka(t,e,Il(e,void 0),!0),a=5,s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),ie.info("DoubleCircle main"),Ki(e,o),e.intersect=function(u){return ie.info("DoubleCircle intersect",e,n.width/2+i+a,u),Ci.circle(e,n.width/2+i+a,u)},r},"doublecircle"),M9t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ka(t,e,Il(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=Du(r,i,a,s);return o.attr("style",e.style),Ki(e,o),e.intersect=function(l){return Ci.polygon(e,s,l)},r},"subroutine"),D9t=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ki(e,n),e.intersect=function(i){return Ci.circle(e,7,i)},r},"start"),$De=x((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;r==="LR"&&(i=10,a=70);let s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return Ki(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return Ci.rect(e,o)},n},"forkJoin"),O9t=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ki(e,i),e.intersect=function(a){return Ci.circle(e,7,a)},r},"end"),R9t=x((t,e)=>{let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line"),h=0,f=n,d=s.insert("g").attr("class","label"),p=0,g=e.classData.annotations?.[0],m=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",v=d.node().appendChild(Dc(m,e.labelStyle,!0,!0)),y=v.getBBox();if(gn(Te().flowchart.htmlLabels)){let _=v.children[0],M=Je(v);y=_.getBoundingClientRect(),M.attr("width",y.width),M.attr("height",y.height)}e.classData.annotations[0]&&(f+=y.height+n,h+=y.width);let w=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(Te().flowchart.htmlLabels?w+="<"+e.classData.type+">":w+="<"+e.classData.type+">");let k=d.node().appendChild(Dc(w,e.labelStyle,!0,!0));Je(k).attr("class","classTitle");let E=k.getBBox();if(gn(Te().flowchart.htmlLabels)){let _=k.children[0],M=Je(k);E=_.getBoundingClientRect(),M.attr("width",E.width),M.attr("height",E.height)}f+=E.height+n,E.width>h&&(h=E.width);let T=[];e.classData.members.forEach(_=>{let M=_.getDisplayDetails(),I=M.displayText;Te().flowchart.htmlLabels&&(I=I.replace(//g,">"));let O=d.node().appendChild(Dc(I,M.cssStyle?M.cssStyle:e.labelStyle,!0,!0)),C=O.getBBox();if(gn(Te().flowchart.htmlLabels)){let R=O.children[0],D=Je(O);C=R.getBoundingClientRect(),D.attr("width",C.width),D.attr("height",C.height)}C.width>h&&(h=C.width),f+=C.height+n,T.push(O)}),f+=i;let S=[];if(e.classData.methods.forEach(_=>{let M=_.getDisplayDetails(),I=M.displayText;Te().flowchart.htmlLabels&&(I=I.replace(//g,">"));let O=d.node().appendChild(Dc(I,M.cssStyle?M.cssStyle:e.labelStyle,!0,!0)),C=O.getBBox();if(gn(Te().flowchart.htmlLabels)){let R=O.children[0],D=Je(O);C=R.getBoundingClientRect(),D.attr("width",C.width),D.attr("height",C.height)}C.width>h&&(h=C.width),f+=C.height+n,S.push(O)}),f+=i,g){let _=(h-y.width)/2;Je(v).attr("transform","translate( "+(-1*h/2+_)+", "+-1*f/2+")"),p=y.height+n}let L=(h-E.width)/2;return Je(k).attr("transform","translate( "+(-1*h/2+L)+", "+(-1*f/2+p)+")"),p+=E.height+n,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,T.forEach(_=>{Je(_).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+i/2)+")");let M=_?.getBBox();p+=(M?.height??0)+n}),p+=i,u.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,S.forEach(_=>{Je(_).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");let M=_?.getBBox();p+=(M?.height??0)+n}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+e.padding).attr("height",f+e.padding),Ki(e,o),e.intersect=function(_){return Ci.rect(e,_)},s},"class_box"),VDe={rhombus:zDe,composite:E9t,question:zDe,rect:T9t,labelRect:S9t,rectWithTitle:C9t,choice:d9t,circle:A9t,doublecircle:L9t,stadium:_9t,hexagon:p9t,block_arrow:g9t,rect_left_inv_arrow:m9t,lean_right:v9t,lean_left:y9t,trapezoid:b9t,inv_trapezoid:x9t,rect_right_inv_arrow:w9t,cylinder:k9t,start:D9t,end:O9t,note:f9t,subroutine:M9t,fork:$De,join:$De,class_box:R9t},sD={},r9e=x(async(t,e,r)=>{let n,i;if(e.link){let a;Te().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await VDe[e.shape](n,e,r)}else i=await VDe[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),sD[e.id]=n,e.haveCallback&&sD[e.id].attr("class",sD[e.id].attr("class")+" clickable"),n},"insertNode"),I9t=x(t=>{let e=sD[t.id];ie.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode");x(cK,"getNodeFromBlock");x(n9e,"calculateBlockSize");x(i9e,"insertBlockPositioned");x(uD,"performOperations");x(a9e,"calculateBlockSizes");x(s9e,"insertBlocks");x(o9e,"insertEdges");N9t=x(function(t,e){return e.db.getClasses()},"getClasses"),P9t=x(async function(t,e,r,n){let{securityLevel:i,block:a}=rn(),s=n.db,o;i==="sandbox"&&(o=Je("#i"+e));let l=i==="sandbox"?Je(o.nodes()[0].contentDocument.body):Je("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):Je(`[id="${e}"]`);YDt(u,["point","circle","cross"],n.type,e);let f=s.getBlocks(),d=s.getBlocksFlat(),p=s.getEdges(),g=u.insert("g").attr("class","block");await a9e(g,f,s);let m=jDe(s);if(await s9e(g,f,s),await o9e(g,p,d,s,e),m){let v=m,y=Math.max(1,Math.round(.125*(v.width/v.height))),w=v.height+y+10,k=v.width+10,{useMaxWidth:E}=a;mn(u,w,k,!!E),ie.debug("Here Bounds",m,v),u.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),F9t={draw:P9t,getClasses:N9t},B9t={parser:pDt,db:RDt,renderer:F9t,styles:NDt}});var hK=Ke((Qk,uK)=>{b();(function(e,r){typeof Qk=="object"&&typeof uK=="object"?uK.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Qk=="object"?Qk.layoutBase=r():e.layoutBase=r()})(Qk,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=28)}([function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(5);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(p+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>p?(this.rect.y-=(this.labelHeight-p)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(p+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u},function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,v){if(m==null&&v==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var w=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(m.owner==v.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=v.owner?null:(w.source=m,w.target=v,w.isInterGraph=!1,this.getEdges().push(w),m.edges.push(w),v!=m&&v.edges.push(w),w)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=m.edges.slice(),y,w=v.length,k=0;k-1&&S>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(T,1),y.target!=y.source&&y.target.edges.splice(S,1);var E=y.source.owner.getEdges().indexOf(y);if(E==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(E,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,v,y,w,k=this.getNodes(),E=k.length,T=0;Tv&&(g=v),m>y&&(m=y)}return g==i.MAX_VALUE?null:(k[0].getParent().paddingLeft!=null?w=k[0].getParent().paddingLeft:w=this.margin,this.left=m-w,this.top=g-w,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,v=-i.MAX_VALUE,y=i.MAX_VALUE,w=-i.MAX_VALUE,k,E,T,S,L,_=this.nodes,M=_.length,I=0;Ik&&(m=k),vT&&(y=T),wk&&(m=k),vT&&(y=T),w=this.nodes.length){var M=0;v.forEach(function(I){I.owner==g&&M++}),M==this.nodes.length&&(this.isConnected=!0)}},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=_,!1;if(uh)return o[0]=d,o[1]=u,o[2]=S,o[3]=f,!1;if(lh?(o[0]=m,o[1]=v,C=!0):(o[0]=g,o[1]=p,C=!0):D===A&&(l>h?(o[0]=d,o[1]=p,C=!0):(o[0]=y,o[1]=v,C=!0)),-P===A?h>l?(o[2]=L,o[3]=_,R=!0):(o[2]=S,o[3]=T,R=!0):P===A&&(h>l?(o[2]=E,o[3]=T,R=!0):(o[2]=M,o[3]=_,R=!0)),C&&R)return!1;if(l>h?u>f?(N=this.getCardinalDirection(D,A,4),F=this.getCardinalDirection(P,A,2)):(N=this.getCardinalDirection(-D,A,3),F=this.getCardinalDirection(-P,A,1)):u>f?(N=this.getCardinalDirection(-D,A,1),F=this.getCardinalDirection(-P,A,3)):(N=this.getCardinalDirection(D,A,2),F=this.getCardinalDirection(P,A,4)),!C)switch(N){case 1:V=p,B=l+-k/A,o[0]=B,o[1]=V;break;case 2:B=y,V=u+w*A,o[0]=B,o[1]=V;break;case 3:V=v,B=l+k/A,o[0]=B,o[1]=V;break;case 4:B=m,V=u+-w*A,o[0]=B,o[1]=V;break}if(!R)switch(F){case 1:H=T,z=h+-O/A,o[2]=z,o[3]=H;break;case 2:z=M,H=f+I*A,o[2]=z,o[3]=H;break;case 3:H=_,z=h+O/A,o[2]=z,o[3]=H;break;case 4:z=L,H=f+-I*A,o[2]=z,o[3]=H;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,v=l.y,y=void 0,w=void 0,k=void 0,E=void 0,T=void 0,S=void 0,L=void 0,_=void 0,M=void 0;return k=d-h,T=u-f,L=f*h-u*d,E=v-g,S=p-m,_=m*g-p*v,M=k*S-E*T,M===0?null:(y=(T*_-S*L)/M,w=(E*L-k*_)/M,new n(y,w))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o=0){var v=(-p+Math.sqrt(p*p-4*d*g))/(2*d),y=(-p-Math.sqrt(p*p-4*d*g))/(2*d),w=null;return v>=0&&v<=1?[v]:y>=0&&y<=1?[y]:w}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i},function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(k.push(T[0]);k.length>0&&g;){var S=k[0];k.splice(0,1),w.add(S);for(var L=S.getEdges(),y=0;y-1&&T.splice(O,1)}w=new Set,E=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,v=this.graphManager.calcLowestCommonAncestor(p.source,p.target),y=0;y0){for(var v=this.edgeToDummyNodes.get(m),y=0;y=0&&g.splice(_,1);var M=E.getNeighborsList();M.forEach(function(C){if(m.indexOf(C)<0){var R=v.get(C),D=R-1;D==1&&S.push(C),v.set(C,D)}})}m=m.concat(S),(g.length==1||g.length==2)&&(y=!0,w=g[0])}return w},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(5);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i},function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,v,y=this.getAllNodes(),w;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),w=new Set,p=0;pk||w>k)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*v)):(k=d.getEstimatedSize()*this.compoundGravityRangeFactor,(y>k||w>k)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=y.length||k>=y[0].length)){for(var E=0;Eu}}]),o}();t.exports=s},function(t,e,r){"use strict";function n(){}n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=function(at){for(var Ue=[];at-- >0;)Ue.push(0);return Ue}(Math.min(this.m+1,this.n)),this.U=function(at){var Ue=function it(pt){if(pt.length==0)return 0;for(var yt=[],Et=0;Et0;)Ue.push(0);return Ue}(this.n),o=function(at){for(var Ue=[];at-- >0;)Ue.push(0);return Ue}(this.m),l=!0,u=!0,h=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),d=0;d=0;A--)if(this.s[A]!==0){for(var N=A+1;N=0;X--){if(function(at,Ue){return at&&Ue}(X0;){var pe=void 0,re=void 0;for(pe=R-2;pe>=-1&&pe!==-1;pe--)if(Math.abs(s[pe])<=de+oe*(Math.abs(this.s[pe])+Math.abs(this.s[pe+1]))){s[pe]=0;break}if(pe===R-2)re=4;else{var Be=void 0;for(Be=R-1;Be>=pe&&Be!==pe;Be--){var le=(Be!==R?Math.abs(s[Be]):0)+(Be!==pe+1?Math.abs(s[Be-1]):0);if(Math.abs(this.s[Be])<=de+oe*le){this.s[Be]=0;break}}Be===pe?re=3:Be===R-1?re=1:(re=2,pe=Be)}switch(pe++,re){case 1:{var Se=s[R-2];s[R-2]=0;for(var Ye=R-2;Ye>=pe;Ye--){var We=n.hypot(this.s[Ye],Se),Ze=this.s[Ye]/We,Qe=Se/We;if(this.s[Ye]=We,Ye!==pe&&(Se=-Qe*s[Ye-1],s[Ye-1]=Ze*s[Ye-1]),u)for(var et=0;et=this.s[pe+1]);){var Ne=this.s[pe];if(this.s[pe]=this.s[pe+1],this.s[pe+1]=Ne,u&&peMath.abs(a)?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):a!=0?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s},t.exports=n},function(t,e,r){"use strict";var n=function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{b();(function(e,r){typeof Jk=="object"&&typeof fK=="object"?fK.exports=r(hK()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Jk=="object"?Jk.coseBase=r(hK()):e.coseBase=r(e.layoutBase)})(Jk,function(t){return(()=>{"use strict";var e={45:(a,s,o)=>{var l={};l.layoutBase=o(551),l.CoSEConstants=o(806),l.CoSEEdge=o(767),l.CoSEGraph=o(880),l.CoSEGraphManager=o(578),l.CoSELayout=o(765),l.CoSENode=o(991),l.ConstraintHandler=o(902),a.exports=l},806:(a,s,o)=>{var l=o(551).FDLayoutConstants;function u(){}for(var h in l)u[h]=l[h];u.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,u.DEFAULT_COMPONENT_SEPERATION=60,u.TILE=!0,u.TILING_PADDING_VERTICAL=10,u.TILING_PADDING_HORIZONTAL=10,u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0,u.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,u.TREE_REDUCTION_ON_INCREMENTAL=!0,u.PURE_INCREMENTAL=u.DEFAULT_INCREMENTAL,a.exports=u},767:(a,s,o)=>{var l=o(551).FDLayoutEdge;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},880:(a,s,o)=>{var l=o(551).LGraph;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},578:(a,s,o)=>{var l=o(551).LGraphManager;function u(f){l.call(this,f)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},765:(a,s,o)=>{var l=o(551).FDLayout,u=o(578),h=o(880),f=o(991),d=o(767),p=o(806),g=o(902),m=o(551).FDLayoutConstants,v=o(551).LayoutConstants,y=o(551).Point,w=o(551).PointD,k=o(551).DimensionD,E=o(551).Layout,T=o(551).Integer,S=o(551).IGeometry,L=o(551).LGraph,_=o(551).Transform,M=o(551).LinkedList;function I(){l.call(this),this.toBeTiled={},this.constraints={}}I.prototype=Object.create(l.prototype);for(var O in l)I[O]=l[O];I.prototype.newGraphManager=function(){var C=new u(this);return this.graphManager=C,C},I.prototype.newGraph=function(C){return new h(null,this.graphManager,C)},I.prototype.newNode=function(C){return new f(this.graphManager,C)},I.prototype.newEdge=function(C){return new d(null,null,C)},I.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},I.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},I.prototype.layout=function(){var C=v.DEFAULT_CREATE_BENDS_AS_NEEDED;return C&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},I.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(p.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var R=new Set(this.getAllNodes()),D=this.nodesWithGravity.filter(function(N){return R.has(N)});this.graphManager.setAllNodesToApplyGravitation(D)}}else{var C=this.getFlatForest();if(C.length>0)this.positionNodesRadially(C);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var R=new Set(this.getAllNodes()),D=this.nodesWithGravity.filter(function(P){return R.has(P)});this.graphManager.setAllNodesToApplyGravitation(D),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),p.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},I.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var C=new Set(this.getAllNodes()),R=this.nodesWithGravity.filter(function(A){return C.has(A)});this.graphManager.setAllNodesToApplyGravitation(R),this.graphManager.updateBounds(),this.updateGrid(),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var D=!this.isTreeGrowing&&!this.isGrowthFinished,P=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(D,P),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},I.prototype.getPositionsData=function(){for(var C=this.graphManager.getAllNodes(),R={},D=0;D0&&this.updateDisplacements();for(var D=0;D0&&(P.fixedNodeWeight=N)}}if(this.constraints.relativePlacementConstraint){var F=new Map,B=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(ee){C.fixedNodesOnHorizontal.add(ee),C.fixedNodesOnVertical.add(ee)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var V=this.constraints.alignmentConstraint.vertical,D=0;D=2*ee.length/3;Z--)Q=Math.floor(Math.random()*(Z+1)),G=ee[Z],ee[Z]=ee[Q],ee[Q]=G;return ee},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(ee){if(ee.left){var Q=F.has(ee.left)?F.get(ee.left):ee.left,G=F.has(ee.right)?F.get(ee.right):ee.right;C.nodesInRelativeHorizontal.includes(Q)||(C.nodesInRelativeHorizontal.push(Q),C.nodeToRelativeConstraintMapHorizontal.set(Q,[]),C.dummyToNodeForVerticalAlignment.has(Q)?C.nodeToTempPositionMapHorizontal.set(Q,C.idToNodeMap.get(C.dummyToNodeForVerticalAlignment.get(Q)[0]).getCenterX()):C.nodeToTempPositionMapHorizontal.set(Q,C.idToNodeMap.get(Q).getCenterX())),C.nodesInRelativeHorizontal.includes(G)||(C.nodesInRelativeHorizontal.push(G),C.nodeToRelativeConstraintMapHorizontal.set(G,[]),C.dummyToNodeForVerticalAlignment.has(G)?C.nodeToTempPositionMapHorizontal.set(G,C.idToNodeMap.get(C.dummyToNodeForVerticalAlignment.get(G)[0]).getCenterX()):C.nodeToTempPositionMapHorizontal.set(G,C.idToNodeMap.get(G).getCenterX())),C.nodeToRelativeConstraintMapHorizontal.get(Q).push({right:G,gap:ee.gap}),C.nodeToRelativeConstraintMapHorizontal.get(G).push({left:Q,gap:ee.gap})}else{var Z=B.has(ee.top)?B.get(ee.top):ee.top,te=B.has(ee.bottom)?B.get(ee.bottom):ee.bottom;C.nodesInRelativeVertical.includes(Z)||(C.nodesInRelativeVertical.push(Z),C.nodeToRelativeConstraintMapVertical.set(Z,[]),C.dummyToNodeForHorizontalAlignment.has(Z)?C.nodeToTempPositionMapVertical.set(Z,C.idToNodeMap.get(C.dummyToNodeForHorizontalAlignment.get(Z)[0]).getCenterY()):C.nodeToTempPositionMapVertical.set(Z,C.idToNodeMap.get(Z).getCenterY())),C.nodesInRelativeVertical.includes(te)||(C.nodesInRelativeVertical.push(te),C.nodeToRelativeConstraintMapVertical.set(te,[]),C.dummyToNodeForHorizontalAlignment.has(te)?C.nodeToTempPositionMapVertical.set(te,C.idToNodeMap.get(C.dummyToNodeForHorizontalAlignment.get(te)[0]).getCenterY()):C.nodeToTempPositionMapVertical.set(te,C.idToNodeMap.get(te).getCenterY())),C.nodeToRelativeConstraintMapVertical.get(Z).push({bottom:te,gap:ee.gap}),C.nodeToRelativeConstraintMapVertical.get(te).push({top:Z,gap:ee.gap})}});else{var H=new Map,K=new Map;this.constraints.relativePlacementConstraint.forEach(function(ee){if(ee.left){var Q=F.has(ee.left)?F.get(ee.left):ee.left,G=F.has(ee.right)?F.get(ee.right):ee.right;H.has(Q)?H.get(Q).push(G):H.set(Q,[G]),H.has(G)?H.get(G).push(Q):H.set(G,[Q])}else{var Z=B.has(ee.top)?B.get(ee.top):ee.top,te=B.has(ee.bottom)?B.get(ee.bottom):ee.bottom;K.has(Z)?K.get(Z).push(te):K.set(Z,[te]),K.has(te)?K.get(te).push(Z):K.set(te,[Z])}});var X=function(Q,G){var Z=[],te=[],oe=new M,de=new Set,pe=0;return Q.forEach(function(re,Be){if(!de.has(Be)){Z[pe]=[],te[pe]=!1;var le=Be;for(oe.push(le),de.add(le),Z[pe].push(le);oe.length!=0;){le=oe.shift(),G.has(le)&&(te[pe]=!0);var Se=Q.get(le);Se.forEach(function(Ye){de.has(Ye)||(oe.push(Ye),de.add(Ye),Z[pe].push(Ye))})}pe++}}),{components:Z,isFixed:te}},ne=X(H,C.fixedNodesOnHorizontal);this.componentsOnHorizontal=ne.components,this.fixedComponentsOnHorizontal=ne.isFixed;var j=X(K,C.fixedNodesOnVertical);this.componentsOnVertical=j.components,this.fixedComponentsOnVertical=j.isFixed}}},I.prototype.updateDisplacements=function(){var C=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(j){var ee=C.idToNodeMap.get(j.nodeId);ee.displacementX=0,ee.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var R=this.constraints.alignmentConstraint.vertical,D=0;D1){var B;for(B=0;BP&&(P=Math.floor(F.y)),N=Math.floor(F.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new w(v.WORLD_CENTER_X-F.x/2,v.WORLD_CENTER_Y-F.y/2))},I.radialLayout=function(C,R,D){var P=Math.max(this.maxDiagonalInTree(C),p.DEFAULT_RADIAL_SEPARATION);I.branchRadialLayout(R,null,0,359,0,P);var A=L.calculateBounds(C),N=new _;N.setDeviceOrgX(A.getMinX()),N.setDeviceOrgY(A.getMinY()),N.setWorldOrgX(D.x),N.setWorldOrgY(D.y);for(var F=0;F1;){var Z=G[0];G.splice(0,1);var te=X.indexOf(Z);te>=0&&X.splice(te,1),ee--,ne--}R!=null?Q=(X.indexOf(G[0])+1)%ee:Q=0;for(var oe=Math.abs(P-D)/ne,de=Q;j!=ne;de=++de%ee){var pe=X[de].getOtherEnd(C);if(pe!=R){var re=(D+j*oe)%360,Be=(re+oe)%360;I.branchRadialLayout(pe,C,re,Be,A+N,N),j++}}},I.maxDiagonalInTree=function(C){for(var R=T.MIN_VALUE,D=0;DR&&(R=A)}return R},I.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},I.prototype.groupZeroDegreeMembers=function(){var C=this,R={};this.memberGroups={},this.idToDummyNode={};for(var D=[],P=this.graphManager.getAllNodes(),A=0;A"u"&&(R[B]=[]),R[B]=R[B].concat(N)}Object.keys(R).forEach(function(V){if(R[V].length>1){var z="DummyCompound_"+V;C.memberGroups[z]=R[V];var H=R[V][0].getParent(),K=new f(C.graphManager);K.id=z,K.paddingLeft=H.paddingLeft||0,K.paddingRight=H.paddingRight||0,K.paddingBottom=H.paddingBottom||0,K.paddingTop=H.paddingTop||0,C.idToDummyNode[z]=K;var X=C.getGraphManager().add(C.newGraph(),K),ne=H.getChild();ne.add(K);for(var j=0;jA?(P.rect.x-=(P.labelWidth-A)/2,P.setWidth(P.labelWidth),P.labelMarginLeft=(P.labelWidth-A)/2):P.labelPosHorizontal=="right"&&P.setWidth(A+P.labelWidth)),P.labelHeight&&(P.labelPosVertical=="top"?(P.rect.y-=P.labelHeight,P.setHeight(N+P.labelHeight),P.labelMarginTop=P.labelHeight):P.labelPosVertical=="center"&&P.labelHeight>N?(P.rect.y-=(P.labelHeight-N)/2,P.setHeight(P.labelHeight),P.labelMarginTop=(P.labelHeight-N)/2):P.labelPosVertical=="bottom"&&P.setHeight(N+P.labelHeight))}})},I.prototype.repopulateCompounds=function(){for(var C=this.compoundOrder.length-1;C>=0;C--){var R=this.compoundOrder[C],D=R.id,P=R.paddingLeft,A=R.paddingTop,N=R.labelMarginLeft,F=R.labelMarginTop;this.adjustLocations(this.tiledMemberPack[D],R.rect.x,R.rect.y,P,A,N,F)}},I.prototype.repopulateZeroDegreeMembers=function(){var C=this,R=this.tiledZeroDegreePack;Object.keys(R).forEach(function(D){var P=C.idToDummyNode[D],A=P.paddingLeft,N=P.paddingTop,F=P.labelMarginLeft,B=P.labelMarginTop;C.adjustLocations(R[D],P.rect.x,P.rect.y,A,N,F,B)})},I.prototype.getToBeTiled=function(C){var R=C.id;if(this.toBeTiled[R]!=null)return this.toBeTiled[R];var D=C.getChild();if(D==null)return this.toBeTiled[R]=!1,!1;for(var P=D.getNodes(),A=0;A0)return this.toBeTiled[R]=!1,!1;if(N.getChild()==null){this.toBeTiled[N.id]=!1;continue}if(!this.getToBeTiled(N))return this.toBeTiled[R]=!1,!1}return this.toBeTiled[R]=!0,!0},I.prototype.getNodeDegree=function(C){for(var R=C.id,D=C.getEdges(),P=0,A=0;AH&&(H=X.rect.height)}D+=H+C.verticalPadding}},I.prototype.tileCompoundMembers=function(C,R){var D=this;this.tiledMemberPack=[],Object.keys(C).forEach(function(P){var A=R[P];if(D.tiledMemberPack[P]=D.tileNodes(C[P],A.paddingLeft+A.paddingRight),A.rect.width=D.tiledMemberPack[P].width,A.rect.height=D.tiledMemberPack[P].height,A.setCenter(D.tiledMemberPack[P].centerX,D.tiledMemberPack[P].centerY),A.labelMarginLeft=0,A.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var N=A.rect.width,F=A.rect.height;A.labelWidth&&(A.labelPosHorizontal=="left"?(A.rect.x-=A.labelWidth,A.setWidth(N+A.labelWidth),A.labelMarginLeft=A.labelWidth):A.labelPosHorizontal=="center"&&A.labelWidth>N?(A.rect.x-=(A.labelWidth-N)/2,A.setWidth(A.labelWidth),A.labelMarginLeft=(A.labelWidth-N)/2):A.labelPosHorizontal=="right"&&A.setWidth(N+A.labelWidth)),A.labelHeight&&(A.labelPosVertical=="top"?(A.rect.y-=A.labelHeight,A.setHeight(F+A.labelHeight),A.labelMarginTop=A.labelHeight):A.labelPosVertical=="center"&&A.labelHeight>F?(A.rect.y-=(A.labelHeight-F)/2,A.setHeight(A.labelHeight),A.labelMarginTop=(A.labelHeight-F)/2):A.labelPosVertical=="bottom"&&A.setHeight(F+A.labelHeight))}})},I.prototype.tileNodes=function(C,R){var D=this.tileNodesByFavoringDim(C,R,!0),P=this.tileNodesByFavoringDim(C,R,!1),A=this.getOrgRatio(D),N=this.getOrgRatio(P),F;return NB&&(B=j.getWidth())});var V=N/A,z=F/A,H=Math.pow(D-P,2)+4*(V+P)*(z+D)*A,K=(P-D+Math.sqrt(H))/(2*(V+P)),X;R?(X=Math.ceil(K),X==K&&X++):X=Math.floor(K);var ne=X*(V+P)-P;return B>ne&&(ne=B),ne+=P*2,ne},I.prototype.tileNodesByFavoringDim=function(C,R,D){var P=p.TILING_PADDING_VERTICAL,A=p.TILING_PADDING_HORIZONTAL,N=p.TILING_COMPARE_BY,F={rows:[],rowWidth:[],rowHeight:[],width:0,height:R,verticalPadding:P,horizontalPadding:A,centerX:0,centerY:0};N&&(F.idealRowWidth=this.calcIdealRowWidth(C,D));var B=function(ee){return ee.rect.width*ee.rect.height},V=function(ee,Q){return B(Q)-B(ee)};C.sort(function(j,ee){var Q=V;return F.idealRowWidth?(Q=N,Q(j.id,ee.id)):Q(j,ee)});for(var z=0,H=0,K=0;K0&&(F+=C.horizontalPadding),C.rowWidth[D]=F,C.width0&&(B+=C.verticalPadding);var V=0;B>C.rowHeight[D]&&(V=C.rowHeight[D],C.rowHeight[D]=B,V=C.rowHeight[D]-V),C.height+=V,C.rows[D].push(R)},I.prototype.getShortestRowIndex=function(C){for(var R=-1,D=Number.MAX_VALUE,P=0;PD&&(R=P,D=C.rowWidth[P]);return R},I.prototype.canAddHorizontal=function(C,R,D){if(C.idealRowWidth){var P=C.rows.length-1,A=C.rowWidth[P];return A+R+C.horizontalPadding<=C.idealRowWidth}var N=this.getShortestRowIndex(C);if(N<0)return!0;var F=C.rowWidth[N];if(F+C.horizontalPadding+R<=C.width)return!0;var B=0;C.rowHeight[N]0&&(B=D+C.verticalPadding-C.rowHeight[N]);var V;C.width-F>=R+C.horizontalPadding?V=(C.height+B)/(F+R+C.horizontalPadding):V=(C.height+B)/C.width,B=D+C.verticalPadding;var z;return C.widthN&&R!=D){P.splice(-1,1),C.rows[D].push(A),C.rowWidth[R]=C.rowWidth[R]-N,C.rowWidth[D]=C.rowWidth[D]+N,C.width=C.rowWidth[instance.getLongestRowIndex(C)];for(var F=Number.MIN_VALUE,B=0;BF&&(F=P[B].height);R>0&&(F+=C.verticalPadding);var V=C.rowHeight[R]+C.rowHeight[D];C.rowHeight[R]=F,C.rowHeight[D]0)for(var ne=A;ne<=N;ne++)X[0]+=this.grid[ne][F-1].length+this.grid[ne][F].length-1;if(N0)for(var ne=F;ne<=B;ne++)X[3]+=this.grid[A-1][ne].length+this.grid[A][ne].length-1;for(var j=T.MAX_VALUE,ee,Q,G=0;G{var l=o(551).FDLayoutNode,u=o(551).IMath;function h(d,p,g,m){l.call(this,d,p,g,m)}h.prototype=Object.create(l.prototype);for(var f in l)h[f]=l[f];h.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},h.prototype.propogateDisplacementToChildren=function(d,p){for(var g=this.getChild().getNodes(),m,v=0;v{function l(g){if(Array.isArray(g)){for(var m=0,v=Array(g.length);m0){var ke=0;ae.forEach(function(Ne){Le=="horizontal"?(ye.set(Ne,y.has(Ne)?w[y.get(Ne)]:fe.get(Ne)),ke+=ye.get(Ne)):(ye.set(Ne,y.has(Ne)?k[y.get(Ne)]:fe.get(Ne)),ke+=ye.get(Ne))}),ke=ke/ae.length,ue.forEach(function(Ne){J.has(Ne)||ye.set(Ne,ke)})}else{var we=0;ue.forEach(function(Ne){Le=="horizontal"?we+=y.has(Ne)?w[y.get(Ne)]:fe.get(Ne):we+=y.has(Ne)?k[y.get(Ne)]:fe.get(Ne)}),we=we/ue.length,ue.forEach(function(Ne){ye.set(Ne,we)})}});for(var nt=function(){var ae=Re.shift(),ke=q.get(ae);ke.forEach(function(we){if(ye.get(we.id)Ne&&(Ne=yt),EtGe&&(Ge=Et)}}catch(_t){ot=!0,at=_t}finally{try{!st&&Ue.return&&Ue.return()}finally{if(ot)throw at}}var hn=(ke+Ne)/2-(we+Ge)/2,qt=!0,fn=!1,xn=void 0;try{for(var qr=ue[Symbol.iterator](),hi;!(qt=(hi=qr.next()).done);qt=!0){var Nn=hi.value;ye.set(Nn,ye.get(Nn)+hn)}}catch(_t){fn=!0,xn=_t}finally{try{!qt&&qr.return&&qr.return()}finally{if(fn)throw xn}}})}return ye},O=function(q){var Le=0,J=0,fe=0,xe=0;if(q.forEach(function(qe){qe.left?w[y.get(qe.left)]-w[y.get(qe.right)]>=0?Le++:J++:k[y.get(qe.top)]-k[y.get(qe.bottom)]>=0?fe++:xe++}),Le>J&&fe>xe)for(var Ie=0;IeJ)for(var Fe=0;Fexe)for(var ye=0;ye1)m.fixedNodeConstraint.forEach(function(me,q){P[q]=[me.position.x,me.position.y],A[q]=[w[y.get(me.nodeId)],k[y.get(me.nodeId)]]}),N=!0;else if(m.alignmentConstraint)(function(){var me=0;if(m.alignmentConstraint.vertical){for(var q=m.alignmentConstraint.vertical,Le=function(ye){var qe=new Set;q[ye].forEach(function(mt){qe.add(mt)});var Re=new Set([].concat(l(qe)).filter(function(mt){return B.has(mt)})),nt=void 0;Re.size>0?nt=w[y.get(Re.values().next().value)]:nt=M(qe).x,q[ye].forEach(function(mt){P[me]=[nt,k[y.get(mt)]],A[me]=[w[y.get(mt)],k[y.get(mt)]],me++})},J=0;J0?nt=w[y.get(Re.values().next().value)]:nt=M(qe).y,fe[ye].forEach(function(mt){P[me]=[w[y.get(mt)],nt],A[me]=[w[y.get(mt)],k[y.get(mt)]],me++})},Ie=0;IeK&&(K=H[ne].length,X=ne);if(K0){var Ze={x:0,y:0};m.fixedNodeConstraint.forEach(function(me,q){var Le={x:w[y.get(me.nodeId)],y:k[y.get(me.nodeId)]},J=me.position,fe=_(J,Le);Ze.x+=fe.x,Ze.y+=fe.y}),Ze.x/=m.fixedNodeConstraint.length,Ze.y/=m.fixedNodeConstraint.length,w.forEach(function(me,q){w[q]+=Ze.x}),k.forEach(function(me,q){k[q]+=Ze.y}),m.fixedNodeConstraint.forEach(function(me){w[y.get(me.nodeId)]=me.position.x,k[y.get(me.nodeId)]=me.position.y})}if(m.alignmentConstraint){if(m.alignmentConstraint.vertical)for(var Qe=m.alignmentConstraint.vertical,et=function(q){var Le=new Set;Qe[q].forEach(function(xe){Le.add(xe)});var J=new Set([].concat(l(Le)).filter(function(xe){return B.has(xe)})),fe=void 0;J.size>0?fe=w[y.get(J.values().next().value)]:fe=M(Le).x,Le.forEach(function(xe){B.has(xe)||(w[y.get(xe)]=fe)})},ze=0;ze0?fe=k[y.get(J.values().next().value)]:fe=M(Le).y,Le.forEach(function(xe){B.has(xe)||(k[y.get(xe)]=fe)})},Y=0;Y{a.exports=t}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(45);return i})()})});var u9e=Ke((eT,pK)=>{b();(function(e,r){typeof eT=="object"&&typeof pK=="object"?pK.exports=r(dK()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof eT=="object"?eT.cytoscapeFcose=r(dK()):e.cytoscapeFcose=r(e.coseBase)})(eT,function(t){return(()=>{"use strict";var e={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{var l=function(){function f(d,p){var g=[],m=!0,v=!1,y=void 0;try{for(var w=d[Symbol.iterator](),k;!(m=(k=w.next()).done)&&(g.push(k.value),!(p&&g.length===p));m=!0);}catch(E){v=!0,y=E}finally{try{!m&&w.return&&w.return()}finally{if(v)throw y}}return g}return function(d,p){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return f(d,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=o(140).layoutBase.LinkedList,h={};h.getTopMostNodes=function(f){for(var d={},p=0;p0&&N.merge(z)});for(var F=0;F1){k=y[0],E=k.connectedEdges().length,y.forEach(function(A){A.connectedEdges().length0&&g.set("dummy"+(g.size+1),L),_},h.relocateComponent=function(f,d,p){if(!p.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,v=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(p.quality=="draft"){var w=!0,k=!1,E=void 0;try{for(var T=d.nodeIndexes[Symbol.iterator](),S;!(w=(S=T.next()).done);w=!0){var L=S.value,_=l(L,2),M=_[0],I=_[1],O=p.cy.getElementById(M);if(O){var C=O.boundingBox(),R=d.xCoords[I]-C.w/2,D=d.xCoords[I]+C.w/2,P=d.yCoords[I]-C.h/2,A=d.yCoords[I]+C.h/2;Rm&&(m=D),Py&&(y=A)}}}catch(z){k=!0,E=z}finally{try{!w&&T.return&&T.return()}finally{if(k)throw E}}var N=f.x-(m+g)/2,F=f.y-(y+v)/2;d.xCoords=d.xCoords.map(function(z){return z+N}),d.yCoords=d.yCoords.map(function(z){return z+F})}else{Object.keys(d).forEach(function(z){var H=d[z],K=H.getRect().x,X=H.getRect().x+H.getRect().width,ne=H.getRect().y,j=H.getRect().y+H.getRect().height;Km&&(m=X),ney&&(y=j)});var B=f.x-(m+g)/2,V=f.y-(y+v)/2;Object.keys(d).forEach(function(z){var H=d[z];H.setCenter(H.getCenterX()+B,H.getCenterY()+V)})}}},h.calcBoundingBox=function(f,d,p,g){for(var m=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,w=Number.MIN_SAFE_INTEGER,k=void 0,E=void 0,T=void 0,S=void 0,L=f.descendants().not(":parent"),_=L.length,M=0;M<_;M++){var I=L[M];k=d[g.get(I.id())]-I.width()/2,E=d[g.get(I.id())]+I.width()/2,T=p[g.get(I.id())]-I.height()/2,S=p[g.get(I.id())]+I.height()/2,m>k&&(m=k),vT&&(y=T),w{var l=o(548),u=o(140).CoSELayout,h=o(140).CoSENode,f=o(140).layoutBase.PointD,d=o(140).layoutBase.DimensionD,p=o(140).layoutBase.LayoutConstants,g=o(140).layoutBase.FDLayoutConstants,m=o(140).CoSEConstants,v=function(w,k){var E=w.cy,T=w.eles,S=T.nodes(),L=T.edges(),_=void 0,M=void 0,I=void 0,O={};w.randomize&&(_=k.nodeIndexes,M=k.xCoords,I=k.yCoords);var C=function(z){return typeof z=="function"},R=function(z,H){return C(z)?z(H):z},D=l.calcParentsWithoutChildren(E,T),P=function V(z,H,K,X){for(var ne=H.length,j=0;j0){var oe=void 0;oe=K.getGraphManager().add(K.newGraph(),G),V(oe,Q,K,X)}}},A=function(z,H,K){for(var X=0,ne=0,j=0;j0?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=X/ne:C(w.idealEdgeLength)?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=w.idealEdgeLength,m.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,m.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},N=function(z,H){H.fixedNodeConstraint&&(z.constraints.fixedNodeConstraint=H.fixedNodeConstraint),H.alignmentConstraint&&(z.constraints.alignmentConstraint=H.alignmentConstraint),H.relativePlacementConstraint&&(z.constraints.relativePlacementConstraint=H.relativePlacementConstraint)};w.nestingFactor!=null&&(m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=w.nestingFactor),w.gravity!=null&&(m.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=w.gravity),w.numIter!=null&&(m.MAX_ITERATIONS=g.MAX_ITERATIONS=w.numIter),w.gravityRange!=null&&(m.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=w.gravityRange),w.gravityCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=w.gravityCompound),w.gravityRangeCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=w.gravityRangeCompound),w.initialEnergyOnIncremental!=null&&(m.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=w.initialEnergyOnIncremental),w.tilingCompareBy!=null&&(m.TILING_COMPARE_BY=w.tilingCompareBy),w.quality=="proof"?p.QUALITY=2:p.QUALITY=0,m.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=w.nodeDimensionsIncludeLabels,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!w.randomize,m.ANIMATE=g.ANIMATE=p.ANIMATE=w.animate,m.TILE=w.tile,m.TILING_PADDING_VERTICAL=typeof w.tilingPaddingVertical=="function"?w.tilingPaddingVertical.call():w.tilingPaddingVertical,m.TILING_PADDING_HORIZONTAL=typeof w.tilingPaddingHorizontal=="function"?w.tilingPaddingHorizontal.call():w.tilingPaddingHorizontal,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!0,m.PURE_INCREMENTAL=!w.randomize,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=w.uniformNodeDimensions,w.step=="transformed"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!1),w.step=="enforced"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!1),w.step=="cose"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!0),w.step=="all"&&(w.randomize?m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!0),w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint?m.TREE_REDUCTION_ON_INCREMENTAL=!1:m.TREE_REDUCTION_ON_INCREMENTAL=!0;var F=new u,B=F.newGraphManager();return P(B.addRoot(),l.getTopMostNodes(S),F,w),A(F,B,L),N(F,w),F.runLayout(),O};a.exports={coseLayout:v}},212:(a,s,o)=>{var l=function(){function w(k,E){for(var T=0;T0)if(A){var B=f.getTopMostNodes(T.eles.nodes());if(C=f.connectComponents(S,T.eles,B),C.forEach(function(le){var Se=le.boundingBox();R.push({x:Se.x1+Se.w/2,y:Se.y1+Se.h/2})}),T.randomize&&C.forEach(function(le){T.eles=le,_.push(p(T))}),T.quality=="default"||T.quality=="proof"){var V=S.collection();if(T.tile){var z=new Map,H=[],K=[],X=0,ne={nodeIndexes:z,xCoords:H,yCoords:K},j=[];if(C.forEach(function(le,Se){le.edges().length==0&&(le.nodes().forEach(function(Ye,We){V.merge(le.nodes()[We]),Ye.isParent()||(ne.nodeIndexes.set(le.nodes()[We].id(),X++),ne.xCoords.push(le.nodes()[0].position().x),ne.yCoords.push(le.nodes()[0].position().y))}),j.push(Se))}),V.length>1){var ee=V.boundingBox();R.push({x:ee.x1+ee.w/2,y:ee.y1+ee.h/2}),C.push(V),_.push(ne);for(var Q=j.length-1;Q>=0;Q--)C.splice(j[Q],1),_.splice(j[Q],1),R.splice(j[Q],1)}}C.forEach(function(le,Se){T.eles=le,O.push(m(T,_[Se])),f.relocateComponent(R[Se],O[Se],T)})}else C.forEach(function(le,Se){f.relocateComponent(R[Se],_[Se],T)});var G=new Set;if(C.length>1){var Z=[],te=L.filter(function(le){return le.css("display")=="none"});C.forEach(function(le,Se){var Ye=void 0;if(T.quality=="draft"&&(Ye=_[Se].nodeIndexes),le.nodes().not(te).length>0){var We={};We.edges=[],We.nodes=[];var Ze=void 0;le.nodes().not(te).forEach(function(Qe){if(T.quality=="draft")if(!Qe.isParent())Ze=Ye.get(Qe.id()),We.nodes.push({x:_[Se].xCoords[Ze]-Qe.boundingbox().w/2,y:_[Se].yCoords[Ze]-Qe.boundingbox().h/2,width:Qe.boundingbox().w,height:Qe.boundingbox().h});else{var et=f.calcBoundingBox(Qe,_[Se].xCoords,_[Se].yCoords,Ye);We.nodes.push({x:et.topLeftX,y:et.topLeftY,width:et.width,height:et.height})}else O[Se][Qe.id()]&&We.nodes.push({x:O[Se][Qe.id()].getLeft(),y:O[Se][Qe.id()].getTop(),width:O[Se][Qe.id()].getWidth(),height:O[Se][Qe.id()].getHeight()})}),le.edges().forEach(function(Qe){var et=Qe.source(),ze=Qe.target();if(et.css("display")!="none"&&ze.css("display")!="none")if(T.quality=="draft"){var He=Ye.get(et.id()),Ee=Ye.get(ze.id()),Y=[],ve=[];if(et.isParent()){var ce=f.calcBoundingBox(et,_[Se].xCoords,_[Se].yCoords,Ye);Y.push(ce.topLeftX+ce.width/2),Y.push(ce.topLeftY+ce.height/2)}else Y.push(_[Se].xCoords[He]),Y.push(_[Se].yCoords[He]);if(ze.isParent()){var me=f.calcBoundingBox(ze,_[Se].xCoords,_[Se].yCoords,Ye);ve.push(me.topLeftX+me.width/2),ve.push(me.topLeftY+me.height/2)}else ve.push(_[Se].xCoords[Ee]),ve.push(_[Se].yCoords[Ee]);We.edges.push({startX:Y[0],startY:Y[1],endX:ve[0],endY:ve[1]})}else O[Se][et.id()]&&O[Se][ze.id()]&&We.edges.push({startX:O[Se][et.id()].getCenterX(),startY:O[Se][et.id()].getCenterY(),endX:O[Se][ze.id()].getCenterX(),endY:O[Se][ze.id()].getCenterY()})}),We.nodes.length>0&&(Z.push(We),G.add(Se))}});var oe=P.packComponents(Z,T.randomize).shifts;if(T.quality=="draft")_.forEach(function(le,Se){var Ye=le.xCoords.map(function(Ze){return Ze+oe[Se].dx}),We=le.yCoords.map(function(Ze){return Ze+oe[Se].dy});le.xCoords=Ye,le.yCoords=We});else{var de=0;G.forEach(function(le){Object.keys(O[le]).forEach(function(Se){var Ye=O[le][Se];Ye.setCenter(Ye.getCenterX()+oe[de].dx,Ye.getCenterY()+oe[de].dy)}),de++})}}}else{var N=T.eles.boundingBox();if(R.push({x:N.x1+N.w/2,y:N.y1+N.h/2}),T.randomize){var F=p(T);_.push(F)}T.quality=="default"||T.quality=="proof"?(O.push(m(T,_[0])),f.relocateComponent(R[0],O[0],T)):f.relocateComponent(R[0],_[0],T)}var pe=function(Se,Ye){if(T.quality=="default"||T.quality=="proof"){typeof Se=="number"&&(Se=Ye);var We=void 0,Ze=void 0,Qe=Se.data("id");return O.forEach(function(ze){Qe in ze&&(We={x:ze[Qe].getRect().getCenterX(),y:ze[Qe].getRect().getCenterY()},Ze=ze[Qe])}),T.nodeDimensionsIncludeLabels&&(Ze.labelWidth&&(Ze.labelPosHorizontal=="left"?We.x+=Ze.labelWidth/2:Ze.labelPosHorizontal=="right"&&(We.x-=Ze.labelWidth/2)),Ze.labelHeight&&(Ze.labelPosVertical=="top"?We.y+=Ze.labelHeight/2:Ze.labelPosVertical=="bottom"&&(We.y-=Ze.labelHeight/2))),We==null&&(We={x:Se.position("x"),y:Se.position("y")}),{x:We.x,y:We.y}}else{var et=void 0;return _.forEach(function(ze){var He=ze.nodeIndexes.get(Se.id());He!=null&&(et={x:ze.xCoords[He],y:ze.yCoords[He]})}),et==null&&(et={x:Se.position("x"),y:Se.position("y")}),{x:et.x,y:et.y}}};if(T.quality=="default"||T.quality=="proof"||T.randomize){var re=f.calcParentsWithoutChildren(S,L),Be=L.filter(function(le){return le.css("display")=="none"});T.eles=L.not(Be),L.nodes().not(":parent").not(Be).layoutPositions(E,T,pe),re.length>0&&re.forEach(function(le){le.position(pe(le))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),w}();a.exports=y},657:(a,s,o)=>{var l=o(548),u=o(140).layoutBase.Matrix,h=o(140).layoutBase.SVD,f=function(p){var g=p.cy,m=p.eles,v=m.nodes(),y=m.nodes(":parent"),w=new Map,k=new Map,E=new Map,T=[],S=[],L=[],_=[],M=[],I=[],O=[],C=[],R=void 0,D=void 0,P=1e8,A=1e-9,N=p.piTol,F=p.samplingType,B=p.nodeSeparation,V=void 0,z=function(){for(var Le=0,J=0,fe=!1;J=Ie;){ye=xe[Ie++];for(var ue=T[ye],ae=0;aent&&(nt=M[we],mt=we)}return mt},K=function(Le){var J=void 0;if(Le){J=Math.floor(Math.random()*D),R=J;for(var xe=0;xe=1)break;nt=Re}for(var ue=0;ue=1)break;nt=Re}for(var ke=0;ke0&&(J.isParent()?T[Le].push(E.get(J.id())):T[Le].push(J.id()))})});var re=function(Le){var J=k.get(Le),fe=void 0;w.get(Le).forEach(function(xe){g.getElementById(xe).isParent()?fe=E.get(xe):fe=xe,T[J].push(fe),T[k.get(fe)].push(Le)})},Be=!0,le=!1,Se=void 0;try{for(var Ye=w.keys()[Symbol.iterator](),We;!(Be=(We=Ye.next()).done);Be=!0){var Ze=We.value;re(Ze)}}catch(q){le=!0,Se=q}finally{try{!Be&&Ye.return&&Ye.return()}finally{if(le)throw Se}}D=k.size;var Qe=void 0;if(D>2){V=D{var l=o(212),u=function(f){f&&f("layout","fcose",l)};typeof cytoscape<"u"&&u(cytoscape),a.exports=u},140:a=>{a.exports=t}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(579);return i})()})});var C9e={};Wt(C9e,{diagram:()=>mOt});function Na(t){let e=Te().architecture;return e?.[t]?e[t]:m9e[t]}function y9e(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"service",id:r.id,icon:r.icon,label:r.title,parent:r.in,width:Na("iconSize"),height:Na("iconSize")},classes:"node-service"})})}function b9e(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"junction",id:r.id,parent:r.in,width:Na("iconSize"),height:Na("iconSize")},classes:"node-junction"})})}function x9e(t,e){e.nodes().map(r=>{let n=E2(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function w9e(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function k9e(t,e){t.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:s,rhsInto:o,lhsDir:l,rhsDir:u,rhsGroup:h,title:f}=r,d=p9e(r.lhsDir,r.rhsDir)?"segments":"straight",p={id:`${n}-${i}`,label:f,source:n,sourceDir:l,sourceArrow:a,sourceGroup:s,sourceEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%",target:i,targetDir:u,targetArrow:o,targetGroup:h,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:p,classes:d})})}function T9e(t){let e=t.map(i=>{let a={},s={};return Object.entries(i).forEach(([o,[l,u]])=>{a[u]||(a[u]=[]),s[l]||(s[l]=[]),a[u].push(o),s[l].push(o)}),{horiz:Object.values(a).filter(o=>o.length>1),vert:Object.values(s).filter(o=>o.length>1)}}),[r,n]=e.reduce(([i,a],{horiz:s,vert:o})=>[[...i,...s],[...a,...o]],[[],[]]);return{horizontal:r,vertical:n}}function E9e(t){let e=[],r=x(i=>`${i[0]},${i[1]}`,"posToStr"),n=x(i=>i.split(",").map(a=>parseInt(a)),"strToPos");return t.forEach(i=>{let a=Object.fromEntries(Object.entries(i).map(([u,h])=>[r(h),u])),s=[r([0,0])],o={},l={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){let u=s.shift();if(u){o[u]=1;let h=a[u];if(h){let f=n(u);Object.entries(l).forEach(([d,p])=>{let g=r([f[0]+p[0],f[1]+p[1]]),m=a[g];m&&!o[g]&&(s.push(g),e.push({[h9e[d]]:m,[h9e[z9t(d)]]:h,gap:1.5*Na("iconSize")}))})}}}}),e}function S9e(t,e,r,n,{spatialMaps:i}){return new Promise(a=>{let s=Je("body").append("div").attr("id","cy").attr("style","display:none"),o=Lc({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Na("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Na("padding")}px`}}]});s.remove(),w9e(r,o),y9e(t,o),b9e(e,o),k9e(n,o);let l=T9e(i),u=E9e(i),h=o.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(f){let[d,p]=f.connectedNodes(),{parent:g}=E2(d),{parent:m}=E2(p);return g===m?1.5*Na("iconSize"):.5*Na("iconSize")},edgeElasticity(f){let[d,p]=f.connectedNodes(),{parent:g}=E2(d),{parent:m}=E2(p);return g===m?.45:.001},alignmentConstraint:l,relativePlacementConstraint:u});h.one("layoutstop",()=>{function f(d,p,g,m){let v,y,{x:w,y:k}=d,{x:E,y:T}=p;y=(m-k+(w-g)*(k-T)/(w-E))/Math.sqrt(1+Math.pow((k-T)/(w-E),2)),v=Math.sqrt(Math.pow(m-k,2)+Math.pow(g-w,2)-Math.pow(y,2));let S=Math.sqrt(Math.pow(E-w,2)+Math.pow(T-k,2));v=v/S;let L=(E-w)*(m-k)-(T-k)*(g-w);switch(!0){case L>=0:L=1;break;case L<0:L=-1;break}let _=(E-w)*(g-w)+(T-k)*(m-k);switch(!0){case _>=0:_=1;break;case _<0:_=-1;break}return y=Math.abs(y)*L,v=v*_,{distances:y,weights:v}}x(f,"getSegmentWeights"),o.startBatch();for(let d of Object.values(o.edges()))if(d.data?.()){let{x:p,y:g}=d.source().position(),{x:m,y:v}=d.target().position();if(p!==m&&g!==v){let y=d.sourceEndpoint(),w=d.targetEndpoint(),{sourceDir:k}=g9e(d),[E,T]=p0(k)?[y.x,w.y]:[w.x,y.y],{weights:S,distances:L}=f(y,w,E,T);d.style("segment-distances",L),d.style("segment-weights",S)}}o.endBatch(),h.run()}),h.run(),o.ready(f=>{ie.info("Ready",f),a(o)})})}var v9e,h9e,f9e,hD,z9t,d9e,rl,p0,p9e,$9t,V9t,gK,U9t,H9t,q9t,W9t,g9e,E2,m9e,_r,G9t,Y9t,j9t,X9t,K9t,Z9t,Q9t,J9t,eOt,tOt,rOt,nOt,iOt,aOt,fD,sOt,oOt,lOt,cOt,T2,tT,uOt,hOt,fOt,dOt,pOt,gOt,mOt,_9e=$(()=>{b();Kc();ro();T3();R7();Qn();Jf();Sr();Rb();EX();v9e=Vi(u9e(),1);Cr();h9e={L:"left",R:"right",T:"top",B:"bottom"},f9e={L:x(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:x(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:x(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:x(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},hD={L:x((t,e)=>t-e+2,"L"),R:x((t,e)=>t-2,"R"),T:x((t,e)=>t-e+2,"T"),B:x((t,e)=>t-2,"B")},z9t=x(function(t){return rl(t)?t==="L"?"R":"L":t==="T"?"B":"T"},"getOppositeArchitectureDirection"),d9e=x(function(t){let e=t;return e==="L"||e==="R"||e==="T"||e==="B"},"isArchitectureDirection"),rl=x(function(t){let e=t;return e==="L"||e==="R"},"isArchitectureDirectionX"),p0=x(function(t){let e=t;return e==="T"||e==="B"},"isArchitectureDirectionY"),p9e=x(function(t,e){let r=rl(t)&&p0(e),n=p0(t)&&rl(e);return r||n},"isArchitectureDirectionXY"),$9t=x(function(t){let e=t[0],r=t[1],n=rl(e)&&p0(r),i=p0(e)&&rl(r);return n||i},"isArchitecturePairXY"),V9t=x(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),gK=x(function(t,e){let r=`${t}${e}`;return V9t(r)?r:void 0},"getArchitectureDirectionPair"),U9t=x(function([t,e],r){let n=r[0],i=r[1];return rl(n)?p0(i)?[t+(n==="L"?-1:1),e+(i==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:rl(i)?[t+(i==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),H9t=x(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),q9t=x(function(t){return t.type==="service"},"isArchitectureService"),W9t=x(function(t){return t.type==="junction"},"isArchitectureJunction"),g9e=x(t=>t.data(),"edgeData"),E2=x(t=>t.data(),"nodeData"),m9e=Er.architecture,_r=new Vy(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:m9e,dataStructures:void 0,elements:{}})),G9t=x(()=>{_r.reset(),zr()},"clear"),Y9t=x(function({id:t,icon:e,in:r,title:n,iconText:i}){if(_r.records.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${_r.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(_r.records.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(_r.records.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}_r.records.registeredIds[t]="node",_r.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),j9t=x(()=>Object.values(_r.records.nodes).filter(q9t),"getServices"),X9t=x(function({id:t,in:e}){_r.records.registeredIds[t]="node",_r.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),K9t=x(()=>Object.values(_r.records.nodes).filter(W9t),"getJunctions"),Z9t=x(()=>Object.values(_r.records.nodes),"getNodes"),Q9t=x(t=>_r.records.nodes[t],"getNode"),J9t=x(function({id:t,icon:e,in:r,title:n}){if(_r.records.registeredIds[t]!==void 0)throw new Error(`The group id [${t}] is already in use by another ${_r.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(_r.records.registeredIds[r]===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(_r.records.registeredIds[r]==="node")throw new Error(`The group [${t}]'s parent is not a group`)}_r.records.registeredIds[t]="group",_r.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),eOt=x(()=>Object.values(_r.records.groups),"getGroups"),tOt=x(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!d9e(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(!d9e(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${n}`);if(_r.records.nodes[t]===void 0&&_r.records.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(_r.records.nodes[e]===void 0&&_r.records.groups[t]===void 0)throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=_r.records.nodes[t].in,h=_r.records.nodes[e].in;if(s&&u&&h&&u==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&u&&h&&u==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l};_r.records.edges.push(f),_r.records.nodes[t]&&_r.records.nodes[e]&&(_r.records.nodes[t].edges.push(_r.records.edges[_r.records.edges.length-1]),_r.records.nodes[e].edges.push(_r.records.edges[_r.records.edges.length-1]))},"addEdge"),rOt=x(()=>_r.records.edges,"getEdges"),nOt=x(()=>{if(_r.records.dataStructures===void 0){let t=Object.entries(_r.records.nodes).reduce((s,[o,l])=>(s[o]=l.edges.reduce((u,h)=>{if(h.lhsId===o){let f=gK(h.lhsDir,h.rhsDir);f&&(u[f]=h.rhsId)}else{let f=gK(h.rhsDir,h.lhsDir);f&&(u[f]=h.lhsId)}return u},{}),s),{}),e=Object.keys(t)[0],r={[e]:1},n=Object.keys(t).reduce((s,o)=>o===e?s:{...s,[o]:1},{}),i=x(s=>{let o={[s]:[0,0]},l=[s];for(;l.length>0;){let u=l.shift();if(u){r[u]=1,delete n[u];let h=t[u],[f,d]=o[u];Object.entries(h).forEach(([p,g])=>{r[g]||(o[g]=U9t([f,d],p),l.push(g))})}}return o},"BFS"),a=[i(e)];for(;Object.keys(n).length>0;)a.push(i(Object.keys(n)[0]));_r.records.dataStructures={adjList:t,spatialMaps:a}}return _r.records.dataStructures},"getDataStructures"),iOt=x((t,e)=>{_r.records.elements[t]=e},"setElementForId"),aOt=x(t=>_r.records.elements[t],"getElementById"),fD={clear:G9t,setDiagramTitle:Cn,getDiagramTitle:vn,setAccTitle:Wr,getAccTitle:Xr,setAccDescription:Kr,getAccDescription:Zr,addService:Y9t,getServices:j9t,addJunction:X9t,getJunctions:K9t,getNodes:Z9t,getNode:Q9t,addGroup:J9t,getGroups:eOt,addEdge:tOt,getEdges:rOt,setElementForId:iOt,getElementById:aOt,getDataStructures:nOt};x(Na,"getConfigField");sOt=x((t,e)=>{nd(t,e),t.groups.map(e.addGroup),t.services.map(r=>e.addService({...r,type:"service"})),t.junctions.map(r=>e.addJunction({...r,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),oOt={parse:x(async t=>{let e=await wu("architecture",t);ie.debug(e),sOt(e,fD)},"parse")},lOt=x(t=>` .edge { stroke-width: ${t.archEdgeWidth}; stroke: ${t.archEdgeColor}; fill: none; } .arrow { fill: ${t.archEdgeArrowColor}; } .node-bkg { fill: none; stroke: ${t.archGroupBorderColor}; stroke-width: ${t.archGroupBorderWidth}; stroke-dasharray: 8; } .node-icon-text { display: flex; align-items: center; } .node-icon-text > div { color: #fff; margin: 1px; height: fit-content; text-align: center; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; } `,"getStyles"),cOt=lOt,T2=x(t=>`${t}`,"wrapIcon"),tT={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:T2('')},server:{body:T2('')},disk:{body:T2('')},internet:{body:T2('')},cloud:{body:T2('')},unknown:ZF,blank:{body:T2("")}}},uOt=x(async function(t,e){let r=Na("padding"),n=Na("iconSize"),i=n/2,a=n/6,s=a/2;await Promise.all(e.edges().map(async o=>{let{source:l,sourceDir:u,sourceArrow:h,sourceGroup:f,target:d,targetDir:p,targetArrow:g,targetGroup:m,label:v}=g9e(o),{x:y,y:w}=o[0].sourceEndpoint(),{x:k,y:E}=o[0].midpoint(),{x:T,y:S}=o[0].targetEndpoint(),L=r+4;if(f&&(rl(u)?y+=u==="L"?-L:L:w+=u==="T"?-L:L+18),m&&(rl(p)?T+=p==="L"?-L:L:S+=p==="T"?-L:L+18),!f&&fD.getNode(l)?.type==="junction"&&(rl(u)?y+=u==="L"?i:-i:w+=u==="T"?i:-i),!m&&fD.getNode(d)?.type==="junction"&&(rl(p)?T+=p==="L"?i:-i:S+=p==="T"?i:-i),o[0]._private.rscratch){let _=t.insert("g");if(_.insert("path").attr("d",`M ${y},${w} L ${k},${E} L${T},${S} `).attr("class","edge"),h){let M=rl(u)?hD[u](y,a):y-s,I=p0(u)?hD[u](w,a):w-s;_.insert("polygon").attr("points",f9e[u](a)).attr("transform",`translate(${M},${I})`).attr("class","arrow")}if(g){let M=rl(p)?hD[p](T,a):T-s,I=p0(p)?hD[p](S,a):S-s;_.insert("polygon").attr("points",f9e[p](a)).attr("transform",`translate(${M},${I})`).attr("class","arrow")}if(v){let M=p9e(u,p)?"XY":rl(u)?"X":"Y",I=0;M==="X"?I=Math.abs(y-T):M==="Y"?I=Math.abs(w-S)/1.5:I=Math.abs(y-T)/2;let O=_.append("g");if(await ls(O,v,{useHtmlLabels:!1,width:I,classes:"architecture-service-label"},Te()),O.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),M==="X")O.attr("transform","translate("+k+", "+E+")");else if(M==="Y")O.attr("transform","translate("+k+", "+E+") rotate(-90)");else if(M==="XY"){let C=gK(u,p);if(C&&$9t(C)){let R=O.node().getBoundingClientRect(),[D,P]=H9t(C);O.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*D*P*45})`);let A=O.node().getBoundingClientRect();O.attr("transform",` translate(${k}, ${E-R.height/2}) translate(${D*A.width/2}, ${P*A.height/2}) rotate(${-1*D*P*45}, 0, ${R.height/2}) `)}}}}}))},"drawEdges"),hOt=x(async function(t,e){let n=Na("padding")*.75,i=Na("fontSize"),s=Na("iconSize")/2;await Promise.all(e.nodes().map(async o=>{let l=E2(o);if(l.type==="group"){let{h:u,w:h,x1:f,y1:d}=o.boundingBox();t.append("rect").attr("x",f+s).attr("y",d+s).attr("width",h).attr("height",u).attr("class","node-bkg");let p=t.append("g"),g=f,m=d;if(l.icon){let v=p.append("g");v.html(`${await _f(l.icon,{height:n,width:n,fallbackPrefix:tT.prefix})}`),v.attr("transform","translate("+(g+s+1)+", "+(m+s+1)+")"),g+=n,m+=i/2-1-2}if(l.label){let v=p.append("g");await ls(v,l.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},Te()),v.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),v.attr("transform","translate("+(g+s+4)+", "+(m+s+2)+")")}}}))},"drawGroups"),fOt=x(async function(t,e,r){for(let n of r){let i=e.append("g"),a=Na("iconSize");if(n.title){let u=i.append("g");await ls(u,n.title,{useHtmlLabels:!1,width:a*1.5,classes:"architecture-service-label"},Te()),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),u.attr("transform","translate("+a/2+", "+a+")")}let s=i.append("g");if(n.icon)s.html(`${await _f(n.icon,{height:a,width:a,fallbackPrefix:tT.prefix})}`);else if(n.iconText){s.html(`${await _f("blank",{height:a,width:a,fallbackPrefix:tT.prefix})}`);let f=s.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),d=parseInt(window.getComputedStyle(f.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;f.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/d)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`);i.attr("class","architecture-service");let{width:o,height:l}=i._groups[0][0].getBBox();n.width=o,n.height=l,t.setElementForId(n.id,i)}return 0},"drawServices"),dOt=x(function(t,e,r){r.forEach(n=>{let i=e.append("g"),a=Na("iconSize");i.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",a).attr("height",a),i.attr("class","architecture-junction");let{width:o,height:l}=i._groups[0][0].getBBox();i.width=o,i.height=l,t.setElementForId(n.id,i)})},"drawJunctions");KC([{name:tT.prefix,icons:tT}]);Lc.use(v9e.default);x(y9e,"addServices");x(b9e,"addJunctions");x(x9e,"positionNodes");x(w9e,"addGroups");x(k9e,"addEdges");x(T9e,"getAlignments");x(E9e,"getRelativeConstraints");x(S9e,"layoutArchitecture");pOt=x(async(t,e,r,n)=>{let i=n.db,a=i.getServices(),s=i.getJunctions(),o=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),h=Is(e),f=h.append("g");f.attr("class","architecture-edges");let d=h.append("g");d.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await fOt(i,d,a),dOt(i,d,s);let g=await S9e(a,s,o,l,u);await uOt(f,g),await hOt(p,g),x9e(i,g),jc(void 0,h,Na("padding"),Na("useMaxWidth"))},"draw"),gOt={draw:pOt},mOt={parser:oOt,db:fD,renderer:gOt,styles:cOt}});var EOe=Ke((bqr,CD)=>{b();var GIt=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var rt=function(t){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,r=0,n={},i={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function m(v){return v instanceof a?new a(v.type,m(v.content),v.alias):Array.isArray(v)?v.map(m):v.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(w){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(m){var v=document.getElementsByTagName("script");for(var y in v)if(v[y].src==m)return v[y]}return null}},isActive:function(m,v,y){for(var w="no-"+v;m;){var k=m.classList;if(k.contains(v))return!0;if(k.contains(w))return!1;m=m.parentElement}return!!y}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(m,v){var y=i.util.clone(i.languages[m]);for(var w in v)y[w]=v[w];return y},insertBefore:function(m,v,y,w){w=w||i.languages;var k=w[m],E={};for(var T in k)if(k.hasOwnProperty(T)){if(T==v)for(var S in y)y.hasOwnProperty(S)&&(E[S]=y[S]);y.hasOwnProperty(T)||(E[T]=k[T])}var L=w[m];return w[m]=E,i.languages.DFS(i.languages,function(_,M){M===L&&_!=m&&(this[_]=E)}),E},DFS:function m(v,y,w,k){k=k||{};var E=i.util.objId;for(var T in v)if(v.hasOwnProperty(T)){y.call(v,T,v[T],w||T);var S=v[T],L=i.util.type(S);L==="Object"&&!k[E(S)]?(k[E(S)]=!0,m(S,y,null,k)):L==="Array"&&!k[E(S)]&&(k[E(S)]=!0,m(S,y,T,k))}}},plugins:{},highlightAll:function(m,v){i.highlightAllUnder(document,m,v)},highlightAllUnder:function(m,v,y){var w={callback:y,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),i.hooks.run("before-all-elements-highlight",w);for(var k=0,E;E=w.elements[k++];)i.highlightElement(E,v===!0,w.callback)},highlightElement:function(m,v,y){var w=i.util.getLanguage(m),k=i.languages[w];i.util.setLanguage(m,w);var E=m.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(E,w);var T=m.textContent,S={element:m,language:w,grammar:k,code:T};function L(M){S.highlightedCode=M,i.hooks.run("before-insert",S),S.element.innerHTML=S.highlightedCode,i.hooks.run("after-highlight",S),i.hooks.run("complete",S),y&&y.call(S.element)}if(i.hooks.run("before-sanity-check",S),E=S.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!S.code){i.hooks.run("complete",S),y&&y.call(S.element);return}if(i.hooks.run("before-highlight",S),!S.grammar){L(i.util.encode(S.code));return}if(v&&t.Worker){var _=new Worker(i.filename);_.onmessage=function(M){L(M.data)},_.postMessage(JSON.stringify({language:S.language,code:S.code,immediateClose:!0}))}else L(i.highlight(S.code,S.grammar,S.language))},highlight:function(m,v,y){var w={code:m,grammar:v,language:y};if(i.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=i.tokenize(w.code,w.grammar),i.hooks.run("after-tokenize",w),a.stringify(i.util.encode(w.tokens),w.language)},tokenize:function(m,v){var y=v.rest;if(y){for(var w in y)v[w]=y[w];delete v.rest}var k=new l;return u(k,k.head,m),o(m,k,v,k.head,0),f(k)},hooks:{all:{},add:function(m,v){var y=i.hooks.all;y[m]=y[m]||[],y[m].push(v)},run:function(m,v){var y=i.hooks.all[m];if(!(!y||!y.length))for(var w=0,k;k=y[w++];)k(v)}},Token:a};t.Prism=i;function a(m,v,y,w){this.type=m,this.content=v,this.alias=y,this.length=(w||"").length|0}a.stringify=function m(v,y){if(typeof v=="string")return v;if(Array.isArray(v)){var w="";return v.forEach(function(L){w+=m(L,y)}),w}var k={type:v.type,content:m(v.content,y),tag:"span",classes:["token",v.type],attributes:{},language:y},E=v.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(k.classes,E):k.classes.push(E)),i.hooks.run("wrap",k);var T="";for(var S in k.attributes)T+=" "+S+'="'+(k.attributes[S]||"").replace(/"/g,""")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+T+">"+k.content+""};function s(m,v,y,w){m.lastIndex=v;var k=m.exec(y);if(k&&w&&k[1]){var E=k[1].length;k.index+=E,k[0]=k[0].slice(E)}return k}function o(m,v,y,w,k,E){for(var T in y)if(!(!y.hasOwnProperty(T)||!y[T])){var S=y[T];S=Array.isArray(S)?S:[S];for(var L=0;L=E.reach);A+=P.value.length,P=P.next){var N=P.value;if(v.length>m.length)return;if(!(N instanceof a)){var F=1,B;if(O){if(B=s(D,A,m,I),!B||B.index>=m.length)break;var K=B.index,V=B.index+B[0].length,z=A;for(z+=P.value.length;K>=z;)P=P.next,z+=P.value.length;if(z-=P.value.length,A=z,P.value instanceof a)continue;for(var H=P;H!==v.tail&&(zE.reach&&(E.reach=ee);var Q=P.prev;ne&&(Q=u(v,Q,ne),A+=ne.length),h(v,Q,F);var G=new a(T,M?i.tokenize(X,M):X,C,X);if(P=u(v,Q,G),j&&u(v,P,j),F>1){var Z={cause:T+","+L,reach:ee};o(m,v,y,P.prev,A,Z),E&&Z.reach>E.reach&&(E.reach=Z.reach)}}}}}}function l(){var m={value:null,prev:null,next:null},v={value:null,prev:m,next:null};m.next=v,this.head=m,this.tail=v,this.length=0}function u(m,v,y){var w=v.next,k={value:y,prev:v,next:w};return v.next=k,w.prev=k,m.length++,k}function h(m,v,y){for(var w=v.next,k=0;k/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};rt.languages.markup.tag.inside["attr-value"].inside.entity=rt.languages.markup.entity;rt.languages.markup.doctype.inside["internal-subset"].inside=rt.languages.markup;rt.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(rt.languages.markup.tag,"addInlined",{value:function(e,r){var n={};n["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:rt.languages[r]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+r]={pattern:/[\s\S]+/,inside:rt.languages[r]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},rt.languages.insertBefore("markup","cdata",a)}});Object.defineProperty(rt.languages.markup.tag,"addAttribute",{value:function(t,e){rt.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:rt.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});rt.languages.html=rt.languages.markup;rt.languages.mathml=rt.languages.markup;rt.languages.svg=rt.languages.markup;rt.languages.xml=rt.languages.extend("markup",{});rt.languages.ssml=rt.languages.xml;rt.languages.atom=rt.languages.xml;rt.languages.rss=rt.languages.xml;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(rt);rt.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};rt.languages.javascript=rt.languages.extend("clike",{"class-name":[rt.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});rt.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;rt.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:rt.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:rt.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:rt.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:rt.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:rt.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});rt.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:rt.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});rt.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});rt.languages.markup&&(rt.languages.markup.tag.addInlined("script","javascript"),rt.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));rt.languages.js=rt.languages.javascript;(function(){if(typeof rt>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var t="Loading\u2026",e=function(d,p){return"\u2716 Error "+d+" while fetching file: "+p},r="\u2716 Error: File does not exist or is empty",n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",a="loading",s="loaded",o="failed",l="pre[data-src]:not(["+i+'="'+s+'"]):not(['+i+'="'+a+'"])';function u(d,p,g){var m=new XMLHttpRequest;m.open("GET",d,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?p(m.responseText):m.status>=400?g(e(m.status,m.statusText)):g(r))},m.send(null)}function h(d){var p=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(d||"");if(p){var g=Number(p[1]),m=p[2],v=p[3];return m?v?[g,Number(v)]:[g,void 0]:[g,g]}}rt.hooks.add("before-highlightall",function(d){d.selector+=", "+l}),rt.hooks.add("before-sanity-check",function(d){var p=d.element;if(p.matches(l)){d.code="",p.setAttribute(i,a);var g=p.appendChild(document.createElement("CODE"));g.textContent=t;var m=p.getAttribute("data-src"),v=d.language;if(v==="none"){var y=(/\.(\w+)$/.exec(m)||[,"none"])[1];v=n[y]||y}rt.util.setLanguage(g,v),rt.util.setLanguage(p,v);var w=rt.plugins.autoloader;w&&w.loadLanguages(v),u(m,function(k){p.setAttribute(i,s);var E=h(p.getAttribute("data-range"));if(E){var T=k.split(/\r\n?|\n/g),S=E[0],L=E[1]==null?T.length:E[1];S<0&&(S+=T.length),S=Math.max(0,Math.min(S-1,T.length)),L<0&&(L+=T.length),L=Math.max(0,Math.min(L,T.length)),k=T.slice(S,L).join(` `),p.hasAttribute("data-start")||p.setAttribute("data-start",String(S+1))}g.textContent=k,rt.highlightElement(g)},function(k){p.setAttribute(i,o),g.textContent=k})}}),rt.plugins.fileHighlight={highlight:function(p){for(var g=(p||document).querySelectorAll(l),m=0,v;v=g[m++];)rt.highlightElement(v)}};var f=!1;rt.fileHighlight=function(){f||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),f=!0),rt.plugins.fileHighlight.highlight.apply(this,arguments)}})();rt.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};(function(t){t.languages.ruby=t.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),t.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var e={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:t.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete t.languages.ruby.function;var r="(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")",n=`(?:"(?:\\\\.|[^"\\\\\r ])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)`;t.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+r+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:e,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:e,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+n),lookbehind:!0,greedy:!0},{pattern:RegExp(`([\r {(,][ ]*)`+n+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),t.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+r),greedy:!0,inside:{interpolation:e,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:e,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:e,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+r),greedy:!0,inside:{interpolation:e,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:e,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete t.languages.ruby.string,t.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),t.languages.rb=t.languages.ruby})(rt);rt.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},rt.languages.markup.tag.inside["attr-value"].inside.entity=rt.languages.markup.entity,rt.languages.markup.doctype.inside["internal-subset"].inside=rt.languages.markup,rt.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))}),Object.defineProperty(rt.languages.markup.tag,"addInlined",{value:function(t,e){var r={};r["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:rt.languages[e]},r.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:r}};n["language-"+e]={pattern:/[\s\S]+/,inside:rt.languages[e]};var i={};i[t]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:n},rt.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(rt.languages.markup.tag,"addAttribute",{value:function(t,e){rt.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(`(^|["'\\s])(?:`+t+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:rt.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),rt.languages.html=rt.languages.markup,rt.languages.mathml=rt.languages.markup,rt.languages.svg=rt.languages.markup,rt.languages.xml=rt.languages.extend("markup",{}),rt.languages.ssml=rt.languages.xml,rt.languages.atom=rt.languages.xml,rt.languages.rss=rt.languages.xml;rt.languages.javascript=rt.languages.extend("clike",{"class-name":[rt.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),rt.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,rt.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r ]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r ])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r ]|\\\\.|\\[(?:[^[\\]\\\\\r ]|\\\\.|\\[(?:[^[\\]\\\\\r ]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r ])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r ,.;:})\\]]|//))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:rt.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:rt.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:rt.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:rt.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:rt.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),rt.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:rt.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),rt.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),rt.languages.markup&&(rt.languages.markup.tag.addInlined("script","javascript"),rt.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),rt.languages.js=rt.languages.javascript;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+`|(?:[^\\\\\r ()"']|\\\\[^])*)\\)`,"i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(rt);rt.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){function e(r,n){return"___"+r.toUpperCase()+n+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,n,i,a){if(r.language===n){var s=r.tokenStack=[];r.code=r.code.replace(i,function(o){if(typeof a=="function"&&!a(o))return o;for(var l,u=s.length;r.code.indexOf(l=e(n,u))!==-1;)++u;return s[u]=o,l}),r.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(r,n){if(r.language===n&&r.tokenStack){r.grammar=t.languages[n];var i=0,a=Object.keys(r.tokenStack);(function s(o){for(var l=0;l=a.length);l++){var u=o[l];if(typeof u=="string"||u.content&&typeof u.content=="string"){var h=a[i],f=r.tokenStack[h],d=typeof u=="string"?u:u.content,p=e(n,h),g=d.indexOf(p);if(g>-1){++i;var m=d.substring(0,g),v=new t.Token(n,t.tokenize(f,r.grammar),"language-"+n,f),y=d.substring(g+p.length),w=[];m&&w.push.apply(w,s([m])),w.push(v),y&&w.push.apply(w,s([y])),typeof u=="string"?o.splice.apply(o,[l,1].concat(w)):u.content=w}}else u.content&&s(u.content)}return o})(r.tokens)}}}})})(rt);(function(t){t.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:t.languages.ruby}},t.hooks.add("before-tokenize",function(e){t.languages["markup-templating"].buildPlaceholders(e,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g)}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"erb")})})(rt);(function(t){var e=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,n="(?:"+r.source+"(?:[ ]+"+e.source+")?|"+e.source+"(?:[ ]+"+r.source+")?)",i="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ ]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),a=`"(?:[^"\\\\\r ]|\\\\.)*"|'(?:[^'\\\\\r ]|\\\\.)*'`;function s(o,l){l=(l||"").replace(/m/g,"")+"m";var u=`([:\\-,[{]\\s*(?:\\s<>[ ]+)?)(?:<>)(?=[ ]*(?:$|,|\\]|\\}|(?:[\r ]\\s*)?#))`.replace(/<>/g,function(){return n}).replace(/<>/g,function(){return o});return RegExp(u,l)}t.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<>[ ]+)?[|>])[ ]*(?:((?:\r? |\r)[ ]+)\\S[^\r ]*(?:\\2[^\r ]+)*)`.replace(/<>/g,function(){return n})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\r ?])[ ]*(?:<>[ ]+)?)<>(?=\\s*:\\s)`.replace(/<>/g,function(){return n}).replace(/<>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ ]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ ]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:s("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:s("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:s(a),lookbehind:!0,greedy:!0},number:{pattern:s("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(rt);(function(t){var e=t.util.clone(t.languages.javascript),r="(?:\\{*\\.{3}(?:[^{}]|)*\\})";function n(s,o){return s=s.replace(//g,function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"}).replace(//g,function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"}).replace(//g,function(){return r}),RegExp(s,o)}r=n(r).source,t.languages.jsx=t.languages.extend("markup",e),t.languages.jsx.tag.pattern=n(`+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[^]|[^\\\\"])*"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'"/>=]+|))?|))**/?)?>`),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=e.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:n(""),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:n("="),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var i=function(s){return s?typeof s=="string"?s:typeof s.content=="string"?s.content:s.content.map(i).join(""):""},a=function(s){for(var o=[],l=0;l0&&o[o.length-1].tagName===i(u.content[0].content[1])&&o.pop():u.content[u.content.length-1].content==="/>"||o.push({tagName:i(u.content[0].content[1]),openedBraces:0}):o.length>0&&u.type==="punctuation"&&u.content==="{"?o[o.length-1].openedBraces++:o.length>0&&o[o.length-1].openedBraces>0&&u.type==="punctuation"&&u.content==="}"?o[o.length-1].openedBraces--:h=!0),(h||typeof u=="string")&&o.length>0&&o[o.length-1].openedBraces===0){var f=i(u);l0&&(typeof s[l-1]=="string"||s[l-1].type==="plain-text")&&(f=i(s[l-1])+f,s.splice(l-1,1),l--),s[l]=new t.Token("plain-text",f,null,f)}u.content&&typeof u.content!="string"&&a(u.content)}};t.hooks.add("after-tokenize",function(s){s.language!=="jsx"&&s.language!=="tsx"||a(s.tokens)})})(rt);(function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach(function(r){var n=e[r],i=[];/^\w+$/.test(r)||i.push(/\w+/.exec(r)[0]),r==="diff"&&i.push("bold"),t.languages.diff[r]={pattern:RegExp("^(?:["+n+`].*(?:\r ?| |(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(t.languages.diff,"PREFIXES",{value:e})})(rt);(function(t){t.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:t.languages.javascript}},t.hooks.add("before-tokenize",function(e){t.languages["markup-templating"].buildPlaceholders(e,"ejs",/<%(?!%)[\s\S]+?%>/g)}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"ejs")}),t.languages.eta=t.languages.ejs})(rt);(function(t){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:r,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=t.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=n.variable[1].inside,s=0;su&&(s=u);var h=s-l;return o.children[h]}}},resize:function(a){i([a])},assumeViewportIndependence:!0},n=void 0;window.addEventListener("resize",function(){r.assumeViewportIndependence&&n===window.innerWidth||(n=window.innerWidth,i(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))}),rt.hooks.add("complete",function(a){if(a.code){var s=a.element,o=s.parentNode;if(o&&/pre/i.test(o.nodeName)&&!s.querySelector(".line-numbers-rows")&&rt.util.isActive(s,t)){s.classList.remove(t),o.classList.add(t);var l,u=a.code.match(e),h=u?u.length+1:1,f=new Array(h+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=f,o.hasAttribute("data-start")&&(o.style.counterReset="linenumber "+(parseInt(o.getAttribute("data-start"),10)-1)),a.element.appendChild(l),i([o]),rt.hooks.run("line-numbers",a)}}}),rt.hooks.add("line-numbers",function(a){a.plugins=a.plugins||{},a.plugins.lineNumbers=!0})}function i(a){if((a=a.filter(function(o){var l,u=(l=o,l?window.getComputedStyle?getComputedStyle(l):l.currentStyle||null:null)["white-space"];return u==="pre-wrap"||u==="pre-line"})).length!=0){var s=a.map(function(o){var l=o.querySelector("code"),u=o.querySelector(".line-numbers-rows");if(l&&u){var h=o.querySelector(".line-numbers-sizer"),f=l.textContent.split(e);h||((h=document.createElement("span")).className="line-numbers-sizer",l.appendChild(h)),h.innerHTML="0",h.style.display="block";var d=h.getBoundingClientRect().height;return h.innerHTML="",{element:o,lines:f,lineHeights:[],oneLinerHeight:d,sizer:h}}}).filter(Boolean);s.forEach(function(o){var l=o.sizer,u=o.lines,h=o.lineHeights,f=o.oneLinerHeight;h[u.length-1]=void 0,u.forEach(function(d,p){if(d&&d.length>1){var g=l.appendChild(document.createElement("span"));g.style.display="block",g.textContent=d}else h[p]=f})}),s.forEach(function(o){for(var l=o.sizer,u=o.lineHeights,h=0,f=0;fcode{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:#e0e0e033;box-shadow:0 2px #0003;border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus{color:inherit;text-decoration:none} `;document.getElementsByTagName("head")[0].insertAdjacentElement("beforeend",TOe)});var k0,r9=$(()=>{b();k0={logger:self.console,WebSocket:self.WebSocket}});var Mn,$2=$(()=>{b();r9();Mn={log(...t){this.enabled&&(t.push(Date.now()),k0.logger.log("[ActionCable]",...t))}}});var wT,n9,kT,i9,HZ=$(()=>{b();$2();wT=()=>new Date().getTime(),n9=t=>(wT()-t)/1e3,kT=class{constructor(e){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=wT(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),Mn.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=wT(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),Mn.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=wT()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,Mn.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=wT(),Mn.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){let{staleThreshold:e,reconnectionBackoffRate:r}=this.constructor,n=Math.pow(1+r,Math.min(this.reconnectAttempts,10)),a=(this.reconnectAttempts===0?1:r)*Math.random();return e*1e3*n*(1+a)}reconnectIfStale(){this.connectionIsStale()&&(Mn.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${n9(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?Mn.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${n9(this.disconnectedAt)} s`):(Mn.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return n9(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&n9(this.disconnectedAt){(this.connectionIsStale()||!this.connection.isOpen())&&(Mn.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())},200)}};kT.staleThreshold=6;kT.reconnectionBackoffRate=.15;i9=kT});var TT,qZ=$(()=>{b();TT={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]}});var ET,a9,oFt,qRe,ST,s9,WZ=$(()=>{b();r9();HZ();qZ();$2();({message_types:ET,protocols:a9}=TT),oFt=a9.slice(0,a9.length-1),qRe=[].indexOf,ST=class{constructor(e){this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new i9(this),this.disconnected=!0}send(e){return this.isOpen()?(this.webSocket.send(JSON.stringify(e)),!0):!1}open(){return this.isActive()?(Mn.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1):(Mn.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${a9}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new k0.WebSocket(this.consumer.url,a9),this.installEventHandlers(),this.monitor.start(),!0)}close({allowReconnect:e}={allowReconnect:!0}){if(e||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(Mn.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(e){Mn.log("Failed to reopen WebSocket",e)}finally{Mn.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}isProtocolSupported(){return qRe.call(oFt,this.getProtocol())>=0}isState(...e){return qRe.call(e,this.getState())>=0}getState(){if(this.webSocket){for(let e in k0.WebSocket)if(k0.WebSocket[e]===this.webSocket.readyState)return e.toLowerCase()}return null}installEventHandlers(){for(let e in this.events){let r=this.events[e].bind(this);this.webSocket[`on${e}`]=r}}uninstallEventHandlers(){for(let e in this.events)this.webSocket[`on${e}`]=function(){}}};ST.reopenDelay=500;ST.prototype.events={message(t){if(!this.isProtocolSupported())return;let{identifier:e,message:r,reason:n,reconnect:i,type:a}=JSON.parse(t.data);switch(a){case ET.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case ET.disconnect:return Mn.log(`Disconnecting. Reason: ${n}`),this.close({allowReconnect:i});case ET.ping:return this.monitor.recordPing();case ET.confirmation:return this.subscriptions.confirmSubscription(e),this.subscriptions.notify(e,"connected");case ET.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",r)}},open(){if(Mn.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return Mn.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(t){if(Mn.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){Mn.log("WebSocket onerror event")}};s9=ST});var lFt,k1,GZ=$(()=>{b();lFt=function(t,e){if(e!=null)for(let r in e){let n=e[r];t[r]=n}return t},k1=class{constructor(e,r={},n){this.consumer=e,this.identifier=JSON.stringify(r),lFt(this,n)}perform(e,r={}){return r.action=e,this.send(r)}send(e){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(e)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}});var YZ,o9,jZ=$(()=>{b();$2();YZ=class{constructor(e){this.subscriptions=e,this.pendingSubscriptions=[]}guarantee(e){this.pendingSubscriptions.indexOf(e)==-1?(Mn.log(`SubscriptionGuarantor guaranteeing ${e.identifier}`),this.pendingSubscriptions.push(e)):Mn.log(`SubscriptionGuarantor already guaranteeing ${e.identifier}`),this.startGuaranteeing()}forget(e){Mn.log(`SubscriptionGuarantor forgetting ${e.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter(r=>r!==e)}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout(()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map(e=>{Mn.log(`SubscriptionGuarantor resubscribing ${e.identifier}`),this.subscriptions.subscribe(e)})},500)}},o9=YZ});var T1,XZ=$(()=>{b();GZ();jZ();$2();T1=class{constructor(e){this.consumer=e,this.guarantor=new o9(this),this.subscriptions=[]}create(e,r){let n=e,i=typeof n=="object"?n:{channel:n},a=new k1(this.consumer,i,r);return this.add(a)}add(e){return this.subscriptions.push(e),this.consumer.ensureActiveConnection(),this.notify(e,"initialized"),this.subscribe(e),e}remove(e){return this.forget(e),this.findAll(e.identifier).length||this.sendCommand(e,"unsubscribe"),e}reject(e){return this.findAll(e).map(r=>(this.forget(r),this.notify(r,"rejected"),r))}forget(e){return this.guarantor.forget(e),this.subscriptions=this.subscriptions.filter(r=>r!==e),e}findAll(e){return this.subscriptions.filter(r=>r.identifier===e)}reload(){return this.subscriptions.map(e=>this.subscribe(e))}notifyAll(e,...r){return this.subscriptions.map(n=>this.notify(n,e,...r))}notify(e,r,...n){let i;return typeof e=="string"?i=this.findAll(e):i=[e],i.map(a=>typeof a[r]=="function"?a[r](...n):void 0)}subscribe(e){this.sendCommand(e,"subscribe")&&this.guarantor.guarantee(e)}confirmSubscription(e){Mn.log(`Subscription confirmed ${e}`),this.findAll(e).map(r=>this.guarantor.forget(r))}sendCommand(e,r){let{identifier:n}=e;return this.consumer.send({command:r,identifier:n})}}});function KZ(t){if(typeof t=="function"&&(t=t()),t&&!/^wss?:/i.test(t)){let e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}else return t}var V2,WRe=$(()=>{b();WZ();XZ();V2=class{constructor(e){this._url=e,this.subscriptions=new T1(this),this.connection=new s9(this)}get url(){return KZ(this._url)}send(e){return this.connection.send(e)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}}});var YRe={};Wt(YRe,{Connection:()=>s9,ConnectionMonitor:()=>i9,Consumer:()=>V2,INTERNAL:()=>TT,Subscription:()=>k1,SubscriptionGuarantor:()=>o9,Subscriptions:()=>T1,adapters:()=>k0,createConsumer:()=>cFt,createWebSocketURL:()=>KZ,getConfig:()=>GRe,logger:()=>Mn});function cFt(t=GRe("url")||TT.default_mount_path){return new V2(t)}function GRe(t){let e=document.head.querySelector(`meta[name='action-cable-${t}']`);if(e)return e.getAttribute("content")}var jRe=$(()=>{b();WZ();HZ();WRe();qZ();GZ();XZ();jZ();r9();$2()});b();b();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c4918530-aca8-4b53-a6b4-661e71b933b5",t._sentryDebugIdIdentifier="sentry-dbid-c4918530-aca8-4b53-a6b4-661e71b933b5")}catch{}})();b();b();var{SENTRY_DSN:uIe,currentUserSignedIn:hIe,currentUserId:fIe,currentUsername:dIe}=window;window.Sentry=window.Sentry||{};window.Sentry&&Sentry.onLoad&&Sentry.onLoad(()=>{Sentry.init({dsn:uIe,environment:"production"}),hIe&&Sentry.setUser({id:fIe,name:dIe})});b();b();var g9=class{constructor(e,r,n){this.eventTarget=e,this.eventName=r,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){let r=pIe(e);for(let n of this.bindings){if(r.immediatePropagationStopped)break;n.handleEvent(r)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((e,r)=>{let n=e.index,i=r.index;return ni?1:0})}};function pIe(t){if("immediatePropagationStopped"in t)return t;{let{stopImmediatePropagation:e}=t;return Object.assign(t,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}var m9=class{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(e=>e.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(e=>e.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((e,r)=>e.concat(Array.from(r.values())),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,r=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),r&&this.clearEventListenersForBinding(e)}handleError(e,r,n={}){this.application.handleError(e,`Error ${r}`,n)}clearEventListenersForBinding(e){let r=this.fetchEventListenerForBinding(e);r.hasBindings()||(r.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){let{eventTarget:r,eventName:n,eventOptions:i}=e,a=this.fetchEventListenerMapForEventTarget(r),s=this.cacheKey(n,i);a.delete(s),a.size==0&&this.eventListenerMaps.delete(r)}fetchEventListenerForBinding(e){let{eventTarget:r,eventName:n,eventOptions:i}=e;return this.fetchEventListener(r,n,i)}fetchEventListener(e,r,n){let i=this.fetchEventListenerMapForEventTarget(e),a=this.cacheKey(r,n),s=i.get(a);return s||(s=this.createEventListener(e,r,n),i.set(a,s)),s}createEventListener(e,r,n){let i=new g9(e,r,n);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(e){let r=this.eventListenerMaps.get(e);return r||(r=new Map,this.eventListenerMaps.set(e,r)),r}cacheKey(e,r){let n=[e];return Object.keys(r).sort().forEach(i=>{n.push(`${r[i]?"":"!"}${i}`)}),n.join(":")}},gIe={stop({event:t,value:e}){return e&&t.stopPropagation(),!0},prevent({event:t,value:e}){return e&&t.preventDefault(),!0},self({event:t,value:e,element:r}){return e?r===t.target:!0}},mIe=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function vIe(t){let r=t.trim().match(mIe)||[],n=r[2],i=r[3];return i&&!["keydown","keyup","keypress"].includes(n)&&(n+=`.${i}`,i=""),{eventTarget:yIe(r[4]),eventName:n,eventOptions:r[7]?bIe(r[7]):{},identifier:r[5],methodName:r[6],keyFilter:r[1]||i}}function yIe(t){if(t=="window")return window;if(t=="document")return document}function bIe(t){return t.split(":").reduce((e,r)=>Object.assign(e,{[r.replace(/^!/,"")]:!/^!/.test(r)}),{})}function xIe(t){if(t==window)return"window";if(t==document)return"document"}function B9(t){return t.replace(/(?:[_-])([a-z0-9])/g,(e,r)=>r.toUpperCase())}function v9(t){return B9(t.replace(/--/g,"-").replace(/__/g,"_"))}function H2(t){return t.charAt(0).toUpperCase()+t.slice(1)}function fQ(t){return t.replace(/([A-Z])/g,(e,r)=>`-${r.toLowerCase()}`)}function wIe(t){return t.match(/[^\s]+/g)||[]}function nQ(t){return t!=null}function y9(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var iQ=["meta","ctrl","alt","shift"],b9=class{constructor(e,r,n,i){this.element=e,this.index=r,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||kIe(e)||LT("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||LT("missing identifier"),this.methodName=n.methodName||LT("missing method name"),this.keyFilter=n.keyFilter||"",this.schema=i}static forToken(e,r){return new this(e.element,e.index,vIe(e.content),r)}toString(){let e=this.keyFilter?`.${this.keyFilter}`:"",r=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${r}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return!1;let r=this.keyFilter.split("+");if(this.keyFilterDissatisfied(e,r))return!0;let n=r.filter(i=>!iQ.includes(i))[0];return n?(y9(this.keyMappings,n)||LT(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[n].toLowerCase()!==e.key.toLowerCase()):!1}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return!1;let r=[this.keyFilter];return!!this.keyFilterDissatisfied(e,r)}get params(){let e={},r=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(let{name:n,value:i}of Array.from(this.element.attributes)){let a=n.match(r),s=a&&a[1];s&&(e[B9(s)]=TIe(i))}return e}get eventTargetName(){return xIe(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,r){let[n,i,a,s]=iQ.map(o=>r.includes(o));return e.metaKey!==n||e.ctrlKey!==i||e.altKey!==a||e.shiftKey!==s}},aQ={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:t=>t.getAttribute("type")=="submit"?"click":"input",select:()=>"change",textarea:()=>"input"};function kIe(t){let e=t.tagName.toLowerCase();if(e in aQ)return aQ[e](t)}function LT(t){throw new Error(t)}function TIe(t){try{return JSON.parse(t)}catch{return t}}var x9=class{constructor(e,r){this.context=e,this.action=r}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){let r=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(r)&&this.invokeWithEvent(r)}get eventName(){return this.action.eventName}get method(){let e=this.controller[this.methodName];if(typeof e=="function")return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){let{element:r}=this.action,{actionDescriptorFilters:n}=this.context.application,{controller:i}=this.context,a=!0;for(let[s,o]of Object.entries(this.eventOptions))if(s in n){let l=n[s];a=a&&l({name:s,value:o,event:e,element:r,controller:i})}else continue;return a}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){let{target:r,currentTarget:n}=e;try{this.method.call(this.controller,e),this.context.logDebugActivity(this.methodName,{event:e,target:r,currentTarget:n,action:this.methodName})}catch(i){let{identifier:a,controller:s,element:o,index:l}=this,u={identifier:a,controller:s,element:o,index:l,event:e};this.context.handleError(i,`invoking action "${this.action}"`,u)}}willBeInvokedByEvent(e){let r=e.target;return e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e)||e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e)?!1:this.element===r?!0:r instanceof Element&&this.element.contains(r)?this.scope.containsElement(r):this.scope.containsElement(this.action.element)}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}},MT=class{constructor(e,r){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=r,this.elements=new Set,this.mutationObserver=new MutationObserver(n=>this.processMutations(n))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){let e=new Set(this.matchElementsInTree());for(let r of Array.from(this.elements))e.has(r)||this.removeElement(r);for(let r of Array.from(e))this.addElement(r)}}processMutations(e){if(this.started)for(let r of e)this.processMutation(r)}processMutation(e){e.type=="attributes"?this.processAttributeChange(e.target,e.attributeName):e.type=="childList"&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,r){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,r):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(let r of Array.from(e)){let n=this.elementFromNode(r);n&&this.processTree(n,this.removeElement)}}processAddedNodes(e){for(let r of Array.from(e)){let n=this.elementFromNode(r);n&&this.elementIsActive(n)&&this.processTree(n,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,r){for(let n of this.matchElementsInTree(e))r.call(this,n)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected!=this.element.isConnected?!1:this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}},DT=class{constructor(e,r,n){this.attributeName=r,this.delegate=n,this.elementObserver=new MT(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){let r=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return r.concat(n)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,r){this.delegate.elementAttributeValueChanged&&this.attributeName==r&&this.delegate.elementAttributeValueChanged(e,r)}};function EIe(t,e,r){dQ(t,e).add(r)}function SIe(t,e,r){dQ(t,e).delete(r),CIe(t,e)}function dQ(t,e){let r=t.get(e);return r||(r=new Set,t.set(e,r)),r}function CIe(t,e){let r=t.get(e);r!=null&&r.size==0&&t.delete(e)}var Kh=class{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((r,n)=>r.concat(Array.from(n)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((r,n)=>r+n.size,0)}add(e,r){EIe(this.valuesByKey,e,r)}delete(e,r){SIe(this.valuesByKey,e,r)}has(e,r){let n=this.valuesByKey.get(e);return n!=null&&n.has(r)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some(n=>n.has(e))}getValuesForKey(e){let r=this.valuesByKey.get(e);return r?Array.from(r):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter(([r,n])=>n.has(e)).map(([r,n])=>r)}};var w9=class{constructor(e,r,n,i){this._selector=r,this.details=i,this.elementObserver=new MT(e,this),this.delegate=n,this.matchesByElement=new Kh}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e,this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){let{selector:r}=this;if(r){let n=e.matches(r);return this.delegate.selectorMatchElement?n&&this.delegate.selectorMatchElement(e,this.details):n}else return!1}matchElementsInTree(e){let{selector:r}=this;if(r){let n=this.matchElement(e)?[e]:[],i=Array.from(e.querySelectorAll(r)).filter(a=>this.matchElement(a));return n.concat(i)}else return[]}elementMatched(e){let{selector:r}=this;r&&this.selectorMatched(e,r)}elementUnmatched(e){let r=this.matchesByElement.getKeysForValue(e);for(let n of r)this.selectorUnmatched(e,n)}elementAttributeChanged(e,r){let{selector:n}=this;if(n){let i=this.matchElement(e),a=this.matchesByElement.has(n,e);i&&!a?this.selectorMatched(e,n):!i&&a&&this.selectorUnmatched(e,n)}}selectorMatched(e,r){this.delegate.selectorMatched(e,r,this.details),this.matchesByElement.add(r,e)}selectorUnmatched(e,r){this.delegate.selectorUnmatched(e,r,this.details),this.matchesByElement.delete(r,e)}},k9=class{constructor(e,r){this.element=e,this.delegate=r,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(n=>this.processMutations(n))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(let e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(let r of e)this.processMutation(r)}processMutation(e){let r=e.attributeName;r&&this.refreshAttribute(r,e.oldValue)}refreshAttribute(e,r){let n=this.delegate.getStringMapKeyForAttribute(e);if(n!=null){this.stringMap.has(e)||this.stringMapKeyAdded(n,e);let i=this.element.getAttribute(e);if(this.stringMap.get(e)!=i&&this.stringMapValueChanged(i,n,r),i==null){let a=this.stringMap.get(e);this.stringMap.delete(e),a&&this.stringMapKeyRemoved(n,e,a)}else this.stringMap.set(e,i)}}stringMapKeyAdded(e,r){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,r)}stringMapValueChanged(e,r,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,r,n)}stringMapKeyRemoved(e,r,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,r,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(e=>e.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}},OT=class{constructor(e,r,n){this.attributeObserver=new DT(e,r,this),this.delegate=n,this.tokensByElement=new Kh}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){let[r,n]=this.refreshTokensForElement(e);this.tokensUnmatched(r),this.tokensMatched(n)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach(r=>this.tokenMatched(r))}tokensUnmatched(e){e.forEach(r=>this.tokenUnmatched(r))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){let r=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),i=AIe(r,n).findIndex(([a,s])=>!LIe(a,s));return i==-1?[[],[]]:[r.slice(i),n.slice(i)]}readTokensForElement(e){let r=this.attributeName,n=e.getAttribute(r)||"";return _Ie(n,e,r)}};function _Ie(t,e,r){return t.trim().split(/\s+/).filter(n=>n.length).map((n,i)=>({element:e,attributeName:r,content:n,index:i}))}function AIe(t,e){let r=Math.max(t.length,e.length);return Array.from({length:r},(n,i)=>[t[i],e[i]])}function LIe(t,e){return t&&e&&t.index==e.index&&t.content==e.content}var RT=class{constructor(e,r,n){this.tokenListObserver=new OT(e,r,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){let{element:r}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(r).set(e,n),this.delegate.elementMatchedValue(r,n))}tokenUnmatched(e){let{element:r}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(r).delete(e),this.delegate.elementUnmatchedValue(r,n))}fetchParseResultForToken(e){let r=this.parseResultsByToken.get(e);return r||(r=this.parseToken(e),this.parseResultsByToken.set(e,r)),r}fetchValuesByTokenForElement(e){let r=this.valuesByTokenByElement.get(e);return r||(r=new Map,this.valuesByTokenByElement.set(e,r)),r}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(r){return{error:r}}}},T9=class{constructor(e,r){this.context=e,this.delegate=r,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new RT(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){let r=new x9(this.context,e);this.bindingsByAction.set(e,r),this.delegate.bindingConnected(r)}disconnectAction(e){let r=this.bindingsByAction.get(e);r&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(r))}disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e,!0)),this.bindingsByAction.clear()}parseValueForToken(e){let r=b9.forToken(e,this.schema);if(r.identifier==this.identifier)return r}elementMatchedValue(e,r){this.connectAction(r)}elementUnmatchedValue(e,r){this.disconnectAction(r)}},E9=class{constructor(e,r){this.context=e,this.receiver=r,this.stringMapObserver=new k9(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,r){let n=this.valueDescriptorMap[r];this.hasValue(e)||this.invokeChangedCallback(e,n.writer(this.receiver[e]),n.writer(n.defaultValue))}stringMapValueChanged(e,r,n){let i=this.valueDescriptorNameMap[r];e!==null&&(n===null&&(n=i.writer(i.defaultValue)),this.invokeChangedCallback(r,e,n))}stringMapKeyRemoved(e,r,n){let i=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,i.writer(this.receiver[e]),n):this.invokeChangedCallback(e,i.writer(i.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(let{key:e,name:r,defaultValue:n,writer:i}of this.valueDescriptors)n!=null&&!this.controller.data.has(e)&&this.invokeChangedCallback(r,i(n),void 0)}invokeChangedCallback(e,r,n){let i=`${e}Changed`,a=this.receiver[i];if(typeof a=="function"){let s=this.valueDescriptorNameMap[e];try{let o=s.reader(r),l=n;n&&(l=s.reader(n)),a.call(this.receiver,o,l)}catch(o){throw o instanceof TypeError&&(o.message=`Stimulus Value "${this.context.identifier}.${s.name}" - ${o.message}`),o}}}get valueDescriptors(){let{valueDescriptorMap:e}=this;return Object.keys(e).map(r=>e[r])}get valueDescriptorNameMap(){let e={};return Object.keys(this.valueDescriptorMap).forEach(r=>{let n=this.valueDescriptorMap[r];e[n.name]=n}),e}hasValue(e){let r=this.valueDescriptorNameMap[e],n=`has${H2(r.name)}`;return this.receiver[n]}},S9=class{constructor(e,r){this.context=e,this.delegate=r,this.targetsByName=new Kh}start(){this.tokenListObserver||(this.tokenListObserver=new OT(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:r}){this.scope.containsElement(e)&&this.connectTarget(e,r)}tokenUnmatched({element:e,content:r}){this.disconnectTarget(e,r)}connectTarget(e,r){var n;this.targetsByName.has(r,e)||(this.targetsByName.add(r,e),(n=this.tokenListObserver)===null||n===void 0||n.pause(()=>this.delegate.targetConnected(e,r)))}disconnectTarget(e,r){var n;this.targetsByName.has(r,e)&&(this.targetsByName.delete(r,e),(n=this.tokenListObserver)===null||n===void 0||n.pause(()=>this.delegate.targetDisconnected(e,r)))}disconnectAllTargets(){for(let e of this.targetsByName.keys)for(let r of this.targetsByName.getValuesForKey(e))this.disconnectTarget(r,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}};function q2(t,e){let r=pQ(t);return Array.from(r.reduce((n,i)=>(DIe(i,e).forEach(a=>n.add(a)),n),new Set))}function MIe(t,e){return pQ(t).reduce((n,i)=>(n.push(...OIe(i,e)),n),[])}function pQ(t){let e=[];for(;t;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function DIe(t,e){let r=t[e];return Array.isArray(r)?r:[]}function OIe(t,e){let r=t[e];return r?Object.keys(r).map(n=>[n,r[n]]):[]}var C9=class{constructor(e,r){this.started=!1,this.context=e,this.delegate=r,this.outletsByName=new Kh,this.outletElementsByName=new Kh,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(e=>{this.setupSelectorObserverForOutlet(e),this.setupAttributeObserverForOutlet(e)}),this.started=!0,this.dependentContexts.forEach(e=>e.refresh()))}refresh(){this.selectorObserverMap.forEach(e=>e.refresh()),this.attributeObserverMap.forEach(e=>e.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(e=>e.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(e=>e.stop()),this.attributeObserverMap.clear())}selectorMatched(e,r,{outletName:n}){let i=this.getOutlet(e,n);i&&this.connectOutlet(i,e,n)}selectorUnmatched(e,r,{outletName:n}){let i=this.getOutletFromMap(e,n);i&&this.disconnectOutlet(i,e,n)}selectorMatchElement(e,{outletName:r}){let n=this.selector(r),i=this.hasOutlet(e,r),a=e.matches(`[${this.schema.controllerAttribute}~=${r}]`);return n?i&&a&&e.matches(n):!1}elementMatchedAttribute(e,r){let n=this.getOutletNameFromOutletAttributeName(r);n&&this.updateSelectorObserverForOutlet(n)}elementAttributeValueChanged(e,r){let n=this.getOutletNameFromOutletAttributeName(r);n&&this.updateSelectorObserverForOutlet(n)}elementUnmatchedAttribute(e,r){let n=this.getOutletNameFromOutletAttributeName(r);n&&this.updateSelectorObserverForOutlet(n)}connectOutlet(e,r,n){var i;this.outletElementsByName.has(n,r)||(this.outletsByName.add(n,e),this.outletElementsByName.add(n,r),(i=this.selectorObserverMap.get(n))===null||i===void 0||i.pause(()=>this.delegate.outletConnected(e,r,n)))}disconnectOutlet(e,r,n){var i;this.outletElementsByName.has(n,r)&&(this.outletsByName.delete(n,e),this.outletElementsByName.delete(n,r),(i=this.selectorObserverMap.get(n))===null||i===void 0||i.pause(()=>this.delegate.outletDisconnected(e,r,n)))}disconnectAllOutlets(){for(let e of this.outletElementsByName.keys)for(let r of this.outletElementsByName.getValuesForKey(e))for(let n of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(n,r,e)}updateSelectorObserverForOutlet(e){let r=this.selectorObserverMap.get(e);r&&(r.selector=this.selector(e))}setupSelectorObserverForOutlet(e){let r=this.selector(e),n=new w9(document.body,r,this,{outletName:e});this.selectorObserverMap.set(e,n),n.start()}setupAttributeObserverForOutlet(e){let r=this.attributeNameForOutletName(e),n=new DT(this.scope.element,r,this);this.attributeObserverMap.set(e,n),n.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find(r=>this.attributeNameForOutletName(r)===e)}get outletDependencies(){let e=new Kh;return this.router.modules.forEach(r=>{let n=r.definition.controllerConstructor;q2(n,"outlets").forEach(a=>e.add(a,r.identifier))}),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){let e=this.dependentControllerIdentifiers;return this.router.contexts.filter(r=>e.includes(r.identifier))}hasOutlet(e,r){return!!this.getOutlet(e,r)||!!this.getOutletFromMap(e,r)}getOutlet(e,r){return this.application.getControllerForElementAndIdentifier(e,r)}getOutletFromMap(e,r){return this.outletsByName.getValuesForKey(r).find(n=>n.element===e)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}},_9=class{constructor(e,r){this.logDebugActivity=(n,i={})=>{let{identifier:a,controller:s,element:o}=this;i=Object.assign({identifier:a,controller:s,element:o},i),this.application.logDebugActivity(this.identifier,n,i)},this.module=e,this.scope=r,this.controller=new e.controllerConstructor(this),this.bindingObserver=new T9(this,this.dispatcher),this.valueObserver=new E9(this,this.controller),this.targetObserver=new S9(this,this),this.outletObserver=new C9(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(n){this.handleError(n,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,r,n={}){let{identifier:i,controller:a,element:s}=this;n=Object.assign({identifier:i,controller:a,element:s},n),this.application.handleError(e,`Error ${r}`,n)}targetConnected(e,r){this.invokeControllerMethod(`${r}TargetConnected`,e)}targetDisconnected(e,r){this.invokeControllerMethod(`${r}TargetDisconnected`,e)}outletConnected(e,r,n){this.invokeControllerMethod(`${v9(n)}OutletConnected`,e,r)}outletDisconnected(e,r,n){this.invokeControllerMethod(`${v9(n)}OutletDisconnected`,e,r)}invokeControllerMethod(e,...r){let n=this.controller;typeof n[e]=="function"&&n[e](...r)}};function RIe(t){return IIe(t,NIe(t))}function IIe(t,e){let r=zIe(t),n=PIe(t.prototype,e);return Object.defineProperties(r.prototype,n),r}function NIe(t){return q2(t,"blessings").reduce((r,n)=>{let i=n(t);for(let a in i){let s=r[a]||{};r[a]=Object.assign(s,i[a])}return r},{})}function PIe(t,e){return BIe(e).reduce((r,n)=>{let i=FIe(t,e,n);return i&&Object.assign(r,{[n]:i}),r},{})}function FIe(t,e,r){let n=Object.getOwnPropertyDescriptor(t,r);if(!(n&&"value"in n)){let a=Object.getOwnPropertyDescriptor(e,r).value;return n&&(a.get=n.get||a.get,a.set=n.set||a.set),a}}var BIe=typeof Object.getOwnPropertySymbols=="function"?t=>[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)]:Object.getOwnPropertyNames,zIe=(()=>{function t(r){function n(){return Reflect.construct(r,arguments,new.target)}return n.prototype=Object.create(r.prototype,{constructor:{value:n}}),Reflect.setPrototypeOf(n,r),n}function e(){let n=t(function(){this.a.call(this)});return n.prototype.a=function(){},new n}try{return e(),t}catch{return n=>class extends n{}}})();function $Ie(t){return{identifier:t.identifier,controllerConstructor:RIe(t.controllerConstructor)}}var A9=class{constructor(e,r){this.application=e,this.definition=$Ie(r),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){let r=this.fetchContextForScope(e);this.connectedContexts.add(r),r.connect()}disconnectContextForScope(e){let r=this.contextsByScope.get(e);r&&(this.connectedContexts.delete(r),r.disconnect())}fetchContextForScope(e){let r=this.contextsByScope.get(e);return r||(r=new _9(this,e),this.contextsByScope.set(e,r)),r}},L9=class{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){let r=this.data.get(this.getDataKey(e))||"";return wIe(r)}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}},M9=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){let r=this.getAttributeNameForKey(e);return this.element.getAttribute(r)}set(e,r){let n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,r),this.get(e)}has(e){let r=this.getAttributeNameForKey(e);return this.element.hasAttribute(r)}delete(e){if(this.has(e)){let r=this.getAttributeNameForKey(e);return this.element.removeAttribute(r),!0}else return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${fQ(e)}`}},D9=class{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,r,n){let i=this.warnedKeysByObject.get(e);i||(i=new Set,this.warnedKeysByObject.set(e,i)),i.has(r)||(i.add(r),this.logger.warn(n,e))}};function O9(t,e){return`[${t}~="${e}"]`}var R9=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((r,n)=>r||this.findTarget(n)||this.findLegacyTarget(n),void 0)}findAll(...e){return e.reduce((r,n)=>[...r,...this.findAllTargets(n),...this.findAllLegacyTargets(n)],[])}findTarget(e){let r=this.getSelectorForTargetName(e);return this.scope.findElement(r)}findAllTargets(e){let r=this.getSelectorForTargetName(e);return this.scope.findAllElements(r)}getSelectorForTargetName(e){let r=this.schema.targetAttributeForScope(this.identifier);return O9(r,e)}findLegacyTarget(e){let r=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(r),e)}findAllLegacyTargets(e){let r=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(r).map(n=>this.deprecate(n,e))}getLegacySelectorForTargetName(e){let r=`${this.identifier}.${e}`;return O9(this.schema.targetAttribute,r)}deprecate(e,r){if(e){let{identifier:n}=this,i=this.schema.targetAttribute,a=this.schema.targetAttributeForScope(n);this.guide.warn(e,`target:${r}`,`Please replace ${i}="${n}.${r}" with ${a}="${r}". The ${i} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}},I9=class{constructor(e,r){this.scope=e,this.controllerElement=r}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((r,n)=>r||this.findOutlet(n),void 0)}findAll(...e){return e.reduce((r,n)=>[...r,...this.findAllOutlets(n)],[])}getSelectorForOutletName(e){let r=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(r)}findOutlet(e){let r=this.getSelectorForOutletName(e);if(r)return this.findElement(r,e)}findAllOutlets(e){let r=this.getSelectorForOutletName(e);return r?this.findAllElements(r,e):[]}findElement(e,r){return this.scope.queryElements(e).filter(i=>this.matchesElement(i,e,r))[0]}findAllElements(e,r){return this.scope.queryElements(e).filter(i=>this.matchesElement(i,e,r))}matchesElement(e,r,n){let i=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(r)&&i.split(" ").includes(n)}},N9=class t{constructor(e,r,n,i){this.targets=new R9(this),this.classes=new L9(this),this.data=new M9(this),this.containsElement=a=>a.closest(this.controllerSelector)===this.element,this.schema=e,this.element=r,this.identifier=n,this.guide=new D9(i),this.outlets=new I9(this.documentScope,r)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return O9(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new t(this.schema,document.documentElement,this.identifier,this.guide.logger)}},P9=class{constructor(e,r,n){this.element=e,this.schema=r,this.delegate=n,this.valueListObserver=new RT(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){let{element:r,content:n}=e;return this.parseValueForElementAndIdentifier(r,n)}parseValueForElementAndIdentifier(e,r){let n=this.fetchScopesByIdentifierForElement(e),i=n.get(r);return i||(i=this.delegate.createScopeForElementAndIdentifier(e,r),n.set(r,i)),i}elementMatchedValue(e,r){let n=(this.scopeReferenceCounts.get(r)||0)+1;this.scopeReferenceCounts.set(r,n),n==1&&this.delegate.scopeConnected(r)}elementUnmatchedValue(e,r){let n=this.scopeReferenceCounts.get(r);n&&(this.scopeReferenceCounts.set(r,n-1),n==1&&this.delegate.scopeDisconnected(r))}fetchScopesByIdentifierForElement(e){let r=this.scopesByIdentifierByElement.get(e);return r||(r=new Map,this.scopesByIdentifierByElement.set(e,r)),r}},F9=class{constructor(e){this.application=e,this.scopeObserver=new P9(this.element,this.schema,this),this.scopesByIdentifier=new Kh,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((e,r)=>e.concat(r.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);let r=new A9(this.application,e);this.connectModule(r);let n=e.controllerConstructor.afterLoad;n&&n.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){let r=this.modulesByIdentifier.get(e);r&&this.disconnectModule(r)}getContextForElementAndIdentifier(e,r){let n=this.modulesByIdentifier.get(r);if(n)return n.contexts.find(i=>i.element==e)}proposeToConnectScopeForElementAndIdentifier(e,r){let n=this.scopeObserver.parseValueForElementAndIdentifier(e,r);n?this.scopeObserver.elementMatchedValue(n.element,n):console.error(`Couldn't find or create scope for identifier: "${r}" and element:`,e)}handleError(e,r,n){this.application.handleError(e,r,n)}createScopeForElementAndIdentifier(e,r){return new N9(this.schema,e,r,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);let r=this.modulesByIdentifier.get(e.identifier);r&&r.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);let r=this.modulesByIdentifier.get(e.identifier);r&&r.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(n=>e.connectContextForScope(n))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(n=>e.disconnectContextForScope(n))}},VIe={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:t=>`data-${t}-target`,outletAttributeForScope:(t,e)=>`data-${t}-${e}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},sQ("abcdefghijklmnopqrstuvwxyz".split("").map(t=>[t,t]))),sQ("0123456789".split("").map(t=>[t,t])))};function sQ(t){return t.reduce((e,[r,n])=>Object.assign(Object.assign({},e),{[r]:n}),{})}var IT=class{constructor(e=document.documentElement,r=VIe){this.logger=console,this.debug=!1,this.logDebugActivity=(n,i,a={})=>{this.debug&&this.logFormattedMessage(n,i,a)},this.element=e,this.schema=r,this.dispatcher=new m9(this),this.router=new F9(this),this.actionDescriptorFilters=Object.assign({},gIe)}static start(e,r){let n=new this(e,r);return n.start(),n}async start(){await UIe(),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,r){this.load({identifier:e,controllerConstructor:r})}registerActionOption(e,r){this.actionDescriptorFilters[e]=r}load(e,...r){(Array.isArray(e)?e:[e,...r]).forEach(i=>{i.controllerConstructor.shouldLoad&&this.router.loadDefinition(i)})}unload(e,...r){(Array.isArray(e)?e:[e,...r]).forEach(i=>this.router.unloadIdentifier(i))}get controllers(){return this.router.contexts.map(e=>e.controller)}getControllerForElementAndIdentifier(e,r){let n=this.router.getContextForElementAndIdentifier(e,r);return n?n.controller:null}handleError(e,r,n){var i;this.logger.error(`%s %o %o`,r,e,n),(i=window.onerror)===null||i===void 0||i.call(window,r,"",0,0,e)}logFormattedMessage(e,r,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${r}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}};function UIe(){return new Promise(t=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>t()):t()})}function HIe(t){return q2(t,"classes").reduce((r,n)=>Object.assign(r,qIe(n)),{})}function qIe(t){return{[`${t}Class`]:{get(){let{classes:e}=this;if(e.has(t))return e.get(t);{let r=e.getAttributeName(t);throw new Error(`Missing attribute "${r}"`)}}},[`${t}Classes`]:{get(){return this.classes.getAll(t)}},[`has${H2(t)}Class`]:{get(){return this.classes.has(t)}}}}function WIe(t){return q2(t,"outlets").reduce((r,n)=>Object.assign(r,GIe(n)),{})}function oQ(t,e,r){return t.application.getControllerForElementAndIdentifier(e,r)}function lQ(t,e,r){let n=oQ(t,e,r);if(n||(t.application.router.proposeToConnectScopeForElementAndIdentifier(e,r),n=oQ(t,e,r),n))return n}function GIe(t){let e=v9(t);return{[`${e}Outlet`]:{get(){let r=this.outlets.find(t),n=this.outlets.getSelectorForOutletName(t);if(r){let i=lQ(this,r,t);if(i)return i;throw new Error(`The provided outlet element is missing an outlet controller "${t}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${t}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${e}Outlets`]:{get(){let r=this.outlets.findAll(t);return r.length>0?r.map(n=>{let i=lQ(this,n,t);if(i)return i;console.warn(`The provided outlet element is missing an outlet controller "${t}" instance for host controller "${this.identifier}"`,n)}).filter(n=>n):[]}},[`${e}OutletElement`]:{get(){let r=this.outlets.find(t),n=this.outlets.getSelectorForOutletName(t);if(r)return r;throw new Error(`Missing outlet element "${t}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(t)}},[`has${H2(e)}Outlet`]:{get(){return this.outlets.has(t)}}}}function YIe(t){return q2(t,"targets").reduce((r,n)=>Object.assign(r,jIe(n)),{})}function jIe(t){return{[`${t}Target`]:{get(){let e=this.targets.find(t);if(e)return e;throw new Error(`Missing target element "${t}" for "${this.identifier}" controller`)}},[`${t}Targets`]:{get(){return this.targets.findAll(t)}},[`has${H2(t)}Target`]:{get(){return this.targets.has(t)}}}}function XIe(t){let e=MIe(t,"values"),r={valueDescriptorMap:{get(){return e.reduce((n,i)=>{let a=gQ(i,this.identifier),s=this.data.getAttributeNameForKey(a.key);return Object.assign(n,{[s]:a})},{})}}};return e.reduce((n,i)=>Object.assign(n,KIe(i)),r)}function KIe(t,e){let r=gQ(t,e),{key:n,name:i,reader:a,writer:s}=r;return{[i]:{get(){let o=this.data.get(n);return o!==null?a(o):r.defaultValue},set(o){o===void 0?this.data.delete(n):this.data.set(n,s(o))}},[`has${H2(i)}`]:{get(){return this.data.has(n)||r.hasCustomDefaultValue}}}}function gQ([t,e],r){return eNe({controller:r,token:t,typeDefinition:e})}function NT(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function U2(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(t))return"array";if(Object.prototype.toString.call(t)==="[object Object]")return"object"}function ZIe(t){let{controller:e,token:r,typeObject:n}=t,i=nQ(n.type),a=nQ(n.default),s=i&&a,o=i&&!a,l=!i&&a,u=NT(n.type),h=U2(t.typeObject.default);if(o)return u;if(l)return h;if(u!==h){let f=e?`${e}.${r}`:r;throw new Error(`The specified default value for the Stimulus Value "${f}" must match the defined type "${u}". The provided default value of "${n.default}" is of type "${h}".`)}if(s)return u}function QIe(t){let{controller:e,token:r,typeDefinition:n}=t,a=ZIe({controller:e,token:r,typeObject:n}),s=U2(n),o=NT(n),l=a||s||o;if(l)return l;let u=e?`${e}.${n}`:r;throw new Error(`Unknown value type "${u}" for "${r}" value`)}function JIe(t){let e=NT(t);if(e)return cQ[e];let r=y9(t,"default"),n=y9(t,"type"),i=t;if(r)return i.default;if(n){let{type:a}=i,s=NT(a);if(s)return cQ[s]}return t}function eNe(t){let{token:e,typeDefinition:r}=t,n=`${fQ(e)}-value`,i=QIe(t);return{type:i,key:n,name:B9(n),get defaultValue(){return JIe(r)},get hasCustomDefaultValue(){return U2(r)!==void 0},reader:tNe[i],writer:uQ[i]||uQ.default}}var cQ={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},tNe={array(t){let e=JSON.parse(t);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${t}" of type "${U2(e)}"`);return e},boolean(t){return!(t=="0"||String(t).toLowerCase()=="false")},number(t){return Number(t.replace(/_/g,""))},object(t){let e=JSON.parse(t);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${t}" of type "${U2(e)}"`);return e},string(t){return t}},uQ={default:rNe,array:hQ,object:hQ};function hQ(t){return JSON.stringify(t)}function rNe(t){return`${t}`}var or=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,r){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:r=this.element,detail:n={},prefix:i=this.identifier,bubbles:a=!0,cancelable:s=!0}={}){let o=i?`${i}:${e}`:e,l=new CustomEvent(o,{detail:n,bubbles:a,cancelable:s});return r.dispatchEvent(l),l}};or.blessings=[HIe,YIe,XIe,WIe];or.targets=[];or.outlets=[];or.values={};b();var z9={};Wt(z9,{default:()=>PT});b();var PT=class extends or{static values={expiresAt:String,id:Number};dismiss(){let e=new Date(this.expiresAtValue).toUTCString();document.cookie=`announcement_${this.idValue}=disabled; expires=${e}; path=/`,this.element.remove()}};var cO={};Wt(cO,{default:()=>lO});b();b();function mQ(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Fu(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function aNe(t,e){if(t==null)return{};var r=iNe(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var sNe="1.15.6";function Zh(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Jh=Zh(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),J2=Zh(/Edge/i),vQ=Zh(/firefox/i),j2=Zh(/safari/i)&&!Zh(/chrome/i)&&!Zh(/android/i),J9=Zh(/iP(ad|od|hone)/i),SQ=Zh(/chrome/i)&&Zh(/android/i),CQ={capture:!1,passive:!1};function Fr(t,e,r){t.addEventListener(e,r,!Jh&&CQ)}function Pr(t,e,r){t.removeEventListener(e,r,!Jh&&CQ)}function GT(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function _Q(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Bc(t,e,r,n){if(t){r=r||document;do{if(e!=null&&(e[0]===">"?t.parentNode===r&>(t,e):GT(t,e))||n&&t===r)return t;if(t===r)break}while(t=_Q(t))}return null}var yQ=/\s+/g;function il(t,e,r){if(t&&e)if(t.classList)t.classList[r?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(yQ," ").replace(" "+e+" "," ");t.className=(n+(r?" "+e:"")).replace(yQ," ")}}function hr(t,e,r){var n=t&&t.style;if(n){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(r=t.currentStyle),e===void 0?r:r[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=r+(typeof r=="string"?"":"px")}}function L1(t,e){var r="";if(typeof t=="string")r=t;else do{var n=hr(t,"transform");n&&n!=="none"&&(r=n+" "+r)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(r)}function AQ(t,e,r){if(t){var n=t.getElementsByTagName(e),i=0,a=n.length;if(r)for(;i=a:s=i<=a,!s)return n;if(n===Pu())break;n=Dd(n,!1)}return!1}function M1(t,e,r,n){for(var i=0,a=0,s=t.children;a2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,a=aNe(n,pNe);ex.pluginEvent.bind(fr)(e,r,Fu({dragEl:kt,parentEl:Ui,ghostEl:wr,rootEl:di,nextEl:_0,lastDownEl:UT,cloneEl:Li,cloneHidden:Md,dragStarted:W2,putSortable:es,activeSortable:fr.active,originalEvent:i,oldIndex:A1,oldDraggableIndex:K2,newIndex:al,newDraggableIndex:Ld,hideGhostForTarget:PQ,unhideGhostForTarget:FQ,cloneNowHidden:function(){Md=!0},cloneNowShown:function(){Md=!1},dispatchSortableEvent:function(o){qs({sortable:r,name:o,originalEvent:i})}},a))};function qs(t){dNe(Fu({putSortable:es,cloneEl:Li,targetEl:kt,rootEl:di,oldIndex:A1,oldDraggableIndex:K2,newIndex:al,newDraggableIndex:Ld},t))}var kt,Ui,wr,di,_0,UT,Li,Md,A1,al,K2,Ld,FT,es,_1=!1,YT=!1,jT=[],S0,Fc,U9,H9,wQ,kQ,W2,C1,Z2,Q2=!1,BT=!1,HT,Ts,q9=[],X9=!1,XT=[],ZT=typeof document<"u",zT=J9,TQ=J2||Jh?"cssFloat":"float",gNe=ZT&&!SQ&&!J9&&"draggable"in document.createElement("div"),RQ=function(){if(ZT){if(Jh)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),IQ=function(e,r){var n=hr(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=M1(e,0,r),s=M1(e,1,r),o=a&&hr(a),l=s&&hr(s),u=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+ca(a).width,h=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ca(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&o.float&&o.float!=="none"){var f=o.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return a&&(o.display==="block"||o.display==="flex"||o.display==="table"||o.display==="grid"||u>=i&&n[TQ]==="none"||s&&n[TQ]==="none"&&u+h>i)?"vertical":"horizontal"},mNe=function(e,r,n){var i=n?e.left:e.top,a=n?e.right:e.bottom,s=n?e.width:e.height,o=n?r.left:r.top,l=n?r.right:r.bottom,u=n?r.width:r.height;return i===o||a===l||i+s/2===o+u/2},vNe=function(e,r){var n;return jT.some(function(i){var a=i[bo].options.emptyInsertThreshold;if(!(!a||eO(i))){var s=ca(i),o=e>=s.left-a&&e<=s.right+a,l=r>=s.top-a&&r<=s.bottom+a;if(o&&l)return n=i}}),n},NQ=function(e){function r(a,s){return function(o,l,u,h){var f=o.options.group.name&&l.options.group.name&&o.options.group.name===l.options.group.name;if(a==null&&(s||f))return!0;if(a==null||a===!1)return!1;if(s&&a==="clone")return a;if(typeof a=="function")return r(a(o,l,u,h),s)(o,l,u,h);var d=(s?o:l).options.group.name;return a===!0||typeof a=="string"&&a===d||a.join&&a.indexOf(d)>-1}}var n={},i=e.group;(!i||VT(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=r(i.pull,!0),n.checkPut=r(i.put),n.revertClone=i.revertClone,e.group=n},PQ=function(){!RQ&&wr&&hr(wr,"display","none")},FQ=function(){!RQ&&wr&&hr(wr,"display","")};ZT&&!SQ&&document.addEventListener("click",function(t){if(YT)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),YT=!1,!1},!0);var C0=function(e){if(kt){e=e.touches?e.touches[0]:e;var r=vNe(e.clientX,e.clientY);if(r){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=r,n.preventDefault=void 0,n.stopPropagation=void 0,r[bo]._onDragOver(n)}}},yNe=function(e){kt&&kt.parentNode[bo]._isOutsideThisEl(e.target)};function fr(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Qh({},e),t[bo]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return IQ(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,o){s.setData("Text",o.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:fr.supportPointer!==!1&&"PointerEvent"in window&&(!j2||J9),emptyInsertThreshold:5};ex.initializePlugins(this,t,r);for(var n in r)!(n in e)&&(e[n]=r[n]);NQ(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:gNe,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Fr(t,"pointerdown",this._onTapStart):(Fr(t,"mousedown",this._onTapStart),Fr(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Fr(t,"dragover",this),Fr(t,"dragenter",this)),jT.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Qh(this,uNe())}fr.prototype={constructor:fr,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(C1=null)},_getDirection:function(e,r){return typeof this.options.direction=="function"?this.options.direction.call(this,e,r,kt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var r=this,n=this.el,i=this.options,a=i.preventOnFilter,s=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(o||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,h=i.filter;if(CNe(n),!kt&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&j2&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Bc(l,i.draggable,n,!1),!(l&&l.animated)&&UT!==l)){if(A1=Bl(l),K2=Bl(l,i.draggable),typeof h=="function"){if(h.call(this,e,l,this)){qs({sortable:r,rootEl:u,name:"filter",targetEl:l,toEl:n,fromEl:n}),yo("filter",r,{evt:e}),a&&e.preventDefault();return}}else if(h&&(h=h.split(",").some(function(f){if(f=Bc(u,f.trim(),n,!1),f)return qs({sortable:r,rootEl:f,name:"filter",targetEl:l,fromEl:n,toEl:n}),yo("filter",r,{evt:e}),!0}),h)){a&&e.preventDefault();return}i.handle&&!Bc(u,i.handle,n,!1)||this._prepareDragStart(e,o,l)}}},_prepareDragStart:function(e,r,n){var i=this,a=i.el,s=i.options,o=a.ownerDocument,l;if(n&&!kt&&n.parentNode===a){var u=ca(n);if(di=a,kt=n,Ui=kt.parentNode,_0=kt.nextSibling,UT=n,FT=s.group,fr.dragged=kt,S0={target:kt,clientX:(r||e).clientX,clientY:(r||e).clientY},wQ=S0.clientX-u.left,kQ=S0.clientY-u.top,this._lastX=(r||e).clientX,this._lastY=(r||e).clientY,kt.style["will-change"]="all",l=function(){if(yo("delayEnded",i,{evt:e}),fr.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!vQ&&i.nativeDraggable&&(kt.draggable=!0),i._triggerDragStart(e,r),qs({sortable:i,name:"choose",originalEvent:e}),il(kt,s.chosenClass,!0)},s.ignore.split(",").forEach(function(h){AQ(kt,h.trim(),W9)}),Fr(o,"dragover",C0),Fr(o,"mousemove",C0),Fr(o,"touchmove",C0),s.supportPointer?(Fr(o,"pointerup",i._onDrop),!this.nativeDraggable&&Fr(o,"pointercancel",i._onDrop)):(Fr(o,"mouseup",i._onDrop),Fr(o,"touchend",i._onDrop),Fr(o,"touchcancel",i._onDrop)),vQ&&this.nativeDraggable&&(this.options.touchStartThreshold=4,kt.draggable=!0),yo("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(J2||Jh))){if(fr.eventCanceled){this._onDrop();return}s.supportPointer?(Fr(o,"pointerup",i._disableDelayedDrag),Fr(o,"pointercancel",i._disableDelayedDrag)):(Fr(o,"mouseup",i._disableDelayedDrag),Fr(o,"touchend",i._disableDelayedDrag),Fr(o,"touchcancel",i._disableDelayedDrag)),Fr(o,"mousemove",i._delayedDragTouchMoveHandler),Fr(o,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&Fr(o,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var r=e.touches?e.touches[0]:e;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){kt&&W9(kt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Pr(e,"mouseup",this._disableDelayedDrag),Pr(e,"touchend",this._disableDelayedDrag),Pr(e,"touchcancel",this._disableDelayedDrag),Pr(e,"pointerup",this._disableDelayedDrag),Pr(e,"pointercancel",this._disableDelayedDrag),Pr(e,"mousemove",this._delayedDragTouchMoveHandler),Pr(e,"touchmove",this._delayedDragTouchMoveHandler),Pr(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,r){r=r||e.pointerType=="touch"&&e,!this.nativeDraggable||r?this.options.supportPointer?Fr(document,"pointermove",this._onTouchMove):r?Fr(document,"touchmove",this._onTouchMove):Fr(document,"mousemove",this._onTouchMove):(Fr(kt,"dragend",this),Fr(di,"dragstart",this._onDragStart));try{document.selection?qT(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,r){if(_1=!1,di&&kt){yo("dragStarted",this,{evt:r}),this.nativeDraggable&&Fr(document,"dragover",yNe);var n=this.options;!e&&il(kt,n.dragClass,!1),il(kt,n.ghostClass,!0),fr.active=this,e&&this._appendGhost(),qs({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(Fc){this._lastX=Fc.clientX,this._lastY=Fc.clientY,PQ();for(var e=document.elementFromPoint(Fc.clientX,Fc.clientY),r=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Fc.clientX,Fc.clientY),e!==r);)r=e;if(kt.parentNode[bo]._isOutsideThisEl(e),r)do{if(r[bo]){var n=void 0;if(n=r[bo]._onDragOver({clientX:Fc.clientX,clientY:Fc.clientY,target:e,rootEl:r}),n&&!this.options.dragoverBubble)break}e=r}while(r=_Q(r));FQ()}},_onTouchMove:function(e){if(S0){var r=this.options,n=r.fallbackTolerance,i=r.fallbackOffset,a=e.touches?e.touches[0]:e,s=wr&&L1(wr,!0),o=wr&&s&&s.a,l=wr&&s&&s.d,u=zT&&Ts&&xQ(Ts),h=(a.clientX-S0.clientX+i.x)/(o||1)+(u?u[0]-q9[0]:0)/(o||1),f=(a.clientY-S0.clientY+i.y)/(l||1)+(u?u[1]-q9[1]:0)/(l||1);if(!fr.active&&!_1){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))=0&&(qs({rootEl:Ui,name:"add",toEl:Ui,fromEl:di,originalEvent:e}),qs({sortable:this,name:"remove",toEl:Ui,originalEvent:e}),qs({rootEl:Ui,name:"sort",toEl:Ui,fromEl:di,originalEvent:e}),qs({sortable:this,name:"sort",toEl:Ui,originalEvent:e})),es&&es.save()):al!==A1&&al>=0&&(qs({sortable:this,name:"update",toEl:Ui,originalEvent:e}),qs({sortable:this,name:"sort",toEl:Ui,originalEvent:e})),fr.active&&((al==null||al===-1)&&(al=A1,Ld=K2),qs({sortable:this,name:"end",toEl:Ui,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){yo("nulling",this),di=kt=Ui=wr=_0=Li=UT=Md=S0=Fc=W2=al=Ld=A1=K2=C1=Z2=es=FT=fr.dragged=fr.ghost=fr.clone=fr.active=null,XT.forEach(function(e){e.checked=!0}),XT.length=U9=H9=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":kt&&(this._onDragOver(e),bNe(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],r,n=this.el.children,i=0,a=n.length,s=this.options;ii.right+a||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>i.bottom+a||t.clientX>n.right&&t.clientY>n.top}function TNe(t,e,r,n,i,a,s,o){var l=n?t.clientY:t.clientX,u=n?r.height:r.width,h=n?r.top:r.left,f=n?r.bottom:r.right,d=!1;if(!s){if(o&&HTh+u*a/2:lf-HT)return-Z2}else if(l>h+u*(1-i)/2&&lf-u*a/2)?l>h+u/2?1:-1:0}function ENe(t){return Bl(kt){let n=t;return r===!0?n=`${e.identifier}:${t}`:typeof r=="string"&&(n=`${r}:${t}`),n},LNe=(t,e,r)=>{let{bubbles:n,cancelable:i,composed:a}=e||{bubbles:!0,cancelable:!0,composed:!0};return e&&Object.assign(r,{originalEvent:e}),new CustomEvent(t,{bubbles:n,cancelable:i,composed:a,detail:r})};function MNe(t){let e=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=e.top<=r&&e.top+e.height>0,a=e.left<=n&&e.left+e.width>0;return i&&a}function DNe(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i{this.debug&&(this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${l}`,"color: #3B82F6","color: unset"),this.logger.log(Object.assign({controllerId:this.controllerId},u)),this.logger.groupEnd())},this.warn=l=>{this.logger.warn(`%c${this.controller.identifier} %c${l}`,"color: #3B82F6; font-weight: bold","color: unset")},this.dispatch=(l,u={})=>{if(this.dispatchEvent){let{event:h}=u,f=DNe(u,["event"]),d=this.extendedEvent(l,h||null,f);this.targetElement.dispatchEvent(d),this.log("dispatchEvent",Object.assign({eventName:d.type},f))}},this.call=(l,u={})=>{let h=this.controller[l];if(typeof h=="function")return h.call(this.controller,u)},this.extendedEvent=(l,u,h)=>{let{bubbles:f,cancelable:d,composed:p}=u||{bubbles:!0,cancelable:!0,composed:!0};return u&&Object.assign(h,{originalEvent:u}),new CustomEvent(this.composeEventName(l),{bubbles:f,cancelable:d,composed:p,detail:h})},this.composeEventName=l=>{let u=l;return this.eventPrefix===!0?u=`${this.controller.identifier}:${l}`:typeof this.eventPrefix=="string"&&(u=`${this.eventPrefix}:${l}`),u},this.debug=(i=(n=r?.debug)!==null&&n!==void 0?n:e.application.stimulusUseDebug)!==null&&i!==void 0?i:nO.debug,this.logger=(a=r?.logger)!==null&&a!==void 0?a:nO.logger,this.controller=e,this.controllerId=e.element.id||e.element.dataset.id,this.targetElement=r?.element||e.element;let{dispatchEvent:s,eventPrefix:o}=Object.assign({},nO,r);Object.assign(this,{dispatchEvent:s,eventPrefix:o}),this.controllerInitialize=e.initialize.bind(e),this.controllerConnect=e.connect.bind(e),this.controllerDisconnect=e.disconnect.bind(e)}};var ONe={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},$Q=(t,e={})=>{let r=t,{onlyVisible:n,dispatchEvent:i,events:a,eventPrefix:s}=Object.assign({},ONe,e),o=f=>{let d=e?.element||r.element;if(!(d.contains(f.target)||!MNe(d)&&n)&&(r.clickOutside&&r.clickOutside(f),i)){let p=ANe("click:outside",r,s),g=LNe(p,f,{controller:r});d.dispatchEvent(g)}},l=()=>{a?.forEach(f=>{window.addEventListener(f,o,!0)})},u=()=>{a?.forEach(f=>{window.removeEventListener(f,o,!0)})},h=r.disconnect.bind(r);return Object.assign(r,{disconnect(){u(),h()}}),l(),[l,u]};var aO=class extends or{};aO.debounces=[];var sO=class extends iO{constructor(e,r={}){super(e,r),this.observe=()=>{try{this.observer.observe(this.targetElement,this.options)}catch(n){this.controller.application.handleError(n,"At a minimum, one of childList, attributes, and/or characterData must be true",{})}},this.unobserve=()=>{this.observer.disconnect()},this.mutation=n=>{this.call("mutate",n),this.log("mutate",{entries:n}),this.dispatch("mutate",{entries:n})},this.targetElement=r?.element||e.element,this.controller=e,this.options=r,this.observer=new MutationObserver(this.mutation),this.enhanceController(),this.observe()}enhanceController(){let e=this.controller.disconnect.bind(this.controller),r=()=>{this.unobserve(),e()};Object.assign(this.controller,{disconnect:r})}},VQ=(t,e={})=>{let r=new sO(t,e);return[r.observe,r.unobserve]};var oO=class extends or{};oO.throttles=[];var lO=class extends or{static targets=["item"];static values={canSort:{type:Boolean,default:!1}};connect(){this.canSortValue&&(this.sortable=zQ.create(this.element,{animation:300,easing:"cubic-bezier(0.61, 1, 0.88, 1)",disabled:!0}),VQ(this,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-sort-code"]}))}mutate(t){t.forEach(e=>{e.type==="attributes"&&e.attributeName==="data-sort-code"&&this.sortItems()})}sortItems(){let t=Array.from(this.itemTargets);if(this.itemsAreSorted(t))return;let e=t.sort((r,n)=>this.compareItems(r,n)).map(r=>r.dataset.id);this.sortable.sort(e,!0)}itemsAreSorted(){return this.itemSortCodes().every((t,e,r)=>e===0?!0:t<=r[e-1])}itemSortCodes(){return this.itemTargets.map(t=>this.getSortCode(t))}getSortCode(t){return parseFloat(t.getAttribute("data-sort-code"))||0}compareItems(t,e){return this.getSortCode(e)-this.getSortCode(t)}};var hO={};Wt(hO,{default:()=>QT});b();var qQ=Vi(HQ()),QT=class extends or{initialize(){this.debouncedSubmit=(0,qQ.default)(this.debouncedSubmit.bind(this),300)}submit(){this.element.requestSubmit()}debouncedSubmit(){this.submit()}};var VN={};Wt(VN,{default:()=>tv});b();b();b();b();b();function nx(t){return t+.5|0}var Od=(t,e,r)=>Math.max(Math.min(t,r),e);function tx(t){return Od(nx(t*2.55),0,255)}function Rd(t){return Od(nx(t*255),0,255)}function ef(t){return Od(nx(t/2.55)/100,0,1)}function WQ(t){return Od(nx(t*100),0,100)}var zl={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},dO=[..."0123456789ABCDEF"],RNe=t=>dO[t&15],INe=t=>dO[(t&240)>>4]+dO[t&15],JT=t=>(t&240)>>4===(t&15),NNe=t=>JT(t.r)&&JT(t.g)&&JT(t.b)&&JT(t.a);function PNe(t){var e=t.length,r;return t[0]==="#"&&(e===4||e===5?r={r:255&zl[t[1]]*17,g:255&zl[t[2]]*17,b:255&zl[t[3]]*17,a:e===5?zl[t[4]]*17:255}:(e===7||e===9)&&(r={r:zl[t[1]]<<4|zl[t[2]],g:zl[t[3]]<<4|zl[t[4]],b:zl[t[5]]<<4|zl[t[6]],a:e===9?zl[t[7]]<<4|zl[t[8]]:255})),r}var FNe=(t,e)=>t<255?e(t):"";function BNe(t){var e=NNe(t)?RNe:INe;return t?"#"+e(t.r)+e(t.g)+e(t.b)+FNe(t.a,e):void 0}var zNe=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function XQ(t,e,r){let n=e*Math.min(r,1-r),i=(a,s=(a+t/30)%12)=>r-n*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function $Ne(t,e,r){let n=(i,a=(i+t/60)%6)=>r-r*e*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function VNe(t,e,r){let n=XQ(t,1,.5),i;for(e+r>1&&(i=1/(e+r),e*=i,r*=i),i=0;i<3;i++)n[i]*=1-e-r,n[i]+=e;return n}function UNe(t,e,r,n,i){return t===i?(e-r)/n+(e.5?h/(2-a-s):h/(a+s),l=UNe(r,n,i,h,a),l=l*60+.5),[l|0,u||0,o]}function gO(t,e,r,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,r,n)).map(Rd)}function mO(t,e,r){return gO(XQ,t,e,r)}function HNe(t,e,r){return gO(VNe,t,e,r)}function qNe(t,e,r){return gO($Ne,t,e,r)}function KQ(t){return(t%360+360)%360}function WNe(t){let e=zNe.exec(t),r=255,n;if(!e)return;e[5]!==n&&(r=e[6]?tx(+e[5]):Rd(+e[5]));let i=KQ(+e[2]),a=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?n=HNe(i,a,s):e[1]==="hsv"?n=qNe(i,a,s):n=mO(i,a,s),{r:n[0],g:n[1],b:n[2],a:r}}function GNe(t,e){var r=pO(t);r[0]=KQ(r[0]+e),r=mO(r),t.r=r[0],t.g=r[1],t.b=r[2]}function YNe(t){if(!t)return;let e=pO(t),r=e[0],n=WQ(e[1]),i=WQ(e[2]);return t.a<255?`hsla(${r}, ${n}%, ${i}%, ${ef(t.a)})`:`hsl(${r}, ${n}%, ${i}%)`}var GQ={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},YQ={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function jNe(){let t={},e=Object.keys(YQ),r=Object.keys(GQ),n,i,a,s,o;for(n=0;n>16&255,a>>8&255,a&255]}return t}var eE;function XNe(t){eE||(eE=jNe(),eE.transparent=[0,0,0,0]);let e=eE[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var KNe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ZNe(t){let e=KNe.exec(t),r=255,n,i,a;if(e){if(e[7]!==n){let s=+e[7];r=e[8]?tx(s):Od(s*255,0,255)}return n=+e[1],i=+e[3],a=+e[5],n=255&(e[2]?tx(n):Od(n,0,255)),i=255&(e[4]?tx(i):Od(i,0,255)),a=255&(e[6]?tx(a):Od(a,0,255)),{r:n,g:i,b:a,a:r}}}function QNe(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ef(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}var fO=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,D1=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function JNe(t,e,r){let n=D1(ef(t.r)),i=D1(ef(t.g)),a=D1(ef(t.b));return{r:Rd(fO(n+r*(D1(ef(e.r))-n))),g:Rd(fO(i+r*(D1(ef(e.g))-i))),b:Rd(fO(a+r*(D1(ef(e.b))-a))),a:t.a+r*(e.a-t.a)}}function tE(t,e,r){if(t){let n=pO(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*r,e===0?360:1)),n=mO(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function ZQ(t,e){return t&&Object.assign(e||{},t)}function jQ(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Rd(t[3]))):(e=ZQ(t,{r:0,g:0,b:0,a:1}),e.a=Rd(e.a)),e}function ePe(t){return t.charAt(0)==="r"?ZNe(t):WNe(t)}var rx=class t{constructor(e){if(e instanceof t)return e;let r=typeof e,n;r==="object"?n=jQ(e):r==="string"&&(n=PNe(e)||XNe(e)||ePe(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=ZQ(this._rgb);return e&&(e.a=ef(e.a)),e}set rgb(e){this._rgb=jQ(e)}rgbString(){return this._valid?QNe(this._rgb):void 0}hexString(){return this._valid?BNe(this._rgb):void 0}hslString(){return this._valid?YNe(this._rgb):void 0}mix(e,r){if(e){let n=this.rgb,i=e.rgb,a,s=r===a?.5:r,o=2*s-1,l=n.a-i.a,u=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-u,n.r=255&u*n.r+a*i.r+.5,n.g=255&u*n.g+a*i.g+.5,n.b=255&u*n.b+a*i.b+.5,n.a=s*n.a+(1-s)*i.a,this.rgb=n}return this}interpolate(e,r){return e&&(this._rgb=JNe(this._rgb,e._rgb,r)),this}clone(){return new t(this.rgb)}alpha(e){return this._rgb.a=Rd(e),this}clearer(e){let r=this._rgb;return r.a*=1-e,this}greyscale(){let e=this._rgb,r=nx(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=r,this}opaquer(e){let r=this._rgb;return r.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return tE(this._rgb,2,e),this}darken(e){return tE(this._rgb,2,-e),this}saturate(e){return tE(this._rgb,1,e),this}desaturate(e){return tE(this._rgb,1,-e),this}rotate(e){return GNe(this._rgb,e),this}};function Vc(){}var xO=(()=>{let t=0;return()=>t++})();function Br(t){return t===null||typeof t>"u"}function Fn(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Rr(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function pi(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Gs(t,e){return pi(t)?t:e}function gr(t,e){return typeof t>"u"?e:t}var wO=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,oE=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Dn(t,e,r){if(t&&typeof t.call=="function")return t.apply(r,e)}function dn(t,e,r,n){let i,a,s;if(Fn(t))if(a=t.length,n)for(i=a-1;i>=0;i--)e.call(r,t[i],i);else for(i=0;it,x:t=>t.x,y:t=>t.y};function uJ(t){let e=t.split("."),r=[],n="";for(let i of e)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}function tPe(t){let e=uJ(t);return r=>{for(let n of e){if(n==="")break;r=r&&r[n]}return r}}function $u(t,e){return(QQ[e]||(QQ[e]=tPe(e)))(t)}function lx(t){return t.charAt(0).toUpperCase()+t.slice(1)}var O0=t=>typeof t<"u",Bu=t=>typeof t=="function",lE=(t,e)=>{if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0};function kO(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}var Bn=Math.PI,zn=2*Bn,hJ=zn+Bn,sx=Number.POSITIVE_INFINITY,fJ=Bn/180,Mi=Bn/2,Id=Bn/4,yO=Bn*2/3,zu=Math.log10,$l=Math.sign;function R0(t,e,r){return Math.abs(t-e)i-a).pop(),e}function Pd(t){return!isNaN(parseFloat(t))&&isFinite(t)}function EO(t,e){let r=Math.round(t);return r-e<=t&&r+e>=t}function uE(t,e,r){let n,i,a;for(n=0,i=t.length;nl&&u=Math.min(e,r)-n&&t<=Math.max(e,r)+n}function ux(t,e,r){r=r||(s=>t[s]1;)a=i+n>>1,r(a)?i=a:n=a;return{lo:i,hi:n}}var zc=(t,e,r,n)=>ux(t,r,n?i=>{let a=t[i][e];return at[i][e]ux(t,r,n=>t[n][e]>=r);function _O(t,e,r){let n=0,i=t.length;for(;nn&&t[i-1]>r;)i--;return n>0||i{let n="_onData"+lx(r),i=t[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value(...a){let s=i.apply(this,a);return t._chartjs.listeners.forEach(o=>{typeof o[n]=="function"&&o[n](...a)}),s}})})}function dE(t,e){let r=t._chartjs;if(!r)return;let n=r.listeners,i=n.indexOf(e);i!==-1&&n.splice(i,1),!(n.length>0)&&(pJ.forEach(a=>{delete t[a]}),delete t._chartjs)}function pE(t){let e=new Set(t);return e.size===t.length?t:Array.from(e)}var gE=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function mE(t,e){let r=[],n=!1;return function(...i){r=i,n||(n=!0,gE.call(window,()=>{n=!1,t.apply(e,r)}))}}function LO(t,e){let r;return function(...n){return e?(clearTimeout(r),r=setTimeout(t,e,n)):t.apply(this,n),e}}var hx=t=>t==="start"?"left":t==="end"?"right":"center",za=(t,e,r)=>t==="start"?e:t==="end"?r:(e+r)/2,MO=(t,e,r,n)=>t===(n?"left":"right")?r:t==="center"?(e+r)/2:e;function vE(t,e,r){let n=e.length,i=0,a=n;if(t._sorted){let{iScale:s,_parsed:o}=t,l=s.axis,{min:u,max:h,minDefined:f,maxDefined:d}=s.getUserBounds();f&&(i=ua(Math.min(zc(o,l,u).lo,r?n:zc(e,l,s.getPixelForValue(u)).lo),0,n-1)),d?a=ua(Math.max(zc(o,s.axis,h,!0).hi+1,r?0:zc(e,l,s.getPixelForValue(h),!0).hi+1),i,n)-i:a=n-i}return{start:i,count:a}}function yE(t){let{xScale:e,yScale:r,_scaleRanges:n}=t,i={xmin:e.min,xmax:e.max,ymin:r.min,ymax:r.max};if(!n)return t._scaleRanges=i,!0;let a=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==r.min||n.ymax!==r.max;return Object.assign(n,i),a}var rE=t=>t===0||t===1,JQ=(t,e,r)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*zn/r)),eJ=(t,e,r)=>Math.pow(2,-10*t)*Math.sin((t-e)*zn/r)+1,A0={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Mi)+1,easeOutSine:t=>Math.sin(t*Mi),easeInOutSine:t=>-.5*(Math.cos(Bn*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>rE(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>rE(t)?t:JQ(t,.075,.3),easeOutElastic:t=>rE(t)?t:eJ(t,.075,.3),easeInOutElastic(t){return rE(t)?t:t<.5?.5*JQ(t*2,.1125,.45):.5+.5*eJ(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-A0.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?A0.easeInBounce(t*2)*.5:A0.easeOutBounce(t*2-1)*.5+.5};function bE(t){if(t&&typeof t=="object"){let e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function xE(t){return bE(t)?t:new rx(t)}function aE(t){return bE(t)?t:new rx(t).saturate(.5).darken(.1).hexString()}var rPe=["x","y","borderWidth","radius","tension"],nPe=["color","borderColor","backgroundColor"];function iPe(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:nPe},numbers:{type:"number",properties:rPe}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function aPe(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var tJ=new Map;function sPe(t,e){e=e||{};let r=t+JSON.stringify(e),n=tJ.get(r);return n||(n=new Intl.NumberFormat(t,e),tJ.set(r,n)),n}function N0(t,e,r){return sPe(e,r).format(t)}var gJ={values(t){return Fn(t)?t:""+t},numeric(t,e,r){if(t===0)return"0";let n=this.chart.options.locale,i,a=t;if(r.length>1){let u=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),a=oPe(t,r)}let s=zu(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),N0(t,n,l)},logarithmic(t,e,r){if(t===0)return"0";let n=r[e].significand||t/Math.pow(10,Math.floor(zu(t)));return[1,2,3,5,10,15].includes(n)||e>.8*r.length?gJ.numeric.call(this,t,e,r):""}};function oPe(t,e){let r=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(r)>=1&&t!==Math.floor(t)&&(r=t-Math.floor(t)),r}var fx={formatters:gJ};function lPe(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,r)=>r.lineWidth,tickColor:(e,r)=>r.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:fx.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}var Fd=Object.create(null),wE=Object.create(null);function ix(t,e){if(!e)return t;let r=e.split(".");for(let n=0,i=r.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,i)=>aE(i.backgroundColor),this.hoverBorderColor=(n,i)=>aE(i.borderColor),this.hoverColor=(n,i)=>aE(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(r)}set(e,r){return vO(this,e,r)}get(e){return ix(this,e)}describe(e,r){return vO(wE,e,r)}override(e,r){return vO(Fd,e,r)}route(e,r,n,i){let a=ix(this,e),s=ix(this,n),o="_"+r;Object.defineProperties(a,{[o]:{value:a[r],writable:!0},[r]:{enumerable:!0,get(){let l=this[o],u=s[i];return Rr(l)?Object.assign({},u,l):gr(l,u)},set(l){this[o]=l}}})}apply(e){e.forEach(r=>r(this))}},Di=new bO({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[iPe,aPe,lPe]);function mJ(t){return!t||Br(t.size)||Br(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function O1(t,e,r,n,i){let a=e[i];return a||(a=e[i]=t.measureText(i).width,r.push(i)),a>n&&(n=a),n}function DO(t,e,r,n){n=n||{};let i=n.data=n.data||{},a=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(i=n.data={},a=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0,o=r.length,l,u,h,f,d;for(l=0;lr.length){for(l=0;l0&&t.stroke()}}function $c(t,e,r){return r=r||.5,!e||t&&t.x>e.left-r&&t.xe.top-r&&t.y0&&a.strokeColor!=="",l,u;for(t.save(),t.font=i.string,cPe(t,a),l=0;l+t||0;function px(t,e){let r={},n=Rr(e),i=n?Object.keys(e):e,a=Rr(t)?n?s=>gr(t[s],t[e[s]]):s=>t[s]:()=>t;for(let s of i)r[s]=pPe(a(s));return r}function EE(t){return px(t,{top:"y",right:"x",bottom:"y",left:"x"})}function af(t){return px(t,["topLeft","topRight","bottomLeft","bottomRight"])}function $a(t){let e=EE(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Qi(t,e){t=t||{},e=e||Di.font;let r=gr(t.size,e.size);typeof r=="string"&&(r=parseInt(r,10));let n=gr(t.style,e.style);n&&!(""+n).match(dPe)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let i={family:gr(t.family,e.family),lineHeight:vJ(gr(t.lineHeight,e.lineHeight),r),size:r,style:n,weight:gr(t.weight,e.weight),string:""};return i.string=mJ(i),i}function F0(t,e,r,n){let i=!0,a,s,o;for(a=0,s=t.length;ar&&o===0?0:o+l;return{min:s(n,-Math.abs(a)),max:s(i,a)}}function Vu(t,e){return Object.assign(Object.create(t),e)}function gx(t,e=[""],r,n,i=()=>t[0]){let a=r||t;typeof n>"u"&&(n=xJ("_fallback",t));let s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:n,_getTarget:i,override:o=>gx([o,...t],e,a,n)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete t[0][l],!0},get(o,l){return yJ(o,l,()=>kPe(l,e,t,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(o,l){return nJ(o).includes(l)},ownKeys(o){return nJ(o)},set(o,l,u){let h=o._storage||(o._storage=i());return o[l]=h[l]=u,delete o._keys,!0}})}function Nd(t,e,r,n){let i={_cacheable:!1,_proxy:t,_context:e,_subProxy:r,_stack:new Set,_descriptors:SE(t,n),setContext:a=>Nd(t,a,r,n),override:a=>Nd(t.override(a),e,r,n)};return new Proxy(i,{deleteProperty(a,s){return delete a[s],delete t[s],!0},get(a,s,o){return yJ(a,s,()=>mPe(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(a,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(a,s,o){return t[s]=o,delete a[s],!0}})}function SE(t,e={scriptable:!0,indexable:!0}){let{_scriptable:r=e.scriptable,_indexable:n=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:r,indexable:n,isScriptable:Bu(r)?r:()=>r,isIndexable:Bu(n)?n:()=>n}}var gPe=(t,e)=>t?t+lx(e):e,NO=(t,e)=>Rr(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function yJ(t,e,r){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];let n=r();return t[e]=n,n}function mPe(t,e,r){let{_proxy:n,_context:i,_subProxy:a,_descriptors:s}=t,o=n[e];return Bu(o)&&s.isScriptable(e)&&(o=vPe(e,o,t,r)),Fn(o)&&o.length&&(o=yPe(e,o,t,s.isIndexable)),NO(e,o)&&(o=Nd(o,i,a&&a[e],s)),o}function vPe(t,e,r,n){let{_proxy:i,_context:a,_subProxy:s,_stack:o}=r;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let l=e(a,s||n);return o.delete(t),NO(t,l)&&(l=PO(i._scopes,i,t,l)),l}function yPe(t,e,r,n){let{_proxy:i,_context:a,_subProxy:s,_descriptors:o}=r;if(typeof a.index<"u"&&n(t))return e[a.index%e.length];if(Rr(e[0])){let l=e,u=i._scopes.filter(h=>h!==l);e=[];for(let h of l){let f=PO(u,i,t,h);e.push(Nd(f,a,s&&s[t],o))}}return e}function bJ(t,e,r){return Bu(t)?t(e,r):t}var bPe=(t,e)=>t===!0?e:typeof t=="string"?$u(e,t):void 0;function xPe(t,e,r,n,i){for(let a of e){let s=bPe(r,a);if(s){t.add(s);let o=bJ(s._fallback,r,i);if(typeof o<"u"&&o!==r&&o!==n)return o}else if(s===!1&&typeof n<"u"&&r!==n)return null}return!1}function PO(t,e,r,n){let i=e._rootScopes,a=bJ(e._fallback,r,n),s=[...t,...i],o=new Set;o.add(n);let l=rJ(o,s,r,a||r,n);return l===null||typeof a<"u"&&a!==r&&(l=rJ(o,s,a,l,n),l===null)?!1:gx(Array.from(o),[""],i,a,()=>wPe(e,r,n))}function rJ(t,e,r,n,i){for(;r;)r=xPe(t,e,r,n,i);return r}function wPe(t,e,r){let n=t._getTarget();e in n||(n[e]={});let i=n[e];return Fn(i)&&Rr(r)?r:i||{}}function kPe(t,e,r,n){let i;for(let a of e)if(i=xJ(gPe(a,t),r),typeof i<"u")return NO(t,i)?PO(r,n,t,i):i}function xJ(t,e){for(let r of e){if(!r)continue;let n=r[t];if(typeof n<"u")return n}}function nJ(t){let e=t._keys;return e||(e=t._keys=TPe(t._scopes)),e}function TPe(t){let e=new Set;for(let r of t)for(let n of Object.keys(r).filter(i=>!i.startsWith("_")))e.add(n);return Array.from(e)}function CE(t,e,r,n){let{iScale:i}=t,{key:a="r"}=this._parsing,s=new Array(n),o,l,u,h;for(o=0,l=n;oet==="x"?"y":"x";function kJ(t,e,r,n){let i=t.skip?e:t,a=e,s=r.skip?e:r,o=ox(a,i),l=ox(s,a),u=o/(o+l),h=l/(o+l);u=isNaN(u)?0:u,h=isNaN(h)?0:h;let f=n*u,d=n*h;return{previous:{x:a.x-f*(s.x-i.x),y:a.y-f*(s.y-i.y)},next:{x:a.x+d*(s.x-i.x),y:a.y+d*(s.y-i.y)}}}function SPe(t,e,r){let n=t.length,i,a,s,o,l,u=R1(t,0);for(let h=0;h!u.skip)),e.cubicInterpolationMode==="monotone")TJ(t,i);else{let u=n?t[t.length-1]:t[0];for(a=0,s=t.length;at.ownerDocument.defaultView.getComputedStyle(t,null);function EJ(t,e){return _E(t).getPropertyValue(e)}var APe=["top","right","bottom","left"];function L0(t,e,r){let n={};r=r?"-"+r:"";for(let i=0;i<4;i++){let a=APe[i];n[a]=parseFloat(t[e+"-"+a+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var LPe=(t,e,r)=>(t>0||e>0)&&(!r||!r.shadowRoot);function MPe(t,e){let r=t.touches,n=r&&r.length?r[0]:t,{offsetX:i,offsetY:a}=n,s=!1,o,l;if(LPe(i,a,t.target))o=i,l=a;else{let u=e.getBoundingClientRect();o=n.clientX-u.left,l=n.clientY-u.top,s=!0}return{x:o,y:l,box:s}}function sf(t,e){if("native"in t)return t;let{canvas:r,currentDevicePixelRatio:n}=e,i=_E(r),a=i.boxSizing==="border-box",s=L0(i,"padding"),o=L0(i,"border","width"),{x:l,y:u,box:h}=MPe(t,r),f=s.left+(h&&o.left),d=s.top+(h&&o.top),{width:p,height:g}=e;return a&&(p-=s.width+o.width,g-=s.height+o.height),{x:Math.round((l-f)/p*r.width/n),y:Math.round((u-d)/g*r.height/n)}}function DPe(t,e,r){let n,i;if(e===void 0||r===void 0){let a=t&&vx(t);if(!a)e=t.clientWidth,r=t.clientHeight;else{let s=a.getBoundingClientRect(),o=_E(a),l=L0(o,"border","width"),u=L0(o,"padding");e=s.width-u.width-l.width,r=s.height-u.height-l.height,n=sE(o.maxWidth,a,"clientWidth"),i=sE(o.maxHeight,a,"clientHeight")}}return{width:e,height:r,maxWidth:n||sx,maxHeight:i||sx}}var iE=t=>Math.round(t*10)/10;function BO(t,e,r,n){let i=_E(t),a=L0(i,"margin"),s=sE(i.maxWidth,t,"clientWidth")||sx,o=sE(i.maxHeight,t,"clientHeight")||sx,l=DPe(t,e,r),{width:u,height:h}=l;if(i.boxSizing==="content-box"){let d=L0(i,"border","width"),p=L0(i,"padding");u-=p.width+d.width,h-=p.height+d.height}return u=Math.max(0,u-a.width),h=Math.max(0,n?u/n:h-a.height),u=iE(Math.min(u,s,l.maxWidth)),h=iE(Math.min(h,o,l.maxHeight)),u&&!h&&(h=iE(u/2)),(e!==void 0||r!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,u=iE(Math.floor(h*n))),{width:u,height:h}}function AE(t,e,r){let n=e||1,i=Math.floor(t.height*n),a=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let s=t.canvas;return s.style&&(r||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||s.height!==i||s.width!==a?(t.currentDevicePixelRatio=n,s.height=i,s.width=a,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}var zO=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};mx()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function LE(t,e){let r=EJ(t,e),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function tf(t,e,r,n){return{x:t.x+r*(e.x-t.x),y:t.y+r*(e.y-t.y)}}function $O(t,e,r,n){return{x:t.x+r*(e.x-t.x),y:n==="middle"?r<.5?t.y:e.y:n==="after"?r<1?t.y:e.y:r>0?e.y:t.y}}function VO(t,e,r,n){let i={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},s=tf(t,i,r),o=tf(i,a,r),l=tf(a,e,r),u=tf(s,o,r),h=tf(o,l,r);return tf(u,h,r)}var OPe=function(t,e){return{x(r){return t+t+e-r},setWidth(r){e=r},textAlign(r){return r==="center"?r:r==="right"?"left":"right"},xPlus(r,n){return r-n},leftForLtr(r,n){return r-n}}},RPe=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Bd(t,e,r){return t?OPe(e,r):RPe()}function ME(t,e){let r,n;(e==="ltr"||e==="rtl")&&(r=t.canvas.style,n=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",e,"important"),t.prevTextDirection=n)}function DE(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function SJ(t){return t==="angle"?{between:I0,compare:dJ,normalize:Ws}:{between:Uc,compare:(e,r)=>e-r,normalize:e=>e}}function iJ({start:t,end:e,count:r,loop:n,style:i}){return{start:t%r,end:e%r,loop:n&&(e-t+1)%r===0,style:i}}function IPe(t,e,r){let{property:n,start:i,end:a}=r,{between:s,normalize:o}=SJ(n),l=e.length,{start:u,end:h,loop:f}=t,d,p;if(f){for(u+=l,h+=l,d=0,p=l;dl(i,k,y)&&o(i,k)!==0,T=()=>o(a,y)===0||l(a,k,y),S=()=>m||E(),L=()=>!m||T();for(let _=h,M=h;_<=f;++_)w=e[_%s],!w.skip&&(y=u(w[n]),y!==k&&(m=l(y,i,a),v===null&&S()&&(v=o(y,i)===0?_:M),v!==null&&L()&&(g.push(iJ({start:v,end:_,loop:d,count:s,style:p})),v=null),M=_,k=y));return v!==null&&g.push(iJ({start:v,end:f,loop:d,count:s,style:p})),g}function RE(t,e){let r=[],n=t.segments;for(let i=0;ii&&t[a%e].skip;)a--;return a%=e,{start:i,end:a}}function PPe(t,e,r,n){let i=t.length,a=[],s=e,o=t[e],l;for(l=e+1;l<=r;++l){let u=t[l%i];u.skip||u.stop?o.skip||(n=!1,a.push({start:e%i,end:(l-1)%i,loop:n}),e=s=u.stop?l:null):(s=l,o.skip&&(e=l)),o=u}return s!==null&&a.push({start:e%i,end:s%i,loop:n}),a}function UO(t,e){let r=t.points,n=t.options.spanGaps,i=r.length;if(!i)return[];let a=!!t._loop,{start:s,end:o}=NPe(r,i,a,n);if(n===!0)return aJ(t,[{start:s,end:o,loop:a}],r,e);let l=oo({chart:e,initial:r.initial,numSteps:s,currentStep:Math.min(n-r.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=gE.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let r=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;let a=n.items,s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),o=!0):(a[s]=a[a.length-1],a.pop());o&&(i.draw(),this._notify(i,n,e,"progress")),a.length||(n.running=!1,this._notify(i,n,e,"complete"),n.initial=!1),r+=a.length}),this._lastDate=e,r===0&&(this._running=!1)}_getAnims(e){let r=this._charts,n=r.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(e,n)),n}listen(e,r,n){this._getAnims(e).listeners[r].push(n)}add(e,r){!r||!r.length||this._getAnims(e).items.push(...r)}has(e){return this._getAnims(e).items.length>0}start(e){let r=this._charts.get(e);r&&(r.running=!0,r.start=Date.now(),r.duration=r.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;let r=this._charts.get(e);return!(!r||!r.running||!r.items.length)}stop(e){let r=this._charts.get(e);if(!r||!r.items.length)return;let n=r.items,i=n.length-1;for(;i>=0;--i)n[i].cancel();r.items=[],this._notify(e,r,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},of=new QO,CJ="transparent",zPe={boolean(t,e,r){return r>.5?e:t},color(t,e,r){let n=xE(t||CJ),i=n.valid&&xE(e||CJ);return i&&i.valid?i.mix(n,r).hexString():e},number(t,e,r){return t+(e-t)*r}},JO=class{constructor(e,r,n,i){let a=r[n];i=F0([e.to,i,a,e.from]);let s=F0([e.from,a,i]);this._active=!0,this._fn=e.fn||zPe[e.type||typeof s],this._easing=A0[e.easing]||A0.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=r,this._prop=n,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(e,r,n){if(this._active){this._notify(!1);let i=this._target[this._prop],a=n-this._start,s=this._duration-a;this._start=n,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=F0([e.to,r,i,e.from]),this._from=F0([e.from,i,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let r=e-this._start,n=this._duration,i=this._prop,a=this._from,s=this._loop,o=this._to,l;if(this._active=a!==o&&(s||r1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,o,l)}wait(){let e=this._promises||(this._promises=[]);return new Promise((r,n)=>{e.push({res:r,rej:n})})}_notify(e){let r=e?"res":"rej",n=this._promises||[];for(let i=0;i{let a=e[i];if(!Rr(a))return;let s={};for(let o of r)s[o]=a[o];(Fn(a.properties)&&a.properties||[i]).forEach(o=>{(o===i||!n.has(o))&&n.set(o,s)})})}_animateOptions(e,r){let n=r.options,i=VPe(e,n);if(!i)return[];let a=this._createAnimations(i,n);return n.$shared&&$Pe(e.options.$animations,n).then(()=>{e.options=n},()=>{}),a}_createAnimations(e,r){let n=this._properties,i=[],a=e.$animations||(e.$animations={}),s=Object.keys(r),o=Date.now(),l;for(l=s.length-1;l>=0;--l){let u=s[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,r));continue}let h=r[u],f=a[u],d=n.get(u);if(f)if(d&&f.active()){f.update(d,h,o);continue}else f.cancel();if(!d||!d.duration){e[u]=h;continue}a[u]=f=new JO(d,e,u,h),i.push(f)}return i}update(e,r){if(this._properties.size===0){Object.assign(e,r);return}let n=this._createAnimations(e,r);if(n.length)return of.add(this._chart,n),!0}};function $Pe(t,e){let r=[],n=Object.keys(e);for(let i=0;i0||!r&&a<0)return i.index}return null}function DJ(t,e){let{chart:r,_cachedMeta:n}=t,i=r._stacks||(r._stacks={}),{iScale:a,vScale:s,index:o}=n,l=a.axis,u=s.axis,h=WPe(a,s,n),f=e.length,d;for(let p=0;pr[n].axis===e).shift()}function jPe(t,e){return Vu(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function XPe(t,e,r){return Vu(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:r,index:e,mode:"default",type:"data"})}function yx(t,e){let r=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(let i of e){let a=i._stacks;if(!a||a[n]===void 0||a[n][r]===void 0)return;delete a[n][r],a[n]._visualValues!==void 0&&a[n]._visualValues[r]!==void 0&&delete a[n]._visualValues[r]}}}var qO=t=>t==="reset"||t==="none",OJ=(t,e)=>e?t:Object.assign({},t),KPe=(t,e,r)=>t&&!e.hidden&&e._stacked&&{keys:Cee(r,!0),values:null},qu=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,r){this.chart=e,this._ctx=e.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=LJ(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&yx(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,r=this._cachedMeta,n=this.getDataset(),i=(f,d,p,g)=>f==="x"?d:f==="r"?g:p,a=r.xAxisID=gr(n.xAxisID,HO(e,"x")),s=r.yAxisID=gr(n.yAxisID,HO(e,"y")),o=r.rAxisID=gr(n.rAxisID,HO(e,"r")),l=r.indexAxis,u=r.iAxisID=i(l,a,s,o),h=r.vAxisID=i(l,s,a,o);r.xScale=this.getScaleForId(a),r.yScale=this.getScaleForId(s),r.rScale=this.getScaleForId(o),r.iScale=this.getScaleForId(u),r.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let r=this._cachedMeta;return e===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&dE(this._data,this),e._stacked&&yx(e)}_dataCheck(){let e=this.getDataset(),r=e.data||(e.data=[]),n=this._data;if(Rr(r)){let i=this._cachedMeta;this._data=qPe(r,i)}else if(n!==r){if(n){dE(n,this);let i=this._cachedMeta;yx(i),i._parsed=[]}r&&Object.isExtensible(r)&&AO(r,this),this._syncList=[],this._data=r}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let r=this._cachedMeta,n=this.getDataset(),i=!1;this._dataCheck();let a=r._stacked;r._stacked=LJ(r.vScale,r),r.stack!==n.stack&&(i=!0,yx(r),r.stack=n.stack),this._resyncElements(e),(i||a!==r._stacked)&&DJ(this,r._parsed)}configure(){let e=this.chart.config,r=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),r,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,r){let{_cachedMeta:n,_data:i}=this,{iScale:a,_stacked:s}=n,o=a.axis,l=e===0&&r===i.length?!0:n._sorted,u=e>0&&n._parsed[e-1],h,f,d;if(this._parsing===!1)n._parsed=i,n._sorted=!0,d=i;else{Fn(i[e])?d=this.parseArrayData(n,i,e,r):Rr(i[e])?d=this.parseObjectData(n,i,e,r):d=this.parsePrimitiveData(n,i,e,r);let p=()=>f[o]===null||u&&f[o]m||f=0;--d)if(!g()){this.updateRangeFromParsed(u,e,p,l);break}}return u}getAllParsedValues(e){let r=this._cachedMeta._parsed,n=[],i,a,s;for(i=0,a=r.length;i=0&&ethis.getContext(n,i,r),m=u.resolveNamedOptions(d,p,g,f);return m.$shared&&(m.$shared=l,a[s]=Object.freeze(OJ(m,l))),m}_resolveAnimations(e,r,n){let i=this.chart,a=this._cachedDataOpts,s=`animation-${r}`,o=a[s];if(o)return o;let l;if(i.options.animation!==!1){let h=this.chart.config,f=h.datasetAnimationScopeKeys(this._type,r),d=h.getOptionScopes(this.getDataset(),f);l=h.createResolver(d,this.getContext(e,n,r))}let u=new HE(i,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,r){return!r||qO(e)||this.chart._animationsDisabled}_getSharedOptions(e,r){let n=this.resolveDataElementOptions(e,r),i=this._sharedOptions,a=this.getSharedOptions(n),s=this.includeOptions(r,a)||a!==i;return this.updateSharedOptions(a,r,n),{sharedOptions:a,includeOptions:s}}updateElement(e,r,n,i){qO(i)?Object.assign(e,n):this._resolveAnimations(r,i).update(e,n)}updateSharedOptions(e,r,n){e&&!qO(r)&&this._resolveAnimations(void 0,r).update(e,n)}_setStyle(e,r,n,i){e.active=i;let a=this.getStyle(r,i);this._resolveAnimations(r,n,i).update(e,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(e,r,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,r,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){let r=this._data,n=this._cachedMeta.data;for(let[o,l,u]of this._syncList)this[o](l,u);this._syncList=[];let i=n.length,a=r.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,e):a{for(u.length+=r,o=u.length-1;o>=s;o--)u[o]=u[o-r]};for(l(a),o=e;oi-a))}return t._cache.$bar}function QPe(t){let e=t.iScale,r=ZPe(e,t.type),n=e._length,i,a,s,o,l=()=>{s===32767||s===-32768||(O0(o)&&(n=Math.min(n,Math.abs(s-o)||n)),o=s)};for(i=0,a=r.length;i0?i[t-1]:null,o=tMath.abs(o)&&(l=o,u=s),e[r.axis]=u,e._custom={barStart:l,barEnd:u,start:i,end:a,min:s,max:o}}function _ee(t,e,r,n){return Fn(t)?tFe(t,e,r,n):e[r.axis]=r.parse(t,n),e}function RJ(t,e,r,n){let i=t.iScale,a=t.vScale,s=i.getLabels(),o=i===a,l=[],u,h,f,d;for(u=r,h=r+n;u=r?1:-1)}function nFe(t){let e,r,n,i,a;return t.horizontal?(e=t.base>t.x,r="left",n="right"):(e=t.baseh.controller.options.grouped),a=n.options.stacked,s=[],o=this._cachedMeta.controller.getParsed(r),l=o&&o[n.axis],u=h=>{let f=h._parsed.find(p=>p[n.axis]===l),d=f&&f[h.vScale.axis];if(Br(d)||isNaN(d))return!0};for(let h of i)if(!(r!==void 0&&u(h))&&((a===!1||s.indexOf(h.stack)===-1||a===void 0&&h.stack===void 0)&&s.push(h.stack),h.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,r,n){let i=this._getStacks(e,n),a=r!==void 0?i.indexOf(r):-1;return a===-1?i.length-1:a}_getRuler(){let e=this.options,r=this._cachedMeta,n=r.iScale,i=[],a,s;for(a=0,s=r.data.length;a=0;--n)r=Math.max(r,e[n].size(this.resolveDataElementOptions(n))/2);return r>0&&r}getLabelAndValue(e){let r=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:a}=r,s=this.getParsed(e),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y),u=s._custom;return{label:n[e]||"",value:"("+o+", "+l+(u?", "+u:"")+")"}}update(e){let r=this._cachedMeta.data;this.updateElements(r,0,r.length,e)}updateElements(e,r,n,i){let a=i==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(r,i),h=s.axis,f=o.axis;for(let d=r;dI0(k,o,l,!0)?1:Math.max(E,E*r,T,T*r),g=(k,E,T)=>I0(k,o,l,!0)?-1:Math.min(E,E*r,T,T*r),m=p(0,u,f),v=p(Mi,h,d),y=g(Bn,u,f),w=g(Bn+Mi,h,d);n=(m-y)/2,i=(v-w)/2,a=-(m+y)/2,s=-(v+w)/2}return{ratioX:n,ratioY:i,offsetX:a,offsetY:s}}var Sx=class extends qu{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let r=e.data;if(r.labels.length&&r.datasets.length){let{labels:{pointStyle:n,color:i}}=e.legend.options;return r.labels.map((a,s)=>{let l=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}}};constructor(e,r){super(e,r),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,r){let n=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=n;else{let a=l=>+n[l];if(Rr(n[e])){let{key:l="value"}=this._parsing;a=u=>+$u(n[u],l)}let s,o;for(s=e,o=e+r;s0&&!isNaN(e)?zn*(Math.abs(e)/r):0}getLabelAndValue(e){let r=this._cachedMeta,n=this.chart,i=n.data.labels||[],a=N0(r._parsed[e],n.options.locale);return{label:i[e]||"",value:a}}getMaxBorderWidth(e){let r=0,n=this.chart,i,a,s,o,l;if(!e){for(i=0,a=n.data.datasets.length;i0&&this.getParsed(r-1);for(let T=0;T=w){L.skip=!0;continue}let _=this.getParsed(T),M=Br(_[p]),I=L[d]=s.getPixelForValue(_[d],T),O=L[p]=a||M?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,_,l):_[p],T);L.skip=isNaN(I)||isNaN(O)||M,L.stop=T>0&&Math.abs(_[d]-E[d])>v,m&&(L.parsed=_,L.raw=u.data[T]),f&&(L.options=h||this.resolveDataElementOptions(T,S.active?"active":i)),y||this.updateElement(S,T,L,i),E=_}}getMaxOverflow(){let e=this._cachedMeta,r=e.dataset,n=r.options&&r.options.borderWidth||0,i=e.data||[];if(!i.length)return n;let a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,a,s)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},qE=class extends qu{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let r=e.data;if(r.labels.length&&r.datasets.length){let{labels:{pointStyle:n,color:i}}=e.legend.options;return r.labels.map((a,s)=>{let l=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,r){super(e,r),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let r=this._cachedMeta,n=this.chart,i=n.data.labels||[],a=N0(r._parsed[e].r,n.options.locale);return{label:i[e]||"",value:a}}parseObjectData(e,r,n,i){return CE.bind(this)(e,r,n,i)}update(e){let r=this._cachedMeta.data;this._updateRadius(),this.updateElements(r,0,r.length,e)}getMinMax(){let e=this._cachedMeta,r={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((n,i)=>{let a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(ar.max&&(r.max=a))}),r}_updateRadius(){let e=this.chart,r=e.chartArea,n=e.options,i=Math.min(r.right-r.left,r.bottom-r.top),a=Math.max(i/2,0),s=Math.max(n.cutoutPercentage?a/100*n.cutoutPercentage:1,0),o=(a-s)/e.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(e,r,n,i){let a=i==="reset",s=this.chart,l=s.options.animation,u=this._cachedMeta.rScale,h=u.xCenter,f=u.yCenter,d=u.getIndexAngle(0)-.5*Bn,p=d,g,m=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&r++}),r}_computeAngle(e,r,n){return this.chart.getDataVisibility(e)?sl(this.resolveDataElementOptions(e,r).angle||n):0}},nR=class extends Sx{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},iR=class extends qu{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){let r=this._cachedMeta.vScale,n=this.getParsed(e);return{label:r.getLabels()[e],value:""+r.getLabelForValue(n[r.axis])}}parseObjectData(e,r,n,i){return CE.bind(this)(e,r,n,i)}update(e){let r=this._cachedMeta,n=r.dataset,i=r.data||[],a=r.iScale.getLabels();if(n.points=i,e!=="resize"){let s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);let o={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(n,void 0,o,e)}this.updateElements(i,0,i.length,e)}updateElements(e,r,n,i){let a=this._cachedMeta.rScale,s=i==="reset";for(let o=r;o0&&this.getParsed(r-1);for(let E=r;E0&&Math.abs(S[p]-k[p])>y,v&&(L.parsed=S,L.raw=u.data[E]),d&&(L.options=f||this.resolveDataElementOptions(E,T.active?"active":i)),w||this.updateElement(T,E,L,i),k=S}this.updateSharedOptions(f,i,h)}getMaxOverflow(){let e=this._cachedMeta,r=e.data||[];if(!this.options.showLine){let o=0;for(let l=r.length-1;l>=0;--l)o=Math.max(o,r[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}let n=e.dataset,i=n.options&&n.options.borderWidth||0;if(!r.length)return i;let a=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,a,s)/2}},lFe=Object.freeze({__proto__:null,BarController:eR,BubbleController:tR,DoughnutController:Sx,LineController:rR,PieController:nR,PolarAreaController:qE,RadarController:iR,ScatterController:aR});function B0(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var sR=class t{static override(e){Object.assign(t.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return B0()}parse(){return B0()}format(){return B0()}add(){return B0()}diff(){return B0()}startOf(){return B0()}endOf(){return B0()}},cFe={_date:sR};function uFe(t,e,r,n){let{controller:i,data:a,_sorted:s}=t,o=i._cachedMeta.iScale;if(o&&e===o.axis&&e!=="r"&&s&&a.length){let l=o._reversePixels?CO:zc;if(n){if(i._sharedOptions){let u=a[0],h=typeof u.getRange=="function"&&u.getRange(e);if(h){let f=l(a,e,r-h),d=l(a,e,r+h);return{lo:f.lo,hi:d.hi}}}}else return l(a,e,r)}return{lo:0,hi:a.length-1}}function Mx(t,e,r,n,i){let a=t.getSortedVisibleDatasetMetas(),s=r[e];for(let o=0,l=a.length;o{l[s]&&l[s](e[r],i)&&(a.push({element:l,datasetIndex:u,index:h}),o=o||l.inRange(e.x,e.y,i))}),n&&!o?[]:a}var Dx={evaluateInteractionItems:Mx,modes:{index(t,e,r,n){let i=sf(e,t),a=r.axis||"x",s=r.includeInvisible||!1,o=r.intersect?GO(t,i,a,n,s):YO(t,i,a,!1,n,s),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{let h=o[0].index,f=u.data[h];f&&!f.skip&&l.push({element:f,datasetIndex:u.index,index:h})}),l):[]},dataset(t,e,r,n){let i=sf(e,t),a=r.axis||"xy",s=r.includeInvisible||!1,o=r.intersect?GO(t,i,a,n,s):YO(t,i,a,!1,n,s);if(o.length>0){let l=o[0].datasetIndex,u=t.getDatasetMeta(l).data;o=[];for(let h=0;hr.pos===e)}function FJ(t,e){return t.filter(r=>Aee.indexOf(r.pos)===-1&&r.box.axis===e)}function xx(t,e){return t.sort((r,n)=>{let i=e?n:r,a=e?r:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function pFe(t){let e=[],r,n,i,a,s,o;for(r=0,n=(t||[]).length;ru.box.fullSize),!0),n=xx(bx(e,"left"),!0),i=xx(bx(e,"right")),a=xx(bx(e,"top"),!0),s=xx(bx(e,"bottom")),o=FJ(e,"x"),l=FJ(e,"y");return{fullSize:r,leftAndTop:n.concat(a),rightAndBottom:i.concat(l).concat(s).concat(o),chartArea:bx(e,"chartArea"),vertical:n.concat(i).concat(l),horizontal:a.concat(s).concat(o)}}function BJ(t,e,r,n){return Math.max(t[r],e[r])+Math.max(t[n],e[n])}function Lee(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function yFe(t,e,r,n){let{pos:i,box:a}=r,s=t.maxPadding;if(!Rr(i)){r.size&&(t[i]-=r.size);let f=n[r.stack]||{size:0,count:1};f.size=Math.max(f.size,r.horizontal?a.height:a.width),r.size=f.size/f.count,t[i]+=r.size}a.getPadding&&Lee(s,a.getPadding());let o=Math.max(0,e.outerWidth-BJ(s,t,"left","right")),l=Math.max(0,e.outerHeight-BJ(s,t,"top","bottom")),u=o!==t.w,h=l!==t.h;return t.w=o,t.h=l,r.horizontal?{same:u,other:h}:{same:h,other:u}}function bFe(t){let e=t.maxPadding;function r(n){let i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=r("top"),t.x+=r("left"),r("right"),r("bottom")}function xFe(t,e){let r=e.maxPadding;function n(i){let a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(e[s],r[s])}),a}return n(t?["left","right"]:["top","bottom"])}function Tx(t,e,r,n){let i=[],a,s,o,l,u,h;for(a=0,s=t.length,u=0;a{typeof m.beforeLayout=="function"&&m.beforeLayout()});let h=l.reduce((m,v)=>v.box.options&&v.box.options.display===!1?m:m+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:r,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},i);Lee(d,$a(n));let p=Object.assign({maxPadding:d,w:a,h:s,x:i.left,y:i.top},i),g=mFe(l.concat(u),f);Tx(o.fullSize,p,f,g),Tx(l,p,f,g),Tx(u,p,f,g)&&Tx(l,p,f,g),bFe(p),zJ(o.leftAndTop,p,f,g),p.x+=p.w,p.y+=p.h,zJ(o.rightAndBottom,p,f,g),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},dn(o.chartArea,m=>{let v=m.box;Object.assign(v,t.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}},WE=class{acquireContext(e,r){}releaseContext(e){return!1}addEventListener(e,r,n){}removeEventListener(e,r,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,r,n,i){return r=Math.max(0,r||e.width),n=n||e.height,{width:r,height:Math.max(0,i?Math.floor(r/i):n)}}isAttached(e){return!0}updateConfig(e){}},oR=class extends WE{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}},VE="$chartjs",wFe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},$J=t=>t===null||t==="";function kFe(t,e){let r=t.style,n=t.getAttribute("height"),i=t.getAttribute("width");if(t[VE]={initial:{height:n,width:i,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",$J(i)){let a=LE(t,"width");a!==void 0&&(t.width=a)}if($J(n))if(t.style.height==="")t.height=t.width/(e||2);else{let a=LE(t,"height");a!==void 0&&(t.height=a)}return t}var Mee=zO?{passive:!0}:!1;function TFe(t,e,r){t&&t.addEventListener(e,r,Mee)}function EFe(t,e,r){t&&t.canvas&&t.canvas.removeEventListener(e,r,Mee)}function SFe(t,e){let r=wFe[t.type]||t.type,{x:n,y:i}=sf(t,e);return{type:r,chart:e,native:t,x:n!==void 0?n:null,y:i!==void 0?i:null}}function GE(t,e){for(let r of t)if(r===e||r.contains(e))return!0}function CFe(t,e,r){let n=t.canvas,i=new MutationObserver(a=>{let s=!1;for(let o of a)s=s||GE(o.addedNodes,n),s=s&&!GE(o.removedNodes,n);s&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function _Fe(t,e,r){let n=t.canvas,i=new MutationObserver(a=>{let s=!1;for(let o of a)s=s||GE(o.removedNodes,n),s=s&&!GE(o.addedNodes,n);s&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}var Cx=new Map,VJ=0;function Dee(){let t=window.devicePixelRatio;t!==VJ&&(VJ=t,Cx.forEach((e,r)=>{r.currentDevicePixelRatio!==t&&e()}))}function AFe(t,e){Cx.size||window.addEventListener("resize",Dee),Cx.set(t,e)}function LFe(t){Cx.delete(t),Cx.size||window.removeEventListener("resize",Dee)}function MFe(t,e,r){let n=t.canvas,i=n&&vx(n);if(!i)return;let a=mE((o,l)=>{let u=i.clientWidth;r(o,l),u{let l=o[0],u=l.contentRect.width,h=l.contentRect.height;u===0&&h===0||a(u,h)});return s.observe(i),AFe(t,a),s}function jO(t,e,r){r&&r.disconnect(),e==="resize"&&LFe(t)}function DFe(t,e,r){let n=t.canvas,i=mE(a=>{t.ctx!==null&&r(SFe(a,t))},t);return TFe(n,e,i),i}var lR=class extends WE{acquireContext(e,r){let n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(kFe(e,r),n):null}releaseContext(e){let r=e.canvas;if(!r[VE])return!1;let n=r[VE].initial;["height","width"].forEach(a=>{let s=n[a];Br(s)?r.removeAttribute(a):r.setAttribute(a,s)});let i=n.style||{};return Object.keys(i).forEach(a=>{r.style[a]=i[a]}),r.width=r.width,delete r[VE],!0}addEventListener(e,r,n){this.removeEventListener(e,r);let i=e.$proxies||(e.$proxies={}),s={attach:CFe,detach:_Fe,resize:MFe}[r]||DFe;i[r]=s(e,r,n)}removeEventListener(e,r){let n=e.$proxies||(e.$proxies={}),i=n[r];if(!i)return;({attach:jO,detach:jO,resize:jO}[r]||EFe)(e,r,i),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,r,n,i){return BO(e,r,n,i)}isAttached(e){let r=e&&vx(e);return!!(r&&r.isConnected)}};function OFe(t){return!mx()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?oR:lR}var Hc=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}hasValue(){return Pd(this.x)&&Pd(this.y)}getProps(e,r){let n=this.$animations;if(!r||!n)return this;let i={};return e.forEach(a=>{i[a]=n[a]&&n[a].active()?n[a]._to:this[a]}),i}};function RFe(t,e){let r=t.options.ticks,n=IFe(t),i=Math.min(r.maxTicksLimit||n,n),a=r.major.enabled?PFe(e):[],s=a.length,o=a[0],l=a[s-1],u=[];if(s>i)return FFe(e,u,a,s/i),u;let h=NFe(a,e,i);if(s>0){let f,d,p=s>1?Math.round((l-o)/(s-1)):null;for(NE(e,u,h,Br(p)?0:o-p,o),f=0,d=s-1;fi)return l}return Math.max(i,1)}function PFe(t){let e=[],r,n;for(r=0,n=t.length;rt==="left"?"right":t==="right"?"left":t,UJ=(t,e,r)=>e==="top"||e==="left"?t[e]+r:t[e]-r,HJ=(t,e)=>Math.min(e||t,t);function qJ(t,e){let r=[],n=t.length/e,i=t.length,a=0;for(;as+o)))return l}function VFe(t,e){dn(t,r=>{let n=r.gc,i=n.length/2,a;if(i>e){for(a=0;an?n:r,n=i&&r>n?r:n,{min:Gs(r,Gs(n,r)),max:Gs(n,Gs(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Dn(this.options.beforeUpdate,[this])}update(e,r,n){let{beginAtZero:i,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=r,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=IO(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=o=a||n<=1||!this.isHorizontal()){this.labelRotation=i;return}let h=this._getLabelSizes(),f=h.widest.width,d=h.highest.height,p=ua(this.chart.width-f,0,this.maxWidth);o=e.offset?this.maxWidth/n:p/(n-1),f+6>o&&(o=p/(n-(e.offset?.5:1)),l=this.maxHeight-wx(e.grid)-r.padding-WJ(e.title,this.chart.options.font),u=Math.sqrt(f*f+d*d),s=cx(Math.min(Math.asin(ua((h.highest.height+6)/o,-1,1)),Math.asin(ua(l/u,-1,1))-Math.asin(ua(d/u,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Dn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Dn(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:r,options:{ticks:n,title:i,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){let l=WJ(i,r.options.font);if(o?(e.width=this.maxWidth,e.height=wx(a)+l):(e.height=this.maxHeight,e.width=wx(a)+l),n.display&&this.ticks.length){let{first:u,last:h,widest:f,highest:d}=this._getLabelSizes(),p=n.padding*2,g=sl(this.labelRotation),m=Math.cos(g),v=Math.sin(g);if(o){let y=n.mirror?0:v*f.width+m*d.height;e.height=Math.min(this.maxHeight,e.height+y+p)}else{let y=n.mirror?0:m*f.width+v*d.height;e.width=Math.min(this.maxWidth,e.width+y+p)}this._calculatePadding(u,h,v,m)}}this._handleMargins(),o?(this.width=this._length=r.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=r.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,r,n,i){let{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,u=o!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1),d=0,p=0;l?u?(d=i*e.width,p=n*r.height):(d=n*e.height,p=i*r.width):a==="start"?p=r.width:a==="end"?d=e.width:a!=="inner"&&(d=e.width/2,p=r.width/2),this.paddingLeft=Math.max((d-h+s)*this.width/(this.width-h),0),this.paddingRight=Math.max((p-f+s)*this.width/(this.width-f),0)}else{let h=r.height/2,f=e.height/2;a==="start"?(h=0,f=e.height):a==="end"&&(h=r.height,f=0),this.paddingTop=h+s,this.paddingBottom=f+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Dn(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:r}=this.options;return r==="top"||r==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let r,n;for(r=0,n=e.length;r({width:s[M]||0,height:o[M]||0});return{first:_(0),last:_(r-1),widest:_(S),highest:_(L),widths:s,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,r){return NaN}getValueForPixel(e){}getPixelForTick(e){let r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let r=this._startPixel+e*this._length;return SO(this._alignToPixels?rf(this.chart,r,0):r)}getDecimalForPixel(e){let r=(e-this._startPixel)/this._length;return this._reversePixels?1-r:r}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:r}=this;return e<0&&r<0?r:e>0&&r>0?e:0}getContext(e){let r=this.ticks||[];if(e>=0&&eo*i?o/n:l/i:l*i0}_computeGridLineItems(e){let r=this.axis,n=this.chart,i=this.options,{grid:a,position:s,border:o}=i,l=a.offset,u=this.isHorizontal(),f=this.ticks.length+(l?1:0),d=wx(a),p=[],g=o.setContext(this.getContext()),m=g.display?g.width:0,v=m/2,y=function(A){return rf(n,A,m)},w,k,E,T,S,L,_,M,I,O,C,R;if(s==="top")w=y(this.bottom),L=this.bottom-d,M=w-v,O=y(e.top)+v,R=e.bottom;else if(s==="bottom")w=y(this.top),O=e.top,R=y(e.bottom)-v,L=w+v,M=this.top+d;else if(s==="left")w=y(this.right),S=this.right-d,_=w-v,I=y(e.left)+v,C=e.right;else if(s==="right")w=y(this.left),I=e.left,C=y(e.right)-v,S=w+v,_=this.left+d;else if(r==="x"){if(s==="center")w=y((e.top+e.bottom)/2+.5);else if(Rr(s)){let A=Object.keys(s)[0],N=s[A];w=y(this.chart.scales[A].getPixelForValue(N))}O=e.top,R=e.bottom,L=w+v,M=L+d}else if(r==="y"){if(s==="center")w=y((e.left+e.right)/2);else if(Rr(s)){let A=Object.keys(s)[0],N=s[A];w=y(this.chart.scales[A].getPixelForValue(N))}S=w-v,_=S-d,I=e.left,C=e.right}let D=gr(i.ticks.maxTicksLimit,f),P=Math.max(1,Math.ceil(f/D));for(k=0;k0&&(j-=X/2);break}z={left:j,top:ne,width:X+H.width,height:K+H.height,color:P.backdropColor}}v.push({label:E,font:M,textOffset:C,options:{rotation:m,color:N,strokeColor:F,strokeWidth:B,textAlign:V,textBaseline:R,translation:[T,S],backdrop:z}})}return v}_getXAxisLabelAlignment(){let{position:e,ticks:r}=this.options;if(-sl(this.labelRotation))return e==="top"?"left":"right";let i="center";return r.align==="start"?i="left":r.align==="end"?i="right":r.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){let{position:r,ticks:{crossAlign:n,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),o=e+a,l=s.widest.width,u,h;return r==="left"?i?(h=this.right+a,n==="near"?u="left":n==="center"?(u="center",h+=l/2):(u="right",h+=l)):(h=this.right-o,n==="near"?u="right":n==="center"?(u="center",h-=l/2):(u="left",h=this.left)):r==="right"?i?(h=this.left+a,n==="near"?u="right":n==="center"?(u="center",h-=l/2):(u="left",h-=l)):(h=this.left+o,n==="near"?u="left":n==="center"?(u="center",h+=l/2):(u="right",h=this.right)):u="right",{textAlign:u,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,r=this.options.position;if(r==="left"||r==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(r==="top"||r==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:r},left:n,top:i,width:a,height:s}=this;r&&(e.save(),e.fillStyle=r,e.fillRect(n,i,a,s),e.restore())}getLineWidthForValue(e){let r=this.options.grid;if(!this._isVisible()||!r.display)return 0;let i=this.ticks.findIndex(a=>a.value===e);return i>=0?r.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){let r=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),a,s,o=(l,u,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(u.x,u.y),n.stroke(),n.restore())};if(r.display)for(a=0,s=i.length;a{this.draw(a)}}]:[{z:n,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:r,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){let r=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[],a,s;for(a=0,s=r.length;a{let n=r.split("."),i=n.pop(),a=[t].concat(n).join("."),s=e[r].split("."),o=s.pop(),l=s.join(".");Di.route(a,i,l,o)})}function jFe(t){return"id"in t&&"defaults"in t}var cR=class{constructor(){this.controllers=new B1(qu,"datasets",!0),this.elements=new B1(Hc,"elements"),this.plugins=new B1(Object,"plugins"),this.scales=new B1($0,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,r,n){[...r].forEach(i=>{let a=n||this._getRegistryForType(i);n||a.isForType(i)||a===this.plugins&&i.id?this._exec(e,a,i):dn(i,s=>{let o=n||this._getRegistryForType(s);this._exec(e,o,s)})})}_exec(e,r,n){let i=lx(e);Dn(n["before"+i],[],n),r[e](n),Dn(n["after"+i],[],n)}_getRegistryForType(e){for(let r=0;ra.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(i(r,n),e,"stop"),this._notify(i(n,r),e,"start")}};function XFe(t){let e={},r=[],n=Object.keys(Hu.plugins.items);for(let a=0;a1&&GJ(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function YJ(t,e,r){if(r[e+"AxisID"]===t)return{axis:e}}function rBe(t,e){if(e.data&&e.data.datasets){let r=e.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(r.length)return YJ(t,"x",r[0])||YJ(t,"y",r[0])}return{}}function nBe(t,e){let r=Fd[t.type]||{scales:{}},n=e.scales||{},i=hR(t.type,e),a=Object.create(null);return Object.keys(n).forEach(s=>{let o=n[s];if(!Rr(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);let l=fR(s,o,rBe(s,t),Di.scales[o.type]),u=eBe(l,i),h=r.scales||{};a[s]=D0(Object.create(null),[{axis:l},o,h[l],h[u]])}),t.data.datasets.forEach(s=>{let o=s.type||t.type,l=s.indexAxis||hR(o,e),h=(Fd[o]||{}).scales||{};Object.keys(h).forEach(f=>{let d=JFe(f,l),p=s[d+"AxisID"]||d;a[p]=a[p]||Object.create(null),D0(a[p],[{axis:d},n[p],h[f]])})}),Object.keys(a).forEach(s=>{let o=a[s];D0(o,[Di.scales[o.type],Di.scale])}),a}function Oee(t){let e=t.options||(t.options={});e.plugins=gr(e.plugins,{}),e.scales=nBe(t,e)}function Ree(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function iBe(t){return t=t||{},t.data=Ree(t.data),Oee(t),t}var jJ=new Map,Iee=new Set;function PE(t,e){let r=jJ.get(t);return r||(r=e(),jJ.set(t,r),Iee.add(r)),r}var kx=(t,e,r)=>{let n=$u(e,r);n!==void 0&&t.add(n)},dR=class{constructor(e){this._config=iBe(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Ree(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),Oee(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return PE(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,r){return PE(`${e}.transition.${r}`,()=>[[`datasets.${e}.transitions.${r}`,`transitions.${r}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,r){return PE(`${e}-${r}`,()=>[[`datasets.${e}.elements.${r}`,`datasets.${e}`,`elements.${r}`,""]])}pluginScopeKeys(e){let r=e.id,n=this.type;return PE(`${n}-plugin-${r}`,()=>[[`plugins.${r}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,r){let n=this._scopeCache,i=n.get(e);return(!i||r)&&(i=new Map,n.set(e,i)),i}getOptionScopes(e,r,n){let{options:i,type:a}=this,s=this._cachedScopes(e,n),o=s.get(r);if(o)return o;let l=new Set;r.forEach(h=>{e&&(l.add(e),h.forEach(f=>kx(l,e,f))),h.forEach(f=>kx(l,i,f)),h.forEach(f=>kx(l,Fd[a]||{},f)),h.forEach(f=>kx(l,Di,f)),h.forEach(f=>kx(l,wE,f))});let u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Iee.has(r)&&s.set(r,u),u}chartOptionScopes(){let{options:e,type:r}=this;return[e,Fd[r]||{},Di.datasets[r]||{},{type:r},Di,wE]}resolveNamedOptions(e,r,n,i=[""]){let a={$shared:!0},{resolver:s,subPrefixes:o}=XJ(this._resolverCache,e,i),l=s;if(sBe(s,r)){a.$shared=!1,n=Bu(n)?n():n;let u=this.createResolver(e,n,o);l=Nd(s,n,u)}for(let u of r)a[u]=l[u];return a}createResolver(e,r,n=[""],i){let{resolver:a}=XJ(this._resolverCache,e,n);return Rr(r)?Nd(a,r,void 0,i):a}};function XJ(t,e,r){let n=t.get(e);n||(n=new Map,t.set(e,n));let i=r.join(),a=n.get(i);return a||(a={resolver:gx(e,r),subPrefixes:r.filter(o=>!o.toLowerCase().includes("hover"))},n.set(i,a)),a}var aBe=t=>Rr(t)&&Object.getOwnPropertyNames(t).some(e=>Bu(t[e]));function sBe(t,e){let{isScriptable:r,isIndexable:n}=SE(t);for(let i of e){let a=r(i),s=n(i),o=(s||a)&&t[i];if(a&&(Bu(o)||aBe(o))||s&&Fn(o))return!0}return!1}var oBe="4.4.4",lBe=["top","bottom","left","right","chartArea"];function KJ(t,e){return t==="top"||t==="bottom"||lBe.indexOf(t)===-1&&e==="x"}function ZJ(t,e){return function(r,n){return r[t]===n[t]?r[e]-n[e]:r[t]-n[t]}}function QJ(t){let e=t.chart,r=e.options.animation;e.notifyPlugins("afterRender"),Dn(r&&r.onComplete,[t],e)}function cBe(t){let e=t.chart,r=e.options.animation;Dn(r&&r.onProgress,[t],e)}function Nee(t){return mx()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var UE={},JJ=t=>{let e=Nee(t);return Object.values(UE).filter(r=>r.canvas===e).pop()};function uBe(t,e,r){let n=Object.keys(t);for(let i of n){let a=+i;if(a>=e){let s=t[i];delete t[i],(r>0||a>e)&&(t[a+r]=s)}}}function hBe(t,e,r,n){return!r||t.type==="mouseout"?null:n?e:t}function FE(t,e,r){return t.options.clip?t[r]:e[r]}function fBe(t,e){let{xScale:r,yScale:n}=t;return r&&n?{left:FE(r,e,"left"),right:FE(r,e,"right"),top:FE(n,e,"top"),bottom:FE(n,e,"bottom")}:e}var V0=class{static defaults=Di;static instances=UE;static overrides=Fd;static registry=Hu;static version=oBe;static getChart=JJ;static register(...e){Hu.add(...e),eee()}static unregister(...e){Hu.remove(...e),eee()}constructor(e,r){let n=this.config=new dR(r),i=Nee(e),a=JJ(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");let s=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||OFe(i)),this.platform.updateConfig(n);let o=this.platform.acquireContext(i,s.aspectRatio),l=o&&o.canvas,u=l&&l.height,h=l&&l.width;if(this.id=xO(),this.ctx=o,this.canvas=l,this.width=h,this.height=u,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new uR,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=LO(f=>this.update(f),s.resizeDelay||0),this._dataChanges=[],UE[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}of.listen(this,"complete",QJ),of.listen(this,"progress",cBe),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:r},width:n,height:i,_aspectRatio:a}=this;return Br(e)?r&&a?a:i?n/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Hu}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():AE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return kE(this.canvas,this.ctx),this}stop(){return of.stop(this),this}resize(e,r){of.running(this)?this._resizeBeforeDraw={width:e,height:r}:this._resize(e,r)}_resize(e,r){let n=this.options,i=this.canvas,a=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,e,r,a),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,AE(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Dn(n.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let r=this.options.scales||{};dn(r,(n,i)=>{n.id=i})}buildOrUpdateScales(){let e=this.options,r=e.scales,n=this.scales,i=Object.keys(n).reduce((s,o)=>(s[o]=!1,s),{}),a=[];r&&(a=a.concat(Object.keys(r).map(s=>{let o=r[s],l=fR(s,o),u=l==="r",h=l==="x";return{options:o,dposition:u?"chartArea":h?"bottom":"left",dtype:u?"radialLinear":h?"category":"linear"}}))),dn(a,s=>{let o=s.options,l=o.id,u=fR(l,o),h=gr(o.type,s.dtype);(o.position===void 0||KJ(o.position,u)!==KJ(s.dposition))&&(o.position=s.dposition),i[l]=!0;let f=null;if(l in n&&n[l].type===h)f=n[l];else{let d=Hu.getScale(h);f=new d({id:l,type:h,ctx:this.ctx,chart:this}),n[f.id]=f}f.init(o,e)}),dn(i,(s,o)=>{s||delete n[o]}),dn(n,s=>{Es.configure(this,s,s.options),Es.addBox(this,s)})}_updateMetasets(){let e=this._metasets,r=this.data.datasets.length,n=e.length;if(e.sort((i,a)=>i.index-a.index),n>r){for(let i=r;ir.length&&delete this._stacks,e.forEach((n,i)=>{r.filter(a=>a===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let e=[],r=this.data.datasets,n,i;for(this._removeUnreferencedMetasets(),n=0,i=r.length;n{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let r=this.config;r.update();let n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,h=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(ZJ("z","_idx"));let{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){dn(this.scales,e=>{Es.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!lE(r,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,r=this._getUniformDataChanges()||[];for(let{method:n,start:i,count:a}of r){let s=n==="_removeElements"?-a:a;uBe(e,i,s)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let r=this.data.datasets.length,n=a=>new Set(e.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),i=n(0);for(let a=1;aa.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Es.update(this,this.width,this.height,e);let r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],dn(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r=0;--r)this._drawDataset(e[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let r=this.ctx,n=e._clip,i=!n.disabled,a=fBe(e,this.chartArea),s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&N1(r,{left:n.left===!1?0:a.left-n.left,right:n.right===!1?this.width:a.right+n.right,top:n.top===!1?0:a.top-n.top,bottom:n.bottom===!1?this.height:a.bottom+n.bottom}),e.controller.draw(),i&&P1(r),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return $c(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,r,n,i){let a=Dx.modes[r];return typeof a=="function"?a(this,e,n,i):[]}getDatasetMeta(e){let r=this.data.datasets[e],n=this._metasets,i=n.filter(a=>a&&a._dataset===r).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:e,_dataset:r,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=Vu(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let r=this.data.datasets[e];if(!r)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(e,r){let n=this.getDatasetMeta(e);n.hidden=!r}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,r,n){let i=n?"show":"hide",a=this.getDatasetMeta(e),s=a.controller._resolveAnimations(void 0,i);O0(r)?(a.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),s.update(a,{visible:n}),this.update(o=>o.datasetIndex===e?i:void 0))}hide(e,r){this._updateVisibility(e,r,!1)}show(e,r){this._updateVisibility(e,r,!0)}_destroyDatasetMeta(e){let r=this._metasets[e];r&&r.controller&&r.controller._destroy(),delete this._metasets[e]}_stop(){let e,r;for(this.stop(),of.remove(this),e=0,r=this.data.datasets.length;e{r.addEventListener(this,a,s),e[a]=s},i=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};dn(this.options.events,a=>n(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,r=this.platform,n=(l,u)=>{r.addEventListener(this,l,u),e[l]=u},i=(l,u)=>{e[l]&&(r.removeEventListener(this,l,u),delete e[l])},a=(l,u)=>{this.canvas&&this.resize(l,u)},s,o=()=>{i("attach",o),this.attached=!0,this.resize(),n("resize",a),n("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),n("attach",o)},r.isAttached(this.canvas)?o():s()}unbindEvents(){dn(this._listeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._listeners={},dn(this._responsiveListeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,r,n){let i=n?"set":"remove",a,s,o,l;for(r==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=e.length;o{let o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!I1(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(e,r,n){return this._plugins.notify(this,e,r,n)}isPluginEnabled(e){return this._plugins._cache.filter(r=>r.plugin.id===e).length===1}_updateHoverStyles(e,r,n){let i=this.options.hover,a=(l,u)=>l.filter(h=>!u.some(f=>h.datasetIndex===f.datasetIndex&&h.index===f.index)),s=a(r,e),o=n?e:a(e,r);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(e,r){let n={event:e,replay:r,cancelable:!0,inChartArea:this.isPointInArea(e)},i=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;let a=this._handleEvent(e,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(a||n.changed)&&this.render(),this}_handleEvent(e,r,n){let{_active:i=[],options:a}=this,s=r,o=this._getActiveElements(e,i,n,s),l=kO(e),u=hBe(e,this._lastEvent,n,l);n&&(this._lastEvent=null,Dn(a.onHover,[e,o,this],this),l&&Dn(a.onClick,[e,o,this],this));let h=!I1(o,i);return(h||r)&&(this._active=o,this._updateHoverStyles(o,i,r)),this._lastEvent=u,h}_getActiveElements(e,r,n,i){if(e.type==="mouseout")return[];if(!n)return r;let a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,i)}};function eee(){return dn(V0.instances,t=>t._plugins.invalidate())}function dBe(t,e,r){let{startAngle:n,pixelMargin:i,x:a,y:s,outerRadius:o,innerRadius:l}=e,u=i/o;t.beginPath(),t.arc(a,s,o,n-u,r+u),l>i?(u=i/l,t.arc(a,s,l,r+u,n-u,!0)):t.arc(a,s,i,r+Mi,n-Mi),t.closePath(),t.clip()}function pBe(t){return px(t,["outerStart","outerEnd","innerStart","innerEnd"])}function gBe(t,e,r,n){let i=pBe(t.options.borderRadius),a=(r-e)/2,s=Math.min(a,n*e/2),o=l=>{let u=(r-Math.min(a,l))*n/2;return ua(l,0,Math.min(a,u))};return{outerStart:o(i.outerStart),outerEnd:o(i.outerEnd),innerStart:ua(i.innerStart,0,s),innerEnd:ua(i.innerEnd,0,s)}}function F1(t,e,r,n){return{x:r+t*Math.cos(e),y:n+t*Math.sin(e)}}function YE(t,e,r,n,i,a){let{x:s,y:o,startAngle:l,pixelMargin:u,innerRadius:h}=e,f=Math.max(e.outerRadius+n+r-u,0),d=h>0?h+n+r+u:0,p=0,g=i-l;if(n){let P=h>0?h-n:0,A=f>0?f-n:0,N=(P+A)/2,F=N!==0?g*N/(N+n):g;p=(g-F)/2}let m=Math.max(.001,g*f-r/Bn)/f,v=(g-m)/2,y=l+v+p,w=i-v-p,{outerStart:k,outerEnd:E,innerStart:T,innerEnd:S}=gBe(e,d,f,w-y),L=f-k,_=f-E,M=y+k/L,I=w-E/_,O=d+T,C=d+S,R=y+T/O,D=w-S/C;if(t.beginPath(),a){let P=(M+I)/2;if(t.arc(s,o,f,M,P),t.arc(s,o,f,P,I),E>0){let B=F1(_,I,s,o);t.arc(B.x,B.y,E,I,w+Mi)}let A=F1(C,w,s,o);if(t.lineTo(A.x,A.y),S>0){let B=F1(C,D,s,o);t.arc(B.x,B.y,S,w+Mi,D+Math.PI)}let N=(w-S/d+(y+T/d))/2;if(t.arc(s,o,d,w-S/d,N,!0),t.arc(s,o,d,N,y+T/d,!0),T>0){let B=F1(O,R,s,o);t.arc(B.x,B.y,T,R+Math.PI,y-Mi)}let F=F1(L,y,s,o);if(t.lineTo(F.x,F.y),k>0){let B=F1(L,M,s,o);t.arc(B.x,B.y,k,y-Mi,M)}}else{t.moveTo(s,o);let P=Math.cos(M)*f+s,A=Math.sin(M)*f+o;t.lineTo(P,A);let N=Math.cos(I)*f+s,F=Math.sin(I)*f+o;t.lineTo(N,F)}t.closePath()}function mBe(t,e,r,n,i){let{fullCircles:a,startAngle:s,circumference:o}=e,l=e.endAngle;if(a){YE(t,e,r,n,l,i);for(let u=0;ue!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,r,n){let i=this.getProps(["x","y"],n),{angle:a,distance:s}=fE(i,{x:e,y:r}),{startAngle:o,endAngle:l,innerRadius:u,outerRadius:h,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,p=gr(f,l-o),g=I0(a,o,l)&&o!==l,m=p>=zn||g,v=Uc(s,u+d,h+d);return m&&v}getCenterPoint(e){let{x:r,y:n,startAngle:i,endAngle:a,innerRadius:s,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:u}=this.options,h=(i+a)/2,f=(s+o+u+l)/2;return{x:r+Math.cos(h)*f,y:n+Math.sin(h)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:r,circumference:n}=this,i=(r.offset||0)/4,a=(r.spacing||0)/2,s=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=n>zn?Math.floor(n/zn):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*i,Math.sin(o)*i);let l=1-Math.sin(Math.min(Bn,n||0)),u=i*l;e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,mBe(e,this,u,a,s),vBe(e,this,u,a,s),e.restore()}};function Pee(t,e,r=e){t.lineCap=gr(r.borderCapStyle,e.borderCapStyle),t.setLineDash(gr(r.borderDash,e.borderDash)),t.lineDashOffset=gr(r.borderDashOffset,e.borderDashOffset),t.lineJoin=gr(r.borderJoinStyle,e.borderJoinStyle),t.lineWidth=gr(r.borderWidth,e.borderWidth),t.strokeStyle=gr(r.borderColor,e.borderColor)}function yBe(t,e,r){t.lineTo(r.x,r.y)}function bBe(t){return t.stepped?OO:t.tension||t.cubicInterpolationMode==="monotone"?RO:yBe}function Fee(t,e,r={}){let n=t.length,{start:i=0,end:a=n-1}=r,{start:s,end:o}=e,l=Math.max(i,s),u=Math.min(a,o),h=io&&a>o;return{count:n,start:l,loop:e.loop,ilen:u(s+(u?o-E:E))%a,k=()=>{m!==v&&(t.lineTo(h,v),t.lineTo(h,m),t.lineTo(h,y))};for(l&&(p=i[w(0)],t.moveTo(p.x,p.y)),d=0;d<=o;++d){if(p=i[w(d)],p.skip)continue;let E=p.x,T=p.y,S=E|0;S===g?(Tv&&(v=T),h=(f*h+E)/++f):(k(),t.lineTo(E,T),g=S,f=0,m=v=T),y=T}k()}function gR(t){let e=t.options,r=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!r?wBe:xBe}function kBe(t){return t.stepped?$O:t.tension||t.cubicInterpolationMode==="monotone"?VO:tf}function TBe(t,e,r,n){let i=e._path;i||(i=e._path=new Path2D,e.path(i,r,n)&&i.closePath()),Pee(t,e.options),t.stroke(i)}function EBe(t,e,r,n){let{segments:i,options:a}=e,s=gR(e);for(let o of i)Pee(t,a,o.style),t.beginPath(),s(t,e,o,{start:r,end:r+n-1})&&t.closePath(),t.stroke()}var SBe=typeof Path2D=="function";function CBe(t,e,r,n){SBe&&!e.options.segment?TBe(t,e,r,n):EBe(t,e,r,n)}var z1=class extends Hc{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,r){let n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){let i=n.spanGaps?this._loop:this._fullLoop;FO(this._points,n,e,i,r),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=UO(this,this.options.segment))}first(){let e=this.segments,r=this.points;return e.length&&r[e[0].start]}last(){let e=this.segments,r=this.points,n=e.length;return n&&r[e[n-1].end]}interpolate(e,r){let n=this.options,i=e[r],a=this.points,s=RE(this,{property:r,start:i,end:i});if(!s.length)return;let o=[],l=kBe(n),u,h;for(u=0,h=s.length;ut.replace("rgb(","rgba(").replace(")",", 0.5)"));function zee(t){return yR[t%yR.length]}function $ee(t){return ree[t%ree.length]}function RBe(t,e){return t.borderColor=zee(e),t.backgroundColor=$ee(e),++e}function IBe(t,e){return t.backgroundColor=t.data.map(()=>zee(e++)),e}function NBe(t,e){return t.backgroundColor=t.data.map(()=>$ee(e++)),e}function PBe(t){let e=0;return(r,n)=>{let i=t.getDatasetMeta(n).controller;i instanceof Sx?e=IBe(r,e):i instanceof qE?e=NBe(r,e):i&&(e=RBe(r,e))}}function nee(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function FBe(t){return t&&(t.borderColor||t.backgroundColor)}var BBe={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,r){if(!r.enabled)return;let{data:{datasets:n},options:i}=t.config,{elements:a}=i;if(!r.forceOverride&&(nee(n)||FBe(i)||a&&nee(a)))return;let s=PBe(t);n.forEach(s)}};function zBe(t,e,r,n,i){let a=i.samples||n;if(a>=r)return t.slice(e,e+r);let s=[],o=(r-2)/(a-2),l=0,u=e+r-1,h=e,f,d,p,g,m;for(s[l++]=t[h],f=0;fp&&(p=g,d=t[w],m=w);s[l++]=d,h=m}return s[l++]=t[u],s}function $Be(t,e,r,n){let i=0,a=0,s,o,l,u,h,f,d,p,g,m,v=[],y=e+r-1,w=t[e].x,E=t[y].x-w;for(s=e;sm&&(m=u,d=s),i=(a*i+o.x)/++a;else{let S=s-1;if(!Br(f)&&!Br(d)){let L=Math.min(f,d),_=Math.max(f,d);L!==p&&L!==S&&v.push({...t[L],x:i}),_!==p&&_!==S&&v.push({...t[_],x:i})}s>0&&S!==p&&v.push(t[S]),v.push(o),h=T,a=0,g=m=u,f=d=p=s}}return v}function Vee(t){if(t._decimated){let e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function iee(t){t.data.datasets.forEach(e=>{Vee(e)})}function VBe(t,e){let r=e.length,n=0,i,{iScale:a}=t,{min:s,max:o,minDefined:l,maxDefined:u}=a.getUserBounds();return l&&(n=ua(zc(e,a.axis,s).lo,0,r-1)),u?i=ua(zc(e,a.axis,o).hi+1,n,r)-n:i=r-n,{start:n,count:i}}var UBe={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,r)=>{if(!r.enabled){iee(t);return}let n=t.width;t.data.datasets.forEach((i,a)=>{let{_data:s,indexAxis:o}=i,l=t.getDatasetMeta(a),u=s||i.data;if(F0([o,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=t.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||t.options.parsing)return;let{start:f,count:d}=VBe(l,u),p=r.threshold||4*n;if(d<=p){Vee(i);return}Br(s)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let g;switch(r.algorithm){case"lttb":g=zBe(u,f,d,n,r);break;case"min-max":g=$Be(u,f,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${r.algorithm}'`)}i._decimated=g})},destroy(t){iee(t)}};function HBe(t,e,r){let n=t.segments,i=t.points,a=e.points,s=[];for(let o of n){let{start:l,end:u}=o;u=CR(l,u,i);let h=bR(r,i[l],i[u],o.loop);if(!e.segments){s.push({source:o,target:h,start:i[l],end:i[u]});continue}let f=RE(e,h);for(let d of f){let p=bR(r,a[d.start],a[d.end],d.loop),g=OE(o,i,p);for(let m of g)s.push({source:m,target:d,start:{[r]:aee(h,p,"start",Math.max)},end:{[r]:aee(h,p,"end",Math.min)}})}}return s}function bR(t,e,r,n){if(n)return;let i=e[t],a=r[t];return t==="angle"&&(i=Ws(i),a=Ws(a)),{property:t,start:i,end:a}}function qBe(t,e){let{x:r=null,y:n=null}=t||{},i=e.points,a=[];return e.segments.forEach(({start:s,end:o})=>{o=CR(s,o,i);let l=i[s],u=i[o];n!==null?(a.push({x:l.x,y:n}),a.push({x:u.x,y:n})):r!==null&&(a.push({x:r,y:l.y}),a.push({x:r,y:u.y}))}),a}function CR(t,e,r){for(;e>t;e--){let n=r[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function aee(t,e,r,n){return t&&e?n(t[r],e[r]):t?t[r]:e?e[r]:0}function Uee(t,e){let r=[],n=!1;return Fn(t)?(n=!0,r=t):r=qBe(t,e),r.length?new z1({points:r,options:{tension:0},_loop:n,_fullLoop:n}):null}function see(t){return t&&t.fill!==!1}function WBe(t,e,r){let i=t[e].fill,a=[e],s;if(!r)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!pi(i))return i;if(s=t[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function GBe(t,e,r){let n=KBe(t);if(Rr(n))return isNaN(n.value)?!1:n;let i=parseFloat(n);return pi(i)&&Math.floor(i)===i?YBe(n[0],e,i,r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function YBe(t,e,r,n){return(t==="-"||t==="+")&&(r=e+r),r===e||r<0||r>=n?!1:r}function jBe(t,e){let r=null;return t==="start"?r=e.bottom:t==="end"?r=e.top:Rr(t)?r=e.getPixelForValue(t.value):e.getBasePixel&&(r=e.getBasePixel()),r}function XBe(t,e,r){let n;return t==="start"?n=r:t==="end"?n=e.options.reverse?e.min:e.max:Rr(t)?n=t.value:n=e.getBaseValue(),n}function KBe(t){let e=t.options,r=e.fill,n=gr(r&&r.target,r);return n===void 0&&(n=!!e.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function ZBe(t){let{scale:e,index:r,line:n}=t,i=[],a=n.segments,s=n.points,o=QBe(e,r);o.push(Uee({x:null,y:e.bottom},n));for(let l=0;l=0;--s){let o=i[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),n&&o.fill&&ZO(t.ctx,o,a))}},beforeDatasetsDraw(t,e,r){if(r.drawTime!=="beforeDatasetsDraw")return;let n=t.getSortedVisibleDatasetMetas();for(let i=n.length-1;i>=0;--i){let a=n[i].$filler;see(a)&&ZO(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,e,r){let n=e.meta.$filler;!see(n)||r.drawTime!=="beforeDatasetDraw"||ZO(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},uee=(t,e)=>{let{boxHeight:r=e,boxWidth:n=e}=t;return t.usePointStyle&&(r=Math.min(r,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(e,r)}},cze=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index,XE=class extends Hc{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,r,n){this.maxWidth=e,this.maxHeight=r,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},r=Dn(e.generateLabels,[this.chart],this)||[];e.filter&&(r=r.filter(n=>e.filter(n,this.chart.data))),e.sort&&(r=r.sort((n,i)=>e.sort(n,i,this.chart.data))),this.options.reverse&&r.reverse(),this.legendItems=r}fit(){let{options:e,ctx:r}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,i=Qi(n.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=uee(n,a),u,h;r.font=i.string,this.isHorizontal()?(u=this.maxWidth,h=this._fitRows(s,a,o,l)+10):(h=this.maxHeight,u=this._fitCols(s,i,o,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,r,n,i){let{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],h=i+o,f=e;a.textAlign="left",a.textBaseline="middle";let d=-1,p=-h;return this.legendItems.forEach((g,m)=>{let v=n+r/2+a.measureText(g.text).width;(m===0||u[u.length-1]+v+2*o>s)&&(f+=h,u[u.length-(m>0?0:1)]=0,p+=h,d++),l[m]={left:0,top:p,row:d,width:v,height:i},u[u.length-1]+=v+o}),f}_fitCols(e,r,n,i){let{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],h=s-e,f=o,d=0,p=0,g=0,m=0;return this.legendItems.forEach((v,y)=>{let{itemWidth:w,itemHeight:k}=uze(n,r,a,v,i);y>0&&p+k+2*o>h&&(f+=d+o,u.push({width:d,height:p}),g+=d+o,m++,d=p=0),l[y]={left:g,top:p,col:m,width:w,height:k},d=Math.max(d,w),p+=k+o}),f+=d,u.push({width:d,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:n,labels:{padding:i},rtl:a}}=this,s=Bd(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=za(n,this.left+i,this.right-this.lineWidths[o]);for(let u of r)o!==u.row&&(o=u.row,l=za(n,this.left+i,this.right-this.lineWidths[o])),u.top+=this.top+e+i,u.left=s.leftForLtr(s.x(l),u.width),l+=u.width+i}else{let o=0,l=za(n,this.top+e+i,this.bottom-this.columnSizes[o].height);for(let u of r)u.col!==o&&(o=u.col,l=za(n,this.top+e+i,this.bottom-this.columnSizes[o].height)),u.top=l,u.left+=this.left+i,u.left=s.leftForLtr(s.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let e=this.ctx;N1(e,this),this._draw(),P1(e)}}_draw(){let{options:e,columnSizes:r,lineWidths:n,ctx:i}=this,{align:a,labels:s}=e,o=Di.color,l=Bd(e.rtl,this.left,this.width),u=Qi(s.font),{padding:h}=s,f=u.size,d=f/2,p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;let{boxWidth:g,boxHeight:m,itemHeight:v}=uee(s,f),y=function(S,L,_){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;i.save();let M=gr(_.lineWidth,1);if(i.fillStyle=gr(_.fillStyle,o),i.lineCap=gr(_.lineCap,"butt"),i.lineDashOffset=gr(_.lineDashOffset,0),i.lineJoin=gr(_.lineJoin,"miter"),i.lineWidth=M,i.strokeStyle=gr(_.strokeStyle,o),i.setLineDash(gr(_.lineDash,[])),s.usePointStyle){let I={radius:m*Math.SQRT2/2,pointStyle:_.pointStyle,rotation:_.rotation,borderWidth:M},O=l.xPlus(S,g/2),C=L+d;TE(i,I,O,C,s.pointStyleWidth&&g)}else{let I=L+Math.max((f-m)/2,0),O=l.leftForLtr(S,g),C=af(_.borderRadius);i.beginPath(),Object.values(C).some(R=>R!==0)?P0(i,{x:O,y:I,w:g,h:m,radius:C}):i.rect(O,I,g,m),i.fill(),M!==0&&i.stroke()}i.restore()},w=function(S,L,_){nf(i,_.text,S,L+v/2,u,{strikethrough:_.hidden,textAlign:l.textAlign(_.textAlign)})},k=this.isHorizontal(),E=this._computeTitleHeight();k?p={x:za(a,this.left+h,this.right-n[0]),y:this.top+h+E,line:0}:p={x:this.left+h,y:za(a,this.top+E+h,this.bottom-r[0].height),line:0},ME(this.ctx,e.textDirection);let T=v+h;this.legendItems.forEach((S,L)=>{i.strokeStyle=S.fontColor,i.fillStyle=S.fontColor;let _=i.measureText(S.text).width,M=l.textAlign(S.textAlign||(S.textAlign=s.textAlign)),I=g+d+_,O=p.x,C=p.y;l.setWidth(this.width),k?L>0&&O+I+h>this.right&&(C=p.y+=T,p.line++,O=p.x=za(a,this.left+h,this.right-n[p.line])):L>0&&C+T>this.bottom&&(O=p.x=O+r[p.line].width+h,p.line++,C=p.y=za(a,this.top+E+h,this.bottom-r[p.line].height));let R=l.x(O);if(y(R,C,S),O=MO(M,O+g+d,k?O+I:this.right,e.rtl),w(l.x(O),C,S),k)p.x+=I+h;else if(typeof S.text!="string"){let D=u.lineHeight;p.y+=Hee(S,D)+h}else p.y+=T}),DE(this.ctx,e.textDirection)}drawTitle(){let e=this.options,r=e.title,n=Qi(r.font),i=$a(r.padding);if(!r.display)return;let a=Bd(e.rtl,this.left,this.width),s=this.ctx,o=r.position,l=n.size/2,u=i.top+l,h,f=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+u,f=za(e.align,f,this.right-d);else{let g=this.columnSizes.reduce((m,v)=>Math.max(m,v.height),0);h=u+za(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}let p=za(o,f,f+d);s.textAlign=a.textAlign(hx(o)),s.textBaseline="middle",s.strokeStyle=r.color,s.fillStyle=r.color,s.font=n.string,nf(s,r.text,p,h,n)}_computeTitleHeight(){let e=this.options.title,r=Qi(e.font),n=$a(e.padding);return e.display?r.lineHeight+n.height:0}_getLegendItemAt(e,r){let n,i,a;if(Uc(e,this.left,this.right)&&Uc(r,this.top,this.bottom)){for(a=this.legendHitBoxes,n=0;na.length>s.length?a:s)),e+r.size/2+n.measureText(i).width}function fze(t,e,r){let n=t;return typeof e.text!="string"&&(n=Hee(e,r)),n}function Hee(t,e){let r=t.text?t.text.length:0;return e*r}function dze(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var pze={id:"legend",_element:XE,start(t,e,r){let n=t.legend=new XE({ctx:t.ctx,options:r,chart:t});Es.configure(t,n,r),Es.addBox(t,n)},stop(t){Es.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,r){let n=t.legend;Es.configure(t,n,r),n.options=r},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,r){let n=e.datasetIndex,i=r.chart;i.isDatasetVisible(n)?(i.hide(n),e.hidden=!0):(i.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:i,color:a,useBorderRadius:s,borderRadius:o}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{let u=l.controller.getStyle(r?0:void 0),h=$a(u.borderWidth);return{text:e[l.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:u.borderColor,pointStyle:n||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:s&&(o||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},_x=class extends Hc{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,r){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=r;let i=Fn(n.text)?n.text.length:1;this._padding=$a(n.padding);let a=i*Qi(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){let{top:r,left:n,bottom:i,right:a,options:s}=this,o=s.align,l=0,u,h,f;return this.isHorizontal()?(h=za(o,n,a),f=r+e,u=a-n):(s.position==="left"?(h=n+e,f=za(o,i,r),l=Bn*-.5):(h=a-e,f=za(o,r,i),l=Bn*.5),u=i-r),{titleX:h,titleY:f,maxWidth:u,rotation:l}}draw(){let e=this.ctx,r=this.options;if(!r.display)return;let n=Qi(r.font),a=n.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:u}=this._drawArgs(a);nf(e,r.text,0,0,n,{color:r.color,maxWidth:l,rotation:u,textAlign:hx(r.align),textBaseline:"middle",translation:[s,o]})}};function gze(t,e){let r=new _x({ctx:t.ctx,options:e,chart:t});Es.configure(t,r,e),Es.addBox(t,r),t.titleBlock=r}var mze={id:"title",_element:_x,start(t,e,r){gze(t,r)},stop(t){let e=t.titleBlock;Es.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,r){let n=t.titleBlock;Es.configure(t,n,r),n.options=r},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},BE=new WeakMap,vze={id:"subtitle",start(t,e,r){let n=new _x({ctx:t.ctx,options:r,chart:t});Es.configure(t,n,r),Es.addBox(t,n),BE.set(t,n)},stop(t){Es.removeBox(t,BE.get(t)),BE.delete(t)},beforeUpdate(t,e,r){let n=BE.get(t);Es.configure(t,n,r),n.options=r},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Ex={average(t){if(!t.length)return!1;let e,r,n=new Set,i=0,a=0;for(e=0,r=t.length;eo+l)/n.size,y:i/a}},nearest(t,e){if(!t.length)return!1;let r=e.x,n=e.y,i=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=t.length;a-1?t.split(` `):t}function yze(t,e){let{element:r,datasetIndex:n,index:i}=e,a=t.getDatasetMeta(n).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:t,label:s,parsed:a.getParsed(i),raw:t.data.datasets[n].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:n,element:r}}function hee(t,e){let r=t.chart.ctx,{body:n,footer:i,title:a}=t,{boxWidth:s,boxHeight:o}=e,l=Qi(e.bodyFont),u=Qi(e.titleFont),h=Qi(e.footerFont),f=a.length,d=i.length,p=n.length,g=$a(e.padding),m=g.height,v=0,y=n.reduce((E,T)=>E+T.before.length+T.lines.length+T.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,f&&(m+=f*u.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),y){let E=e.displayColors?Math.max(o,l.lineHeight):l.lineHeight;m+=p*E+(y-p)*l.lineHeight+(y-1)*e.bodySpacing}d&&(m+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let w=0,k=function(E){v=Math.max(v,r.measureText(E).width+w)};return r.save(),r.font=u.string,dn(t.title,k),r.font=l.string,dn(t.beforeBody.concat(t.afterBody),k),w=e.displayColors?s+2+e.boxPadding:0,dn(n,E=>{dn(E.before,k),dn(E.lines,k),dn(E.after,k)}),w=0,r.font=h.string,dn(t.footer,k),r.restore(),v+=g.width,{width:v,height:m}}function bze(t,e){let{y:r,height:n}=e;return rt.height-n/2?"bottom":"center"}function xze(t,e,r,n){let{x:i,width:a}=n,s=r.caretSize+r.caretPadding;if(t==="left"&&i+a+s>e.width||t==="right"&&i-a-s<0)return!0}function wze(t,e,r,n){let{x:i,width:a}=r,{width:s,chartArea:{left:o,right:l}}=t,u="center";return n==="center"?u=i<=(o+l)/2?"left":"right":i<=a/2?u="left":i>=s-a/2&&(u="right"),xze(u,t,e,r)&&(u="center"),u}function fee(t,e,r){let n=r.yAlign||e.yAlign||bze(t,r);return{xAlign:r.xAlign||e.xAlign||wze(t,e,r,n),yAlign:n}}function kze(t,e){let{x:r,width:n}=t;return e==="right"?r-=n:e==="center"&&(r-=n/2),r}function Tze(t,e,r){let{y:n,height:i}=t;return e==="top"?n+=r:e==="bottom"?n-=i+r:n-=i/2,n}function dee(t,e,r,n){let{caretSize:i,caretPadding:a,cornerRadius:s}=t,{xAlign:o,yAlign:l}=r,u=i+a,{topLeft:h,topRight:f,bottomLeft:d,bottomRight:p}=af(s),g=kze(e,o),m=Tze(e,l,u);return l==="center"?o==="left"?g+=u:o==="right"&&(g-=u):o==="left"?g-=Math.max(h,d)+i:o==="right"&&(g+=Math.max(f,p)+i),{x:ua(g,0,n.width-e.width),y:ua(m,0,n.height-e.height)}}function zE(t,e,r){let n=$a(r.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function pee(t){return Uu([],lf(t))}function Eze(t,e,r){return Vu(t,{tooltip:e,tooltipItems:r,type:"tooltip"})}function gee(t,e){let r=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return r?t.override(r):t}var qee={beforeTitle:Vc,title(t){if(t.length>0){let e=t[0],r=e.chart.data.labels,n=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"u"?qee[e].call(r,n):i}var KE=class extends Hc{static positioners=Ex;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let r=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&r.options.animation&&n.animations,a=new HE(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Eze(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,r){let{callbacks:n}=r,i=xo(n,"beforeTitle",this,e),a=xo(n,"title",this,e),s=xo(n,"afterTitle",this,e),o=[];return o=Uu(o,lf(i)),o=Uu(o,lf(a)),o=Uu(o,lf(s)),o}getBeforeBody(e,r){return pee(xo(r.callbacks,"beforeBody",this,e))}getBody(e,r){let{callbacks:n}=r,i=[];return dn(e,a=>{let s={before:[],lines:[],after:[]},o=gee(n,a);Uu(s.before,lf(xo(o,"beforeLabel",this,a))),Uu(s.lines,xo(o,"label",this,a)),Uu(s.after,lf(xo(o,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(e,r){return pee(xo(r.callbacks,"afterBody",this,e))}getFooter(e,r){let{callbacks:n}=r,i=xo(n,"beforeFooter",this,e),a=xo(n,"footer",this,e),s=xo(n,"afterFooter",this,e),o=[];return o=Uu(o,lf(i)),o=Uu(o,lf(a)),o=Uu(o,lf(s)),o}_createItems(e){let r=this._active,n=this.chart.data,i=[],a=[],s=[],o=[],l,u;for(l=0,u=r.length;le.filter(h,f,d,n))),e.itemSort&&(o=o.sort((h,f)=>e.itemSort(h,f,n))),dn(o,h=>{let f=gee(e.callbacks,h);i.push(xo(f,"labelColor",this,h)),a.push(xo(f,"labelPointStyle",this,h)),s.push(xo(f,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(e,r){let n=this.options.setContext(this.getContext()),i=this._active,a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{let o=Ex[n.position].call(this,i,this._eventPosition);s=this._createItems(n),this.title=this.getTitle(s,n),this.beforeBody=this.getBeforeBody(s,n),this.body=this.getBody(s,n),this.afterBody=this.getAfterBody(s,n),this.footer=this.getFooter(s,n);let l=this._size=hee(this,n),u=Object.assign({},o,l),h=fee(this.chart,n,u),f=dee(n,u,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,a={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(e,r,n,i){let a=this.getCaretPosition(e,n,i);r.lineTo(a.x1,a.y1),r.lineTo(a.x2,a.y2),r.lineTo(a.x3,a.y3)}getCaretPosition(e,r,n){let{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:o}=n,{topLeft:l,topRight:u,bottomLeft:h,bottomRight:f}=af(o),{x:d,y:p}=e,{width:g,height:m}=r,v,y,w,k,E,T;return a==="center"?(E=p+m/2,i==="left"?(v=d,y=v-s,k=E+s,T=E-s):(v=d+g,y=v+s,k=E-s,T=E+s),w=v):(i==="left"?y=d+Math.max(l,h)+s:i==="right"?y=d+g-Math.max(u,f)-s:y=this.caretX,a==="top"?(k=p,E=k-s,v=y-s,w=y+s):(k=p+m,E=k+s,v=y+s,w=y-s),T=k),{x1:v,x2:y,x3:w,y1:k,y2:E,y3:T}}drawTitle(e,r,n){let i=this.title,a=i.length,s,o,l;if(a){let u=Bd(n.rtl,this.x,this.width);for(e.x=zE(this,n.titleAlign,n),r.textAlign=u.textAlign(n.titleAlign),r.textBaseline="middle",s=Qi(n.titleFont),o=n.titleSpacing,r.fillStyle=n.titleColor,r.font=s.string,l=0;lw!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,P0(e,{x:m,y:g,w:u,h:l,radius:y}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),P0(e,{x:v,y:g+1,w:u-2,h:l-2,radius:y}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(m,g,u,l),e.strokeRect(m,g,u,l),e.fillStyle=s.backgroundColor,e.fillRect(v,g+1,u-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,r,n){let{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:u,boxPadding:h}=n,f=Qi(n.bodyFont),d=f.lineHeight,p=0,g=Bd(n.rtl,this.x,this.width),m=function(_){r.fillText(_,g.x(e.x+p),e.y+d/2),e.y+=d+a},v=g.textAlign(s),y,w,k,E,T,S,L;for(r.textAlign=s,r.textBaseline="middle",r.font=f.string,e.x=zE(this,v,n),r.fillStyle=n.bodyColor,dn(this.beforeBody,m),p=o&&v!=="right"?s==="center"?u/2+h:u+2+h:0,E=0,S=i.length;E0&&r.stroke()}_updateAnimationTarget(e){let r=this.chart,n=this.$animations,i=n&&n.x,a=n&&n.y;if(i||a){let s=Ex[e.position].call(this,this._active,this._eventPosition);if(!s)return;let o=this._size=hee(this,e),l=Object.assign({},s,this._size),u=fee(r,e,l),h=dee(e,l,u,r);(i._to!==h.x||a._to!==h.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){let r=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(r);let i={width:this.width,height:this.height},a={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let s=$a(r.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&o&&(e.save(),e.globalAlpha=n,this.drawBackground(a,e,i,r),ME(e,r.textDirection),a.y+=s.top,this.drawTitle(a,e,r),this.drawBody(a,e,r),this.drawFooter(a,e,r),DE(e,r.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,r){let n=this._active,i=e.map(({datasetIndex:o,index:l})=>{let u=this.chart.getDatasetMeta(o);if(!u)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:u.data[l],index:l}}),a=!I1(n,i),s=this._positionChanged(i,r);(a||s)&&(this._active=i,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let i=this.options,a=this._active||[],s=this._getActiveElements(e,a,r,n),o=this._positionChanged(s,e),l=r||!I1(s,a)||o;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,r))),l}_getActiveElements(e,r,n,i){let a=this.options;if(e.type==="mouseout")return[];if(!i)return r.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);let s=this.chart.getElementsAtEventForMode(e,a.mode,a,n);return a.reverse&&s.reverse(),s}_positionChanged(e,r){let{caretX:n,caretY:i,options:a}=this,s=Ex[a.position].call(this,e,r);return s!==!1&&(n!==s.x||i!==s.y)}},Sze={id:"tooltip",_element:KE,positioners:Ex,afterInit(t,e,r){r&&(t.tooltip=new KE({chart:t,options:r}))},beforeUpdate(t,e,r){t.tooltip&&t.tooltip.initialize(r)},reset(t,e,r){t.tooltip&&t.tooltip.initialize(r)},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let r={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",r)}},afterEvent(t,e){if(t.tooltip){let r=e.replay;t.tooltip.handleEvent(e.event,r,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:qee},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Cze=Object.freeze({__proto__:null,Colors:BBe,Decimation:UBe,Filler:lze,Legend:pze,SubTitle:vze,Title:mze,Tooltip:Sze}),_ze=(t,e,r,n)=>(typeof e=="string"?(r=t.push(e)-1,n.unshift({index:r,label:e})):isNaN(e)&&(r=null),r);function Aze(t,e,r,n){let i=t.indexOf(e);if(i===-1)return _ze(t,e,r,n);let a=t.lastIndexOf(e);return i!==a?r:i}var Lze=(t,e)=>t===null?null:ua(Math.round(t),0,e);function mee(t){let e=this.getLabels();return t>=0&&tr.length-1?null:this.getPixelForValue(r[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};function Mze(t,e){let r=[],{bounds:i,step:a,min:s,max:o,precision:l,count:u,maxTicks:h,maxDigits:f,includeBounds:d}=t,p=a||1,g=h-1,{min:m,max:v}=e,y=!Br(s),w=!Br(o),k=!Br(u),E=(v-m)/(f+1),T=cE((v-m)/g/p)*p,S,L,_,M;if(T<1e-14&&!y&&!w)return[{value:m},{value:v}];M=Math.ceil(v/T)-Math.floor(m/T),M>g&&(T=cE(M*T/g/p)*p),Br(l)||(S=Math.pow(10,l),T=Math.ceil(T*S)/S),i==="ticks"?(L=Math.floor(m/T)*T,_=Math.ceil(v/T)*T):(L=m,_=v),y&&w&&a&&EO((o-s)/a,T/1e3)?(M=Math.round(Math.min((o-s)/T,h)),T=(o-s)/M,L=s,_=o):k?(L=y?s:L,_=w?o:_,M=u-1,T=(_-L)/M):(M=(_-L)/T,R0(M,Math.round(M),T/1e3)?M=Math.round(M):M=Math.ceil(M));let I=Math.max(hE(T),hE(L));S=Math.pow(10,Br(l)?I:l),L=Math.round(L*S)/S,_=Math.round(_*S)/S;let O=0;for(y&&(d&&L!==s?(r.push({value:s}),Lo)break;r.push({value:C})}return w&&d&&_!==o?r.length&&R0(r[r.length-1].value,o,vee(o,E,t))?r[r.length-1].value=o:r.push({value:o}):(!w||_===o)&&r.push({value:_}),r}function vee(t,e,{horizontal:r,minRotation:n}){let i=sl(n),a=(r?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/a,s)}var $1=class extends $0{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,r){return Br(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:r,maxDefined:n}=this.getUserBounds(),{min:i,max:a}=this,s=l=>i=r?i:l,o=l=>a=n?a:l;if(e){let l=$l(i),u=$l(a);l<0&&u<0?o(0):l>0&&u>0&&s(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);o(a+l),e||s(i-l)}this.min=i,this.max=a}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:r,stepSize:n}=e,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),r=r||11),r&&(i=Math.min(r,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,r=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let i={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:r.precision,step:r.stepSize,count:r.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:r.minRotation||0,includeBounds:r.includeBounds!==!1},a=this._range||this,s=Mze(i,a);return e.bounds==="ticks"&&uE(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let e=this.ticks,r=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let i=(n-r)/Math.max(e.length-1,1)/2;r-=i,n+=i}this._startValue=r,this._endValue=n,this._valueRange=n-r}getLabelForValue(e){return N0(e,this.chart.options.locale,this.options.ticks.format)}},wR=class extends $1{static id="linear";static defaults={ticks:{callback:fx.formatters.numeric}};determineDataLimits(){let{min:e,max:r}=this.getMinMax(!0);this.min=pi(e)?e:0,this.max=pi(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),r=e?this.width:this.height,n=sl(this.options.ticks.minRotation),i=(e?Math.sin(n):Math.cos(n))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(r/Math.min(40,a.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},Ax=t=>Math.floor(zu(t)),z0=(t,e)=>Math.pow(10,Ax(t)+e);function yee(t){return t/Math.pow(10,Ax(t))===1}function bee(t,e,r){let n=Math.pow(10,r),i=Math.floor(t/n);return Math.ceil(e/n)-i}function Dze(t,e){let r=e-t,n=Ax(r);for(;bee(t,e,n)>10;)n++;for(;bee(t,e,n)<10;)n--;return Math.min(n,Ax(t))}function Oze(t,{min:e,max:r}){e=Gs(t.min,e);let n=[],i=Ax(e),a=Dze(e,r),s=a<0?Math.pow(10,Math.abs(a)):1,o=Math.pow(10,a),l=i>a?Math.pow(10,i):0,u=Math.round((e-l)*s)/s,h=Math.floor((e-l)/o/10)*o*10,f=Math.floor((u-h)/Math.pow(10,a)),d=Gs(t.min,Math.round((l+h+f*Math.pow(10,a))*s)/s);for(;d=10?f=f<15?15:20:f++,f>=20&&(a++,f=2,s=a>=0?1:s),d=Math.round((l+h+f*Math.pow(10,a))*s)/s;let p=Gs(t.max,d);return n.push({value:p,major:yee(p),significand:f}),n}var kR=class extends $0{static id="logarithmic";static defaults={ticks:{callback:fx.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,r){let n=$1.prototype.parse.apply(this,[e,r]);if(n===0){this._zero=!0;return}return pi(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:r}=this.getMinMax(!0);this.min=pi(e)?Math.max(0,e):null,this.max=pi(r)?Math.max(0,r):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!pi(this._userMin)&&(this.min=e===z0(this.min,0)?z0(this.min,-1):z0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:r}=this.getUserBounds(),n=this.min,i=this.max,a=o=>n=e?n:o,s=o=>i=r?i:o;n===i&&(n<=0?(a(1),s(10)):(a(z0(n,-1)),s(z0(i,1)))),n<=0&&a(z0(i,-1)),i<=0&&s(z0(n,1)),this.min=n,this.max=i}buildTicks(){let e=this.options,r={min:this._userMin,max:this._userMax},n=Oze(r,this);return e.bounds==="ticks"&&uE(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":N0(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=zu(e),this._valueRange=zu(this.max)-zu(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(zu(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let r=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+r*this._valueRange)}};function TR(t){let e=t.ticks;if(e.display&&t.display){let r=$a(e.backdropPadding);return gr(e.font&&e.font.size,Di.font.size)+r.height}return 0}function Rze(t,e,r){return r=Fn(r)?r:[r],{w:DO(t,e.string,r),h:r.length*e.lineHeight}}function xee(t,e,r,n,i){return t===n||t===i?{start:e-r/2,end:e+r/2}:ti?{start:e-r,end:e}:{start:e,end:e+r}}function Ize(t){let e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},r=Object.assign({},e),n=[],i=[],a=t._pointLabels.length,s=t.options.pointLabels,o=s.centerPointLabels?Bn/a:0;for(let l=0;le.r&&(o=(n.end-e.r)/a,t.r=Math.max(t.r,e.r+o)),i.starte.b&&(l=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function Pze(t,e,r){let n=t.drawingArea,{extra:i,additionalAngle:a,padding:s,size:o}=r,l=t.getPointPosition(e,n+i+s,a),u=Math.round(cx(Ws(l.angle+Mi))),h=Vze(l.y,o.h,u),f=zze(u),d=$ze(l.x,o.w,f);return{visible:!0,x:l.x,y:h,textAlign:f,left:d,top:h,right:d+o.w,bottom:h+o.h}}function Fze(t,e){if(!e)return!0;let{left:r,top:n,right:i,bottom:a}=t;return!($c({x:r,y:n},e)||$c({x:r,y:a},e)||$c({x:i,y:n},e)||$c({x:i,y:a},e))}function Bze(t,e,r){let n=[],i=t._pointLabels.length,a=t.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:TR(a)/2,additionalAngle:s?Bn/i:0},u;for(let h=0;h270||r<90)&&(t-=e),t}function Uze(t,e,r){let{left:n,top:i,right:a,bottom:s}=r,{backdropColor:o}=e;if(!Br(o)){let l=af(e.borderRadius),u=$a(e.backdropPadding);t.fillStyle=o;let h=n-u.left,f=i-u.top,d=a-n+u.width,p=s-i+u.height;Object.values(l).some(g=>g!==0)?(t.beginPath(),P0(t,{x:h,y:f,w:d,h:p,radius:l}),t.fill()):t.fillRect(h,f,d,p)}}function Hze(t,e){let{ctx:r,options:{pointLabels:n}}=t;for(let i=e-1;i>=0;i--){let a=t._pointLabelItems[i];if(!a.visible)continue;let s=n.setContext(t.getPointLabelContext(i));Uze(r,s,a);let o=Qi(s.font),{x:l,y:u,textAlign:h}=a;nf(r,t._pointLabels[i],l,u+o.lineHeight/2,o,{color:s.color,textAlign:h,textBaseline:"middle"})}}function Wee(t,e,r,n){let{ctx:i}=t;if(r)i.arc(t.xCenter,t.yCenter,e,0,zn);else{let a=t.getPointPosition(0,e);i.moveTo(a.x,a.y);for(let s=1;s{let i=Dn(this.options.pointLabels.callback,[r,n],this);return i||i===0?i:""}).filter((r,n)=>this.chart.getDataVisibility(n))}fit(){let e=this.options;e.display&&e.pointLabels.display?Ize(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,r,n,i){this.xCenter+=Math.floor((e-r)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,r,n,i))}getIndexAngle(e){let r=zn/(this._pointLabels.length||1),n=this.options.startAngle||0;return Ws(e*r+sl(n))}getDistanceFromCenterForValue(e){if(Br(e))return NaN;let r=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*r:(e-this.min)*r}getValueForDistanceFromCenter(e){if(Br(e))return NaN;let r=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-r:this.min+r}getPointLabelContext(e){let r=this._pointLabels||[];if(e>=0&&e{if(f!==0||f===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);let d=this.getContext(f),p=i.setContext(d),g=a.setContext(d);qze(this,p,l,s,g)}}),n.display){for(e.save(),o=s-1;o>=0;o--){let h=n.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:d}=h;!d||!f||(e.lineWidth=d,e.strokeStyle=f,e.setLineDash(h.borderDash),e.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(r.reverse?this.min:this.max),u=this.getPointPosition(o,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,r=this.options,n=r.ticks;if(!n.display)return;let i=this.getIndexAngle(0),a,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!r.reverse)return;let u=n.setContext(this.getContext(l)),h=Qi(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=h.string,s=e.measureText(o.label).width,e.fillStyle=u.backdropColor;let f=$a(u.backdropPadding);e.fillRect(-s/2-f.left,-a-h.size/2-f.top,s+f.width,h.size+f.height)}nf(e,o.label,0,-a,h,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}},ZE={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},wo=Object.keys(ZE);function wee(t,e){return t-e}function kee(t,e){if(Br(e))return null;let r=t._adapter,{parser:n,round:i,isoWeekday:a}=t._parseOpts,s=e;return typeof n=="function"&&(s=n(s)),pi(s)||(s=typeof n=="string"?r.parse(s,n):r.parse(s)),s===null?null:(i&&(s=i==="week"&&(Pd(a)||a===!0)?r.startOf(s,"isoWeek",a):r.startOf(s,i)),+s)}function Tee(t,e,r,n){let i=wo.length;for(let a=wo.indexOf(t);a=wo.indexOf(r);a--){let s=wo[a];if(ZE[s].common&&t._adapter.diff(i,n,s)>=e-1)return s}return wo[r?wo.indexOf(r):0]}function Yze(t){for(let e=wo.indexOf(t)+1,r=wo.length;e=e?r[n]:r[i];t[a]=!0}}function jze(t,e,r,n){let i=t._adapter,a=+i.startOf(e[0].value,n),s=e[e.length-1].value,o,l;for(o=a;o<=s;o=+i.add(o,1,n))l=r[o],l>=0&&(e[l].major=!0);return e}function See(t,e,r){let n=[],i={},a=e.length,s,o;for(s=0;s+e.value))}initOffsets(e=[]){let r=0,n=0,i,a;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?r=1-i:r=(this.getDecimalForValue(e[1])-i)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?n=a:n=(a-this.getDecimalForValue(e[e.length-2]))/2);let s=e.length<3?.5:.25;r=ua(r,0,s),n=ua(n,0,s),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){let e=this._adapter,r=this.min,n=this.max,i=this.options,a=i.time,s=a.unit||Tee(a.minUnit,r,n,this._getLabelCapacity(r)),o=gr(i.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,u=Pd(l)||l===!0,h={},f=r,d,p;if(u&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,u?"day":s),e.diff(n,r,s)>1e5*o)throw new Error(r+" and "+n+" are too far apart with stepSize of "+o+" "+s);let g=i.ticks.source==="data"&&this.getDataTimestamps();for(d=f,p=0;d+m)}getLabelForValue(e){let r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(e,n.tooltipFormat):r.format(e,n.displayFormats.datetime)}format(e,r){let i=this.options.time.displayFormats,a=this._unit,s=r||i[a];return this._adapter.format(e,s)}_tickFormatFunction(e,r,n,i){let a=this.options,s=a.ticks.callback;if(s)return Dn(s,[e,r,n],this);let o=a.time.displayFormats,l=this._unit,u=this._majorUnit,h=l&&o[l],f=u&&o[u],d=n[r],p=u&&f&&d&&d.major;return this._adapter.format(e,i||(p?f:h))}generateTickLabels(e){let r,n,i;for(r=0,n=e.length;r0?o:1}getDataTimestamps(){let e=this._cache.data||[],r,n;if(e.length)return e;let i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(r=0,n=i.length;r=t[n].pos&&e<=t[i].pos&&({lo:n,hi:i}=zc(t,"pos",e)),{pos:a,time:o}=t[n],{pos:s,time:l}=t[i]):(e>=t[n].time&&e<=t[i].time&&({lo:n,hi:i}=zc(t,"time",e)),{time:a,pos:o}=t[n],{time:s,pos:l}=t[i]);let u=s-a;return u?o+(l-o)*(e-a)/u:o}var SR=class extends Lx{static id="timeseries";static defaults=Lx.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),r=this._table=this.buildLookupTable(e);this._minPos=$E(r,this.min),this._tableRange=$E(r,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:r,max:n}=this,i=[],a=[],s,o,l,u,h;for(s=0,o=e.length;s=r&&u<=n&&i.push(u);if(i.length<2)return[{time:r,pos:0},{time:n,pos:1}];for(s=0,o=i.length;si-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let r=this.getDataTimestamps(),n=this.getLabelTimestamps();return r.length&&n.length?e=this.normalize(r.concat(n)):e=r.length?r:n,e=this._cache.all=e,e}getDecimalForValue(e){return($E(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return $E(this._table,n*this._tableRange+this._minPos,!0)}},Xze=Object.freeze({__proto__:null,CategoryScale:xR,LinearScale:wR,LogarithmicScale:kR,RadialLinearScale:ER,TimeScale:Lx,TimeSeriesScale:SR}),Gee=[lFe,OBe,Cze,Xze];V0.register(...Gee);b();var j1=Vi(Vre(),1),$x=Vi(tne(),1),nie=Vi(Zne(),1);b();var Gqe=!0,yI="Invariant failed";function bI(t,e){if(!t){if(Gqe)throw new Error(yI);var r=typeof e=="function"?e():e,n=r?"".concat(yI,": ").concat(r):yI;throw new Error(n)}}b();var xI={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var iie=/^#([\da-f]{3}|[\da-f]{6})([\da-f]{2})?/i,Yqe=/^[a-z]+-\d{2,3}(?![\w-]+)/i,jqe=`${iie.source}|${Yqe.source}`,Qne=/\/(?=(\b([1-9]|[1-9]\d|100)\b))/i,wI=t=>typeof t=="string"&&!/rgba?|hsla?|transparent/i.test(t),Xqe=t=>Array.isArray(t)&&t.every(e=>typeof e=="string"),Kqe=t=>iie.test(t),TI=t=>t in xI,Jne=t=>TI(t.split("/")[0])&&Qne.test(t)||new RegExp(`(?:${jqe})${Qne.source}`).test(t),Zqe=/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i,Qqe=/^#([\da-f])([\da-f])([\da-f])([\da-f])?$/i,aie=t=>{let e={};return Object.entries(t).forEach(([r,n])=>{if(typeof n=="string")e[r]=n;else{let i=aie(n);Object.entries(i).forEach(([a,s])=>{e[`${r}${a==="DEFAULT"?"":`-${a}`}`]=s})}}),e};function eie(t){if(t=t.trim(),t==="transparent")return{mode:"rgb",values:["0","0","0"],alpha:"0"};if(TI(t))return{mode:"rgb",values:xI[t].map(r=>r.toString())};let e=Zqe.exec(t.replace(Qqe,(r,n,i,a,s)=>["#",n,n,i,i,a,a,s?s+s:""].join("")));return bI(e,`Invalid value: ${t}`),{mode:"rgb",values:[Number.parseInt(e[1],16),Number.parseInt(e[2],16),Number.parseInt(e[3],16)].map(r=>r.toString()),alpha:e[4]?(Number.parseInt(e[4],16)/255).toString():void 0}}function tie({mode:t,values:e,alpha:r}){return`${t}(${e.join(" ")}${r?` / ${r}`:""})`}var kI=class{constructor(e){let r=Object.assign({},(0,nie.default)(e).theme.colors);bI(r,"TailwindCSS theme colors is undefined!"),this.colorPalette=aie(r),this.config=e}parse(e){var r,n;if(Array.isArray(e))return e.map(i=>this.parse(i));if(!wI(e))return e;if(Jne(e)){let[i,a]=e.split("/");return tie(Object.assign(Object.assign({},eie((r=this.colorPalette[i.trim()])!==null&&r!==void 0?r:i)),{alpha:Number.parseInt(a,10)/100}))}return(n=this.colorPalette[e.trim()])!==null&&n!==void 0?n:tie(eie(e))}isParsable(e,{strict:r=!1,hex:n,named:i}={}){return e?r?wI(e)&&Object.hasOwn(this.colorPalette,e):Xqe(e)?!0:wI(e)?n?Kqe(e):i?TI(e):Object.hasOwn(this.colorPalette,e)||Jne(e):!1:!1}},rie=["color","borderColor","backgroundColor","hoverBorderColor","hoverBackgroundColor","pointBorderColor","pointBackgroundColor","pointHoverBorderColor","pointHoverBackgroundColor","fill.above","fill.below"],sie=(t,e={})=>{let r=new kI(t);return{id:"tailwindcss-colors",beforeLayout:n=>{rie.forEach(i=>{var a;let s=(0,j1.default)(n.options,i),o=(a=e[i])!==null&&a!==void 0?a:s;r.isParsable(o)&&(0,$x.default)(n.options,i,r.parse(o)),n.config.data.datasets.forEach(l=>{let u=(0,j1.default)(l,i,o);r.isParsable(u)&&(0,$x.default)(l,i,r.parse(u))})})},beforeDatasetDraw:(n,i)=>{rie.forEach(a=>{var s;let o=(0,j1.default)(n.options,a),l=(s=e[a])!==null&&s!==void 0?s:o,u=i.meta.dataset;if(!u)return;let h=(0,j1.default)(u.options,a,l);r.isParsable(h)&&(0,$x.default)(u.options,a,r.parse(h)),n.data.datasets[i.index].data.forEach((d,p)=>{let g=i.meta.data[p],m=(0,j1.default)(g.options,a,l);r.isParsable(m)&&(0,$x.default)(g.options,a,r.parse(m))})})}}};var Tse=Vi(kse()),tv=class extends or{static values={type:String,data:Object,options:Object};connect(){this.chart=new V0(this.element,{type:this.typeValue,data:this.dataValue,plugins:[sie(Tse.default),...this.chartTypePlugins()],options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:{display:!1},...this.chartTypePluginOptions()},...this.optionsValue}})}disconnect(){this.chart.destroy()}chartTypePlugins(){return[]}chartTypePluginOptions(){return{}}};var qN={};Wt(qN,{default:()=>OS});b();b();b();b();function HN(t,e,r){for(var n=[],i=0;is.max||l=l});if(h!==-1){var f=u[h-1],d=u[h];if(f&&d)var p=(d.y-f.y)/(d.x-f.x),g=f.y+(l-f.x)*p;if(t.data.datasets[i].steppedLine&&f&&(g=f.y),!isNaN(g)){var m=o.getPixelForValue(g);if(!isNaN(m)){var v={hasValue:function(){return!0},tooltipPosition:function(){return this._model},_model:{x:e.x,y:m},skip:!1,stop:!1,x:l,y:g};n.push({datasetIndex:i,element:v,index:0})}}}}}}var y=Dx.modes.x(t,e,r);for(h=0;h0){t.crosshair.ignoreNextEvents-=1;return}var a=r.native.buttons===void 0?r.native.which:r.native.buttons;r.native.type==="mouseup"&&(a=0);var s=this.getOption(t,"sync","enabled"),o=this.getOption(t,"sync","group");if(!r.stop&&s){var e=new CustomEvent("sync-event");e.chartId=t.id,e.syncGroup=o,e.original=r,e.xValue=i.getValueForPixel(r.x),window.dispatchEvent(e)}var l=this.getOption(t,"sync","suppressTooltips");if(t.crosshair.suppressTooltips=r.stop&&l,t.crosshair.enabled=r.type!=="mouseout"&&r.x>i.getPixelForValue(i.min)&&r.xi.getPixelForValue(i.max)&&(t.crosshair.suppressUpdate=!0,t.update("none")),t.crosshair.dragStarted=!1,!1;t.crosshair.suppressUpdate=!1;var u=this.getOption(t,"zoom","enabled");if(a===1&&!t.crosshair.dragStarted&&u&&(t.crosshair.dragStartX=r.x,t.crosshair.dragStarted=!0),t.crosshair.dragStarted&&a===0){t.crosshair.dragStarted=!1;var h=i.getValueForPixel(t.crosshair.dragStartX),f=i.getValueForPixel(t.crosshair.x);Math.abs(t.crosshair.dragStartX-t.crosshair.x)>1&&this.doZoom(t,h,f),t.update("none")}t.crosshair.x=r.x,t.draw()}}},afterDraw:function(t){if(t.crosshair.enabled)return t.crosshair.dragStarted?this.drawZoombox(t):(this.drawTraceLine(t),this.interpolateValues(t),this.drawTracePoints(t)),!0},beforeTooltipDraw:function(t){return!t.crosshair.dragStarted&&!t.crosshair.suppressTooltips},resetZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(r){if(t.crosshair.originalData.length>0)for(var n=0;nr){var n=e;e=r,r=n}var i=gr(t.options.plugins.crosshair.callbacks?t.options.plugins.crosshair.callbacks.beforeZoom:void 0,UN.callbacks.beforeZoom);if(!i(e,r))return!1;if(t.crosshair.dragStarted=!1,t.options.scales.x.min&&t.crosshair.originalData.length===0&&(t.crosshair.originalXRange.min=t.options.scales.x.min),t.options.scales.x.max&&t.crosshair.originalData.length===0&&(t.crosshair.originalXRange.max=t.options.scales.x.max),!t.crosshair.button){var a=document.createElement("button"),s=this.getOption(t,"zoom","zoomButtonText"),o=this.getOption(t,"zoom","zoomButtonClass"),l=document.createTextNode(s);a.appendChild(l),a.className=o,a.addEventListener("click",function(){this.resetZoom(t)}.bind(this)),t.canvas.parentNode.appendChild(a),t.crosshair.button=a}t.options.scales.x.min=e,t.options.scales.x.max=r;var u=t.crosshair.originalData.length===0,h=t.config.options.scales.x.type!=="category";if(h)for(var f=0;f=e&&!g&&p>0&&(d.push(v[p-1]),g=!0),k>=e&&k<=r&&d.push(w),k>r&&!m&&p=a}),l=s[o-1],u=s[o];if(t.data.datasets[e].steppedLine&&l)r.interpolatedValue=l.y;else if(l&&u){var h=(u.y-l.y)/(u.x-l.x);r.interpolatedValue=l.y+(a-l.x)*h}else r.interpolatedValue=NaN}}}};var OS=class extends tv{connect(){Dx.modes.interpolate=HN,super.connect()}chartTypePlugins(){return[Ese,HN]}chartTypePluginOptions(){return{tooltip:{mode:"index",intersect:!1},crosshair:{line:{dashPattern:[5,5],color:"#9ca3af",width:1},snap:{enabled:!0},zoom:{enabled:!0,zoomboxBackgroundColor:"rgba(66,133,244,0.2)",zoomboxBorderColor:"#48F",zoomButtonClass:"hidden"}}}}};var WN={};Wt(WN,{default:()=>RS});b();var RS=class extends or{static targets=["source","message"];copy(){navigator.clipboard.writeText(this.sourceTarget.value),this.hasMessageTarget&&(this.messageTarget.classList.remove("hidden"),setTimeout(()=>{this.messageTarget.classList.add("hidden")},2e3))}};var GN={};Wt(GN,{default:()=>IS});b();var IS=class extends or{static targets=["element"];static classes=["from","to"];toggle(){this.elementTargets.forEach(e=>{e.classList.toggle(...this.toClasses),e.classList.toggle(...this.fromClasses)})}};var ZN={};Wt(ZN,{default:()=>US});b();b();b();var NS=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Wd={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return typeof console<"u"&&console.warn(t)},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var r=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-r.getTime())/864e5-3+(r.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};b();var PS={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},FS=PS;b();var Ss=function(t,e){return e===void 0&&(e=2),("000"+t).slice(e*-1)},To=function(t){return t===!0?1:0};function YN(t,e){var r;return function(){var n=this,i=arguments;clearTimeout(r),r=setTimeout(function(){return t.apply(n,i)},e)}}var BS=function(t){return t instanceof Array?t:[t]};b();function Cs(t,e,r){if(r===!0)return t.classList.add(e);t.classList.remove(e)}function tn(t,e,r){var n=window.document.createElement(t);return e=e||"",r=r||"",n.className=e,r!==void 0&&(n.textContent=r),n}function pw(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function jN(t,e){if(e(t))return t;if(t.parentNode)return jN(t.parentNode,e)}function gw(t,e){var r=tn("div","numInputWrapper"),n=tn("input","numInput "+t),i=tn("span","arrowUp"),a=tn("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?n.type="number":(n.type="text",n.pattern="\\d*"),e!==void 0)for(var s in e)n.setAttribute(s,e[s]);return r.appendChild(n),r.appendChild(i),r.appendChild(a),r}function Eo(t){try{if(typeof t.composedPath=="function"){var e=t.composedPath();return e[0]}return t.target}catch{return t.target}}b();b();var XN=function(){},mw=function(t,e,r){return r.months[e?"shorthand":"longhand"][t]},Sse={D:XN,F:function(t,e,r){t.setMonth(r.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,r){t.setHours(t.getHours()%12+12*To(new RegExp(r.amPM[1],"i").test(e)))},M:function(t,e,r){t.setMonth(r.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(parseFloat(e)*1e3)},W:function(t,e,r){var n=parseInt(e),i=new Date(t.getFullYear(),0,2+(n-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+r.firstDayOfWeek),i},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:XN,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:XN,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}},pf={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},rv={Z:function(t){return t.toISOString()},D:function(t,e,r){return e.weekdays.shorthand[rv.w(t,e,r)]},F:function(t,e,r){return mw(rv.n(t,e,r)-1,!1,e)},G:function(t,e,r){return Ss(rv.h(t,e,r))},H:function(t){return Ss(t.getHours())},J:function(t,e){return e.ordinal!==void 0?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[To(t.getHours()>11)]},M:function(t,e){return mw(t.getMonth(),!0,e)},S:function(t){return Ss(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,r){return r.getWeek(t)},Y:function(t){return Ss(t.getFullYear(),4)},d:function(t){return Ss(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Ss(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return Ss(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}};var KN=function(t){var e=t.config,r=e===void 0?Wd:e,n=t.l10n,i=n===void 0?PS:n,a=t.isMobile,s=a===void 0?!1:a;return function(o,l,u){var h=u||i;return r.formatDate!==void 0&&!s?r.formatDate(o,l,h):l.split("").map(function(f,d,p){return rv[f]&&p[d-1]!=="\\"?rv[f](o,h,r):f!=="\\"?f:""}).join("")}},zS=function(t){var e=t.config,r=e===void 0?Wd:e,n=t.l10n,i=n===void 0?PS:n;return function(a,s,o,l){if(!(a!==0&&!a)){var u=l||i,h,f=a;if(a instanceof Date)h=new Date(a.getTime());else if(typeof a!="string"&&a.toFixed!==void 0)h=new Date(a);else if(typeof a=="string"){var d=s||(r||Wd).dateFormat,p=String(a).trim();if(p==="today")h=new Date,o=!0;else if(r&&r.parseDate)h=r.parseDate(a,d);else if(/Z$/.test(p)||/GMT$/.test(p))h=new Date(a);else{for(var g=void 0,m=[],v=0,y=0,w="";vMath.min(e,r)&&t=0?new Date:new Date(r.config.minDate.getTime()),ke=VS(r.config);ae.setHours(ke.hours,ke.minutes,ke.seconds,ae.getMilliseconds()),r.selectedDates=[ae],r.latestSelectedDateObj=ae}ue!==void 0&&ue.type!=="blur"&&Tt(ue);var we=r._input.value;f(),nt(),r._input.value!==we&&r._debouncedChange()}function u(ue,ae){return ue%12+12*To(ae===r.l10n.amPM[1])}function h(ue){switch(ue%24){case 0:case 12:return 12;default:return ue%12}}function f(){if(!(r.hourElement===void 0||r.minuteElement===void 0)){var ue=(parseInt(r.hourElement.value.slice(-2),10)||0)%24,ae=(parseInt(r.minuteElement.value,10)||0)%60,ke=r.secondElement!==void 0?(parseInt(r.secondElement.value,10)||0)%60:0;r.amPM!==void 0&&(ue=u(ue,r.amPM.textContent));var we=r.config.minTime!==void 0||r.config.minDate&&r.minDateHasTime&&r.latestSelectedDateObj&&So(r.latestSelectedDateObj,r.config.minDate,!0)===0,Ne=r.config.maxTime!==void 0||r.config.maxDate&&r.maxDateHasTime&&r.latestSelectedDateObj&&So(r.latestSelectedDateObj,r.config.maxDate,!0)===0;if(r.config.maxTime!==void 0&&r.config.minTime!==void 0&&r.config.minTime>r.config.maxTime){var Ge=$S(r.config.minTime.getHours(),r.config.minTime.getMinutes(),r.config.minTime.getSeconds()),st=$S(r.config.maxTime.getHours(),r.config.maxTime.getMinutes(),r.config.maxTime.getSeconds()),ot=$S(ue,ae,ke);if(ot>st&&ot=12)]),r.secondElement!==void 0&&(r.secondElement.value=Ss(ke)))}function g(ue){var ae=Eo(ue),ke=parseInt(ae.value)+(ue.delta||0);(ke/1e3>1||ue.key==="Enter"&&!/[^\d]/.test(ke.toString()))&&ee(ke)}function m(ue,ae,ke,we){if(ae instanceof Array)return ae.forEach(function(Ne){return m(ue,Ne,ke,we)});if(ue instanceof Array)return ue.forEach(function(Ne){return m(Ne,ae,ke,we)});ue.addEventListener(ae,ke,we),r._handlers.push({remove:function(){return ue.removeEventListener(ae,ke,we)}})}function v(){xe("onChange")}function y(){if(r.config.wrap&&["open","close","toggle","clear"].forEach(function(ke){Array.prototype.forEach.call(r.element.querySelectorAll("[data-"+ke+"]"),function(we){return m(we,"click",r[ke])})}),r.isMobile){J();return}var ue=YN(de,50);if(r._debouncedChange=YN(v,wZe),r.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(r.daysContainer,"mouseover",function(ke){r.config.mode==="range"&&oe(Eo(ke))}),m(r._input,"keydown",te),r.calendarContainer!==void 0&&m(r.calendarContainer,"keydown",te),!r.config.inline&&!r.config.static&&m(window,"resize",ue),window.ontouchstart!==void 0?m(window.document,"touchstart",j):m(window.document,"mousedown",j),m(window.document,"focus",j,{capture:!0}),r.config.clickOpens===!0&&(m(r._input,"focus",r.open),m(r._input,"click",r.open)),r.daysContainer!==void 0&&(m(r.monthNav,"click",mt),m(r.monthNav,["keyup","increment"],g),m(r.daysContainer,"click",ze)),r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0){var ae=function(ke){return Eo(ke).select()};m(r.timeContainer,["increment"],l),m(r.timeContainer,"blur",l,{capture:!0}),m(r.timeContainer,"click",k),m([r.hourElement,r.minuteElement],["focus","click"],ae),r.secondElement!==void 0&&m(r.secondElement,"focus",function(){return r.secondElement&&r.secondElement.select()}),r.amPM!==void 0&&m(r.amPM,"click",function(ke){l(ke)})}r.config.allowInput&&m(r._input,"blur",Z)}function w(ue,ae){var ke=ue!==void 0?r.parseDate(ue):r.latestSelectedDateObj||(r.config.minDate&&r.config.minDate>r.now?r.config.minDate:r.config.maxDate&&r.config.maxDate1),r.calendarContainer.appendChild(ue);var Ne=r.config.appendTo!==void 0&&r.config.appendTo.nodeType!==void 0;if((r.config.inline||r.config.static)&&(r.calendarContainer.classList.add(r.config.inline?"inline":"static"),r.config.inline&&(!Ne&&r.element.parentNode?r.element.parentNode.insertBefore(r.calendarContainer,r._input.nextSibling):r.config.appendTo!==void 0&&r.config.appendTo.appendChild(r.calendarContainer)),r.config.static)){var Ge=tn("div","flatpickr-wrapper");r.element.parentNode&&r.element.parentNode.insertBefore(Ge,r.element),Ge.appendChild(r.element),r.altInput&&Ge.appendChild(r.altInput),Ge.appendChild(r.calendarContainer)}!r.config.static&&!r.config.inline&&(r.config.appendTo!==void 0?r.config.appendTo:window.document.body).appendChild(r.calendarContainer)}function S(ue,ae,ke,we){var Ne=Q(ae,!0),Ge=tn("span",ue,ae.getDate().toString());return Ge.dateObj=ae,Ge.$i=we,Ge.setAttribute("aria-label",r.formatDate(ae,r.config.ariaDateFormat)),ue.indexOf("hidden")===-1&&So(ae,r.now)===0&&(r.todayDateElem=Ge,Ge.classList.add("today"),Ge.setAttribute("aria-current","date")),Ne?(Ge.tabIndex=-1,Fe(ae)&&(Ge.classList.add("selected"),r.selectedDateElem=Ge,r.config.mode==="range"&&(Cs(Ge,"startRange",r.selectedDates[0]&&So(ae,r.selectedDates[0],!0)===0),Cs(Ge,"endRange",r.selectedDates[1]&&So(ae,r.selectedDates[1],!0)===0),ue==="nextMonthDay"&&Ge.classList.add("inRange")))):Ge.classList.add("flatpickr-disabled"),r.config.mode==="range"&&ye(ae)&&!Fe(ae)&&Ge.classList.add("inRange"),r.weekNumbers&&r.config.showMonths===1&&ue!=="prevMonthDay"&&we%7===6&&r.weekNumbers.insertAdjacentHTML("beforeend",""+r.config.getWeek(ae)+""),xe("onDayCreate",Ge),Ge}function L(ue){ue.focus(),r.config.mode==="range"&&oe(ue)}function _(ue){for(var ae=ue>0?0:r.config.showMonths-1,ke=ue>0?r.config.showMonths:-1,we=ae;we!=ke;we+=ue)for(var Ne=r.daysContainer.children[we],Ge=ue>0?0:Ne.children.length-1,st=ue>0?Ne.children.length:-1,ot=Ge;ot!=st;ot+=ue){var at=Ne.children[ot];if(at.className.indexOf("hidden")===-1&&Q(at.dateObj))return at}}function M(ue,ae){for(var ke=ue.className.indexOf("Month")===-1?ue.dateObj.getMonth():r.currentMonth,we=ae>0?r.config.showMonths:-1,Ne=ae>0?1:-1,Ge=ke-r.currentMonth;Ge!=we;Ge+=Ne)for(var st=r.daysContainer.children[Ge],ot=ke-r.currentMonth===Ge?ue.$i+ae:ae<0?st.children.length-1:0,at=st.children.length,Ue=ot;Ue>=0&&Ue0?at:-1);Ue+=Ne){var it=st.children[Ue];if(it.className.indexOf("hidden")===-1&&Q(it.dateObj)&&Math.abs(ue.$i-Ue)>=Math.abs(ae))return L(it)}r.changeMonth(Ne),I(_(Ne),0)}function I(ue,ae){var ke=a(),we=G(ke||document.body),Ne=ue!==void 0?ue:we?ke:r.selectedDateElem!==void 0&&G(r.selectedDateElem)?r.selectedDateElem:r.todayDateElem!==void 0&&G(r.todayDateElem)?r.todayDateElem:_(ae>0?1:-1);Ne===void 0?r._input.focus():we?M(Ne,ae):L(Ne)}function O(ue,ae){for(var ke=(new Date(ue,ae,1).getDay()-r.l10n.firstDayOfWeek+7)%7,we=r.utils.getDaysInMonth((ae-1+12)%12,ue),Ne=r.utils.getDaysInMonth(ae,ue),Ge=window.document.createDocumentFragment(),st=r.config.showMonths>1,ot=st?"prevMonthDay hidden":"prevMonthDay",at=st?"nextMonthDay hidden":"nextMonthDay",Ue=we+1-ke,it=0;Ue<=we;Ue++,it++)Ge.appendChild(S("flatpickr-day "+ot,new Date(ue,ae-1,Ue),Ue,it));for(Ue=1;Ue<=Ne;Ue++,it++)Ge.appendChild(S("flatpickr-day",new Date(ue,ae,Ue),Ue,it));for(var pt=Ne+1;pt<=42-ke&&(r.config.showMonths===1||it%7!==0);pt++,it++)Ge.appendChild(S("flatpickr-day "+at,new Date(ue,ae+1,pt%Ne),pt,it));var yt=tn("div","dayContainer");return yt.appendChild(Ge),yt}function C(){if(r.daysContainer!==void 0){pw(r.daysContainer),r.weekNumbers&&pw(r.weekNumbers);for(var ue=document.createDocumentFragment(),ae=0;ae1||r.config.monthSelectorType!=="dropdown")){var ue=function(we){return r.config.minDate!==void 0&&r.currentYear===r.config.minDate.getFullYear()&&wer.config.maxDate.getMonth())};r.monthsDropdownContainer.tabIndex=-1,r.monthsDropdownContainer.innerHTML="";for(var ae=0;ae<12;ae++)if(ue(ae)){var ke=tn("option","flatpickr-monthDropdown-month");ke.value=new Date(r.currentYear,ae).getMonth().toString(),ke.textContent=mw(ae,r.config.shorthandCurrentMonth,r.l10n),ke.tabIndex=-1,r.currentMonth===ae&&(ke.selected=!0),r.monthsDropdownContainer.appendChild(ke)}}}function D(){var ue=tn("div","flatpickr-month"),ae=window.document.createDocumentFragment(),ke;r.config.showMonths>1||r.config.monthSelectorType==="static"?ke=tn("span","cur-month"):(r.monthsDropdownContainer=tn("select","flatpickr-monthDropdown-months"),r.monthsDropdownContainer.setAttribute("aria-label",r.l10n.monthAriaLabel),m(r.monthsDropdownContainer,"change",function(st){var ot=Eo(st),at=parseInt(ot.value,10);r.changeMonth(at-r.currentMonth),xe("onMonthChange")}),R(),ke=r.monthsDropdownContainer);var we=gw("cur-year",{tabindex:"-1"}),Ne=we.getElementsByTagName("input")[0];Ne.setAttribute("aria-label",r.l10n.yearAriaLabel),r.config.minDate&&Ne.setAttribute("min",r.config.minDate.getFullYear().toString()),r.config.maxDate&&(Ne.setAttribute("max",r.config.maxDate.getFullYear().toString()),Ne.disabled=!!r.config.minDate&&r.config.minDate.getFullYear()===r.config.maxDate.getFullYear());var Ge=tn("div","flatpickr-current-month");return Ge.appendChild(ke),Ge.appendChild(we),ae.appendChild(Ge),ue.appendChild(ae),{container:ue,yearElement:Ne,monthElement:ke}}function P(){pw(r.monthNav),r.monthNav.appendChild(r.prevMonthNav),r.config.showMonths&&(r.yearElements=[],r.monthElements=[]);for(var ue=r.config.showMonths;ue--;){var ae=D();r.yearElements.push(ae.yearElement),r.monthElements.push(ae.monthElement),r.monthNav.appendChild(ae.container)}r.monthNav.appendChild(r.nextMonthNav)}function A(){return r.monthNav=tn("div","flatpickr-months"),r.yearElements=[],r.monthElements=[],r.prevMonthNav=tn("span","flatpickr-prev-month"),r.prevMonthNav.innerHTML=r.config.prevArrow,r.nextMonthNav=tn("span","flatpickr-next-month"),r.nextMonthNav.innerHTML=r.config.nextArrow,P(),Object.defineProperty(r,"_hidePrevMonthArrow",{get:function(){return r.__hidePrevMonthArrow},set:function(ue){r.__hidePrevMonthArrow!==ue&&(Cs(r.prevMonthNav,"flatpickr-disabled",ue),r.__hidePrevMonthArrow=ue)}}),Object.defineProperty(r,"_hideNextMonthArrow",{get:function(){return r.__hideNextMonthArrow},set:function(ue){r.__hideNextMonthArrow!==ue&&(Cs(r.nextMonthNav,"flatpickr-disabled",ue),r.__hideNextMonthArrow=ue)}}),r.currentYearElement=r.yearElements[0],qe(),r.monthNav}function N(){r.calendarContainer.classList.add("hasTime"),r.config.noCalendar&&r.calendarContainer.classList.add("noCalendar");var ue=VS(r.config);r.timeContainer=tn("div","flatpickr-time"),r.timeContainer.tabIndex=-1;var ae=tn("span","flatpickr-time-separator",":"),ke=gw("flatpickr-hour",{"aria-label":r.l10n.hourAriaLabel});r.hourElement=ke.getElementsByTagName("input")[0];var we=gw("flatpickr-minute",{"aria-label":r.l10n.minuteAriaLabel});if(r.minuteElement=we.getElementsByTagName("input")[0],r.hourElement.tabIndex=r.minuteElement.tabIndex=-1,r.hourElement.value=Ss(r.latestSelectedDateObj?r.latestSelectedDateObj.getHours():r.config.time_24hr?ue.hours:h(ue.hours)),r.minuteElement.value=Ss(r.latestSelectedDateObj?r.latestSelectedDateObj.getMinutes():ue.minutes),r.hourElement.setAttribute("step",r.config.hourIncrement.toString()),r.minuteElement.setAttribute("step",r.config.minuteIncrement.toString()),r.hourElement.setAttribute("min",r.config.time_24hr?"0":"1"),r.hourElement.setAttribute("max",r.config.time_24hr?"23":"12"),r.hourElement.setAttribute("maxlength","2"),r.minuteElement.setAttribute("min","0"),r.minuteElement.setAttribute("max","59"),r.minuteElement.setAttribute("maxlength","2"),r.timeContainer.appendChild(ke),r.timeContainer.appendChild(ae),r.timeContainer.appendChild(we),r.config.time_24hr&&r.timeContainer.classList.add("time24hr"),r.config.enableSeconds){r.timeContainer.classList.add("hasSeconds");var Ne=gw("flatpickr-second");r.secondElement=Ne.getElementsByTagName("input")[0],r.secondElement.value=Ss(r.latestSelectedDateObj?r.latestSelectedDateObj.getSeconds():ue.seconds),r.secondElement.setAttribute("step",r.minuteElement.getAttribute("step")),r.secondElement.setAttribute("min","0"),r.secondElement.setAttribute("max","59"),r.secondElement.setAttribute("maxlength","2"),r.timeContainer.appendChild(tn("span","flatpickr-time-separator",":")),r.timeContainer.appendChild(Ne)}return r.config.time_24hr||(r.amPM=tn("span","flatpickr-am-pm",r.l10n.amPM[To((r.latestSelectedDateObj?r.hourElement.value:r.config.defaultHour)>11)]),r.amPM.title=r.l10n.toggleTitle,r.amPM.tabIndex=-1,r.timeContainer.appendChild(r.amPM)),r.timeContainer}function F(){r.weekdayContainer?pw(r.weekdayContainer):r.weekdayContainer=tn("div","flatpickr-weekdays");for(var ue=r.config.showMonths;ue--;){var ae=tn("div","flatpickr-weekdaycontainer");r.weekdayContainer.appendChild(ae)}return B(),r.weekdayContainer}function B(){if(r.weekdayContainer){var ue=r.l10n.firstDayOfWeek,ae=Lse(r.l10n.weekdays.shorthand);ue>0&&ue `+ae.join("")+` `}}function V(){r.calendarContainer.classList.add("hasWeeks");var ue=tn("div","flatpickr-weekwrapper");ue.appendChild(tn("span","flatpickr-weekday",r.l10n.weekAbbreviation));var ae=tn("div","flatpickr-weeks");return ue.appendChild(ae),{weekWrapper:ue,weekNumbers:ae}}function z(ue,ae){ae===void 0&&(ae=!0);var ke=ae?ue:ue-r.currentMonth;ke<0&&r._hidePrevMonthArrow===!0||ke>0&&r._hideNextMonthArrow===!0||(r.currentMonth+=ke,(r.currentMonth<0||r.currentMonth>11)&&(r.currentYear+=r.currentMonth>11?1:-1,r.currentMonth=(r.currentMonth+12)%12,xe("onYearChange"),R()),C(),xe("onMonthChange"),qe())}function H(ue,ae){if(ue===void 0&&(ue=!0),ae===void 0&&(ae=!0),r.input.value="",r.altInput!==void 0&&(r.altInput.value=""),r.mobileInput!==void 0&&(r.mobileInput.value=""),r.selectedDates=[],r.latestSelectedDateObj=void 0,ae===!0&&(r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth()),r.config.enableTime===!0){var ke=VS(r.config),we=ke.hours,Ne=ke.minutes,Ge=ke.seconds;p(we,Ne,Ge)}r.redraw(),ue&&xe("onChange")}function K(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),xe("onClose")}function X(){r.config!==void 0&&xe("onDestroy");for(var ue=r._handlers.length;ue--;)r._handlers[ue].remove();if(r._handlers=[],r.mobileInput)r.mobileInput.parentNode&&r.mobileInput.parentNode.removeChild(r.mobileInput),r.mobileInput=void 0;else if(r.calendarContainer&&r.calendarContainer.parentNode)if(r.config.static&&r.calendarContainer.parentNode){var ae=r.calendarContainer.parentNode;if(ae.lastChild&&ae.removeChild(ae.lastChild),ae.parentNode){for(;ae.firstChild;)ae.parentNode.insertBefore(ae.firstChild,ae);ae.parentNode.removeChild(ae)}}else r.calendarContainer.parentNode.removeChild(r.calendarContainer);r.altInput&&(r.input.type="text",r.altInput.parentNode&&r.altInput.parentNode.removeChild(r.altInput),delete r.altInput),r.input&&(r.input.type=r.input._type,r.input.classList.remove("flatpickr-input"),r.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ke){try{delete r[ke]}catch{}})}function ne(ue){return r.calendarContainer.contains(ue)}function j(ue){if(r.isOpen&&!r.config.inline){var ae=Eo(ue),ke=ne(ae),we=ae===r.input||ae===r.altInput||r.element.contains(ae)||ue.path&&ue.path.indexOf&&(~ue.path.indexOf(r.input)||~ue.path.indexOf(r.altInput)),Ne=!we&&!ke&&!ne(ue.relatedTarget),Ge=!r.config.ignoredFocusElements.some(function(st){return st.contains(ae)});Ne&&Ge&&(r.config.allowInput&&r.setDate(r._input.value,!1,r.config.altInput?r.config.altFormat:r.config.dateFormat),r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0&&r.input.value!==""&&r.input.value!==void 0&&l(),r.close(),r.config&&r.config.mode==="range"&&r.selectedDates.length===1&&r.clear(!1))}}function ee(ue){if(!(!ue||r.config.minDate&&uer.config.maxDate.getFullYear())){var ae=ue,ke=r.currentYear!==ae;r.currentYear=ae||r.currentYear,r.config.maxDate&&r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth=Math.min(r.config.maxDate.getMonth(),r.currentMonth):r.config.minDate&&r.currentYear===r.config.minDate.getFullYear()&&(r.currentMonth=Math.max(r.config.minDate.getMonth(),r.currentMonth)),ke&&(r.redraw(),xe("onYearChange"),R())}}function Q(ue,ae){var ke;ae===void 0&&(ae=!0);var we=r.parseDate(ue,void 0,ae);if(r.config.minDate&&we&&So(we,r.config.minDate,ae!==void 0?ae:!r.minDateHasTime)<0||r.config.maxDate&&we&&So(we,r.config.maxDate,ae!==void 0?ae:!r.maxDateHasTime)>0)return!1;if(!r.config.enable&&r.config.disable.length===0)return!0;if(we===void 0)return!1;for(var Ne=!!r.config.enable,Ge=(ke=r.config.enable)!==null&&ke!==void 0?ke:r.config.disable,st=0,ot=void 0;st=ot.from.getTime()&&we.getTime()<=ot.to.getTime())return Ne}return!Ne}function G(ue){return r.daysContainer!==void 0?ue.className.indexOf("hidden")===-1&&ue.className.indexOf("flatpickr-disabled")===-1&&r.daysContainer.contains(ue):!1}function Z(ue){var ae=ue.target===r._input,ke=r._input.value.trimEnd()!==Re();ae&&ke&&!(ue.relatedTarget&&ne(ue.relatedTarget))&&r.setDate(r._input.value,!0,ue.target===r.altInput?r.config.altFormat:r.config.dateFormat)}function te(ue){var ae=Eo(ue),ke=r.config.wrap?t.contains(ae):ae===r._input,we=r.config.allowInput,Ne=r.isOpen&&(!we||!ke),Ge=r.config.inline&&ke&&!we;if(ue.keyCode===13&&ke){if(we)return r.setDate(r._input.value,!0,ae===r.altInput?r.config.altFormat:r.config.dateFormat),r.close(),ae.blur();r.open()}else if(ne(ae)||Ne||Ge){var st=!!r.timeContainer&&r.timeContainer.contains(ae);switch(ue.keyCode){case 13:st?(ue.preventDefault(),l(),et()):ze(ue);break;case 27:ue.preventDefault(),et();break;case 8:case 46:ke&&!r.config.allowInput&&(ue.preventDefault(),r.clear());break;case 37:case 39:if(!st&&!ke){ue.preventDefault();var ot=a();if(r.daysContainer!==void 0&&(we===!1||ot&&G(ot))){var at=ue.keyCode===39?1:-1;ue.ctrlKey?(ue.stopPropagation(),z(at),I(_(1),0)):I(void 0,at)}}else r.hourElement&&r.hourElement.focus();break;case 38:case 40:ue.preventDefault();var Ue=ue.keyCode===40?1:-1;r.daysContainer&&ae.$i!==void 0||ae===r.input||ae===r.altInput?ue.ctrlKey?(ue.stopPropagation(),ee(r.currentYear-Ue),I(_(1),0)):st||I(void 0,Ue*7):ae===r.currentYearElement?ee(r.currentYear-Ue):r.config.enableTime&&(!st&&r.hourElement&&r.hourElement.focus(),l(ue),r._debouncedChange());break;case 9:if(st){var it=[r.hourElement,r.minuteElement,r.secondElement,r.amPM].concat(r.pluginElements).filter(function(Et){return Et}),pt=it.indexOf(ae);if(pt!==-1){var yt=it[pt+(ue.shiftKey?-1:1)];ue.preventDefault(),(yt||r._input).focus()}}else!r.config.noCalendar&&r.daysContainer&&r.daysContainer.contains(ae)&&ue.shiftKey&&(ue.preventDefault(),r._input.focus());break;default:break}}if(r.amPM!==void 0&&ae===r.amPM)switch(ue.key){case r.l10n.amPM[0].charAt(0):case r.l10n.amPM[0].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[0],f(),nt();break;case r.l10n.amPM[1].charAt(0):case r.l10n.amPM[1].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[1],f(),nt();break}(ke||ne(ae))&&xe("onKeyDown",ue)}function oe(ue,ae){if(ae===void 0&&(ae="flatpickr-day"),!(r.selectedDates.length!==1||ue&&(!ue.classList.contains(ae)||ue.classList.contains("flatpickr-disabled")))){for(var ke=ue?ue.dateObj.getTime():r.days.firstElementChild.dateObj.getTime(),we=r.parseDate(r.selectedDates[0],void 0,!0).getTime(),Ne=Math.min(ke,r.selectedDates[0].getTime()),Ge=Math.max(ke,r.selectedDates[0].getTime()),st=!1,ot=0,at=0,Ue=Ne;UeNe&&Ueot)?ot=Ue:Ue>we&&(!at||Ue ."+ae));it.forEach(function(pt){var yt=pt.dateObj,Et=yt.getTime(),hn=ot>0&&Et0&&Et>at;if(hn){pt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(qt){pt.classList.remove(qt)});return}else if(st&&!hn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(qt){pt.classList.remove(qt)}),ue!==void 0&&(ue.classList.add(ke<=r.selectedDates[0].getTime()?"startRange":"endRange"),weke&&Et===we&&pt.classList.add("endRange"),Et>=ot&&(at===0||Et<=at)&&Cse(Et,we,ke)&&pt.classList.add("inRange"))})}}function de(){r.isOpen&&!r.config.static&&!r.config.inline&&Ye()}function pe(ue,ae){if(ae===void 0&&(ae=r._positionElement),r.isMobile===!0){if(ue){ue.preventDefault();var ke=Eo(ue);ke&&ke.blur()}r.mobileInput!==void 0&&(r.mobileInput.focus(),r.mobileInput.click()),xe("onOpen");return}else if(r._input.disabled||r.config.inline)return;var we=r.isOpen;r.isOpen=!0,we||(r.calendarContainer.classList.add("open"),r._input.classList.add("active"),xe("onOpen"),Ye(ae)),r.config.enableTime===!0&&r.config.noCalendar===!0&&r.config.allowInput===!1&&(ue===void 0||!r.timeContainer.contains(ue.relatedTarget))&&setTimeout(function(){return r.hourElement.select()},50)}function re(ue){return function(ae){var ke=r.config["_"+ue+"Date"]=r.parseDate(ae,r.config.dateFormat),we=r.config["_"+(ue==="min"?"max":"min")+"Date"];ke!==void 0&&(r[ue==="min"?"minDateHasTime":"maxDateHasTime"]=ke.getHours()>0||ke.getMinutes()>0||ke.getSeconds()>0),r.selectedDates&&(r.selectedDates=r.selectedDates.filter(function(Ne){return Q(Ne)}),!r.selectedDates.length&&ue==="min"&&d(ke),nt()),r.daysContainer&&(Qe(),ke!==void 0?r.currentYearElement[ue]=ke.getFullYear().toString():r.currentYearElement.removeAttribute(ue),r.currentYearElement.disabled=!!we&&ke!==void 0&&we.getFullYear()===ke.getFullYear())}}function Be(){var ue=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],ae=_s(_s({},JSON.parse(JSON.stringify(t.dataset||{}))),e),ke={};r.config.parseDate=ae.parseDate,r.config.formatDate=ae.formatDate,Object.defineProperty(r.config,"enable",{get:function(){return r.config._enable},set:function(it){r.config._enable=ce(it)}}),Object.defineProperty(r.config,"disable",{get:function(){return r.config._disable},set:function(it){r.config._disable=ce(it)}});var we=ae.mode==="time";if(!ae.dateFormat&&(ae.enableTime||we)){var Ne=ha.defaultConfig.dateFormat||Wd.dateFormat;ke.dateFormat=ae.noCalendar||we?"H:i"+(ae.enableSeconds?":S":""):Ne+" H:i"+(ae.enableSeconds?":S":"")}if(ae.altInput&&(ae.enableTime||we)&&!ae.altFormat){var Ge=ha.defaultConfig.altFormat||Wd.altFormat;ke.altFormat=ae.noCalendar||we?"h:i"+(ae.enableSeconds?":S K":" K"):Ge+(" h:i"+(ae.enableSeconds?":S":"")+" K")}Object.defineProperty(r.config,"minDate",{get:function(){return r.config._minDate},set:re("min")}),Object.defineProperty(r.config,"maxDate",{get:function(){return r.config._maxDate},set:re("max")});var st=function(it){return function(pt){r.config[it==="min"?"_minTime":"_maxTime"]=r.parseDate(pt,"H:i:S")}};Object.defineProperty(r.config,"minTime",{get:function(){return r.config._minTime},set:st("min")}),Object.defineProperty(r.config,"maxTime",{get:function(){return r.config._maxTime},set:st("max")}),ae.mode==="time"&&(r.config.noCalendar=!0,r.config.enableTime=!0),Object.assign(r.config,ke,ae);for(var ot=0;ot-1?r.config[Ue]=BS(at[Ue]).map(s).concat(r.config[Ue]):typeof ae[Ue]>"u"&&(r.config[Ue]=at[Ue])}ae.altInputClass||(r.config.altInputClass=le().className+" "+r.config.altInputClass),xe("onParseConfig")}function le(){return r.config.wrap?t.querySelector("[data-input]"):t}function Se(){typeof r.config.locale!="object"&&typeof ha.l10ns[r.config.locale]>"u"&&r.config.errorHandler(new Error("flatpickr: invalid locale "+r.config.locale)),r.l10n=_s(_s({},ha.l10ns.default),typeof r.config.locale=="object"?r.config.locale:r.config.locale!=="default"?ha.l10ns[r.config.locale]:void 0),pf.D="("+r.l10n.weekdays.shorthand.join("|")+")",pf.l="("+r.l10n.weekdays.longhand.join("|")+")",pf.M="("+r.l10n.months.shorthand.join("|")+")",pf.F="("+r.l10n.months.longhand.join("|")+")",pf.K="("+r.l10n.amPM[0]+"|"+r.l10n.amPM[1]+"|"+r.l10n.amPM[0].toLowerCase()+"|"+r.l10n.amPM[1].toLowerCase()+")";var ue=_s(_s({},e),JSON.parse(JSON.stringify(t.dataset||{})));ue.time_24hr===void 0&&ha.defaultConfig.time_24hr===void 0&&(r.config.time_24hr=r.l10n.time_24hr),r.formatDate=KN(r),r.parseDate=zS({config:r.config,l10n:r.l10n})}function Ye(ue){if(typeof r.config.position=="function")return void r.config.position(r,ue);if(r.calendarContainer!==void 0){xe("onPreCalendarPosition");var ae=ue||r._positionElement,ke=Array.prototype.reduce.call(r.calendarContainer.children,function(Mt,xr){return Mt+xr.offsetHeight},0),we=r.calendarContainer.offsetWidth,Ne=r.config.position.split(" "),Ge=Ne[0],st=Ne.length>1?Ne[1]:null,ot=ae.getBoundingClientRect(),at=window.innerHeight-ot.bottom,Ue=Ge==="above"||Ge!=="below"&&atke,it=window.pageYOffset+ot.top+(Ue?-ke-2:ae.offsetHeight+2);if(Cs(r.calendarContainer,"arrowTop",!Ue),Cs(r.calendarContainer,"arrowBottom",Ue),!r.config.inline){var pt=window.pageXOffset+ot.left,yt=!1,Et=!1;st==="center"?(pt-=(we-ot.width)/2,yt=!0):st==="right"&&(pt-=we-ot.width,Et=!0),Cs(r.calendarContainer,"arrowLeft",!yt&&!Et),Cs(r.calendarContainer,"arrowCenter",yt),Cs(r.calendarContainer,"arrowRight",Et);var hn=window.document.body.offsetWidth-(window.pageXOffset+ot.right),qt=pt+we>window.document.body.offsetWidth,fn=hn+we>window.document.body.offsetWidth;if(Cs(r.calendarContainer,"rightMost",qt),!r.config.static)if(r.calendarContainer.style.top=it+"px",!qt)r.calendarContainer.style.left=pt+"px",r.calendarContainer.style.right="auto";else if(!fn)r.calendarContainer.style.left="auto",r.calendarContainer.style.right=hn+"px";else{var xn=We();if(xn===void 0)return;var qr=window.document.body.offsetWidth,hi=Math.max(0,qr/2-we/2),Nn=".flatpickr-calendar.centerMost:before",_t=".flatpickr-calendar.centerMost:after",Me=xn.cssRules.length,dt="{left:"+ot.left+"px;right:auto;}";Cs(r.calendarContainer,"rightMost",!1),Cs(r.calendarContainer,"centerMost",!0),xn.insertRule(Nn+","+_t+dt,Me),r.calendarContainer.style.left=hi+"px",r.calendarContainer.style.right="auto"}}}}function We(){for(var ue=null,ae=0;aer.currentMonth+r.config.showMonths-1)&&r.config.mode!=="range";if(r.selectedDateElem=we,r.config.mode==="single")r.selectedDates=[Ne];else if(r.config.mode==="multiple"){var st=Fe(Ne);st?r.selectedDates.splice(parseInt(st),1):r.selectedDates.push(Ne)}else r.config.mode==="range"&&(r.selectedDates.length===2&&r.clear(!1,!1),r.latestSelectedDateObj=Ne,r.selectedDates.push(Ne),So(Ne,r.selectedDates[0],!0)!==0&&r.selectedDates.sort(function(it,pt){return it.getTime()-pt.getTime()}));if(f(),Ge){var ot=r.currentYear!==Ne.getFullYear();r.currentYear=Ne.getFullYear(),r.currentMonth=Ne.getMonth(),ot&&(xe("onYearChange"),R()),xe("onMonthChange")}if(qe(),C(),nt(),!Ge&&r.config.mode!=="range"&&r.config.showMonths===1?L(we):r.selectedDateElem!==void 0&&r.hourElement===void 0&&r.selectedDateElem&&r.selectedDateElem.focus(),r.hourElement!==void 0&&r.hourElement!==void 0&&r.hourElement.focus(),r.config.closeOnSelect){var at=r.config.mode==="single"&&!r.config.enableTime,Ue=r.config.mode==="range"&&r.selectedDates.length===2&&!r.config.enableTime;(at||Ue)&&et()}v()}}var He={locale:[Se,B],showMonths:[P,o,F],minDate:[w],maxDate:[w],positionElement:[Le],clickOpens:[function(){r.config.clickOpens===!0?(m(r._input,"focus",r.open),m(r._input,"click",r.open)):(r._input.removeEventListener("focus",r.open),r._input.removeEventListener("click",r.open))}]};function Ee(ue,ae){if(ue!==null&&typeof ue=="object"){Object.assign(r.config,ue);for(var ke in ue)He[ke]!==void 0&&He[ke].forEach(function(we){return we()})}else r.config[ue]=ae,He[ue]!==void 0?He[ue].forEach(function(we){return we()}):NS.indexOf(ue)>-1&&(r.config[ue]=BS(ae));r.redraw(),nt(!0)}function Y(ue,ae){var ke=[];if(ue instanceof Array)ke=ue.map(function(we){return r.parseDate(we,ae)});else if(ue instanceof Date||typeof ue=="number")ke=[r.parseDate(ue,ae)];else if(typeof ue=="string")switch(r.config.mode){case"single":case"time":ke=[r.parseDate(ue,ae)];break;case"multiple":ke=ue.split(r.config.conjunction).map(function(we){return r.parseDate(we,ae)});break;case"range":ke=ue.split(r.l10n.rangeSeparator).map(function(we){return r.parseDate(we,ae)});break;default:break}else r.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(ue)));r.selectedDates=r.config.allowInvalidPreload?ke:ke.filter(function(we){return we instanceof Date&&Q(we,!1)}),r.config.mode==="range"&&r.selectedDates.sort(function(we,Ne){return we.getTime()-Ne.getTime()})}function ve(ue,ae,ke){if(ae===void 0&&(ae=!1),ke===void 0&&(ke=r.config.dateFormat),ue!==0&&!ue||ue instanceof Array&&ue.length===0)return r.clear(ae);Y(ue,ke),r.latestSelectedDateObj=r.selectedDates[r.selectedDates.length-1],r.redraw(),w(void 0,ae),d(),r.selectedDates.length===0&&r.clear(!1),nt(ae),ae&&xe("onChange")}function ce(ue){return ue.slice().map(function(ae){return typeof ae=="string"||typeof ae=="number"||ae instanceof Date?r.parseDate(ae,void 0,!0):ae&&typeof ae=="object"&&ae.from&&ae.to?{from:r.parseDate(ae.from,void 0),to:r.parseDate(ae.to,void 0)}:ae}).filter(function(ae){return ae})}function me(){r.selectedDates=[],r.now=r.parseDate(r.config.now)||new Date;var ue=r.config.defaultDate||((r.input.nodeName==="INPUT"||r.input.nodeName==="TEXTAREA")&&r.input.placeholder&&r.input.value===r.input.placeholder?null:r.input.value);ue&&Y(ue,r.config.dateFormat),r._initialDate=r.selectedDates.length>0?r.selectedDates[0]:r.config.minDate&&r.config.minDate.getTime()>r.now.getTime()?r.config.minDate:r.config.maxDate&&r.config.maxDate.getTime()0&&(r.latestSelectedDateObj=r.selectedDates[0]),r.config.minTime!==void 0&&(r.config.minTime=r.parseDate(r.config.minTime,"H:i")),r.config.maxTime!==void 0&&(r.config.maxTime=r.parseDate(r.config.maxTime,"H:i")),r.minDateHasTime=!!r.config.minDate&&(r.config.minDate.getHours()>0||r.config.minDate.getMinutes()>0||r.config.minDate.getSeconds()>0),r.maxDateHasTime=!!r.config.maxDate&&(r.config.maxDate.getHours()>0||r.config.maxDate.getMinutes()>0||r.config.maxDate.getSeconds()>0)}function q(){if(r.input=le(),!r.input){r.config.errorHandler(new Error("Invalid input element specified"));return}r.input._type=r.input.type,r.input.type="text",r.input.classList.add("flatpickr-input"),r._input=r.input,r.config.altInput&&(r.altInput=tn(r.input.nodeName,r.config.altInputClass),r._input=r.altInput,r.altInput.placeholder=r.input.placeholder,r.altInput.disabled=r.input.disabled,r.altInput.required=r.input.required,r.altInput.tabIndex=r.input.tabIndex,r.altInput.type="text",r.input.setAttribute("type","hidden"),!r.config.static&&r.input.parentNode&&r.input.parentNode.insertBefore(r.altInput,r.input.nextSibling)),r.config.allowInput||r._input.setAttribute("readonly","readonly"),Le()}function Le(){r._positionElement=r.config.positionElement||r._input}function J(){var ue=r.config.enableTime?r.config.noCalendar?"time":"datetime-local":"date";r.mobileInput=tn("input",r.input.className+" flatpickr-mobile"),r.mobileInput.tabIndex=1,r.mobileInput.type=ue,r.mobileInput.disabled=r.input.disabled,r.mobileInput.required=r.input.required,r.mobileInput.placeholder=r.input.placeholder,r.mobileFormatStr=ue==="datetime-local"?"Y-m-d\\TH:i:S":ue==="date"?"Y-m-d":"H:i:S",r.selectedDates.length>0&&(r.mobileInput.defaultValue=r.mobileInput.value=r.formatDate(r.selectedDates[0],r.mobileFormatStr)),r.config.minDate&&(r.mobileInput.min=r.formatDate(r.config.minDate,"Y-m-d")),r.config.maxDate&&(r.mobileInput.max=r.formatDate(r.config.maxDate,"Y-m-d")),r.input.getAttribute("step")&&(r.mobileInput.step=String(r.input.getAttribute("step"))),r.input.type="hidden",r.altInput!==void 0&&(r.altInput.type="hidden");try{r.input.parentNode&&r.input.parentNode.insertBefore(r.mobileInput,r.input.nextSibling)}catch{}m(r.mobileInput,"change",function(ae){r.setDate(Eo(ae).value,!1,r.mobileFormatStr),xe("onChange"),xe("onClose")})}function fe(ue){if(r.isOpen===!0)return r.close();r.open(ue)}function xe(ue,ae){if(r.config!==void 0){var ke=r.config[ue];if(ke!==void 0&&ke.length>0)for(var we=0;ke[we]&&we=0&&So(ue,r.selectedDates[1])<=0}function qe(){r.config.noCalendar||r.isMobile||!r.monthNav||(r.yearElements.forEach(function(ue,ae){var ke=new Date(r.currentYear,r.currentMonth,1);ke.setMonth(r.currentMonth+ae),r.config.showMonths>1||r.config.monthSelectorType==="static"?r.monthElements[ae].textContent=mw(ke.getMonth(),r.config.shorthandCurrentMonth,r.l10n)+" ":r.monthsDropdownContainer.value=ke.getMonth().toString(),ue.value=ke.getFullYear().toString()}),r._hidePrevMonthArrow=r.config.minDate!==void 0&&(r.currentYear===r.config.minDate.getFullYear()?r.currentMonth<=r.config.minDate.getMonth():r.currentYearr.config.maxDate.getMonth():r.currentYear>r.config.maxDate.getFullYear()))}function Re(ue){var ae=ue||(r.config.altInput?r.config.altFormat:r.config.dateFormat);return r.selectedDates.map(function(ke){return r.formatDate(ke,ae)}).filter(function(ke,we,Ne){return r.config.mode!=="range"||r.config.enableTime||Ne.indexOf(ke)===we}).join(r.config.mode!=="range"?r.config.conjunction:r.l10n.rangeSeparator)}function nt(ue){ue===void 0&&(ue=!0),r.mobileInput!==void 0&&r.mobileFormatStr&&(r.mobileInput.value=r.latestSelectedDateObj!==void 0?r.formatDate(r.latestSelectedDateObj,r.mobileFormatStr):""),r.input.value=Re(r.config.dateFormat),r.altInput!==void 0&&(r.altInput.value=Re(r.config.altFormat)),ue!==!1&&xe("onValueUpdate")}function mt(ue){var ae=Eo(ue),ke=r.prevMonthNav.contains(ae),we=r.nextMonthNav.contains(ae);ke||we?z(ke?-1:1):r.yearElements.indexOf(ae)>=0?ae.select():ae.classList.contains("arrowUp")?r.changeYear(r.currentYear+1):ae.classList.contains("arrowDown")&&r.changeYear(r.currentYear-1)}function Tt(ue){ue.preventDefault();var ae=ue.type==="keydown",ke=Eo(ue),we=ke;r.amPM!==void 0&&ke===r.amPM&&(r.amPM.textContent=r.l10n.amPM[To(r.amPM.textContent===r.l10n.amPM[0])]);var Ne=parseFloat(we.getAttribute("min")),Ge=parseFloat(we.getAttribute("max")),st=parseFloat(we.getAttribute("step")),ot=parseInt(we.value,10),at=ue.delta||(ae?ue.which===38?1:-1:0),Ue=ot+st*at;if(typeof we.value<"u"&&we.value.length===2){var it=we===r.hourElement,pt=we===r.minuteElement;UeGe&&(Ue=we===r.hourElement?Ue-Ge-To(!r.amPM):Ne,pt&&E(void 0,1,r.hourElement)),r.amPM&&it&&(st===1?Ue+ot===23:Math.abs(Ue-ot)>st)&&(r.amPM.textContent=r.l10n.amPM[To(r.amPM.textContent===r.l10n.amPM[0])]),we.value=Ss(Ue)}}return i(),r}function nv(t,e){for(var r=Array.prototype.slice.call(t).filter(function(s){return s instanceof HTMLElement}),n=[],i=0;igD});b();b();WC();Qf();Xf();lu();Kc();gh();Kl();ro();Qn();IU();Jf();Sr();G$();Cr();b();var s7="comm",o7="rule",l7="decl";var b5e="@import";var x5e="@keyframes";var w5e="@layer";b();var NU=Math.abs,g3=String.fromCharCode;function c7(t){return t.trim()}function m3(t,e,r){return t.replace(e,r)}function k5e(t,e,r){return t.indexOf(e,r)}function Qg(t,e){return t.charCodeAt(e)|0}function Np(t,e,r){return t.slice(e,r)}function kl(t){return t.length}function T5e(t){return t.length}function Iy(t,e){return e.push(t),t}b();b();var u7=1,Ny=1,E5e=0,hc=0,pa=0,Fy="";function h7(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:u7,column:Ny,length:s,return:"",siblings:o}}function S5e(){return pa}function C5e(){return pa=hc>0?Qg(Fy,--hc):0,Ny--,pa===10&&(Ny=1,u7--),pa}function fc(){return pa=hc2||Py(pa)>3?"":" "}function M5e(t,e){for(;--e&&fc()&&!(pa<48||pa>102||pa>57&&pa<65||pa>70&&pa<97););return f7(t,v3()+(e<6&&ed()==32&&fc()==32))}function PU(t){for(;fc();)switch(pa){case t:return hc;case 34:case 39:t!==34&&t!==39&&PU(pa);break;case 40:t===41&&PU(t);break;case 92:fc();break}return hc}function D5e(t,e){for(;fc()&&t+pa!==57;)if(t+pa===84&&ed()===47)break;return"/*"+f7(e,hc-1)+"*"+g3(t===47?t:fc())}function O5e(t){for(;!Py(ed());)fc();return f7(t,hc)}function N5e(t){return A5e(p7("",null,null,null,[""],t=_5e(t),0,[0],t))}function p7(t,e,r,n,i,a,s,o,l){for(var u=0,h=0,f=s,d=0,p=0,g=0,m=1,v=1,y=1,w=0,k="",E=i,T=a,S=n,L=k;v;)switch(g=w,w=fc()){case 40:if(g!=108&&Qg(L,f-1)==58){k5e(L+=m3(d7(w),"&","&\f"),"&\f",NU(u?o[u-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:L+=d7(w);break;case 9:case 10:case 13:case 32:L+=L5e(g);break;case 92:L+=M5e(v3()-1,7);continue;case 47:switch(ed()){case 42:case 47:Iy(L1t(D5e(fc(),v3()),e,r,l),l),(Py(g||1)==5||Py(ed()||1)==5)&&kl(L)&&Np(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*m:o[u++]=kl(L)*y;case 125*m:case 59:case 0:switch(w){case 0:case 125:v=0;case 59+h:y==-1&&(L=m3(L,/\f/g,"")),p>0&&(kl(L)-f||m===0&&g===47)&&Iy(p>32?I5e(L+";",n,r,f-1,l):I5e(m3(L," ","")+";",n,r,f-2,l),l);break;case 59:L+=";";default:if(Iy(S=R5e(L,e,r,u,h,i,o,k,E=[],T=[],f,a),a),w===123)if(h===0)p7(L,e,S,S,E,a,f,o,T);else switch(d===99&&Qg(L,3)===110?100:d){case 100:case 108:case 109:case 115:p7(t,S,S,n&&Iy(R5e(t,S,S,0,0,i,o,k,i,E=[],f,T),T),i,T,f,o,n?E:T);break;default:p7(L,S,S,S,[""],T,0,o,T)}}u=h=p=0,m=y=1,k=L="",f=s;break;case 58:f=1+kl(L),p=g;default:if(m<1){if(w==123)--m;else if(w==125&&m++==0&&C5e()==125)continue}switch(L+=g3(w),w*m){case 38:y=h>0?1:(L+="\f",-1);break;case 44:o[u++]=(kl(L)-1)*y,y=1;break;case 64:ed()===45&&(L+=d7(fc())),d=ed(),h=f=kl(k=L+=O5e(v3())),w++;break;case 45:g===45&&kl(L)==2&&(m=0)}}return a}function R5e(t,e,r,n,i,a,s,o,l,u,h,f){for(var d=i-1,p=i===0?a:[""],g=T5e(p),m=0,v=0,y=0;m0?p[w]+" "+k:m3(k,/&\f/g,p[w])))&&(l[y++]=E);return h7(t,e,r,i===0?o7:o,l,u,h,f)}function L1t(t,e,r,n){return h7(t,e,r,s7,g3(S5e()),Np(t,2,-2),0,n)}function I5e(t,e,r,n,i){return h7(t,e,r,l7,Np(t,0,n),Np(t,n+1,-1),n,i)}b();function g7(t,e){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),yOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Q5e(),Z5e));return{id:O9e,diagram:t}},"loader"),bOt={id:O9e,detector:vOt,loader:yOt},xOt=bOt,R9e="flowchart",wOt=x((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),kOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(O7(),D7));return{id:R9e,diagram:t}},"loader"),TOt={id:R9e,detector:wOt,loader:kOt},EOt=TOt,I9e="flowchart-v2",SOt=x((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),COt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(O7(),D7));return{id:I9e,diagram:t}},"loader"),_Ot={id:I9e,detector:SOt,loader:COt},AOt=_Ot,N9e="er",LOt=x(t=>/^\s*erDiagram/.test(t),"detector"),MOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ake(),_ke));return{id:N9e,diagram:t}},"loader"),DOt={id:N9e,detector:LOt,loader:MOt},OOt=DOt,P9e="gitGraph",ROt=x(t=>/^\s*gitGraph/.test(t),"detector"),IOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(D_e(),M_e));return{id:P9e,diagram:t}},"loader"),NOt={id:P9e,detector:ROt,loader:IOt},POt=NOt,F9e="gantt",FOt=x(t=>/^\s*gantt/.test(t),"detector"),BOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Z_e(),K_e));return{id:F9e,diagram:t}},"loader"),zOt={id:F9e,detector:FOt,loader:BOt},$Ot=zOt,B9e="info",VOt=x(t=>/^\s*info/.test(t),"detector"),UOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(J_e(),Q_e));return{id:B9e,diagram:t}},"loader"),HOt={id:B9e,detector:VOt,loader:UOt},z9e="pie",qOt=x(t=>/^\s*pie/.test(t),"detector"),WOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(n6e(),r6e));return{id:z9e,diagram:t}},"loader"),GOt={id:z9e,detector:qOt,loader:WOt},$9e="quadrantChart",YOt=x(t=>/^\s*quadrantChart/.test(t),"detector"),jOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(x6e(),b6e));return{id:$9e,diagram:t}},"loader"),XOt={id:$9e,detector:YOt,loader:jOt},KOt=XOt,V9e="xychart",ZOt=x(t=>/^\s*xychart-beta/.test(t),"detector"),QOt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(V6e(),$6e));return{id:V9e,diagram:t}},"loader"),JOt={id:V9e,detector:ZOt,loader:QOt},eRt=JOt,U9e="requirement",tRt=x(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),rRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(j6e(),Y6e));return{id:U9e,diagram:t}},"loader"),nRt={id:U9e,detector:tRt,loader:rRt},iRt=nRt,H9e="sequence",aRt=x(t=>/^\s*sequenceDiagram/.test(t),"detector"),sRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(yAe(),vAe));return{id:H9e,diagram:t}},"loader"),oRt={id:H9e,detector:aRt,loader:sRt},lRt=oRt,q9e="class",cRt=x((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),uRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(LAe(),AAe));return{id:q9e,diagram:t}},"loader"),hRt={id:q9e,detector:cRt,loader:uRt},fRt=hRt,W9e="classDiagram",dRt=x((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),pRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(DAe(),MAe));return{id:W9e,diagram:t}},"loader"),gRt={id:W9e,detector:dRt,loader:pRt},mRt=gRt,G9e="state",vRt=x((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),yRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(m7e(),g7e));return{id:G9e,diagram:t}},"loader"),bRt={id:G9e,detector:vRt,loader:yRt},xRt=bRt,Y9e="stateDiagram",wRt=x((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),kRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(y7e(),v7e));return{id:Y9e,diagram:t}},"loader"),TRt={id:Y9e,detector:wRt,loader:kRt},ERt=TRt,j9e="journey",SRt=x(t=>/^\s*journey/.test(t),"detector"),CRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(L7e(),A7e));return{id:j9e,diagram:t}},"loader"),_Rt={id:j9e,detector:SRt,loader:CRt},ARt=_Rt,LRt=x((t,e,r)=>{ie.debug(`rendering svg for syntax error `);let n=Is(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),mn(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),X9e={draw:LRt},MRt=X9e,DRt={db:{},renderer:X9e,parser:{parse:x(()=>{},"parse")}},ORt=DRt,K9e="flowchart-elk",RRt=x((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),IRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(O7(),D7));return{id:K9e,diagram:t}},"loader"),NRt={id:K9e,detector:RRt,loader:IRt},PRt=NRt,Z9e="timeline",FRt=x(t=>/^\s*timeline/.test(t),"detector"),BRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(G7e(),W7e));return{id:Z9e,diagram:t}},"loader"),zRt={id:Z9e,detector:FRt,loader:BRt},$Rt=zRt,Q9e="mindmap",VRt=x(t=>/^\s*mindmap/.test(t),"detector"),URt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(tDe(),eDe));return{id:Q9e,diagram:t}},"loader"),HRt={id:Q9e,detector:VRt,loader:URt},qRt=HRt,J9e="kanban",WRt=x(t=>/^\s*kanban/.test(t),"detector"),GRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(iDe(),nDe));return{id:J9e,diagram:t}},"loader"),YRt={id:J9e,detector:WRt,loader:GRt},jRt=YRt,eOe="sankey",XRt=x(t=>/^\s*sankey-beta/.test(t),"detector"),KRt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(LDe(),ADe));return{id:eOe,diagram:t}},"loader"),ZRt={id:eOe,detector:XRt,loader:KRt},QRt=ZRt,tOe="packet",JRt=x(t=>/^\s*packet-beta/.test(t),"detector"),eIt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ODe(),DDe));return{id:tOe,diagram:t}},"loader"),tIt={id:tOe,detector:JRt,loader:eIt},rOe="block",rIt=x(t=>/^\s*block-beta/.test(t),"detector"),nIt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(c9e(),l9e));return{id:rOe,diagram:t}},"loader"),iIt={id:rOe,detector:rIt,loader:nIt},aIt=iIt,nOe="architecture",sIt=x(t=>/^\s*architecture/.test(t),"detector"),oIt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(_9e(),C9e));return{id:nOe,diagram:t}},"loader"),lIt={id:nOe,detector:sIt,loader:oIt},cIt=lIt,A9e=!1,pD=x(()=>{A9e||(A9e=!0,Uw("error",ORt,t=>t.toLowerCase().trim()==="error"),Uw("---",{db:{clear:x(()=>{},"clear")},styles:{},renderer:{draw:x(()=>{},"draw")},parser:{parse:x(()=>{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:x(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),cF(xOt,jRt,mRt,fRt,OOt,$Ot,HOt,GOt,iRt,lRt,PRt,AOt,EOt,qRt,$Rt,POt,ERt,xRt,ARt,KOt,QRt,tIt,eRt,aIt,cIt))},"addDiagrams"),uIt=x(async()=>{ie.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(rg).map(async([r,{detector:n,loader:i}])=>{if(i)try{RC(r)}catch{try{let{diagram:a,id:s}=await i();Uw(s,a,n)}catch(a){throw ie.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete rg[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){ie.error(`Failed to load ${e.length} external diagrams`);for(let r of e)ie.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),hIt="graphics-document document";function iOe(t,e){t.attr("role",hIt),e!==""&&t.attr("aria-roledescription",e)}x(iOe,"setA11yDiagramInfo");function aOe(t,e,r,n){if(t.insert!==void 0){if(r){let i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){let i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}x(aOe,"addSVGa11yTitleDescription");var vK=class sOe{constructor(e,r,n,i,a){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=a}static{x(this,"Diagram")}static async fromText(e,r={}){let n=rn(),i=zw(e,n);e=Ove(e)+` `;try{RC(i)}catch{let u=tce(i);if(!u)throw new lF(`Diagram ${i} not found.`);let{id:h,diagram:f}=await u();Uw(h,f)}let{db:a,parser:s,renderer:o,init:l}=RC(i);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new sOe(i,e,a,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},L9e=[],fIt=x(()=>{L9e.forEach(t=>{t()}),L9e=[]},"attachFunctions"),dIt=x(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function oOe(t){let e=t.match(oF);if(!e)return{text:t,metadata:{}};let r=vv(e[1],{schema:mv})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}x(oOe,"extractFrontMatter");var pIt=x(t=>t.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),gIt=x(t=>{let{text:e,metadata:r}=oOe(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),mIt=x(t=>{let e=tr.detectInit(t)??{},r=tr.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:Cve(t),directive:e}},"processDirectives");function bK(t){let e=pIt(t),r=gIt(e),n=mIt(r.text),i=Bo(r.config,n.directive);return t=dIt(n.text),{code:t,title:r.title,config:i}}x(bK,"preprocessDiagram");function lOe(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}x(lOe,"toBase64");var vIt=5e4,yIt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",bIt="sandbox",xIt="loose",wIt="http://www.w3.org/2000/svg",kIt="http://www.w3.org/1999/xlink",TIt="http://www.w3.org/1999/xhtml",EIt="100%",SIt="100%",CIt="border:0;margin:0;",_It="margin:0",AIt="allow-top-navigation-by-user-activation allow-popups",LIt='The "iframe" tag is not supported by your browser.',MIt=["foreignobject"],DIt=["dominant-baseline"];function xK(t){let e=bK(t);return Vw(),cce(e.config??{}),e}x(xK,"processAndSetConfigs");async function cOe(t,e){pD();try{let{code:r,config:n}=xK(t);return{diagramType:(await hOe(r)).type,config:n}}catch(r){if(e?.suppressErrors)return!1;throw r}}x(cOe,"parse");var M9e=x((t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),OIt=x((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(r+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let s=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(o=>{br(o.styles)||s.forEach(l=>{r+=M9e(o.id,l,o.styles)}),br(o.textStyles)||(r+=M9e(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),RIt=x((t,e,r,n)=>{let i=OIt(t,r),a=pce(e,i,t.themeVariables);return g7(N5e(`${n}{${a}}`),P5e)},"createUserStyles"),IIt=x((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=vl(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),NIt=x((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":SIt,n=lOe(`${t}`);return``},"putIntoIFrame"),D9e=x((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",wIt);return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function yK(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}x(yK,"sandboxedIframe");var PIt=x((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),FIt=x(async function(t,e,r){pD();let n=xK(e);e=n.code;let i=rn();ie.debug(i),e.length>(i?.maxTextSize??vIt)&&(e=yIt);let a="#"+t,s="i"+t,o="#"+s,l="d"+t,u="#"+l,h=x(()=>{let R=Je(d?o:u).node();R&&"remove"in R&&R.remove()},"removeTempElements"),f=Je("body"),d=i.securityLevel===bIt,p=i.securityLevel===xIt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){let C=yK(Je(r),s);f=Je(C.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=Je(r);D9e(f,t,l,`font-family: ${g}`,kIt)}else{if(PIt(document,t,l,s),d){let C=yK(Je("body"),s);f=Je(C.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=Je("body");D9e(f,t,l)}let m,v;try{m=await vK.fromText(e,{title:n.title})}catch(C){if(i.suppressErrorRendering)throw h(),C;m=await vK.fromText("error"),v=C}let y=f.select(u).node(),w=m.type,k=y.firstChild,E=k.firstChild,T=m.renderer.getClasses?.(e,m),S=RIt(i,w,T,a),L=document.createElement("style");L.innerHTML=S,k.insertBefore(L,E);try{await m.renderer.draw(e,t,p3,m)}catch(C){throw i.suppressErrorRendering?h():MRt.draw(e,t,p3),C}let _=f.select(`${u} svg`),M=m.db.getAccTitle?.(),I=m.db.getAccDescription?.();fOe(w,_,M,I),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",TIt);let O=f.select(u).node().innerHTML;if(ie.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),O=IIt(O,d,gn(i.arrowMarkerAbsolute)),d){let C=f.select(u+" svg").node();O=NIt(O,C)}else p||(O=Yd.sanitize(O,{ADD_TAGS:MIt,ADD_ATTR:DIt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(fIt(),v)throw v;return h(),{diagramType:w,svg:O,bindFunctions:m.db.bindFunctions}},"render");function uOe(t={}){let e=Ni({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),sce(e),e?.theme&&e.theme in th?e.themeVariables=th[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=th.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?ace(e):uF();_C(r.logLevel),pD()}x(uOe,"initialize");var hOe=x((t,e={})=>{let{code:r}=bK(t);return vK.fromText(r,e)},"getDiagramFromText");function fOe(t,e,r,n){iOe(e,t),aOe(e,r,n,e.attr("id"))}x(fOe,"addA11yInfo");var o1=Object.freeze({render:FIt,parse:cOe,getDiagramFromText:hOe,initialize:uOe,getConfig:rn,setConfig:hF,getSiteConfig:uF,updateSiteConfig:oce,reset:x(()=>{Vw()},"reset"),globalReset:x(()=>{Vw(ng)},"globalReset"),defaultConfig:ng});_C(rn().logLevel);Vw(rn());var BIt=x((t,e,r)=>{ie.warn(t),M6(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),dOe=x(async function(t={querySelector:".mermaid"}){try{await zIt(t)}catch(e){if(M6(e)&&ie.error(e.str),Ed.parseError&&Ed.parseError(e),!t.suppressErrors)throw ie.error("Use the suppressErrors option to suppress these errors"),e}},"run"),zIt=x(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=o1.getConfig();ie.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");ie.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(ie.debug("Start On Load: "+n?.startOnLoad),o1.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new tr.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,o=[];for(let l of Array.from(i)){if(ie.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let u=`mermaid-${a.next()}`;s=l.innerHTML,s=N6(tr.entityDecode(s)).trim().replace(//gi,"
    ");let h=tr.detectInit(s);h&&ie.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:d}=await vOe(u,s,l);l.innerHTML=f,t&&await t(u),d&&d(l)}catch(f){BIt(f,o,Ed.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),pOe=x(function(t){o1.initialize(t)},"initialize"),$It=x(async function(t,e,r){ie.warn("mermaid.init is deprecated. Please use run instead."),t&&pOe(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await dOe(n)},"init"),VIt=x(async(t,{lazyLoad:e=!0}={})=>{pD(),cF(...t),e===!1&&await uIt()},"registerExternalDiagrams"),gOe=x(function(){if(Ed.startOnLoad){let{startOnLoad:t}=o1.getConfig();t&&Ed.run().catch(e=>ie.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",gOe,!1);var UIt=x(function(t){Ed.parseError=t},"setParseErrorHandler"),dD=[],mK=!1,mOe=x(async()=>{if(!mK){for(mK=!0;dD.length>0;){let t=dD.shift();if(t)try{await t()}catch(e){ie.error("Error executing queue",e)}}mK=!1}},"executeQueue"),HIt=x(async(t,e)=>new Promise((r,n)=>{let i=x(()=>new Promise((a,s)=>{o1.parse(t,e).then(o=>{a(o),r(o)},o=>{ie.error("Error parsing",o),Ed.parseError?.(o),s(o),n(o)})}),"performCall");dD.push(i),mOe().catch(n)}),"parse"),vOe=x((t,e,r)=>new Promise((n,i)=>{let a=x(()=>new Promise((s,o)=>{o1.render(t,e,r).then(l=>{s(l),n(l)},l=>{ie.error("Error parsing",l),Ed.parseError?.(l),o(l),i(l)})}),"performCall");dD.push(a),mOe().catch(i)}),"render"),Ed={startOnLoad:!0,mermaidAPI:o1,parse:HIt,render:vOe,init:$It,run:dOe,registerExternalDiagrams:VIt,registerLayoutLoaders:RU,initialize:pOe,parseError:void 0,contentLoaded:gOe,setParseErrorHandler:UIt,detectType:zw,registerIconPacks:KC},wK=Ed;var gD=class extends or{connect(){this.render()}async render(){wK.initialize({startOnLoad:!1,theme:"dark"}),await wK.run()}};var TK={};Wt(TK,{default:()=>mD});b();var mD=class extends or{static targets=["element"];disable(){this.elementTarget.setAttribute("disabled","true")}enable(){this.elementTarget.removeAttribute("disabled")}};var EK={};Wt(EK,{default:()=>vD});b();var vD=class extends or{connect(){setTimeout(()=>{this.dismiss()},3e3)}dismiss(){this.element.remove()}};var SK={};Wt(SK,{default:()=>yD});b();var yD=class extends or{static targets=["toc","lessonContent"];static values={itemClasses:String};connect(){this.buildTocItems(),this.observer=new window.IntersectionObserver(this.activeSection.bind(this),{rootMargin:"-15% 0px -80% 0px"}),this.lessonContentTarget.querySelectorAll("section[data-title]").forEach(e=>{this.observer.observe(e)})}disconnect(){this.observer.disconnect(),this.tocTarget.innerHTML=""}activeSection(e){e.forEach(r=>{let{title:n}=r.target.dataset,i=this.tocTarget.querySelector(`li a[href="#${n}"]`)?.parentElement;i&&(r.intersectionRatio>0?i.classList.add("toc-item-active"):i.classList.remove("toc-item-active"))})}buildTocItems(){this.headings().forEach(e=>{this.tocTarget.insertAdjacentHTML("beforeend",this.tocItem(e))})}headings(){return Array.from(this.lessonContentTarget.querySelectorAll("section > h3")).map(e=>e).filter(e=>e.innerText)}tocItem(e){let r=e.firstChild.getAttribute("href");return`
    `}};var AK={};Wt(AK,{default:()=>wD});b();b();async function bD(t,e=null){t.classList.remove("hidden"),await yOe("enter",t,e)}async function xD(t,e=null){await yOe("leave",t,e),t.classList.add("hidden")}async function yOe(t,e,r){let n=e.dataset,i=r?`${r}-${t}`:t,a=`transition${t.charAt(0).toUpperCase()+t.slice(1)}`,s=n[a]?n[a].split(" "):[i],o=n[`${a}Start`]?n[`${a}Start`].split(" "):[`${i}-start`],l=n[`${a}End`]?n[`${a}End`].split(" "):[`${i}-end`];CK(e,s),CK(e,o),await qIt(),_K(e,o),CK(e,l),await WIt(e),_K(e,l),_K(e,s)}function CK(t,e){t.classList.add(...e)}function _K(t,e){t.classList.remove(...e)}function qIt(){return new Promise(t=>{requestAnimationFrame(()=>{requestAnimationFrame(t)})})}function WIt(t){return new Promise(e=>{let r=getComputedStyle(t).transitionDuration.split(",")[0],n=Number(r.replace("s",""))*1e3;setTimeout(()=>{e()},n)})}var wD=class extends or{static targets=["transitionable"];connect(){this.lockScroll(),this.transitionableTargets.forEach(e=>bD(e))}close(){Promise.all(this.transitionableTargets.map(e=>xD(e))).then(()=>{this.element.parentElement.removeAttribute("src"),this.element.remove(),this.unlockScroll()})}submitEnd(e){e.detail.success&&this.close()}onKeydown(e){e.key==="Escape"&&this.close()}lockScroll(){document.body.classList.add("overflow-hidden","sm:pr-[15px]")}unlockScroll(){document.body.classList.remove("overflow-hidden","sm:pr-[15px]")}};var LK={};Wt(LK,{default:()=>kD});b();var kD=class extends or{static outlets=["visibility"];open(){this.visibilityOutlet.on()}};var MK={};Wt(MK,{default:()=>TD});b();var TD=class extends or{static targets=["progressCircle"];static values={percent:Number,circumference:Number};connect(){let e=this.circumferenceValue-this.percentValue/100*this.circumferenceValue;setTimeout(()=>{this.progressCircleTarget.style.strokeDashoffset=e},200)}};var DK={};Wt(DK,{default:()=>ED});b();var ED=class extends or{static values={offset:{type:Number,default:25},behavior:{type:String,default:"smooth"}};connect(){this.element.dataset.action="scroll-to#scrollTo"}scrollTo(e){e.preventDefault();let r=this.element.hash||this.element.value,i=document.querySelector(r).getBoundingClientRect().top+window.pageYOffset;window.scrollTo({top:i-this.offsetValue,behavior:this.behaviorValue})}};var IK={};Wt(IK,{default:()=>SD});b();b();b();b();var rT=class{constructor(e){this.response=e}get statusCode(){return this.response.status}get redirected(){return this.response.redirected}get ok(){return this.response.ok}get unauthenticated(){return this.statusCode===401}get unprocessableEntity(){return this.statusCode===422}get authenticationURL(){return this.response.headers.get("WWW-Authenticate")}get contentType(){return(this.response.headers.get("Content-Type")||"").replace(/;.*$/,"")}get headers(){return this.response.headers}get html(){return this.contentType.match(/^(application|text)\/(html|xhtml\+xml)$/)?this.text:Promise.reject(new Error(`Expected an HTML response but got "${this.contentType}" instead`))}get json(){return this.contentType.match(/^application\/.*json$/)?this.responseJson||(this.responseJson=this.response.json()):Promise.reject(new Error(`Expected a JSON response but got "${this.contentType}" instead`))}get text(){return this.responseText||(this.responseText=this.response.text())}get isTurboStream(){return this.contentType.match(/^text\/vnd\.turbo-stream\.html/)}get isScript(){return this.contentType.match(/\b(?:java|ecma)script\b/)}async renderTurboStream(){if(this.isTurboStream)window.Turbo?await window.Turbo.renderStreamMessage(await this.text):console.warn("You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js");else return Promise.reject(new Error(`Expected a Turbo Stream response but got "${this.contentType}" instead`))}async activeScript(){if(this.isScript){let e=document.createElement("script"),r=document.querySelector("meta[name=csp-nonce]"),n=r&&r.content;n&&e.setAttribute("nonce",n),e.innerHTML=await this.text,document.body.appendChild(e)}else return Promise.reject(new Error(`Expected a Script response but got "${this.contentType}" instead`))}};b();var nT=class{static register(e){this.interceptor=e}static get(){return this.interceptor}static reset(){this.interceptor=void 0}};b();function bOe(t){let e=document.cookie?document.cookie.split("; "):[],r=`${encodeURIComponent(t)}=`,n=e.find(i=>i.startsWith(r));if(n){let i=n.split("=").slice(1).join("=");if(i)return decodeURIComponent(i)}}function xOe(t){let e={};for(let r in t){let n=t[r];n!==void 0&&(e[r]=n)}return e}function OK(t){let e=document.head.querySelector(`meta[name="${t}"]`);return e&&e.content}function wOe(t){return[...t].reduce((e,[r,n])=>e.concat(typeof n=="string"?[[r,n]]:[]),[])}function kOe(t,e){for(let[r,n]of e)n instanceof window.File||(t.has(r)&&!r.includes("[]")?(t.delete(r),t.set(r,n)):t.append(r,n))}var iT=class{constructor(e,r,n={}){this.method=e,this.options=n,this.originalUrl=r.toString()}async perform(){try{let i=nT.get();i&&await i(this)}catch(i){console.error(i)}let e=this.responseKind==="turbo-stream"&&window.Turbo?window.Turbo.fetch:window.fetch,r=new rT(await e(this.url,this.fetchOptions));return r.unauthenticated&&r.authenticationURL?Promise.reject(window.location.href=r.authenticationURL):(r.isScript&&await r.activeScript(),(r.ok||r.unprocessableEntity)&&r.isTurboStream&&await r.renderTurboStream(),r)}addHeader(e,r){let n=this.additionalHeaders;n[e]=r,this.options.headers=n}sameHostname(){if(!this.originalUrl.startsWith("http:"))return!0;try{return new URL(this.originalUrl).hostname===window.location.hostname}catch{return!0}}get fetchOptions(){return{method:this.method.toUpperCase(),headers:this.headers,body:this.formattedBody,signal:this.signal,credentials:this.credentials,redirect:this.redirect}}get headers(){let e={"X-Requested-With":"XMLHttpRequest","Content-Type":this.contentType,Accept:this.accept};return this.sameHostname()&&(e["X-CSRF-Token"]=this.csrfToken),xOe(Object.assign(e,this.additionalHeaders))}get csrfToken(){return bOe(OK("csrf-param"))||OK("csrf-token")}get contentType(){return this.options.contentType?this.options.contentType:this.body==null||this.body instanceof window.FormData?void 0:this.body instanceof window.File?this.body.type:"application/json"}get accept(){switch(this.responseKind){case"html":return"text/html, application/xhtml+xml";case"turbo-stream":return"text/vnd.turbo-stream.html, text/html, application/xhtml+xml";case"json":return"application/json, application/vnd.api+json";case"script":return"text/javascript, application/javascript";default:return"*/*"}}get body(){return this.options.body}get query(){let e=(this.originalUrl.split("?")[1]||"").split("#")[0],r=new URLSearchParams(e),n=this.options.query;n instanceof window.FormData?n=wOe(n):n instanceof window.URLSearchParams?n=n.entries():n=Object.entries(n||{}),kOe(r,n);let i=r.toString();return i.length>0?`?${i}`:""}get url(){return this.originalUrl.split("?")[0].split("#")[0]+this.query}get responseKind(){return this.options.responseKind||"html"}get signal(){return this.options.signal}get redirect(){return this.options.redirect||"follow"}get credentials(){return this.options.credentials||"same-origin"}get additionalHeaders(){return this.options.headers||{}}get formattedBody(){let e=Object.prototype.toString.call(this.body)==="[object String]";return this.headers["Content-Type"]==="application/json"&&!e?JSON.stringify(this.body):this.body}};b();async function RK(t,e){return new iT("post",t,e).perform()}var SD=class extends or{static targets=["input","button"];static values={url:String};connect(){this.inputTarget.addEventListener("input",this.toggleButton.bind(this))}async share(e){e.preventDefault();let r=this.inputTarget.value;await RK(this.urlValue,{body:JSON.stringify({content:r})})}toggleButton(){this.buttonTarget.classList.toggle("hidden",this.inputTarget.value.length===0)}};var NK={};Wt(NK,{default:()=>_D});b();var SOe=Vi(EOe()),_D=class extends or{connect(){SOe.default.highlightAllUnder(this.element)}};var PK={};Wt(PK,{default:()=>AD});b();var AD=class extends or{static targets=["tab","panel"];static classes=["active","inactive"];initialize(){this.showTab()}change(e){this.index=this.tabTargets.indexOf(e.target),this.showTab(this.index)}showTab(){this.panelTargets.forEach((e,r)=>{r===this.index?e.classList.remove(this.inactiveClass):e.classList.add(this.inactiveClass)}),this.tabTargets.forEach((e,r)=>{r===this.index?e.classList.add(...this.activeClasses):e.classList.remove(...this.activeClasses)})}get index(){return parseInt(this.data.get("index"),10)}set index(e){this.data.set("index",e),this.showTab()}};var iZ={};Wt(iZ,{default:()=>BD});b();b();b();b();var Zi="top",Pa="bottom",ma="right",sa="left",LD="auto",g0=[Zi,Pa,ma,sa],Sd="start",l1="end",COe="clippingParents",MD="viewport",S2="popper",_Oe="reference",FK=g0.reduce(function(t,e){return t.concat([e+"-"+Sd,e+"-"+l1])},[]),DD=[].concat(g0,[LD]).reduce(function(t,e){return t.concat([e,e+"-"+Sd,e+"-"+l1])},[]),YIt="beforeRead",jIt="read",XIt="afterRead",KIt="beforeMain",ZIt="main",QIt="afterMain",JIt="beforeWrite",eNt="write",tNt="afterWrite",AOe=[YIt,jIt,XIt,KIt,ZIt,QIt,JIt,eNt,tNt];b();b();b();function Za(t){return t?(t.nodeName||"").toLowerCase():null}b();b();function _i(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Oc(t){var e=_i(t).Element;return t instanceof e||t instanceof Element}function Fa(t){var e=_i(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function C2(t){if(typeof ShadowRoot>"u")return!1;var e=_i(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function rNt(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},a=e.elements[r];!Fa(a)||!Za(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(s){var o=i[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function nNt(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],a=e.attributes[n]||{},s=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),o=s.reduce(function(l,u){return l[u]="",l},{});!Fa(i)||!Za(i)||(Object.assign(i.style,o),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}var aT={name:"applyStyles",enabled:!0,phase:"write",fn:rNt,effect:nNt,requires:["computeStyles"]};b();b();function Qa(t){return t.split("-")[0]}b();b();b();var Ou=Math.max,c1=Math.min,Cd=Math.round;b();b();function _2(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function sT(){return!/^((?!chrome|android).)*safari/i.test(_2())}function Rc(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,a=1;e&&Fa(t)&&(i=t.offsetWidth>0&&Cd(n.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Cd(n.height)/t.offsetHeight||1);var s=Oc(t)?_i(t):window,o=s.visualViewport,l=!sT()&&r,u=(n.left+(l&&o?o.offsetLeft:0))/i,h=(n.top+(l&&o?o.offsetTop:0))/a,f=n.width/i,d=n.height/a;return{width:f,height:d,top:h,right:u+f,bottom:h+d,left:u,x:u,y:h}}function u1(t){var e=Rc(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}b();function oT(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&C2(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}b();b();function vo(t){return _i(t).getComputedStyle(t)}b();function BK(t){return["table","td","th"].indexOf(Za(t))>=0}b();b();function ks(t){return((Oc(t)?t.ownerDocument:t.document)||window.document).documentElement}function _d(t){return Za(t)==="html"?t:t.assignedSlot||t.parentNode||(C2(t)?t.host:null)||ks(t)}function LOe(t){return!Fa(t)||vo(t).position==="fixed"?null:t.offsetParent}function iNt(t){var e=/firefox/i.test(_2()),r=/Trident/i.test(_2());if(r&&Fa(t)){var n=vo(t);if(n.position==="fixed")return null}var i=_d(t);for(C2(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Za(i))<0;){var a=vo(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Ru(t){for(var e=_i(t),r=LOe(t);r&&BK(r)&&vo(r).position==="static";)r=LOe(r);return r&&(Za(r)==="html"||Za(r)==="body"&&vo(r).position==="static")?e:r||iNt(t)||e}b();function h1(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}b();function f1(t,e,r){return Ou(t,c1(e,r))}function MOe(t,e,r){var n=f1(t,e,r);return n>r?r:n}b();b();function lT(){return{top:0,right:0,bottom:0,left:0}}function cT(t){return Object.assign({},lT(),t)}b();function uT(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var aNt=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,cT(typeof e!="number"?e:uT(e,g0))};function sNt(t){var e,r=t.state,n=t.name,i=t.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,o=Qa(r.placement),l=h1(o),u=[sa,ma].indexOf(o)>=0,h=u?"height":"width";if(!(!a||!s)){var f=aNt(i.padding,r),d=u1(a),p=l==="y"?Zi:sa,g=l==="y"?Pa:ma,m=r.rects.reference[h]+r.rects.reference[l]-s[l]-r.rects.popper[h],v=s[l]-r.rects.reference[l],y=Ru(a),w=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,k=m/2-v/2,E=f[p],T=w-d[h]-f[g],S=w/2-d[h]/2+k,L=f1(E,S,T),_=l;r.modifiersData[n]=(e={},e[_]=L,e.centerOffset=L-S,e)}}function oNt(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||oT(e.elements.popper,i)&&(e.elements.arrow=i))}var DOe={name:"arrow",enabled:!0,phase:"main",fn:sNt,effect:oNt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};b();b();function Ic(t){return t.split("-")[1]}var lNt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cNt(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:Cd(r*i)/i||0,y:Cd(n*i)/i||0}}function OOe(t){var e,r=t.popper,n=t.popperRect,i=t.placement,a=t.variation,s=t.offsets,o=t.position,l=t.gpuAcceleration,u=t.adaptive,h=t.roundOffsets,f=t.isFixed,d=s.x,p=d===void 0?0:d,g=s.y,m=g===void 0?0:g,v=typeof h=="function"?h({x:p,y:m}):{x:p,y:m};p=v.x,m=v.y;var y=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),k=sa,E=Zi,T=window;if(u){var S=Ru(r),L="clientHeight",_="clientWidth";if(S===_i(r)&&(S=ks(r),vo(S).position!=="static"&&o==="absolute"&&(L="scrollHeight",_="scrollWidth")),S=S,i===Zi||(i===sa||i===ma)&&a===l1){E=Pa;var M=f&&S===T&&T.visualViewport?T.visualViewport.height:S[L];m-=M-n.height,m*=l?1:-1}if(i===sa||(i===Zi||i===Pa)&&a===l1){k=ma;var I=f&&S===T&&T.visualViewport?T.visualViewport.width:S[_];p-=I-n.width,p*=l?1:-1}}var O=Object.assign({position:o},u&&lNt),C=h===!0?cNt({x:p,y:m},_i(r)):{x:p,y:m};if(p=C.x,m=C.y,l){var R;return Object.assign({},O,(R={},R[E]=w?"0":"",R[k]=y?"0":"",R.transform=(T.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",R))}return Object.assign({},O,(e={},e[E]=w?m+"px":"",e[k]=y?p+"px":"",e.transform="",e))}function uNt(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,s=a===void 0?!0:a,o=r.roundOffsets,l=o===void 0?!0:o,u={placement:Qa(e.placement),variation:Ic(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,OOe(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,OOe(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var ROe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:uNt,data:{}};b();var OD={passive:!0};function hNt(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,a=i===void 0?!0:i,s=n.resize,o=s===void 0?!0:s,l=_i(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&u.forEach(function(h){h.addEventListener("scroll",r.update,OD)}),o&&l.addEventListener("resize",r.update,OD),function(){a&&u.forEach(function(h){h.removeEventListener("scroll",r.update,OD)}),o&&l.removeEventListener("resize",r.update,OD)}}var IOe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:hNt,data:{}};b();b();var fNt={left:"right",right:"left",bottom:"top",top:"bottom"};function A2(t){return t.replace(/left|right|bottom|top/g,function(e){return fNt[e]})}b();var dNt={start:"end",end:"start"};function RD(t){return t.replace(/start|end/g,function(e){return dNt[e]})}b();b();b();b();b();function d1(t){var e=_i(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function p1(t){return Rc(ks(t)).left+d1(t).scrollLeft}function zK(t,e){var r=_i(t),n=ks(t),i=r.visualViewport,a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;var u=sT();(u||!u&&e==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:a,height:s,x:o+p1(t),y:l}}b();function $K(t){var e,r=ks(t),n=d1(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=Ou(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ou(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),o=-n.scrollLeft+p1(t),l=-n.scrollTop;return vo(i||r).direction==="rtl"&&(o+=Ou(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:o,y:l}}b();b();b();function g1(t){var e=vo(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function ID(t){return["html","body","#document"].indexOf(Za(t))>=0?t.ownerDocument.body:Fa(t)&&g1(t)?t:ID(_d(t))}function m0(t,e){var r;e===void 0&&(e=[]);var n=ID(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),a=_i(n),s=i?[a].concat(a.visualViewport||[],g1(n)?n:[]):n,o=e.concat(s);return i?o:o.concat(m0(_d(s)))}b();function L2(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function pNt(t,e){var r=Rc(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function NOe(t,e,r){return e===MD?L2(zK(t,r)):Oc(e)?pNt(e,r):L2($K(ks(t)))}function gNt(t){var e=m0(_d(t)),r=["absolute","fixed"].indexOf(vo(t).position)>=0,n=r&&Fa(t)?Ru(t):t;return Oc(n)?e.filter(function(i){return Oc(i)&&oT(i,n)&&Za(i)!=="body"}):[]}function VK(t,e,r,n){var i=e==="clippingParents"?gNt(t):[].concat(e),a=[].concat(i,[r]),s=a[0],o=a.reduce(function(l,u){var h=NOe(t,u,n);return l.top=Ou(h.top,l.top),l.right=c1(h.right,l.right),l.bottom=c1(h.bottom,l.bottom),l.left=Ou(h.left,l.left),l},NOe(t,s,n));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}b();function hT(t){var e=t.reference,r=t.element,n=t.placement,i=n?Qa(n):null,a=n?Ic(n):null,s=e.x+e.width/2-r.width/2,o=e.y+e.height/2-r.height/2,l;switch(i){case Zi:l={x:s,y:e.y-r.height};break;case Pa:l={x:s,y:e.y+e.height};break;case ma:l={x:e.x+e.width,y:o};break;case sa:l={x:e.x-r.width,y:o};break;default:l={x:e.x,y:e.y}}var u=i?h1(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(a){case Sd:l[u]=l[u]-(e[h]/2-r[h]/2);break;case l1:l[u]=l[u]+(e[h]/2-r[h]/2);break;default:}}return l}function Iu(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,a=r.strategy,s=a===void 0?t.strategy:a,o=r.boundary,l=o===void 0?COe:o,u=r.rootBoundary,h=u===void 0?MD:u,f=r.elementContext,d=f===void 0?S2:f,p=r.altBoundary,g=p===void 0?!1:p,m=r.padding,v=m===void 0?0:m,y=cT(typeof v!="number"?v:uT(v,g0)),w=d===S2?_Oe:S2,k=t.rects.popper,E=t.elements[g?w:d],T=VK(Oc(E)?E:E.contextElement||ks(t.elements.popper),l,h,s),S=Rc(t.elements.reference),L=hT({reference:S,element:k,strategy:"absolute",placement:i}),_=L2(Object.assign({},k,L)),M=d===S2?_:S,I={top:T.top-M.top+y.top,bottom:M.bottom-T.bottom+y.bottom,left:T.left-M.left+y.left,right:M.right-T.right+y.right},O=t.modifiersData.offset;if(d===S2&&O){var C=O[i];Object.keys(I).forEach(function(R){var D=[ma,Pa].indexOf(R)>=0?1:-1,P=[Zi,Pa].indexOf(R)>=0?"y":"x";I[R]+=C[P]*D})}return I}b();function UK(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,a=r.rootBoundary,s=r.padding,o=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?DD:l,h=Ic(n),f=h?o?FK:FK.filter(function(g){return Ic(g)===h}):g0,d=f.filter(function(g){return u.indexOf(g)>=0});d.length===0&&(d=f);var p=d.reduce(function(g,m){return g[m]=Iu(t,{placement:m,boundary:i,rootBoundary:a,padding:s})[Qa(m)],g},{});return Object.keys(p).sort(function(g,m){return p[g]-p[m]})}function mNt(t){if(Qa(t)===LD)return[];var e=A2(t);return[RD(t),e,RD(e)]}function vNt(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,s=r.altAxis,o=s===void 0?!0:s,l=r.fallbackPlacements,u=r.padding,h=r.boundary,f=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,g=p===void 0?!0:p,m=r.allowedAutoPlacements,v=e.options.placement,y=Qa(v),w=y===v,k=l||(w||!g?[A2(v)]:mNt(v)),E=[v].concat(k).reduce(function(X,ne){return X.concat(Qa(ne)===LD?UK(e,{placement:ne,boundary:h,rootBoundary:f,padding:u,flipVariations:g,allowedAutoPlacements:m}):ne)},[]),T=e.rects.reference,S=e.rects.popper,L=new Map,_=!0,M=E[0],I=0;I=0,P=D?"width":"height",A=Iu(e,{placement:O,boundary:h,rootBoundary:f,altBoundary:d,padding:u}),N=D?R?ma:sa:R?Pa:Zi;T[P]>S[P]&&(N=A2(N));var F=A2(N),B=[];if(a&&B.push(A[C]<=0),o&&B.push(A[N]<=0,A[F]<=0),B.every(function(X){return X})){M=O,_=!1;break}L.set(O,B)}if(_)for(var V=g?3:1,z=function(ne){var j=E.find(function(ee){var Q=L.get(ee);if(Q)return Q.slice(0,ne).every(function(G){return G})});if(j)return M=j,"break"},H=V;H>0;H--){var K=z(H);if(K==="break")break}e.placement!==M&&(e.modifiersData[n]._skip=!0,e.placement=M,e.reset=!0)}}var POe={name:"flip",enabled:!0,phase:"main",fn:vNt,requiresIfExists:["offset"],data:{_skip:!1}};b();function FOe(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function BOe(t){return[Zi,ma,Pa,sa].some(function(e){return t[e]>=0})}function yNt(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,s=Iu(e,{elementContext:"reference"}),o=Iu(e,{altBoundary:!0}),l=FOe(s,n),u=FOe(o,i,a),h=BOe(l),f=BOe(u);e.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":f})}var zOe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yNt};b();function bNt(t,e,r){var n=Qa(t),i=[sa,Zi].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,s=a[0],o=a[1];return s=s||0,o=(o||0)*i,[sa,ma].indexOf(n)>=0?{x:o,y:s}:{x:s,y:o}}function xNt(t){var e=t.state,r=t.options,n=t.name,i=r.offset,a=i===void 0?[0,0]:i,s=DD.reduce(function(h,f){return h[f]=bNt(f,e.rects,a),h},{}),o=s[e.placement],l=o.x,u=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=s}var $Oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:xNt};b();function wNt(t){var e=t.state,r=t.name;e.modifiersData[r]=hT({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var VOe={name:"popperOffsets",enabled:!0,phase:"read",fn:wNt,data:{}};b();b();function HK(t){return t==="x"?"y":"x"}function kNt(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,a=i===void 0?!0:i,s=r.altAxis,o=s===void 0?!1:s,l=r.boundary,u=r.rootBoundary,h=r.altBoundary,f=r.padding,d=r.tether,p=d===void 0?!0:d,g=r.tetherOffset,m=g===void 0?0:g,v=Iu(e,{boundary:l,rootBoundary:u,padding:f,altBoundary:h}),y=Qa(e.placement),w=Ic(e.placement),k=!w,E=h1(y),T=HK(E),S=e.modifiersData.popperOffsets,L=e.rects.reference,_=e.rects.popper,M=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,I=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),O=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,C={x:0,y:0};if(S){if(a){var R,D=E==="y"?Zi:sa,P=E==="y"?Pa:ma,A=E==="y"?"height":"width",N=S[E],F=N+v[D],B=N-v[P],V=p?-_[A]/2:0,z=w===Sd?L[A]:_[A],H=w===Sd?-_[A]:-L[A],K=e.elements.arrow,X=p&&K?u1(K):{width:0,height:0},ne=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:lT(),j=ne[D],ee=ne[P],Q=f1(0,L[A],X[A]),G=k?L[A]/2-V-Q-j-I.mainAxis:z-Q-j-I.mainAxis,Z=k?-L[A]/2+V+Q+ee+I.mainAxis:H+Q+ee+I.mainAxis,te=e.elements.arrow&&Ru(e.elements.arrow),oe=te?E==="y"?te.clientTop||0:te.clientLeft||0:0,de=(R=O?.[E])!=null?R:0,pe=N+G-de-oe,re=N+Z-de,Be=f1(p?c1(F,pe):F,N,p?Ou(B,re):B);S[E]=Be,C[E]=Be-N}if(o){var le,Se=E==="x"?Zi:sa,Ye=E==="x"?Pa:ma,We=S[T],Ze=T==="y"?"height":"width",Qe=We+v[Se],et=We-v[Ye],ze=[Zi,sa].indexOf(y)!==-1,He=(le=O?.[T])!=null?le:0,Ee=ze?Qe:We-L[Ze]-_[Ze]-He+I.altAxis,Y=ze?We+L[Ze]+_[Ze]-He-I.altAxis:et,ve=p&&ze?MOe(Ee,We,Y):f1(p?Ee:Qe,We,p?Y:et);S[T]=ve,C[T]=ve-We}e.modifiersData[n]=C}}var UOe={name:"preventOverflow",enabled:!0,phase:"main",fn:kNt,requiresIfExists:["offset"]};b();b();b();b();function qK(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function WK(t){return t===_i(t)||!Fa(t)?d1(t):qK(t)}function TNt(t){var e=t.getBoundingClientRect(),r=Cd(e.width)/t.offsetWidth||1,n=Cd(e.height)/t.offsetHeight||1;return r!==1||n!==1}function GK(t,e,r){r===void 0&&(r=!1);var n=Fa(e),i=Fa(e)&&TNt(e),a=ks(e),s=Rc(t,i,r),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((Za(e)!=="body"||g1(a))&&(o=WK(e)),Fa(e)?(l=Rc(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):a&&(l.x=p1(a))),{x:s.left+o.scrollLeft-l.x,y:s.top+o.scrollTop-l.y,width:s.width,height:s.height}}b();function ENt(t){var e=new Map,r=new Set,n=[];t.forEach(function(a){e.set(a.name,a)});function i(a){r.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!r.has(o)){var l=e.get(o);l&&i(l)}}),n.push(a)}return t.forEach(function(a){r.has(a.name)||i(a)}),n}function YK(t){var e=ENt(t);return AOe.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}b();function jK(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}b();function XK(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var HOe={placement:"bottom",modifiers:[],strategy:"absolute"};function qOe(){for(var t=arguments.length,e=new Array(t),r=0;r-1}function aRe(t,e){return typeof t=="function"?t.apply(void 0,e):t}function GOe(t,e){if(e===0)return t;var r;return function(n){clearTimeout(r),r=setTimeout(function(){t(n)},e)}}function ANt(t){return t.split(/\s+/).filter(Boolean)}function M2(t){return[].concat(t)}function YOe(t,e){t.indexOf(e)===-1&&t.push(e)}function LNt(t){return t.filter(function(e,r){return t.indexOf(e)===r})}function MNt(t){return t.split("-")[0]}function PD(t){return[].slice.call(t)}function jOe(t){return Object.keys(t).reduce(function(e,r){return t[r]!==void 0&&(e[r]=t[r]),e},{})}function fT(){return document.createElement("div")}function FD(t){return["Element","Fragment"].some(function(e){return nZ(t,e)})}function DNt(t){return nZ(t,"NodeList")}function ONt(t){return nZ(t,"MouseEvent")}function RNt(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function INt(t){return FD(t)?[t]:DNt(t)?PD(t):Array.isArray(t)?t:PD(document.querySelectorAll(t))}function QK(t,e){t.forEach(function(r){r&&(r.style.transitionDuration=e+"ms")})}function XOe(t,e){t.forEach(function(r){r&&r.setAttribute("data-state",e)})}function NNt(t){var e,r=M2(t),n=r[0];return n!=null&&(e=n.ownerDocument)!=null&&e.body?n.ownerDocument:document}function PNt(t,e){var r=e.clientX,n=e.clientY;return t.every(function(i){var a=i.popperRect,s=i.popperState,o=i.props,l=o.interactiveBorder,u=MNt(s.placement),h=s.modifiersData.offset;if(!h)return!0;var f=u==="bottom"?h.top.y:0,d=u==="top"?h.bottom.y:0,p=u==="right"?h.left.x:0,g=u==="left"?h.right.x:0,m=a.top-n+f>l,v=n-a.bottom-d>l,y=a.left-r+p>l,w=r-a.right-g>l;return m||v||y||w})}function JK(t,e,r){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[n](i,r)})}function KOe(t,e){for(var r=e;r;){var n;if(t.contains(r))return!0;r=r.getRootNode==null||(n=r.getRootNode())==null?void 0:n.host}return!1}var jh={isTouch:!1},ZOe=0;function FNt(){jh.isTouch||(jh.isTouch=!0,window.performance&&document.addEventListener("mousemove",sRe))}function sRe(){var t=performance.now();t-ZOe<20&&(jh.isTouch=!1,document.removeEventListener("mousemove",sRe)),ZOe=t}function BNt(){var t=document.activeElement;if(RNt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function zNt(){document.addEventListener("touchstart",FNt,m1),window.addEventListener("blur",BNt)}var $Nt=typeof window<"u"&&typeof document<"u",VNt=$Nt?!!window.msCrypto:!1;var UNt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},HNt={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Nu=Object.assign({appendTo:iRe,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},UNt,HNt),qNt=Object.keys(Nu),WNt=function(e){var r=Object.keys(e);r.forEach(function(n){Nu[n]=e[n]})};function oRe(t){var e=t.plugins||[],r=e.reduce(function(n,i){var a=i.name,s=i.defaultValue;if(a){var o;n[a]=t[a]!==void 0?t[a]:(o=Nu[a])!=null?o:s}return n},{});return Object.assign({},t,r)}function GNt(t,e){var r=e?Object.keys(oRe(Object.assign({},Nu,{plugins:e}))):qNt,n=r.reduce(function(i,a){var s=(t.getAttribute("data-tippy-"+a)||"").trim();if(!s)return i;if(a==="content")i[a]=s;else try{i[a]=JSON.parse(s)}catch{i[a]=s}return i},{});return n}function QOe(t,e){var r=Object.assign({},e,{content:aRe(e.content,[t])},e.ignoreAttributes?{}:GNt(t,e.plugins));return r.aria=Object.assign({},Nu.aria,r.aria),r.aria={expanded:r.aria.expanded==="auto"?e.interactive:r.aria.expanded,content:r.aria.content==="auto"?e.interactive?null:"describedby":r.aria.content},r}var YNt=function(){return"innerHTML"};function tZ(t,e){t[YNt()]=e}function JOe(t){var e=fT();return t===!0?e.className=rRe:(e.className=nRe,FD(t)?e.appendChild(t):tZ(e,t)),e}function eRe(t,e){FD(e.content)?(tZ(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?tZ(t,e.content):t.textContent=e.content)}function rZ(t){var e=t.firstElementChild,r=PD(e.children);return{box:e,content:r.find(function(n){return n.classList.contains(tRe)}),arrow:r.find(function(n){return n.classList.contains(rRe)||n.classList.contains(nRe)}),backdrop:r.find(function(n){return n.classList.contains(_Nt)})}}function lRe(t){var e=fT(),r=fT();r.className=CNt,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=fT();n.className=tRe,n.setAttribute("data-state","hidden"),eRe(n,t.props),e.appendChild(r),r.appendChild(n),i(t.props,t.props);function i(a,s){var o=rZ(e),l=o.box,u=o.content,h=o.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(a.content!==s.content||a.allowHTML!==s.allowHTML)&&eRe(u,t.props),s.arrow?h?a.arrow!==s.arrow&&(l.removeChild(h),l.appendChild(JOe(s.arrow))):l.appendChild(JOe(s.arrow)):h&&l.removeChild(h)}return{popper:e,onUpdate:i}}lRe.$$tippy=!0;var jNt=1,ND=[],eZ=[];function XNt(t,e){var r=QOe(t,Object.assign({},Nu,oRe(jOe(e)))),n,i,a,s=!1,o=!1,l=!1,u=!1,h,f,d,p=[],g=GOe(pe,r.interactiveDebounce),m,v=jNt++,y=null,w=LNt(r.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},E={id:v,reference:t,popper:fT(),popperInstance:y,props:r,state:k,plugins:w,clearDelayTimeouts:Ee,setProps:Y,setContent:ve,show:ce,hide:me,hideWithInteractivity:q,enable:ze,disable:He,unmount:Le,destroy:J};if(!r.render)return E;var T=r.render(E),S=T.popper,L=T.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+E.id,E.popper=S,t._tippy=E,S._tippy=E;var _=w.map(function(fe){return fe.fn(E)}),M=t.hasAttribute("aria-expanded");return te(),V(),N(),F("onCreate",[E]),r.showOnCreate&&Qe(),S.addEventListener("mouseenter",function(){E.props.interactive&&E.state.isVisible&&E.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){E.props.interactive&&E.props.trigger.indexOf("mouseenter")>=0&&D().addEventListener("mousemove",g)}),E;function I(){var fe=E.props.touch;return Array.isArray(fe)?fe:[fe,0]}function O(){return I()[0]==="hold"}function C(){var fe;return!!((fe=E.props.render)!=null&&fe.$$tippy)}function R(){return m||t}function D(){var fe=R().parentNode;return fe?NNt(fe):document}function P(){return rZ(S)}function A(fe){return E.state.isMounted&&!E.state.isVisible||jh.isTouch||h&&h.type==="focus"?0:ZK(E.props.delay,fe?0:1,Nu.delay)}function N(fe){fe===void 0&&(fe=!1),S.style.pointerEvents=E.props.interactive&&!fe?"":"none",S.style.zIndex=""+E.props.zIndex}function F(fe,xe,Ie){if(Ie===void 0&&(Ie=!0),_.forEach(function(ye){ye[fe]&&ye[fe].apply(ye,xe)}),Ie){var Fe;(Fe=E.props)[fe].apply(Fe,xe)}}function B(){var fe=E.props.aria;if(fe.content){var xe="aria-"+fe.content,Ie=S.id,Fe=M2(E.props.triggerTarget||t);Fe.forEach(function(ye){var qe=ye.getAttribute(xe);if(E.state.isVisible)ye.setAttribute(xe,qe?qe+" "+Ie:Ie);else{var Re=qe&&qe.replace(Ie,"").trim();Re?ye.setAttribute(xe,Re):ye.removeAttribute(xe)}})}}function V(){if(!(M||!E.props.aria.expanded)){var fe=M2(E.props.triggerTarget||t);fe.forEach(function(xe){E.props.interactive?xe.setAttribute("aria-expanded",E.state.isVisible&&xe===R()?"true":"false"):xe.removeAttribute("aria-expanded")})}}function z(){D().removeEventListener("mousemove",g),ND=ND.filter(function(fe){return fe!==g})}function H(fe){if(!(jh.isTouch&&(l||fe.type==="mousedown"))){var xe=fe.composedPath&&fe.composedPath()[0]||fe.target;if(!(E.props.interactive&&KOe(S,xe))){if(M2(E.props.triggerTarget||t).some(function(Ie){return KOe(Ie,xe)})){if(jh.isTouch||E.state.isVisible&&E.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[E,fe]);E.props.hideOnClick===!0&&(E.clearDelayTimeouts(),E.hide(),o=!0,setTimeout(function(){o=!1}),E.state.isMounted||j())}}}function K(){l=!0}function X(){l=!1}function ne(){var fe=D();fe.addEventListener("mousedown",H,!0),fe.addEventListener("touchend",H,m1),fe.addEventListener("touchstart",X,m1),fe.addEventListener("touchmove",K,m1)}function j(){var fe=D();fe.removeEventListener("mousedown",H,!0),fe.removeEventListener("touchend",H,m1),fe.removeEventListener("touchstart",X,m1),fe.removeEventListener("touchmove",K,m1)}function ee(fe,xe){G(fe,function(){!E.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&xe()})}function Q(fe,xe){G(fe,xe)}function G(fe,xe){var Ie=P().box;function Fe(ye){ye.target===Ie&&(JK(Ie,"remove",Fe),xe())}if(fe===0)return xe();JK(Ie,"remove",f),JK(Ie,"add",Fe),f=Fe}function Z(fe,xe,Ie){Ie===void 0&&(Ie=!1);var Fe=M2(E.props.triggerTarget||t);Fe.forEach(function(ye){ye.addEventListener(fe,xe,Ie),p.push({node:ye,eventType:fe,handler:xe,options:Ie})})}function te(){O()&&(Z("touchstart",de,{passive:!0}),Z("touchend",re,{passive:!0})),ANt(E.props.trigger).forEach(function(fe){if(fe!=="manual")switch(Z(fe,de),fe){case"mouseenter":Z("mouseleave",re);break;case"focus":Z(VNt?"focusout":"blur",Be);break;case"focusin":Z("focusout",Be);break}})}function oe(){p.forEach(function(fe){var xe=fe.node,Ie=fe.eventType,Fe=fe.handler,ye=fe.options;xe.removeEventListener(Ie,Fe,ye)}),p=[]}function de(fe){var xe,Ie=!1;if(!(!E.state.isEnabled||le(fe)||o)){var Fe=((xe=h)==null?void 0:xe.type)==="focus";h=fe,m=fe.currentTarget,V(),!E.state.isVisible&&ONt(fe)&&ND.forEach(function(ye){return ye(fe)}),fe.type==="click"&&(E.props.trigger.indexOf("mouseenter")<0||s)&&E.props.hideOnClick!==!1&&E.state.isVisible?Ie=!0:Qe(fe),fe.type==="click"&&(s=!Ie),Ie&&!Fe&&et(fe)}}function pe(fe){var xe=fe.target,Ie=R().contains(xe)||S.contains(xe);if(!(fe.type==="mousemove"&&Ie)){var Fe=Ze().concat(S).map(function(ye){var qe,Re=ye._tippy,nt=(qe=Re.popperInstance)==null?void 0:qe.state;return nt?{popperRect:ye.getBoundingClientRect(),popperState:nt,props:r}:null}).filter(Boolean);PNt(Fe,fe)&&(z(),et(fe))}}function re(fe){var xe=le(fe)||E.props.trigger.indexOf("click")>=0&&s;if(!xe){if(E.props.interactive){E.hideWithInteractivity(fe);return}et(fe)}}function Be(fe){E.props.trigger.indexOf("focusin")<0&&fe.target!==R()||E.props.interactive&&fe.relatedTarget&&S.contains(fe.relatedTarget)||et(fe)}function le(fe){return jh.isTouch?O()!==fe.type.indexOf("touch")>=0:!1}function Se(){Ye();var fe=E.props,xe=fe.popperOptions,Ie=fe.placement,Fe=fe.offset,ye=fe.getReferenceClientRect,qe=fe.moveTransition,Re=C()?rZ(S).arrow:null,nt=ye?{getBoundingClientRect:ye,contextElement:ye.contextElement||R()}:t,mt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ae){var ke=ae.state;if(C()){var we=P(),Ne=we.box;["placement","reference-hidden","escaped"].forEach(function(Ge){Ge==="placement"?Ne.setAttribute("data-placement",ke.placement):ke.attributes.popper["data-popper-"+Ge]?Ne.setAttribute("data-"+Ge,""):Ne.removeAttribute("data-"+Ge)}),ke.attributes.popper={}}}},Tt=[{name:"offset",options:{offset:Fe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!qe}},mt];C()&&Re&&Tt.push({name:"arrow",options:{element:Re,padding:3}}),Tt.push.apply(Tt,xe?.modifiers||[]),E.popperInstance=KK(nt,S,Object.assign({},xe,{placement:Ie,onFirstUpdate:d,modifiers:Tt}))}function Ye(){E.popperInstance&&(E.popperInstance.destroy(),E.popperInstance=null)}function We(){var fe=E.props.appendTo,xe,Ie=R();E.props.interactive&&fe===iRe||fe==="parent"?xe=Ie.parentNode:xe=aRe(fe,[Ie]),xe.contains(S)||xe.appendChild(S),E.state.isMounted=!0,Se()}function Ze(){return PD(S.querySelectorAll("[data-tippy-root]"))}function Qe(fe){E.clearDelayTimeouts(),fe&&F("onTrigger",[E,fe]),ne();var xe=A(!0),Ie=I(),Fe=Ie[0],ye=Ie[1];jh.isTouch&&Fe==="hold"&&ye&&(xe=ye),xe?n=setTimeout(function(){E.show()},xe):E.show()}function et(fe){if(E.clearDelayTimeouts(),F("onUntrigger",[E,fe]),!E.state.isVisible){j();return}if(!(E.props.trigger.indexOf("mouseenter")>=0&&E.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(fe.type)>=0&&s)){var xe=A(!1);xe?i=setTimeout(function(){E.state.isVisible&&E.hide()},xe):a=requestAnimationFrame(function(){E.hide()})}}function ze(){E.state.isEnabled=!0}function He(){E.hide(),E.state.isEnabled=!1}function Ee(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(a)}function Y(fe){if(!E.state.isDestroyed){F("onBeforeUpdate",[E,fe]),oe();var xe=E.props,Ie=QOe(t,Object.assign({},xe,jOe(fe),{ignoreAttributes:!0}));E.props=Ie,te(),xe.interactiveDebounce!==Ie.interactiveDebounce&&(z(),g=GOe(pe,Ie.interactiveDebounce)),xe.triggerTarget&&!Ie.triggerTarget?M2(xe.triggerTarget).forEach(function(Fe){Fe.removeAttribute("aria-expanded")}):Ie.triggerTarget&&t.removeAttribute("aria-expanded"),V(),N(),L&&L(xe,Ie),E.popperInstance&&(Se(),Ze().forEach(function(Fe){requestAnimationFrame(Fe._tippy.popperInstance.forceUpdate)})),F("onAfterUpdate",[E,fe])}}function ve(fe){E.setProps({content:fe})}function ce(){var fe=E.state.isVisible,xe=E.state.isDestroyed,Ie=!E.state.isEnabled,Fe=jh.isTouch&&!E.props.touch,ye=ZK(E.props.duration,0,Nu.duration);if(!(fe||xe||Ie||Fe)&&!R().hasAttribute("disabled")&&(F("onShow",[E],!1),E.props.onShow(E)!==!1)){if(E.state.isVisible=!0,C()&&(S.style.visibility="visible"),N(),ne(),E.state.isMounted||(S.style.transition="none"),C()){var qe=P(),Re=qe.box,nt=qe.content;QK([Re,nt],0)}d=function(){var Tt;if(!(!E.state.isVisible||u)){if(u=!0,S.offsetHeight,S.style.transition=E.props.moveTransition,C()&&E.props.animation){var ue=P(),ae=ue.box,ke=ue.content;QK([ae,ke],ye),XOe([ae,ke],"visible")}B(),V(),YOe(eZ,E),(Tt=E.popperInstance)==null||Tt.forceUpdate(),F("onMount",[E]),E.props.animation&&C()&&Q(ye,function(){E.state.isShown=!0,F("onShown",[E])})}},We()}}function me(){var fe=!E.state.isVisible,xe=E.state.isDestroyed,Ie=!E.state.isEnabled,Fe=ZK(E.props.duration,1,Nu.duration);if(!(fe||xe||Ie)&&(F("onHide",[E],!1),E.props.onHide(E)!==!1)){if(E.state.isVisible=!1,E.state.isShown=!1,u=!1,s=!1,C()&&(S.style.visibility="hidden"),z(),j(),N(!0),C()){var ye=P(),qe=ye.box,Re=ye.content;E.props.animation&&(QK([qe,Re],Fe),XOe([qe,Re],"hidden"))}B(),V(),E.props.animation?C()&&ee(Fe,E.unmount):E.unmount()}}function q(fe){D().addEventListener("mousemove",g),YOe(ND,g),g(fe)}function Le(){E.state.isVisible&&E.hide(),E.state.isMounted&&(Ye(),Ze().forEach(function(fe){fe._tippy.unmount()}),S.parentNode&&S.parentNode.removeChild(S),eZ=eZ.filter(function(fe){return fe!==E}),E.state.isMounted=!1,F("onHidden",[E]))}function J(){E.state.isDestroyed||(E.clearDelayTimeouts(),E.unmount(),oe(),delete t._tippy,E.state.isDestroyed=!0,F("onDestroy",[E]))}}function dT(t,e){e===void 0&&(e={});var r=Nu.plugins.concat(e.plugins||[]);zNt();var n=Object.assign({},e,{plugins:r}),i=INt(t);if(0)var a,s;var o=i.reduce(function(l,u){var h=u&&XNt(u,n);return h&&l.push(h),l},[]);return FD(t)?o[0]:o}dT.defaultProps=Nu;dT.setDefaultProps=WNt;dT.currentInput=jh;var TXr=Object.assign({},aT,{effect:function(e){var r=e.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow)}});dT.setDefaultProps({render:lRe});var cRe=dT;var BD=class extends or{static values={message:String};connect(){this.tippyInstance=cRe(this.element,{content:this.messageValue})}destroy(){this.tippyInstance.destroy()}};var aZ={};Wt(aZ,{default:()=>zD});b();var zD=class extends or{static targets=["content"];static values={visible:Boolean};connect(){$Q(this)}disconnect(){this.contentTargets.forEach(e=>e.classList.toggle("hidden",!0))}on(){this.visibleValue=!0}off(){this.visibleValue=!1}toggle(){this.visibleValue=!this.visibleValue}async visibleValueChanged(e){if(e)this.contentTargets.forEach(r=>bD(r));else for(let r of this.contentTargets.reverse())await xD(r)}};var KNt=[{name:"announcement",module:z9,filename:"announcement_controller.js"},{name:"autosort",module:cO,filename:"autosort_controller.js"},{name:"autosubmit",module:hO,filename:"autosubmit_controller.js"},{name:"chart",module:VN,filename:"chart_controller.js"},{name:"chart-with-crosshair",module:qN,filename:"chart_with_crosshair_controller.js"},{name:"clipboard",module:WN,filename:"clipboard_controller.js"},{name:"css-toggle",module:GN,filename:"css_toggle_controller.js"},{name:"date-picker",module:ZN,filename:"date_picker_controller.js"},{name:"diagramming",module:kK,filename:"diagramming_controller.js"},{name:"disable",module:TK,filename:"disable_controller.js"},{name:"flash",module:EK,filename:"flash_controller.js"},{name:"lesson-toc",module:SK,filename:"lesson_toc_controller.js"},{name:"modal",module:AK,filename:"modal_controller.js"},{name:"open-menu",module:LK,filename:"open_menu_controller.js"},{name:"progress",module:MK,filename:"progress_controller.js"},{name:"scroll-to",module:DK,filename:"scroll_to_controller.js"},{name:"share-preview",module:IK,filename:"share_preview_controller.js"},{name:"syntax-highlighting",module:NK,filename:"syntax_highlighting_controller.js"},{name:"tabs",module:PK,filename:"tabs_controller.js"},{name:"tooltip",module:iZ,filename:"tooltip_controller.js"},{name:"visibility",module:aZ,filename:"visibility_controller.js"}],uRe=KNt;b();var oZ={};Wt(oZ,{default:()=>sZ});b();var sZ=class extends or{static targets=["likeCount"];static values={likeCount:String};likeCountTargetConnected(t){let e=t.innerText;e!==this.likeCountValue&&(this.likeCountValue=e)}likeCountValueChanged(t){this.element.dataset.sortCode!=t&&(this.element.dataset.sortCode=t)}};var ZNt=[{name:"..--..--components--project-submissions--item",module:oZ,filename:"../../components/project_submissions/item_controller.js"}],hRe=ZNt;var $D=IT.start();hRe.forEach(t=>{$D.register(t.name.replace("..--..--components--",""),t.module.default)});uRe.forEach(t=>{$D.register(t.name,t.module.default)});$D.debug=!1;window.Stimulus=$D;b();b();var xT={};Wt(xT,{FetchEnctype:()=>y0,FetchMethod:()=>Nl,FetchRequest:()=>x0,FetchResponse:()=>P2,FrameElement:()=>Pc,FrameLoadingStyle:()=>y1,FrameRenderer:()=>w1,PageRenderer:()=>z2,PageSnapshot:()=>Nc,StreamActions:()=>UZ,StreamElement:()=>QD,StreamSourceElement:()=>JD,cache:()=>NRe,clearCache:()=>$Re,connectStreamSource:()=>yT,disconnectStreamSource:()=>bT,fetch:()=>zZ,fetchEnctypeFromString:()=>MRe,fetchMethodFromString:()=>e9,isSafe:()=>t9,navigator:()=>PRe,registerAdapter:()=>FRe,renderStreamMessage:()=>zRe,session:()=>Ai,setConfirmMethod:()=>URe,setFormMode:()=>HRe,setProgressBarDelay:()=>VRe,start:()=>VZ,visit:()=>BRe});b();(function(t){if(typeof t.requestSubmit=="function")return;t.requestSubmit=function(n){n?(e(n,this),n.click()):(n=document.createElement("input"),n.type="submit",n.hidden=!0,this.appendChild(n),n.click(),this.removeChild(n))};function e(n,i){n instanceof HTMLElement||r(TypeError,"parameter 1 is not of type 'HTMLElement'"),n.type=="submit"||r(TypeError,"The specified element is not a submit button"),n.form==i||r(DOMException,"The specified element is not owned by this form element","NotFoundError")}function r(n,i,a){throw new n("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+i+".",a)}})(HTMLFormElement.prototype);var yRe=new WeakMap;function QNt(t){let e=t instanceof Element?t:t instanceof Node?t.parentElement:null,r=e?e.closest("input, button"):null;return r?.type=="submit"?r:null}function JNt(t){let e=QNt(t.target);e&&e.form&&yRe.set(e.form,e)}(function(){if("submitter"in Event.prototype)return;let t=window.Event.prototype;if("SubmitEvent"in window){let e=window.SubmitEvent.prototype;if(/Apple Computer/.test(navigator.vendor)&&!("submitter"in e))t=e;else return}addEventListener("click",JNt,!0),Object.defineProperty(t,"submitter",{get(){if(this.type=="submit"&&this.target instanceof HTMLFormElement)return yRe.get(this.target)}})})();var y1={eager:"eager",lazy:"lazy"},Pc=class t extends HTMLElement{static delegateConstructor=void 0;loaded=Promise.resolve();static get observedAttributes(){return["disabled","loading","src"]}constructor(){super(),this.delegate=new t.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){e=="loading"?this.delegate.loadingStyleChanged():e=="src"?this.delegate.sourceURLChanged():e=="disabled"&&this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get refresh(){return this.getAttribute("refresh")}set refresh(e){e?this.setAttribute("refresh",e):this.removeAttribute("refresh")}get loading(){return ePt(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){return this.ownerDocument?.documentElement?.hasAttribute("data-turbo-preview")}};function ePt(t){switch(t.toLowerCase()){case"lazy":return y1.lazy;default:return y1.eager}}function Ja(t){return new URL(t.toString(),document.baseURI)}function b1(t){let e;if(t.hash)return t.hash.slice(1);if(e=t.href.match(/#(.*)$/))return e[1]}function FZ(t,e){let r=e?.getAttribute("formaction")||t.getAttribute("action")||t.action;return Ja(r)}function tPt(t){return(sPt(t).match(/\.[^.]*$/)||[])[0]||""}function rPt(t){return!!tPt(t).match(/^(?:|\.(?:htm|html|xhtml|php))$/)}function nPt(t,e){let r=oPt(e);return t.href===Ja(r).href||t.href.startsWith(r)}function v0(t,e){return nPt(t,e)&&rPt(t)}function lZ(t){let e=b1(t);return e!=null?t.href.slice(0,-(e.length+1)):t.href}function VD(t){return lZ(t)}function iPt(t,e){return Ja(t).href==Ja(e).href}function aPt(t){return t.pathname.split("/").slice(1)}function sPt(t){return aPt(t).slice(-1)[0]}function oPt(t){return lPt(t.origin+t.pathname)}function lPt(t){return t.endsWith("/")?t:t+"/"}var P2=class{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return Ja(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}};function pT(t){if(t.getAttribute("data-turbo-eval")=="false")return t;{let e=document.createElement("script"),r=F2("csp-nonce");return r&&(e.nonce=r),e.textContent=t.textContent,e.async=!1,cPt(e,t),e}}function cPt(t,e){for(let{name:r,value:n}of e.attributes)t.setAttribute(r,n)}function uPt(t){let e=document.createElement("template");return e.innerHTML=t,e.content}function $i(t,{target:e,cancelable:r,detail:n}={}){let i=new CustomEvent(t,{cancelable:r,bubbles:!0,composed:!0,detail:n});return e&&e.isConnected?e.dispatchEvent(i):document.documentElement.dispatchEvent(i),i}function R2(){return document.visibilityState==="hidden"?xRe():bRe()}function bRe(){return new Promise(t=>requestAnimationFrame(()=>t()))}function xRe(){return new Promise(t=>setTimeout(()=>t(),0))}function hPt(){return Promise.resolve()}function wRe(t=""){return new DOMParser().parseFromString(t,"text/html")}function kRe(t,...e){let r=fPt(t,e).replace(/^\n/,"").split(` `),n=r[0].match(/^\s+/),i=n?n[0].length:0;return r.map(a=>a.slice(i)).join(` `)}function fPt(t,e){return t.reduce((r,n,i)=>{let a=e[i]==null?"":e[i];return r+n+a},"")}function b0(){return Array.from({length:36}).map((t,e)=>e==8||e==13||e==18||e==23?"-":e==14?"4":e==19?(Math.floor(Math.random()*4)+8).toString(16):Math.floor(Math.random()*15).toString(16)).join("")}function HD(t,...e){for(let r of e.map(n=>n?.getAttribute(t)))if(typeof r=="string")return r;return null}function dPt(t,...e){return e.some(r=>r&&r.hasAttribute(t))}function qD(...t){for(let e of t)e.localName=="turbo-frame"&&e.setAttribute("busy",""),e.setAttribute("aria-busy","true")}function WD(...t){for(let e of t)e.localName=="turbo-frame"&&e.removeAttribute("busy"),e.removeAttribute("aria-busy")}function pPt(t,e=2e3){return new Promise(r=>{let n=()=>{t.removeEventListener("error",n),t.removeEventListener("load",n),r()};t.addEventListener("load",n,{once:!0}),t.addEventListener("error",n,{once:!0}),setTimeout(r,e)})}function TRe(t){switch(t){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function gPt(t){return t=="advance"||t=="replace"||t=="restore"}function x1(...t){let e=HD("data-turbo-action",...t);return gPt(e)?e:null}function ERe(t){return document.querySelector(`meta[name="${t}"]`)}function F2(t){let e=ERe(t);return e&&e.content}function mPt(t,e){let r=ERe(t);return r||(r=document.createElement("meta"),r.setAttribute("name",t),document.head.appendChild(r)),r.setAttribute("content",e),r}function I2(t,e){if(t instanceof Element)return t.closest(e)||I2(t.assignedSlot||t.getRootNode()?.host,e)}function BZ(t){return!!t&&t.closest("[inert], :disabled, [hidden], details:not([open]), dialog:not([open])")==null&&typeof t.focus=="function"}function SRe(t){return Array.from(t.querySelectorAll("[autofocus]")).find(BZ)}async function vPt(t,e){let r=e();t(),await bRe();let n=e();return[r,n]}function CRe(t){if(t==="_blank")return!1;if(t){for(let e of document.getElementsByName(t))if(e instanceof HTMLIFrameElement)return!1;return!0}else return!0}function _Re(t){return I2(t,"a[href]:not([target^=_]):not([download])")}function ARe(t){return Ja(t.getAttribute("href")||"")}function yPt(t,e){let r=null;return(...n)=>{let i=()=>t.apply(this,n);clearTimeout(r),r=setTimeout(i,e)}}var cZ=class extends Set{constructor(e){super(),this.maxSize=e}add(e){if(this.size>=this.maxSize){let n=this.values().next().value;this.delete(n)}super.add(e)}},LRe=new cZ(20),bPt=window.fetch;function zZ(t,e={}){let r=new Headers(e.headers||{}),n=b0();return LRe.add(n),r.append("X-Turbo-Request-Id",n),bPt(t,{...e,headers:r})}function e9(t){switch(t.toLowerCase()){case"get":return Nl.get;case"post":return Nl.post;case"put":return Nl.put;case"patch":return Nl.patch;case"delete":return Nl.delete}}var Nl={get:"get",post:"post",put:"put",patch:"patch",delete:"delete"};function MRe(t){switch(t.toLowerCase()){case y0.multipart:return y0.multipart;case y0.plain:return y0.plain;default:return y0.urlEncoded}}var y0={urlEncoded:"application/x-www-form-urlencoded",multipart:"multipart/form-data",plain:"text/plain"},x0=class{abortController=new AbortController;#e=e=>{};constructor(e,r,n,i=new URLSearchParams,a=null,s=y0.urlEncoded){let[o,l]=fRe(Ja(n),r,i,s);this.delegate=e,this.url=o,this.target=a,this.fetchOptions={credentials:"same-origin",redirect:"follow",method:r.toUpperCase(),headers:{...this.defaultHeaders},body:l,signal:this.abortSignal,referrer:this.delegate.referrer?.href},this.enctype=s}get method(){return this.fetchOptions.method}set method(e){let r=this.isSafe?this.url.searchParams:this.fetchOptions.body||new FormData,n=e9(e)||Nl.get;this.url.search="";let[i,a]=fRe(this.url,n,r,this.enctype);this.url=i,this.fetchOptions.body=a,this.fetchOptions.method=n.toUpperCase()}get headers(){return this.fetchOptions.headers}set headers(e){this.fetchOptions.headers=e}get body(){return this.isSafe?this.url.searchParams:this.fetchOptions.body}set body(e){this.fetchOptions.body=e}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){let{fetchOptions:e}=this;this.delegate.prepareRequest(this);let r=await this.#t(e);try{this.delegate.requestStarted(this),r.detail.fetchRequest?this.response=r.detail.fetchRequest.response:this.response=zZ(this.url.href,e);let n=await this.response;return await this.receive(n)}catch(n){if(n.name!=="AbortError")throw this.#r(n)&&this.delegate.requestErrored(this,n),n}finally{this.delegate.requestFinished(this)}}async receive(e){let r=new P2(e);return $i("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:r},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,r):r.succeeded?this.delegate.requestSucceededWithResponse(this,r):this.delegate.requestFailedWithResponse(this,r),r}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isSafe(){return t9(this.method)}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async#t(e){let r=new Promise(i=>this.#e=i),n=$i("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.#e},target:this.target});return this.url=n.detail.url,n.defaultPrevented&&await r,n}#r(e){return!$i("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}};function t9(t){return e9(t)==Nl.get}function fRe(t,e,r,n){let i=Array.from(r).length>0?new URLSearchParams(DRe(r)):t.searchParams;return t9(e)?[xPt(t,i),null]:n==y0.urlEncoded?[t,i]:[t,r]}function DRe(t){let e=[];for(let[r,n]of t)n instanceof File||e.push([r,n]);return e}function xPt(t,e){let r=new URLSearchParams(DRe(e));return t.search=r.toString(),t}var uZ=class{started=!1;constructor(e,r){this.delegate=e,this.element=r,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}intersect=e=>{e.slice(-1)[0]?.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)}},w0=class{static contentType="text/vnd.turbo-stream.html";static wrap(e){return typeof e=="string"?new this(uPt(e)):e}constructor(e){this.fragment=wPt(e)}};function wPt(t){for(let e of t.querySelectorAll("turbo-stream")){let r=document.importNode(e,!0);for(let n of r.templateElement.content.querySelectorAll("script"))n.replaceWith(pT(n));e.replaceWith(r)}return t}var kPt=100,hZ=class{#e=null;#t=null;get(e){if(this.#t&&this.#t.url===e&&this.#t.expire>Date.now())return this.#t.request}setLater(e,r,n){this.clear(),this.#e=setTimeout(()=>{r.perform(),this.set(e,r,n),this.#e=null},kPt)}set(e,r,n){this.#t={url:e,request:r,expire:new Date(new Date().getTime()+n)}}clear(){this.#e&&clearTimeout(this.#e),this.#t=null}},TPt=10*1e3,O2=new hZ,D2={initialized:"initialized",requesting:"requesting",waiting:"waiting",receiving:"receiving",stopping:"stopping",stopped:"stopped"},gT=class t{state=D2.initialized;static confirmMethod(e,r,n){return Promise.resolve(confirm(e))}constructor(e,r,n,i=!1){let a=LPt(r,n),s=APt(_Pt(r,n),a),o=EPt(r,n),l=MPt(r,n);this.delegate=e,this.formElement=r,this.submitter=n,this.fetchRequest=new x0(this,a,s,o,r,l),this.mustRedirect=i}get method(){return this.fetchRequest.method}set method(e){this.fetchRequest.method=e}get action(){return this.fetchRequest.url.toString()}set action(e){this.fetchRequest.url=Ja(e)}get body(){return this.fetchRequest.body}get enctype(){return this.fetchRequest.enctype}get isSafe(){return this.fetchRequest.isSafe}get location(){return this.fetchRequest.url}async start(){let{initialized:e,requesting:r}=D2,n=HD("data-turbo-confirm",this.submitter,this.formElement);if(!(typeof n=="string"&&!await t.confirmMethod(n,this.formElement,this.submitter))&&this.state==e)return this.state=r,this.fetchRequest.perform()}stop(){let{stopping:e,stopped:r}=D2;if(this.state!=e&&this.state!=r)return this.state=e,this.fetchRequest.cancel(),!0}prepareRequest(e){if(!e.isSafe){let r=SPt(F2("csrf-param"))||F2("csrf-token");r&&(e.headers["X-CSRF-Token"]=r)}this.requestAcceptsTurboStreamResponse(e)&&e.acceptResponseType(w0.contentType)}requestStarted(e){this.state=D2.waiting,this.submitter?.setAttribute("disabled",""),this.setSubmitsWith(),qD(this.formElement),$i("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,r){O2.clear(),this.result={success:r.succeeded,fetchResponse:r}}requestSucceededWithResponse(e,r){if(r.clientError||r.serverError){this.delegate.formSubmissionFailedWithResponse(this,r);return}if(O2.clear(),this.requestMustRedirect(e)&&CPt(r)){let n=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,n)}else this.state=D2.receiving,this.result={success:!0,fetchResponse:r},this.delegate.formSubmissionSucceededWithResponse(this,r)}requestFailedWithResponse(e,r){this.result={success:!1,fetchResponse:r},this.delegate.formSubmissionFailedWithResponse(this,r)}requestErrored(e,r){this.result={success:!1,error:r},this.delegate.formSubmissionErrored(this,r)}requestFinished(e){this.state=D2.stopped,this.submitter?.removeAttribute("disabled"),this.resetSubmitterText(),WD(this.formElement),$i("turbo:submit-end",{target:this.formElement,detail:{formSubmission:this,...this.result}}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){if(!(!this.submitter||!this.submitsWith)){if(this.submitter.matches("button"))this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith;else if(this.submitter.matches("input")){let e=this.submitter;this.originalSubmitText=e.value,e.value=this.submitsWith}}}resetSubmitterText(){if(!(!this.submitter||!this.originalSubmitText)){if(this.submitter.matches("button"))this.submitter.innerHTML=this.originalSubmitText;else if(this.submitter.matches("input")){let e=this.submitter;e.value=this.originalSubmitText}}}requestMustRedirect(e){return!e.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isSafe||dPt("data-turbo-stream",this.submitter,this.formElement)}get submitsWith(){return this.submitter?.getAttribute("data-turbo-submits-with")}};function EPt(t,e){let r=new FormData(t),n=e?.getAttribute("name"),i=e?.getAttribute("value");return n&&r.append(n,i||""),r}function SPt(t){if(t!=null){let r=(document.cookie?document.cookie.split("; "):[]).find(n=>n.startsWith(t));if(r){let n=r.split("=").slice(1).join("=");return n?decodeURIComponent(n):void 0}}}function CPt(t){return t.statusCode==200&&!t.redirected}function _Pt(t,e){let r=typeof t.action=="string"?t.action:null;return e?.hasAttribute("formaction")?e.getAttribute("formaction")||"":t.getAttribute("action")||r||""}function APt(t,e){let r=Ja(t);return t9(e)&&(r.search=""),r}function LPt(t,e){let r=e?.getAttribute("formmethod")||t.getAttribute("method")||"";return e9(r.toLowerCase())||Nl.get}function MPt(t,e){return MRe(e?.getAttribute("formenctype")||t.enctype)}var B2=class{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return this.getElementForAnchor(e)!=null}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return SRe(this.element)}get permanentElements(){return RRe(this.element)}getPermanentElementById(e){return ORe(this.element,e)}getPermanentElementMapForSnapshot(e){let r={};for(let n of this.permanentElements){let{id:i}=n,a=e.getPermanentElementById(i);a&&(r[i]=[n,a])}return r}};function ORe(t,e){return t.querySelector(`#${e}[data-turbo-permanent]`)}function RRe(t){return t.querySelectorAll("[id][data-turbo-permanent]")}var mT=class{started=!1;constructor(e,r){this.delegate=e,this.eventTarget=r}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)};submitBubbled=e=>{if(!e.defaultPrevented){let r=e.target instanceof HTMLFormElement?e.target:void 0,n=e.submitter||void 0;r&&DPt(r,n)&&OPt(r,n)&&this.delegate.willSubmitForm(r,n)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmitted(r,n))}}};function DPt(t,e){return(e?.getAttribute("formmethod")||t.getAttribute("method"))!="dialog"}function OPt(t,e){let r=e?.getAttribute("formtarget")||t.getAttribute("target");return CRe(r)}var GD=class{#e=e=>{};#t=e=>{};constructor(e,r){this.delegate=e,this.element=r}scrollToAnchor(e){let r=this.snapshot.getElementForAnchor(e);r?(this.scrollToElement(r),this.focusElement(r)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(b1(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:r}){this.scrollRoot.scrollTo(e,r)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}async render(e){let{isPreview:r,shouldRender:n,willRender:i,newSnapshot:a}=e,s=i;if(n)try{this.renderPromise=new Promise(h=>this.#e=h),this.renderer=e,await this.prepareToRenderSnapshot(e);let o=new Promise(h=>this.#t=h),l={resume:this.#t,render:this.renderer.renderElement,renderMethod:this.renderer.renderMethod};this.delegate.allowsImmediateRender(a,l)||await o,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(a,r,this.renderer.renderMethod),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.#e(void 0),delete this.renderPromise}else s&&this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}markVisitDirection(e){this.element.setAttribute("data-turbo-visit-direction",e)}unmarkVisitDirection(){this.element.removeAttribute("data-turbo-visit-direction")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}},fZ=class extends GD{missing(){this.element.innerHTML='Content missing'}get snapshot(){return new B2(this.element)}},YD=class{constructor(e,r){this.delegate=e,this.element=r}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}clickBubbled=e=>{this.clickEventIsSignificant(e)?this.clickEvent=e:delete this.clickEvent};linkClicked=e=>{this.clickEvent&&this.clickEventIsSignificant(e)&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.originalEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delete this.clickEvent};willVisit=e=>{delete this.clickEvent};clickEventIsSignificant(e){let r=e.composed?e.target?.parentElement:e.target,n=_Re(r)||r;return n instanceof Element&&n.closest("turbo-frame, html")==this.element}},jD=class{started=!1;constructor(e,r){this.delegate=e,this.eventTarget=r}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)};clickBubbled=e=>{if(e instanceof MouseEvent&&this.clickEventIsSignificant(e)){let r=e.composedPath&&e.composedPath()[0]||e.target,n=_Re(r);if(n&&CRe(n.target)){let i=ARe(n);this.delegate.willFollowLinkToLocation(n,i,e)&&(e.preventDefault(),this.delegate.followedLinkToLocation(n,i))}}};clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}},XD=class{constructor(e,r){this.delegate=e,this.linkInterceptor=new jD(this,r)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}canPrefetchRequestToLocation(e,r){return!1}prefetchAndCacheRequestToLocation(e,r){}willFollowLinkToLocation(e,r,n){return this.delegate.willSubmitFormLinkToLocation(e,r,n)&&(e.hasAttribute("data-turbo-method")||e.hasAttribute("data-turbo-stream"))}followedLinkToLocation(e,r){let n=document.createElement("form"),i="hidden";for(let[f,d]of r.searchParams)n.append(Object.assign(document.createElement("input"),{type:i,name:f,value:d}));let a=Object.assign(r,{search:""});n.setAttribute("data-turbo","true"),n.setAttribute("action",a.href),n.setAttribute("hidden","");let s=e.getAttribute("data-turbo-method");s&&n.setAttribute("method",s);let o=e.getAttribute("data-turbo-frame");o&&n.setAttribute("data-turbo-frame",o);let l=x1(e);l&&n.setAttribute("data-turbo-action",l);let u=e.getAttribute("data-turbo-confirm");u&&n.setAttribute("data-turbo-confirm",u),e.hasAttribute("data-turbo-stream")&&n.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,r,n),document.body.appendChild(n),n.addEventListener("turbo:submit-end",()=>n.remove(),{once:!0}),requestAnimationFrame(()=>n.requestSubmit())}},KD=class{static async preservingPermanentElements(e,r,n){let i=new this(e,r);i.enter(),await n(),i.leave()}constructor(e,r){this.delegate=e,this.permanentElementMap=r}enter(){for(let e in this.permanentElementMap){let[r,n]=this.permanentElementMap[e];this.delegate.enteringBardo(r,n),this.replaceNewPermanentElementWithPlaceholder(n)}}leave(){for(let e in this.permanentElementMap){let[r]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(r),this.replacePlaceholderWithPermanentElement(r),this.delegate.leavingBardo(r)}}replaceNewPermanentElementWithPlaceholder(e){let r=RPt(e);e.replaceWith(r)}replaceCurrentPermanentElementWithClone(e){let r=e.cloneNode(!0);e.replaceWith(r)}replacePlaceholderWithPermanentElement(e){this.getPlaceholderById(e.id)?.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(r=>r.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}};function RPt(t){let e=document.createElement("meta");return e.setAttribute("name","turbo-permanent-placeholder"),e.setAttribute("content",t.id),e}var vT=class{#e=null;constructor(e,r,n,i,a=!0){this.currentSnapshot=e,this.newSnapshot=r,this.isPreview=i,this.willRender=a,this.renderElement=n,this.promise=new Promise((s,o)=>this.resolvingFunctions={resolve:s,reject:o})}get shouldRender(){return!0}get shouldAutofocus(){return!0}get reloadReason(){}prepareToRender(){}render(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await KD.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){if(this.shouldAutofocus){let e=this.connectedSnapshot.firstAutofocusableElement;e&&e.focus()}}enteringBardo(e){this.#e||e.contains(this.currentSnapshot.activeElement)&&(this.#e=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.#e)&&this.#e instanceof HTMLElement&&(this.#e.focus(),this.#e=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get renderMethod(){return"replace"}},w1=class extends vT{static renderElement(e,r){let n=document.createRange();n.selectNodeContents(e),n.deleteContents();let i=r,a=i.ownerDocument?.createRange();a&&(a.selectNodeContents(i),e.appendChild(a.extractContents()))}constructor(e,r,n,i,a,s=!0){super(r,n,i,a,s),this.delegate=e}get shouldRender(){return!0}async render(){await R2(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await R2(),this.focusFirstAutofocusableElement(),await R2(),this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){let e=this.currentElement.firstElementChild,r=IPt(this.currentElement.getAttribute("data-autoscroll-block"),"end"),n=NPt(this.currentElement.getAttribute("data-autoscroll-behavior"),"auto");if(e)return e.scrollIntoView({block:r,behavior:n}),!0}return!1}activateScriptElements(){for(let e of this.newScriptElements){let r=pT(e);e.replaceWith(r)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}};function IPt(t,e){return t=="end"||t=="start"||t=="center"||t=="nearest"?t:e}function NPt(t,e){return t=="auto"||t=="smooth"?t:e}var dZ=class t{static animationDuration=300;static get defaultCSS(){return kRe` .turbo-progress-bar { position: fixed; display: block; top: 0; left: 0; height: 3px; background: #0076ff; z-index: 2147483647; transition: width ${t.animationDuration}ms ease-out, opacity ${t.animationDuration/2}ms ${t.animationDuration/2}ms ease-in; transform: translate3d(0, 0, 0); } `}hiding=!1;value=0;visible=!1;constructor(){this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,t.animationDuration*1.5)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,t.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}trickle=()=>{this.setValue(this.value+Math.random()/100)};refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=`${10+this.value*90}%`})}createStylesheetElement(){let e=document.createElement("style");return e.type="text/css",e.textContent=t.defaultCSS,this.cspNonce&&(e.nonce=this.cspNonce),e}createProgressElement(){let e=document.createElement("div");return e.className="turbo-progress-bar",e}get cspNonce(){return F2("csp-nonce")}},pZ=class extends B2{detailsByOuterHTML=this.children.filter(e=>!zPt(e)).map(e=>UPt(e)).reduce((e,r)=>{let{outerHTML:n}=r,i=n in e?e[n]:{type:PPt(r),tracked:FPt(r),elements:[]};return{...e,[n]:{...i,elements:[...i.elements,r]}}},{});get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,r){return Object.keys(this.detailsByOuterHTML).filter(n=>!(n in r.detailsByOuterHTML)).map(n=>this.detailsByOuterHTML[n]).filter(({type:n})=>n==e).map(({elements:[n]})=>n)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,r)=>{let{type:n,tracked:i,elements:a}=this.detailsByOuterHTML[r];return n==null&&!i?[...e,...a]:a.length>1?[...e,...a.slice(1)]:e},[])}getMetaValue(e){let r=this.findMetaElementByName(e);return r?r.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((r,n)=>{let{elements:[i]}=this.detailsByOuterHTML[n];return VPt(i,e)?i:r},void 0|void 0)}};function PPt(t){if(BPt(t))return"script";if($Pt(t))return"stylesheet"}function FPt(t){return t.getAttribute("data-turbo-track")=="reload"}function BPt(t){return t.localName=="script"}function zPt(t){return t.localName=="noscript"}function $Pt(t){let e=t.localName;return e=="style"||e=="link"&&t.getAttribute("rel")=="stylesheet"}function VPt(t,e){return t.localName=="meta"&&t.getAttribute("name")==e}function UPt(t){return t.hasAttribute("nonce")&&t.setAttribute("nonce",""),t}var Nc=class t extends B2{static fromHTMLString(e=""){return this.fromDocument(wRe(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({documentElement:e,body:r,head:n}){return new this(e,r,new pZ(n))}constructor(e,r,n){super(r),this.documentElement=e,this.headSnapshot=n}clone(){let e=this.element.cloneNode(!0),r=this.element.querySelectorAll("select"),n=e.querySelectorAll("select");for(let[i,a]of r.entries()){let s=n[i];for(let o of s.selectedOptions)o.selected=!1;for(let o of a.selectedOptions)s.options[o.index].selected=!0}for(let i of e.querySelectorAll('input[type="password"]'))i.value="";return new t(this.documentElement,e,this.headSnapshot)}get lang(){return this.documentElement.getAttribute("lang")}get headElement(){return this.headSnapshot.element}get rootLocation(){let e=this.getSetting("root")??"/";return Ja(e)}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return this.cacheControlValue!="no-preview"}get isCacheable(){return this.cacheControlValue!="no-cache"}get isVisitable(){return this.getSetting("visit-control")!="reload"}get prefersViewTransitions(){return this.headSnapshot.getMetaValue("view-transition")==="same-origin"}get shouldMorphPage(){return this.getSetting("refresh-method")==="morph"}get shouldPreserveScrollPosition(){return this.getSetting("refresh-scroll")==="preserve"}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}},gZ=class{#e=!1;#t=Promise.resolve();renderChange(e,r){return e&&this.viewTransitionsAvailable&&!this.#e?(this.#e=!0,this.#t=this.#t.then(async()=>{await document.startViewTransition(r).finished})):this.#t=this.#t.then(r),this.#t}get viewTransitionsAvailable(){return document.startViewTransition}},HPt={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1},UD={visitStart:"visitStart",requestStart:"requestStart",requestEnd:"requestEnd",visitEnd:"visitEnd"},Ad={initialized:"initialized",started:"started",canceled:"canceled",failed:"failed",completed:"completed"},N2={networkFailure:0,timeoutFailure:-1,contentTypeMismatch:-2},qPt={advance:"forward",restore:"back",replace:"none"},mZ=class{identifier=b0();timingMetrics={};followedRedirect=!1;historyChanged=!1;scrolled=!1;shouldCacheSnapshot=!0;acceptsStreamResponse=!1;snapshotCached=!1;state=Ad.initialized;viewTransitioner=new gZ;constructor(e,r,n,i={}){this.delegate=e,this.location=r,this.restorationIdentifier=n||b0();let{action:a,historyChanged:s,referrer:o,snapshot:l,snapshotHTML:u,response:h,visitCachedSnapshot:f,willRender:d,updateHistory:p,shouldCacheSnapshot:g,acceptsStreamResponse:m,direction:v}={...HPt,...i};this.action=a,this.historyChanged=s,this.referrer=o,this.snapshot=l,this.snapshotHTML=u,this.response=h,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.isPageRefresh=this.view.isPageRefresh(this),this.visitCachedSnapshot=f,this.willRender=d,this.updateHistory=p,this.scrolled=!d,this.shouldCacheSnapshot=g,this.acceptsStreamResponse=m,this.direction=v||qPt[a]}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==Ad.initialized&&(this.recordTimingMetric(UD.visitStart),this.state=Ad.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==Ad.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=Ad.canceled)}complete(){this.state==Ad.started&&(this.recordTimingMetric(UD.visitEnd),this.adapter.visitCompleted(this),this.state=Ad.completed,this.followRedirect(),this.followedRedirect||this.delegate.visitCompleted(this))}fail(){this.state==Ad.started&&(this.state=Ad.failed,this.adapter.visitFailed(this),this.delegate.visitCompleted(this))}changeHistory(){if(!this.historyChanged&&this.updateHistory){let e=this.location.href===this.referrer?.href?"replace":this.action,r=TRe(e);this.history.update(r,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new x0(this,Nl.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(UD.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){let{statusCode:r}=e;dRe(r)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,r)}}finishRequest(){this.recordTimingMetric(UD.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){let{statusCode:e,responseHTML:r}=this.response;this.render(async()=>{if(this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,dRe(e)&&r!=null){let n=Nc.fromHTMLString(r);await this.renderPageSnapshot(n,!1),this.adapter.visitRendered(this),this.complete()}else await this.view.renderError(Nc.fromHTMLString(r),this),this.adapter.visitRendered(this),this.fail()})}}getCachedSnapshot(){let e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!b1(this.location)||e.hasAnchor(b1(this.location)))&&(this.action=="restore"||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return Nc.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return this.getCachedSnapshot()!=null}loadCachedSnapshot(){let e=this.getCachedSnapshot();if(e){let r=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isSamePage||this.isPageRefresh?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.renderPageSnapshot(e,r),this.adapter.visitRendered(this),r||this.complete())})}}followRedirect(){this.redirectedToLocation&&!this.followedRedirect&&this.response?.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(async()=>{this.cacheSnapshot(),this.performScroll(),this.changeHistory(),this.adapter.visitRendered(this)})}prepareRequest(e){this.acceptsStreamResponse&&e.acceptResponseType(w0.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,r){}async requestSucceededWithResponse(e,r){let n=await r.responseHTML,{redirected:i,statusCode:a}=r;n==null?this.recordResponse({statusCode:N2.contentTypeMismatch,redirected:i}):(this.redirectedToLocation=r.redirected?r.location:void 0,this.recordResponse({statusCode:a,responseHTML:n,redirected:i}))}async requestFailedWithResponse(e,r){let n=await r.responseHTML,{redirected:i,statusCode:a}=r;n==null?this.recordResponse({statusCode:N2.contentTypeMismatch,redirected:i}):this.recordResponse({statusCode:a,responseHTML:n,redirected:i})}requestErrored(e,r){this.recordResponse({statusCode:N2.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){!this.scrolled&&!this.view.forceReloaded&&!this.view.shouldPreserveScrollPosition(this)&&(this.action=="restore"?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){let{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){let e=b1(this.location);if(e!=null)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=new Date().getTime()}getTimingMetrics(){return{...this.timingMetrics}}getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}hasPreloadedResponse(){return typeof this.response=="object"}shouldIssueRequest(){return this.isSamePage?!1:this.action=="restore"?!this.hasCachedSnapshot():this.willRender}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(e=>e&&this.visitCachedSnapshot(e)),this.snapshotCached=!0)}async render(e){this.cancelRender(),this.frame=await R2(),await e(),delete this.frame}async renderPageSnapshot(e,r){await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(e),async()=>{await this.view.renderPage(e,r,this.willRender,this),this.performScroll()})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}};function dRe(t){return t>=200&&t<300}var vZ=class{progressBar=new dZ;constructor(e){this.session=e}visitProposedToLocation(e,r){v0(e,this.navigator.rootLocation)?this.navigator.startVisit(e,r?.restorationIdentifier||b0(),r):window.location.href=e.toString()}visitStarted(e){this.location=e.location,e.loadCachedSnapshot(),e.issueRequest(),e.goToSamePageAnchor()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||e.action!="restore"?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithStatusCode(e,r){switch(r){case N2.networkFailure:case N2.timeoutFailure:case N2.contentTypeMismatch:return this.reload({reason:"request_failed",context:{statusCode:r}});default:return e.loadResponse()}}visitRequestFinished(e){}visitCompleted(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}pageInvalidated(e){this.reload(e)}visitFailed(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitRendered(e){}formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),this.visitProgressBarTimeout!=null&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){this.formProgressBarTimeout==null&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),this.formProgressBarTimeout!=null&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}showProgressBar=()=>{this.progressBar.show()};reload(e){$i("turbo:reload",{detail:e}),window.location.href=this.location?.toString()||window.location.href}get navigator(){return this.session.navigator}},yZ=class{selector="[data-turbo-temporary]";deprecatedSelector="[data-turbo-cache=false]";started=!1;start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}removeTemporaryElements=e=>{for(let r of this.temporaryElements)r.remove()};get temporaryElements(){return[...document.querySelectorAll(this.selector),...this.temporaryElementsWithDeprecation]}get temporaryElementsWithDeprecation(){let e=document.querySelectorAll(this.deprecatedSelector);return e.length&&console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`),[...e]}},bZ=class{constructor(e,r){this.session=e,this.element=r,this.linkInterceptor=new YD(this,r),this.formSubmitObserver=new mT(this,r)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,r,n){return this.#t(e)}linkClickIntercepted(e,r,n){let i=this.#r(e);i&&i.delegate.linkClickIntercepted(e,r,n)}willSubmitForm(e,r){return e.closest("turbo-frame")==null&&this.#e(e,r)&&this.#t(e,r)}formSubmitted(e,r){let n=this.#r(e,r);n&&n.delegate.formSubmitted(e,r)}#e(e,r){let n=FZ(e,r),i=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),a=Ja(i?.content??"/");return this.#t(e,r)&&v0(n,a)}#t(e,r){if(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,r):this.session.elementIsNavigatable(e)){let i=this.#r(e,r);return i?i!=e.closest("turbo-frame"):!1}else return!1}#r(e,r){let n=r?.getAttribute("data-turbo-frame")||e.getAttribute("data-turbo-frame");if(n&&n!="_top"){let i=this.element.querySelector(`#${n}:not([disabled])`);if(i instanceof Pc)return i}}},xZ=class{location;restorationIdentifier=b0();restorationData={};started=!1;pageLoaded=!1;currentIndex=0;constructor(e){this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.currentIndex=history.state?.turbo?.restorationIndex||0,this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)}push(e,r){this.update(history.pushState,e,r)}replace(e,r){this.update(history.replaceState,e,r)}update(e,r,n=b0()){e===history.pushState&&++this.currentIndex;let i={turbo:{restorationIdentifier:n,restorationIndex:this.currentIndex}};e.call(history,i,"",r.href),this.location=r,this.restorationIdentifier=n}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){let{restorationIdentifier:r}=this,n=this.restorationData[r];this.restorationData[r]={...n,...e}}assumeControlOfScrollRestoration(){this.previousScrollRestoration||(this.previousScrollRestoration=history.scrollRestoration??"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}onPopState=e=>{if(this.shouldHandlePopState()){let{turbo:r}=e.state||{};if(r){this.location=new URL(window.location.href);let{restorationIdentifier:n,restorationIndex:i}=r;this.restorationIdentifier=n;let a=i>this.currentIndex?"forward":"back";this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location,n,a),this.currentIndex=i}}};onPageLoad=async e=>{await hPt(),this.pageLoaded=!0};shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||document.readyState=="complete"}},wZ=class{started=!1;#e=null;constructor(e,r){this.delegate=e,this.eventTarget=r}start(){this.started||(this.eventTarget.readyState==="loading"?this.eventTarget.addEventListener("DOMContentLoaded",this.#t,{once:!0}):this.#t())}stop(){this.started&&(this.eventTarget.removeEventListener("mouseenter",this.#r,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("mouseleave",this.#i,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("turbo:before-fetch-request",this.#n,!0),this.started=!1)}#t=()=>{this.eventTarget.addEventListener("mouseenter",this.#r,{capture:!0,passive:!0}),this.eventTarget.addEventListener("mouseleave",this.#i,{capture:!0,passive:!0}),this.eventTarget.addEventListener("turbo:before-fetch-request",this.#n,!0),this.started=!0};#r=e=>{if(F2("turbo-prefetch")==="false")return;let r=e.target;if(r.matches&&r.matches("a[href]:not([target^=_]):not([download])")&&this.#l(r)){let i=r,a=ARe(i);if(this.delegate.canPrefetchRequestToLocation(i,a)){this.#e=i;let s=new x0(this,Nl.get,a,new URLSearchParams,r);O2.setLater(a.toString(),s,this.#o)}}};#i=e=>{e.target===this.#e&&this.#a()};#a=()=>{O2.clear(),this.#e=null};#n=e=>{if(e.target.tagName!=="FORM"&&e.detail.fetchOptions.method==="GET"){let r=O2.get(e.detail.url.toString());r&&(e.detail.fetchRequest=r),O2.clear()}};prepareRequest(e){let r=e.target;e.headers["X-Sec-Purpose"]="prefetch";let n=r.closest("turbo-frame"),i=r.getAttribute("data-turbo-frame")||n?.getAttribute("target")||n?.id;i&&i!=="_top"&&(e.headers["Turbo-Frame"]=i)}requestSucceededWithResponse(){}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,r){}requestFailedWithResponse(e,r){}get#o(){return Number(F2("turbo-prefetch-cache-time"))||TPt}#l(e){return!(!e.getAttribute("href")||WPt(e)||GPt(e)||YPt(e)||jPt(e)||KPt(e))}},WPt=t=>t.origin!==document.location.origin||!["http:","https:"].includes(t.protocol)||t.hasAttribute("target"),GPt=t=>t.pathname+t.search===document.location.pathname+document.location.search||t.href.startsWith("#"),YPt=t=>{if(t.getAttribute("data-turbo-prefetch")==="false"||t.getAttribute("data-turbo")==="false")return!0;let e=I2(t,"[data-turbo-prefetch]");return!!(e&&e.getAttribute("data-turbo-prefetch")==="false")},jPt=t=>{let e=t.getAttribute("data-turbo-method");return!!(e&&e.toLowerCase()!=="get"||XPt(t)||t.hasAttribute("data-turbo-confirm")||t.hasAttribute("data-turbo-stream"))},XPt=t=>t.hasAttribute("data-remote")||t.hasAttribute("data-behavior")||t.hasAttribute("data-confirm")||t.hasAttribute("data-method"),KPt=t=>$i("turbo:before-prefetch",{target:t,cancelable:!0}).defaultPrevented,kZ=class{constructor(e){this.delegate=e}proposeVisit(e,r={}){this.delegate.allowsVisitingLocationWithAction(e,r.action)&&this.delegate.visitProposedToLocation(e,r)}startVisit(e,r,n={}){this.stop(),this.currentVisit=new mZ(this,Ja(e),r,{referrer:this.location,...n}),this.currentVisit.start()}submitForm(e,r){this.stop(),this.formSubmission=new gT(this,e,r,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get rootLocation(){return this.view.snapshot.rootLocation}get history(){return this.delegate.history}formSubmissionStarted(e){typeof this.adapter.formSubmissionStarted=="function"&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,r){if(e==this.formSubmission){let n=await r.responseHTML;if(n){let i=e.isSafe;i||this.view.clearSnapshotCache();let{statusCode:a,redirected:s}=r,l={action:this.#e(e,r),shouldCacheSnapshot:i,response:{statusCode:a,responseHTML:n,redirected:s}};this.proposeVisit(r.location,l)}}}async formSubmissionFailedWithResponse(e,r){let n=await r.responseHTML;if(n){let i=Nc.fromHTMLString(n);r.serverError?await this.view.renderError(i,this.currentVisit):await this.view.renderPage(i,!1,!0,this.currentVisit),i.shouldPreserveScrollPosition||this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,r){console.error(r)}formSubmissionFinished(e){typeof this.adapter.formSubmissionFinished=="function"&&this.adapter.formSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e),delete this.currentVisit}locationWithActionIsSamePage(e,r){let n=b1(e),i=b1(this.view.lastRenderedLocation),a=r==="restore"&&typeof n>"u";return r!=="replace"&&lZ(e)===lZ(this.view.lastRenderedLocation)&&(a||n!=null&&n!==i)}visitScrolledToSamePageLocation(e,r){this.delegate.visitScrolledToSamePageLocation(e,r)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}#e(e,r){let{submitter:n,formElement:i}=e;return x1(n,i)||this.#t(r)}#t(e){return e.redirected&&e.location.href===this.location?.href?"replace":"advance"}},v1={initial:0,loading:1,interactive:2,complete:3},TZ=class{stage=v1.initial;started=!1;constructor(e){this.delegate=e}start(){this.started||(this.stage==v1.initial&&(this.stage=v1.loading),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}interpretReadyState=()=>{let{readyState:e}=this;e=="interactive"?this.pageIsInteractive():e=="complete"&&this.pageIsComplete()};pageIsInteractive(){this.stage==v1.loading&&(this.stage=v1.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==v1.interactive&&(this.stage=v1.complete,this.delegate.pageLoaded())}pageWillUnload=()=>{this.delegate.pageWillUnload()};get readyState(){return document.readyState}},EZ=class{started=!1;constructor(e){this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})};updatePosition(e){this.delegate.scrollPositionChanged(e)}},SZ=class{render({fragment:e}){KD.preservingPermanentElements(this,ZPt(e),()=>{QPt(e,()=>{JPt(()=>{document.documentElement.appendChild(e)})})})}enteringBardo(e,r){r.replaceWith(e.cloneNode(!0))}leavingBardo(){}};function ZPt(t){let e=RRe(document.documentElement),r={};for(let n of e){let{id:i}=n;for(let a of t.querySelectorAll("turbo-stream")){let s=ORe(a.templateElement.content,i);s&&(r[i]=[n,s])}}return r}async function QPt(t,e){let r=`turbo-stream-autofocus-${b0()}`,n=t.querySelectorAll("turbo-stream"),i=eFt(n),a=null;if(i&&(i.id?a=i.id:a=r,i.id=a),e(),await R2(),(document.activeElement==null||document.activeElement==document.body)&&a){let o=document.getElementById(a);BZ(o)&&o.focus(),o&&o.id==r&&o.removeAttribute("id")}}async function JPt(t){let[e,r]=await vPt(t,()=>document.activeElement),n=e&&e.id;if(n){let i=document.getElementById(n);BZ(i)&&i!=r&&i.focus()}}function eFt(t){for(let e of t){let r=SRe(e.templateElement.content);if(r)return r}return null}var CZ=class{sources=new Set;#e=!1;constructor(e){this.delegate=e}start(){this.#e||(this.#e=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.#e&&(this.#e=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}inspectFetchResponse=e=>{let r=tFt(e);r&&rFt(r)&&(e.preventDefault(),this.receiveMessageResponse(r))};receiveMessageEvent=e=>{this.#e&&typeof e.data=="string"&&this.receiveMessageHTML(e.data)};async receiveMessageResponse(e){let r=await e.responseHTML;r&&this.receiveMessageHTML(r)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(w0.wrap(e))}};function tFt(t){let e=t.detail?.fetchResponse;if(e instanceof P2)return e}function rFt(t){return(t.contentType??"").startsWith(w0.contentType)}var ZD=class extends vT{static renderElement(e,r){let{documentElement:n,body:i}=document;n.replaceChild(r,i)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){let{documentElement:e,head:r}=document;e.replaceChild(this.newHead,r),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(let e of this.scriptElements){let r=e.parentNode;if(r){let n=pT(e);r.replaceChild(n,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}},nFt=function(){let t=new Set,e={morphStyle:"outerHTML",callbacks:{beforeNodeAdded:d,afterNodeAdded:d,beforeNodeMorphed:d,afterNodeMorphed:d,beforeNodeRemoved:d,afterNodeRemoved:d,beforeAttributeUpdated:d},head:{style:"merge",shouldPreserve:function(A){return A.getAttribute("im-preserve")==="true"},shouldReAppend:function(A){return A.getAttribute("im-re-append")==="true"},shouldRemove:d,afterHeadMorphed:d}};function r(A,N,F={}){A instanceof Document&&(A=A.documentElement),typeof N=="string"&&(N=E(N));let B=T(N),V=g(A,B,F);return n(A,B,V)}function n(A,N,F){if(F.head.block){let B=A.querySelector("head"),V=N.querySelector("head");if(B&&V){let z=f(V,B,F);Promise.all(z).then(function(){n(A,N,Object.assign(F,{head:{block:!1,ignore:!0}}))});return}}if(F.morphStyle==="innerHTML")return s(N,A,F),A.children;if(F.morphStyle==="outerHTML"||F.morphStyle==null){let B=L(N,A,F),V=B?.previousSibling,z=B?.nextSibling,H=a(A,B,F);return B?S(V,H,z):[]}else throw"Do not understand how to morph style "+F.morphStyle}function i(A,N){return N.ignoreActiveValue&&A===document.activeElement&&A!==document.body}function a(A,N,F){if(!(F.ignoreActive&&A===document.activeElement))return N==null?F.callbacks.beforeNodeRemoved(A)===!1?A:(A.remove(),F.callbacks.afterNodeRemoved(A),null):v(A,N)?(F.callbacks.beforeNodeMorphed(A,N)===!1||(A instanceof HTMLHeadElement&&F.head.ignore||(A instanceof HTMLHeadElement&&F.head.style!=="morph"?f(N,A,F):(l(N,A,F),i(A,F)||s(N,A,F))),F.callbacks.afterNodeMorphed(A,N)),A):F.callbacks.beforeNodeRemoved(A)===!1||F.callbacks.beforeNodeAdded(N)===!1?A:(A.parentElement.replaceChild(N,A),F.callbacks.afterNodeAdded(N),F.callbacks.afterNodeRemoved(A),N)}function s(A,N,F){let B=A.firstChild,V=N.firstChild,z;for(;B;){if(z=B,B=z.nextSibling,V==null){if(F.callbacks.beforeNodeAdded(z)===!1)return;N.appendChild(z),F.callbacks.afterNodeAdded(z),C(F,z);continue}if(m(z,V,F)){a(V,z,F),V=V.nextSibling,C(F,z);continue}let H=w(A,N,z,V,F);if(H){V=y(V,H,F),a(H,z,F),C(F,z);continue}let K=k(A,N,z,V,F);if(K){V=y(V,K,F),a(K,z,F),C(F,z);continue}if(F.callbacks.beforeNodeAdded(z)===!1)return;N.insertBefore(z,V),F.callbacks.afterNodeAdded(z),C(F,z)}for(;V!==null;){let H=V;V=V.nextSibling,M(H,F)}}function o(A,N,F,B){return A==="value"&&B.ignoreActiveValue&&N===document.activeElement?!0:B.callbacks.beforeAttributeUpdated(A,N,F)===!1}function l(A,N,F){let B=A.nodeType;if(B===1){let V=A.attributes,z=N.attributes;for(let H of V)o(H.name,N,"update",F)||N.getAttribute(H.name)!==H.value&&N.setAttribute(H.name,H.value);for(let H=z.length-1;0<=H;H--){let K=z[H];o(K.name,N,"remove",F)||A.hasAttribute(K.name)||N.removeAttribute(K.name)}}(B===8||B===3)&&N.nodeValue!==A.nodeValue&&(N.nodeValue=A.nodeValue),i(N,F)||h(A,N,F)}function u(A,N,F,B){if(A[F]!==N[F]){let V=o(F,N,"update",B);V||(N[F]=A[F]),A[F]?V||N.setAttribute(F,A[F]):o(F,N,"remove",B)||N.removeAttribute(F)}}function h(A,N,F){if(A instanceof HTMLInputElement&&N instanceof HTMLInputElement&&A.type!=="file"){let B=A.value,V=N.value;u(A,N,"checked",F),u(A,N,"disabled",F),A.hasAttribute("value")?B!==V&&(o("value",N,"update",F)||(N.setAttribute("value",B),N.value=B)):o("value",N,"remove",F)||(N.value="",N.removeAttribute("value"))}else if(A instanceof HTMLOptionElement)u(A,N,"selected",F);else if(A instanceof HTMLTextAreaElement&&N instanceof HTMLTextAreaElement){let B=A.value,V=N.value;if(o("value",N,"update",F))return;B!==V&&(N.value=B),N.firstChild&&N.firstChild.nodeValue!==B&&(N.firstChild.nodeValue=B)}}function f(A,N,F){let B=[],V=[],z=[],H=[],K=F.head.style,X=new Map;for(let j of A.children)X.set(j.outerHTML,j);for(let j of N.children){let ee=X.has(j.outerHTML),Q=F.head.shouldReAppend(j),G=F.head.shouldPreserve(j);ee||G?Q?V.push(j):(X.delete(j.outerHTML),z.push(j)):K==="append"?Q&&(V.push(j),H.push(j)):F.head.shouldRemove(j)!==!1&&V.push(j)}H.push(...X.values());let ne=[];for(let j of H){let ee=document.createRange().createContextualFragment(j.outerHTML).firstChild;if(F.callbacks.beforeNodeAdded(ee)!==!1){if(ee.href||ee.src){let Q=null,G=new Promise(function(Z){Q=Z});ee.addEventListener("load",function(){Q()}),ne.push(G)}N.appendChild(ee),F.callbacks.afterNodeAdded(ee),B.push(ee)}}for(let j of V)F.callbacks.beforeNodeRemoved(j)!==!1&&(N.removeChild(j),F.callbacks.afterNodeRemoved(j));return F.head.afterHeadMorphed(N,{added:B,kept:z,removed:V}),ne}function d(){}function p(A){let N={};return Object.assign(N,e),Object.assign(N,A),N.callbacks={},Object.assign(N.callbacks,e.callbacks),Object.assign(N.callbacks,A.callbacks),N.head={},Object.assign(N.head,e.head),Object.assign(N.head,A.head),N}function g(A,N,F){return F=p(F),{target:A,newContent:N,config:F,morphStyle:F.morphStyle,ignoreActive:F.ignoreActive,ignoreActiveValue:F.ignoreActiveValue,idMap:P(A,N),deadIds:new Set,callbacks:F.callbacks,head:F.head}}function m(A,N,F){return A==null||N==null?!1:A.nodeType===N.nodeType&&A.tagName===N.tagName?A.id!==""&&A.id===N.id?!0:R(F,A,N)>0:!1}function v(A,N){return A==null||N==null?!1:A.nodeType===N.nodeType&&A.tagName===N.tagName}function y(A,N,F){for(;A!==N;){let B=A;A=A.nextSibling,M(B,F)}return C(F,N),N.nextSibling}function w(A,N,F,B,V){let z=R(V,F,N),H=null;if(z>0){let K=B,X=0;for(;K!=null;){if(m(F,K,V))return K;if(X+=R(V,K,A),X>z)return null;K=K.nextSibling}}return H}function k(A,N,F,B,V){let z=B,H=F.nextSibling,K=0;for(;z!=null;){if(R(V,z,A)>0)return null;if(v(F,z))return z;if(v(H,z)&&(K++,H=H.nextSibling,K>=2))return null;z=z.nextSibling}return z}function E(A){let N=new DOMParser,F=A.replace(/]*>|>)([\s\S]*?)<\/svg>/gim,"");if(F.match(/<\/html>/)||F.match(/<\/head>/)||F.match(/<\/body>/)){let B=N.parseFromString(A,"text/html");if(F.match(/<\/html>/))return B.generatedByIdiomorph=!0,B;{let V=B.firstChild;return V?(V.generatedByIdiomorph=!0,V):null}}else{let V=N.parseFromString("","text/html").body.querySelector("template").content;return V.generatedByIdiomorph=!0,V}}function T(A){if(A==null)return document.createElement("div");if(A.generatedByIdiomorph)return A;if(A instanceof Node){let N=document.createElement("div");return N.append(A),N}else{let N=document.createElement("div");for(let F of[...A])N.append(F);return N}}function S(A,N,F){let B=[],V=[];for(;A!=null;)B.push(A),A=A.previousSibling;for(;B.length>0;){let z=B.pop();V.push(z),N.parentElement.insertBefore(z,N)}for(V.push(N);F!=null;)B.push(F),V.push(F),F=F.nextSibling;for(;B.length>0;)N.parentElement.insertBefore(B.pop(),N.nextSibling);return V}function L(A,N,F){let B;B=A.firstChild;let V=B,z=0;for(;B;){let H=_(B,N,F);H>z&&(V=B,z=H),B=B.nextSibling}return V}function _(A,N,F){return v(A,N)?.5+R(F,A,N):0}function M(A,N){C(N,A),N.callbacks.beforeNodeRemoved(A)!==!1&&(A.remove(),N.callbacks.afterNodeRemoved(A))}function I(A,N){return!A.deadIds.has(N)}function O(A,N,F){return(A.idMap.get(F)||t).has(N)}function C(A,N){let F=A.idMap.get(N)||t;for(let B of F)A.deadIds.add(B)}function R(A,N,F){let B=A.idMap.get(N)||t,V=0;for(let z of B)I(A,z)&&O(A,z,F)&&++V;return V}function D(A,N){let F=A.parentElement,B=A.querySelectorAll("[id]");for(let V of B){let z=V;for(;z!==F&&z!=null;){let H=N.get(z);H==null&&(H=new Set,N.set(z,H)),H.add(V.id),z=z.parentElement}}}function P(A,N){let F=new Map;return D(A,F),D(N,F),F}return{morph:r,defaults:e}}();function $Z(t,e,{callbacks:r,...n}={}){nFt.morph(t,e,{...n,callbacks:new _Z(r)})}function IRe(t,e){$Z(t,e.children,{morphStyle:"innerHTML"})}var _Z=class{#e;constructor({beforeNodeMorphed:e}={}){this.#e=e||(()=>!0)}beforeNodeAdded=e=>!(e.id&&e.hasAttribute("data-turbo-permanent")&&document.getElementById(e.id));beforeNodeMorphed=(e,r)=>{if(e instanceof Element)return!e.hasAttribute("data-turbo-permanent")&&this.#e(e,r)?!$i("turbo:before-morph-element",{cancelable:!0,target:e,detail:{currentElement:e,newElement:r}}).defaultPrevented:!1};beforeAttributeUpdated=(e,r,n)=>!$i("turbo:before-morph-attribute",{cancelable:!0,target:r,detail:{attributeName:e,mutationType:n}}).defaultPrevented;beforeNodeRemoved=e=>this.beforeNodeMorphed(e);afterNodeMorphed=(e,r)=>{e instanceof Element&&$i("turbo:morph-element",{target:e,detail:{currentElement:e,newElement:r}})}},AZ=class extends w1{static renderElement(e,r){$i("turbo:before-frame-morph",{target:e,detail:{currentElement:e,newElement:r}}),IRe(e,r)}},z2=class extends vT{static renderElement(e,r){document.body&&r instanceof HTMLBodyElement?document.body.replaceWith(r):document.documentElement.appendChild(r)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){if(!this.newSnapshot.isVisitable)return{reason:"turbo_visit_control_is_reload"};if(!this.trackedElementsAreIdentical)return{reason:"tracked_element_mismatch"}}async prepareToRender(){this.#e(),await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}#e(){let{documentElement:e}=this.currentSnapshot,{lang:r}=this.newSnapshot;r?e.setAttribute("lang",r):e.removeAttribute("lang")}async mergeHead(){let e=this.mergeProvisionalElements(),r=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),await e,await r,this.willRender&&this.removeUnusedDynamicStylesheetElements()}async replaceBody(){await this.preservingPermanentElements(async()=>{this.activateNewBody(),await this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){let e=[];for(let r of this.newHeadStylesheetElements)e.push(pPt(r)),document.head.appendChild(r);await Promise.all(e)}copyNewHeadScriptElements(){for(let e of this.newHeadScriptElements)document.head.appendChild(pT(e))}removeUnusedDynamicStylesheetElements(){for(let e of this.unusedDynamicStylesheetElements)document.head.removeChild(e)}async mergeProvisionalElements(){let e=[...this.newHeadProvisionalElements];for(let r of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(r,e)||document.head.removeChild(r);for(let r of e)document.head.appendChild(r)}isCurrentElementInElementList(e,r){for(let[n,i]of r.entries()){if(e.tagName=="TITLE"){if(i.tagName!="TITLE")continue;if(e.innerHTML==i.innerHTML)return r.splice(n,1),!0}if(i.isEqualNode(e))return r.splice(n,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(let e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(let e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(let e of this.newBodyScriptElements){let r=pT(e);e.replaceWith(r)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get unusedDynamicStylesheetElements(){return this.oldHeadStylesheetElements.filter(e=>e.getAttribute("data-turbo-track")==="dynamic")}get oldHeadStylesheetElements(){return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}},LZ=class extends z2{static renderElement(e,r){$Z(e,r,{callbacks:{beforeNodeMorphed:n=>!pRe(n)}});for(let n of e.querySelectorAll("turbo-frame"))pRe(n)&&iFt(n);$i("turbo:morph",{detail:{currentElement:e,newElement:r}})}async preservingPermanentElements(e){return await e()}get renderMethod(){return"morph"}get shouldAutofocus(){return!1}};function pRe(t){return t instanceof Pc&&t.src&&t.refresh==="morph"&&!t.closest("[data-turbo-permanent]")}function iFt(t){t.addEventListener("turbo:before-frame-render",({detail:e})=>{e.render=AZ.renderElement},{once:!0}),t.reload()}var MZ=class{keys=[];snapshots={};constructor(e){this.size=e}has(e){return VD(e)in this.snapshots}get(e){if(this.has(e)){let r=this.read(e);return this.touch(e),r}}put(e,r){return this.write(e,r),this.touch(e),r}clear(){this.snapshots={}}read(e){return this.snapshots[VD(e)]}write(e,r){this.snapshots[VD(e)]=r}touch(e){let r=VD(e),n=this.keys.indexOf(r);n>-1&&this.keys.splice(n,1),this.keys.unshift(r),this.trim()}trim(){for(let e of this.keys.splice(this.size))delete this.snapshots[e]}},DZ=class extends GD{snapshotCache=new MZ(10);lastRenderedLocation=new URL(location.href);forceReloaded=!1;shouldTransitionTo(e){return this.snapshot.prefersViewTransitions&&e.prefersViewTransitions}renderPage(e,r=!1,n=!0,i){let s=this.isPageRefresh(i)&&this.snapshot.shouldMorphPage?LZ:z2,o=new s(this.snapshot,e,s.renderElement,r,n);return o.shouldRender?i?.changeHistory():this.forceReloaded=!0,this.render(o)}renderError(e,r){r?.changeHistory();let n=new ZD(this.snapshot,e,ZD.renderElement,!1);return this.render(n)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();let{lastRenderedLocation:r}=this;await xRe();let n=e.clone();return this.snapshotCache.put(r,n),n}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}isPageRefresh(e){return!e||this.lastRenderedLocation.pathname===e.location.pathname&&e.action==="replace"}shouldPreserveScrollPosition(e){return this.isPageRefresh(e)&&this.snapshot.shouldPreserveScrollPosition}get snapshot(){return Nc.fromElement(this.element)}},OZ=class{selector="a[data-turbo-preload]";constructor(e,r){this.delegate=e,this.snapshotCache=r}start(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this.#e):this.preloadOnLoadLinksForView(document.body)}stop(){document.removeEventListener("DOMContentLoaded",this.#e)}preloadOnLoadLinksForView(e){for(let r of e.querySelectorAll(this.selector))this.delegate.shouldPreloadLink(r)&&this.preloadURL(r)}async preloadURL(e){let r=new URL(e.href);if(this.snapshotCache.has(r))return;await new x0(this,Nl.get,r,new URLSearchParams,e).perform()}prepareRequest(e){e.headers["X-Sec-Purpose"]="prefetch"}async requestSucceededWithResponse(e,r){try{let n=await r.responseHTML,i=Nc.fromHTMLString(n);this.snapshotCache.put(e.url,i)}catch{}}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,r){}requestFailedWithResponse(e,r){}#e=()=>{this.preloadOnLoadLinksForView(document.body)}},RZ=class{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.#e("")}exemptPageFromCache(){this.#e("no-cache")}exemptPageFromPreview(){this.#e("no-preview")}#e(e){mPt("turbo-cache-control",e)}},IZ=class{navigator=new kZ(this);history=new xZ(this);view=new DZ(this,document.documentElement);adapter=new vZ(this);pageObserver=new TZ(this);cacheObserver=new yZ;linkPrefetchObserver=new wZ(this,document);linkClickObserver=new jD(this,window);formSubmitObserver=new mT(this,document);scrollObserver=new EZ(this);streamObserver=new CZ(this);formLinkClickObserver=new XD(this,document.documentElement);frameRedirector=new bZ(this,document.documentElement);streamMessageRenderer=new SZ;cache=new RZ(this);drive=!0;enabled=!0;progressBarDelay=500;started=!1;formMode="on";#e=150;constructor(e){this.recentRequests=e,this.preloader=new OZ(this,this.view.snapshotCache),this.debouncedRefresh=this.refresh,this.pageRefreshDebouncePeriod=this.pageRefreshDebouncePeriod}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkPrefetchObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkPrefetchObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.preloader.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,r={}){let n=r.frame?document.getElementById(r.frame):null;if(n instanceof Pc){let i=r.action||x1(n);n.delegate.proposeVisitIfNavigatedWithAction(n,i),n.src=e.toString()}else this.navigator.proposeVisit(Ja(e),r)}refresh(e,r){!(r&&this.recentRequests.has(r))&&!this.navigator.currentVisit&&this.visit(e,{action:"replace",shouldCacheSnapshot:!1})}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(w0.wrap(e))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){this.progressBarDelay=e}setFormMode(e){this.formMode=e}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}get pageRefreshDebouncePeriod(){return this.#e}set pageRefreshDebouncePeriod(e){this.refresh=yPt(this.debouncedRefresh.bind(this),e),this.#e=e}shouldPreloadLink(e){let r=e.hasAttribute("data-turbo-method"),n=e.hasAttribute("data-turbo-stream"),i=e.getAttribute("data-turbo-frame"),a=i=="_top"?null:document.getElementById(i)||I2(e,"turbo-frame:not([disabled])");if(r||n||a instanceof Pc)return!1;{let s=new URL(e.href);return this.elementIsNavigatable(e)&&v0(s,this.snapshot.rootLocation)}}historyPoppedToLocationWithRestorationIdentifierAndDirection(e,r,n){this.enabled?this.navigator.startVisit(e,r,{action:"restore",historyChanged:!0,direction:n}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,r){return this.elementIsNavigatable(e)&&v0(r,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}canPrefetchRequestToLocation(e,r){return this.elementIsNavigatable(e)&&v0(r,this.snapshot.rootLocation)}willFollowLinkToLocation(e,r,n){return this.elementIsNavigatable(e)&&v0(r,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,r,n)}followedLinkToLocation(e,r){let n=this.getActionForLink(e),i=e.hasAttribute("data-turbo-stream");this.visit(r.href,{action:n,acceptsStreamResponse:i})}allowsVisitingLocationWithAction(e,r){return this.locationWithActionIsSamePage(e,r)||this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,r){gRe(e),this.adapter.visitProposedToLocation(e,r)}visitStarted(e){e.acceptsStreamResponse||(qD(document.documentElement),this.view.markVisitDirection(e.direction)),gRe(e.location),e.silent||this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){this.view.unmarkVisitDirection(),WD(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}locationWithActionIsSamePage(e,r){return this.navigator.locationWithActionIsSamePage(e,r)}visitScrolledToSamePageLocation(e,r){this.notifyApplicationAfterVisitingSamePageLocation(e,r)}willSubmitForm(e,r){let n=FZ(e,r);return this.submissionIsNavigatable(e,r)&&v0(Ja(n),this.snapshot.rootLocation)}formSubmitted(e,r){this.navigator.submitForm(e,r)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){this.navigator.currentVisit?.silent||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},r){let n=this.notifyApplicationBeforeRender(e,r),{defaultPrevented:i,detail:{render:a}}=n;return this.view.renderer&&a&&(this.view.renderer.renderElement=a),!i}viewRenderedSnapshot(e,r,n){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender(n)}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,r){this.notifyApplicationAfterFrameRender(e,r)}applicationAllowsFollowingLinkToLocation(e,r,n){return!this.notifyApplicationAfterClickingLinkToLocation(e,r,n).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,r,n){return $i("turbo:click",{target:e,detail:{url:r.href,originalEvent:n},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return $i("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,r){return $i("turbo:visit",{detail:{url:e.href,action:r}})}notifyApplicationBeforeCachingSnapshot(){return $i("turbo:before-cache")}notifyApplicationBeforeRender(e,r){return $i("turbo:before-render",{detail:{newBody:e,...r},cancelable:!0})}notifyApplicationAfterRender(e){return $i("turbo:render",{detail:{renderMethod:e}})}notifyApplicationAfterPageLoad(e={}){return $i("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterVisitingSamePageLocation(e,r){dispatchEvent(new HashChangeEvent("hashchange",{oldURL:e.toString(),newURL:r.toString()}))}notifyApplicationAfterFrameLoad(e){return $i("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,r){return $i("turbo:frame-render",{detail:{fetchResponse:e},target:r,cancelable:!0})}submissionIsNavigatable(e,r){if(this.formMode=="off")return!1;{let n=r?this.elementIsNavigatable(r):!0;return this.formMode=="optin"?n&&e.closest('[data-turbo="true"]')!=null:n&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){let r=I2(e,"[data-turbo]"),n=I2(e,"turbo-frame");return this.drive||n?r?r.getAttribute("data-turbo")!="false":!0:r?r.getAttribute("data-turbo")=="true":!1}getActionForLink(e){return x1(e)||"advance"}get snapshot(){return this.view.snapshot}};function gRe(t){Object.defineProperties(t,aFt)}var aFt={absoluteURL:{get(){return this.toString()}}},Ai=new IZ(LRe),{cache:NRe,navigator:PRe}=Ai;function VZ(){Ai.start()}function FRe(t){Ai.registerAdapter(t)}function BRe(t,e){Ai.visit(t,e)}function yT(t){Ai.connectStreamSource(t)}function bT(t){Ai.disconnectStreamSource(t)}function zRe(t){Ai.renderStreamMessage(t)}function $Re(){console.warn("Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),Ai.clearCache()}function VRe(t){Ai.setProgressBarDelay(t)}function URe(t){gT.confirmMethod=t}function HRe(t){Ai.setFormMode(t)}var sFt=Object.freeze({__proto__:null,navigator:PRe,session:Ai,cache:NRe,PageRenderer:z2,PageSnapshot:Nc,FrameRenderer:w1,fetch:zZ,start:VZ,registerAdapter:FRe,visit:BRe,connectStreamSource:yT,disconnectStreamSource:bT,renderStreamMessage:zRe,clearCache:$Re,setProgressBarDelay:VRe,setConfirmMethod:URe,setFormMode:HRe}),NZ=class extends Error{},PZ=class{fetchResponseLoaded=e=>Promise.resolve();#e=null;#t=()=>{};#r=!1;#i=!1;#a=new Set;action=null;constructor(e){this.element=e,this.view=new fZ(this,this.element),this.appearanceObserver=new uZ(this,this.element),this.formLinkClickObserver=new XD(this,this.element),this.linkInterceptor=new YD(this,this.element),this.restorationIdentifier=b0(),this.formSubmitObserver=new mT(this,this.element)}connect(){this.#r||(this.#r=!0,this.loadingStyle==y1.lazy?this.appearanceObserver.start():this.#n(),this.formLinkClickObserver.start(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconnect(){this.#r&&(this.#r=!1,this.appearanceObserver.stop(),this.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmitObserver.stop())}disabledChanged(){this.loadingStyle==y1.eager&&this.#n()}sourceURLChanged(){this.#v("src")||(this.element.isConnected&&(this.complete=!1),(this.loadingStyle==y1.eager||this.#i)&&this.#n())}sourceURLReloaded(){let{src:e}=this.element;return this.element.removeAttribute("complete"),this.element.src=null,this.element.src=e,this.element.loaded}loadingStyleChanged(){this.loadingStyle==y1.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.#n())}async#n(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&(this.element.loaded=this.#l(Ja(this.sourceURL)),this.appearanceObserver.stop(),await this.element.loaded,this.#i=!0)}async loadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=e.response.url);try{let r=await e.responseHTML;if(r){let n=wRe(r);Nc.fromDocument(n).isVisitable?await this.#o(e,n):await this.#f(e)}}finally{this.fetchResponseLoaded=()=>Promise.resolve()}}elementAppearedInViewport(e){this.proposeVisitIfNavigatedWithAction(e,x1(e)),this.#n()}willSubmitFormLinkToLocation(e){return this.#c(e)}submittedFormLinkToLocation(e,r,n){let i=this.#s(e);i&&n.setAttribute("data-turbo-frame",i.id)}shouldInterceptLinkClick(e,r,n){return this.#c(e)}linkClickIntercepted(e,r){this.#h(e,r)}willSubmitForm(e,r){return e.closest("turbo-frame")==this.element&&this.#c(e,r)}formSubmitted(e,r){this.formSubmission&&this.formSubmission.stop(),this.formSubmission=new gT(this,e,r);let{fetchRequest:n}=this.formSubmission;this.prepareRequest(n),this.formSubmission.start()}prepareRequest(e){e.headers["Turbo-Frame"]=this.id,this.currentNavigationElement?.hasAttribute("data-turbo-stream")&&e.acceptResponseType(w0.contentType)}requestStarted(e){qD(this.element)}requestPreventedHandlingResponse(e,r){this.#t()}async requestSucceededWithResponse(e,r){await this.loadResponse(r),this.#t()}async requestFailedWithResponse(e,r){await this.loadResponse(r),this.#t()}requestErrored(e,r){console.error(r),this.#t()}requestFinished(e){WD(this.element)}formSubmissionStarted({formElement:e}){qD(e,this.#s(e))}formSubmissionSucceededWithResponse(e,r){let n=this.#s(e.formElement,e.submitter);n.delegate.proposeVisitIfNavigatedWithAction(n,x1(e.submitter,e.formElement,n)),n.delegate.loadResponse(r),e.isSafe||Ai.clearCache()}formSubmissionFailedWithResponse(e,r){this.element.delegate.loadResponse(r),Ai.clearCache()}formSubmissionErrored(e,r){console.error(r)}formSubmissionFinished({formElement:e}){WD(e,this.#s(e))}allowsImmediateRender({element:e},r){let n=$i("turbo:before-frame-render",{target:this.element,detail:{newFrame:e,...r},cancelable:!0}),{defaultPrevented:i,detail:{render:a}}=n;return this.view.renderer&&a&&(this.view.renderer.renderElement=a),!i}viewRenderedSnapshot(e,r,n){}preloadOnLoadLinksForView(e){Ai.preloadOnLoadLinksForView(e)}viewInvalidated(){}willRenderFrame(e,r){this.previousFrameElement=e.cloneNode(!0)}visitCachedSnapshot=({element:e})=>{let r=e.querySelector("#"+this.element.id);r&&this.previousFrameElement&&r.replaceChildren(...this.previousFrameElement.children),delete this.previousFrameElement};async#o(e,r){let n=await this.extractForeignFrameElement(r.body);if(n){let i=new B2(n),a=new w1(this,this.view.snapshot,i,w1.renderElement,!1,!1);this.view.renderPromise&&await this.view.renderPromise,this.changeHistory(),await this.view.render(a),this.complete=!0,Ai.frameRendered(e,this.element),Ai.frameLoaded(this.element),await this.fetchResponseLoaded(e)}else this.#d(e)&&this.#p(e)}async#l(e){let r=new x0(this,Nl.get,e,new URLSearchParams,this.element);return this.#e?.cancel(),this.#e=r,new Promise(n=>{this.#t=()=>{this.#t=()=>{},this.#e=null,n()},r.perform()})}#h(e,r,n){let i=this.#s(e,n);i.delegate.proposeVisitIfNavigatedWithAction(i,x1(n,e,i)),this.#b(e,()=>{i.src=r})}proposeVisitIfNavigatedWithAction(e,r=null){if(this.action=r,this.action){let n=Nc.fromElement(e).clone(),{visitCachedSnapshot:i}=e.delegate;e.delegate.fetchResponseLoaded=async a=>{if(e.src){let{statusCode:s,redirected:o}=a,l=await a.responseHTML,h={response:{statusCode:s,redirected:o,responseHTML:l},visitCachedSnapshot:i,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationIdentifier,snapshot:n};this.action&&(h.action=this.action),Ai.visit(e.src,h)}}}}changeHistory(){if(this.action){let e=TRe(this.action);Ai.history.update(e,Ja(this.element.src||""),this.restorationIdentifier)}}async#f(e){console.warn(`The response (${e.statusCode}) from is performing a full page visit due to turbo-visit-control.`),await this.#u(e.response)}#d(e){this.element.setAttribute("complete","");let r=e.response,n=async(a,s)=>{a instanceof Response?this.#u(a):Ai.visit(a,s)};return!$i("turbo:frame-missing",{target:this.element,detail:{response:r,visit:n},cancelable:!0}).defaultPrevented}#p(e){this.view.missing(),this.#g(e)}#g(e){let r=`The response (${e.statusCode}) did not contain the expected and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;throw new NZ(r)}async#u(e){let r=new P2(e),n=await r.responseHTML,{location:i,redirected:a,statusCode:s}=r;return Ai.visit(i,{response:{redirected:a,statusCode:s,responseHTML:n}})}#s(e,r){let n=HD("data-turbo-frame",r,e)||this.element.getAttribute("target");return mRe(n)??this.element}async extractForeignFrameElement(e){let r,n=CSS.escape(this.id);try{if(r=vRe(e.querySelector(`turbo-frame#${n}`),this.sourceURL),r)return r;if(r=vRe(e.querySelector(`turbo-frame[src][recurse~=${n}]`),this.sourceURL),r)return await r.loaded,await this.extractForeignFrameElement(r)}catch(i){return console.error(i),new Pc}return null}#m(e,r){let n=FZ(e,r);return v0(Ja(n),this.rootLocation)}#c(e,r){let n=HD("data-turbo-frame",r,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&&!this.#m(e,r)||!this.enabled||n=="_top")return!1;if(n){let i=mRe(n);if(i)return!i.disabled}return!(!Ai.elementIsNavigatable(e)||r&&!Ai.elementIsNavigatable(r))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}set sourceURL(e){this.#y("src",()=>{this.element.src=e??null})}get loadingStyle(){return this.element.loading}get isLoading(){return this.formSubmission!==void 0||this.#t()!==void 0}get complete(){return this.element.hasAttribute("complete")}set complete(e){e?this.element.setAttribute("complete",""):this.element.removeAttribute("complete")}get isActive(){return this.element.isActive&&this.#r}get rootLocation(){let r=this.element.ownerDocument.querySelector('meta[name="turbo-root"]')?.content??"/";return Ja(r)}#v(e){return this.#a.has(e)}#y(e,r){this.#a.add(e),r(),this.#a.delete(e)}#b(e,r){this.currentNavigationElement=e,r(),delete this.currentNavigationElement}};function mRe(t){if(t!=null){let e=document.getElementById(t);if(e instanceof Pc)return e}}function vRe(t,e){if(t){let r=t.getAttribute("src");if(r!=null&&e!=null&&iPt(r,e))throw new Error(`Matching element has a source URL which references itself`);if(t.ownerDocument!==document&&(t=document.importNode(t,!0)),t instanceof Pc)return t.connectedCallback(),t.disconnectedCallback(),t}}var UZ={after(){this.targetElements.forEach(t=>t.parentElement?.insertBefore(this.templateContent,t.nextSibling))},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(t=>t.append(this.templateContent))},before(){this.targetElements.forEach(t=>t.parentElement?.insertBefore(this.templateContent,t))},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(t=>t.prepend(this.templateContent))},remove(){this.targetElements.forEach(t=>t.remove())},replace(){let t=this.getAttribute("method");this.targetElements.forEach(e=>{t==="morph"?$Z(e,this.templateContent):e.replaceWith(this.templateContent)})},update(){let t=this.getAttribute("method");this.targetElements.forEach(e=>{t==="morph"?IRe(e,this.templateContent):(e.innerHTML="",e.append(this.templateContent))})},refresh(){Ai.refresh(this.baseURI,this.requestId)}},QD=class t extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){return this.renderPromise??=(async()=>{let e=this.beforeRenderEvent;this.dispatchEvent(e)&&(await R2(),await e.detail.render(this))})()}disconnect(){try{this.remove()}catch{}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){let e=this.targetElements.flatMap(n=>[...n.children]).filter(n=>!!n.id),r=[...this.templateContent?.children||[]].filter(n=>!!n.id).map(n=>n.id);return e.filter(n=>r.includes(n.id))}get performAction(){if(this.action){let e=UZ[this.action];if(e)return e;this.#e("unknown action")}this.#e("action attribute is missing")}get targetElements(){if(this.target)return this.targetElementsById;if(this.targets)return this.targetElementsByQuery;this.#e("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(this.firstElementChild===null){let e=this.ownerDocument.createElement("template");return this.appendChild(e),e}else if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.#e("first child element must be a
  • ${e.innerText}