LucidImporter={};
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[u])u=F[u];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var C=0;C
"),null,null,Math.abs(r-.125*q)):{width:0,height:0};wa?(ja=new mxCell("",new mxGeometry(r-.125*q,0,.125*q,q),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;")):(ja=new mxCell("",
new mxGeometry(0,0,.125*q,q),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*q-Aa.height,Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);ja.vertex=!0;v.insert(ja);ja.style+=c(ja.style,e,t,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=c(na.style,e,t,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
"MainText",Ba=null,Pa="HeaderFill_",Ca="BodyFill_",ua=25,Na=25,Ka=0;if(null!=e.Lanes)Ka=e.Lanes.length;else if(null!=e.PrimaryLane){var La=function(gb){if(gb)32>gb?gb=32:208
").replace(new RegExp(h.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"
");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0
"),x=this.getPPList(this.pp),n=k=null!=x,d+=k?x:""):function(A,E){return A&&A.equals?A.equals(E):A===E}(x.nodeName,"fld")?(this.fld=this.getIndex(x),x=null,null!=this.fields&&(x=function(A,E){return A[E]?A[E]:null}(this.fields,this.fld)),null==x&&null!=this.masterShape&&null!=this.masterShape.fields&&(x=function(A, E){return A[E]?A[E]:null}(this.masterShape.fields,this.fld)),null!=x&&(d+=c.call(this,x))):function(A,E){return A&&A.equals?A.equals(E):A===E}(x.nodeName,"#text")&&(x=x.textContent,d+=c.call(this,x))}k&&(d+="");return h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"
"),"div","font-size: 1px")};b.prototype.isConnectorBigNameU=function(a){return function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree single")||function(c,d,f){void 0===f&&(f=0);return c.substr(f, d.length)===d}(a,"45 degree single")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree tail")||function(c,d,f){void 0=== f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Fancy arrow")}; b.prototype.isVertex=function(){return this.vertex};b.prototype.getOriginPoint=function(a,c){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(x-k);return!c||k===x/2&&n===p/2||0===this.rotation?new mxPoint(d,a):(c=p/2-n,k-= x/2,x=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+c-(c*x-k*n),c*n+k*x+a-k))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1< "),t.result!==null&&b.kind!==t.kind&&Qt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+b.kind+'", not "'+t.kind+'"'),b.resolve(t.result,t.tag)?(t.result=b.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Qt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}function h7(t){var e=t.position,r,n,i,s=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(tr(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(s=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!Pr(a);)a=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Qt(t,"directive name must not be less than one character in length");a!==0;){for(;fs(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!Vn(a));break}if(Vn(a))break;for(r=t.position;a!==0&&!Pr(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}a!==0&&c1(t),Pi.call(Tp,n)?Tp[n](t,n,i):dc(t,'unknown document directive "'+n+'"')}if(tr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,tr(t,!0,-1)):s&&Qt(t,"directives end mark is expected"),sa(t,t.lineIndent-1,hc,!1,!0),tr(t,!0,-1),t.checkLineBreaks&&Xw.test(t.input.slice(e,t.position))&&dc(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&fc(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,tr(t,!0,-1));return}if(t.position>>0,S=0;S<_;S++)if(S in y&&h.call(this,y[S],S,y))return!0;return!1},E=n.momentProperties=[],I=!1;function V(h,y){var _,S,O,it=E.length;if(l(y._isAMomentObject)||(h._isAMomentObject=y._isAMomentObject),l(y._i)||(h._i=y._i),l(y._f)||(h._f=y._f),l(y._l)||(h._l=y._l),l(y._strict)||(h._strict=y._strict),l(y._tzm)||(h._tzm=y._tzm),l(y._isUTC)||(h._isUTC=y._isUTC),l(y._offset)||(h._offset=y._offset),l(y._pf)||(h._pf=b(y)),l(y._locale)||(h._locale=y._locale),0this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},C.isLocal=function(){return!!this.isValid()&&!this._isUTC},C.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},C.isUtc=cb,C.isUTC=cb,C.zoneAbbr=function(){return this._isUTC?"UTC":""},C.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},C.dates=W("dates accessor is deprecated. Use date instead.",ts),C.months=W("months accessor is deprecated. Use month instead",se),C.years=W("years accessor is deprecated. Use year instead",Ku),C.zone=W("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(h,y){return h!=null?(this.utcOffset(h=typeof h!="string"?-h:h,y),this):-this.utcOffset()}),C.isDSTShifted=W("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var h,y={};return V(y,this),(y=qu(y))._a?(h=(y._isUTC?g:Se)(y._a),this._isDSTShifted=this.isValid()&&0e&&--u,a=new Array(s=u-l+1);++i=0?(s>=eh?10:s>=rh?5:s>=nh?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(s>=eh?10:s>=rh?5:s>=nh?2:1)}function ih(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),s=n/i;return s>=eh?i*=10:s>=rh?i*=5:s>=nh&&(i*=2),ex||x>57){D=(x===46?i+w.slice(m+1):w.slice(m))+D,w=w.slice(0,m);break}}}E&&!T&&(w=e(w,1/0));var Dt=v.length+w.length+D.length,kt=Dt
=a)for(;t(a),!s(a);)a.setTime(a-1)},function(a,o){if(a>=a)if(o<0)for(;++o<=0;)for(;e(a,-1),!s(a););else for(;--o>=0;)for(;e(a,1),!s(a););})},r&&(i.count=function(s,a){return Oh.setTime(+s),Fh.setTime(+a),t(Oh),t(Fh),Math.floor(r(Oh,Fh))},i.every=function(s){return s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(n?function(a){return n(a)%s===0}:function(a){return i.count(0,a)%s===0}):i}),i}var Ol=dr(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});Ol.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?dr(function(e){e.setTime(Math.floor(e/t)*t)},function(e,r){e.setTime(+e+r*t)},function(e,r){return(r-e)/t}):Ol};const $6=Ol;Ol.range;const si=1e3,Jr=si*60,ai=Jr*60,os=ai*24,Ph=os*7,i2=os*30,Yh=os*365;var s2=dr(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*si)},function(t,e){return(e-t)/si},function(t){return t.getUTCSeconds()});const Ja=s2;s2.range;var a2=dr(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*si)},function(t,e){t.setTime(+t+e*Jr)},function(t,e){return(e-t)/Jr},function(t){return t.getMinutes()});const Fl=a2;a2.range;var o2=dr(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*si-t.getMinutes()*Jr)},function(t,e){t.setTime(+t+e*ai)},function(t,e){return(e-t)/ai},function(t){return t.getHours()});const Pl=o2;o2.range;var l2=dr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Jr)/os,t=>t.getDate()-1);const qs=l2;l2.range;function ls(t){return dr(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(e,r){e.setDate(e.getDate()+r*7)},function(e,r){return(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Jr)/Ph})}var js=ls(0),Yl=ls(1),X6=ls(2),K6=ls(3),$s=ls(4),Z6=ls(5),Q6=ls(6);js.range,Yl.range,X6.range,K6.range,$s.range,Z6.range,Q6.range;var c2=dr(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()});const Vl=c2;c2.range;var Vh=dr(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Vh.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:dr(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,r){e.setFullYear(e.getFullYear()+r*t)})};const cs=Vh;Vh.range;var u2=dr(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*Jr)},function(t,e){return(e-t)/Jr},function(t){return t.getUTCMinutes()});const J6=u2;u2.range;var h2=dr(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*ai)},function(t,e){return(e-t)/ai},function(t){return t.getUTCHours()});const tv=h2;h2.range;var d2=dr(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/os},function(t){return t.getUTCDate()-1});const Uh=d2;d2.range;function us(t){return dr(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(e,r){e.setUTCDate(e.getUTCDate()+r*7)},function(e,r){return(r-e)/Ph})}var zh=us(0),Ul=us(1),ev=us(2),rv=us(3),Xs=us(4),nv=us(5),iv=us(6);zh.range,Ul.range,ev.range,rv.range,Xs.range,nv.range,iv.range;var f2=dr(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()});const sv=f2;f2.range;var Wh=dr(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Wh.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:dr(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})};const Ks=Wh;Wh.range;function p2(t,e,r,n,i,s){const a=[[Ja,1,si],[Ja,5,5*si],[Ja,15,15*si],[Ja,30,30*si],[s,1,Jr],[s,5,5*Jr],[s,15,15*Jr],[s,30,30*Jr],[i,1,ai],[i,3,3*ai],[i,6,6*ai],[i,12,12*ai],[n,1,os],[n,2,2*os],[r,1,Ph],[e,1,i2],[e,3,3*i2],[t,1,Yh]];function o(u,d,f){const p=dT).right(a,p);if(g===a.length)return t.every(ih(u/Yh,d/Yh,f));if(g===0)return $6.every(Math.max(ih(u,d,f),1));const[b,k]=a[p/a[g-1][2]53)return null;"w"in R||(R.w=1),"Z"in R?(J=Gh(to(R.y,0,1)),C=J.getUTCDay(),J=C>4||C===0?Ul.ceil(J):Ul(J),J=Uh.offset(J,(R.V-1)*7),R.y=J.getUTCFullYear(),R.m=J.getUTCMonth(),R.d=J.getUTCDate()+(R.w+6)%7):(J=Hh(to(R.y,0,1)),C=J.getDay(),J=C>4||C===0?Yl.ceil(J):Yl(J),J=qs.offset(J,(R.V-1)*7),R.y=J.getFullYear(),R.m=J.getMonth(),R.d=J.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),C="Z"in R?Gh(to(R.y,0,1)).getUTCDay():Hh(to(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(C+5)%7:R.w+R.U*7-(C+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Gh(R)):Hh(R)}}function W(z,X,F,R){for(var A=0,J=X.length,C=F.length,ht,U;A
/gi,u8=t=>ec.test(t),h8=t=>t.split(ec),d8=t=>t.replace(/#br#/g,"
"),ep=t=>t.replace(ec,"#br#"),f8=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},pr=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Ri=function(t){let e=t;return t.includes("~")?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),Ri(e)):e},he={getRows:l8,sanitizeText:yn,sanitizeTextOrArray:c8,hasBreaks:u8,splitBreaks:h8,lineBreakRegex:ec,removeScript:J2,getUrl:f8,evaluate:pr},rc={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,s=2*r-i;switch(n){case"r":return rc.hue2rgb(s,i,t+1/3)*255;case"g":return rc.hue2rgb(s,i,t)*255;case"b":return rc.hue2rgb(s,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),s=Math.min(t,e,r),a=(i+s)/2;if(n==="l")return a*100;if(i===s)return 0;const o=i-s,l=a>.5?o/(2-i-s):o/(i+s);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[n];return i=s%3,i===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):i===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):i===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function Mw(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var Nw=new Tr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Aw,construct:Lw,predicate:Mw,represent:Dw}),Bw=Object.prototype.hasOwnProperty,Iw=Object.prototype.toString;function Rw(t){if(t===null)return!0;var e=[],r,n,i,s,a,o=t;for(r=0,n=o.length;r{if(pc[t])throw new Error(`Detector with key ${t} already exists`);pc[t]={detector:e,loader:r},B.debug(`Detector with key ${t} added${r?" with loader":""}`)},k7=t=>pc[t].loader,d1=function(t,e,r){const{depth:n,clobber:i}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(s=>d1(t,s,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(s=>{t.includes(s)||t.push(s)}),t):t===void 0||n<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(s=>{typeof e[s]=="object"&&(t[s]===void 0||typeof t[s]=="object")?(t[s]===void 0&&(t[s]=Array.isArray(e[s])?[]:{}),t[s]=d1(t[s],e[s],{depth:n-1,clobber:i})):(i||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},gr=d1;var w7=typeof global=="object"&&global&&global.Object===Object&&global;const Dp=w7;var T7=typeof self=="object"&&self&&self.Object===Object&&self,E7=Dp||T7||Function("return this")();const mn=E7;var C7=mn.Symbol;const en=C7;var Mp=Object.prototype,S7=Mp.hasOwnProperty,A7=Mp.toString,co=en?en.toStringTag:void 0;function L7(t){var e=S7.call(t,co),r=t[co];try{t[co]=void 0;var n=!0}catch{}var i=A7.call(t);return n&&(e?t[co]=r:delete t[co]),i}var D7=Object.prototype,M7=D7.toString;function N7(t){return M7.call(t)}var B7="[object Null]",I7="[object Undefined]",Np=en?en.toStringTag:void 0;function ps(t){return t==null?t===void 0?I7:B7:Np&&Np in Object(t)?L7(t):N7(t)}function Gr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var R7="[object AsyncFunction]",O7="[object Function]",F7="[object GeneratorFunction]",P7="[object Proxy]";function aa(t){if(!Gr(t))return!1;var e=ps(t);return e==O7||e==F7||e==R7||e==P7}var Y7=mn["__core-js_shared__"];const f1=Y7;var Bp=function(){var t=/[^.]+$/.exec(f1&&f1.keys&&f1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function V7(t){return!!Bp&&Bp in t}var U7=Function.prototype,z7=U7.toString;function gs(t){if(t!=null){try{return z7.call(t)}catch{}try{return t+""}catch{}}return""}var W7=/[\\^$.*+?()[\]{}|]/g,H7=/^\[object .+?Constructor\]$/,G7=Function.prototype,q7=Object.prototype,j7=G7.toString,$7=q7.hasOwnProperty,X7=RegExp("^"+j7.call($7).replace(W7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function K7(t){if(!Gr(t)||V7(t))return!1;var e=aa(t)?X7:H7;return e.test(gs(t))}function Z7(t,e){return t==null?void 0:t[e]}function ys(t,e){var r=Z7(t,e);return K7(r)?r:void 0}var Q7=ys(Object,"create");const uo=Q7;function J7(){this.__data__=uo?uo(null):{},this.size=0}function tT(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var eT="__lodash_hash_undefined__",rT=Object.prototype,nT=rT.hasOwnProperty;function iT(t){var e=this.__data__;if(uo){var r=e[t];return r===eT?void 0:r}return nT.call(e,t)?e[t]:void 0}var sT=Object.prototype,aT=sT.hasOwnProperty;function oT(t){var e=this.__data__;return uo?e[t]!==void 0:aT.call(e,t)}var lT="__lodash_hash_undefined__";function cT(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=uo&&e===void 0?lT:e,this}function ms(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e=1&&(a={x:d.x,y:d.y}),p>0&&p<1&&(a={x:(1-p)*n.x+p*d.x,y:(1-p)*n.y+p*d.y})}}n=d});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),u={x:0,y:0};return u.x=Math.sin(l)*o+(e[0].x+a.x)/2,u.y=-Math.cos(l)*o+(e[0].y+a.y)/2,u};function IT(t,e,r){let n=JSON.parse(JSON.stringify(r)),i;B.info("our points",n),e!=="start_left"&&e!=="start_right"&&(n=n.reverse()),n.forEach(f=>{i=f});let a=25+t,o;i=void 0,n.forEach(f=>{if(i&&!o){const p=mc(f,i);if(p=1&&(o={x:f.x,y:f.y}),g>0&&g<1&&(o={x:(1-g)*i.x+g*f.x,y:(1-g)*i.y+g*f.y})}}i=f});const l=10+t*.5,u=Math.atan2(n[0].y-o.y,n[0].x-o.x),d={x:0,y:0};return d.x=Math.sin(u)*l+(n[0].x+o.x)/2,d.y=-Math.cos(u)*l+(n[0].y+o.y)/2,e==="start_left"&&(d.x=Math.sin(u+Math.PI)*l+(n[0].x+o.x)/2,d.y=-Math.cos(u+Math.PI)*l+(n[0].y+o.y)/2),e==="end_right"&&(d.x=Math.sin(u-Math.PI)*l+(n[0].x+o.x)/2-5,d.y=-Math.cos(u-Math.PI)*l+(n[0].y+o.y)/2-5),e==="end_left"&&(d.x=Math.sin(u)*l+(n[0].x+o.x)/2-5,d.y=-Math.cos(u)*l+(n[0].y+o.y)/2-5),d}function Vi(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}let Rp=0;const Op=()=>(Rp++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rp);function RT(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i
"},r),he.lineBreakRegex.test(t)))return t;const n=t.split(" "),i=[];let s="";return n.forEach((a,o)=>{const l=Un(`${a} `,r),u=Un(s,r);if(l>e){const{hyphenatedStrings:p,remainingWord:g}=PT(a,e,"-",r);i.push(s,...p),s=g}else u+l>=e?(i.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===n.length&&i.push(s)}),i.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),PT=la((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],s=[];let a="";return i.forEach((o,l)=>{const u=`${a}${o}`;if(Un(u,n)>=e){const f=l+1,p=i.length===f,g=`${u}${r}`;s.push(p?u:g),a=""}else a=u}),{hyphenatedStrings:s,remainingWord:a}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function g1(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),y1(t,e).height}function Un(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),y1(t,e).width}const y1=la((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:n,fontWeight:i}=e;if(!t)return{width:0,height:0};const s=["sans-serif",n],a=t.split(he.lineBreakRegex),o=[],l=St("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const u=l.append("svg");for(const f of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const b of a){const k=OT();k.text=b;const T=FT(u,k).style("font-size",r).style("font-weight",i).style("font-family",f),L=(T._groups||T)[0][0].getBBox();g.width=Math.round(Math.max(g.width,L.width)),p=Math.round(L.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}o.push(g)}u.remove();const d=isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHeight)||o[0].height>o[1].height&&o[0].width>o[1].width&&o[0].lineHeight>o[1].lineHeight?0:1;return o[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),YT=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let bc;const VT=function(t){return bc=bc||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),bc.innerHTML=t,unescape(bc.textContent)},bs=t=>{if(B.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>bs(e)):Object.keys(t).forEach(e=>{B.debug("Checking key",e),e.startsWith("__")&&(B.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(B.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(B.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(B.debug("sanitizing themeCss option"),t[e]=_c(t[e])),e.includes("fontFamily")&&(B.debug("sanitizing fontFamily option"),t[e]=_c(t[e])),e.includes("altFontFamily")&&(B.debug("sanitizing altFontFamily option"),t[e]=_c(t[e])),A8.includes(e)?typeof t[e]=="object"&&(B.debug("sanitize deleting object",e),bs(t[e])):(B.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const r of e){const n=t.themeVariables[r];n&&n.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}B.debug("After sanitization",t)},_c=t=>{let e=0,r=0;for(const n of t){if(e
/gi):Array.isArray(t)?r=t:r=[];for(const n of r){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i)}return e},mg=(t,e,r)=>{const n=mo().gitGraph,i=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((u,d)=>e[u].seq-e[d].seq).forEach(u=>{const d=e[u],f=Ir[d.branch].pos,p=a+10;if(r){let g,b=d.customType!==void 0&&d.customType!==""?d.customType:d.type;switch(b){case qr.NORMAL:g="commit-normal";break;case qr.REVERSE:g="commit-reverse";break;case qr.HIGHLIGHT:g="commit-highlight";break;case qr.MERGE:g="commit-merge";break;case qr.CHERRY_PICK:g="commit-cherry-pick";break;default:g="commit-normal"}if(b===qr.HIGHLIGHT){const k=i.append("rect");k.attr("x",p-10),k.attr("y",f-10),k.attr("height",20),k.attr("width",20),k.attr("class",`commit ${d.id} commit-highlight${Ir[d.branch].index%vs} ${g}-outer`),i.append("rect").attr("x",p-6).attr("y",f-6).attr("height",12).attr("width",12).attr("class",`commit ${d.id} commit${Ir[d.branch].index%vs} ${g}-inner`)}else if(b===qr.CHERRY_PICK)i.append("circle").attr("cx",p).attr("cy",f).attr("r",10).attr("class",`commit ${d.id} ${g}`),i.append("circle").attr("cx",p-3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),i.append("circle").attr("cx",p+3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),i.append("line").attr("x1",p+3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`),i.append("line").attr("x1",p-3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`);else{const k=i.append("circle");if(k.attr("cx",p),k.attr("cy",f),k.attr("r",d.type===qr.MERGE?9:10),k.attr("class",`commit ${d.id} commit${Ir[d.branch].index%vs}`),b===qr.MERGE){const T=i.append("circle");T.attr("cx",p),T.attr("cy",f),T.attr("r",6),T.attr("class",`commit ${g} ${d.id} commit${Ir[d.branch].index%vs}`)}b===qr.REVERSE&&i.append("path").attr("d",`M ${p-5},${f-5}L${p+5},${f+5}M${p-5},${f+5}L${p+5},${f-5}`).attr("class",`commit ${g} ${d.id} commit${Ir[d.branch].index%vs}`)}}if(xo[d.id]={x:a+10,y:f},r){if(d.type!==qr.CHERRY_PICK&&(d.customId&&d.type===qr.MERGE||d.type!==qr.MERGE)&&n.showCommitLabel){const k=s.append("g"),T=k.insert("rect").attr("class","commit-label-bkg"),L=k.append("text").attr("x",a).attr("y",f+25).attr("class","commit-label").text(d.id);let E=L.node().getBBox();if(T.attr("x",a+10-E.width/2-2).attr("y",f+13.5).attr("width",E.width+2*2).attr("height",E.height+2*2),L.attr("x",a+10-E.width/2),n.rotateCommitLabel){let I=-7.5-(E.width+10)/25*9.5,V=10+E.width/25*8.5;k.attr("transform","translate("+I+", "+V+") rotate("+-45+", "+a+", "+f+")")}}if(d.tag){const k=s.insert("polygon"),T=s.append("circle"),L=s.append("text").attr("y",f-16).attr("class","tag-label").text(d.tag);let E=L.node().getBBox();L.attr("x",a+10-E.width/2);const I=E.height/2,V=f-19.2;k.attr("class","tag-label-bkg").attr("points",`
${a-E.width/2-4/2},${V+2}
${a-E.width/2-4/2},${V-2}
${a+10-E.width/2-4},${V-I-2}
${a+10+E.width/2+4},${V-I-2}
${a+10+E.width/2+4},${V+I+2}
${a+10-E.width/2-4},${V+I+2}`),T.attr("cx",a-E.width/2+4/2).attr("cy",V).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Oc&&(Oc=a)})},PE=(t,e,r)=>Object.keys(r).filter(s=>r[s].branch===e.branch&&r[s].seq>t.seq&&r[s].seqs&&(p=new sn(a,n)),r>i&&n=d?p=new sn(r,o+d*t.width/2):p=new sn(a-l/u*t.height/2,n+t.height):r=d?p=new sn(r+t.width,o+d*t.width/2):p=new sn(a+l/u*t.height/2,n+t.height):rs?f>=d?p=new sn(r+t.width,o-d*t.width/2):p=new sn(a+t.height/2*l/u,n):r>i&&n>s&&(f>=d?p=new sn(r,o-t.width/2*d):p=new sn(a-t.height/2*l/u,n)),p},LC=function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=Sg(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=Sg(e,r);return{startPoint:n,endPoint:i}};const DC=function(t,e,r,n){let i=0;for(let s of e){i=i+1;let a=s.wrap&&Zt.wrap,o=AC(Zt);n.db.getC4Type()==="C4Dynamic"&&(s.label.text=i+": "+s.label.text);let u=Un(s.label.text,o);Sn("label",s,a,o,u),s.techn&&s.techn.text!==""&&(u=Un(s.techn.text,o),Sn("techn",s,a,o,u)),s.descr&&s.descr.text!==""&&(u=Un(s.descr.text,o),Sn("descr",s,a,o,u));let d=r(s.from),f=r(s.to),p=LC(d,f);s.startPoint=p.startPoint,s.endPoint=p.endPoint}Wn.drawRels(t,e,Zt)};function Ag(t,e,r,n,i){let s=new Tg(i);s.data.widthLimit=r.data.widthLimit/Math.min(R1,n.length);for(let[a,o]of n.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Zt.wrap,d=zc(Zt);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",Sn("label",o,u,d,s.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let b=zc(Zt);Sn("type",o,u,b,s.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let b=zc(Zt);b.fontSize=b.fontSize-2,Sn("descr",o,u,b,s.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%R1===0){let b=r.data.startx+Zt.diagramMarginX,k=r.data.stopy+Zt.diagramMarginY+l;s.setData(b,b,k,k)}else{let b=s.data.stopx!==s.data.startx?s.data.stopx+Zt.diagramMarginX:s.data.startx,k=s.data.starty;s.setData(b,b,k,k)}s.name=o.alias;let f=i.db.getC4ShapeArray(o.alias),p=i.db.getC4ShapeKeys(o.alias);p.length>0&&Cg(s,t,f,p),e=o.alias;let g=i.db.getBoundarys(e);g.length>0&&Ag(t,e,s,g,i),o.alias!=="global"&&Eg(t,o,s),r.data.stopy=Math.max(s.data.stopy+Zt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+Zt.c4ShapeMargin,r.data.stopx),Vc=Math.max(Vc,r.data.stopx),Uc=Math.max(Uc,r.data.stopy)}}const Lg={drawPersonOrSystemArray:Cg,drawBoundary:Eg,setConf:O1,draw:function(t,e,r,n){Zt=$().c4;const i=$().securityLevel;let s;i==="sandbox"&&(s=St("#i"+e));const a=St(i==="sandbox"?s.nodes()[0].contentDocument.body:"body");let o=n.db;n.db.setWrap(Zt.wrap),wg=o.getC4ShapeInRow(),R1=o.getC4BoundaryInRow(),B.debug(`C:${JSON.stringify(Zt,null,2)}`);const l=i==="sandbox"?a.select(`[id="${e}"]`):St(`[id="${e}"]`);Wn.insertComputerIcon(l),Wn.insertDatabaseIcon(l),Wn.insertClockIcon(l);let u=new Tg(n);u.setData(Zt.diagramMarginX,Zt.diagramMarginX,Zt.diagramMarginY,Zt.diagramMarginY),u.data.widthLimit=screen.availWidth,Vc=Zt.diagramMarginX,Uc=Zt.diagramMarginY;const d=n.db.getTitle();let f=n.db.getBoundarys("");Ag(l,"",u,f,n),Wn.insertArrowHead(l),Wn.insertArrowEnd(l),Wn.insertArrowCrossHead(l),Wn.insertArrowFilledHead(l),DC(l,n.db.getRels(),n.db.getC4Shape,n),u.data.stopx=Vc,u.data.stopy=Uc;const p=u.data;let b=p.stopy-p.starty+2*Zt.diagramMarginY;const T=p.stopx-p.startx+2*Zt.diagramMarginX;d&&l.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*Zt.diagramMarginX).attr("y",p.starty+Zt.diagramMarginY),xn(l,b,T,Zt.useMaxWidth);const L=d?60:0;l.attr("viewBox",p.startx-Zt.diagramMarginX+" -"+(Zt.diagramMarginY+L)+" "+T+" "+(b+L)),B.debug("models:",p)}};var F1=function(){var t=function(F,R,A,J){for(A=A||{},J=F.length;J--;A[F[J]]=R);return A},e=[1,3],r=[1,7],n=[1,8],i=[1,9],s=[1,10],a=[1,13],o=[1,12],l=[1,16,25],u=[1,20],d=[1,32],f=[1,33],p=[1,34],g=[1,36],b=[1,39],k=[1,37],T=[1,38],L=[1,44],E=[1,45],I=[1,40],V=[1,41],H=[1,42],G=[1,43],Y=[1,48],W=[1,49],N=[1,50],M=[1,51],w=[16,25],v=[1,65],D=[1,66],m=[1,67],Q=[1,68],x=[1,69],ct=[1,70],Dt=[1,71],kt=[1,80],j=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],ot=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],rt=[5,8,9,10,11,16,19,23,25],nt=[54,88,89,90,91],ut=[54,65,66,88,89,90,91],_t=[54,60,61,62,63,64,88,89,90,91],K=[16,25,32],Rt=[1,107],P={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(R,A,J,C,ht,U,Yt){var et=U.length-1;switch(ht){case 5:C.setDirection("TB");break;case 6:C.setDirection("BT");break;case 7:C.setDirection("RL");break;case 8:C.setDirection("LR");break;case 12:C.parseDirective("%%{","open_directive");break;case 13:C.parseDirective(U[et],"type_directive");break;case 14:U[et]=U[et].trim().replace(/'/g,'"'),C.parseDirective(U[et],"arg_directive");break;case 15:C.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=U[et];break;case 22:this.$=U[et-1]+U[et];break;case 23:case 24:this.$=U[et-1]+"~"+U[et];break;case 25:C.addRelation(U[et]);break;case 26:U[et-1].title=C.cleanupLabel(U[et]),C.addRelation(U[et-1]);break;case 35:this.$=U[et].trim(),C.setAccTitle(this.$);break;case 36:case 37:this.$=U[et].trim(),C.setAccDescription(this.$);break;case 38:C.addClass(U[et]);break;case 39:C.addClass(U[et-2]),C.setCssClass(U[et-2],U[et]);break;case 40:C.addClass(U[et-3]),C.addMembers(U[et-3],U[et-1]);break;case 41:C.addClass(U[et-5]),C.setCssClass(U[et-5],U[et-3]),C.addMembers(U[et-5],U[et-1]);break;case 42:C.addAnnotation(U[et],U[et-2]);break;case 43:this.$=[U[et]];break;case 44:U[et].push(U[et-1]),this.$=U[et];break;case 45:break;case 46:C.addMember(U[et-1],C.cleanupLabel(U[et]));break;case 47:break;case 48:break;case 49:this.$={id1:U[et-2],id2:U[et],relation:U[et-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:U[et-3],id2:U[et],relation:U[et-1],relationTitle1:U[et-2],relationTitle2:"none"};break;case 51:this.$={id1:U[et-3],id2:U[et],relation:U[et-2],relationTitle1:"none",relationTitle2:U[et-1]};break;case 52:this.$={id1:U[et-4],id2:U[et],relation:U[et-2],relationTitle1:U[et-3],relationTitle2:U[et-1]};break;case 53:C.addNote(U[et],U[et-1]);break;case 54:C.addNote(U[et]);break;case 55:this.$={type1:U[et-2],type2:U[et],lineType:U[et-1]};break;case 56:this.$={type1:"none",type2:U[et],lineType:U[et-1]};break;case 57:this.$={type1:U[et-1],type2:"none",lineType:U[et]};break;case 58:this.$={type1:"none",type2:"none",lineType:U[et]};break;case 59:this.$=C.relationType.AGGREGATION;break;case 60:this.$=C.relationType.EXTENSION;break;case 61:this.$=C.relationType.COMPOSITION;break;case 62:this.$=C.relationType.DEPENDENCY;break;case 63:this.$=C.relationType.LOLLIPOP;break;case 64:this.$=C.lineType.LINE;break;case 65:this.$=C.lineType.DOTTED_LINE;break;case 66:case 72:this.$=U[et-2],C.setClickEvent(U[et-1],U[et]);break;case 67:case 73:this.$=U[et-3],C.setClickEvent(U[et-2],U[et-1]),C.setTooltip(U[et-2],U[et]);break;case 68:case 76:this.$=U[et-2],C.setLink(U[et-1],U[et]);break;case 69:this.$=U[et-3],C.setLink(U[et-2],U[et-1],U[et]);break;case 70:case 78:this.$=U[et-3],C.setLink(U[et-2],U[et-1]),C.setTooltip(U[et-2],U[et]);break;case 71:case 79:this.$=U[et-4],C.setLink(U[et-3],U[et-2],U[et]),C.setTooltip(U[et-3],U[et-1]);break;case 74:this.$=U[et-3],C.setClickEvent(U[et-2],U[et-1],U[et]);break;case 75:this.$=U[et-4],C.setClickEvent(U[et-3],U[et-2],U[et-1]),C.setTooltip(U[et-3],U[et]);break;case 77:this.$=U[et-3],C.setLink(U[et-2],U[et-1],U[et]);break;case 80:C.setCssClass(U[et-1],U[et]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:r,9:n,10:i,11:s,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:r,9:n,10:i,11:s,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},t([17,22],[2,13]),{6:31,7:30,8:r,9:n,10:i,11:s,13:11,19:a,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:d,41:f,43:p,44:g,49:b,51:k,52:T,55:L,57:E,67:I,68:V,70:H,74:G,88:Y,89:W,90:N,91:M},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(w,[2,25],{32:[1,57]}),t(w,[2,27]),t(w,[2,28]),t(w,[2,29]),t(w,[2,30]),t(w,[2,31]),t(w,[2,32]),t(w,[2,33]),t(w,[2,34]),{40:[1,58]},{42:[1,59]},t(w,[2,37]),t(w,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:v,61:D,62:m,63:Q,64:x,65:ct,66:Dt}),{27:72,28:46,29:47,88:Y,89:W,90:N,91:M},t(w,[2,47]),t(w,[2,48]),{28:73,88:Y,89:W,90:N},{27:74,28:46,29:47,88:Y,89:W,90:N,91:M},{27:75,28:46,29:47,88:Y,89:W,90:N,91:M},{27:76,28:46,29:47,88:Y,89:W,90:N,91:M},{54:[1,77]},{27:78,28:46,29:47,88:Y,89:W,90:N,91:M},{54:kt,56:79},t(j,[2,20],{28:46,29:47,27:81,30:[1,82],88:Y,89:W,90:N,91:M}),t(j,[2,21],{30:[1,83]}),t(ot,[2,94]),t(ot,[2,95]),t(ot,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(rt,[2,10]),{15:84,22:u},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:r,9:n,10:i,11:s,13:11,19:a,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:d,41:f,43:p,44:g,49:b,51:k,52:T,55:L,57:E,67:I,68:V,70:H,74:G,88:Y,89:W,90:N,91:M},t(w,[2,26]),t(w,[2,35]),t(w,[2,36]),{27:86,28:46,29:47,54:[1,87],88:Y,89:W,90:N,91:M},{53:88,58:63,59:64,60:v,61:D,62:m,63:Q,64:x,65:ct,66:Dt},t(w,[2,46]),{59:89,65:ct,66:Dt},t(nt,[2,58],{58:90,60:v,61:D,62:m,63:Q,64:x}),t(ut,[2,59]),t(ut,[2,60]),t(ut,[2,61]),t(ut,[2,62]),t(ut,[2,63]),t(_t,[2,64]),t(_t,[2,65]),t(w,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:Y,89:W,90:N},{54:kt,56:99},t(w,[2,54]),t(w,[2,98]),t(j,[2,22]),t(j,[2,23]),t(j,[2,24]),{16:[1,100]},{25:[2,19]},t(K,[2,49]),{27:101,28:46,29:47,88:Y,89:W,90:N,91:M},{27:102,28:46,29:47,54:[1,103],88:Y,89:W,90:N,91:M},t(nt,[2,57],{58:104,60:v,61:D,62:m,63:Q,64:x}),t(nt,[2,56]),{28:105,88:Y,89:W,90:N},{47:106,51:Rt},{27:108,28:46,29:47,88:Y,89:W,90:N,91:M},t(w,[2,66],{54:[1,109]}),t(w,[2,68],{54:[1,111],69:[1,110]}),t(w,[2,72],{54:[1,112],72:[1,113]}),t(w,[2,76],{54:[1,115],69:[1,114]}),t(w,[2,80]),t(w,[2,53]),t(rt,[2,11]),t(K,[2,51]),t(K,[2,50]),{27:116,28:46,29:47,88:Y,89:W,90:N,91:M},t(nt,[2,55]),t(w,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:Rt},t(w,[2,42]),t(w,[2,67]),t(w,[2,69]),t(w,[2,70],{69:[1,120]}),t(w,[2,73]),t(w,[2,74],{54:[1,121]}),t(w,[2,77]),t(w,[2,78],{69:[1,122]}),t(K,[2,52]),{47:123,51:Rt},t(w,[2,40]),{48:[2,44]},t(w,[2,71]),t(w,[2,75]),t(w,[2,79]),{48:[1,124]},t(w,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(R,A){if(A.recoverable)this.trace(R);else{var J=new Error(R);throw J.hash=A,J}},parse:function(R){var A=this,J=[0],C=[],ht=[null],U=[],Yt=this.table,et="",Nt=0,Tt=0,gt=2,Et=1,wt=U.slice.call(arguments,1),pt=Object.create(this.lexer),st={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(st.yy[le]=this.yy[le]);pt.setInput(R,st.yy),st.yy.lexer=pt,st.yy.parser=this,typeof pt.yylloc>"u"&&(pt.yylloc={});var Xt=pt.yylloc;U.push(Xt);var jt=pt.options&&pt.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Kt(){var at;return at=C.pop()||pt.lex()||Et,typeof at!="number"&&(at instanceof Array&&(C=at,at=C.pop()),at=A.symbols_[at]||at),at}for(var Gt,Ee,Ht,Vt,Ft={},xt,ft,Lt,bt;;){if(Ee=J[J.length-1],this.defaultActions[Ee]?Ht=this.defaultActions[Ee]:((Gt===null||typeof Gt>"u")&&(Gt=Kt()),Ht=Yt[Ee]&&Yt[Ee][Gt]),typeof Ht>"u"||!Ht.length||!Ht[0]){var Ut="";bt=[];for(xt in Yt[Ee])this.terminals_[xt]&&xt>gt&&bt.push("'"+this.terminals_[xt]+"'");pt.showPosition?Ut="Parse error on line "+(Nt+1)+`:
`+pt.showPosition()+`
Expecting `+bt.join(", ")+", got '"+(this.terminals_[Gt]||Gt)+"'":Ut="Parse error on line "+(Nt+1)+": Unexpected "+(Gt==Et?"end of input":"'"+(this.terminals_[Gt]||Gt)+"'"),this.parseError(Ut,{text:pt.match,token:this.terminals_[Gt]||Gt,line:pt.yylineno,loc:Xt,expected:bt})}if(Ht[0]instanceof Array&&Ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+Gt);switch(Ht[0]){case 1:J.push(Gt),ht.push(pt.yytext),U.push(pt.yylloc),J.push(Ht[1]),Gt=null,Tt=pt.yyleng,et=pt.yytext,Nt=pt.yylineno,Xt=pt.yylloc;break;case 2:if(ft=this.productions_[Ht[1]][1],Ft.$=ht[ht.length-ft],Ft._$={first_line:U[U.length-(ft||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-(ft||1)].first_column,last_column:U[U.length-1].last_column},jt&&(Ft._$.range=[U[U.length-(ft||1)].range[0],U[U.length-1].range[1]]),Vt=this.performAction.apply(Ft,[et,Tt,Nt,st.yy,Ht[1],ht,U].concat(wt)),typeof Vt<"u")return Vt;ft&&(J=J.slice(0,-1*ft*2),ht=ht.slice(0,-1*ft),U=U.slice(0,-1*ft)),J.push(this.productions_[Ht[1]][0]),ht.push(Ft.$),U.push(Ft._$),Lt=Yt[J[J.length-2]][J[J.length-1]],J.push(Lt);break;case 3:return!0}}return!0}},z=function(){var F={EOF:1,parseError:function(A,J){if(this.yy.parser)this.yy.parser.parseError(A,J);else throw new Error(A)},setInput:function(R,A){return this.yy=A||this.yy||{},this._input=R,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var A=R.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),R},unput:function(R){var A=R.length,J=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),J.length-1&&(this.yylineno-=J.length-1);var ht=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:J?(J.length===C.length?this.yylloc.first_column:0)+C[C.length-J.length].length-J[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[ht[0],ht[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(R){this.unput(this.match.slice(R))},pastInput:function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var R=this.pastInput(),A=new Array(R.length+1).join("-");return R+this.upcomingInput()+`
`+A+"^"},test_match:function(R,A){var J,C,ht;if(this.options.backtrack_lexer&&(ht={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ht.yylloc.range=this.yylloc.range.slice(0))),C=R[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(R[0].length),this.matched+=R[0],J=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),J)return J;if(this._backtrack){for(var U in ht)this[U]=ht[U];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,A,J,C;this._more||(this.yytext="",this.match="");for(var ht=this._currentRules(),U=0;Uo))return!1;var u=s.get(t),d=s.get(e);if(u&&d)return u==e&&d==t;var f=-1,p=!0,g=r&FL?new Mo:void 0;for(s.set(t,e),s.set(e,t);++f1?i.setNode(s,r):i.setNode(s)}),this}setNode(e,r){return me(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=As,this._children[e]={},this._children[As][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return me(this._nodes,e)}removeNode(e){var r=this;if(me(this._nodes,e)){var n=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],vt(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),vt(jr(this._in[e]),n),delete this._in[e],delete this._preds[e],vt(jr(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ze(r))r=As;else{r+="";for(var n=r;!Ze(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==As)return r}}children(e){if(Ze(e)&&(e=As),this._isCompound){var r=this._children[e];if(r)return jr(r)}else{if(e===As)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return jr(r)}successors(e){var r=this._sucs[e];if(r)return jr(r)}neighbors(e){var r=this.predecessors(e);if(r)return hM(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;vt(this._nodes,function(a,o){e(o)&&r.setNode(o,a)}),vt(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,n.edge(a))});var i={};function s(a){var o=n.parent(a);return o===void 0||r.hasNode(o)?(i[a]=o,o):o in i?i[o]:s(o)}return this._isCompound&&vt(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(e){return aa(e)||(e=ya(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return yi(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Io(e,function(s,a){return i.length>1?n.setEdge(s,a,r):n.setEdge(s,a),a}),this}setEdge(){var e,r,n,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(e=a.v,r=a.w,n=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(e=a,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,r=""+r,Ze(n)||(n=""+n);var o=Oo(this._isDirected,e,r,n);if(me(this._edgeLabels,o))return s&&(this._edgeLabels[o]=i),this;if(!Ze(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=s?i:this._defaultEdgeLabelFn(e,r,n);var l=yM(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,Zy(this._preds[r],e),Zy(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?c0(this._isDirected,arguments[0]):Oo(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?c0(this._isDirected,arguments[0]):Oo(this._isDirected,e,r,n);return me(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?c0(this._isDirected,arguments[0]):Oo(this._isDirected,e,r,n),s=this._edgeObjs[i];return s&&(e=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Qy(this._preds[r],e),Qy(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=yi(n);return r?gi(i,function(s){return s.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=yi(n);return r?gi(i,function(s){return s.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}}sr.prototype._nodeCount=0,sr.prototype._edgeCount=0;function Zy(t,e){t[e]?t[e]++:t[e]=1}function Qy(t,e){--t[e]||delete t[e]}function Oo(t,e,r,n){var i=""+e,s=""+r;if(!t&&i>s){var a=i;i=s,s=a}return i+Ky+s+Ky+(Ze(n)?gM:n)}function yM(t,e,r,n){var i=""+e,s=""+r;if(!t&&i>s){var a=i;i=s,s=a}var o={v:i,w:s};return n&&(o.name=n),o}function c0(t,e){return Oo(t,e.v,e.w,e.name)}class mM{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return Jy(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&Jy(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,bM)),n=n._prev;return"["+e.join(", ")+"]"}}function Jy(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function bM(t,e){if(t!=="_next"&&t!=="_prev")return e}var _M=ya(1);function xM(t,e){if(t.nodeCount()<=1)return[];var r=kM(t,e||_M),n=vM(r.graph,r.buckets,r.zeroIdx);return xa(ir(n,function(i){return t.outEdges(i.v,i.w)}))}function vM(t,e,r){for(var n=[],i=e[e.length-1],s=e[0],a;t.nodeCount();){for(;a=s.dequeue();)u0(t,e,r,a);for(;a=i.dequeue();)u0(t,e,r,a);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(a=e[o].dequeue(),a){n=n.concat(u0(t,e,r,a,!0));break}}}return n}function u0(t,e,r,n,i){var s=i?[]:void 0;return vt(t.inEdges(n.v),function(a){var o=t.edge(a),l=t.node(a.v);i&&s.push({v:a.v,w:a.w}),l.out-=o,h0(e,r,l)}),vt(t.outEdges(n.v),function(a){var o=t.edge(a),l=a.w,u=t.node(l);u.in-=o,h0(e,r,u)}),t.removeNode(n.v),s}function kM(t,e){var r=new sr,n=0,i=0;vt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),vt(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),d=l+u;r.setEdge(o.v,o.w,d),i=Math.max(i,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var s=Ss(i+n+3).map(function(){return new mM}),a=n+1;return vt(r.nodes(),function(o){h0(s,a,r.node(o))}),{graph:r,buckets:s,zeroIdx:a}}function h0(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function wM(t){var e=t.graph().acyclicer==="greedy"?xM(t,r(t)):TM(t);vt(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,ou("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function TM(t){var e=[],r={},n={};function i(s){me(n,s)||(n[s]=!0,r[s]=!0,vt(t.outEdges(s),function(a){me(r,a.w)?e.push(a):i(a.w)}),delete r[s])}return vt(t.nodes(),i),e}function EM(t){vt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}function Ea(t,e,r,n){var i;do i=ou(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function CM(t){var e=new sr().setGraph(t.graph());return vt(t.nodes(),function(r){e.setNode(r,t.node(r))}),vt(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function tm(t){var e=new sr({multigraph:t.isMultigraph()}).setGraph(t.graph());return vt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),vt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function em(t,e){var r=t.x,n=t.y,i=e.x-r,s=e.y-n,a=t.width/2,o=t.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(s)*a>Math.abs(i)*o?(s<0&&(o=-o),l=o*i/s,u=o):(i<0&&(a=-a),l=a,u=a*s/i),{x:r+l,y:n+u}}function lu(t){var e=ir(Ss(nm(t)+1),function(){return[]});return vt(t.nodes(),function(r){var n=t.node(r),i=n.rank;Ze(i)||(e[i][n.order]=r)}),e}function SM(t){var e=No(ir(t.nodes(),function(r){return t.node(r).rank}));vt(t.nodes(),function(r){var n=t.node(r);me(n,"rank")&&(n.rank-=e)})}function AM(t){var e=No(ir(t.nodes(),function(s){return t.node(s).rank})),r=[];vt(t.nodes(),function(s){var a=t.node(s).rank-e;r[a]||(r[a]=[]),r[a].push(s)});var n=0,i=t.graph().nodeRankFactor;vt(r,function(s,a){Ze(s)&&a%i!==0?--n:n&&vt(s,function(o){t.node(o).rank+=n})})}function rm(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),Ea(t,"border",i,e)}function nm(t){return Cs(ir(t.nodes(),function(e){var r=t.node(e).rank;if(!Ze(r))return r}))}function LM(t,e){var r={lhs:[],rhs:[]};return vt(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function DM(t,e){var r=Wy();try{return e()}finally{console.log(t+" time: "+(Wy()-r)+"ms")}}function MM(t,e){return e()}function NM(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&vt(n,e),me(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,a=i.maxRank+1;s0;)d%2&&(f+=o[d+1]),d=d-1>>1,o[d]+=u.weight;l+=u.weight*f})),l}function qM(t){var e={},r=gi(t.nodes(),function(o){return!t.children(o).length}),n=Cs(ir(r,function(o){return t.node(o).rank})),i=ir(Ss(n+1),function(){return[]});function s(o){if(!me(e,o)){e[o]=!0;var l=t.node(o);i[l.rank].push(o),vt(t.successors(o),s)}}var a=Ro(r,function(o){return t.node(o).rank});return vt(a,s),i}function jM(t,e){return ir(e,function(r){var n=t.inEdges(r);if(n.length){var i=Io(n,function(s,a){var o=t.edge(a),l=t.node(a.v);return{sum:s.sum+o.weight*l.order,weight:s.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function $M(t,e){var r={};vt(t,function(i,s){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};Ze(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),vt(e.edges(),function(i){var s=r[i.v],a=r[i.w];!Ze(s)&&!Ze(a)&&(a.indegree++,s.out.push(r[i.w]))});var n=gi(r,function(i){return!i.indegree});return XM(n)}function XM(t){var e=[];function r(s){return function(a){a.merged||(Ze(a.barycenter)||Ze(s.barycenter)||a.barycenter>=s.barycenter)&&KM(s,a)}}function n(s){return function(a){a.in.push(s),--a.indegree===0&&t.push(a)}}for(;t.length;){var i=t.pop();e.push(i),vt(i.in.reverse(),r(i)),vt(i.out,n(i))}return ir(gi(e,function(s){return!s.merged}),function(s){return Bo(s,["vs","i","barycenter","weight"])})}function KM(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}function ZM(t,e){var r=LM(t,function(d){return me(d,"barycenter")}),n=r.lhs,i=Ro(r.rhs,function(d){return-d.i}),s=[],a=0,o=0,l=0;n.sort(QM(!!e)),l=lm(s,i,l),vt(n,function(d){l+=d.vs.length,s.push(d.vs),a+=d.barycenter*d.weight,o+=d.weight,l=lm(s,i,l)});var u={vs:xa(s)};return o&&(u.barycenter=a/o,u.weight=o),u}function lm(t,e,r){for(var n;e.length&&(n=su(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function QM(t){return function(e,r){return e.barycentera||o>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)s.push(l);return{path:i.concat(s.reverse()),lca:u}}function sN(t){var e={},r=0;function n(i){var s=r;vt(t.children(i),n),e[i]={low:s,lim:r++}}return vt(t.children(),n),e}function aN(t,e){var r={};function n(i,s){var a=0,o=0,l=i.length,u=su(s);return vt(s,function(d,f){var p=lN(t,d),g=p?t.node(p).order:l;(p||d===u)&&(vt(s.slice(o,f+1),function(b){vt(t.predecessors(b),function(k){var T=t.node(k),L=T.order;(Lu)&&dm(r,p,d)})})}function i(s,a){var o=-1,l,u=0;return vt(a,function(d,f){if(t.node(d).dummy==="border"){var p=t.predecessors(d);p.length&&(l=t.node(p[0]).order,n(a,u,f,o,l),u=f,o=l)}n(a,u,a.length,l,s.length)}),a}return Io(e,i),r}function lN(t,e){if(t.node(e).dummy)return s0(t.predecessors(e),function(r){return t.node(r).dummy})}function dm(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function cN(t,e,r){if(e>r){var n=e;e=r,r=n}return me(t[e],r)}function uN(t,e,r,n){var i={},s={},a={};return vt(e,function(o){vt(o,function(l,u){i[l]=l,s[l]=l,a[l]=u})}),vt(e,function(o){var l=-1;vt(o,function(u){var d=n(u);if(d.length){d=Ro(d,function(k){return a[k]});for(var f=(d.length-1)/2,p=Math.floor(f),g=Math.ceil(f);p<=g;++p){var b=d[p];s[u]===u&&la.lim&&(o=a,l=!0);var u=gi(e.edges(),function(d){return l===vm(t,t.node(d.v),o)&&l!==vm(t,t.node(d.w),o)});return l0(u,function(d){return Fo(e,d)})}function xm(t,e,r,n){var i=r.v,s=r.w;t.removeEdge(i,s),t.setEdge(n.v,n.w,{}),b0(t),m0(t,e),tB(t,e)}function tB(t,e){var r=s0(t.nodes(),function(i){return!e.node(i).parent}),n=QN(t,r);n=n.slice(1),vt(n,function(i){var s=t.node(i).parent,a=e.edge(i,s),o=!1;a||(a=e.edge(s,i),o=!0),e.node(i).rank=e.node(s).rank+(o?a.minlen:-a.minlen)})}function eB(t,e,r){return t.hasEdge(e,r)}function vm(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function rB(t){switch(t.graph().ranker){case"network-simplex":km(t);break;case"tight-tree":iB(t);break;case"longest-path":nB(t);break;default:km(t)}}var nB=y0;function iB(t){y0(t),fm(t)}function km(t){Ls(t)}let wm=0;const sB=function(t,e,r,n,i){const s=function(E){switch(E){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.relationType.EXTENSION:return"extension";case i.db.relationType.COMPOSITION:return"composition";case i.db.relationType.DEPENDENCY:return"dependency";case i.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(E=>!Number.isNaN(E.y));const a=e.points,o=Js().x(function(E){return E.x}).y(function(E){return E.y}).curve(ta),l=t.append("path").attr("d",o(a)).attr("id","edge"+wm).attr("class","relation");let u="";n.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),r.relation.lineType==1&&l.attr("class","relation dashed-line"),r.relation.lineType==10&&l.attr("class","relation dotted-line"),r.relation.type1!=="none"&&l.attr("marker-start","url("+u+"#"+s(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&l.attr("marker-end","url("+u+"#"+s(r.relation.type2)+"End)");let d,f;const p=e.points.length;let g=ge.calcLabelPosition(e.points);d=g.x,f=g.y;let b,k,T,L;if(p%2!==0&&p>1){let E=ge.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),I=ge.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[p-1]);B.debug("cardinality_1_point "+JSON.stringify(E)),B.debug("cardinality_2_point "+JSON.stringify(I)),b=E.x,k=E.y,T=I.x,L=I.y}if(r.title!==void 0){const E=t.append("g").attr("class","classLabel"),I=E.append("text").attr("class","label").attr("x",d).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=I;const V=I.node().getBBox();E.insert("rect",":first-child").attr("class","box").attr("x",V.x-n.padding/2).attr("y",V.y-n.padding/2).attr("width",V.width+n.padding).attr("height",V.height+n.padding)}B.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",b).attr("y",k).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",T).attr("y",L).attr("fill","black").attr("font-size","6").text(r.relationTitle2),wm++},aB=function(t,e,r,n){B.debug("Rendering class ",e,r);const i=e.id,s={id:i,label:e.id,width:0,height:0},a=t.append("g").attr("id",n.db.lookUpDomId(i)).attr("class","classGroup");let o;e.link?o=a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let l=!0;e.annotations.forEach(function(H){const G=o.append("tspan").text("\xAB"+H+"\xBB");l||G.attr("dy",r.textHeight),l=!1});let u=e.id;e.type!==void 0&&e.type!==""&&(u+="<"+e.type+">");const d=o.append("tspan").text(u).attr("class","title");l||d.attr("dy",r.textHeight);const f=o.node().getBBox().height,p=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin/2).attr("y2",r.padding+f+r.dividerMargin/2),g=a.append("text").attr("x",r.padding).attr("y",f+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(H){Tm(g,H,l,r),l=!1});const b=g.node().getBBox(),k=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin+b.height).attr("y2",r.padding+f+r.dividerMargin+b.height),T=a.append("text").attr("x",r.padding).attr("y",f+2*r.dividerMargin+b.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(H){Tm(T,H,l,r),l=!1});const L=a.node().getBBox();var E=" ";e.cssClasses.length>0&&(E=E+e.cssClasses.join(" "));const V=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",L.width+2*r.padding).attr("height",L.height+r.padding+.5*r.dividerMargin).attr("class",E).node().getBBox().width;return o.node().childNodes.forEach(function(H){H.setAttribute("x",(V-H.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),p.attr("x2",V),k.attr("x2",V),s.width=V,s.height=L.height+r.padding+.5*r.dividerMargin,s},oB=function(t,e,r,n){B.debug("Rendering note ",e,r);const i=e.id,s={id:i,text:e.text,width:0,height:0},a=t.append("g").attr("id",i).attr("class","classGroup");let o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split(`
`);l.forEach(function(p){B.debug(`Adding line: ${p}`),o.append("tspan").text(p).attr("class","title").attr("dy",r.textHeight)});const u=a.node().getBBox(),f=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",u.width+2*r.padding).attr("height",u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(p){p.setAttribute("x",(f-p.getBBox().width)/2)}),s.width=f,s.height=u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,s},cu=function(t){const e=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,r=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let n=t.match(e),i=t.match(r);return n&&!i?lB(n):i?cB(i):uB(t)},lB=function(t){let e="",r="";try{let n=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",s=t[3]?Ri(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";r=n+i+s+" "+a,e=_0(o)}catch{r=t}return{displayText:r,cssStyle:e}},cB=function(t){let e="",r="";try{let n=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",s=t[3]?Ri(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+Ri(t[5]).trim():"";r=n+i+"("+s+")"+o,e=_0(a)}catch{r=t}return{displayText:r,cssStyle:e}},uB=function(t){let e="",r="",n="",i=t.indexOf("("),s=t.indexOf(")");if(i>1&&s>i&&s<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,i).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,i).trim());const u=t.substring(i+1,s);t.substring(s+1,1),r=_0(t.substring(s+1,s+2)),e=a+o+"("+Ri(u.trim())+")",s
"),B.info("vertexText"+i);const s={isNode:n,label:Id(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:e.replace("fill:","color:")};return _B(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof i=="string"?a=i.split(/\\n|\n|
/gi):Array.isArray(i)?a=i:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),s.appendChild(l)}return s}},Er=(t,e,r,n)=>{let i;r?i=r:i="node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),a=s.insert("g").attr("class","label").attr("style",e.labelStyle);let o;e.labelText===void 0?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=a.node().appendChild(Vr(yn(Id(o),$()),e.labelStyle,!1,n));let u=l.getBBox();if(pr($().flowchart.htmlLabels)){const f=l.children[0],p=St(l);u=f.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}const d=e.padding/2;return a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:s,bbox:u,halfPadding:d,label:a}},Qe=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function bi(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}let Te={},Ln={},Em={};const xB=()=>{Ln={},Em={},Te={}},du=(t,e)=>(B.trace("In isDecendant",e," ",t," = ",Ln[e].includes(t)),!!Ln[e].includes(t)),vB=(t,e)=>(B.info("Decendants of ",e," is ",Ln[e]),B.info("Edge is ",t),t.v===e||t.w===e?!1:Ln[e]?Ln[e].includes(t.v)||du(t.v,e)||du(t.w,e)||Ln[e].includes(t.w):(B.debug("Tilt, ",e,",not in decendants"),!1)),Cm=(t,e,r,n)=>{B.warn("Copying children of ",t,"root",n,"data",e.node(t),n);const i=e.children(t)||[];t!==n&&i.push(t),B.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(s=>{if(e.children(s).length>0)Cm(s,e,r,n);else{const a=e.node(s);B.info("cp ",s," to ",n," with parent ",t),r.setNode(s,a),n!==e.parent(s)&&(B.warn("Setting parent",s,e.parent(s)),r.setParent(s,e.parent(s))),t!==n&&s!==t?(B.debug("Setting parent",s,t),r.setParent(s,t)):(B.info("In copy ",t,"root",n,"data",e.node(t),n),B.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==n,"node!==clusterId",s!==t));const o=e.edges(s);B.debug("Copying Edges",o),o.forEach(l=>{B.info("Edge",l);const u=e.edge(l.v,l.w,l.name);B.info("Edge data",u,n);try{vB(l,n)?(B.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),B.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):B.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(d){B.error(d)}})}B.debug("Removing node",s),e.removeNode(s)})},Sm=(t,e)=>{const r=e.children(t);let n=[...r];for(const i of r)Em[i]=t,n=[...n,...Sm(i,e)];return n},Yo=(t,e)=>{B.trace("Searching",t);const r=e.children(t);if(B.trace("Searching children of id ",t,r),r.length<1)return B.trace("This is a valid node",t),t;for(const n of r){const i=Yo(n,e);if(i)return B.trace("Found replacement for",t," => ",i),i}},fu=t=>!Te[t]||!Te[t].externalConnections?t:Te[t]?Te[t].id:t,kB=(t,e)=>{if(!t||e>10){B.debug("Opting out, no graph ");return}else B.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(B.warn("Cluster identified",r," Replacement id in edges: ",Yo(r,t)),Ln[r]=Sm(r,t),Te[r]={id:Yo(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){const n=t.children(r),i=t.edges();n.length>0?(B.debug("Cluster identified",r,Ln),i.forEach(s=>{if(s.v!==r&&s.w!==r){const a=du(s.v,r),o=du(s.w,r);a^o&&(B.warn("Edge: ",s," leaves cluster ",r),B.warn("Decendants of XXX ",r,": ",Ln[r]),Te[r].externalConnections=!0)}})):B.debug("Not a cluster ",r,Ln)}),t.edges().forEach(function(r){const n=t.edge(r);B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,s=r.w;if(B.warn("Fix XXX",Te,"ids:",r.v,r.w,"Translating: ",Te[r.v]," --- ",Te[r.w]),Te[r.v]&&Te[r.w]&&Te[r.v]===Te[r.w]){B.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=fu(r.v),s=fu(r.w),t.removeEdge(r.v,r.w,r.name);const a=r.w+"---"+r.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(n)),l=JSON.parse(JSON.stringify(n));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=r.v,l.toCluster=r.v,t.setEdge(i,a,o,r.name+"-cyclic-special"),t.setEdge(a,s,l,r.name+"-cyclic-special")}else(Te[r.v]||Te[r.w])&&(B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=fu(r.v),s=fu(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v&&(n.fromCluster=r.v),s!==r.w&&(n.toCluster=r.w),B.warn("Fix Replacing with XXX",i,s,r.name),t.setEdge(i,s,n,r.name))}),B.warn("Adjusted Graph",mi(t)),Am(t,0),B.trace(Te)},Am=(t,e)=>{if(B.warn("extractor - ",e,mi(t),t.children("D")),e>10){B.error("Bailing out");return}let r=t.nodes(),n=!1;for(const i of r){const s=t.children(i);n=n||s.length>0}if(!n){B.debug("Done, no node has children",t.nodes());return}B.debug("Nodes = ",r,e);for(const i of r)if(B.debug("Extracting node",i,Te,Te[i]&&!Te[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!Te[i])B.debug("Not a cluster",i,e);else if(!Te[i].externalConnections&&t.children(i)&&t.children(i).length>0){B.warn("Cluster without external connections, without a parent and with children",i,e);let a=t.graph().rankdir==="TB"?"LR":"TB";Te[i]&&Te[i].clusterData&&Te[i].clusterData.dir&&(a=Te[i].clusterData.dir,B.warn("Fixing dir",Te[i].clusterData.dir,a));const o=new sr({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});B.warn("Old graph before copy",mi(t)),Cm(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Te[i].clusterData,labelText:Te[i].labelText,graph:o}),B.warn("New graph after copy node: (",i,")",mi(o)),B.debug("Old graph after copy",mi(t))}else B.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Te[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),B.debug(Te);r=t.nodes(),B.warn("New list of nodes",r);for(const i of r){const s=t.node(i);B.warn(" Now next level",i,s),s.clusterNode&&Am(s.graph,e+1)}},Lm=(t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(n=>{const i=t.children(n),s=Lm(t,i);r=[...r,...s]}),r},wB=t=>Lm(t,t.children());function TB(t,e){return t.intersect(e)}function Dm(t,e,r,n){var i=t.x,s=t.y,a=i-n.x,o=s-n.y,l=Math.sqrt(e*e*o*o+r*r*a*a),u=Math.abs(e*r*a/l);n.x0}function SB(t,e,r){var n=t.x,i=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(b){a=Math.min(a,b.x),o=Math.min(o,b.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-a,u=i-t.height/2-o,d=0;d
"):f,e.labelStyle,!0,!0));if(pr($().flowchart.htmlLabels)){const k=g.children[0],T=St(g);d=k.getBoundingClientRect(),T.attr("width",d.width),T.attr("height",d.height)}const b=e.padding/2;return St(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+b+5)+")"),St(u).attr("transform","translate( "+(d.width"u"&&(I.yylloc={});var G=I.yylloc;f.push(G);var Y=I.options&&I.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(){var kt;return kt=u.pop()||I.lex()||L,typeof kt!="number"&&(kt instanceof Array&&(u=kt,kt=u.pop()),kt=o.symbols_[kt]||kt),kt}for(var N,M,w,v,D={},m,Q,x,ct;;){if(M=l[l.length-1],this.defaultActions[M]?w=this.defaultActions[M]:((N===null||typeof N>"u")&&(N=W()),w=p[M]&&p[M][N]),typeof w>"u"||!w.length||!w[0]){var Dt="";ct=[];for(m in p[M])this.terminals_[m]&&m>T&&ct.push("'"+this.terminals_[m]+"'");I.showPosition?Dt="Parse error on line "+(b+1)+`:
`+I.showPosition()+`
Expecting `+ct.join(", ")+", got '"+(this.terminals_[N]||N)+"'":Dt="Parse error on line "+(b+1)+": Unexpected "+(N==L?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Dt,{text:I.match,token:this.terminals_[N]||N,line:I.yylineno,loc:G,expected:ct})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+N);switch(w[0]){case 1:l.push(N),d.push(I.yytext),f.push(I.yylloc),l.push(w[1]),N=null,k=I.yyleng,g=I.yytext,b=I.yylineno,G=I.yylloc;break;case 2:if(Q=this.productions_[w[1]][1],D.$=d[d.length-Q],D._$={first_line:f[f.length-(Q||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(Q||1)].first_column,last_column:f[f.length-1].last_column},Y&&(D._$.range=[f[f.length-(Q||1)].range[0],f[f.length-1].range[1]]),v=this.performAction.apply(D,[g,k,b,V.yy,w[1],d,f].concat(E)),typeof v<"u")return v;Q&&(l=l.slice(0,-1*Q*2),d=d.slice(0,-1*Q),f=f.slice(0,-1*Q)),l.push(this.productions_[w[1]][0]),d.push(D.$),f.push(D._$),x=p[l[l.length-2]][l[l.length-1]],l.push(x);break;case 3:return!0}}return!0}},n=function(){var s={EOF:1,parseError:function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},setInput:function(a,o){return this.yy=o||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var o=a.length,l=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
`+o+"^"},test_match:function(a,o){var l,u,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),u=a[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var f in d)this[f]=d[f];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,l,u;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f