Home
last modified time | relevance | path

Searched refs:getDirection (Results 1 – 25 of 42) sorted by last modified time

12

/plugin/mermaid/
H A Dmermaid.min.js105 You have to call mermaid.initialize.`)},wRt=function(i,a,f){Kt.info("addLink (abc78)",i,a,f);let g,w;for(g=0;g<i.length;g++)for(w=0;w<a.length;w++)bRt(i[g],a[w],f)},mRt=function(i,a){i.forEach(function(f){f==="default"?Qv.defaultInterpolate=a:Qv[f].interpolate=a})},vRt=function(i,a){i.forEach(function(f){if(f>=Qv.length)throw new Error(`The index ${f} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${Qv.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);f==="default"?Qv.defaultStyle=a:(uo.isSubstringInArray("fill",a)===-1&&a.push("fill:none"),Qv[f].style=a)})},yRt=function(i,a){i.split(",").forEach(function(f){wD[f]===void 0&&(wD[f]={id:f,styles:[],textStyles:[]}),a!=null&&a.forEach(function(g){if(g.match("color")){const w=g.replace("fill","bgFill").replace("color","fill");wD[f].textStyles.push(w)}wD[f].styles.push(g)})})},xRt=function(i){Zw=i,Zw.match(/.*</)&&(Zw="RL"),Zw.match(/.*\^/)&&(Zw="BT"),Zw.match(/.*>/)&&(Zw="LR"),Zw.match(/.*v/)&&(Zw="TB"),Zw==="TD"&&(Zw="TB")},jY=function(i,a){i.split(",").forEach(function(f){let g=f;jl[g]!==void 0&&jl[g].classes.push(a),OY[g]!==void 0&&OY[g].classes.push(a)})},hje=function(i,a){i.split(",").forEach(function(f){a!==void 0&&(NY[FY==="gen-1"?zF(f):f]=RY(a))})},fje=function(i,a,f){let g=zF(i);if(Re().securityLevel!=="loose"||a===void 0)return;let w=[];if(typeof f=="string"){w=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let v=0;v<w.length;v++){let b=w[v].trim();b.charAt(0)==='"'&&b.charAt(b.length-1)==='"'&&(b=b.substr(1,b.length-2)),w[v]=b}}w.length===0&&w.push(i),jl[i]!==void 0&&(jl[i].haveCallback=!0,BY.push(function(){const v=document.querySelector(`[id="${g}"]`);v!==null&&v.addEventListener("click",function(){uo.runFunc(a,...w)},!1)}))},kRt=function(i,a,f){i.split(",").forEach(function(g){jl[g]!==void 0&&(jl[g].link=uo.formatUrl(a,bD),jl[g].linkTarget=f)}),jY(i,"clickable")},ERt=function(i){if(NY.hasOwnProperty(i))return NY[i]},TRt=function(i,a,f){i.split(",").forEach(function(g){fje(g,a,f)}),jY(i,"clickable")},CRt=function(i){BY.forEach(function(a){a(i)})},SRt=function(){return Zw.trim()},_Rt=function(){return jl},ARt=function(){return Qv},LRt=function(){return wD},DRt=function(i){let a=Tr(".mermaidTooltip");(a._groups||a)[0][0]===null&&(a=Tr("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Tr(i).select("svg").selectAll("g.node").on("mouseover",function(){const w=Tr(this);if(w.attr("title")===null)return;const b=this.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.text(w.attr("title")).style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.bottom+"px"),a.html(a.html().replace(/&lt;br\/&gt;/g,"<br/>")),w.classed("hover",!0)}).on("mouseout",function(){a.transition().duration(500).style("opacity",0),Tr(this).classed("hover",!1)})};BY.push(DRt);const MRt=function(i="gen-1"){jl={},wD={},Qv=[],BY=[DRt],Px=[],OY={},PY=0,NY={},apt=!0,FY=i,bD=Re(),ag()},IRt=i=>{FY=i||"gen-2"},ORt=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},NRt=function(i,a,f){let g=i.text.trim(),w=f.text;i===f&&f.text.match(/\s/)&&(g=void 0);function v(M){const F={boolean:{},number:{},string:{}},R=[];let B;return{nodeList:M.filter(function(Y){const nt=typeof Y;return Y.stmt&&Y.stmt==="dir"?(B=Y.value,!1):Y.trim()===""?!1:nt in F?F[nt].hasOwnProperty(Y)?!1:F[nt][Y]=!0:R.includes(Y)?!1:R.push(Y)}),dir:B}}let b=[];const{nodeList:E,dir:S}=v(b.concat.apply(b,a));if(b=E,FY==="gen-1")for(let M=0;M<b.length;M++)b[M]=zF(b[M]);g=g||"subGraph"+PY,w=w||"",w=RY(w),PY=PY+1;const _={id:g,nodes:b,title:w.trim(),classes:[],dir:S,labelType:f.type};return Kt.info("Adding",_.id,_.nodes,_.dir),_.nodes=HRt(_,Px).nodes,Px.push(_),OY[g]=_,g},dje=function(i){for(const[a,f]of Px.entries())if(f.id===i)return a;return-1};let qF=-1;const PRt=[],FRt=function(i,a){const f=Px[a].nodes;if(qF=qF+1,qF>2e3)return;if(PRt[qF]=a,Px[a].id===i)return{result:!0,count:0};let g=0,w=1;for(;g<f.length;){const v=dje(f[g]);if(v>=0){const b=FRt(i,v);if(b.result)return{result:!0,count:w+b.count};w=w+b.count}g=g+1}return{result:!1,count:w}},BRt=function(i){return PRt[i]},RRt=function(){qF=-1,Px.length>0&&FRt("none",Px.length-1)},jRt=function(){return Px},$Rt=()=>apt?(apt=!1,!0):!1,gje=i=>{let a=i.trim(),f="arrow_open";switch(a[0]){case"<":f="arrow_point",a=a.slice(1);break;case"x":f="arrow_cross",a=a.slice(1);break;case"o":f="arrow_circle",a=a.slice(1);break}let g="normal";return a.includes("=")&&(g="thick"),a.includes(".")&&(g="dotted"),{type:f,stroke:g}},pje=(i,a)=>{const f=a.length;let g=0;for(let w=0;w<f;++w)a[w]===i&&++g;return g},bje=i=>{const a=i.trim();let f=a.slice(0,-1),g="arrow_open";switch(a.slice(-1)){case"x":g="arrow_cross",a[0]==="x"&&(g="double_"+g,f=f.slice(1));break;case">":g="arrow_point",a[0]==="<"&&(g="double_"+g,f=f.slice(1));break;case"o":g="arrow_circle",a[0]==="o"&&(g="double_"+g,f=f.slice(1));break}let w="normal",v=f.length-1;f[0]==="="&&(w="thick"),f[0]==="~"&&(w="invisible");let b=pje(".",f);return b&&(w="dotted",v=b),{type:g,stroke:w,length:v}},zRt=(i,a)=>{const f=bje(i);let g;if(a){if(g=gje(a),g.stroke!==f.stroke)return{type:"INVALID",stroke:"INVALID"};if(g.type==="arrow_open")g.type=f.type;else{if(g.type!==f.type)return{type:"INVALID",stroke:"INVALID"};g.type="double_"+g.type}return g.type==="double_arrow"&&(g.type="double_arrow_point"),g.length=f.length,g}return f},qRt=(i,a)=>{let f=!1;return i.forEach(g=>{g.nodes.indexOf(a)>=0&&(f=!0)}),f},HRt=(i,a)=>{const f=[];return i.nodes.forEach((g,w)=>{qRt(a,g)||f.push(i.nodes[w])}),{nodes:f}},VRt={firstGraph:$Rt},A9={defaultConfig:()=>lBt.flowchart,setAccTitle:og,getAccTitle:Xg,getAccDescription:Jg,setAccDescription:Qg,addVertex:pRt,lookUpDomId:zF,addLink:wRt,updateLinkInterpolate:mRt,updateLink:vRt,addClass:yRt,setDirection:xRt,setClass:jY,setTooltip:hje,getTooltip:ERt,setClickEvent:TRt,setLink:kRt,bindFunctions:CRt,getDirection:SRt,getVertices:_Rt,getEdges:ARt,getClasses:LRt,clear:MRt,setGen:IRt,defaultStyle:ORt,addSubGraph:NRt,getDepthFirstPos:BRt,indexNodes:RRt,getSubGraphs:jRt,destructLink:zRt,lex:VRt,exists:qRt,makeUniq:HRt,setDiagramTitle:S2,getDiagramTitle:Zg},wje=Object.freeze(Object.defineProperty({__proto__:null,addClass:yRt,addLink:wRt,addSingleLink:bRt,addSubGraph:NRt,addVertex:pRt,bindFunctions:CRt,clear:MRt,default:A9,defaultStyle:ORt,destructLink:zRt,firstGraph:$Rt,getClasses:LRt,getDepthFirstPos:BRt,getDirection:SRt,getEdges:ARt,getSubGraphs:jRt,getTooltip:ERt,getVertices:_Rt,indexNodes:RRt,lex:VRt,lookUpDomId:zF,setClass:jY,setClickEvent:TRt,setDirection:xRt,setGen:IRt,setLink:kRt,updateLink:vRt,updateLinkInterpolate:mRt},Symbol.toStringTag,{value:"Module"}));var mje="[object Symbol]";function L9(i){return typeof i=="symbol"||e4(i)&&b9(i)==mje}function mD(i,a){for(var f=-1,g=i==null?0:i.length,w=Array(g);++f<g;)w[f]=a(i[f],f,i);return w}var vje=1/0,URt=Yw?Yw.prototype:void 0,GRt=URt?URt.toString:void 0;function KRt(i){if(typeof i=="string")return i;if(s1(i))return mD(i,KRt)+"";if(L9(i))return GRt?GRt.call(i):"";var a=i+"";return a=="0"&&1/i==-vje?"-0":a}var yje=/\s/;function xje(i){for(var a=i.length;a--&&yje.test(i.charAt(a)););return a}var kje=/^\s+/;function Eje(i){return i&&i.slice(0,xje(i)+1).replace(kje,"")}var WRt=0/0,Tje=/^[-+]0x[0-9a-f]+$/i,Cje=/^0b[01]+$/i,Sje=/^0o[0-7]+$/i,_je=parseInt;function Aje(i){if(typeof i=="number")return i;if(L9(i))return WRt;if(T2(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=T2(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=Eje(i);var f=Cje.test(i);return f||Sje.test(i)?_je(i.slice(2),f?2:8):Tje.test(i)?WRt:+i}var YRt=1/0,Lje=17976931348623157e292;function $Y(i){if(!i)return i===0?i:0;if(i=Aje(i),i===YRt||i===-YRt){var a=i<0?-1:1;return a*Lje}return i===i?i:0}function Dje(i){var a=$Y(i),f=a%1;return a===a?f?a-f:a:0}function Mje(){}function XRt(i,a){for(var f=-1,g=i==null?0:i.length;++f<g&&a(i[f],f,i)!==!1;);return i}function QRt(i,a,f,g){for(var w=i.length,v=f+(g?1:-1);g?v--:++v<w;)if(a(i[v],v,i))return v;return-1}function Ije(i){return i!==i}function Oje(i,a,f){for(var g=f-1,w=i.length;++g<w;)if(i[g]===a)return g;return-1}function Nje(i,a,f){return a===a?Oje(i,a,f):QRt(i,Ije,f)}function Pje(i,a){var f=i==null?0:i.length;return!!f&&Nje(i,a,0)>-1}function A2(i){return p8(i)?wFt(i):xBt(i)}var Fje=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bje=/^\w*$/;function opt(i,a){if(s1(i))return!1;var f=typeof i;return f=="number"||f=="symbol"||f=="boolean"||i==null||L9(i)?!0:Bje.test(i)||!Fje.test(i)||a!=null&&i in Object(a)}var Rje=500;function jje(i){var a=eD(i,function(g){return f.size===Rje&&f.clear(),g}),f=a.cache;return a}var $je=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zje=/\\(\\)?/g,qje=jje(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace($je,function(f,g,w,v){a.push(w?v.replace(zje,"$1"):g||f)}),a});const Hje=qje;function JRt(i){return i==null?"":KRt(i)}function zY(i,a){return s1(i)?i:opt(i,a)?[i]:Hje(JRt(i))}var Vje=1/0;function HF(i){if(typeof i=="string"||L9(i))return i;var a=i+"";return a=="0"&&1/i==-Vje?"-0":a}function qY(i,a){a=zY(a,i);for(var f=0,g=a.length;i!=null&&f<g;)i=i[HF(a[f++])];return f&&f==g?i:void 0}function Uje(i,a,f){var g=i==null?void 0:qY(i,a);return g===void 0?f:g}function cpt(i,a){for(var f=-1,g=a.length,w=i.length;++f<g;)i[w+f]=a[f];return i}var ZRt=Yw?Yw.isConcatSpreadable:void 0;function Gje(i){return s1(i)||nD(i)||!!(ZRt&&i&&i[ZRt])}function HY(i,a,f,g,w){var v=-1,b=i.length;for(f||(f=Gje),w||(w=[]);++v<b;){var E=i[v];a>0&&f(E)?a>1?HY(E,a-1,f,g,w):cpt(w,E):g||(w[w.length]=E)}return w}function vD(i){var a=i==null?0:i.length;return a?HY(i,1):[]}function Kje(i){return xFt(yFt(i,void 0,vD),i+"")}function Wje(i,a,f,g){var w=-1,v=i==null?0:i.length;for(g&&v&&(f=i[++w]);++w<v;)f=a(f,i[w],w,i);return f}function Yje(i,a){return i&&LF(a,A2(a),i)}function Xje(i,a){return i&&LF(a,y9(a),i)}function tjt(i,a){for(var f=-1,g=i==null?0:i.length,w=0,v=[];++f<g;){var b=i[f];a(b,f,i)&&(v[w++]=b)}return v}function ejt(){return[]}var Qje=Object.prototype,Jje=Qje.propertyIsEnumerable,njt=Object.getOwnPropertySymbols,Zje=njt?function(i){return i==null?[]:(i=Object(i),tjt(njt(i),function(a){return Jje.call(i,a)}))}:ejt;const upt=Zje;function t$e(i,a){return LF(i,upt(i),a)}var e$e=Object.getOwnPropertySymbols,n$e=e$e?function(i){for(var a=[];i;)cpt(a,upt(i)),i=vgt(i);return a}:ejt;const rjt=n$e;function r$e(i,a){return LF(i,rjt(i),a)}function ijt(i,a,f){var g=a(i);return s1(i)?g:cpt(g,f(i))}function lpt(i){return ijt(i,A2,upt)}function i$e(i){return ijt(i,y9,rjt)}var s$e=Object.prototype,a$e=s$e.hasOwnProperty;function o$e(i){var a=i.length,f=new i.constructor(a);return a&&typeof i[0]=="string"&&a$e.call(i,"index")&&(f.index=i.index,f.input=i.input),f}function c$e(i,a){var f=a?mgt(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}var u$e=/\w*$/;function l$e(i){var a=new i.constructor(i.source,u$e.exec(i));return a.lastIndex=i.lastIndex,a}var sjt=Yw?Yw.prototype:void 0,ajt=sjt?sjt.valueOf:void 0;function h$e(i){return ajt?Object(ajt.call(i)):{}}var f$e="[object Boolean]",d$e="[object Date]",g$e="[object Map]",p$e="[object Number]",b$e="[object RegExp]",w$e="[object Set]",m$e="[object String]",v$e="[object Symbol]",y$e="[object ArrayBuffer]",x$e="[object DataView]",k$e="[object Float32Array]",E$e="[object Float64Array]",T$e="[object Int8Array]",C$e="[object Int16Array]",S$e="[object Int32Array]",_$e="[object Uint8Array]",A$e="[object Uint8ClampedArray]",L$e="[object Uint16Array]",D$e="[object Uint32Array]";function M$e(i,a,f){var g=i.constructor;switch(a){case y$e:return mgt(i);case f$e:case d$e:return new g(+i);case x$e:return c$e(i,f);case k$e:case E$e:case T$e:case C$e:case S$e:case _$e:case A$e:case L$e:case D$e:return nFt(i,f);case g$e:return new g;case p$e:case m$e:return new g(i);case b$e:return l$e(i);case w$e:return new g;case v$e:return h$e(i)}}var I$e="[object Map]";function O$e(i){return e4(i)&&hD(i)==I$e}var ojt=iD&&iD.isMap,N$e=ojt?iY(ojt):O$e;const P$e=N$e;var F$e="[object Set]";function B$e(i){return e4(i)&&hD(i)==F$e}var cjt=iD&&iD.isSet,R$e=cjt?iY(cjt):B$e;const j$e=R$e;var $$e=1,z$e=2,q$e=4,ujt="[object Arguments]",H$e="[object Array]",V$e="[object Boolean]",U$e="[object Date]",G$e="[object Error]",ljt="[object Function]",K$e="[object GeneratorFunction]",W$e="[object Map]",Y$e="[object Number]",hjt="[object Object]",X$e="[object RegExp]",Q$e="[object Set]",J$e="[object String]",Z$e="[object Symbol]",tze="[object WeakMap]",eze="[object ArrayBuffer]",nze="[object DataView]",rze="[object Float32Array]",ize="[object Float64Array]",sze="[object Int8Array]",aze="[object Int16Array]",oze="[object Int32Array]",cze="[object Uint8Array]",uze="[object Uint8ClampedArray]",lze="[object Uint16Array]",hze="[object Uint32Array]",Tl={};Tl[ujt]=Tl[H$e]=Tl[eze]=Tl[nze]=Tl[V$e]=Tl[U$e]=Tl[rze]=Tl[ize]=Tl[sze]=Tl[aze]=Tl[oze]=Tl[W$e]=Tl[Y$e]=Tl[hjt]=Tl[X$e]=Tl[Q$e]=Tl[J$e]=Tl[Z$e]=Tl[cze]=Tl[uze]=Tl[lze]=Tl[hze]=!0,Tl[G$e]=Tl[ljt]=Tl[tze]=!1;function VF(i,a,f,g,w,v){var b,E=a&$$e,S=a&z$e,_=a&q$e;if(f&&(b=w?f(i,g,w,v):f(i)),b!==void 0)return b;if(!T2(i))return i;var M=s1(i);if(M){if(b=o$e(i),!E)return rFt(i,b)}else{var F=hD(i),R=F==ljt||F==K$e;if(rD(i))return eFt(i,E);if(F==hjt||F==ujt||R&&!w){if(b=S||R?{}:aFt(i),!E)return S?r$e(i,Xje(b,i)):t$e(i,Yje(b,i))}else{if(!Tl[F])return w?i:{};b=M$e(i,F,E)}}v||(v=new Gv);var B=v.get(i);if(B)return B;v.set(i,b),j$e(i)?i.forEach(function(nt){b.add(VF(nt,a,f,nt,i,v))}):P$e(i)&&i.forEach(function(nt,ot){b.set(ot,VF(nt,a,f,ot,i,v))});var z=_?S?i$e:lpt:S?y9:A2,Y=M?void 0:z(i);return XRt(Y||i,function(nt,ot){Y&&(ot=nt,nt=i[ot]),aY(b,ot,VF(nt,a,f,ot,i,v))}),b}var fze=4;function fjt(i){return VF(i,fze)}var dze=1,gze=4;function pze(i){return VF(i,dze|gze)}var bze="__lodash_hash_undefined__";function wze(i){return this.__data__.set(i,bze),this}function mze(i){return this.__data__.has(i)}function UF(i){var a=-1,f=i==null?0:i.length;for(this.__data__=new Ix;++a<f;)this.add(i[a])}UF.prototype.add=UF.prototype.push=wze,UF.prototype.has=mze;function vze(i,a){for(var f=-1,g=i==null?0:i.length;++f<g;)if(a(i[f],f,i))return!0;return!1}function djt(i,a){return i.has(a)}var yze=1,xze=2;function gjt(i,a,f,g,w,v){var b=f&yze,E=i.length,S=a.length;if(E!=S&&!(b&&S>E))return!1;var _=v.get(i),M=v.get(a);if(_&&M)return _==a&&M==i;var F=-1,R=!0,B=f&xze?new UF:void 0;for(v.set(i,a),v.set(a,i);++F<E;){var z=i[F],Y=a[F];if(g)var nt=b?g(Y,z,F,a,i,v):g(z,Y,F,i,a,v);if(nt!==void 0){if(nt)continue;R=!1;break}if(B){if(!vze(a,function(ot,ft){if(!djt(B,ft)&&(z===ot||w(z,ot,f,g,v)))return B.push(ft)})){R=!1;break}}else if(!(z===Y||w(z,Y,f,g,v))){R=!1;break}}return v.delete(i),v.delete(a),R}function kze(i){var a=-1,f=Array(i.size);return i.forEach(function(g,w){f[++a]=[w,g]}),f}function hpt(i){var a=-1,f=Array(i.size);return i.forEach(function(g){f[++a]=g}),f}var Eze=1,Tze=2,Cze="[object Boolean]",Sze="[object Date]",_ze="[object Error]",Aze="[object Map]",Lze="[object Number]",Dze="[object RegExp]",Mze="[object Set]",Ize="[object String]",Oze="[object Symbol]",Nze="[object ArrayBuffer]",Pze="[object DataView]",pjt=Yw?Yw.prototype:void 0,fpt=pjt?pjt.valueOf:void 0;function Fze(i,a,f,g,w,v,b){switch(f){case Pze:if(i.byteLength!=a.byteLength||i.byteOffset!=a.byteOffset)return!1;i=i.buffer,a=a.buffer;case Nze:return!(i.byteLength!=a.byteLength||!v(new nY(i),new nY(a)));case Cze:case Sze:case Lze:return tD(+i,+a);case _ze:return i.name==a.name&&i.message==a.message;case Dze:case Ize:return i==a+"";case Aze:var E=kze;case Mze:var S=g&Eze;if(E||(E=hpt),i.size!=a.size&&!S)return!1;var _=b.get(i);if(_)return _==a;g|=Tze,b.set(i,a);var M=gjt(E(i),E(a),g,w,v,b);return b.delete(i),M;case Oze:if(fpt)return fpt.call(i)==fpt.call(a)}return!1}var Bze=1,Rze=Object.prototype,jze=Rze.hasOwnProperty;function $ze(i,a,f,g,w,v){var b=f&Bze,E=lpt(i),S=E.length,_=lpt(a),M=_.length;if(S!=M&&!b)return!1;for(var F=S;F--;){var R=E[F];if(!(b?R in a:jze.call(a,R)))return!1}var B=v.get(i),z=v.get(a);if(B&&z)return B==a&&z==i;var Y=!0;v.set(i,a),v.set(a,i);for(var nt=b;++F<S;){R=E[F];var ot=i[R],ft=a[R];if(g)var wt=b?g(ft,ot,R,a,i,v):g(ot,ft,R,i,a,v);if(!(wt===void 0?ot===ft||w(ot,ft,f,g,v):wt)){Y=!1;break}nt||(nt=R=="constructor")}if(Y&&!nt){var mt=i.constructor,ct=a.constructor;mt!=ct&&"constructor"in i&&"constructor"in a&&!(typeof mt=="function"&&mt instanceof mt&&typeof ct=="function"&&ct instanceof ct)&&(Y=!1)}return v.delete(i),v.delete(a),Y}var zze=1,bjt="[object Arguments]",wjt="[object Array]",VY="[object Object]",qze=Object.prototype,mjt=qze.hasOwnProperty;function Hze(i,a,f,g,w,v){var b=s1(i),E=s1(a),S=b?wjt:hD(i),_=E?wjt:hD(a);S=S==bjt?VY:S,_=_==bjt?VY:_;var M=S==VY,F=_==VY,R=S==_;if(R&&rD(i)){if(!rD(a))return!1;b=!0,M=!1}if(R&&!M)return v||(v=new Gv),b||sY(i)?gjt(i,a,f,g,w,v):Fze(i,a,S,f,g,w,v);if(!(f&zze)){var B=M&&mjt.call(i,"__wrapped__"),z=F&&mjt.call(a,"__wrapped__");if(B||z){var Y=B?i.value():i,nt=z?a.value():a;return v||(v=new Gv),w(Y,nt,f,g,v)}}return R?(v||(v=new Gv),$ze(i,a,f,g,w,v)):!1}function dpt(i,a,f,g,w){return i===a?!0:i==null||a==null||!e4(i)&&!e4(a)?i!==i&&a!==a:Hze(i,a,f,g,dpt,w)}var Vze=1,Uze=2;function Gze(i,a,f,g){var w=f.length,v=w,b=!g;if(i==null)return!v;for(i=Object(i);w--;){var E=f[w];if(b&&E[2]?E[1]!==i[E[0]]:!(E[0]in i))return!1}for(;++w<v;){E=f[w];var S=E[0],_=i[S],M=E[1];if(b&&E[2]){if(_===void 0&&!(S in i))return!1}else{var F=new Gv;if(g)var R=g(_,M,S,i,a,F);if(!(R===void 0?dpt(M,_,Vze|Uze,g,F):R))return!1}}return!0}function vjt(i){return i===i&&!T2(i)}function Kze(i){for(var a=A2(i),f=a.length;f--;){var g=a[f],w=i[g];a[f]=[g,w,vjt(w)]}return a}function yjt(i,a){return function(f){return f==null?!1:f[i]===a&&(a!==void 0||i in Object(f))}}function Wze(i){var a=Kze(i);return a.length==1&&a[0][2]?yjt(a[0][0],a[0][1]):function(f){return f===i||Gze(f,i,a)}}function Yze(i,a){return i!=null&&a in Object(i)}function xjt(i,a,f){a=zY(a,i);for(var g=-1,w=a.length,v=!1;++g<w;){var b=HF(a[g]);if(!(v=i!=null&&f(i,b)))break;i=i[b]}return v||++g!=w?v:(w=i==null?0:i.length,!!w&&ygt(w)&&oY(b,w)&&(s1(i)||nD(i)))}function kjt(i,a){return i!=null&&xjt(i,a,Yze)}var Xze=1,Qze=2;function Jze(i,a){return opt(i)&&vjt(a)?yjt(HF(i),a):function(f){var g=Uje(f,i);return g===void 0&&g===a?kjt(f,i):dpt(a,g,Xze|Qze)}}function Zze(i){return function(a){return a==null?void 0:a[i]}}function tqe(i){return function(a){return qY(a,i)}}function eqe(i){return opt(i)?Zze(HF(i)):tqe(i)}function k8(i){return typeof i=="function"?i:i==null?x9:typeof i=="object"?s1(i)?Jze(i[0],i[1]):Wze(i):eqe(i)}function gpt(i,a){return i&&wgt(i,a,A2)}function nqe(i,a){return function(f,g){if(f==null)return f;if(!p8(f))return i(f,g);for(var w=f.length,v=a?w:-1,b=Object(f);(a?v--:++v<w)&&g(b[v],v,b)!==!1;);return f}}var rqe=nqe(gpt);const UY=rqe;var iqe=function(){return Uv.Date.now()};const Ejt=iqe;var Tjt=Object.prototype,sqe=Tjt.hasOwnProperty,aqe=cY(function(i,a){i=Object(i);var f=-1,g=a.length,w=g>2?a[2]:void 0;for(w&&DF(a[0],a[1],w)&&(g=1);++f<g;)for(var v=a[f],b=y9(v),E=-1,S=b.length;++E<S;){var _=b[E],M=i[_];(M===void 0||tD(M,Tjt[_])&&!sqe.call(i,_))&&(i[_]=v[_])}return i});const yD=aqe;function oqe(i,a,f){for(var g=-1,w=i==null?0:i.length;++g<w;)if(f(a,i[g]))return!0;return!1}function GY(i){var a=i==null?0:i.length;return a?i[a-1]:void 0}function ppt(i){return typeof i=="function"?i:x9}function yr(i,a){var f=s1(i)?XRt:UY;return f(i,ppt(a))}function cqe(i,a){var f=[];return UY(i,function(g,w,v){a(g,w,v)&&f.push(g)}),f}function Fx(i,a){var f=s1(i)?tjt:cqe;return f(i,k8(a))}function uqe(i){return function(a,f,g){var w=Object(a);if(!p8(a)){var v=k8(f);a=A2(a),f=function(E){return v(w[E],E,w)}}var b=i(a,f,g);return b>-1?w[v?a[b]:b]:void 0}}var lqe=Math.max;function hqe(i,a,f){var g=i==null?0:i.length;if(!g)return-1;var w=f==null?0:Dje(f);return w<0&&(w=lqe(g+w,0)),QRt(i,k8(a),w)}var fqe=uqe(hqe);const bpt=fqe;function Cjt(i,a){var f=-1,g=p8(i)?Array(i.length):[];return UY(i,function(w,v,b){g[++f]=a(w,v,b)}),g}function u1(i,a){var f=s1(i)?mD:Cjt;return f(i,k8(a))}function dqe(i,a){return i==null?i:wgt(i,ppt(a),y9)}function gqe(i,a){return i&&gpt(i,ppt(a))}function pqe(i,a){return i>a}var bqe=Object.prototype,wqe=bqe.hasOwnProperty;function mqe(i,a){return i!=null&&wqe.call(i,a)}function lo(i,a){return i!=null&&xjt(i,a,mqe)}function vqe(i,a){return mD(a,function(f){return i[f]})}function Bx(i){return i==null?[]:vqe(i,A2(i))}function Tf(i){return i===void 0}function Sjt(i,a){return i<a}function KY(i,a){var f={};return a=k8(a),gpt(i,function(g,w,v){eY(f,w,a(g,w,v))}),f}function wpt(i,a,f){for(var g=-1,w=i.length;++g<w;){var v=i[g],b=a(v);if(b!=null&&(E===void 0?b===b&&!L9(b):f(b,E)))var E=b,S=v}return S}function D9(i){return i&&i.length?wpt(i,x9,pqe):void 0}function GF(i){return i&&i.length?wpt(i,x9,Sjt):void 0}function mpt(i,a){return i&&i.length?wpt(i,k8(a),Sjt):void 0}function yqe(i,a,f,g){if(!T2(i))return i;a=zY(a,i);for(var w=-1,v=a.length,b=v-1,E=i;E!=null&&++w<v;){var S=HF(a[w]),_=f;if(S==="__proto__"||S==="constructor"||S==="prototype")return i;if(w!=b){var M=E[S];_=g?g(M,S,E):void 0,_===void 0&&(_=T2(M)?M:oY(a[w+1])?[]:{})}aY(E,S,_),E=E[S]}return i}function xqe(i,a,f){for(var g=-1,w=a.length,v={};++g<w;){var b=a[g],E=qY(i,b);f(E,b)&&yqe(v,zY(b,i),E)}return v}function kqe(i,a){var f=i.length;for(i.sort(a);f--;)i[f]=i[f].value;return i}function Eqe(i,a){if(i!==a){var f=i!==void 0,g=i===null,w=i===i,v=L9(i),b=a!==void 0,E=a===null,S=a===a,_=L9(a);if(!E&&!_&&!v&&i>a||v&&b&&S&&!E&&!_||g&&b&&S||!f&&S||!w)return 1;if(!g&&!v&&!_&&i<a||_&&f&&w&&!g&&!v||E&&f&&w||!b&&w||!S)return-1}return 0}function Tqe(i,a,f){for(var g=-1,w=i.criteria,v=a.criteria,b=w.length,E=f.length;++g<b;){var S=Eqe(w[g],v[g]);if(S){if(g>=E)return S;var _=f[g];return S*(_=="desc"?-1:1)}}return i.index-a.index}function Cqe(i,a,f){a.length?a=mD(a,function(v){return s1(v)?function(b){return qY(b,v.length===1?v[0]:v)}:v}):a=[x9];var g=-1;a=mD(a,iY(k8));var w=Cjt(i,function(v,b,E){var S=mD(a,function(_){return _(v)});return{criteria:S,index:++g,value:v}});return kqe(w,function(v,b){return Tqe(v,b,f)})}function Sqe(i,a){return xqe(i,a,function(f,g){return kjt(i,g)})}var _qe=Kje(function(i,a){return i==null?{}:Sqe(i,a)});const KF=_qe;var Aqe=Math.ceil,Lqe=Math.max;function Dqe(i,a,f,g){for(var w=-1,v=Lqe(Aqe((a-i)/(f||1)),0),b=Array(v);v--;)b[g?v:++w]=i,i+=f;return b}function Mqe(i){return function(a,f,g){return g&&typeof g!="number"&&DF(a,f,g)&&(f=g=void 0),a=$Y(a),f===void 0?(f=a,a=0):f=$Y(f),g=g===void 0?a<f?1:-1:$Y(g),Dqe(a,f,g,i)}}var Iqe=Mqe();const M9=Iqe;function Oqe(i,a,f,g,w){return w(i,function(v,b,E){f=g?(g=!1,v):a(f,v,b,E)}),f}function WF(i,a,f){var g=s1(i)?Wje:Oqe,w=arguments.length<3;return g(i,k8(a),f,w,UY)}var Nqe=cY(function(i,a){if(i==null)return[];var f=a.length;return f>1&&DF(i,a[0],a[1])?a=[]:f>2&&DF(a[0],a[1],a[2])&&(a=[a[0]]),Cqe(i,HY(a,1),[])});const YF=Nqe;var Pqe=1/0,Fqe=lD&&1/hpt(new lD([,-0]))[1]==Pqe?function(i){return new lD(i)}:Mje;const Bqe=Fqe;var Rqe=200;function jqe(i,a,f){var g=-1,w=Pje,v=i.length,b=!0,E=[],S=E;if(f)b=!1,w=oqe;else if(v>=Rqe){var _=a?null:Bqe(i);if(_)return hpt(_);b=!1,w=djt,S=new UF}else S=a?[]:E;t:for(;++g<v;){var M=i[g],F=a?a(M):M;if(M=f||M!==0?M:0,b&&F===F){for(var R=S.length;R--;)if(S[R]===F)continue t;a&&S.push(F),E.push(M)}else w(S,F,f)||(S!==E&&S.push(F),E.push(M))}return E}var $qe=cY(function(i){return jqe(HY(i,1,uFt,!0))});const zqe=$qe;var qqe=0;function WY(i){var a=++qqe;return JRt(i)+a}function Hqe(i,a,f){for(var g=-1,w=i.length,v=a.length,b={};++g<w;){var E=g<v?a[g]:void 0;f(b,i[g],E)}return b}function Vqe(i,a){return Hqe(i||[],a||[],aY)}var Uqe="\0",I9="\0",_jt="";class l1{constructor(a={}){this._isDirected=lo(a,"directed")?a.directed:!0,this._isMultigraph=lo(a,"multigraph")?a.multigraph:!1,this._isCompound=lo(a,"compound")?a.compound:!1,this._label=void 0,this._defaultNodeLabelFn=sD(void 0),this._defaultEdgeLabelFn=sD(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[I9]={}),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(a){return this._label=a,this}graph(){return this._label}setDefaultNodeLabel(a){return ZL(a)||(a=sD(a)),this._defaultNodeLabelFn=a,this}nodeCount(){return this._nodeCount}nodes(){return A2(this._nodes)}sources(){var a=this;return Fx(this.nodes(),function(f){return BF(a._in[f])})}sinks(){var a=this;return Fx(this.nodes(),function(f){return BF(a._out[f])})}setNodes(a,f){var g=arguments,w=this;return yr(a,function(v){g.length>1?w.setNode(v,f):w.setNode(v)}),this}setNode(a,f){return lo(this._nodes,a)?(arguments.length>1&&(this._nodes[a]=f),this):(this._nodes[a]=arguments.length>1?f:this._defaultNodeLabelFn(a),this._isCompound&&(this._parent[a]=I9,this._children[a]={},this._children[I9][a]=!0),this._in[a]={},this._preds[a]={},this._out[a]={},this._sucs[a]={},++this._nodeCount,this)}node(a){return this._nodes[a]}hasNode(a){return lo(this._nodes,a)}removeNode(a){var f=this;if(lo(this._nodes,a)){var g=function(w){f.removeEdge(f._edgeObjs[w])};delete this._nodes[a],this._isCompound&&(this._removeFromParentsChildList(a),delete this._parent[a],yr(this.children(a),function(w){f.setParent(w)}),delete this._children[a]),yr(A2(this._in[a]),g),delete this._in[a],delete this._preds[a],yr(A2(this._out[a]),g),delete this._out[a],delete this._sucs[a],--this._nodeCount}return this}setParent(a,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Tf(f))f=I9;else{f+="";for(var g=f;!Tf(g);g=this.parent(g))if(g===a)throw new Error("Setting "+f+" as parent of "+a+" would create a cycle");this.setNode(f)}return this.setNode(a),this._removeFromParentsChildList(a),this._parent[a]=f,this._children[f][a]=!0,this}_removeFromParentsChildList(a){delete this._children[this._parent[a]][a]}parent(a){if(this._isCompound){var f=this._parent[a];if(f!==I9)return f}}children(a){if(Tf(a)&&(a=I9),this._isCompound){var f=this._children[a];if(f)return A2(f)}else{if(a===I9)return this.nodes();if(this.hasNode(a))return[]}}predecessors(a){var f=this._preds[a];if(f)return A2(f)}successors(a){var f=this._sucs[a];if(f)return A2(f)}neighbors(a){var f=this.predecessors(a);if(f)return zqe(f,this.successors(a))}isLeaf(a){var f;return this.isDirected()?f=this.successors(a):f=this.neighbors(a),f.length===0}filterNodes(a){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var g=this;yr(this._nodes,function(b,E){a(E)&&f.setNode(E,b)}),yr(this._edgeObjs,function(b){f.hasNode(b.v)&&f.hasNode(b.w)&&f.setEdge(b,g.edge(b))});var w={};function v(b){var E=g.parent(b);return E===void 0||f.hasNode(E)?(w[b]=E,E):E in w?w[E]:v(E)}return this._isCompound&&yr(f.nodes(),function(b){f.setParent(b,v(b))}),f}setDefaultEdgeLabel(a){return ZL(a)||(a=sD(a)),this._defaultEdgeLabelFn=a,this}edgeCount(){return this._edgeCount}edges(){return Bx(this._edgeObjs)}setPath(a,f){var g=this,w=arguments;return WF(a,function(v,b){return w.length>1?g.setEdge(v,b,f):g.setEdge(v,b),b}),this}setEdge(){var a,f,g,w,v=!1,b=arguments[0];typeof b=="object"&&b!==null&&"v"in b?(a=b.v,f=b.w,g=b.name,arguments.length===2&&(w=arguments[1],v=!0)):(a=b,f=arguments[1],g=arguments[3],arguments.length>2&&(w=arguments[2],v=!0)),a=""+a,f=""+f,Tf(g)||(g=""+g);var E=XF(this._isDirected,a,f,g);if(lo(this._edgeLabels,E))return v&&(this._edgeLabels[E]=w),this;if(!Tf(g)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(a),this.setNode(f),this._edgeLabels[E]=v?w:this._defaultEdgeLabelFn(a,f,g);var S=Gqe(this._isDirected,a,f,g);return a=S.v,f=S.w,Object.freeze(S),this._edgeObjs[E]=S,Ajt(this._preds[f],a),Ajt(this._sucs[a],f),this._in[f][E]=S,this._out[a][E]=S,this._edgeCount++,this}edge(a,f,g){var w=arguments.length===1?vpt(this._isDirected,arguments[0]):XF(this._isDirected,a,f,g);return this._edgeLabels[w]}hasEdge(a,f,g){var w=arguments.length===1?vpt(this._isDirected,arguments[0]):XF(this._isDirected,a,f,g);return lo(this._edgeLabels,w)}removeEdge(a,f,g){var w=arguments.length===1?vpt(this._isDirected,arguments[0]):XF(this._isDirected,a,f,g),v=this._edgeObjs[w];return v&&(a=v.v,f=v.w,delete this._edgeLabels[w],delete this._edgeObjs[w],Ljt(this._preds[f],a),Ljt(this._sucs[a],f),delete this._in[f][w],delete this._out[a][w],this._edgeCount--),this}inEdges(a,f){var g=this._in[a];if(g){var w=Bx(g);return f?Fx(w,function(v){return v.v===f}):w}}outEdges(a,f){var g=this._out[a];if(g){var w=Bx(g);return f?Fx(w,function(v){return v.w===f}):w}}nodeEdges(a,f){var g=this.inEdges(a,f);if(g)return g.concat(this.outEdges(a,f))}}l1.prototype._nodeCount=0,l1.prototype._edgeCount=0;function Ajt(i,a){i[a]?i[a]++:i[a]=1}function Ljt(i,a){--i[a]||delete i[a]}function XF(i,a,f,g){var w=""+a,v=""+f;if(!i&&w>v){var b=w;w=v,v=b}return w+_jt+v+_jt+(Tf(g)?Uqe:g)}function Gqe(i,a,f,g){var w=""+a,v=""+f;if(!i&&w>v){var b=w;w=v,v=b}var E={v:w,w:v};return g&&(E.name=g),E}function vpt(i,a){return XF(i,a.v,a.w,a.name)}class Kqe{constructor(){var a={};a._next=a._prev=a,this._sentinel=a}dequeue(){var a=this._sentinel,f=a._prev;if(f!==a)return Djt(f),f}enqueue(a){var f=this._sentinel;a._prev&&a._next&&Djt(a),a._next=f._next,f._next._prev=a,f._next=a,a._prev=f}toString(){for(var a=[],f=this._sentinel,g=f._prev;g!==f;)a.push(JSON.stringify(g,Wqe)),g=g._prev;return"["+a.join(", ")+"]"}}function Djt(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function Wqe(i,a){if(i!=="_next"&&i!=="_prev")return a}var Yqe=sD(1);function Xqe(i,a){if(i.nodeCount()<=1)return[];var f=Jqe(i,a||Yqe),g=Qqe(f.graph,f.buckets,f.zeroIdx);return vD(u1(g,function(w){return i.outEdges(w.v,w.w)}))}function Qqe(i,a,f){for(var g=[],w=a[a.length-1],v=a[0],b;i.nodeCount();){for(;b=v.dequeue();)ypt(i,a,f,b);for(;b=w.dequeue();)ypt(i,a,f,b);if(i.nodeCount()){for(var E=a.length-2;E>0;--E)if(b=a[E].dequeue(),b){g=g.concat(ypt(i,a,f,b,!0));break}}}return g}function ypt(i,a,f,g,w){var v=w?[]:void 0;return yr(i.inEdges(g.v),function(b){var E=i.edge(b),S=i.node(b.v);w&&v.push({v:b.v,w:b.w}),S.out-=E,xpt(a,f,S)}),yr(i.outEdges(g.v),function(b){var E=i.edge(b),S=b.w,_=i.node(S);_.in-=E,xpt(a,f,_)}),i.removeNode(g.v),v}function Jqe(i,a){var f=new l1,g=0,w=0;yr(i.nodes(),function(E){f.setNode(E,{v:E,in:0,out:0})}),yr(i.edges(),function(E){var S=f.edge(E.v,E.w)||0,_=a(E),M=S+_;f.setEdge(E.v,E.w,M),w=Math.max(w,f.node(E.v).out+=_),g=Math.max(g,f.node(E.w).in+=_)});var v=M9(w+g+3).map(function(){return new Kqe}),b=g+1;return yr(f.nodes(),function(E){xpt(v,b,f.node(E))}),{graph:f,buckets:v,zeroIdx:b}}function xpt(i,a,f){f.out?f.in?i[f.out-f.in+a].enqueue(f):i[i.length-1].enqueue(f):i[0].enqueue(f)}function Zqe(i){var a=i.graph().acyclicer==="greedy"?Xqe(i,f(i)):tHe(i);yr(a,function(g){var w=i.edge(g);i.removeEdge(g),w.forwardName=g.name,w.reversed=!0,i.setEdge(g.w,g.v,w,WY("rev"))});function f(g){return function(w){return g.edge(w).weight}}}function tHe(i){var a=[],f={},g={};function w(v){lo(g,v)||(g[v]=!0,f[v]=!0,yr(i.outEdges(v),function(b){lo(f,b.w)?a.push(b):w(b.w)}),delete f[v])}return yr(i.nodes(),w),a}function eHe(i){yr(i.edges(),function(a){var f=i.edge(a);if(f.reversed){i.removeEdge(a);var g=f.forwardName;delete f.reversed,delete f.forwardName,i.setEdge(a.w,a.v,f,g)}})}function xD(i,a,f,g){var w;do w=WY(g);while(i.hasNode(w));return f.dummy=a,i.setNode(w,f),w}function nHe(i){var a=new l1().setGraph(i.graph());return yr(i.nodes(),function(f){a.setNode(f,i.node(f))}),yr(i.edges(),function(f){var g=a.edge(f.v,f.w)||{weight:0,minlen:1},w=i.edge(f);a.setEdge(f.v,f.w,{weight:g.weight+w.weight,minlen:Math.max(g.minlen,w.minlen)})}),a}function Mjt(i){var a=new l1({multigraph:i.isMultigraph()}).setGraph(i.graph());return yr(i.nodes(),function(f){i.children(f).length||a.setNode(f,i.node(f))}),yr(i.edges(),function(f){a.setEdge(f,i.edge(f))}),a}function Ijt(i,a){var f=i.x,g=i.y,w=a.x-f,v=a.y-g,b=i.width/2,E=i.height/2;if(!w&&!v)throw new Error("Not possible to find intersection inside of the rectangle");var S,_;return Math.abs(v)*b>Math.abs(w)*E?(v<0&&(E=-E),S=E*w/v,_=E):(w<0&&(b=-b),S=b,_=b*v/w),{x:f+S,y:g+_}}function YY(i){var a=u1(M9(Njt(i)+1),function(){return[]});return yr(i.nodes(),function(f){var g=i.node(f),w=g.rank;Tf(w)||(a[w][g.order]=f)}),a}function rHe(i){var a=GF(u1(i.nodes(),function(f){return i.node(f).rank}));yr(i.nodes(),function(f){var g=i.node(f);lo(g,"rank")&&(g.rank-=a)})}function iHe(i){var a=GF(u1(i.nodes(),function(v){return i.node(v).rank})),f=[];yr(i.nodes(),function(v){var b=i.node(v).rank-a;f[b]||(f[b]=[]),f[b].push(v)});var g=0,w=i.graph().nodeRankFactor;yr(f,function(v,b){Tf(v)&&b%w!==0?--g:g&&yr(v,function(E){i.node(E).rank+=g})})}function Ojt(i,a,f,g){var w={width:0,height:0};return arguments.length>=4&&(w.rank=f,w.order=g),xD(i,"border",w,a)}function Njt(i){return D9(u1(i.nodes(),function(a){var f=i.node(a).rank;if(!Tf(f))return f}))}function sHe(i,a){var f={lhs:[],rhs:[]};return yr(i,function(g){a(g)?f.lhs.push(g):f.rhs.push(g)}),f}function aHe(i,a){var f=Ejt();try{return a()}finally{console.log(i+" time: "+(Ejt()-f)+"ms")}}function oHe(i,a){return a()}function cHe(i){function a(f){var g=i.children(f),w=i.node(f);if(g.length&&yr(g,a),lo(w,"minRank")){w.borderLeft=[],w.borderRight=[];for(var v=w.minRank,b=w.maxRank+1;v<b;++v)Pjt(i,"borderLeft","_bl",f,w,v),Pjt(i,"borderRight","_br",f,w,v)}}yr(i.children(),a)}function Pjt(i,a,f,g,w,v){var b={width:0,height:0,rank:v,borderType:a},E=w[a][v-1],S=xD(i,"border",b,f);w[a][v]=S,i.setParent(S,g),E&&i.setEdge(E,S,{weight:1})}function uHe(i){var a=i.graph().rankdir.toLowerCase();(a==="lr"||a==="rl")&&Fjt(i)}function lHe(i){var a=i.graph().rankdir.toLowerCase();(a==="bt"||a==="rl")&&hHe(i),(a==="lr"||a==="rl")&&(fHe(i),Fjt(i))}function Fjt(i){yr(i.nodes(),function(a){Bjt(i.node(a))}),yr(i.edges(),function(a){Bjt(i.edge(a))})}function Bjt(i){var a=i.width;i.width=i.height,i.height=a}function hHe(i){yr(i.nodes(),function(a){kpt(i.node(a))}),yr(i.edges(),function(a){var f=i.edge(a);yr(f.points,kpt),lo(f,"y")&&kpt(f)})}function kpt(i){i.y=-i.y}function fHe(i){yr(i.nodes(),function(a){Ept(i.node(a))}),yr(i.edges(),function(a){var f=i.edge(a);yr(f.points,Ept),lo(f,"x")&&Ept(f)})}function Ept(i){var a=i.x;i.x=i.y,i.y=a}function dHe(i){i.graph().dummyChains=[],yr(i.edges(),function(a){gHe(i,a)})}function gHe(i,a){var f=a.v,g=i.node(f).rank,w=a.w,v=i.node(w).rank,b=a.name,E=i.edge(a),S=E.labelRank;if(v!==g+1){i.removeEdge(a);var _,M,F;for(F=0,++g;g<v;++F,++g)E.points=[],M={width:0,height:0,edgeLabel:E,edgeObj:a,rank:g},_=xD(i,"edge",M,"_d"),g===S&&(M.width=E.width,M.height=E.height,M.dummy="edge-label",M.labelpos=E.labelpos),i.setEdge(f,_,{weight:E.weight},b),F===0&&i.graph().dummyChains.push(_),f=_;i.setEdge(f,w,{weight:E.weight},b)}}function pHe(i){yr(i.graph().dummyChains,function(a){var f=i.node(a),g=f.edgeLabel,w;for(i.setEdge(f.edgeObj,g);f.dummy;)w=i.successors(a)[0],i.removeNode(a),g.points.push({x:f.x,y:f.y}),f.dummy==="edge-label"&&(g.x=f.x,g.y=f.y,g.width=f.width,g.height=f.height),a=w,f=i.node(a)})}function Tpt(i){var a={};function f(g){var w=i.node(g);if(lo(a,g))return w.rank;a[g]=!0;var v=GF(u1(i.outEdges(g),function(b){return f(b.w)-i.edge(b).minlen}));return(v===Number.POSITIVE_INFINITY||v===void 0||v===null)&&(v=0),w.rank=v}yr(i.sources(),f)}function QF(i,a){return i.node(a.w).rank-i.node(a.v).rank-i.edge(a).minlen}function Rjt(i){var a=new l1({directed:!1}),f=i.nodes()[0],g=i.nodeCount();a.setNode(f,{});for(var w,v;bHe(a,i)<g;)w=wHe(a,i),v=a.hasNode(w.v)?QF(i,w):-QF(i,w),mHe(a,i,v);return a}function bHe(i,a){function f(g){yr(a.nodeEdges(g),function(w){var v=w.v,b=g===v?w.w:v;!i.hasNode(b)&&!QF(a,w)&&(i.setNode(b,{}),i.setEdge(g,b,{}),f(b))})}return yr(i.nodes(),f),i.nodeCount()}function wHe(i,a){return mpt(a.edges(),function(f){if(i.hasNode(f.v)!==i.hasNode(f.w))return QF(a,f)})}function mHe(i,a,f){yr(i.nodes(),function(g){a.node(g).rank+=f})}function vHe(){}vHe.prototype=new Error;function jjt(i,a,f){s1(a)||(a=[a]);var g=(i.isDirected()?i.successors:i.neighbors).bind(i),w=[],v={};return yr(a,function(b){if(!i.hasNode(b))throw new Error("Graph does not have node: "+b);$jt(i,b,f==="post",v,g,w)}),w}function $jt(i,a,f,g,w,v){lo(g,a)||(g[a]=!0,f||v.push(a),yr(w(a),function(b){$jt(i,b,f,g,w,v)}),f&&v.push(a))}function yHe(i,a){return jjt(i,a,"post")}function xHe(i,a){return jjt(i,a,"pre")}O9.initLowLimValues=Spt,O9.initCutValues=Cpt,O9.calcCutValue=zjt,O9.leaveEdge=Hjt,O9.enterEdge=Vjt,O9.exchangeEdges=Ujt;function O9(i){i=nHe(i),Tpt(i);var a=Rjt(i);Spt(a),Cpt(a,i);for(var f,g;f=Hjt(a);)g=Vjt(a,i,f),Ujt(a,i,f,g)}function Cpt(i,a){var f=yHe(i,i.nodes());f=f.slice(0,f.length-1),yr(f,function(g){kHe(i,a,g)})}function kHe(i,a,f){var g=i.node(f),w=g.parent;i.edge(f,w).cutvalue=zjt(i,a,f)}function zjt(i,a,f){var g=i.node(f),w=g.parent,v=!0,b=a.edge(f,w),E=0;return b||(v=!1,b=a.edge(w,f)),E=b.weight,yr(a.nodeEdges(f),function(S){var _=S.v===f,M=_?S.w:S.v;if(M!==w){var F=_===v,R=a.edge(S).weight;if(E+=F?R:-R,THe(i,f,M)){var B=i.edge(f,M).cutvalue;E+=F?-B:B}}}),E}function Spt(i,a){arguments.length<2&&(a=i.nodes()[0]),qjt(i,{},1,a)}function qjt(i,a,f,g,w){var v=f,b=i.node(g);return a[g]=!0,yr(i.neighbors(g),function(E){lo(a,E)||(f=qjt(i,a,f,E,g))}),b.low=v,b.lim=f++,w?b.parent=w:delete b.parent,f}function Hjt(i){return bpt(i.edges(),function(a){return i.edge(a).cutvalue<0})}function Vjt(i,a,f){var g=f.v,w=f.w;a.hasEdge(g,w)||(g=f.w,w=f.v);var v=i.node(g),b=i.node(w),E=v,S=!1;v.lim>b.lim&&(E=b,S=!0);var _=Fx(a.edges(),function(M){return S===Gjt(i,i.node(M.v),E)&&S!==Gjt(i,i.node(M.w),E)});return mpt(_,function(M){return QF(a,M)})}function Ujt(i,a,f,g){var w=f.v,v=f.w;i.removeEdge(w,v),i.setEdge(g.v,g.w,{}),Spt(i),Cpt(i,a),EHe(i,a)}function EHe(i,a){var f=bpt(i.nodes(),function(w){return!a.node(w).parent}),g=xHe(i,f);g=g.slice(1),yr(g,function(w){var v=i.node(w).parent,b=a.edge(w,v),E=!1;b||(b=a.edge(v,w),E=!0),a.node(w).rank=a.node(v).rank+(E?b.minlen:-b.minlen)})}function THe(i,a,f){return i.hasEdge(a,f)}function Gjt(i,a,f){return f.low<=a.lim&&a.lim<=f.lim}function CHe(i){switch(i.graph().ranker){case"network-simplex":Kjt(i);break;case"tight-tree":_He(i);break;case"longest-path":SHe(i);break;default:Kjt(i)}}var SHe=Tpt;function _He(i){Tpt(i),Rjt(i)}function Kjt(i){O9(i)}function AHe(i){var a=xD(i,"root",{},"_root"),f=LHe(i),g=D9(Bx(f))-1,w=2*g+1;i.graph().nestingRoot=a,yr(i.edges(),function(b){i.edge(b).minlen*=w});var v=DHe(i)+1;yr(i.children(),function(b){Wjt(i,a,w,v,g,f,b)}),i.graph().nodeRankFactor=w}function Wjt(i,a,f,g,w,v,b){var E=i.children(b);if(!E.length){b!==a&&i.setEdge(a,b,{weight:0,minlen:f});return}var S=Ojt(i,"_bt"),_=Ojt(i,"_bb"),M=i.node(b);i.setParent(S,b),M.borderTop=S,i.setParent(_,b),M.borderBottom=_,yr(E,function(F){Wjt(i,a,f,g,w,v,F);var R=i.node(F),B=R.borderTop?R.borderTop:F,z=R.borderBottom?R.borderBottom:F,Y=R.borderTop?g:2*g,nt=B!==z?1:w-v[b]+1;i.setEdge(S,B,{weight:Y,minlen:nt,nestingEdge:!0}),i.setEdge(z,_,{weight:Y,minlen:nt,nestingEdge:!0})}),i.parent(b)||i.setEdge(a,S,{weight:0,minlen:w+v[b]})}function LHe(i){var a={};function f(g,w){var v=i.children(g);v&&v.length&&yr(v,function(b){f(b,w+1)}),a[g]=w}return yr(i.children(),function(g){f(g,1)}),a}function DHe(i){return WF(i.edges(),function(a,f){return a+i.edge(f).weight},0)}function MHe(i){var a=i.graph();i.removeNode(a.nestingRoot),delete a.nestingRoot,yr(i.edges(),function(f){var g=i.edge(f);g.nestingEdge&&i.removeEdge(f)})}function IHe(i,a,f){var g={},w;yr(f,function(v){for(var b=i.parent(v),E,S;b;){if(E=i.parent(b),E?(S=g[E],g[E]=b):(S=w,w=b),S&&S!==b){a.setEdge(S,b);return}b=E}})}function OHe(i,a,f){var g=NHe(i),w=new l1({compound:!0}).setGraph({root:g}).setDefaultNodeLabel(function(v){return i.node(v)});return yr(i.nodes(),function(v){var b=i.node(v),E=i.parent(v);(b.rank===a||b.minRank<=a&&a<=b.maxRank)&&(w.setNode(v),w.setParent(v,E||g),yr(i[f](v),function(S){var _=S.v===v?S.w:S.v,M=w.edge(_,v),F=Tf(M)?0:M.weight;w.setEdge(_,v,{weight:i.edge(S).weight+F})}),lo(b,"minRank")&&w.setNode(v,{borderLeft:b.borderLeft[a],borderRight:b.borderRight[a]}))}),w}function NHe(i){for(var a;i.hasNode(a=WY("_root")););return a}function PHe(i,a){for(var f=0,g=1;g<a.length;++g)f+=FHe(i,a[g-1],a[g]);return f}function FHe(i,a,f){for(var g=Vqe(f,u1(f,function(_,M){return M})),w=vD(u1(a,function(_){return YF(u1(i.outEdges(_),function(M){return{pos:g[M.w],weight:i.edge(M).weight}}),"pos")})),v=1;v<f.length;)v<<=1;var b=2*v-1;v-=1;var E=u1(new Array(b),function(){return 0}),S=0;return yr(w.forEach(function(_){var M=_.pos+v;E[M]+=_.weight;for(var F=0;M>0;)M%2&&(F+=E[M+1]),M=M-1>>1,E[M]+=_.weight;S+=_.weight*F})),S}function BHe(i){var a={},f=Fx(i.nodes(),function(E){return!i.children(E).length}),g=D9(u1(f,function(E){return i.node(E).rank})),w=u1(M9(g+1),function(){return[]});function v(E){if(!lo(a,E)){a[E]=!0;var S=i.node(E);w[S.rank].push(E),yr(i.successors(E),v)}}var b=YF(f,function(E){return i.node(E).rank});return yr(b,v),w}function RHe(i,a){return u1(a,function(f){var g=i.inEdges(f);if(g.length){var w=WF(g,function(v,b){var E=i.edge(b),S=i.node(b.v);return{sum:v.sum+E.weight*S.order,weight:v.weight+E.weight}},{sum:0,weight:0});return{v:f,barycenter:w.sum/w.weight,weight:w.weight}}else return{v:f}})}function jHe(i,a){var f={};yr(i,function(w,v){var b=f[w.v]={indegree:0,in:[],out:[],vs:[w.v],i:v};Tf(w.barycenter)||(b.barycenter=w.barycenter,b.weight=w.weight)}),yr(a.edges(),function(w){var v=f[w.v],b=f[w.w];!Tf(v)&&!Tf(b)&&(b.indegree++,v.out.push(f[w.w]))});var g=Fx(f,function(w){return!w.indegree});return $He(g)}function $He(i){var a=[];function f(v){return function(b){b.merged||(Tf(b.barycenter)||Tf(v.barycenter)||b.barycenter>=v.barycenter)&&zHe(v,b)}}function g(v){return function(b){b.in.push(v),--b.indegree===0&&i.push(b)}}for(;i.length;){var w=i.pop();a.push(w),yr(w.in.reverse(),f(w)),yr(w.out,g(w))}return u1(Fx(a,function(v){return!v.merged}),function(v){return KF(v,["vs","i","barycenter","weight"])})}function zHe(i,a){var f=0,g=0;i.weight&&(f+=i.barycenter*i.weight,g+=i.weight),a.weight&&(f+=a.barycenter*a.weight,g+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=f/g,i.weight=g,i.i=Math.min(a.i,i.i),a.merged=!0}function qHe(i,a){var f=sHe(i,function(M){return lo(M,"barycenter")}),g=f.lhs,w=YF(f.rhs,function(M){return-M.i}),v=[],b=0,E=0,S=0;g.sort(HHe(!!a)),S=Yjt(v,w,S),yr(g,function(M){S+=M.vs.length,v.push(M.vs),b+=M.barycenter*M.weight,E+=M.weight,S=Yjt(v,w,S)});var _={vs:vD(v)};return E&&(_.barycenter=b/E,_.weight=E),_}function Yjt(i,a,f){for(var g;a.length&&(g=GY(a)).i<=f;)a.pop(),i.push(g.vs),f++;return f}function HHe(i){return function(a,f){return a.barycenter<f.barycenter?-1:a.barycenter>f.barycenter?1:i?f.i-a.i:a.i-f.i}}function Xjt(i,a,f,g){var w=i.children(a),v=i.node(a),b=v?v.borderLeft:void 0,E=v?v.borderRight:void 0,S={};b&&(w=Fx(w,function(z){return z!==b&&z!==E}));var _=RHe(i,w);yr(_,function(z){if(i.children(z.v).length){var Y=Xjt(i,z.v,f,g);S[z.v]=Y,lo(Y,"barycenter")&&UHe(z,Y)}});var M=jHe(_,f);VHe(M,S);var F=qHe(M,g);if(b&&(F.vs=vD([b,F.vs,E]),i.predecessors(b).length)){var R=i.node(i.predecessors(b)[0]),B=i.node(i.predecessors(E)[0]);lo(F,"barycenter")||(F.barycenter=0,F.weight=0),F.barycenter=(F.barycenter*F.weight+R.order+B.order)/(F.weight+2),F.weight+=2}return F}function VHe(i,a){yr(i,function(f){f.vs=vD(f.vs.map(function(g){return a[g]?a[g].vs:g}))})}function UHe(i,a){Tf(i.barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight)}function GHe(i){var a=Njt(i),f=Qjt(i,M9(1,a+1),"inEdges"),g=Qjt(i,M9(a-1,-1,-1),"outEdges"),w=BHe(i);Jjt(i,w);for(var v=Number.POSITIVE_INFINITY,b,E=0,S=0;S<4;++E,++S){KHe(E%2?f:g,E%4>=2),w=YY(i);var _=PHe(i,w);_<v&&(S=0,b=pze(w),v=_)}Jjt(i,b)}function Qjt(i,a,f){return u1(a,function(g){return OHe(i,g,f)})}function KHe(i,a){var f=new l1;yr(i,function(g){var w=g.graph().root,v=Xjt(g,w,f,a);yr(v.vs,function(b,E){g.node(b).order=E}),IHe(g,f,v.vs)})}function Jjt(i,a){yr(a,function(f){yr(f,function(g,w){i.node(g).order=w})})}function WHe(i){var a=XHe(i);yr(i.graph().dummyChains,function(f){for(var g=i.node(f),w=g.edgeObj,v=YHe(i,a,w.v,w.w),b=v.path,E=v.lca,S=0,_=b[S],M=!0;f!==w.w;){if(g=i.node(f),M){for(;(_=b[S])!==E&&i.node(_).maxRank<g.rank;)S++;_===E&&(M=!1)}if(!M){for(;S<b.length-1&&i.node(_=b[S+1]).minRank<=g.rank;)S++;_=b[S]}i.setParent(f,_),f=i.successors(f)[0]}})}function YHe(i,a,f,g){var w=[],v=[],b=Math.min(a[f].low,a[g].low),E=Math.max(a[f].lim,a[g].lim),S,_;S=f;do S=i.parent(S),w.push(S);while(S&&(a[S].low>b||E>a[S].lim));for(_=S,S=g;(S=i.parent(S))!==_;)v.push(S);return{path:w.concat(v.reverse()),lca:_}}function XHe(i){var a={},f=0;function g(w){var v=f;yr(i.children(w),g),a[w]={low:v,lim:f++}}return yr(i.children(),g),a}function QHe(i,a){var f={};function g(w,v){var b=0,E=0,S=w.length,_=GY(v);return yr(v,function(M,F){var R=ZHe(i,M),B=R?i.node(R).order:S;(R||M===_)&&(yr(v.slice(E,F+1),function(z){yr(i.predecessors(z),function(Y){var nt=i.node(Y),ot=nt.order;(ot<b||B<ot)&&!(nt.dummy&&i.node(z).dummy)&&Zjt(f,Y,z)})}),E=F+1,b=B)}),v}return WF(a,g),f}function JHe(i,a){var f={};function g(v,b,E,S,_){var M;yr(M9(b,E),function(F){M=v[F],i.node(M).dummy&&yr(i.predecessors(M),function(R){var B=i.node(R);B.dummy&&(B.order<S||B.order>_)&&Zjt(f,R,M)})})}function w(v,b){var E=-1,S,_=0;return yr(b,function(M,F){if(i.node(M).dummy==="border"){var R=i.predecessors(M);R.length&&(S=i.node(R[0]).order,g(b,_,F,E,S),_=F,E=S)}g(b,_,b.length,S,v.length)}),b}return WF(a,w),f}function ZHe(i,a){if(i.node(a).dummy)return bpt(i.predecessors(a),function(f){return i.node(f).dummy})}function Zjt(i,a,f){if(a>f){var g=a;a=f,f=g}var w=i[a];w||(i[a]=w={}),w[f]=!0}function tVe(i,a,f){if(a>f){var g=a;a=f,f=g}return lo(i[a],f)}function eVe(i,a,f,g){var w={},v={},b={};return yr(a,function(E){yr(E,function(S,_){w[S]=S,v[S]=S,b[S]=_})}),yr(a,function(E){var S=-1;yr(E,function(_){var M=g(_);if(M.length){M=YF(M,function(Y){return b[Y]});for(var F=(M.length-1)/2,R=Math.floor(F),B=Math.ceil(F);R<=B;++R){var z=M[R];v[_]===_&&S<b[z]&&!tVe(f,_,z)&&(v[z]=_,v[_]=w[_]=w[z],S=b[z])}}})}),{root:w,align:v}}function nVe(i,a,f,g,w){var v={},b=rVe(i,a,f,w),E=w?"borderLeft":"borderRight";function S(F,R){for(var B=b.nodes(),z=B.pop(),Y={};z;)Y[z]?F(z):(Y[z]=!0,B.push(z),B=B.concat(R(z))),z=B.pop()}function _(F){v[F]=b.inEdges(F).reduce(function(R,B){return Math.max(R,v[B.v]+b.edge(B))},0)}function M(F){var R=b.outEdges(F).reduce(function(z,Y){return Math.min(z,v[Y.w]-b.edge(Y))},Number.POSITIVE_INFINITY),B=i.node(F);R!==Number.POSITIVE_INFINITY&&B.borderType!==E&&(v[F]=Math.max(v[F],R))}return S(_,b.predecessors.bind(b)),S(M,b.successors.bind(b)),yr(g,function(F){v[F]=v[f[F]]}),v}function rVe(i,a,f,g){var w=new l1,v=i.graph(),b=cVe(v.nodesep,v.edgesep,g);return yr(a,function(E){var S;yr(E,function(_){var M=f[_];if(w.setNode(M),S){var F=f[S],R=w.edge(F,M);w.setEdge(F,M,Math.max(b(i,_,S),R||0))}S=_})}),w}function iVe(i,a){return mpt(Bx(a),function(f){var g=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY;return dqe(f,function(v,b){var E=uVe(i,b)/2;g=Math.max(v+E,g),w=Math.min(v-E,w)}),g-w})}function sVe(i,a){var f=Bx(a),g=GF(f),w=D9(f);yr(["u","d"],function(v){yr(["l","r"],function(b){var E=v+b,S=i[E],_;if(S!==a){var M=Bx(S);_=b==="l"?g-GF(M):w-D9(M),_&&(i[E]=KY(S,function(F){return F+_}))}})})}function aVe(i,a){return KY(i.ul,function(f,g){if(a)return i[a.toLowerCase()][g];var w=YF(u1(i,g));return(w[1]+w[2])/2})}function oVe(i){var a=YY(i),f=uY(QHe(i,a),JHe(i,a)),g={},w;yr(["u","d"],function(b){w=b==="u"?a:Bx(a).reverse(),yr(["l","r"],function(E){E==="r"&&(w=u1(w,function(F){return Bx(F).reverse()}));var S=(b==="u"?i.predecessors:i.successors).bind(i),_=eVe(i,w,f,S),M=nVe(i,w,_.root,_.align,E==="r");E==="r"&&(M=KY(M,function(F){return-F})),g[b+E]=M})});var v=iVe(i,g);return sVe(g,v),aVe(g,i.graph().align)}function cVe(i,a,f){return function(g,w,v){var b=g.node(w),E=g.node(v),S=0,_;if(S+=b.width/2,lo(b,"labelpos"))switch(b.labelpos.toLowerCase()){case"l":_=-b.width/2;break;case"r":_=b.width/2;break}if(_&&(S+=f?_:-_),_=0,S+=(b.dummy?a:i)/2,S+=(E.dummy?a:i)/2,S+=E.width/2,lo(E,"labelpos"))switch(E.labelpos.toLowerCase()){case"l":_=E.width/2;break;case"r":_=-E.width/2;break}return _&&(S+=f?_:-_),_=0,S}}function uVe(i,a){return i.node(a).width}function lVe(i){i=Mjt(i),hVe(i),gqe(oVe(i),function(a,f){i.node(f).x=a})}function hVe(i){var a=YY(i),f=i.graph().ranksep,g=0;yr(a,function(w){var v=D9(u1(w,function(b){return i.node(b).height}));yr(w,function(b){i.node(b).y=g+v/2}),g+=v+f})}function kD(i,a){var f=a&&a.debugTiming?aHe:oHe;f("layout",function(){var g=f(" buildLayoutGraph",function(){return kVe(i)});f(" runLayout",function(){fVe(g,f)}),f(" updateInputGraph",function(){dVe(i,g)})})}function fVe(i,a){a(" makeSpaceForEdgeLabels",function(){EVe(i)}),a(" removeSelfEdges",function(){IVe(i)}),a(" acyclic",function(){Zqe(i)}),a(" nestingGraph.run",function(){AHe(i)}),a(" rank",function(){CHe(Mjt(i))}),a(" injectEdgeLabelProxies",function(){TVe(i)}),a(" removeEmptyRanks",function(){iHe(i)}),a(" nestingGraph.cleanup",function(){MHe(i)}),a(" normalizeRanks",function(){rHe(i)}),a(" assignRankMinMax",function(){CVe(i)}),a(" removeEdgeLabelProxies",function(){SVe(i)}),a(" normalize.run",function(){dHe(i)}),a(" parentDummyChains",function(){WHe(i)}),a(" addBorderSegments",function(){cHe(i)}),a(" order",function(){GHe(i)}),a(" insertSelfEdges",function(){OVe(i)}),a(" adjustCoordinateSystem",function(){uHe(i)}),a(" position",function(){lVe(i)}),a(" positionSelfEdges",function(){NVe(i)}),a(" removeBorderNodes",function(){MVe(i)}),a(" normalize.undo",function(){pHe(i)}),a(" fixupEdgeLabelCoords",function(){LVe(i)}),a(" undoCoordinateSystem",function(){lHe(i)}),a(" translateGraph",function(){_Ve(i)}),a(" assignNodeIntersects",function(){AVe(i)}),a(" reversePoints",function(){DVe(i)}),a(" acyclic.undo",function(){eHe(i)})}function dVe(i,a){yr(i.nodes(),function(f){var g=i.node(f),w=a.node(f);g&&(g.x=w.x,g.y=w.y,a.children(f).length&&(g.width=w.width,g.height=w.height))}),yr(i.edges(),function(f){var g=i.edge(f),w=a.edge(f);g.points=w.points,lo(w,"x")&&(g.x=w.x,g.y=w.y)}),i.graph().width=a.graph().width,i.graph().height=a.graph().height}var gVe=["nodesep","edgesep","ranksep","marginx","marginy"],pVe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},bVe=["acyclicer","ranker","rankdir","align"],wVe=["width","height"],mVe={width:0,height:0},vVe=["minlen","weight","width","height","labeloffset"],yVe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},xVe=["labelpos"];function kVe(i){var a=new l1({multigraph:!0,compound:!0}),f=Apt(i.graph());return a.setGraph(uY({},pVe,_pt(f,gVe),KF(f,bVe))),yr(i.nodes(),function(g){var w=Apt(i.node(g));a.setNode(g,yD(_pt(w,wVe),mVe)),a.setParent(g,i.parent(g))}),yr(i.edges(),function(g){var w=Apt(i.edge(g));a.setEdge(g,uY({},yVe,_pt(w,vVe),KF(w,xVe)))}),a}function EVe(i){var a=i.graph();a.ranksep/=2,yr(i.edges(),function(f){var g=i.edge(f);g.minlen*=2,g.labelpos.toLowerCase()!=="c"&&(a.rankdir==="TB"||a.rankdir==="BT"?g.width+=g.labeloffset:g.height+=g.labeloffset)})}function TVe(i){yr(i.edges(),function(a){var f=i.edge(a);if(f.width&&f.height){var g=i.node(a.v),w=i.node(a.w),v={rank:(w.rank-g.rank)/2+g.rank,e:a};xD(i,"edge-proxy",v,"_ep")}})}function CVe(i){var a=0;yr(i.nodes(),function(f){var g=i.node(f);g.borderTop&&(g.minRank=i.node(g.borderTop).rank,g.maxRank=i.node(g.borderBottom).rank,a=D9(a,g.maxRank))}),i.graph().maxRank=a}function SVe(i){yr(i.nodes(),function(a){var f=i.node(a);f.dummy==="edge-proxy"&&(i.edge(f.e).labelRank=f.rank,i.removeNode(a))})}function _Ve(i){var a=Number.POSITIVE_INFINITY,f=0,g=Number.POSITIVE_INFINITY,w=0,v=i.graph(),b=v.marginx||0,E=v.marginy||0;function S(_){var M=_.x,F=_.y,R=_.width,B=_.height;a=Math.min(a,M-R/2),f=Math.max(f,M+R/2),g=Math.min(g,F-B/2),w=Math.max(w,F+B/2)}yr(i.nodes(),function(_){S(i.node(_))}),yr(i.edges(),function(_){var M=i.edge(_);lo(M,"x")&&S(M)}),a-=b,g-=E,yr(i.nodes(),function(_){var M=i.node(_);M.x-=a,M.y-=g}),yr(i.edges(),function(_){var M=i.edge(_);yr(M.points,function(F){F.x-=a,F.y-=g}),lo(M,"x")&&(M.x-=a),lo(M,"y")&&(M.y-=g)}),v.width=f-a+b,v.height=w-g+E}function AVe(i){yr(i.edges(),function(a){var f=i.edge(a),g=i.node(a.v),w=i.node(a.w),v,b;f.points?(v=f.points[0],b=f.points[f.points.length-1]):(f.points=[],v=w,b=g),f.points.unshift(Ijt(g,v)),f.points.push(Ijt(w,b))})}function LVe(i){yr(i.edges(),function(a){var f=i.edge(a);if(lo(f,"x"))switch((f.labelpos==="l"||f.labelpos==="r")&&(f.width-=f.labeloffset),f.labelpos){case"l":f.x-=f.width/2+f.labeloffset;break;case"r":f.x+=f.width/2+f.labeloffset;break}})}function DVe(i){yr(i.edges(),function(a){var f=i.edge(a);f.reversed&&f.points.reverse()})}function MVe(i){yr(i.nodes(),function(a){if(i.children(a).length){var f=i.node(a),g=i.node(f.borderTop),w=i.node(f.borderBottom),v=i.node(GY(f.borderLeft)),b=i.node(GY(f.borderRight));f.width=Math.abs(b.x-v.x),f.height=Math.abs(w.y-g.y),f.x=v.x+f.width/2,f.y=g.y+f.height/2}}),yr(i.nodes(),function(a){i.node(a).dummy==="border"&&i.removeNode(a)})}function IVe(i){yr(i.edges(),function(a){if(a.v===a.w){var f=i.node(a.v);f.selfEdges||(f.selfEdges=[]),f.selfEdges.push({e:a,label:i.edge(a)}),i.removeEdge(a)}})}function OVe(i){var a=YY(i);yr(a,function(f){var g=0;yr(f,function(w,v){var b=i.node(w);b.order=v+g,yr(b.selfEdges,function(E){xD(i,"selfedge",{width:E.label.width,height:E.label.height,rank:b.rank,order:v+ ++g,e:E.e,label:E.label},"_se")}),delete b.selfEdges})})}function NVe(i){yr(i.nodes(),function(a){var f=i.node(a);if(f.dummy==="selfedge"){var g=i.node(f.e.v),w=g.x+g.width/2,v=g.y,b=f.x-w,E=g.height/2;i.setEdge(f.e,f.label),i.removeNode(a),f.label.points=[{x:w+2*b/3,y:v-E},{x:w+5*b/6,y:v-E},{x:w+b,y:v},{x:w+5*b/6,y:v+E},{x:w+2*b/3,y:v+E}],f.label.x=f.x,f.label.y=f.y}})}function _pt(i,a){return KY(KF(i,a),Number)}function Apt(i){var a={};return yr(i,function(f,g){a[g.toLowerCase()]=f}),a}function t$t(i,a){return!!i.children(a).length}function e$t(i){return Lpt(i.v)+":"+Lpt(i.w)+":"+Lpt(i.name)}var PVe=/:/g;function Lpt(i){return i?String(i).replace(PVe,"\\:"):""}function a4(i,a){a&&i.attr("style",a)}function n$t(i,a,f){a&&i.attr("class",a).attr("class",f+" "+i.attr("class"))}function Jv(i,a){var f=a.graph();if(gFt(f)){var g=f.transition;if(ZL(g))return g(i)}return i}var Dpt={normal:BVe,vee:RVe,undirected:jVe};function FVe(i){Dpt=i}function BVe(i,a,f,g){var w=i.append("marker").attr("id",a).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),v=w.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");a4(v,f[g+"Style"]),f[g+"Class"]&&v.attr("class",f[g+"Class"])}function RVe(i,a,f,g){var w=i.append("marker").attr("id",a).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),v=w.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");a4(v,f[g+"Style"]),f[g+"Class"]&&v.attr("class",f[g+"Class"])}function jVe(i,a,f,g){var w=i.append("marker").attr("id",a).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),v=w.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a4(v,f[g+"Style"]),f[g+"Class"]&&v.attr("class",f[g+"Class"])}function Mpt(i,a){var f=i.append("foreignObject").attr("width","100000"),g=f.append("xhtml:div");g.attr("xmlns","http://www.w3.org/1999/xhtml");var w=a.label;switch(typeof w){case"function":g.insert(w);break;case"object":g.insert(function(){return w});break;default:g.html(w)}a4(g,a.labelStyle),g.style("display","inline-block"),g.style("white-space","nowrap");var v=g.node().getBoundingClientRect();return f.attr("width",v.width).attr("height",v.height),f}function $Ve(i,a){var f=i;return f.node().appendChild(a.label),a4(f,a.labelStyle),f}function zVe(i,a){for(var f=i.append("text"),g=qVe(a.label).split(`
108 `),b.style===void 0&&(M.style=M.style||"stroke: #333; stroke-width: 1.5px;fill:none"),M.labelStyle=M.labelStyle.replace("color:","fill:"))),M.id=E,M.class=S+" "+_,M.minlen=b.length||1,a.setEdge(f.db.lookUpDomId(b.start),f.db.lookUpDomId(b.end),M,g)})},wUe={setConf:bUe,addVertices:v$t,addEdges:y$t,getClasses:function(i,a){return Kt.info("Extracting classes"),a.db.getClasses()},draw:function(i,a,f,g){Kt.info("Drawing flowchart");const{securityLevel:w,flowchart:v}=Re();let b;w==="sandbox"&&(b=Tr("#i"+a));const E=Tr(w==="sandbox"?b.nodes()[0].contentDocument.body:"body"),S=w==="sandbox"?b.nodes()[0].contentDocument:document;let _=g.db.getDirection();_===void 0&&(_="TD");const M=v.nodeSpacing||50,F=v.rankSpacing||50,R=new l1({multigraph:!0,compound:!0}).setGraph({rankdir:_,nodesep:M,ranksep:F,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let B;const z=g.db.getSubGraphs();for(let rt=z.length-1;rt>=0;rt--)B=z[rt],g.db.addVertex(B.id,B.title,"group",void 0,B.classes);const Y=g.db.getVertices();Kt.warn("Get vertices",Y);const nt=g.db.getEdges();let ot=0;for(ot=z.length-1;ot>=0;ot--){B=z[ot],$Ot("cluster").append("text");for(let rt=0;rt<B.nodes.length;rt++)Kt.warn("Setting subgraph",B.nodes[rt],g.db.lookUpDomId(B.nodes[rt]),g.db.lookUpDomId(B.id)),R.setParent(g.db.lookUpDomId(B.nodes[rt]),g.db.lookUpDomId(B.id))}v$t(Y,R,a,E,S,g),y$t(nt,R,g);const ft=new cUe;pUe.addToRender(ft),ft.arrows().none=function(it,gt,Q,dt){const yt=it.append("marker").attr("id",gt).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");a4(yt,Q[dt+"Style"])},ft.arrows().normal=function(it,gt){it.append("marker").attr("id",gt).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const wt=E.select(`[id="${a}"]`),mt=E.select("#"+a+" g");for(ft(mt,R),mt.selectAll("g.node").attr("title",function(){return g.db.getTooltip(this.id)}),g.db.indexNodes("subGraph"+ot),ot=0;ot<z.length;ot++)if(B=z[ot],B.title!=="undefined"){const rt=S.querySelectorAll("#"+a+' [id="'+g.db.lookUpDomId(B.id)+'"] rect'),it=S.querySelectorAll("#"+a+' [id="'+g.db.lookUpDomId(B.id)+'"]'),gt=rt[0].x.baseVal.value,Q=rt[0].y.baseVal.value,dt=rt[0].width.baseVal.value,yt=Tr(it[0]).select(".label");yt.attr("transform",`translate(${gt+dt/2}, ${Q+14})`),yt.attr("id",a+"Text");for(let V=0;V<B.classes.length;V++)it[0].classList.add(B.classes[V])}if(!v.htmlLabels){const rt=S.querySelectorAll('[id="'+a+'"] .edgeLabel .label');for(const it of rt){const gt=it.getBBox(),Q=S.createElementNS("http://www.w3.org/2000/svg","rect");Q.setAttribute("rx",0),Q.setAttribute("ry",0),Q.setAttribute("width",gt.width),Q.setAttribute("height",gt.height),it.insertBefore(Q,it.firstChild)}}w8(R,wt,v.diagramPadding,v.useMaxWidth),Object.keys(Y).forEach(function(rt){const it=Y[rt];if(it.link){const gt=E.select("#"+a+' [id="'+g.db.lookUpDomId(rt)+'"]');if(gt){const Q=S.createElementNS("http://www.w3.org/2000/svg","a");Q.setAttributeNS("http://www.w3.org/2000/svg","class",it.classes.join(" ")),Q.setAttributeNS("http://www.w3.org/2000/svg","href",it.link),Q.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),w==="sandbox"?Q.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):it.linkTarget&&Q.setAttributeNS("http://www.w3.org/2000/svg","target",it.linkTarget);const dt=gt.insert(function(){return Q},":first-child"),K=gt.select(".label-container");K&&dt.append(function(){return K.node()});const yt=gt.select(".label");yt&&dt.append(function(){return yt.node()})}}})}};function jx(i){var a={options:{directed:i.isDirected(),multigraph:i.isMultigraph(),compound:i.isCompound()},nodes:mUe(i),edges:vUe(i)};return Tf(i.graph())||(a.value=fjt(i.graph())),a}function mUe(i){return u1(i.nodes(),function(a){var f=i.node(a),g=i.parent(a),w={v:a};return Tf(f)||(w.value=f),Tf(g)||(w.parent=g),w})}function vUe(i){return u1(i.edges(),function(a){var f=i.edge(a),g={v:a.v,w:a.w};return Tf(a.name)||(g.name=a.name),Tf(f)||(g.value=f),g})}const yUe=(i,a,f,g)=>{a.forEach(w=>{xUe[w](i,f,g)})},xUe={extension:(i,a,f)=>{Kt.trace("Making markers for ",f),i.append("defs").append("marker").attr("id",f+"_"+a+"-extensionStart").attr("class","marker extension "+a).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"),i.append("defs").append("marker").attr("id",f+"_"+a+"-extensionEnd").attr("class","marker extension "+a).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")},composition:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-compositionStart").attr("class","marker composition "+a).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"),i.append("defs").append("marker").attr("id",f+"_"+a+"-compositionEnd").attr("class","marker composition "+a).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:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-aggregationStart").attr("class","marker aggregation "+a).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"),i.append("defs").append("marker").attr("id",f+"_"+a+"-aggregationEnd").attr("class","marker aggregation "+a).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")},dependency:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-dependencyStart").attr("class","marker dependency "+a).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"),i.append("defs").append("marker").attr("id",f+"_"+a+"-dependencyEnd").attr("class","marker dependency "+a).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")},lollipop:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-lollipopStart").attr("class","marker lollipop "+a).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),i.append("defs").append("marker").attr("id",f+"_"+a+"-lollipopEnd").attr("class","marker lollipop "+a).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)},point:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-pointEnd").attr("class","marker "+a).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"),i.append("marker").attr("id",f+"_"+a+"-pointStart").attr("class","marker "+a).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")},circle:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-circleEnd").attr("class","marker "+a).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"),i.append("marker").attr("id",f+"_"+a+"-circleStart").attr("class","marker "+a).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")},cross:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-crossEnd").attr("class","marker cross "+a).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"),i.append("marker").attr("id",f+"_"+a+"-crossStart").attr("class","marker cross "+a).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")},barb:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-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")}},jpt=yUe;function kUe(i,a){a&&i.attr("style",a)}function EUe(i){const a=Tr(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),f=a.append("xhtml:div"),g=i.label,w=i.isNode?"nodeLabel":"edgeLabel";return f.html('<span class="'+w+'" '+(i.labelStyle?'style="'+i.labelStyle+'"':"")+">"+g+"</span>"),kUe(f,i.labelStyle),f.style("display","inline-block"),f.style("white-space","nowrap"),f.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}const ab=(i,a,f,g)=>{let w=i||"";if(typeof w=="object"&&(w=w[0]),j1(Re().flowchart.htmlLabels)){w=w.replace(/\\n|\n/g,"<br />"),Kt.debug("vertexText"+w);const v={isNode:g,label:IF(w).replace(/fa[blrs]?:fa-[\w-]+/g,E=>`<i class='${E.replace(":"," ")}'></i>`),labelStyle:a.replace("fill:","color:")};return EUe(v)}else{const v=document.createElementNS("http://www.w3.org/2000/svg","text");v.setAttribute("style",a.replace("color:","fill:"));let b=[];typeof w=="string"?b=w.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(w)?b=w:b=[];for(const E of b){const S=document.createElementNS("http://www.w3.org/2000/svg","tspan");S.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),S.setAttribute("dy","1em"),S.setAttribute("x","0"),f?S.setAttribute("class","title-row"):S.setAttribute("class","row"),S.textContent=E.trim(),v.appendChild(S)}return v}},TUe={};function CUe(i,a){const f=a||TUe,g=typeof f.includeImageAlt=="boolean"?f.includeImageAlt:!0,w=typeof f.includeHtml=="boolean"?f.includeHtml:!0;return x$t(i,g,w)}function x$t(i,a,f){if(SUe(i)){if("value"in i)return i.type==="html"&&!f?"":i.value;if(a&&"alt"in i&&i.alt)return i.alt;if("children"in i)return k$t(i.children,a,f)}return Array.isArray(i)?k$t(i,a,f):""}function k$t(i,a,f){const g=[];let w=-1;for(;++w<i.length;)g[w]=x$t(i[w],a,f);return g.join("")}function SUe(i){return!!(i&&typeof i=="object")}function c4(i,a,f,g){const w=i.length;let v=0,b;if(a<0?a=-a>w?0:w+a:a=a>w?w:a,f=f>0?f:0,g.length<1e4)b=Array.from(g),b.unshift(a,f),i.splice(...b);else for(f&&i.splice(a,f);v<g.length;)b=g.slice(v,v+1e4),b.unshift(a,0),i.splice(...b),v+=1e4,a+=1e4}function tm(i,a){return i.length>0?(c4(i,i.length,0,a),i):a}const E$t={}.hasOwnProperty;function _Ue(i){const a={};let f=-1;for(;++f<i.length;)AUe(a,i[f]);return a}function AUe(i,a){let f;for(f in a){const w=(E$t.call(i,f)?i[f]:void 0)||(i[f]={}),v=a[f];let b;if(v)for(b in v){E$t.call(w,b)||(w[b]=[]);const E=v[b];LUe(w[b],Array.isArray(E)?E:E?[E]:[])}}}function LUe(i,a){let f=-1;const g=[];for(;++f<a.length;)(a[f].add==="after"?i:g).push(a[f]);c4(i,0,0,g)}const DUe=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,u4=E8(/[A-Za-z]/),Zv=E8(/[\dA-Za-z]/),MUe=E8(/[#-'*+\--9=?A-Z^-~]/);function $pt(i){return i!==null&&(i<32||i===127)}const zpt=E8(/\d/),IUe=E8(/[\dA-Fa-f]/),OUe=E8(/[!-/:-@[-`{-~]/);function $a(i){return i!==null&&i<-2}function ob(i){return i!==null&&(i<0||i===32)}function du(i){return i===-2||i===-1||i===32}const NUe=E8(DUe),PUe=E8(/\s/);function E8(i){return a;function a(f){return f!==null&&i.test(String.fromCharCode(f))}}function Cl(i,a,f,g){const w=g?g-1:Number.POSITIVE_INFINITY;let v=0;return b;function b(S){return du(S)?(i.enter(f),E(S)):a(S)}function E(S){return du(S)&&v++<w?(i.consume(S),E):(i.exit(f),a(S))}}const FUe={tokenize:BUe};function BUe(i){const a=i.attempt(this.parser.constructs.contentInitial,g,w);let f;return a;function g(E){if(E===null){i.consume(E);return}return i.enter("lineEnding"),i.consume(E),i.exit("lineEnding"),Cl(i,a,"linePrefix")}function w(E){return i.enter("paragraph"),v(E)}function v(E){const S=i.enter("chunkText",{contentType:"text",previous:f});return f&&(f.next=S),f=S,b(E)}function b(E){if(E===null){i.exit("chunkText"),i.exit("paragraph"),i.consume(E);return}return $a(E)?(i.consume(E),i.exit("chunkText"),v):(i.consume(E),b)}}const RUe={tokenize:jUe},T$t={tokenize:$Ue};function jUe(i){const a=this,f=[];let g=0,w,v,b;return E;function E(wt){if(g<f.length){const mt=f[g];return a.containerState=mt[1],i.attempt(mt[0].continuation,S,_)(wt)}return _(wt)}function S(wt){if(g++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,w&&ft();const mt=a.events.length;let ct=mt,rt;for(;ct--;)if(a.events[ct][0]==="exit"&&a.events[ct][1].type==="chunkFlow"){rt=a.events[ct][1].end;break}ot(g);let it=mt;for(;it<a.events.length;)a.events[it][1].end=Object.assign({},rt),it++;return c4(a.events,ct+1,0,a.events.slice(mt)),a.events.length=it,_(wt)}return E(wt)}function _(wt){if(g===f.length){if(!w)return R(wt);if(w.currentConstruct&&w.currentConstruct.concrete)return z(wt);a.interrupt=!!(w.currentConstruct&&!w._gfmTableDynamicInterruptHack)}return a.containerState={},i.check(T$t,M,F)(wt)}function M(wt){return w&&ft(),ot(g),R(wt)}function F(wt){return a.parser.lazy[a.now().line]=g!==f.length,b=a.now().offset,z(wt)}function R(wt){return a.containerState={},i.attempt(T$t,B,z)(wt)}function B(wt){return g++,f.push([a.currentConstruct,a.containerState]),R(wt)}function z(wt){if(wt===null){w&&ft(),ot(0),i.consume(wt);return}return w=w||a.parser.flow(a.now()),i.enter("chunkFlow",{contentType:"flow",previous:v,_tokenizer:w}),Y(wt)}function Y(wt){if(wt===null){nt(i.exit("chunkFlow"),!0),ot(0),i.consume(wt);return}return $a(wt)?(i.consume(wt),nt(i.exit("chunkFlow")),g=0,a.interrupt=void 0,E):(i.consume(wt),Y)}function nt(wt,mt){const ct=a.sliceStream(wt);if(mt&&ct.push(null),wt.previous=v,v&&(v.next=wt),v=wt,w.defineSkip(wt.start),w.write(ct),a.parser.lazy[wt.start.line]){let rt=w.events.length;for(;rt--;)if(w.events[rt][1].start.offset<b&&(!w.events[rt][1].end||w.events[rt][1].end.offset>b))return;const it=a.events.length;let gt=it,Q,dt;for(;gt--;)if(a.events[gt][0]==="exit"&&a.events[gt][1].type==="chunkFlow"){if(Q){dt=a.events[gt][1].end;break}Q=!0}for(ot(g),rt=it;rt<a.events.length;)a.events[rt][1].end=Object.assign({},dt),rt++;c4(a.events,gt+1,0,a.events.slice(it)),a.events.length=rt}}function ot(wt){let mt=f.length;for(;mt-- >wt;){const ct=f[mt];a.containerState=ct[1],ct[0].exit.call(a,i)}f.length=wt}function ft(){w.write([null]),v=void 0,w=void 0,a.containerState._closeFlow=void 0}}function $Ue(i,a,f){return Cl(i,i.attempt(this.parser.constructs.document,a,f),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function C$t(i){if(i===null||ob(i)||PUe(i))return 1;if(NUe(i))return 2}function qpt(i,a,f){const g=[];let w=-1;for(;++w<i.length;){const v=i[w].resolveAll;v&&!g.includes(v)&&(a=v(a,f),g.push(v))}return a}const Hpt={name:"attention",tokenize:qUe,resolveAll:zUe};function zUe(i,a){let f=-1,g,w,v,b,E,S,_,M;for(;++f<i.length;)if(i[f][0]==="enter"&&i[f][1].type==="attentionSequence"&&i[f][1]._close){for(g=f;g--;)if(i[g][0]==="exit"&&i[g][1].type==="attentionSequence"&&i[g][1]._open&&a.sliceSerialize(i[g][1]).charCodeAt(0)===a.sliceSerialize(i[f][1]).charCodeAt(0)){if((i[g][1]._close||i[f][1]._open)&&(i[f][1].end.offset-i[f][1].start.offset)%3&&!((i[g][1].end.offset-i[g][1].start.offset+i[f][1].end.offset-i[f][1].start.offset)%3))continue;S=i[g][1].end.offset-i[g][1].start.offset>1&&i[f][1].end.offset-i[f][1].start.offset>1?2:1;const F=Object.assign({},i[g][1].end),R=Object.assign({},i[f][1].start);S$t(F,-S),S$t(R,S),b={type:S>1?"strongSequence":"emphasisSequence",start:F,end:Object.assign({},i[g][1].end)},E={type:S>1?"strongSequence":"emphasisSequence",start:Object.assign({},i[f][1].start),end:R},v={type:S>1?"strongText":"emphasisText",start:Object.assign({},i[g][1].end),end:Object.assign({},i[f][1].start)},w={type:S>1?"strong":"emphasis",start:Object.assign({},b.start),end:Object.assign({},E.end)},i[g][1].end=Object.assign({},b.start),i[f][1].start=Object.assign({},E.end),_=[],i[g][1].end.offset-i[g][1].start.offset&&(_=tm(_,[["enter",i[g][1],a],["exit",i[g][1],a]])),_=tm(_,[["enter",w,a],["enter",b,a],["exit",b,a],["enter",v,a]]),_=tm(_,qpt(a.parser.constructs.insideSpan.null,i.slice(g+1,f),a)),_=tm(_,[["exit",v,a],["enter",E,a],["exit",E,a],["exit",w,a]]),i[f][1].end.offset-i[f][1].start.offset?(M=2,_=tm(_,[["enter",i[f][1],a],["exit",i[f][1],a]])):M=0,c4(i,g-1,f-g+3,_),f=g+_.length-M-2;break}}for(f=-1;++f<i.length;)i[f][1].type==="attentionSequence"&&(i[f][1].type="data");return i}function qUe(i,a){const f=this.parser.constructs.attentionMarkers.null,g=this.previous,w=C$t(g);let v;return b;function b(S){return v=S,i.enter("attentionSequence"),E(S)}function E(S){if(S===v)return i.consume(S),E;const _=i.exit("attentionSequence"),M=C$t(S),F=!M||M===2&&w||f.includes(S),R=!w||w===2&&M||f.includes(g);return _._open=!!(v===42?F:F&&(w||!R)),_._close=!!(v===42?R:R&&(M||!F)),a(S)}}function S$t(i,a){i.column+=a,i.offset+=a,i._bufferIndex+=a}const HUe={name:"autolink",tokenize:VUe};function VUe(i,a,f){let g=0;return w;function w(B){return i.enter("autolink"),i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.enter("autolinkProtocol"),v}function v(B){return u4(B)?(i.consume(B),b):_(B)}function b(B){return B===43||B===45||B===46||Zv(B)?(g=1,E(B)):_(B)}function E(B){return B===58?(i.consume(B),g=0,S):(B===43||B===45||B===46||Zv(B))&&g++<32?(i.consume(B),E):(g=0,_(B))}function S(B){return B===62?(i.exit("autolinkProtocol"),i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.exit("autolink"),a):B===null||B===32||B===60||$pt(B)?f(B):(i.consume(B),S)}function _(B){return B===64?(i.consume(B),M):MUe(B)?(i.consume(B),_):f(B)}function M(B){return Zv(B)?F(B):f(B)}function F(B){return B===46?(i.consume(B),g=0,M):B===62?(i.exit("autolinkProtocol").type="autolinkEmail",i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.exit("autolink"),a):R(B)}function R(B){if((B===45||Zv(B))&&g++<63){const z=B===45?R:F;return i.consume(B),z}return f(B)}}const XY={tokenize:UUe,partial:!0};function UUe(i,a,f){return g;function g(v){return du(v)?Cl(i,w,"linePrefix")(v):w(v)}function w(v){return v===null||$a(v)?a(v):f(v)}}const _$t={name:"blockQuote",tokenize:GUe,continuation:{tokenize:KUe},exit:WUe};function GUe(i,a,f){const g=this;return w;function w(b){if(b===62){const E=g.containerState;return E.open||(i.enter("blockQuote",{_container:!0}),E.open=!0),i.enter("blockQuotePrefix"),i.enter("blockQuoteMarker"),i.consume(b),i.exit("blockQuoteMarker"),v}return f(b)}function v(b){return du(b)?(i.enter("blockQuotePrefixWhitespace"),i.consume(b),i.exit("blockQuotePrefixWhitespace"),i.exit("blockQuotePrefix"),a):(i.exit("blockQuotePrefix"),a(b))}}function KUe(i,a,f){const g=this;return w;function w(b){return du(b)?Cl(i,v,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):v(b)}function v(b){return i.attempt(_$t,a,f)(b)}}function WUe(i){i.exit("blockQuote")}const A$t={name:"characterEscape",tokenize:YUe};function YUe(i,a,f){return g;function g(v){return i.enter("characterEscape"),i.enter("escapeMarker"),i.consume(v),i.exit("escapeMarker"),w}function w(v){return OUe(v)?(i.enter("characterEscapeValue"),i.consume(v),i.exit("characterEscapeValue"),i.exit("characterEscape"),a):f(v)}}const L$t=document.createElement("i");function Vpt(i){const a="&"+i+";";L$t.innerHTML=a;const f=L$t.textContent;return f.charCodeAt(f.length-1)===59&&i!=="semi"||f===a?!1:f}const D$t={name:"characterReference",tokenize:XUe};function XUe(i,a,f){const g=this;let w=0,v,b;return E;function E(F){return i.enter("characterReference"),i.enter("characterReferenceMarker"),i.consume(F),i.exit("characterReferenceMarker"),S}function S(F){return F===35?(i.enter("characterReferenceMarkerNumeric"),i.consume(F),i.exit("characterReferenceMarkerNumeric"),_):(i.enter("characterReferenceValue"),v=31,b=Zv,M(F))}function _(F){return F===88||F===120?(i.enter("characterReferenceMarkerHexadecimal"),i.consume(F),i.exit("characterReferenceMarkerHexadecimal"),i.enter("characterReferenceValue"),v=6,b=IUe,M):(i.enter("characterReferenceValue"),v=7,b=zpt,M(F))}function M(F){if(F===59&&w){const R=i.exit("characterReferenceValue");return b===Zv&&!Vpt(g.sliceSerialize(R))?f(F):(i.enter("characterReferenceMarker"),i.consume(F),i.exit("characterReferenceMarker"),i.exit("characterReference"),a)}return b(F)&&w++<v?(i.consume(F),M):f(F)}}const M$t={tokenize:JUe,partial:!0},I$t={name:"codeFenced",tokenize:QUe,concrete:!0};function QUe(i,a,f){const g=this,w={tokenize:ct,partial:!0};let v=0,b=0,E;return S;function S(rt){return _(rt)}function _(rt){const it=g.events[g.events.length-1];return v=it&&it[1].type==="linePrefix"?it[2].sliceSerialize(it[1],!0).length:0,E=rt,i.enter("codeFenced"),i.enter("codeFencedFence"),i.enter("codeFencedFenceSequence"),M(rt)}function M(rt){return rt===E?(b++,i.consume(rt),M):b<3?f(rt):(i.exit("codeFencedFenceSequence"),du(rt)?Cl(i,F,"whitespace")(rt):F(rt))}function F(rt){return rt===null||$a(rt)?(i.exit("codeFencedFence"),g.interrupt?a(rt):i.check(M$t,Y,mt)(rt)):(i.enter("codeFencedFenceInfo"),i.enter("chunkString",{contentType:"string"}),R(rt))}function R(rt){return rt===null||$a(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),F(rt)):du(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),Cl(i,B,"whitespace")(rt)):rt===96&&rt===E?f(rt):(i.consume(rt),R)}function B(rt){return rt===null||$a(rt)?F(rt):(i.enter("codeFencedFenceMeta"),i.enter("chunkString",{contentType:"string"}),z(rt))}function z(rt){return rt===null||$a(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceMeta"),F(rt)):rt===96&&rt===E?f(rt):(i.consume(rt),z)}function Y(rt){return i.attempt(w,mt,nt)(rt)}function nt(rt){return i.enter("lineEnding"),i.consume(rt),i.exit("lineEnding"),ot}function ot(rt){return v>0&&du(rt)?Cl(i,ft,"linePrefix",v+1)(rt):ft(rt)}function ft(rt){return rt===null||$a(rt)?i.check(M$t,Y,mt)(rt):(i.enter("codeFlowValue"),wt(rt))}function wt(rt){return rt===null||$a(rt)?(i.exit("codeFlowValue"),ft(rt)):(i.consume(rt),wt)}function mt(rt){return i.exit("codeFenced"),a(rt)}function ct(rt,it,gt){let Q=0;return dt;function dt(It){return rt.enter("lineEnding"),rt.consume(It),rt.exit("lineEnding"),K}function K(It){return rt.enter("codeFencedFence"),du(It)?Cl(rt,yt,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(It):yt(It)}function yt(It){return It===E?(rt.enter("codeFencedFenceSequence"),V(It)):gt(It)}function V(It){return It===E?(Q++,rt.consume(It),V):Q>=b?(rt.exit("codeFencedFenceSequence"),du(It)?Cl(rt,Ot,"whitespace")(It):Ot(It)):gt(It)}function Ot(It){return It===null||$a(It)?(rt.exit("codeFencedFence"),it(It)):gt(It)}}}function JUe(i,a,f){const g=this;return w;function w(b){return b===null?f(b):(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),v)}function v(b){return g.parser.lazy[g.now().line]?f(b):a(b)}}const Upt={name:"codeIndented",tokenize:tGe},ZUe={tokenize:eGe,partial:!0};function tGe(i,a,f){const g=this;return w;function w(_){return i.enter("codeIndented"),Cl(i,v,"linePrefix",4+1)(_)}function v(_){const M=g.events[g.events.length-1];return M&&M[1].type==="linePrefix"&&M[2].sliceSerialize(M[1],!0).length>=4?b(_):f(_)}function b(_){return _===null?S(_):$a(_)?i.attempt(ZUe,b,S)(_):(i.enter("codeFlowValue"),E(_))}function E(_){return _===null||$a(_)?(i.exit("codeFlowValue"),b(_)):(i.consume(_),E)}function S(_){return i.exit("codeIndented"),a(_)}}function eGe(i,a,f){const g=this;return w;function w(b){return g.parser.lazy[g.now().line]?f(b):$a(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),w):Cl(i,v,"linePrefix",4+1)(b)}function v(b){const E=g.events[g.events.length-1];return E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?a(b):$a(b)?w(b):f(b)}}const nGe={name:"codeText",tokenize:sGe,resolve:rGe,previous:iGe};function rGe(i){let a=i.length-4,f=3,g,w;if((i[f][1].type==="lineEnding"||i[f][1].type==="space")&&(i[a][1].type==="lineEnding"||i[a][1].type==="space")){for(g=f;++g<a;)if(i[g][1].type==="codeTextData"){i[f][1].type="codeTextPadding",i[a][1].type="codeTextPadding",f+=2,a-=2;break}}for(g=f-1,a++;++g<=a;)w===void 0?g!==a&&i[g][1].type!=="lineEnding"&&(w=g):(g===a||i[g][1].type==="lineEnding")&&(i[w][1].type="codeTextData",g!==w+2&&(i[w][1].end=i[g-1][1].end,i.splice(w+2,g-w-2),a-=g-w-2,g=w+2),w=void 0);return i}function iGe(i){return i!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sGe(i,a,f){let g=0,w,v;return b;function b(F){return i.enter("codeText"),i.enter("codeTextSequence"),E(F)}function E(F){return F===96?(i.consume(F),g++,E):(i.exit("codeTextSequence"),S(F))}function S(F){return F===null?f(F):F===32?(i.enter("space"),i.consume(F),i.exit("space"),S):F===96?(v=i.enter("codeTextSequence"),w=0,M(F)):$a(F)?(i.enter("lineEnding"),i.consume(F),i.exit("lineEnding"),S):(i.enter("codeTextData"),_(F))}function _(F){return F===null||F===32||F===96||$a(F)?(i.exit("codeTextData"),S(F)):(i.consume(F),_)}function M(F){return F===96?(i.consume(F),w++,M):w===g?(i.exit("codeTextSequence"),i.exit("codeText"),a(F)):(v.type="codeTextData",_(F))}}function O$t(i){const a={};let f=-1,g,w,v,b,E,S,_;for(;++f<i.length;){for(;f in a;)f=a[f];if(g=i[f],f&&g[1].type==="chunkFlow"&&i[f-1][1].type==="listItemPrefix"&&(S=g[1]._tokenizer.events,v=0,v<S.length&&S[v][1].type==="lineEndingBlank"&&(v+=2),v<S.length&&S[v][1].type==="content"))for(;++v<S.length&&S[v][1].type!=="content";)S[v][1].type==="chunkText"&&(S[v][1]._isInFirstContentOfListItem=!0,v++);if(g[0]==="enter")g[1].contentType&&(Object.assign(a,aGe(i,f)),f=a[f],_=!0);else if(g[1]._container){for(v=f,w=void 0;v--&&(b=i[v],b[1].type==="lineEnding"||b[1].type==="lineEndingBlank");)b[0]==="enter"&&(w&&(i[w][1].type="lineEndingBlank"),b[1].type="lineEnding",w=v);w&&(g[1].end=Object.assign({},i[w][1].start),E=i.slice(w,f),E.unshift(g),c4(i,w,f-w+1,E))}}return!_}function aGe(i,a){const f=i[a][1],g=i[a][2];let w=a-1;const v=[],b=f._tokenizer||g.parser[f.contentType](f.start),E=b.events,S=[],_={};let M,F,R=-1,B=f,z=0,Y=0;const nt=[Y];for(;B;){for(;i[++w][1]!==B;);v.push(w),B._tokenizer||(M=g.sliceStream(B),B.next||M.push(null),F&&b.defineSkip(B.start),B._isInFirstContentOfListItem&&(b._gfmTasklistFirstContentOfListItem=!0),b.write(M),B._isInFirstContentOfListItem&&(b._gfmTasklistFirstContentOfListItem=void 0)),F=B,B=B.next}for(B=f;++R<E.length;)E[R][0]==="exit"&&E[R-1][0]==="enter"&&E[R][1].type===E[R-1][1].type&&E[R][1].start.line!==E[R][1].end.line&&(Y=R+1,nt.push(Y),B._tokenizer=void 0,B.previous=void 0,B=B.next);for(b.events=[],B?(B._tokenizer=void 0,B.previous=void 0):nt.pop(),R=nt.length;R--;){const ot=E.slice(nt[R],nt[R+1]),ft=v.pop();S.unshift([ft,ft+ot.length-1]),c4(i,ft,2,ot)}for(R=-1;++R<S.length;)_[z+S[R][0]]=z+S[R][1],z+=S[R][1]-S[R][0]-1;return _}const oGe={tokenize:lGe,resolve:uGe},cGe={tokenize:hGe,partial:!0};function uGe(i){return O$t(i),i}function lGe(i,a){let f;return g;function g(E){return i.enter("content"),f=i.enter("chunkContent",{contentType:"content"}),w(E)}function w(E){return E===null?v(E):$a(E)?i.check(cGe,b,v)(E):(i.consume(E),w)}function v(E){return i.exit("chunkContent"),i.exit("content"),a(E)}function b(E){return i.consume(E),i.exit("chunkContent"),f.next=i.enter("chunkContent",{contentType:"content",previous:f}),f=f.next,w}}function hGe(i,a,f){const g=this;return w;function w(b){return i.exit("chunkContent"),i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),Cl(i,v,"linePrefix")}function v(b){if(b===null||$a(b))return f(b);const E=g.events[g.events.length-1];return!g.parser.constructs.disable.null.includes("codeIndented")&&E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?a(b):i.interrupt(g.parser.constructs.flow,f,a)(b)}}function N$t(i,a,f,g,w,v,b,E,S){const _=S||Number.POSITIVE_INFINITY;let M=0;return F;function F(ot){return ot===60?(i.enter(g),i.enter(w),i.enter(v),i.consume(ot),i.exit(v),R):ot===null||ot===32||ot===41||$pt(ot)?f(ot):(i.enter(g),i.enter(b),i.enter(E),i.enter("chunkString",{contentType:"string"}),Y(ot))}function R(ot){return ot===62?(i.enter(v),i.consume(ot),i.exit(v),i.exit(w),i.exit(g),a):(i.enter(E),i.enter("chunkString",{contentType:"string"}),B(ot))}function B(ot){return ot===62?(i.exit("chunkString"),i.exit(E),R(ot)):ot===null||ot===60||$a(ot)?f(ot):(i.consume(ot),ot===92?z:B)}function z(ot){return ot===60||ot===62||ot===92?(i.consume(ot),B):B(ot)}function Y(ot){return!M&&(ot===null||ot===41||ob(ot))?(i.exit("chunkString"),i.exit(E),i.exit(b),i.exit(g),a(ot)):M<_&&ot===40?(i.consume(ot),M++,Y):ot===41?(i.consume(ot),M--,Y):ot===null||ot===32||ot===40||$pt(ot)?f(ot):(i.consume(ot),ot===92?nt:Y)}function nt(ot){return ot===40||ot===41||ot===92?(i.consume(ot),Y):Y(ot)}}function P$t(i,a,f,g,w,v){const b=this;let E=0,S;return _;function _(B){return i.enter(g),i.enter(w),i.consume(B),i.exit(w),i.enter(v),M}function M(B){return E>999||B===null||B===91||B===93&&!S||B===94&&!E&&"_hiddenFootnoteSupport"in b.parser.constructs?f(B):B===93?(i.exit(v),i.enter(w),i.consume(B),i.exit(w),i.exit(g),a):$a(B)?(i.enter("lineEnding"),i.consume(B),i.exit("lineEnding"),M):(i.enter("chunkString",{contentType:"string"}),F(B))}function F(B){return B===null||B===91||B===93||$a(B)||E++>999?(i.exit("chunkString"),M(B)):(i.consume(B),S||(S=!du(B)),B===92?R:F)}function R(B){return B===91||B===92||B===93?(i.consume(B),E++,F):F(B)}}function F$t(i,a,f,g,w,v){let b;return E;function E(R){return R===34||R===39||R===40?(i.enter(g),i.enter(w),i.consume(R),i.exit(w),b=R===40?41:R,S):f(R)}function S(R){return R===b?(i.enter(w),i.consume(R),i.exit(w),i.exit(g),a):(i.enter(v),_(R))}function _(R){return R===b?(i.exit(v),S(b)):R===null?f(R):$a(R)?(i.enter("lineEnding"),i.consume(R),i.exit("lineEnding"),Cl(i,_,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),M(R))}function M(R){return R===b||R===null||$a(R)?(i.exit("chunkString"),_(R)):(i.consume(R),R===92?F:M)}function F(R){return R===b||R===92?(i.consume(R),M):M(R)}}function ZF(i,a){let f;return g;function g(w){return $a(w)?(i.enter("lineEnding"),i.consume(w),i.exit("lineEnding"),f=!0,g):du(w)?Cl(i,g,f?"linePrefix":"lineSuffix")(w):a(w)}}function ED(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fGe={name:"definition",tokenize:gGe},dGe={tokenize:pGe,partial:!0};function gGe(i,a,f){const g=this;let w;return v;function v(B){return i.enter("definition"),b(B)}function b(B){return P$t.call(g,i,E,f,"definitionLabel","definitionLabelMarker","definitionLabelString")(B)}function E(B){return w=ED(g.sliceSerialize(g.events[g.events.length-1][1]).slice(1,-1)),B===58?(i.enter("definitionMarker"),i.consume(B),i.exit("definitionMarker"),S):f(B)}function S(B){return ob(B)?ZF(i,_)(B):_(B)}function _(B){return N$t(i,M,f,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(B)}function M(B){return i.attempt(dGe,F,F)(B)}function F(B){return du(B)?Cl(i,R,"whitespace")(B):R(B)}function R(B){return B===null||$a(B)?(i.exit("definition"),g.parser.defined.push(w),a(B)):f(B)}}function pGe(i,a,f){return g;function g(E){return ob(E)?ZF(i,w)(E):f(E)}function w(E){return F$t(i,v,f,"definitionTitle","definitionTitleMarker","definitionTitleString")(E)}function v(E){return du(E)?Cl(i,b,"whitespace")(E):b(E)}function b(E){return E===null||$a(E)?a(E):f(E)}}const bGe={name:"hardBreakEscape",tokenize:wGe};function wGe(i,a,f){return g;function g(v){return i.enter("hardBreakEscape"),i.consume(v),w}function w(v){return $a(v)?(i.exit("hardBreakEscape"),a(v)):f(v)}}const mGe={name:"headingAtx",tokenize:yGe,resolve:vGe};function vGe(i,a){let f=i.length-2,g=3,w,v;return i[g][1].type==="whitespace"&&(g+=2),f-2>g&&i[f][1].type==="whitespace"&&(f-=2),i[f][1].type==="atxHeadingSequence"&&(g===f-1||f-4>g&&i[f-2][1].type==="whitespace")&&(f-=g+1===f?2:4),f>g&&(w={type:"atxHeadingText",start:i[g][1].start,end:i[f][1].end},v={type:"chunkText",start:i[g][1].start,end:i[f][1].end,contentType:"text"},c4(i,g,f-g+1,[["enter",w,a],["enter",v,a],["exit",v,a],["exit",w,a]])),i}function yGe(i,a,f){let g=0;return w;function w(M){return i.enter("atxHeading"),v(M)}function v(M){return i.enter("atxHeadingSequence"),b(M)}function b(M){return M===35&&g++<6?(i.consume(M),b):M===null||ob(M)?(i.exit("atxHeadingSequence"),E(M)):f(M)}function E(M){return M===35?(i.enter("atxHeadingSequence"),S(M)):M===null||$a(M)?(i.exit("atxHeading"),a(M)):du(M)?Cl(i,E,"whitespace")(M):(i.enter("atxHeadingText"),_(M))}function S(M){return M===35?(i.consume(M),S):(i.exit("atxHeadingSequence"),E(M))}function _(M){return M===null||M===35||ob(M)?(i.exit("atxHeadingText"),E(M)):(i.consume(M),_)}}const xGe=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],B$t=["pre","script","style","textarea"],kGe={name:"htmlFlow",tokenize:SGe,resolveTo:CGe,concrete:!0},EGe={tokenize:AGe,partial:!0},TGe={tokenize:_Ge,partial:!0};function CGe(i){let a=i.length;for(;a--&&!(i[a][0]==="enter"&&i[a][1].type==="htmlFlow"););return a>1&&i[a-2][1].type==="linePrefix"&&(i[a][1].start=i[a-2][1].start,i[a+1][1].start=i[a-2][1].start,i.splice(a-2,2)),i}function SGe(i,a,f){const g=this;let w,v,b,E,S;return _;function _(Mt){return M(Mt)}function M(Mt){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(Mt),F}function F(Mt){return Mt===33?(i.consume(Mt),R):Mt===47?(i.consume(Mt),v=!0,Y):Mt===63?(i.consume(Mt),w=3,g.interrupt?a:kt):u4(Mt)?(i.consume(Mt),b=String.fromCharCode(Mt),nt):f(Mt)}function R(Mt){return Mt===45?(i.consume(Mt),w=2,B):Mt===91?(i.consume(Mt),w=5,E=0,z):u4(Mt)?(i.consume(Mt),w=4,g.interrupt?a:kt):f(Mt)}function B(Mt){return Mt===45?(i.consume(Mt),g.interrupt?a:kt):f(Mt)}function z(Mt){const pn="CDATA[";return Mt===pn.charCodeAt(E++)?(i.consume(Mt),E===pn.length?g.interrupt?a:yt:z):f(Mt)}function Y(Mt){return u4(Mt)?(i.consume(Mt),b=String.fromCharCode(Mt),nt):f(Mt)}function nt(Mt){if(Mt===null||Mt===47||Mt===62||ob(Mt)){const pn=Mt===47,Ae=b.toLowerCase();return!pn&&!v&&B$t.includes(Ae)?(w=1,g.interrupt?a(Mt):yt(Mt)):xGe.includes(b.toLowerCase())?(w=6,pn?(i.consume(Mt),ot):g.interrupt?a(Mt):yt(Mt)):(w=7,g.interrupt&&!g.parser.lazy[g.now().line]?f(Mt):v?ft(Mt):wt(Mt))}return Mt===45||Zv(Mt)?(i.consume(Mt),b+=String.fromCharCode(Mt),nt):f(Mt)}function ot(Mt){return Mt===62?(i.consume(Mt),g.interrupt?a:yt):f(Mt)}function ft(Mt){return du(Mt)?(i.consume(Mt),ft):dt(Mt)}function wt(Mt){return Mt===47?(i.consume(Mt),dt):Mt===58||Mt===95||u4(Mt)?(i.consume(Mt),mt):du(Mt)?(i.consume(Mt),wt):dt(Mt)}function mt(Mt){return Mt===45||Mt===46||Mt===58||Mt===95||Zv(Mt)?(i.consume(Mt),mt):ct(Mt)}function ct(Mt){return Mt===61?(i.consume(Mt),rt):du(Mt)?(i.consume(Mt),ct):wt(Mt)}function rt(Mt){return Mt===null||Mt===60||Mt===61||Mt===62||Mt===96?f(Mt):Mt===34||Mt===39?(i.consume(Mt),S=Mt,it):du(Mt)?(i.consume(Mt),rt):gt(Mt)}function it(Mt){return Mt===S?(i.consume(Mt),S=null,Q):Mt===null||$a(Mt)?f(Mt):(i.consume(Mt),it)}function gt(Mt){return Mt===null||Mt===34||Mt===39||Mt===47||Mt===60||Mt===61||Mt===62||Mt===96||ob(Mt)?ct(Mt):(i.consume(Mt),gt)}function Q(Mt){return Mt===47||Mt===62||du(Mt)?wt(Mt):f(Mt)}function dt(Mt){return Mt===62?(i.consume(Mt),K):f(Mt)}function K(Mt){return Mt===null||$a(Mt)?yt(Mt):du(Mt)?(i.consume(Mt),K):f(Mt)}function yt(Mt){return Mt===45&&w===2?(i.consume(Mt),jt):Mt===60&&w===1?(i.consume(Mt),xt):Mt===62&&w===4?(i.consume(Mt),Gt):Mt===63&&w===3?(i.consume(Mt),kt):Mt===93&&w===5?(i.consume(Mt),Ct):$a(Mt)&&(w===6||w===7)?(i.exit("htmlFlowData"),i.check(EGe,Fe,V)(Mt)):Mt===null||$a(Mt)?(i.exit("htmlFlowData"),V(Mt)):(i.consume(Mt),yt)}function V(Mt){return i.check(TGe,Ot,Fe)(Mt)}function Ot(Mt){return i.enter("lineEnding"),i.consume(Mt),i.exit("lineEnding"),It}function It(Mt){return Mt===null||$a(Mt)?V(Mt):(i.enter("htmlFlowData"),yt(Mt))}function jt(Mt){return Mt===45?(i.consume(Mt),kt):yt(Mt)}function xt(Mt){return Mt===47?(i.consume(Mt),b="",Ft):yt(Mt)}function Ft(Mt){if(Mt===62){const pn=b.toLowerCase();return B$t.includes(pn)?(i.consume(Mt),Gt):yt(Mt)}return u4(Mt)&&b.length<8?(i.consume(Mt),b+=String.fromCharCode(Mt),Ft):yt(Mt)}function Ct(Mt){return Mt===93?(i.consume(Mt),kt):yt(Mt)}function kt(Mt){return Mt===62?(i.consume(Mt),Gt):Mt===45&&w===2?(i.consume(Mt),kt):yt(Mt)}function Gt(Mt){return Mt===null||$a(Mt)?(i.exit("htmlFlowData"),Fe(Mt)):(i.consume(Mt),Gt)}function Fe(Mt){return i.exit("htmlFlow"),a(Mt)}}function _Ge(i,a,f){const g=this;return w;function w(b){return $a(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),v):f(b)}function v(b){return g.parser.lazy[g.now().line]?f(b):a(b)}}function AGe(i,a,f){return g;function g(w){return i.enter("lineEnding"),i.consume(w),i.exit("lineEnding"),i.attempt(XY,a,f)}}const LGe={name:"htmlText",tokenize:DGe};function DGe(i,a,f){const g=this;let w,v,b;return E;function E(kt){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(kt),S}function S(kt){return kt===33?(i.consume(kt),_):kt===47?(i.consume(kt),ct):kt===63?(i.consume(kt),wt):u4(kt)?(i.consume(kt),gt):f(kt)}function _(kt){return kt===45?(i.consume(kt),M):kt===91?(i.consume(kt),v=0,z):u4(kt)?(i.consume(kt),ft):f(kt)}function M(kt){return kt===45?(i.consume(kt),B):f(kt)}function F(kt){return kt===null?f(kt):kt===45?(i.consume(kt),R):$a(kt)?(b=F,xt(kt)):(i.consume(kt),F)}function R(kt){return kt===45?(i.consume(kt),B):F(kt)}function B(kt){return kt===62?jt(kt):kt===45?R(kt):F(kt)}function z(kt){const Gt="CDATA[";return kt===Gt.charCodeAt(v++)?(i.consume(kt),v===Gt.length?Y:z):f(kt)}function Y(kt){return kt===null?f(kt):kt===93?(i.consume(kt),nt):$a(kt)?(b=Y,xt(kt)):(i.consume(kt),Y)}function nt(kt){return kt===93?(i.consume(kt),ot):Y(kt)}function ot(kt){return kt===62?jt(kt):kt===93?(i.consume(kt),ot):Y(kt)}function ft(kt){return kt===null||kt===62?jt(kt):$a(kt)?(b=ft,xt(kt)):(i.consume(kt),ft)}function wt(kt){return kt===null?f(kt):kt===63?(i.consume(kt),mt):$a(kt)?(b=wt,xt(kt)):(i.consume(kt),wt)}function mt(kt){return kt===62?jt(kt):wt(kt)}function ct(kt){return u4(kt)?(i.consume(kt),rt):f(kt)}function rt(kt){return kt===45||Zv(kt)?(i.consume(kt),rt):it(kt)}function it(kt){return $a(kt)?(b=it,xt(kt)):du(kt)?(i.consume(kt),it):jt(kt)}function gt(kt){return kt===45||Zv(kt)?(i.consume(kt),gt):kt===47||kt===62||ob(kt)?Q(kt):f(kt)}function Q(kt){return kt===47?(i.consume(kt),jt):kt===58||kt===95||u4(kt)?(i.consume(kt),dt):$a(kt)?(b=Q,xt(kt)):du(kt)?(i.consume(kt),Q):jt(kt)}function dt(kt){return kt===45||kt===46||kt===58||kt===95||Zv(kt)?(i.consume(kt),dt):K(kt)}function K(kt){return kt===61?(i.consume(kt),yt):$a(kt)?(b=K,xt(kt)):du(kt)?(i.consume(kt),K):Q(kt)}function yt(kt){return kt===null||kt===60||kt===61||kt===62||kt===96?f(kt):kt===34||kt===39?(i.consume(kt),w=kt,V):$a(kt)?(b=yt,xt(kt)):du(kt)?(i.consume(kt),yt):(i.consume(kt),Ot)}function V(kt){return kt===w?(i.consume(kt),w=void 0,It):kt===null?f(kt):$a(kt)?(b=V,xt(kt)):(i.consume(kt),V)}function Ot(kt){return kt===null||kt===34||kt===39||kt===60||kt===61||kt===96?f(kt):kt===47||kt===62||ob(kt)?Q(kt):(i.consume(kt),Ot)}function It(kt){return kt===47||kt===62||ob(kt)?Q(kt):f(kt)}function jt(kt){return kt===62?(i.consume(kt),i.exit("htmlTextData"),i.exit("htmlText"),a):f(kt)}function xt(kt){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(kt),i.exit("lineEnding"),Ft}function Ft(kt){return du(kt)?Cl(i,Ct,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(kt):Ct(kt)}function Ct(kt){return i.enter("htmlTextData"),b(kt)}}const Gpt={name:"labelEnd",tokenize:FGe,resolveTo:PGe,resolveAll:NGe},MGe={tokenize:BGe},IGe={tokenize:RGe},OGe={tokenize:jGe};function NGe(i){let a=-1;for(;++a<i.length;){const f=i[a][1];(f.type==="labelImage"||f.type==="labelLink"||f.type==="labelEnd")&&(i.splice(a+1,f.type==="labelImage"?4:2),f.type="data",a++)}return i}function PGe(i,a){let f=i.length,g=0,w,v,b,E;for(;f--;)if(w=i[f][1],v){if(w.type==="link"||w.type==="labelLink"&&w._inactive)break;i[f][0]==="enter"&&w.type==="labelLink"&&(w._inactive=!0)}else if(b){if(i[f][0]==="enter"&&(w.type==="labelImage"||w.type==="labelLink")&&!w._balanced&&(v=f,w.type!=="labelLink")){g=2;break}}else w.type==="labelEnd"&&(b=f);const S={type:i[v][1].type==="labelLink"?"link":"image",start:Object.assign({},i[v][1].start),end:Object.assign({},i[i.length-1][1].end)},_={type:"label",start:Object.assign({},i[v][1].start),end:Object.assign({},i[b][1].end)},M={type:"labelText",start:Object.assign({},i[v+g+2][1].end),end:Object.assign({},i[b-2][1].start)};return E=[["enter",S,a],["enter",_,a]],E=tm(E,i.slice(v+1,v+g+3)),E=tm(E,[["enter",M,a]]),E=tm(E,qpt(a.parser.constructs.insideSpan.null,i.slice(v+g+4,b-3),a)),E=tm(E,[["exit",M,a],i[b-2],i[b-1],["exit",_,a]]),E=tm(E,i.slice(b+1)),E=tm(E,[["exit",S,a]]),c4(i,v,i.length,E),i}function FGe(i,a,f){const g=this;let w=g.events.length,v,b;for(;w--;)if((g.events[w][1].type==="labelImage"||g.events[w][1].type==="labelLink")&&!g.events[w][1]._balanced){v=g.events[w][1];break}return E;function E(R){return v?v._inactive?F(R):(b=g.parser.defined.includes(ED(g.sliceSerialize({start:v.end,end:g.now()}))),i.enter("labelEnd"),i.enter("labelMarker"),i.consume(R),i.exit("labelMarker"),i.exit("labelEnd"),S):f(R)}function S(R){return R===40?i.attempt(MGe,M,b?M:F)(R):R===91?i.attempt(IGe,M,b?_:F)(R):b?M(R):F(R)}function _(R){return i.attempt(OGe,M,F)(R)}function M(R){return a(R)}function F(R){return v._balanced=!0,f(R)}}function BGe(i,a,f){return g;function g(F){return i.enter("resource"),i.enter("resourceMarker"),i.consume(F),i.exit("resourceMarker"),w}function w(F){return ob(F)?ZF(i,v)(F):v(F)}function v(F){return F===41?M(F):N$t(i,b,E,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(F)}function b(F){return ob(F)?ZF(i,S)(F):M(F)}function E(F){return f(F)}function S(F){return F===34||F===39||F===40?F$t(i,_,f,"resourceTitle","resourceTitleMarker","resourceTitleString")(F):M(F)}function _(F){return ob(F)?ZF(i,M)(F):M(F)}function M(F){return F===41?(i.enter("resourceMarker"),i.consume(F),i.exit("resourceMarker"),i.exit("resource"),a):f(F)}}function RGe(i,a,f){const g=this;return w;function w(E){return P$t.call(g,i,v,b,"reference","referenceMarker","referenceString")(E)}function v(E){return g.parser.defined.includes(ED(g.sliceSerialize(g.events[g.events.length-1][1]).slice(1,-1)))?a(E):f(E)}function b(E){return f(E)}}function jGe(i,a,f){return g;function g(v){return i.enter("reference"),i.enter("referenceMarker"),i.consume(v),i.exit("referenceMarker"),w}function w(v){return v===93?(i.enter("referenceMarker"),i.consume(v),i.exit("referenceMarker"),i.exit("reference"),a):f(v)}}const $Ge={name:"labelStartImage",tokenize:zGe,resolveAll:Gpt.resolveAll};function zGe(i,a,f){const g=this;return w;function w(E){return i.enter("labelImage"),i.enter("labelImageMarker"),i.consume(E),i.exit("labelImageMarker"),v}function v(E){return E===91?(i.enter("labelMarker"),i.consume(E),i.exit("labelMarker"),i.exit("labelImage"),b):f(E)}function b(E){return E===94&&"_hiddenFootnoteSupport"in g.parser.constructs?f(E):a(E)}}const qGe={name:"labelStartLink",tokenize:HGe,resolveAll:Gpt.resolveAll};function HGe(i,a,f){const g=this;return w;function w(b){return i.enter("labelLink"),i.enter("labelMarker"),i.consume(b),i.exit("labelMarker"),i.exit("labelLink"),v}function v(b){return b===94&&"_hiddenFootnoteSupport"in g.parser.constructs?f(b):a(b)}}const Kpt={name:"lineEnding",tokenize:VGe};function VGe(i,a){return f;function f(g){return i.enter("lineEnding"),i.consume(g),i.exit("lineEnding"),Cl(i,a,"linePrefix")}}const QY={name:"thematicBreak",tokenize:UGe};function UGe(i,a,f){let g=0,w;return v;function v(_){return i.enter("thematicBreak"),b(_)}function b(_){return w=_,E(_)}function E(_){return _===w?(i.enter("thematicBreakSequence"),S(_)):g>=3&&(_===null||$a(_))?(i.exit("thematicBreak"),a(_)):f(_)}function S(_){return _===w?(i.consume(_),g++,S):(i.exit("thematicBreakSequence"),du(_)?Cl(i,E,"whitespace")(_):E(_))}}const cb={name:"list",tokenize:WGe,continuation:{tokenize:YGe},exit:QGe},GGe={tokenize:JGe,partial:!0},KGe={tokenize:XGe,partial:!0};function WGe(i,a,f){const g=this,w=g.events[g.events.length-1];let v=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,b=0;return E;function E(B){const z=g.containerState.type||(B===42||B===43||B===45?"listUnordered":"listOrdered");if(z==="listUnordered"?!g.containerState.marker||B===g.containerState.marker:zpt(B)){if(g.containerState.type||(g.containerState.type=z,i.enter(z,{_container:!0})),z==="listUnordered")return i.enter("listItemPrefix"),B===42||B===45?i.check(QY,f,_)(B):_(B);if(!g.interrupt||B===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),S(B)}return f(B)}function S(B){return zpt(B)&&++b<10?(i.consume(B),S):(!g.interrupt||b<2)&&(g.containerState.marker?B===g.containerState.marker:B===41||B===46)?(i.exit("listItemValue"),_(B)):f(B)}function _(B){return i.enter("listItemMarker"),i.consume(B),i.exit("listItemMarker"),g.containerState.marker=g.containerState.marker||B,i.check(XY,g.interrupt?f:M,i.attempt(GGe,R,F))}function M(B){return g.containerState.initialBlankLine=!0,v++,R(B)}function F(B){return du(B)?(i.enter("listItemPrefixWhitespace"),i.consume(B),i.exit("listItemPrefixWhitespace"),R):f(B)}function R(B){return g.containerState.size=v+g.sliceSerialize(i.exit("listItemPrefix"),!0).length,a(B)}}function YGe(i,a,f){const g=this;return g.containerState._closeFlow=void 0,i.check(XY,w,v);function w(E){return g.containerState.furtherBlankLines=g.containerState.furtherBlankLines||g.containerState.initialBlankLine,Cl(i,a,"listItemIndent",g.containerState.size+1)(E)}function v(E){return g.containerState.furtherBlankLines||!du(E)?(g.containerState.furtherBlankLines=void 0,g.containerState.initialBlankLine=void 0,b(E)):(g.containerState.furtherBlankLines=void 0,g.containerState.initialBlankLine=void 0,i.attempt(KGe,a,b)(E))}function b(E){return g.containerState._closeFlow=!0,g.interrupt=void 0,Cl(i,i.attempt(cb,a,f),"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E)}}function XGe(i,a,f){const g=this;return Cl(i,w,"listItemIndent",g.containerState.size+1);function w(v){const b=g.events[g.events.length-1];return b&&b[1].type==="listItemIndent"&&b[2].sliceSerialize(b[1],!0).length===g.containerState.size?a(v):f(v)}}function QGe(i){i.exit(this.containerState.type)}function JGe(i,a,f){const g=this;return Cl(i,w,"listItemPrefixWhitespace",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function w(v){const b=g.events[g.events.length-1];return!du(v)&&b&&b[1].type==="listItemPrefixWhitespace"?a(v):f(v)}}const R$t={name:"setextUnderline",tokenize:tKe,resolveTo:ZGe};function ZGe(i,a){let f=i.length,g,w,v;for(;f--;)if(i[f][0]==="enter"){if(i[f][1].type==="content"){g=f;break}i[f][1].type==="paragraph"&&(w=f)}else i[f][1].type==="content"&&i.splice(f,1),!v&&i[f][1].type==="definition"&&(v=f);const b={type:"setextHeading",start:Object.assign({},i[w][1].start),end:Object.assign({},i[i.length-1][1].end)};return i[w][1].type="setextHeadingText",v?(i.splice(w,0,["enter",b,a]),i.splice(v+1,0,["exit",i[g][1],a]),i[g][1].end=Object.assign({},i[v][1].end)):i[g][1]=b,i.push(["exit",b,a]),i}function tKe(i,a,f){const g=this;let w;return v;function v(_){let M=g.events.length,F;for(;M--;)if(g.events[M][1].type!=="lineEnding"&&g.events[M][1].type!=="linePrefix"&&g.events[M][1].type!=="content"){F=g.events[M][1].type==="paragraph";break}return!g.parser.lazy[g.now().line]&&(g.interrupt||F)?(i.enter("setextHeadingLine"),w=_,b(_)):f(_)}function b(_){return i.enter("setextHeadingLineSequence"),E(_)}function E(_){return _===w?(i.consume(_),E):(i.exit("setextHeadingLineSequence"),du(_)?Cl(i,S,"lineSuffix")(_):S(_))}function S(_){return _===null||$a(_)?(i.exit("setextHeadingLine"),a(_)):f(_)}}const eKe={tokenize:nKe};function nKe(i){const a=this,f=i.attempt(XY,g,i.attempt(this.parser.constructs.flowInitial,w,Cl(i,i.attempt(this.parser.constructs.flow,w,i.attempt(oGe,w)),"linePrefix")));return f;function g(v){if(v===null){i.consume(v);return}return i.enter("lineEndingBlank"),i.consume(v),i.exit("lineEndingBlank"),a.currentConstruct=void 0,f}function w(v){if(v===null){i.consume(v);return}return i.enter("lineEnding"),i.consume(v),i.exit("lineEnding"),a.currentConstruct=void 0,f}}const rKe={resolveAll:$$t()},iKe=j$t("string"),sKe=j$t("text");function j$t(i){return{tokenize:a,resolveAll:$$t(i==="text"?aKe:void 0)};function a(f){const g=this,w=this.parser.constructs[i],v=f.attempt(w,b,E);return b;function b(M){return _(M)?v(M):E(M)}function E(M){if(M===null){f.consume(M);return}return f.enter("data"),f.consume(M),S}function S(M){return _(M)?(f.exit("data"),v(M)):(f.consume(M),S)}function _(M){if(M===null)return!0;const F=w[M];let R=-1;if(F)for(;++R<F.length;){const B=F[R];if(!B.previous||B.previous.call(g,g.previous))return!0}return!1}}}function $$t(i){return a;function a(f,g){let w=-1,v;for(;++w<=f.length;)v===void 0?f[w]&&f[w][1].type==="data"&&(v=w,w++):(!f[w]||f[w][1].type!=="data")&&(w!==v+2&&(f[v][1].end=f[w-1][1].end,f.splice(v+2,w-v-2),w=v+2),v=void 0);return i?i(f,g):f}}function aKe(i,a){let f=0;for(;++f<=i.length;)if((f===i.length||i[f][1].type==="lineEnding")&&i[f-1][1].type==="data"){const g=i[f-1][1],w=a.sliceStream(g);let v=w.length,b=-1,E=0,S;for(;v--;){const _=w[v];if(typeof _=="string"){for(b=_.length;_.charCodeAt(b-1)===32;)E++,b--;if(b)break;b=-1}else if(_===-2)S=!0,E++;else if(_!==-1){v++;break}}if(E){const _={type:f===i.length||S||E<2?"lineSuffix":"hardBreakTrailing",start:{line:g.end.line,column:g.end.column-E,offset:g.end.offset-E,_index:g.start._index+v,_bufferIndex:v?b:g.start._bufferIndex+b},end:Object.assign({},g.end)};g.end=Object.assign({},_.start),g.start.offset===g.end.offset?Object.assign(g,_):(i.splice(f,0,["enter",_,a],["exit",_,a]),f+=2)}f++}return i}function oKe(i,a,f){let g=Object.assign(f?Object.assign({},f):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const w={},v=[];let b=[],E=[];const S={consume:ft,enter:wt,exit:mt,attempt:it(ct),check:it(rt),interrupt:it(rt,{interrupt:!0})},_={previous:null,code:null,containerState:{},events:[],parser:i,sliceStream:B,sliceSerialize:R,now:z,defineSkip:Y,write:F};let M=a.tokenize.call(_,S);return a.resolveAll&&v.push(a),_;function F(K){return b=tm(b,K),nt(),b[b.length-1]!==null?[]:(gt(a,0),_.events=qpt(v,_.events,_),_.events)}function R(K,yt){return uKe(B(K),yt)}function B(K){return cKe(b,K)}function z(){const{line:K,column:yt,offset:V,_index:Ot,_bufferIndex:It}=g;return{line:K,column:yt,offset:V,_index:Ot,_bufferIndex:It}}function Y(K){w[K.line]=K.column,dt()}function nt(){let K;for(;g._index<b.length;){const yt=b[g._index];if(typeof yt=="string")for(K=g._index,g._bufferIndex<0&&(g._bufferIndex=0);g._index===K&&g._bufferIndex<yt.length;)ot(yt.charCodeAt(g._bufferIndex));else ot(yt)}}function ot(K){M=M(K)}function ft(K){$a(K)?(g.line++,g.column=1,g.offset+=K===-3?2:1,dt()):K!==-1&&(g.column++,g.offset++),g._bufferIndex<0?g._index++:(g._bufferIndex++,g._bufferIndex===b[g._index].length&&(g._bufferIndex=-1,g._index++)),_.previous=K}function wt(K,yt){const V=yt||{};return V.type=K,V.start=z(),_.events.push(["enter",V,_]),E.push(V),V}function mt(K){const yt=E.pop();return yt.end=z(),_.events.push(["exit",yt,_]),yt}function ct(K,yt){gt(K,yt.from)}function rt(K,yt){yt.restore()}function it(K,yt){return V;function V(Ot,It,jt){let xt,Ft,Ct,kt;return Array.isArray(Ot)?Fe(Ot):"tokenize"in Ot?Fe([Ot]):Gt(Ot);function Gt(ye){return tn;function tn(sn){const be=sn!==null&&ye[sn],Ne=sn!==null&&ye.null,Xt=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return Fe(Xt)(sn)}}function Fe(ye){return xt=ye,Ft=0,ye.length===0?jt:Mt(ye[Ft])}function Mt(ye){return tn;function tn(sn){return kt=Q(),Ct=ye,ye.partial||(_.currentConstruct=ye),ye.name&&_.parser.constructs.disable.null.includes(ye.name)?Ae():ye.tokenize.call(yt?Object.assign(Object.create(_),yt):_,S,pn,Ae)(sn)}}function pn(ye){return K(Ct,kt),It}function Ae(ye){return kt.restore(),++Ft<xt.length?Mt(xt[Ft]):jt}}}function gt(K,yt){K.resolveAll&&!v.includes(K)&&v.push(K),K.resolve&&c4(_.events,yt,_.events.length-yt,K.resolve(_.events.slice(yt),_)),K.resolveTo&&(_.events=K.resolveTo(_.events,_))}function Q(){const K=z(),yt=_.previous,V=_.currentConstruct,Ot=_.events.length,It=Array.from(E);return{restore:jt,from:Ot};function jt(){g=K,_.previous=yt,_.currentConstruct=V,_.events.length=Ot,E=It,dt()}}function dt(){g.line in w&&g.column<2&&(g.column=w[g.line],g.offset+=w[g.line]-1)}}function cKe(i,a){const f=a.start._index,g=a.start._bufferIndex,w=a.end._index,v=a.end._bufferIndex;let b;if(f===w)b=[i[f].slice(g,v)];else{if(b=i.slice(f,w),g>-1){const E=b[0];typeof E=="string"?b[0]=E.slice(g):b.shift()}v>0&&b.push(i[w].slice(0,v))}return b}function uKe(i,a){let f=-1;const g=[];let w;for(;++f<i.length;){const v=i[f];let b;if(typeof v=="string")b=v;else switch(v){case-5:{b="\r";break}case-4:{b=`
118 `),E.style===void 0&&(R.style=R.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),R.labelStyle=R.labelStyle.replace("color:","fill:"),R.id=_,R.classes="flowchart-link "+M+" "+F,a.setEdge(E.start,E.end,R,g)})},nbt={setConf:pWe,addVertices:bzt,addEdges:wzt,getClasses:function(i,a){return a.db.getClasses()},draw:async function(i,a,f,g){Kt.info("Drawing flowchart");let w=g.db.getDirection();w===void 0&&(w="TD");const{securityLevel:v,flowchart:b}=Re(),E=b.nodeSpacing||50,S=b.rankSpacing||50;let _;v==="sandbox"&&(_=Tr("#i"+a));const M=Tr(v==="sandbox"?_.nodes()[0].contentDocument.body:"body"),F=v==="sandbox"?_.nodes()[0].contentDocument:document,R=new l1({multigraph:!0,compound:!0}).setGraph({rankdir:w,nodesep:E,ranksep:S,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let B;const z=g.db.getSubGraphs();Kt.info("Subgraphs - ",z);for(let ct=z.length-1;ct>=0;ct--)B=z[ct],Kt.info("Subgraph - ",B),g.db.addVertex(B.id,{text:B.title,type:B.labelType},"group",void 0,B.classes,B.dir);const Y=g.db.getVertices(),nt=g.db.getEdges();Kt.info("Edges",nt);let ot=0;for(ot=z.length-1;ot>=0;ot--){B=z[ot],$Ot("cluster").append("text");for(let ct=0;ct<B.nodes.length;ct++)Kt.info("Setting up subgraphs",B.nodes[ct],B.id),R.setParent(B.nodes[ct],B.id)}bzt(Y,R,a,M,F,g),wzt(nt,R);const ft=M.select(`[id="${a}"]`),wt=M.select("#"+a+" g");if(await ebt(wt,R,["point","circle","cross"],"flowchart",a),uo.insertTitle(ft,"flowchartTitleText",b.titleTopMargin,g.db.getDiagramTitle()),w8(R,ft,b.diagramPadding,b.useMaxWidth),g.db.indexNodes("subGraph"+ot),!b.htmlLabels){const ct=F.querySelectorAll('[id="'+a+'"] .edgeLabel .label');for(const rt of ct){const it=rt.getBBox(),gt=F.createElementNS("http://www.w3.org/2000/svg","rect");gt.setAttribute("rx",0),gt.setAttribute("ry",0),gt.setAttribute("width",it.width),gt.setAttribute("height",it.height),rt.insertBefore(gt,rt.firstChild)}}Object.keys(Y).forEach(function(ct){const rt=Y[ct];if(rt.link){const it=Tr("#"+a+' [id="'+ct+'"]');if(it){const gt=F.createElementNS("http://www.w3.org/2000/svg","a");gt.setAttributeNS("http://www.w3.org/2000/svg","class",rt.classes.join(" ")),gt.setAttributeNS("http://www.w3.org/2000/svg","href",rt.link),gt.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),v==="sandbox"?gt.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):rt.linkTarget&&gt.setAttributeNS("http://www.w3.org/2000/svg","target",rt.linkTarget);const Q=it.insert(function(){return gt},":first-child"),dt=it.select(".label-container");dt&&Q.append(function(){return dt.node()});const K=it.select(".label");K&&Q.append(function(){return K.node()})}}})}},bWe=(i,a)=>{const f=jPt,g=f(i,"r"),w=f(i,"g"),v=f(i,"b");return g9(g,w,v,a)},mzt=i=>`.label {
281 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var it=this.next();return it||this.lex()},begin:function(it){this.conditionStack.push(it)},popState:function(){var it=this.conditionStack.length-1;return it>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(it){return it=this.conditionStack.length-1-Math.abs(it||0),it>=0?this.conditionStack[it]:"INITIAL"},pushState:function(it){this.begin(it)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(it,gt,Q,dt){switch(Q){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:break;case 9:break;case 10:return 5;case 11:return 40;case 12:return 32;case 13:return 38;case 14:return 42;case 15:return 43;case 16:return 44;case 17:return 45;case 18:return 35;case 19:return 28;case 20:return 29;case 21:return 37;case 22:return 31;case 23:return 34;case 24:return 26;case 25:return 9;case 26:return 9;case 27:return 8;case 28:return"CARET";case 29:this.begin("options");break;case 30:this.popState();break;case 31:return 12;case 32:return 36;case 33:this.begin("string");break;case 34:this.popState();break;case 35:return 33;case 36:return 30;case 37:return 46;case 38:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:parent:)/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[30,31],inclusive:!1},string:{rules:[34,35],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32,33,36,37,38,39],inclusive:!0}}};return ct}();ft.lexer=wt;function mt(){this.yy={}}return mt.prototype=ft,ft.Parser=mt,new mt}();abt.parser=abt;const UWe=abt;let cX=Re().gitGraph.mainBranchName,GWe=Re().gitGraph.mainBranchOrder,q1={},np=null,rB={};rB[cX]={name:cX,order:GWe};let h1={};h1[cX]=np;let Dd=cX,Ezt="LR",N9=0;function obt(){return AFt({length:7})}function KWe(i,a){const f=Object.create(null);return i.reduce((g,w)=>{const v=a(w);return f[v]||(f[v]=!0,g.push(w)),g},[])}const WWe=function(i){Ezt=i};let Tzt={};const YWe=function(i){Kt.debug("options str",i),i=i&&i.trim(),i=i||"{}";try{Tzt=JSON.parse(i)}catch(a){Kt.error("error while parsing gitGraph options",a.message)}},XWe=function(){return Tzt},QWe=function(i,a,f,g){Kt.debug("Entering commit:",i,a,f,g),a=ei.sanitizeText(a,Re()),i=ei.sanitizeText(i,Re()),g=ei.sanitizeText(g,Re());const w={id:a||N9+"-"+obt(),message:i,seq:N9++,type:f||CD.NORMAL,tag:g||"",parents:np==null?[]:[np.id],branch:Dd};np=w,q1[w.id]=w,h1[Dd]=w.id,Kt.debug("in pushCommit "+w.id)},JWe=function(i,a){if(i=ei.sanitizeText(i,Re()),h1[i]===void 0)h1[i]=np!=null?np.id:null,rB[i]={name:i,order:a?parseInt(a,10):null},Czt(i),Kt.debug("in createBranch");else{let f=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 '+i+'")');throw f.hash={text:"branch "+i,token:"branch "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+i+'"']},f}},ZWe=function(i,a,f,g){i=ei.sanitizeText(i,Re()),a=ei.sanitizeText(a,Re());const w=q1[h1[Dd]],v=q1[h1[i]];if(Dd===i){let E=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},E}else if(w===void 0||!w){let E=new Error('Incorrect usage of "merge". Current branch ('+Dd+")has no commits");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},E}else if(h1[i]===void 0){let E=new Error('Incorrect usage of "merge". Branch to be merged ('+i+") does not exist");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+i]},E}else if(v===void 0||!v){let E=new Error('Incorrect usage of "merge". Branch to be merged ('+i+") has no commits");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},E}else if(w===v){let E=new Error('Incorrect usage of "merge". Both branches have same head');throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},E}else if(a&&q1[a]!==void 0){let E=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw E.hash={text:"merge "+i+a+f+g,token:"merge "+i+a+f+g,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+i+" "+a+"_UNIQUE "+f+" "+g]},E}const b={id:a||N9+"-"+obt(),message:"merged branch "+i+" into "+Dd,seq:N9++,parents:[np==null?null:np.id,h1[i]],branch:Dd,type:CD.MERGE,customType:f,customId:!!a,tag:g||""};np=b,q1[b.id]=b,h1[Dd]=b.id,Kt.debug(h1),Kt.debug("in mergeBranch")},tYe=function(i,a,f,g){if(Kt.debug("Entering cherryPick:",i,a,f),i=ei.sanitizeText(i,Re()),a=ei.sanitizeText(a,Re()),f=ei.sanitizeText(f,Re()),g=ei.sanitizeText(g,Re()),!i||q1[i]===void 0){let b=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw b.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},b}let w=q1[i],v=w.branch;if(g&&!(Array.isArray(w.parents)&&w.parents.includes(g)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");if(w.type===CD.MERGE&&!g)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||q1[a]===void 0){if(v===Dd){let S=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw S.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},S}const b=q1[h1[Dd]];if(b===void 0||!b){let S=new Error('Incorrect usage of "cherry-pick". Current branch ('+Dd+")has no commits");throw S.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},S}const E={id:N9+"-"+obt(),message:"cherry-picked "+w+" into "+Dd,seq:N9++,parents:[np==null?null:np.id,w.id],branch:Dd,type:CD.CHERRY_PICK,tag:f??`cherry-pick:${w.id}${w.type===CD.MERGE?`|parent:${g}`:""}`};np=E,q1[E.id]=E,h1[Dd]=E.id,Kt.debug(h1),Kt.debug("in cherryPick")}},Czt=function(i){if(i=ei.sanitizeText(i,Re()),h1[i]===void 0){let a=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+i+'")');throw a.hash={text:"checkout "+i,token:"checkout "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+i+'"']},a}else{Dd=i;const a=h1[Dd];np=q1[a]}};function Szt(i,a,f){const g=i.indexOf(a);g===-1?i.push(f):i.splice(g,1,f)}function _zt(i){const a=i.reduce((w,v)=>w.seq>v.seq?w:v,i[0]);let f="";i.forEach(function(w){w===a?f+=" *":f+=" |"});const g=[f,a.id,a.seq];for(let w in h1)h1[w]===a.id&&g.push(w);if(Kt.debug(g.join(" ")),a.parents&&a.parents.length==2){const w=q1[a.parents[0]];Szt(i,a,w),i.push(q1[a.parents[1]])}else{if(a.parents.length==0)return;{const w=q1[a.parents];Szt(i,a,w)}}i=KWe(i,w=>w.id),_zt(i)}const eYe=function(){Kt.debug(q1);const i=Azt()[0];_zt([i])},nYe=function(){q1={},np=null;let i=Re().gitGraph.mainBranchName,a=Re().gitGraph.mainBranchOrder;h1={},h1[i]=null,rB={},rB[i]={name:i,order:a},Dd=i,N9=0,ag()},rYe=function(){return Object.values(rB).map((a,f)=>a.order!==null?a:{...a,order:parseFloat(`0.${f}`,10)}).sort((a,f)=>a.order-f.order).map(({name:a})=>({name:a}))},iYe=function(){return h1},sYe=function(){return q1},Azt=function(){const i=Object.keys(q1).map(function(a){return q1[a]});return i.forEach(function(a){Kt.debug(a.id)}),i.sort((a,f)=>a.seq-f.seq),i},aYe=function(){return Dd},oYe=function(){return Ezt},cYe=function(){return np},CD={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},uYe={getConfig:()=>Re().gitGraph,setDirection:WWe,setOptions:YWe,getOptions:XWe,commit:QWe,branch:JWe,merge:ZWe,cherryPick:tYe,checkout:Czt,prettyPrint:eYe,clear:nYe,getBranchesAsObjArray:rYe,getBranches:iYe,getCommits:sYe,getCommitsArray:Azt,getCurrentBranch:aYe,getDirection:oYe,getHead:cYe,setAccTitle:og,getAccTitle:Xg,getAccDescription:Jg,setAccDescription:Qg,setDiagramTitle:S2,getDiagramTitle:Zg,commitType:CD};let iB={};const D2={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},P9=8;let Cf={},$x={},uX=[],sB=0,f1="LR";const lYe=()=>{Cf={},$x={},iB={},sB=0,uX=[],f1="LR"},Lzt=i=>{const a=document.createElementNS("http://www.w3.org/2000/svg","text");let f=[];typeof i=="string"?f=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?f=i:f=[];for(const g of f){const w=document.createElementNS("http://www.w3.org/2000/svg","tspan");w.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),w.setAttribute("dy","1em"),w.setAttribute("x","0"),w.setAttribute("class","row"),w.textContent=g.trim(),a.appendChild(w)}return a},hYe=i=>{let a="",f=0;return i.forEach(g=>{const w=f1==="TB"?$x[g].y:$x[g].x;w>=f&&(a=g,f=w)}),a||void 0},Dzt=(i,a,f)=>{const g=Re().gitGraph,w=i.append("g").attr("class","commit-bullets"),v=i.append("g").attr("class","commit-labels");let b=0;f1==="TB"&&(b=30);const S=Object.keys(a).sort((R,B)=>a[R].seq-a[B].seq),_=g.parallelCommits,M=10,F=40;S.forEach(R=>{const B=a[R];if(_)if(B.parents.length){const ot=hYe(B.parents);b=f1==="TB"?$x[ot].y+F:$x[ot].x+F}else b=0,f1==="TB"&&(b=30);const z=b+M,Y=f1==="TB"?z:Cf[B.branch].pos,nt=f1==="TB"?Cf[B.branch].pos:z;if(f){let ot,ft=B.customType!==void 0&&B.customType!==""?B.customType:B.type;switch(ft){case D2.NORMAL:ot="commit-normal";break;case D2.REVERSE:ot="commit-reverse";break;case D2.HIGHLIGHT:ot="commit-highlight";break;case D2.MERGE:ot="commit-merge";break;case D2.CHERRY_PICK:ot="commit-cherry-pick";break;default:ot="commit-normal"}if(ft===D2.HIGHLIGHT){const wt=w.append("rect");wt.attr("x",nt-10),wt.attr("y",Y-10),wt.attr("height",20),wt.attr("width",20),wt.attr("class",`commit ${B.id} commit-highlight${Cf[B.branch].index%P9} ${ot}-outer`),w.append("rect").attr("x",nt-6).attr("y",Y-6).attr("height",12).attr("width",12).attr("class",`commit ${B.id} commit${Cf[B.branch].index%P9} ${ot}-inner`)}else if(ft===D2.CHERRY_PICK)w.append("circle").attr("cx",nt).attr("cy",Y).attr("r",10).attr("class",`commit ${B.id} ${ot}`),w.append("circle").attr("cx",nt-3).attr("cy",Y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${B.id} ${ot}`),w.append("circle").attr("cx",nt+3).attr("cy",Y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${B.id} ${ot}`),w.append("line").attr("x1",nt+3).attr("y1",Y+1).attr("x2",nt).attr("y2",Y-5).attr("stroke","#fff").attr("class",`commit ${B.id} ${ot}`),w.append("line").attr("x1",nt-3).attr("y1",Y+1).attr("x2",nt).attr("y2",Y-5).attr("stroke","#fff").attr("class",`commit ${B.id} ${ot}`);else{const wt=w.append("circle");if(wt.attr("cx",nt),wt.attr("cy",Y),wt.attr("r",B.type===D2.MERGE?9:10),wt.attr("class",`commit ${B.id} commit${Cf[B.branch].index%P9}`),ft===D2.MERGE){const mt=w.append("circle");mt.attr("cx",nt),mt.attr("cy",Y),mt.attr("r",6),mt.attr("class",`commit ${ot} ${B.id} commit${Cf[B.branch].index%P9}`)}ft===D2.REVERSE&&w.append("path").attr("d",`M ${nt-5},${Y-5}L${nt+5},${Y+5}M${nt-5},${Y+5}L${nt+5},${Y-5}`).attr("class",`commit ${ot} ${B.id} commit${Cf[B.branch].index%P9}`)}}if(f1==="TB"?$x[B.id]={x:nt,y:z}:$x[B.id]={x:z,y:Y},f){if(B.type!==D2.CHERRY_PICK&&(B.customId&&B.type===D2.MERGE||B.type!==D2.MERGE)&&g.showCommitLabel){const wt=v.append("g"),mt=wt.insert("rect").attr("class","commit-label-bkg"),ct=wt.append("text").attr("x",b).attr("y",Y+25).attr("class","commit-label").text(B.id);let rt=ct.node().getBBox();if(mt.attr("x",z-rt.width/2-2).attr("y",Y+13.5).attr("width",rt.width+2*2).attr("height",rt.height+2*2),f1==="TB"&&(mt.attr("x",nt-(rt.width+4*4+5)).attr("y",Y-12),ct.attr("x",nt-(rt.width+4*4)).attr("y",Y+rt.height-12)),f1!=="TB"&&ct.attr("x",z-rt.width/2),g.rotateCommitLabel)if(f1==="TB")ct.attr("transform","rotate(-45, "+nt+", "+Y+")"),mt.attr("transform","rotate(-45, "+nt+", "+Y+")");else{let it=-7.5-(rt.width+10)/25*9.5,gt=10+rt.width/25*8.5;wt.attr("transform","translate("+it+", "+gt+") rotate(-45, "+b+", "+Y+")")}}if(B.tag){const wt=v.insert("polygon"),mt=v.append("circle"),ct=v.append("text").attr("y",Y-16).attr("class","tag-label").text(B.tag);let rt=ct.node().getBBox();ct.attr("x",z-rt.width/2);const it=rt.height/2,gt=Y-19.2;wt.attr("class","tag-label-bkg").attr("points",`
294 `,"id:",a,f),iB=g.db.getCommits();const b=g.db.getBranchesAsObjArray();f1=g.db.getDirection();const E=Tr(`[id="${a}"]`);let S=0;b.forEach((_,M)=>{const F=Lzt(_.name),R=E.append("g"),B=R.insert("g").attr("class","branchLabel"),z=B.insert("g").attr("class","label branch-label");z.node().appendChild(F);let Y=F.getBBox();Cf[_.name]={pos:S,index:M},S+=50+(v.rotateCommitLabel?40:0)+(f1==="TB"?Y.width/2:0),z.remove(),B.remove(),R.remove()}),Dzt(E,iB,!1),v.showBranches&&pYe(E,b),gYe(E,iB),Dzt(E,iB,!0),uo.insertTitle(E,"gitTitleText",v.titleTopMargin,g.db.getDiagramTitle()),hBt(void 0,E,v.diagramPadding,v.useMaxWidth??w.useMaxWidth)}},styles:i=>`
830 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var An=this.next();return An||this.lex()},begin:function(An){this.conditionStack.push(An)},popState:function(){var An=this.conditionStack.length-1;return An>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(An){return An=this.conditionStack.length-1-Math.abs(An||0),An>=0?this.conditionStack[An]:"INITIAL"},pushState:function(An){this.begin(An)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(An,Nn,Bn,ke){switch(Bn){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:break;case 5:break;case 6:return this.begin("acc_title"),31;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),33;case 9:return this.popState(),"acc_descr_value";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 70;case 22:this.popState();break;case 23:return 71;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;case 29:return this.popState(),8;case 30:break;case 31:return this.begin("namespace-body"),37;case 32:return this.popState(),39;case 33:return"EOF_IN_STRUCT";case 34:return 8;case 35:break;case 36:return"EDGE_STATE";case 37:return this.begin("class"),44;case 38:return this.popState(),8;case 39:break;case 40:return this.popState(),this.popState(),39;case 41:return this.begin("class-body"),37;case 42:return this.popState(),39;case 43:return"EOF_IN_STRUCT";case 44:return"EDGE_STATE";case 45:return"OPEN_IN_STRUCT";case 46:break;case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 57:this.popState();break;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 60:this.popState();break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:return 68;case 64:return 68;case 65:return 68;case 66:return 68;case 67:return 60;case 68:return 60;case 69:return 62;case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:return 84;case 84:return 84;case 85:return 85;case 86:return"EQUALS";case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:return 83;case 95:return 83;case 96:return 9}},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)/,/^(?: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,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};return za}();mi.lexer=ga;function Ss(){this.yy={}}return Ss.prototype=mi,mi.Parser=Ss,new Ss}();$bt.parser=$bt;const Aqt=$bt,Lqt=["#","+","~","-",""];class Dqt{constructor(a,f){this.memberType=f,this.visibility="",this.classifier="";const g=Ef(a,Re());this.parseMember(g)}getDisplayDetails(){let a=this.visibility+kF(this.id);this.memberType==="method"&&(a+=`(${kF(this.parameters.trim())})`,this.returnType&&(a+=" : "+kF(this.returnType))),a=a.trim();const f=this.parseClassifier();return{displayText:a,cssStyle:f}}parseMember(a){let f="";if(this.memberType==="method"){const g=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/,w=a.match(g);if(w){const v=w[1]?w[1].trim():"";if(Lqt.includes(v)&&(this.visibility=v),this.id=w[2].trim(),this.parameters=w[3]?w[3].trim():"",f=w[4]?w[4].trim():"",this.returnType=w[5]?w[5].trim():"",f===""){const b=this.returnType.substring(this.returnType.length-1);b.match(/[$*]/)&&(f=b,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const g=a.length,w=a.substring(0,1),v=a.substring(g-1);Lqt.includes(w)&&(this.visibility=w),v.match(/[$*]/)&&(f=v),this.id=a.substring(this.visibility===""?0:1,f===""?g:g-1)}this.classifier=f}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}const wX="classId-";let zbt=[],Jl={},mX=[],Mqt=0,A8={},qbt=0,mB=[];const j9=i=>ei.sanitizeText(i,Re()),$9=function(i){const a=ei.sanitizeText(i,Re());let f="",g=a;if(a.indexOf("~")>0){const w=a.split("~");g=j9(w[0]),f=j9(w[1])}return{className:g,type:f}},dJe=function(i,a){const f=ei.sanitizeText(i,Re());a&&(a=j9(a));const{className:g}=$9(f);Jl[g].label=a},vX=function(i){const a=ei.sanitizeText(i,Re()),{className:f,type:g}=$9(a);if(Object.hasOwn(Jl,f))return;const w=ei.sanitizeText(f,Re());Jl[w]={id:w,type:g,label:w,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:wX+w+"-"+Mqt},Mqt++},Iqt=function(i){const a=ei.sanitizeText(i,Re());if(a in Jl)return Jl[a].domId;throw new Error("Class not found: "+a)},gJe=function(){zbt=[],Jl={},mX=[],mB=[],mB.push(Nqt),A8={},qbt=0,ag()},pJe=function(i){return Jl[i]},bJe=function(){return Jl},wJe=function(){return zbt},mJe=function(){return mX},vJe=function(i){Kt.debug("Adding relation: "+JSON.stringify(i)),vX(i.id1),vX(i.id2),i.id1=$9(i.id1).className,i.id2=$9(i.id2).className,i.relationTitle1=ei.sanitizeText(i.relationTitle1.trim(),Re()),i.relationTitle2=ei.sanitizeText(i.relationTitle2.trim(),Re()),zbt.push(i)},yJe=function(i,a){const f=$9(i).className;Jl[f].annotations.push(a)},Oqt=function(i,a){vX(i);const f=$9(i).className,g=Jl[f];if(typeof a=="string"){const w=a.trim();w.startsWith("<<")&&w.endsWith(">>")?g.annotations.push(j9(w.substring(2,w.length-2))):w.indexOf(")")>0?g.methods.push(new Dqt(w,"method")):w&&g.members.push(new Dqt(w,"attribute"))}},xJe=function(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(f=>Oqt(i,f)))},kJe=function(i,a){const f={id:`note${mX.length}`,class:a,text:i};mX.push(f)},EJe=function(i){return i.startsWith(":")&&(i=i.substring(1)),j9(i.trim())},Hbt=function(i,a){i.split(",").forEach(function(f){let g=f;f[0].match(/\d/)&&(g=wX+g),Jl[g]!==void 0&&Jl[g].cssClasses.push(a)})},TJe=function(i,a){i.split(",").forEach(function(f){a!==void 0&&(Jl[f].tooltip=j9(a))})},CJe=function(i,a){return a?A8[a].classes[i].tooltip:Jl[i].tooltip},SJe=function(i,a,f){const g=Re();i.split(",").forEach(function(w){let v=w;w[0].match(/\d/)&&(v=wX+v),Jl[v]!==void 0&&(Jl[v].link=uo.formatUrl(a,g),g.securityLevel==="sandbox"?Jl[v].linkTarget="_top":typeof f=="string"?Jl[v].linkTarget=j9(f):Jl[v].linkTarget="_blank")}),Hbt(i,"clickable")},_Je=function(i,a,f){i.split(",").forEach(function(g){AJe(g,a,f),Jl[g].haveCallback=!0}),Hbt(i,"clickable")},AJe=function(i,a,f){const g=ei.sanitizeText(i,Re());if(Re().securityLevel!=="loose"||a===void 0)return;const v=g;if(Jl[v]!==void 0){const b=Iqt(v);let E=[];if(typeof f=="string"){E=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let S=0;S<E.length;S++){let _=E[S].trim();_.charAt(0)==='"'&&_.charAt(_.length-1)==='"'&&(_=_.substr(1,_.length-2)),E[S]=_}}E.length===0&&E.push(b),mB.push(function(){const S=document.querySelector(`[id="${b}"]`);S!==null&&S.addEventListener("click",function(){uo.runFunc(a,...E)},!1)})}},LJe=function(i){mB.forEach(function(a){a(i)})},DJe={LINE:0,DOTTED_LINE:1},MJe={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Nqt=function(i){let a=Tr(".mermaidTooltip");(a._groups||a)[0][0]===null&&(a=Tr("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Tr(i).select("svg").selectAll("g.node").on("mouseover",function(){const w=Tr(this);if(w.attr("title")===null)return;const b=this.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.text(w.attr("title")).style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.top-14+document.body.scrollTop+"px"),a.html(a.html().replace(/&lt;br\/&gt;/g,"<br/>")),w.classed("hover",!0)}).on("mouseout",function(){a.transition().duration(500).style("opacity",0),Tr(this).classed("hover",!1)})};mB.push(Nqt);let Pqt="TB";const yX={setAccTitle:og,getAccTitle:Xg,getAccDescription:Jg,setAccDescription:Qg,getConfig:()=>Re().class,addClass:vX,bindFunctions:LJe,clear:gJe,getClass:pJe,getClasses:bJe,getNotes:mJe,addAnnotation:yJe,addNote:kJe,getRelations:wJe,addRelation:vJe,getDirection:()=>Pqt,setDirection:i=>{Pqt=i},addMember:Oqt,addMembers:xJe,cleanupLabel:EJe,lineType:DJe,relationType:MJe,setClickEvent:_Je,setCssClass:Hbt,setLink:SJe,getTooltip:CJe,setTooltip:TJe,lookUpDomId:Iqt,setDiagramTitle:S2,getDiagramTitle:Zg,setClassLabel:dJe,addNamespace:function(i){A8[i]===void 0&&(A8[i]={id:i,classes:{},children:{},domId:wX+i+"-"+qbt},qbt++)},addClassesToNamespace:function(i,a){if(A8[i]!==void 0)for(const f of a){const{className:g}=$9(f);Jl[g].parent=i,A8[i].classes[g]=Jl[g]}},getNamespace:function(i){return A8[i]},getNamespaces:function(){return A8},setCssStyle:function(i,a){const f=Jl[i];if(!(!a||!f))for(const g of a)g.includes(",")?f.styles.push(...g.split(",")):f.styles.push(g)}},Fqt=i=>`g.classGroup text {
986 `),w.style===void 0&&(v.style=v.style||"stroke: #333; stroke-width: 1.5px;fill:none"),v.labelStyle=v.labelStyle.replace("color:","fill:"))),a.setEdge(w.id1,w.id2,v,g)})},$Je=function(i){Gbt={...Gbt,...i}},zJe=async function(i,a,f,g){Kt.info("Drawing class - ",a);const w=Re().flowchart??Re().class,v=Re().securityLevel;Kt.info("config:",w);const b=(w==null?void 0:w.nodeSpacing)??50,E=(w==null?void 0:w.rankSpacing)??50,S=new l1({multigraph:!0,compound:!0}).setGraph({rankdir:g.db.getDirection(),nodesep:b,ranksep:E,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),_=g.db.getNamespaces(),M=g.db.getClasses(),F=g.db.getRelations(),R=g.db.getNotes();Kt.info(F),BJe(_,S,a,g),$qt(M,S,a,g),jJe(F,S),RJe(R,S,F.length+1,M);let B;v==="sandbox"&&(B=Tr("#i"+a));const z=Tr(v==="sandbox"?B.nodes()[0].contentDocument.body:"body"),Y=z.select(`[id="${a}"]`),nt=z.select("#"+a+" g");if(await ebt(nt,S,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",a),uo.insertTitle(Y,"classTitleText",(w==null?void 0:w.titleTopMargin)??5,g.db.getDiagramTitle()),w8(S,Y,w==null?void 0:w.diagramPadding,w==null?void 0:w.useMaxWidth),!(w!=null&&w.htmlLabels)){const ot=v==="sandbox"?B.nodes()[0].contentDocument:document,ft=ot.querySelectorAll('[id="'+a+'"] .edgeLabel .label');for(const wt of ft){const mt=wt.getBBox(),ct=ot.createElementNS("http://www.w3.org/2000/svg","rect");ct.setAttribute("rx",0),ct.setAttribute("ry",0),ct.setAttribute("width",mt.width),ct.setAttribute("height",mt.height),wt.insertBefore(ct,wt.firstChild)}}};function zqt(i){let a;switch(i){case 0:a="aggregation";break;case 1:a="extension";break;case 2:a="composition";break;case 3:a="dependency";break;case 4:a="lollipop";break;default:a="none"}return a}const qJe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:Aqt,db:yX,renderer:{setConf:$Je,draw:zJe},styles:Fqt,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,yX.clear()}}},Symbol.toStringTag,{value:"Module"}));var Kbt=function(){var i=function(xt,Ft,Ct,kt){for(Ct=Ct||{},kt=xt.length;kt--;Ct[xt[kt]]=Ft);return Ct},a=[1,2],f=[1,3],g=[1,4],w=[2,4],v=[1,9],b=[1,11],E=[1,15],S=[1,16],_=[1,17],M=[1,18],F=[1,30],R=[1,19],B=[1,20],z=[1,21],Y=[1,22],nt=[1,23],ot=[1,25],ft=[1,26],wt=[1,27],mt=[1,28],ct=[1,29],rt=[1,32],it=[1,33],gt=[1,34],Q=[1,35],dt=[1,31],K=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],yt=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],V=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],Ot={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"-->":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",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",30:"NOTE_TEXT",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:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"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,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],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(Ft,Ct,kt,Gt,Fe,Mt,pn){var Ae=Mt.length-1;switch(Fe){case 3:return Gt.setRootDoc(Mt[Ae]),Mt[Ae];case 4:this.$=[];break;case 5:Mt[Ae]!="nl"&&(Mt[Ae-1].push(Mt[Ae]),this.$=Mt[Ae-1]);break;case 6:case 7:this.$=Mt[Ae];break;case 8:this.$="nl";break;case 11:this.$=Mt[Ae];break;case 12:const be=Mt[Ae-1];be.description=Gt.trimColon(Mt[Ae]),this.$=be;break;case 13:this.$={stmt:"relation",state1:Mt[Ae-2],state2:Mt[Ae]};break;case 14:const Ne=Gt.trimColon(Mt[Ae]);this.$={stmt:"relation",state1:Mt[Ae-3],state2:Mt[Ae-1],description:Ne};break;case 18:this.$={stmt:"state",id:Mt[Ae-3],type:"default",description:"",doc:Mt[Ae-1]};break;case 19:var ye=Mt[Ae],tn=Mt[Ae-2].trim();if(Mt[Ae].match(":")){var sn=Mt[Ae].split(":");ye=sn[0],tn=[tn,sn[1]]}this.$={stmt:"state",id:ye,type:"default",description:tn};break;case 20:this.$={stmt:"state",id:Mt[Ae-3],type:"default",description:Mt[Ae-5],doc:Mt[Ae-1]};break;case 21:this.$={stmt:"state",id:Mt[Ae],type:"fork"};break;case 22:this.$={stmt:"state",id:Mt[Ae],type:"join"};break;case 23:this.$={stmt:"state",id:Mt[Ae],type:"choice"};break;case 24:this.$={stmt:"state",id:Gt.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:Mt[Ae-1].trim(),note:{position:Mt[Ae-2].trim(),text:Mt[Ae].trim()}};break;case 28:this.$=Mt[Ae].trim(),Gt.setAccTitle(this.$);break;case 29:case 30:this.$=Mt[Ae].trim(),Gt.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:Mt[Ae-1].trim(),classes:Mt[Ae].trim()};break;case 33:this.$={stmt:"applyClass",id:Mt[Ae-1].trim(),styleClass:Mt[Ae].trim()};break;case 34:Gt.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:Gt.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:Gt.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:Gt.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:Mt[Ae].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:Mt[Ae-2].trim(),classes:[Mt[Ae].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:Mt[Ae-2].trim(),classes:[Mt[Ae].trim()],type:"default",description:""};break}},table:[{3:1,4:a,5:f,6:g},{1:[3]},{3:5,4:a,5:f,6:g},{3:6,4:a,5:f,6:g},i([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],w,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:v,5:b,8:8,9:10,10:12,11:13,12:14,15:E,16:S,18:_,21:M,23:F,24:R,25:B,26:z,27:Y,28:nt,31:24,32:ot,34:ft,36:wt,37:mt,41:ct,44:rt,45:it,46:gt,47:Q,50:dt},i(K,[2,5]),{9:36,10:12,11:13,12:14,15:E,16:S,18:_,21:M,23:F,24:R,25:B,26:z,27:Y,28:nt,31:24,32:ot,34:ft,36:wt,37:mt,41:ct,44:rt,45:it,46:gt,47:Q,50:dt},i(K,[2,7]),i(K,[2,8]),i(K,[2,9]),i(K,[2,10]),i(K,[2,11],{13:[1,37],14:[1,38]}),i(K,[2,15]),{17:[1,39]},i(K,[2,17],{19:[1,40]}),{22:[1,41]},i(K,[2,21]),i(K,[2,22]),i(K,[2,23]),i(K,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},i(K,[2,27]),{33:[1,46]},{35:[1,47]},i(K,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},i(yt,[2,40],{51:[1,51]}),i(yt,[2,41],{51:[1,52]}),i(K,[2,34]),i(K,[2,35]),i(K,[2,36]),i(K,[2,37]),i(K,[2,6]),i(K,[2,12]),{12:53,23:F,50:dt},i(K,[2,16]),i(V,w,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},i(K,[2,28]),i(K,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},i(K,[2,13],{13:[1,63]}),{4:v,5:b,8:8,9:10,10:12,11:13,12:14,15:E,16:S,18:_,20:[1,64],21:M,23:F,24:R,25:B,26:z,27:Y,28:nt,31:24,32:ot,34:ft,36:wt,37:mt,41:ct,44:rt,45:it,46:gt,47:Q,50:dt},i(K,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},i(K,[2,31]),i(K,[2,32]),i(K,[2,33]),i(yt,[2,42]),i(yt,[2,43]),i(K,[2,14]),i(K,[2,18]),i(V,w,{7:68}),i(K,[2,25]),i(K,[2,26]),{4:v,5:b,8:8,9:10,10:12,11:13,12:14,15:E,16:S,18:_,20:[1,69],21:M,23:F,24:R,25:B,26:z,27:Y,28:nt,31:24,32:ot,34:ft,36:wt,37:mt,41:ct,44:rt,45:it,46:gt,47:Q,50:dt},i(K,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(Ft,Ct){if(Ct.recoverable)this.trace(Ft);else{var kt=new Error(Ft);throw kt.hash=Ct,kt}},parse:function(Ft){var Ct=this,kt=[0],Gt=[],Fe=[null],Mt=[],pn=this.table,Ae="",ye=0,tn=0,sn=2,be=1,Ne=Mt.slice.call(arguments,1),Xt=Object.create(this.lexer),_e={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(_e.yy[xe]=this.yy[xe]);Xt.setInput(Ft,_e.yy),_e.yy.lexer=Xt,_e.yy.parser=this,typeof Xt.yylloc>"u"&&(Xt.yylloc={});var Mn=Xt.yylloc;Mt.push(Mn);var ce=Xt.options&&Xt.options.ranges;typeof _e.yy.parseError=="function"?this.parseError=_e.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Br(){var ke;return ke=Gt.pop()||Xt.lex()||be,typeof ke!="number"&&(ke instanceof Array&&(Gt=ke,ke=Gt.pop()),ke=Ct.symbols_[ke]||ke),ke}for(var we,Fi,mi,ga,Ss={},za,br,An,Nn;;){if(Fi=kt[kt.length-1],this.defaultActions[Fi]?mi=this.defaultActions[Fi]:((we===null||typeof we>"u")&&(we=Br()),mi=pn[Fi]&&pn[Fi][we]),typeof mi>"u"||!mi.length||!mi[0]){var Bn="";Nn=[];for(za in pn[Fi])this.terminals_[za]&&za>sn&&Nn.push("'"+this.terminals_[za]+"'");Xt.showPosition?Bn="Parse error on line "+(ye+1)+`:
991 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Ct=this.next();return Ct||this.lex()},begin:function(Ct){this.conditionStack.push(Ct)},popState:function(){var Ct=this.conditionStack.length-1;return Ct>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Ct){return Ct=this.conditionStack.length-1-Math.abs(Ct||0),Ct>=0?this.conditionStack[Ct]:"INITIAL"},pushState:function(Ct){this.begin(Ct)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Ct,kt,Gt,Fe){switch(Gt){case 0:return 40;case 1:return 44;case 2:return 45;case 3:return 46;case 4:return 47;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"),16;case 13:return 17;case 14:this.popState();break;case 15:return this.begin("acc_title"),32;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),34;case 18:return this.popState(),"acc_descr_value";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"),37;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),38;case 25:return this.popState(),39;case 26:return this.pushState("CLASS"),41;case 27:return this.popState(),this.pushState("CLASS_STYLE"),42;case 28:return this.popState(),43;case 29:return this.pushState("SCALE"),16;case 30:return 17;case 31:this.popState();break;case 32:this.pushState("STATE");break;case 33:return this.popState(),kt.yytext=kt.yytext.slice(0,-8).trim(),24;case 34:return this.popState(),kt.yytext=kt.yytext.slice(0,-8).trim(),25;case 35:return this.popState(),kt.yytext=kt.yytext.slice(0,-10).trim(),26;case 36:return this.popState(),kt.yytext=kt.yytext.slice(0,-8).trim(),24;case 37:return this.popState(),kt.yytext=kt.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),kt.yytext=kt.yytext.slice(0,-10).trim(),26;case 39:return 44;case 40:return 45;case 41:return 46;case 42:return 47;case 43:this.pushState("STATE_STRING");break;case 44:return this.pushState("STATE_ID"),"AS";case 45:return this.popState(),"ID";case 46:this.popState();break;case 47:return"STATE_DESCR";case 48:return 18;case 49:this.popState();break;case 50:return this.popState(),this.pushState("struct"),19;case 51:break;case 52:return this.popState(),20;case 53:break;case 54:return this.begin("NOTE"),28;case 55:return this.popState(),this.pushState("NOTE_ID"),52;case 56:return this.popState(),this.pushState("NOTE_ID"),53;case 57:this.popState(),this.pushState("FLOATING_NOTE");break;case 58:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 59:break;case 60:return"NOTE_TEXT";case 61:return this.popState(),"ID";case 62:return this.popState(),this.pushState("NOTE_TEXT"),23;case 63:return this.popState(),kt.yytext=kt.yytext.substr(2).trim(),30;case 64:return this.popState(),kt.yytext=kt.yytext.slice(0,-8).trim(),30;case 65:return 6;case 66:return 6;case 67:return 15;case 68:return 50;case 69:return 23;case 70:return kt.yytext=kt.yytext.trim(),13;case 71:return 14;case 72:return 27;case 73:return 51;case 74:return 5;case 75:return"INVALID"}},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,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/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,32,39,40,41,42,51,52,53,54,68,69,70,71,72],inclusive:!1},FLOATING_NOTE_ID:{rules:[61],inclusive:!1},FLOATING_NOTE:{rules:[58,59,60],inclusive:!1},NOTE_TEXT:{rules:[63,64],inclusive:!1},NOTE_ID:{rules:[62],inclusive:!1},NOTE:{rules:[55,56,57],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,30,31],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[45],inclusive:!1},STATE_STRING:{rules:[46,47],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,33,34,35,36,37,38,43,44,48,49,50],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,50,54,65,66,67,68,69,70,71,73,74,75],inclusive:!0}}};return xt}();Ot.lexer=It;function jt(){this.yy={}}return jt.prototype=Ot,Ot.Parser=jt,new jt}();Kbt.parser=Kbt;const qqt=Kbt,HJe="LR",VJe="TB",EX="state",Wbt="relation",UJe="classDef",GJe="applyClass",yB="default",Hqt="divider",Ybt="[*]",Vqt="start",Uqt=Ybt,Gqt="end",Kqt="color",Wqt="fill",KJe="bgFill",WJe=",";function Yqt(){return{}}let Xqt=HJe,TX=[],xB=Yqt();const Qqt=()=>({relations:[],states:{},documents:{}});let CX={root:Qqt()},lg=CX.root,kB=0,Jqt=0;const YJe={LINE:0,DOTTED_LINE:1},XJe={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},SX=i=>JSON.parse(JSON.stringify(i)),QJe=i=>{Kt.info("Setting root doc",i),TX=i},JJe=()=>TX,_X=(i,a,f)=>{if(a.stmt===Wbt)_X(i,a.state1,!0),_X(i,a.state2,!1);else if(a.stmt===EX&&(a.id==="[*]"?(a.id=f?i.id+"_start":i.id+"_end",a.start=f):a.id=a.id.trim()),a.doc){const g=[];let w=[],v;for(v=0;v<a.doc.length;v++)if(a.doc[v].type===Hqt){const b=SX(a.doc[v]);b.doc=SX(w),g.push(b),w=[]}else w.push(a.doc[v]);if(g.length>0&&w.length>0){const b={stmt:EX,id:_Ft(),type:"divider",doc:SX(w)};g.push(SX(b)),a.doc=g}a.doc.forEach(b=>_X(a,b,!0))}},ZJe=()=>(_X({id:"root"},{id:"root",doc:TX},!0),{id:"root",doc:TX}),tZe=i=>{let a;i.doc?a=i.doc:a=i,Kt.info(a),Zqt(!0),Kt.info("Extract",a),a.forEach(f=>{switch(f.stmt){case EX:z9(f.id.trim(),f.type,f.doc,f.description,f.note,f.classes,f.styles,f.textStyles);break;case Wbt:tHt(f.state1,f.state2,f.description);break;case UJe:eHt(f.id.trim(),f.classes);break;case GJe:Zbt(f.id.trim(),f.styleClass);break}})},z9=function(i,a=yB,f=null,g=null,w=null,v=null,b=null,E=null){const S=i==null?void 0:i.trim();lg.states[S]===void 0?(Kt.info("Adding state ",S,g),lg.states[S]={id:S,descriptions:[],type:a,doc:f,note:w,classes:[],styles:[],textStyles:[]}):(lg.states[S].doc||(lg.states[S].doc=f),lg.states[S].type||(lg.states[S].type=a)),g&&(Kt.info("Setting state description",S,g),typeof g=="string"&&Jbt(S,g.trim()),typeof g=="object"&&g.forEach(_=>Jbt(S,_.trim()))),w&&(lg.states[S].note=w,lg.states[S].note.text=ei.sanitizeText(lg.states[S].note.text,Re())),v&&(Kt.info("Setting state classes",S,v),(typeof v=="string"?[v]:v).forEach(M=>Zbt(S,M.trim()))),b&&(Kt.info("Setting state styles",S,b),(typeof b=="string"?[b]:b).forEach(M=>lZe(S,M.trim()))),E&&(Kt.info("Setting state styles",S,b),(typeof E=="string"?[E]:E).forEach(M=>hZe(S,M.trim())))},Zqt=function(i){CX={root:Qqt()},lg=CX.root,kB=0,xB=Yqt(),i||ag()},EB=function(i){return lg.states[i]},eZe=function(){return lg.states},nZe=function(){Kt.info("Documents = ",CX)},rZe=function(){return lg.relations};function Xbt(i=""){let a=i;return i===Ybt&&(kB++,a=`${Vqt}${kB}`),a}function Qbt(i="",a=yB){return i===Ybt?Vqt:a}function iZe(i=""){let a=i;return i===Uqt&&(kB++,a=`${Gqt}${kB}`),a}function sZe(i="",a=yB){return i===Uqt?Gqt:a}function aZe(i,a,f){let g=Xbt(i.id.trim()),w=Qbt(i.id.trim(),i.type),v=Xbt(a.id.trim()),b=Qbt(a.id.trim(),a.type);z9(g,w,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),z9(v,b,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles),lg.relations.push({id1:g,id2:v,relationTitle:ei.sanitizeText(f,Re())})}const tHt=function(i,a,f){if(typeof i=="object")aZe(i,a,f);else{const g=Xbt(i.trim()),w=Qbt(i),v=iZe(a.trim()),b=sZe(a);z9(g,w),z9(v,b),lg.relations.push({id1:g,id2:v,title:ei.sanitizeText(f,Re())})}},Jbt=function(i,a){const f=lg.states[i],g=a.startsWith(":")?a.replace(":","").trim():a;f.descriptions.push(ei.sanitizeText(g,Re()))},oZe=function(i){return i.substring(0,1)===":"?i.substr(2).trim():i.trim()},cZe=()=>(Jqt++,"divider-id-"+Jqt),eHt=function(i,a=""){xB[i]===void 0&&(xB[i]={id:i,styles:[],textStyles:[]});const f=xB[i];a!=null&&a.split(WJe).forEach(g=>{const w=g.replace(/([^;]*);/,"$1").trim();if(g.match(Kqt)){const b=w.replace(Wqt,KJe).replace(Kqt,Wqt);f.textStyles.push(b)}f.styles.push(w)})},uZe=function(){return xB},Zbt=function(i,a){i.split(",").forEach(function(f){let g=EB(f);if(g===void 0){const w=f.trim();z9(w),g=EB(w)}g.classes.push(a)})},lZe=function(i,a){const f=EB(i);f!==void 0&&f.textStyles.push(a)},hZe=function(i,a){const f=EB(i);f!==void 0&&f.textStyles.push(a)},Hx={getConfig:()=>Re().state,addState:z9,clear:Zqt,getState:EB,getStates:eZe,getRelations:rZe,getClasses:uZe,getDirection:()=>Xqt,addRelation:tHt,getDividerId:cZe,setDirection:i=>{Xqt=i},cleanupLabel:oZe,lineType:YJe,relationType:XJe,logDocuments:nZe,getRootDoc:JJe,setRootDoc:QJe,getRootDocV2:ZJe,extract:tZe,trimColon:i=>i&&i[0]===":"?i.substr(1).trim():i.trim(),getAccTitle:Xg,setAccTitle:og,getAccDescription:Jg,setAccDescription:Qg,addStyleClass:eHt,setCssClass:Zbt,addDescription:Jbt,setDiagramTitle:S2,getDiagramTitle:Zg},nHt=i=>`
1192 `,t2t={},fZe=(i,a)=>{t2t[i]=a},dZe=i=>t2t[i],rHt=()=>Object.keys(t2t),gZe={get:dZe,set:fZe,keys:rHt,size:()=>rHt().length},pZe=i=>i.append("circle").attr("class","start-state").attr("r",Re().state.sizeUnit).attr("cx",Re().state.padding+Re().state.sizeUnit).attr("cy",Re().state.padding+Re().state.sizeUnit),bZe=i=>i.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Re().state.textHeight).attr("class","divider").attr("x2",Re().state.textHeight*2).attr("y1",0).attr("y2",0),wZe=(i,a)=>{const f=i.append("text").attr("x",2*Re().state.padding).attr("y",Re().state.textHeight+2*Re().state.padding).attr("font-size",Re().state.fontSize).attr("class","state-title").text(a.id),g=f.node().getBBox();return i.insert("rect",":first-child").attr("x",Re().state.padding).attr("y",Re().state.padding).attr("width",g.width+2*Re().state.padding).attr("height",g.height+2*Re().state.padding).attr("rx",Re().state.radius),f},mZe=(i,a)=>{const f=function(R,B,z){const Y=R.append("tspan").attr("x",2*Re().state.padding).text(B);z||Y.attr("dy",Re().state.textHeight)},w=i.append("text").attr("x",2*Re().state.padding).attr("y",Re().state.textHeight+1.3*Re().state.padding).attr("font-size",Re().state.fontSize).attr("class","state-title").text(a.descriptions[0]).node().getBBox(),v=w.height,b=i.append("text").attr("x",Re().state.padding).attr("y",v+Re().state.padding*.4+Re().state.dividerMargin+Re().state.textHeight).attr("class","state-description");let E=!0,S=!0;a.descriptions.forEach(function(R){E||(f(b,R,S),S=!1),E=!1});const _=i.append("line").attr("x1",Re().state.padding).attr("y1",Re().state.padding+v+Re().state.dividerMargin/2).attr("y2",Re().state.padding+v+Re().state.dividerMargin/2).attr("class","descr-divider"),M=b.node().getBBox(),F=Math.max(M.width,w.width);return _.attr("x2",F+3*Re().state.padding),i.insert("rect",":first-child").attr("x",Re().state.padding).attr("y",Re().state.padding).attr("width",F+2*Re().state.padding).attr("height",M.height+v+2*Re().state.padding).attr("rx",Re().state.radius),i},vZe=(i,a,f)=>{const g=Re().state.padding,w=2*Re().state.padding,v=i.node().getBBox(),b=v.width,E=v.x,S=i.append("text").attr("x",0).attr("y",Re().state.titleShift).attr("font-size",Re().state.fontSize).attr("class","state-title").text(a.id),M=S.node().getBBox().width+w;let F=Math.max(M,b);F===b&&(F=F+w);let R;const B=i.node().getBBox();a.doc,R=E-g,M>b&&(R=(b-F)/2+g),Math.abs(E-B.x)<g&&M>b&&(R=E-(M-b)/2);const z=1-Re().state.textHeight;return i.insert("rect",":first-child").attr("x",R).attr("y",z).attr("class",f?"alt-composit":"composit").attr("width",F).attr("height",B.height+Re().state.textHeight+Re().state.titleShift+1).attr("rx","0"),S.attr("x",R+g),M<=b&&S.attr("x",E+(F-w)/2-M/2+g),i.insert("rect",":first-child").attr("x",R).attr("y",Re().state.titleShift-Re().state.textHeight-Re().state.padding).attr("width",F).attr("height",Re().state.textHeight*3).attr("rx",Re().state.radius),i.insert("rect",":first-child").attr("x",R).attr("y",Re().state.titleShift-Re().state.textHeight-Re().state.padding).attr("width",F).attr("height",B.height+3+2*Re().state.textHeight).attr("rx",Re().state.radius),i},yZe=i=>(i.append("circle").attr("class","end-state-outer").attr("r",Re().state.sizeUnit+Re().state.miniPadding).attr("cx",Re().state.padding+Re().state.sizeUnit+Re().state.miniPadding).attr("cy",Re().state.padding+Re().state.sizeUnit+Re().state.miniPadding),i.append("circle").attr("class","end-state-inner").attr("r",Re().state.sizeUnit).attr("cx",Re().state.padding+Re().state.sizeUnit+2).attr("cy",Re().state.padding+Re().state.sizeUnit+2)),xZe=(i,a)=>{let f=Re().state.forkWidth,g=Re().state.forkHeight;if(a.parentId){let w=f;f=g,g=w}return i.append("rect").style("stroke","black").style("fill","black").attr("width",f).attr("height",g).attr("x",Re().state.padding).attr("y",Re().state.padding)},kZe=(i,a,f,g)=>{let w=0;const v=g.append("text");v.style("text-anchor","start"),v.attr("class","noteText");let b=i.replace(/\r\n/g,"<br/>");b=b.replace(/\n/g,"<br/>");const E=b.split(ei.lineBreakRegex);let S=1.25*Re().state.noteMargin;for(const _ of E){const M=_.trim();if(M.length>0){const F=v.append("tspan");if(F.text(M),S===0){const R=F.node().getBBox();S+=R.height}w+=S,F.attr("x",a+Re().state.noteMargin),F.attr("y",f+w+1.25*Re().state.noteMargin)}}return{textWidth:v.node().getBBox().width,textHeight:w}},EZe=(i,a)=>{a.attr("class","state-note");const f=a.append("rect").attr("x",0).attr("y",Re().state.padding),g=a.append("g"),{textWidth:w,textHeight:v}=kZe(i,0,0,g);return f.attr("height",v+2*Re().state.noteMargin),f.attr("width",w+Re().state.noteMargin*2),f},iHt=function(i,a){const f=a.id,g={id:f,label:a.id,width:0,height:0},w=i.append("g").attr("id",f).attr("class","stateGroup");a.type==="start"&&pZe(w),a.type==="end"&&yZe(w),(a.type==="fork"||a.type==="join")&&xZe(w,a),a.type==="note"&&EZe(a.note.text,w),a.type==="divider"&&bZe(w),a.type==="default"&&a.descriptions.length===0&&wZe(w,a),a.type==="default"&&a.descriptions.length>0&&mZe(w,a);const v=w.node().getBBox();return g.width=v.width+2*Re().state.padding,g.height=v.height+2*Re().state.padding,gZe.set(f,g),g};let sHt=0;const TZe=function(i,a,f){const g=function(S){switch(S){case Hx.relationType.AGGREGATION:return"aggregation";case Hx.relationType.EXTENSION:return"extension";case Hx.relationType.COMPOSITION:return"composition";case Hx.relationType.DEPENDENCY:return"dependency"}};a.points=a.points.filter(S=>!Number.isNaN(S.y));const w=a.points,v=Ax().x(function(S){return S.x}).y(function(S){return S.y}).curve(wF),b=i.append("path").attr("d",v(w)).attr("id","edge"+sHt).attr("class","transition");let E="";if(Re().state.arrowMarkerAbsolute&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\("),E=E.replace(/\)/g,"\\)")),b.attr("marker-end","url("+E+"#"+g(Hx.relationType.DEPENDENCY)+"End)"),f.title!==void 0){const S=i.append("g").attr("class","stateLabel"),{x:_,y:M}=uo.calcLabelPosition(a.points),F=ei.getRows(f.title);let R=0;const B=[];let z=0,Y=0;for(let ft=0;ft<=F.length;ft++){const wt=S.append("text").attr("text-anchor","middle").text(F[ft]).attr("x",_).attr("y",M+R),mt=wt.node().getBBox();z=Math.max(z,mt.width),Y=Math.min(Y,mt.x),Kt.info(mt.x,_,M+R),R===0&&(R=wt.node().getBBox().height,Kt.info("Title height",R,M)),B.push(wt)}let nt=R*F.length;if(F.length>1){const ft=(F.length-1)*R*.5;B.forEach((wt,mt)=>wt.attr("y",M+mt*R-ft)),nt=R*F.length}const ot=S.node().getBBox();S.insert("rect",":first-child").attr("class","box").attr("x",_-z/2-Re().state.padding/2).attr("y",M-nt/2-Re().state.padding/2-3.5).attr("width",z+Re().state.padding).attr("height",nt+Re().state.padding),Kt.info(ot)}sHt++};let M2;const e2t={},CZe=function(){},SZe=function(i){i.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")},_Ze=function(i,a,f,g){M2=Re().state;const w=Re().securityLevel;let v;w==="sandbox"&&(v=Tr("#i"+a));const b=Tr(w==="sandbox"?v.nodes()[0].contentDocument.body:"body"),E=w==="sandbox"?v.nodes()[0].contentDocument:document;Kt.debug("Rendering diagram "+i);const S=b.select(`[id='${a}']`);SZe(S);const _=g.db.getRootDoc();aHt(_,S,void 0,!1,b,E,g);const M=M2.padding,F=S.node().getBBox(),R=F.width+M*2,B=F.height+M*2,z=R*1.75;sg(S,B,z,M2.useMaxWidth),S.attr("viewBox",`${F.x-M2.padding} ${F.y-M2.padding} `+R+" "+B)},AZe=i=>i?i.length*M2.fontSizeFactor:1,aHt=(i,a,f,g,w,v,b)=>{const E=new l1({compound:!0,multigraph:!0});let S,_=!0;for(S=0;S<i.length;S++)if(i[S].stmt==="relation"){_=!1;break}f?E.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:_?1:M2.edgeLengthFactor,nodeSep:_?1:50,isMultiGraph:!0}):E.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:_?1:M2.edgeLengthFactor,nodeSep:_?1:50,ranker:"tight-tree",isMultiGraph:!0}),E.setDefaultEdgeLabel(function(){return{}}),b.db.extract(i);const M=b.db.getStates(),F=b.db.getRelations(),R=Object.keys(M);for(const ot of R){const ft=M[ot];f&&(ft.parentId=f);let wt;if(ft.doc){let mt=a.append("g").attr("id",ft.id).attr("class","stateGroup");wt=aHt(ft.doc,mt,ft.id,!g,w,v,b);{mt=vZe(mt,ft,g);let ct=mt.node().getBBox();wt.width=ct.width,wt.height=ct.height+M2.padding/2,e2t[ft.id]={y:M2.compositTitleSize}}}else wt=iHt(a,ft);if(ft.note){const mt={descriptions:[],id:ft.id+"-note",note:ft.note,type:"note"},ct=iHt(a,mt);ft.note.position==="left of"?(E.setNode(wt.id+"-note",ct),E.setNode(wt.id,wt)):(E.setNode(wt.id,wt),E.setNode(wt.id+"-note",ct)),E.setParent(wt.id,wt.id+"-group"),E.setParent(wt.id+"-note",wt.id+"-group")}else E.setNode(wt.id,wt)}Kt.debug("Count=",E.nodeCount(),E);let B=0;F.forEach(function(ot){B++,Kt.debug("Setting edge",ot),E.setEdge(ot.id1,ot.id2,{relation:ot,width:AZe(ot.title),height:M2.labelHeight*ei.getRows(ot.title).length,labelpos:"c"},"id"+B)}),kD(E),Kt.debug("Graph after layout",E.nodes());const z=a.node();E.nodes().forEach(function(ot){ot!==void 0&&E.node(ot)!==void 0?(Kt.warn("Node "+ot+": "+JSON.stringify(E.node(ot))),w.select("#"+z.id+" #"+ot).attr("transform","translate("+(E.node(ot).x-E.node(ot).width/2)+","+(E.node(ot).y+(e2t[ot]?e2t[ot].y:0)-E.node(ot).height/2)+" )"),w.select("#"+z.id+" #"+ot).attr("data-x-shift",E.node(ot).x-E.node(ot).width/2),v.querySelectorAll("#"+z.id+" #"+ot+" .divider").forEach(wt=>{const mt=wt.parentElement;let ct=0,rt=0;mt&&(mt.parentElement&&(ct=mt.parentElement.getBBox().width),rt=parseInt(mt.getAttribute("data-x-shift"),10),Number.isNaN(rt)&&(rt=0)),wt.setAttribute("x1",0-rt+8),wt.setAttribute("x2",ct-rt-8)})):Kt.debug("No Node "+ot+": "+JSON.stringify(E.node(ot)))});let Y=z.getBBox();E.edges().forEach(function(ot){ot!==void 0&&E.edge(ot)!==void 0&&(Kt.debug("Edge "+ot.v+" -> "+ot.w+": "+JSON.stringify(E.edge(ot))),TZe(a,E.edge(ot),E.edge(ot).relation))}),Y=z.getBBox();const nt={id:f||"root",label:f||"root",width:0,height:0};return nt.width=Y.width+2*M2.padding,nt.height=Y.height+2*M2.padding,Kt.debug("Doc rendered",nt,E),nt},LZe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:qqt,db:Hx,renderer:{setConf:CZe,draw:_Ze},styles:nHt,init:i=>{i.state||(i.state={}),i.state.arrowMarkerAbsolute=i.arrowMarkerAbsolute,Hx.clear()}}},Symbol.toStringTag,{value:"Module"})),AX="rect",n2t="rectWithTitle",DZe="start",MZe="end",IZe="divider",OZe="roundedWithTitle",NZe="note",PZe="noteGroup",ID="statediagram",FZe=`${ID}-state`,oHt="transition",BZe="note",RZe=`${oHt} note-edge`,jZe=`${ID}-${BZe}`,$Ze=`${ID}-cluster`,zZe=`${ID}-cluster-alt`,cHt="parent",uHt="note",qZe="state",r2t="----",HZe=`${r2t}${uHt}`,lHt=`${r2t}${cHt}`,hHt="fill:none",fHt="fill: #333",dHt="c",gHt="text",pHt="normal";let LX={},L8=0;const VZe=function(i){const a=Object.keys(i);for(const f of a)i[f]},UZe=function(i,a){return a.db.extract(a.db.getRootDocV2()),a.db.getClasses()};function GZe(i){return i==null?"":i.classes?i.classes.join(" "):""}function i2t(i="",a=0,f="",g=r2t){const w=f!==null&&f.length>0?`${g}${f}`:"";return`${qZe}-${i}${w}-${a}`}const TB=(i,a,f,g,w,v)=>{const b=f.id,E=GZe(g[b]);if(b!=="root"){let S=AX;f.start===!0&&(S=DZe),f.start===!1&&(S=MZe),f.type!==yB&&(S=f.type),LX[b]||(LX[b]={id:b,shape:S,description:ei.sanitizeText(b,Re()),classes:`${E} ${FZe}`});const _=LX[b];f.description&&(Array.isArray(_.description)?(_.shape=n2t,_.description.push(f.description)):_.description.length>0?(_.shape=n2t,_.description===b?_.description=[f.description]:_.description=[_.description,f.description]):(_.shape=AX,_.description=f.description),_.description=ei.sanitizeTextOrArray(_.description,Re())),_.description.length===1&&_.shape===n2t&&(_.shape=AX),!_.type&&f.doc&&(Kt.info("Setting cluster for ",b,s2t(f)),_.type="group",_.dir=s2t(f),_.shape=f.type===Hqt?IZe:OZe,_.classes=_.classes+" "+$Ze+" "+(v?zZe:""));const M={labelStyle:"",shape:_.shape,labelText:_.description,classes:_.classes,style:"",id:b,dir:_.dir,domId:i2t(b,L8),type:_.type,padding:15};if(M.centerLabel=!0,f.note){const F={labelStyle:"",shape:NZe,labelText:f.note.text,classes:jZe,style:"",id:b+HZe+"-"+L8,domId:i2t(b,L8,uHt),type:_.type,padding:15},R={labelStyle:"",shape:PZe,labelText:f.note.text,classes:_.classes,style:"",id:b+lHt,domId:i2t(b,L8,cHt),type:"group",padding:0};L8++;const B=b+lHt;i.setNode(B,R),i.setNode(F.id,F),i.setNode(b,M),i.setParent(b,B),i.setParent(F.id,B);let z=b,Y=F.id;f.note.position==="left of"&&(z=F.id,Y=b),i.setEdge(z,Y,{arrowhead:"none",arrowType:"",style:hHt,labelStyle:"",classes:RZe,arrowheadStyle:fHt,labelpos:dHt,labelType:gHt,thickness:pHt})}else i.setNode(b,M)}a&&a.id!=="root"&&(Kt.trace("Setting node ",b," to be child of its parent ",a.id),i.setParent(b,a.id)),f.doc&&(Kt.trace("Adding nodes children "),KZe(i,f,f.doc,g,w,!v))},KZe=(i,a,f,g,w,v)=>{Kt.trace("items",f),f.forEach(b=>{switch(b.stmt){case EX:TB(i,a,b,g,w,v);break;case yB:TB(i,a,b,g,w,v);break;case Wbt:{TB(i,a,b.state1,g,w,v),TB(i,a,b.state2,g,w,v);const E={id:"edge"+L8,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:hHt,labelStyle:"",label:ei.sanitizeText(b.description,Re()),arrowheadStyle:fHt,labelpos:dHt,labelType:gHt,thickness:pHt,classes:oHt};i.setEdge(b.state1.id,b.state2.id,E,L8),L8++}break}})},s2t=(i,a=VJe)=>{let f=a;if(i.doc)for(let g=0;g<i.doc.length;g++){const w=i.doc[g];w.stmt==="dir"&&(f=w.value)}return f},WZe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:qqt,db:Hx,renderer:{setConf:VZe,getClasses:UZe,draw:async function(i,a,f,g){Kt.info("Drawing state diagram (v2)",a),LX={},g.db.getDirection();cons
[all...]
/plugin/combo/ComboStrap/
H A DBootstrap.php422 $direction = Lang::createFromRequestedMarkup()->getDirection();
424 $direction = Site::getLangObject()->getDirection();
H A DLang.php227 public function getDirection() function in ComboStrap\\Lang
/plugin/edittable/lib/
H A Dhandsontable.full.js18531 value: function getDirection() {
46886 direction: selectedRange.getDirection()
46899 direction: selectedRange.getDirection()
46956 rangeDirection = selectedRange.getDirection();
/plugin/ckgedit/ckeditor/
H A Dckeditor.js.unc2890 getDirection: function(a) {
2891 …this.getComputedStyle("direction") || this.getDirection() || this.getParent() && this.getParent().
13188 …if (e && (e = this.getDirection(1), g = a.apply(this, arguments), e != this.getDirection(1))) retu…
13230 dir: b.data.getDirection(1)
16552 g = b.element ? b.element.getDirection(1) : "ltr";
16799 k = c.getDirection(1),
16802 r = d.getDirection(1) != k;
20140 q = r.element.getDirection(1);
20152 var d = g.getDirection(1) != q,
20162 d && !w.getDirection() &&
[all …]
H A Dckeditor.js131 …t()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||…
390 ….disableNativeSpellChecker);var h=a.config.contentsLangDirection;this.getDirection(1)!=h&&this.cha…
520 …td()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};
659 …TE_ON:CKEDITOR.TRISTATE_OFF));b=(d.block||d.blockLimit||a.editable()).getDirection(1);b!=(a._.selD…
662 …ak a}e=e.getParent()}e=!0}e=!e}if(e&&(e=this.getDirection(1),g=a.apply(this,arguments),e!=this.get…
854 …n();var m=l.createBookmarks(),t=c.getDirection(1),k=c.getAttribute("class"),q=c.getAttribute("styl…
1011getDirection()&&(k=1);c=c.getDirection(a);null!==h&&(h=h&&h!=c?null:c);break}c=p}if(!(1>g.length))…
1014 …F(a,l,d,f){for(var e,g;e=a[f?"getLast":"getFirst"](O);)(g=e.getDirection(1))!==l.getDirection(1)&&…
1020getDirection(1);if(q.indent==p){k&&a[c].parent.getName()==k.getName()||(k=a[c].parent.clone(!1,1),…
1021 …element.clone(!1,!0),n!=g.getDirection(1)&&m.setAttribute("dir",n)):m=new CKEDITOR.dom.documentFra…
[all …]
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Datastore/
H A DGoogleDatastoreAdminV1IndexedProperty.php41 public function getDirection() function in Google\\Service\\Datastore\\GoogleDatastoreAdminV1IndexedProperty
H A DPropertyOrder.php39 public function getDirection() function in Google\\Service\\Datastore\\PropertyOrder
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Compute/
H A DFirewall.php174 public function getDirection() function in Google\\Service\\Compute\\Firewall
H A DPacketMirroringFilter.php77 public function getDirection() function in Google\\Service\\Compute\\PacketMirroringFilter
H A DFirewallPolicyRule.php110 public function getDirection() function in Google\\Service\\Compute\\FirewallPolicyRule
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Slides/
H A DParagraphStyle.php73 public function getDirection() function in Google\\Service\\Slides\\ParagraphStyle
/plugin/authgooglesheets/vendor/google/apiclient-services/src/NetworkManagement/
H A DFirewallInfo.php88 public function getDirection() function in Google\\Service\\NetworkManagement\\FirewallInfo
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Firestore/
H A DOrder.php39 public function getDirection() function in Google\\Service\\Firestore\\Order
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Docs/
H A DParagraphStyle.php192 public function getDirection() function in Google\\Service\\Docs\\ParagraphStyle
/plugin/bpmnioeditor/vendor/bpmnio-js/
H A Dbpmn-modeler.development.js23283 input.offsetDirection = getDirection(input.deltaX, input.deltaY);
23346 direction = getDirection(deltaX, deltaY);
23439 function getDirection(x, y) { function
47106 function getDirection(axis, delta) {
47423 var direction = getDirection(axis, delta);
/plugin/diagramsnet/lib/js/diagramly/vsdx/
H A Dimporter.js10920 var direction = this.getDirection(form);
11546 VsdxShape.prototype.getDirection = function (form) {
/plugin/diagramsnet/lib/js/grapheditor/
H A DGraph.js5126 this.click(this.currentState, this.getDirection(), me);
5256 HoverIcons.prototype.getDirection = function() method in HoverIcons
5352 var direction = this.getDirection();
/plugin/diagramsnet/lib/js/
H A Dviewer-static.min.js2455 …ve()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),k):this.isAct…
2460 HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==thi…
2463 mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),c.cell.style=mxUtils.…
H A Dviewer.min.js2455 …ve()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),k):this.isAct…
2460 HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==thi…
2463 mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),c.cell.style=mxUtils.…
H A Dextensions.min.js1511 …0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=this.getDirection(a);a!==mxConsta…
1530 …uals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=m… method in b
H A Dapp.min.js2704 …ve()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),e):this.isAct…
2709 HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==thi…
2712 mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.…
/plugin/dirtylittlehelper/mermaid/editor/docs/
H A Dbundle.js.map1getDirection, getVertices, getEdges, getClasses, clear, setGen, defaultStyle, addSubGraph, getDept…
H A Deditor.worker.js1getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartCol…
H A Deditor.worker.js.map1getDirection() {\n if (this.selectionStartLineNumber === this.startLineNumber && this.selec…

12