@mermaid-js/tiny 11.10.0 → 11.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -898,7 +898,7 @@ Expecting `+It.join(", ")+", got '"+(this.terminals_[W]||W)+"'":bt="Parse error
898
898
  fill: ${e.titleColor||e.textColor};
899
899
  font-family: ${e.fontFamily};
900
900
  }
901
- `,"getStyles"),ert=vLt});var nrt={};Me(nrt,{diagram:()=>ELt});var ELt,irt=x(()=>{"use strict";Det();Qet();trt();rrt();ELt={parser:Ret,db:Xet,renderer:Jet,styles:ert}});var ort,lrt=x(()=>{"use strict";Vh();Gt();ort={parse:a(async e=>{let t=await Bs("info",e);B.debug(t)},"parse")}});var Py,UD=x(()=>{Py={name:"mermaid",version:"11.10.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.0.0",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}});var NLt,ILt,crt,urt=x(()=>{"use strict";UD();NLt={version:Py.version+"-tiny"},ILt=a(()=>NLt.version,"getVersion"),crt={getVersion:ILt}});var _i,$l=x(()=>{"use strict";$e();pe();_i=a(e=>{let{securityLevel:t}=X(),r=yt("body");if(t==="sandbox"){let s=yt(`#i${e}`).node()?.contentDocument??document;r=yt(s.body)}return r.select(`#${e}`)},"selectSvgElement")});var MLt,hrt,frt=x(()=>{"use strict";Gt();$l();Mn();MLt=a((e,t,r)=>{B.debug(`rendering info diagram
901
+ `,"getStyles"),ert=vLt});var nrt={};Me(nrt,{diagram:()=>ELt});var ELt,irt=x(()=>{"use strict";Det();Qet();trt();rrt();ELt={parser:Ret,db:Xet,renderer:Jet,styles:ert}});var ort,lrt=x(()=>{"use strict";Vh();Gt();ort={parse:a(async e=>{let t=await Bs("info",e);B.debug(t)},"parse")}});var Py,UD=x(()=>{Py={name:"mermaid",version:"11.10.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.0.0",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}});var NLt,ILt,crt,urt=x(()=>{"use strict";UD();NLt={version:Py.version+"-tiny"},ILt=a(()=>NLt.version,"getVersion"),crt={getVersion:ILt}});var _i,$l=x(()=>{"use strict";$e();pe();_i=a(e=>{let{securityLevel:t}=X(),r=yt("body");if(t==="sandbox"){let s=yt(`#i${e}`).node()?.contentDocument??document;r=yt(s.body)}return r.select(`#${e}`)},"selectSvgElement")});var MLt,hrt,frt=x(()=>{"use strict";Gt();$l();Mn();MLt=a((e,t,r)=>{B.debug(`rendering info diagram
902
902
  `+e);let n=_i(t);Ar(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),hrt={draw:MLt}});var drt={};Me(drt,{diagram:()=>OLt});var OLt,prt=x(()=>{"use strict";lrt();urt();frt();OLt={parser:ort,db:crt,renderer:hrt}});var yrt,jD,yC,qD,FLt,$Lt,GLt,VLt,zLt,WLt,ULt,xC,HD=x(()=>{"use strict";Gt();mn();Ss();yrt=Ve.pie,jD={sections:new Map,showData:!1,config:yrt},yC=jD.sections,qD=jD.showData,FLt=structuredClone(yrt),$Lt=a(()=>structuredClone(FLt),"getConfig"),GLt=a(()=>{yC=new Map,qD=jD.showData,Ye()},"clear"),VLt=a(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);yC.has(e)||(yC.set(e,t),B.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),zLt=a(()=>yC,"getSections"),WLt=a(e=>{qD=e},"setShowData"),ULt=a(()=>qD,"getShowData"),xC={getConfig:$Lt,clear:GLt,setDiagramTitle:lr,getDiagramTitle:tr,setAccTitle:Xe,getAccTitle:Qe,setAccDescription:Ze,getAccDescription:Je,addSection:VLt,getSections:zLt,setShowData:WLt,getShowData:ULt}});var jLt,xrt,brt=x(()=>{"use strict";Vh();Gt();ym();HD();jLt=a((e,t)=>{qo(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),xrt={parse:a(async e=>{let t=await Bs("pie",e);B.debug(t),jLt(t,xC)},"parse")}});var qLt,krt,Trt=x(()=>{"use strict";qLt=a(e=>`
903
903
  .pieCircle{
904
904
  stroke: ${e.pieStrokeColor};
@@ -1124,7 +1124,7 @@ Expecting `+or.join(", ")+", got '"+(this.terminals_[z]||z)+"'":ir="Parse error
1124
1124
  fill: ${e.actorBkg};
1125
1125
  stroke-width: 2px;
1126
1126
  }
1127
- `,"getStyles"),Lnt=qRt});var uN,Zc,Nnt,Int,HRt,Dnt,hN,YRt,XRt,Gy,qh,Mnt,Xo,fN,KRt,QRt,ZRt,JRt,tDt,eDt,rDt,Ont,nDt,iDt,sDt,aDt,oDt,lDt,cDt,Pnt,uDt,dN,hDt,dn,Bnt=x(()=>{"use strict";uN=Zi(Gf(),1);cn();we();Pe();o0();Zc=18*2,Nnt="actor-top",Int="actor-bottom",HRt="actor-box",Dnt="actor-man",hN=a(function(e,t){return Bu(e,t)},"drawRect"),YRt=a(function(e,t,r,n,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let s=t.links,o=t.actorCnt,l=t.rectData;var u="none";i&&(u="block !important");let h=e.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var f="";l.class!==void 0&&(f=" "+l.class);let d=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+f),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",d),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),s!=null){var m=20;for(let b in s){var g=h.append("a"),y=(0,uN.sanitizeUrl)(s[b]);g.attr("xlink:href",y),g.attr("target","_blank"),hDt(n)(b,g,l.x+10,l.height+m,d,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:l.height+m,width:d}},"drawPopup"),XRt=a(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Gy=a(async function(e,t,r=null){let n=e.append("foreignObject"),i=await Kl(t.text,be()),o=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),t.class==="noteText"){let l=e.node().firstChild;l.setAttribute("height",o.height+2*t.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-o.width/2)).attr("y",Math.round(u.y+u.height/2-o.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let f=l;l=u,u=f}n.attr("x",Math.round(l+Math.abs(l-u)/2-o.width/2)),t.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-o.height))}return[n]},"drawKatex"),qh=a(function(e,t){let r=0,n=0,i=t.text.split(Lt.lineBreakRegex),[s,o]=xo(t.fontSize),l=[],u=0,h=a(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=a(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=a(()=>Math.round(t.y+(r+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=a(()=>Math.round(t.y+(r+n+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[f,d]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&s!==void 0&&(u=f*s);let p=e.append("text");p.attr("x",t.x),p.attr("y",h()),t.anchor!==void 0&&p.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&p.style("font-family",t.fontFamily),o!==void 0&&p.style("font-size",o),t.fontWeight!==void 0&&p.style("font-weight",t.fontWeight),t.fill!==void 0&&p.attr("fill",t.fill),t.class!==void 0&&p.attr("class",t.class),t.dy!==void 0?p.attr("dy",t.dy):u!==0&&p.attr("dy",u);let m=d||b4;if(t.tspan){let g=p.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(m)}else p.text(m);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p)}return l},"drawText"),Mnt=a(function(e,t){function r(i,s,o,l,u){return i+","+s+" "+(i+o)+","+s+" "+(i+o)+","+(s+l-u)+" "+(i+o-u*1.2)+","+(s+l)+" "+i+","+(s+l)}a(r,"genPoints");let n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,qh(e,t),n},"drawLabel"),Xo=-1,fN=a((e,t,r,n)=>{e.select&&r.forEach(i=>{let s=t.get(i),o=e.select("#actor"+s.actorCnt);!n.mirrorActors&&s.stopy?o.attr("y2",s.stopy+s.height/2):n.mirrorActors&&o.attr("y2",s.stopy)})},"fixLifeLineHeights"),KRt=a(function(e,t,r,n){let i=n?t.stopy:t.starty,s=t.x+t.width/2,o=i+t.height,l=e.append("g").lower();var u=l;n||(Xo++,Object.keys(t.links||{}).length&&!r.forceMenus&&u.attr("onclick",XRt(`actor${Xo}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+Xo).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),u=l.append("g"),t.actorCnt=Xo,t.links!=null&&u.attr("id","root-"+Xo));let h=Pa();var f="actor";t.properties?.class?f=t.properties.class:h.fill="#eaeaea",n?f+=` ${Int}`:f+=` ${Nnt}`,h.x=t.x,h.y=i,h.width=t.width,h.height=t.height,h.class=f,h.rx=3,h.ry=3,h.name=t.name;let d=hN(u,h);if(t.rectData=h,t.properties?.icon){let m=t.properties.icon.trim();m.charAt(0)==="@"?qB(u,h.x+h.width-20,h.y+10,m.substr(1)):jB(u,h.x+h.width-20,h.y+10,m)}dN(r,_n(t.description))(t.description,u,h.x,h.y,h.width,h.height,{class:`actor ${HRt}`},r);let p=t.height;if(d.node){let m=d.node().getBBox();t.height=m.height,p=m.height}return p},"drawActorTypeParticipant"),QRt=a(function(e,t,r,n){let i=n?t.stopy:t.starty,s=t.x+t.width/2,o=i+80,l=e.append("g").lower();n||(Xo++,l.append("line").attr("id","actor"+Xo).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=Xo);let u=e.append("g"),h=Dnt;n?h+=` ${Int}`:h+=` ${Nnt}`,u.attr("class",h),u.attr("name",t.name);let f=Pa();f.x=t.x,f.y=i,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor",f.rx=3,f.ry=3,u.append("line").attr("id","actor-man-torso"+Xo).attr("x1",s).attr("y1",i+25).attr("x2",s).attr("y2",i+45),u.append("line").attr("id","actor-man-arms"+Xo).attr("x1",s-Zc/2).attr("y1",i+33).attr("x2",s+Zc/2).attr("y2",i+33),u.append("line").attr("x1",s-Zc/2).attr("y1",i+60).attr("x2",s).attr("y2",i+45),u.append("line").attr("x1",s).attr("y1",i+45).attr("x2",s+Zc/2-2).attr("y2",i+60);let d=u.append("circle");d.attr("cx",t.x+t.width/2),d.attr("cy",i+10),d.attr("r",15),d.attr("width",t.width),d.attr("height",t.height);let p=u.node().getBBox();return t.height=p.height,dN(r,_n(t.description))(t.description,u,f.x,f.y+35,f.width,f.height,{class:`actor ${Dnt}`},r),t.height},"drawActorTypeActor"),ZRt=a(async function(e,t,r,n){switch(t.type){case"actor":return await QRt(e,t,r,n);case"participant":return await KRt(e,t,r,n)}},"drawActor"),JRt=a(function(e,t,r){let i=e.append("g");Ont(i,t),t.name&&dN(r)(t.name,i,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),i.lower()},"drawBox"),tDt=a(function(e){return e.append("g")},"anchorElement"),eDt=a(function(e,t,r,n,i){let s=Pa(),o=t.anchored;s.x=t.startx,s.y=t.starty,s.class="activation"+i%3,s.width=t.stopx-t.startx,s.height=r-t.starty,hN(o,s)},"drawActivation"),rDt=a(async function(e,t,r,n){let{boxMargin:i,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=n,d=e.append("g"),p=a(function(y,b,k,T){return d.append("line").attr("x1",y).attr("y1",b).attr("x2",k).attr("y2",T).attr("class","loopLine")},"drawLoopLine");p(t.startx,t.starty,t.stopx,t.starty),p(t.stopx,t.starty,t.stopx,t.stopy),p(t.startx,t.stopy,t.stopx,t.stopy),p(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(y){p(t.startx,y.y,t.stopx,y.y).style("stroke-dasharray","3, 3")});let m=a0();m.text=r,m.x=t.startx,m.y=t.starty,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=o||20,m.textMargin=s,m.class="labelText",Mnt(d,m),m=Pnt(),m.text=t.title,m.x=t.startx+l/2+(t.stopx-t.startx)/2,m.y=t.starty+i+s,m.anchor="middle",m.valign="middle",m.textMargin=s,m.class="loopText",m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=!0;let g=_n(m.text)?await Gy(d,m,t):qh(d,m);if(t.sectionTitles!==void 0){for(let[y,b]of Object.entries(t.sectionTitles))if(b.message){m.text=b.message,m.x=t.startx+(t.stopx-t.startx)/2,m.y=t.sections[y].y+i+s,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=t.wrap,_n(m.text)?(t.starty=t.sections[y].y,await Gy(d,m,t)):qh(d,m);let k=Math.round(g.map(T=>(T._groups||T)[0][0].getBBox().height).reduce((T,_)=>T+_));t.sections[y].height+=k-(i+s)}}return t.height=Math.round(t.stopy-t.starty),d},"drawLoop"),Ont=a(function(e,t){U2(e,t)},"drawBackgroundRect"),nDt=a(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),iDt=a(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),sDt=a(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),aDt=a(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),oDt=a(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),lDt=a(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),cDt=a(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Pnt=a(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),uDt=a(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),dN=function(){function e(s,o,l,u,h,f,d){let p=o.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(s);i(p,d)}a(e,"byText");function t(s,o,l,u,h,f,d,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[b,k]=xo(m),T=s.split(Lt.lineBreakRegex);for(let _=0;_<T.length;_++){let L=_*b-b*(T.length-1)/2,w=o.append("text").attr("x",l+h/2).attr("y",u).style("text-anchor","middle").style("font-size",k).style("font-weight",y).style("font-family",g);w.append("tspan").attr("x",l+h/2).attr("dy",L).text(T[_]),w.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(w,d)}}a(t,"byTspan");function r(s,o,l,u,h,f,d,p){let m=o.append("switch"),y=m.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),t(s,m,l,u,h,f,d,p),i(y,d)}a(r,"byFo");async function n(s,o,l,u,h,f,d,p){let m=await pu(s,be()),g=o.append("switch"),b=g.append("foreignObject").attr("x",l+h/2-m.width/2).attr("y",u+f/2-m.height/2).attr("width",m.width).attr("height",m.height).append("xhtml:div").style("height","100%").style("width","100%");b.append("div").style("text-align","center").style("vertical-align","middle").html(await Kl(s,be())),t(s,g,l,u,h,f,d,p),i(b,d)}a(n,"byKatex");function i(s,o){for(let l in o)o.hasOwnProperty(l)&&s.attr(l,o[l])}return a(i,"_setTextAttrs"),function(s,o=!1){return o?n:s.textPlacement==="fo"?r:s.textPlacement==="old"?e:t}}(),hDt=function(){function e(i,s,o,l,u,h,f){let d=s.append("text").attr("x",o).attr("y",l).style("text-anchor","start").text(i);n(d,f)}a(e,"byText");function t(i,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:m,actorFontWeight:g}=d,y=i.split(Lt.lineBreakRegex);for(let b=0;b<y.length;b++){let k=b*p-p*(y.length-1)/2,T=s.append("text").attr("x",o).attr("y",l).style("text-anchor","start").style("font-size",p).style("font-weight",g).style("font-family",m);T.append("tspan").attr("x",o).attr("dy",k).text(y[b]),T.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(T,f)}}a(t,"byTspan");function r(i,s,o,l,u,h,f,d){let p=s.append("switch"),g=p.append("foreignObject").attr("x",o).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,p,o,l,u,h,f,d),n(g,f)}a(r,"byFo");function n(i,s){for(let o in s)s.hasOwnProperty(o)&&i.attr(o,s[o])}return a(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?e:t}}(),dn={drawRect:hN,drawText:qh,drawLabel:Mnt,drawActor:ZRt,drawBox:JRt,drawPopup:YRt,anchorElement:tDt,drawActivation:eDt,drawLoop:rDt,drawBackgroundRect:Ont,insertArrowHead:aDt,insertArrowFilledHead:oDt,insertSequenceNumber:lDt,insertArrowCrossHead:cDt,insertDatabaseIcon:nDt,insertComputerIcon:iDt,insertClockIcon:sDt,getTextObj:Pnt,getNoteRect:uDt,fixLifeLineHeights:fN,sanitizeUrl:uN.sanitizeUrl}});async function dDt(e,t){Ot.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=t,s=Lt.splitBreaks(i).length,o=_n(i),l=o?await pu(i,X()):ae.calculateTextDimensions(i,Hh(lt));if(!o){let d=l.height/s;t.height+=d,Ot.bumpVerticalPos(d)}let u,h=l.height-10,f=l.width;if(r===n){u=Ot.getVerticalPos()+h,lt.rightAngles||(h+=lt.boxMargin,u=Ot.getVerticalPos()+h),h+=30;let d=Lt.getMax(f/2,lt.width/2);Ot.insert(r-d,Ot.getVerticalPos()-10+h,n+d,Ot.getVerticalPos()+30+h)}else h+=lt.boxMargin,u=Ot.getVerticalPos()+h,Ot.insert(r,u-10,n,u);return Ot.bumpVerticalPos(h),t.height+=h,t.stopy=t.starty+t.height,Ot.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),u}function Ko(e,t,r,n,i){Ot.bumpVerticalPos(r);let s=n;if(t.id&&t.message&&e[t.id]){let o=e[t.id].width,l=Hh(lt);t.message=ae.wrapLabel(`[${t.message}]`,o-2*lt.wrapPadding,l),t.width=o,t.wrap=!0;let u=ae.calculateTextDimensions(t.message,l),h=Lt.getMax(u.height,lt.labelBoxHeight);s=n+h,B.debug(`${h} - ${t.message}`)}i(t),Ot.bumpVerticalPos(s)}function gDt(e,t,r,n,i,s,o){function l(h,f){h.x<i.get(e.from).x?(Ot.insert(t.stopx-f,t.starty,t.startx,t.stopy+h.height/2+lt.noteMargin),t.stopx=t.stopx+f):(Ot.insert(t.startx,t.starty,t.stopx+f,t.stopy+h.height/2+lt.noteMargin),t.stopx=t.stopx-f)}a(l,"receiverAdjustment");function u(h,f){h.x<i.get(e.to).x?(Ot.insert(t.startx-f,t.starty,t.stopx,t.stopy+h.height/2+lt.noteMargin),t.startx=t.startx+f):(Ot.insert(t.stopx,t.starty,t.startx+f,t.stopy+h.height/2+lt.noteMargin),t.startx=t.startx-f)}if(a(u,"senderAdjustment"),s.get(e.to)==n){let h=i.get(e.to),f=h.type=="actor"?Zc/2+3:h.width/2+3;l(h,f),h.starty=r-h.height/2,Ot.bumpVerticalPos(h.height/2)}else if(o.get(e.from)==n){let h=i.get(e.from);if(lt.mirrorActors){let f=h.type=="actor"?Zc/2:h.width/2;u(h,f)}h.stopy=r-h.height/2,Ot.bumpVerticalPos(h.height/2)}else if(o.get(e.to)==n){let h=i.get(e.to);if(lt.mirrorActors){let f=h.type=="actor"?Zc/2+3:h.width/2+3;l(h,f)}h.stopy=r-h.height/2,Ot.bumpVerticalPos(h.height/2)}}async function xDt(e,t,r){let n={};for(let i of t)if(e.get(i.to)&&e.get(i.from)){let s=e.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!s.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!s.nextActor)continue;let o=i.placement!==void 0,l=!o,u=o?_m(lt):Hh(lt),h=i.wrap?ae.wrapLabel(i.message,lt.width-2*lt.wrapPadding,u):i.message,d=(_n(h)?await pu(i.message,X()):ae.calculateTextDimensions(h,u)).width+2*lt.wrapPadding;l&&i.from===s.nextActor?n[i.to]=Lt.getMax(n[i.to]||0,d):l&&i.from===s.prevActor?n[i.from]=Lt.getMax(n[i.from]||0,d):l&&i.from===i.to?(n[i.from]=Lt.getMax(n[i.from]||0,d/2),n[i.to]=Lt.getMax(n[i.to]||0,d/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=Lt.getMax(n[i.from]||0,d):i.placement===r.db.PLACEMENT.LEFTOF?n[s.prevActor]=Lt.getMax(n[s.prevActor]||0,d):i.placement===r.db.PLACEMENT.OVER&&(s.prevActor&&(n[s.prevActor]=Lt.getMax(n[s.prevActor]||0,d/2)),s.nextActor&&(n[i.from]=Lt.getMax(n[i.from]||0,d/2)))}return B.debug("maxMessageWidthPerActor:",n),n}async function kDt(e,t,r){let n=0;for(let s of e.keys()){let o=e.get(s);o.wrap&&(o.description=ae.wrapLabel(o.description,lt.width-2*lt.wrapPadding,pN(lt)));let l=_n(o.description)?await pu(o.description,X()):ae.calculateTextDimensions(o.description,pN(lt));o.width=o.wrap?lt.width:Lt.getMax(lt.width,l.width+2*lt.wrapPadding),o.height=o.wrap?Lt.getMax(l.height,lt.height):lt.height,n=Lt.getMax(n,o.height)}for(let s in t){let o=e.get(s);if(!o)continue;let l=e.get(o.nextActor);if(!l){let d=t[s]+lt.actorMargin-o.width/2;o.margin=Lt.getMax(d,lt.actorMargin);continue}let h=t[s]+lt.actorMargin-o.width/2-l.width/2;o.margin=Lt.getMax(h,lt.actorMargin)}let i=0;return r.forEach(s=>{let o=Hh(lt),l=s.actorKeys.reduce((f,d)=>f+=e.get(d).width+(e.get(d).margin||0),0);l-=2*lt.boxTextMargin,s.wrap&&(s.name=ae.wrapLabel(s.name,l-2*lt.wrapPadding,o));let u=ae.calculateTextDimensions(s.name,o);i=Lt.getMax(u.height,i);let h=Lt.getMax(l,u.width+2*lt.wrapPadding);if(s.margin=lt.boxTextMargin,l<h){let f=(h-l)/2;s.margin+=f}}),r.forEach(s=>s.textMaxHeight=i),Lt.getMax(n,lt.height)}var lt,Ot,fDt,Hh,_m,pN,pDt,mDt,mN,$nt,Gnt,DC,Fnt,yDt,bDt,TDt,SDt,CDt,Vnt,znt=x(()=>{"use strict";$e();Bnt();Gt();Pe();Pe();o0();pe();af();we();Mn();lt={},Ot={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:a(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:a(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:a(function(e){this.boxes.push(e)},"addBox"),addActor:a(function(e){this.actors.push(e)},"addActor"),addLoop:a(function(e){this.loops.push(e)},"addLoop"),addMessage:a(function(e){this.messages.push(e)},"addMessage"),addNote:a(function(e){this.notes.push(e)},"addNote"),lastActor:a(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:a(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:a(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:a(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:a(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Gnt(X())},"init"),updateVal:a(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:a(function(e,t,r,n){let i=this,s=0;function o(l){return a(function(h){s++;let f=i.sequenceItems.length-s+1;i.updateVal(h,"starty",t-f*lt.boxMargin,Math.min),i.updateVal(h,"stopy",n+f*lt.boxMargin,Math.max),i.updateVal(Ot.data,"startx",e-f*lt.boxMargin,Math.min),i.updateVal(Ot.data,"stopx",r+f*lt.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",e-f*lt.boxMargin,Math.min),i.updateVal(h,"stopx",r+f*lt.boxMargin,Math.max),i.updateVal(Ot.data,"starty",t-f*lt.boxMargin,Math.min),i.updateVal(Ot.data,"stopy",n+f*lt.boxMargin,Math.max))},"updateItemBounds")}a(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:a(function(e,t,r,n){let i=Lt.getMin(e,r),s=Lt.getMax(e,r),o=Lt.getMin(t,n),l=Lt.getMax(t,n);this.updateVal(Ot.data,"startx",i,Math.min),this.updateVal(Ot.data,"starty",o,Math.min),this.updateVal(Ot.data,"stopx",s,Math.max),this.updateVal(Ot.data,"stopy",l,Math.max),this.updateBounds(i,o,s,l)},"insert"),newActivation:a(function(e,t,r){let n=r.get(e.from),i=DC(e.from).length||0,s=n.x+n.width/2+(i-1)*lt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+lt.activationWidth,stopy:void 0,actor:e.from,anchored:dn.anchorElement(t)})},"newActivation"),endActivation:a(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:a(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:a(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:a(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:a(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:a(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Ot.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:a(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:a(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:a(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=Lt.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:a(function(){return this.verticalPos},"getVerticalPos"),getBounds:a(function(){return{bounds:this.data,models:this.models}},"getBounds")},fDt=a(async function(e,t){Ot.bumpVerticalPos(lt.boxMargin),t.height=lt.boxMargin,t.starty=Ot.getVerticalPos();let r=Pa();r.x=t.startx,r.y=t.starty,r.width=t.width||lt.width,r.class="note";let n=e.append("g"),i=dn.drawRect(n,r),s=a0();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=lt.noteFontFamily,s.fontSize=lt.noteFontSize,s.fontWeight=lt.noteFontWeight,s.anchor=lt.noteAlign,s.textMargin=lt.noteMargin,s.valign="center";let o=_n(s.text)?await Gy(n,s):qh(n,s),l=Math.round(o.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));i.attr("height",l+2*lt.noteMargin),t.height+=l+2*lt.noteMargin,Ot.bumpVerticalPos(l+2*lt.noteMargin),t.stopy=t.starty+l+2*lt.noteMargin,t.stopx=t.startx+r.width,Ot.insert(t.startx,t.starty,t.stopx,t.stopy),Ot.models.addNote(t)},"drawNote"),Hh=a(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),_m=a(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),pN=a(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");a(dDt,"boundMessage");pDt=a(async function(e,t,r,n){let{startx:i,stopx:s,starty:o,message:l,type:u,sequenceIndex:h,sequenceVisible:f}=t,d=ae.calculateTextDimensions(l,Hh(lt)),p=a0();p.x=i,p.y=o+10,p.width=s-i,p.class="messageText",p.dy="1em",p.text=l,p.fontFamily=lt.messageFontFamily,p.fontSize=lt.messageFontSize,p.fontWeight=lt.messageFontWeight,p.anchor=lt.messageAlign,p.valign="center",p.textMargin=lt.wrapPadding,p.tspan=!1,_n(p.text)?await Gy(e,p,{startx:i,stopx:s,starty:r}):qh(e,p);let m=d.width,g;i===s?lt.rightAngles?g=e.append("path").attr("d",`M ${i},${r} H ${i+Lt.getMax(lt.width/2,m/2)} V ${r+25} H ${i}`):g=e.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=e.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",s),g.attr("y2",r)),u===n.db.LINETYPE.DOTTED||u===n.db.LINETYPE.DOTTED_CROSS||u===n.db.LINETYPE.DOTTED_POINT||u===n.db.LINETYPE.DOTTED_OPEN||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let y="";lt.arrowMarkerAbsolute&&(y=el(!0)),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(u===n.db.LINETYPE.SOLID||u===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+y+"#arrowhead)"),(u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+y+"#arrowhead)"),g.attr("marker-end","url("+y+"#arrowhead)")),(u===n.db.LINETYPE.SOLID_POINT||u===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+y+"#filled-head)"),(u===n.db.LINETYPE.SOLID_CROSS||u===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+y+"#crosshead)"),(f||lt.showSequenceNumbers)&&(g.attr("marker-start","url("+y+"#sequencenumber)"),e.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},"drawMessage"),mDt=a(function(e,t,r,n,i,s,o){let l=0,u=0,h,f=0;for(let d of n){let p=t.get(d),m=p.box;h&&h!=m&&(o||Ot.models.addBox(h),u+=lt.boxMargin+h.margin),m&&m!=h&&(o||(m.x=l+u,m.y=i),u+=m.margin),p.width=p.width||lt.width,p.height=Lt.getMax(p.height||lt.height,lt.height),p.margin=p.margin||lt.actorMargin,f=Lt.getMax(f,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=Ot.getVerticalPos(),Ot.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,Ot.models.addActor(p)}h&&!o&&Ot.models.addBox(h),Ot.bumpVerticalPos(f)},"addActorRenderingData"),mN=a(async function(e,t,r,n){if(n){let i=0;Ot.bumpVerticalPos(lt.boxMargin*2);for(let s of r){let o=t.get(s);o.stopy||(o.stopy=Ot.getVerticalPos());let l=await dn.drawActor(e,o,lt,!0);i=Lt.getMax(i,l)}Ot.bumpVerticalPos(i+lt.boxMargin)}else for(let i of r){let s=t.get(i);await dn.drawActor(e,s,lt,!1)}},"drawActors"),$nt=a(function(e,t,r,n){let i=0,s=0;for(let o of r){let l=t.get(o),u=bDt(l),h=dn.drawPopup(e,l,u,lt,lt.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>s&&(s=h.width+l.x)}return{maxHeight:i,maxWidth:s}},"drawActorsPopup"),Gnt=a(function(e){Hr(lt,e),e.fontFamily&&(lt.actorFontFamily=lt.noteFontFamily=lt.messageFontFamily=e.fontFamily),e.fontSize&&(lt.actorFontSize=lt.noteFontSize=lt.messageFontSize=e.fontSize),e.fontWeight&&(lt.actorFontWeight=lt.noteFontWeight=lt.messageFontWeight=e.fontWeight)},"setConf"),DC=a(function(e){return Ot.activations.filter(function(t){return t.actor===e})},"actorActivations"),Fnt=a(function(e,t){let r=t.get(e),n=DC(e),i=n.reduce(function(o,l){return Lt.getMin(o,l.startx)},r.x+r.width/2-1),s=n.reduce(function(o,l){return Lt.getMax(o,l.stopx)},r.x+r.width/2+1);return[i,s]},"activationBounds");a(Ko,"adjustLoopHeightForWrap");a(gDt,"adjustCreatedDestroyedData");yDt=a(async function(e,t,r,n){let{securityLevel:i,sequence:s}=X();lt=s;let o;i==="sandbox"&&(o=yt("#i"+t));let l=i==="sandbox"?yt(o.nodes()[0].contentDocument.body):yt("body"),u=i==="sandbox"?o.nodes()[0].contentDocument:document;Ot.init(),B.debug(n.db);let h=i==="sandbox"?l.select(`[id="${t}"]`):yt(`[id="${t}"]`),f=n.db.getActors(),d=n.db.getCreatedActors(),p=n.db.getDestroyedActors(),m=n.db.getBoxes(),g=n.db.getActorKeys(),y=n.db.getMessages(),b=n.db.getDiagramTitle(),k=n.db.hasAtLeastOneBox(),T=n.db.hasAtLeastOneBoxWithTitle(),_=await xDt(f,y,n);if(lt.height=await kDt(f,_,m),dn.insertComputerIcon(h),dn.insertDatabaseIcon(h),dn.insertClockIcon(h),k&&(Ot.bumpVerticalPos(lt.boxMargin),T&&Ot.bumpVerticalPos(m[0].textMaxHeight)),lt.hideUnusedParticipants===!0){let I=new Set;y.forEach(M=>{I.add(M.from),I.add(M.to)}),g=g.filter(M=>I.has(M))}mDt(h,f,d,g,0,y,!1);let L=await CDt(y,f,_,n);dn.insertArrowHead(h),dn.insertArrowCrossHead(h),dn.insertArrowFilledHead(h),dn.insertSequenceNumber(h);function w(I,M){let V=Ot.endActivation(I);V.starty+18>M&&(V.starty=M-6,M+=12),dn.drawActivation(h,V,M,lt,DC(I.from).length),Ot.insert(V.startx,M-10,V.stopx,M)}a(w,"activeEnd");let D=1,$=1,E=[],R=[],F=0;for(let I of y){let M,V,G;switch(I.type){case n.db.LINETYPE.NOTE:Ot.resetVerticalPos(),V=I.noteModel,await fDt(h,V);break;case n.db.LINETYPE.ACTIVE_START:Ot.newActivation(I,h,f);break;case n.db.LINETYPE.ACTIVE_END:w(I,Ot.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.LOOP_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"loop",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.RECT_START:Ko(L,I,lt.boxMargin,lt.boxMargin,j=>Ot.newLoop(void 0,j.message));break;case n.db.LINETYPE.RECT_END:M=Ot.endLoop(),R.push(M),Ot.models.addLoop(M),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.OPT_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"opt",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.ALT_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.ALT_ELSE:Ko(L,I,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,j=>Ot.addSectionToLoop(j));break;case n.db.LINETYPE.ALT_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"alt",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j)),Ot.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Ko(L,I,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,j=>Ot.addSectionToLoop(j));break;case n.db.LINETYPE.PAR_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"par",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.AUTONUMBER:D=I.message.start||D,$=I.message.step||$,I.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.CRITICAL_OPTION:Ko(L,I,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,j=>Ot.addSectionToLoop(j));break;case n.db.LINETYPE.CRITICAL_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"critical",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.BREAK_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.BREAK_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"break",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;default:try{G=I.msgModel,G.starty=Ot.getVerticalPos(),G.sequenceIndex=D,G.sequenceVisible=n.db.showSequenceNumbers();let j=await dDt(h,G);gDt(I,G,j,F,f,d,p),E.push({messageModel:G,lineStartY:j}),Ot.models.addMessage(G)}catch(j){B.error("error while drawing message",j)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(I.type)&&(D=D+$),F++}B.debug("createdActors",d),B.debug("destroyedActors",p),await mN(h,f,g,!1);for(let I of E)await pDt(h,I.messageModel,I.lineStartY,n);lt.mirrorActors&&await mN(h,f,g,!0),R.forEach(I=>dn.drawBackgroundRect(h,I)),fN(h,f,g,lt);for(let I of Ot.models.boxes)I.height=Ot.getVerticalPos()-I.y,Ot.insert(I.x,I.y,I.x+I.width,I.height),I.startx=I.x,I.starty=I.y,I.stopx=I.startx+I.width,I.stopy=I.starty+I.height,I.stroke="rgb(0,0,0, 0.5)",dn.drawBox(h,I,lt);k&&Ot.bumpVerticalPos(lt.boxMargin);let S=$nt(h,f,g,u),{bounds:O}=Ot.getBounds();O.startx===void 0&&(O.startx=0),O.starty===void 0&&(O.starty=0),O.stopx===void 0&&(O.stopx=0),O.stopy===void 0&&(O.stopy=0);let v=O.stopy-O.starty;v<S.maxHeight&&(v=S.maxHeight);let C=v+2*lt.diagramMarginY;lt.mirrorActors&&(C=C-lt.boxMargin+lt.bottomMarginAdj);let A=O.stopx-O.startx;A<S.maxWidth&&(A=S.maxWidth);let N=A+2*lt.diagramMarginX;b&&h.append("text").text(b).attr("x",(O.stopx-O.startx)/2-2*lt.diagramMarginX).attr("y",-25),Ar(h,C,N,lt.useMaxWidth);let P=b?40:0;h.attr("viewBox",O.startx-lt.diagramMarginX+" -"+(lt.diagramMarginY+P)+" "+N+" "+(C+P)),B.debug("models:",Ot.models)},"draw");a(xDt,"getMaxMessageWidthPerActor");bDt=a(function(e){let t=0,r=pN(lt);for(let n in e.links){let s=ae.calculateTextDimensions(n,r).width+2*lt.wrapPadding+2*lt.boxMargin;t<s&&(t=s)}return t},"getRequiredPopupWidth");a(kDt,"calculateActorMargins");TDt=a(async function(e,t,r){let n=t.get(e.from),i=t.get(e.to),s=n.x,o=i.x,l=e.wrap&&e.message,u=_n(e.message)?await pu(e.message,X()):ae.calculateTextDimensions(l?ae.wrapLabel(e.message,lt.width,_m(lt)):e.message,_m(lt)),h={width:l?lt.width:Lt.getMax(lt.width,u.width+2*lt.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===r.db.PLACEMENT.RIGHTOF?(h.width=l?Lt.getMax(lt.width,u.width):Lt.getMax(n.width/2+i.width/2,u.width+2*lt.noteMargin),h.startx=s+(n.width+lt.actorMargin)/2):e.placement===r.db.PLACEMENT.LEFTOF?(h.width=l?Lt.getMax(lt.width,u.width+2*lt.noteMargin):Lt.getMax(n.width/2+i.width/2,u.width+2*lt.noteMargin),h.startx=s-h.width+(n.width-lt.actorMargin)/2):e.to===e.from?(u=ae.calculateTextDimensions(l?ae.wrapLabel(e.message,Lt.getMax(lt.width,n.width),_m(lt)):e.message,_m(lt)),h.width=l?Lt.getMax(lt.width,n.width):Lt.getMax(n.width,lt.width,u.width+2*lt.noteMargin),h.startx=s+(n.width-h.width)/2):(h.width=Math.abs(s+n.width/2-(o+i.width/2))+lt.actorMargin,h.startx=s<o?s+n.width/2-lt.actorMargin/2:o+i.width/2-lt.actorMargin/2),l&&(h.message=ae.wrapLabel(e.message,h.width-2*lt.wrapPadding,_m(lt))),B.debug(`NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${e.message}]`),h},"buildNoteModel"),SDt=a(function(e,t,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[n,i]=Fnt(e.from,t),[s,o]=Fnt(e.to,t),l=n<=s,u=l?i:n,h=l?s:o,f=Math.abs(s-o)>2,d=a(y=>l?-y:y,"adjustValue");e.from===e.to?h=u:(e.activate&&!f&&(h+=d(lt.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(u-=d(3)));let p=[n,i,s,o],m=Math.abs(u-h);e.wrap&&e.message&&(e.message=ae.wrapLabel(e.message,Lt.getMax(m+2*lt.wrapPadding,lt.width),Hh(lt)));let g=ae.calculateTextDimensions(e.message,Hh(lt));return{width:Lt.getMax(e.wrap?0:g.width+2*lt.wrapPadding,m+2*lt.wrapPadding,lt.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},"buildMessageModel"),CDt=a(async function(e,t,r,n){let i={},s=[],o,l,u;for(let h of e){switch(h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:s.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(o=s.pop(),i[o.id]=o,i[h.id]=o,s.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=s.pop(),i[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:{let d=t.get(h.from?h.from:h.to.actor),p=DC(h.from?h.from:h.to.actor).length,m=d.x+d.width/2+(p-1)*lt.activationWidth/2,g={startx:m,stopx:m+lt.activationWidth,actor:h.from,enabled:!0};Ot.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let d=Ot.activations.map(p=>p.actor).lastIndexOf(h.from);Ot.activations.splice(d,1).splice(0,1)}break}h.placement!==void 0?(l=await TDt(h,t,n),h.noteModel=l,s.forEach(d=>{o=d,o.from=Lt.getMin(o.from,l.startx),o.to=Lt.getMax(o.to,l.startx+l.width),o.width=Lt.getMax(o.width,Math.abs(o.from-o.to))-lt.labelBoxWidth})):(u=SDt(h,t,n),h.msgModel=u,u.startx&&u.stopx&&s.length>0&&s.forEach(d=>{if(o=d,u.startx===u.stopx){let p=t.get(h.from),m=t.get(h.to);o.from=Lt.getMin(p.x-u.width/2,p.x-p.width/2,o.from),o.to=Lt.getMax(m.x+u.width/2,m.x+p.width/2,o.to),o.width=Lt.getMax(o.width,Math.abs(o.to-o.from))-lt.labelBoxWidth}else o.from=Lt.getMin(u.startx,o.from),o.to=Lt.getMax(u.stopx,o.to),o.width=Lt.getMax(o.width,u.width)-lt.labelBoxWidth}))}return Ot.activations=[],B.debug("Loop type widths:",i),i},"calculateLoopBounds"),Vnt={bounds:Ot,drawActors:mN,drawActorsPopup:$nt,setConf:Gnt,draw:yDt}});var Wnt={};Me(Wnt,{diagram:()=>_Dt});var _Dt,Unt=x(()=>{"use strict";Ent();Ant();Rnt();pe();znt();_Dt={parser:vnt,get db(){return new RC},renderer:Vnt,styles:Lnt,init:a(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,lg({sequence:{wrap:e.wrap}}))},"init")}});var gN,NC,yN=x(()=>{"use strict";gN=function(){var e=a(function(It,bt,ht,Dt){for(ht=ht||{},Dt=It.length;Dt--;ht[It[Dt]]=bt);return ht},"o"),t=[1,18],r=[1,19],n=[1,20],i=[1,41],s=[1,42],o=[1,26],l=[1,24],u=[1,25],h=[1,32],f=[1,33],d=[1,34],p=[1,45],m=[1,35],g=[1,36],y=[1,37],b=[1,38],k=[1,27],T=[1,28],_=[1,29],L=[1,30],w=[1,31],D=[1,44],$=[1,46],E=[1,43],R=[1,47],F=[1,9],S=[1,8,9],O=[1,58],v=[1,59],C=[1,60],A=[1,61],N=[1,62],P=[1,63],I=[1,64],M=[1,8,9,41],V=[1,76],G=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],j=[1,8,9,12,13,18,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],tt=[13,58,84,99,101,102],ct=[13,58,71,72,84,99,101,102],H=[13,58,66,67,68,69,70,84,99,101,102],kt=[1,99],dt=[1,116],gt=[1,108],ot=[1,114],it=[1,109],at=[1,110],K=[1,111],Q=[1,112],st=[1,113],W=[1,115],mt=[22,58,59,80,84,85,86,87,88,89],q=[1,8,9,39,41,44],et=[1,8,9,22],ke=[1,144],ut=[1,8,9,59],jt=[1,8,9,22,58,59,80,84,85,86,87,88,89],Ne={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[17,1],[53,1]],performAction:a(function(bt,ht,Dt,Z,Nt,z,Wt){var U=z.length-1;switch(Nt){case 8:this.$=z[U-1];break;case 9:case 10:case 13:case 15:this.$=z[U];break;case 11:case 14:this.$=z[U-2]+"."+z[U];break;case 12:case 16:this.$=z[U-1]+z[U];break;case 17:case 18:this.$=z[U-1]+"~"+z[U]+"~";break;case 19:Z.addRelation(z[U]);break;case 20:z[U-1].title=Z.cleanupLabel(z[U]),Z.addRelation(z[U-1]);break;case 31:this.$=z[U].trim(),Z.setAccTitle(this.$);break;case 32:case 33:this.$=z[U].trim(),Z.setAccDescription(this.$);break;case 34:Z.addClassesToNamespace(z[U-3],z[U-1]);break;case 35:Z.addClassesToNamespace(z[U-4],z[U-1]);break;case 36:this.$=z[U],Z.addNamespace(z[U]);break;case 37:this.$=[z[U]];break;case 38:this.$=[z[U-1]];break;case 39:z[U].unshift(z[U-2]),this.$=z[U];break;case 41:Z.setCssClass(z[U-2],z[U]);break;case 42:Z.addMembers(z[U-3],z[U-1]);break;case 43:Z.setCssClass(z[U-5],z[U-3]),Z.addMembers(z[U-5],z[U-1]);break;case 44:this.$=z[U],Z.addClass(z[U]);break;case 45:this.$=z[U-1],Z.addClass(z[U-1]),Z.setClassLabel(z[U-1],z[U]);break;case 46:Z.addAnnotation(z[U],z[U-2]);break;case 47:case 60:this.$=[z[U]];break;case 48:z[U].push(z[U-1]),this.$=z[U];break;case 49:break;case 50:Z.addMember(z[U-1],Z.cleanupLabel(z[U]));break;case 51:break;case 52:break;case 53:this.$={id1:z[U-2],id2:z[U],relation:z[U-1],relationTitle1:"none",relationTitle2:"none"};break;case 54:this.$={id1:z[U-3],id2:z[U],relation:z[U-1],relationTitle1:z[U-2],relationTitle2:"none"};break;case 55:this.$={id1:z[U-3],id2:z[U],relation:z[U-2],relationTitle1:"none",relationTitle2:z[U-1]};break;case 56:this.$={id1:z[U-4],id2:z[U],relation:z[U-2],relationTitle1:z[U-3],relationTitle2:z[U-1]};break;case 57:Z.addNote(z[U],z[U-1]);break;case 58:Z.addNote(z[U]);break;case 59:this.$=z[U-2],Z.defineClass(z[U-1],z[U]);break;case 61:this.$=z[U-2].concat([z[U]]);break;case 62:Z.setDirection("TB");break;case 63:Z.setDirection("BT");break;case 64:Z.setDirection("RL");break;case 65:Z.setDirection("LR");break;case 66:this.$={type1:z[U-2],type2:z[U],lineType:z[U-1]};break;case 67:this.$={type1:"none",type2:z[U],lineType:z[U-1]};break;case 68:this.$={type1:z[U-1],type2:"none",lineType:z[U]};break;case 69:this.$={type1:"none",type2:"none",lineType:z[U]};break;case 70:this.$=Z.relationType.AGGREGATION;break;case 71:this.$=Z.relationType.EXTENSION;break;case 72:this.$=Z.relationType.COMPOSITION;break;case 73:this.$=Z.relationType.DEPENDENCY;break;case 74:this.$=Z.relationType.LOLLIPOP;break;case 75:this.$=Z.lineType.LINE;break;case 76:this.$=Z.lineType.DOTTED_LINE;break;case 77:case 83:this.$=z[U-2],Z.setClickEvent(z[U-1],z[U]);break;case 78:case 84:this.$=z[U-3],Z.setClickEvent(z[U-2],z[U-1]),Z.setTooltip(z[U-2],z[U]);break;case 79:this.$=z[U-2],Z.setLink(z[U-1],z[U]);break;case 80:this.$=z[U-3],Z.setLink(z[U-2],z[U-1],z[U]);break;case 81:this.$=z[U-3],Z.setLink(z[U-2],z[U-1]),Z.setTooltip(z[U-2],z[U]);break;case 82:this.$=z[U-4],Z.setLink(z[U-3],z[U-2],z[U]),Z.setTooltip(z[U-3],z[U-1]);break;case 85:this.$=z[U-3],Z.setClickEvent(z[U-2],z[U-1],z[U]);break;case 86:this.$=z[U-4],Z.setClickEvent(z[U-3],z[U-2],z[U-1]),Z.setTooltip(z[U-3],z[U]);break;case 87:this.$=z[U-3],Z.setLink(z[U-2],z[U]);break;case 88:this.$=z[U-4],Z.setLink(z[U-3],z[U-1],z[U]);break;case 89:this.$=z[U-4],Z.setLink(z[U-3],z[U-1]),Z.setTooltip(z[U-3],z[U]);break;case 90:this.$=z[U-5],Z.setLink(z[U-4],z[U-2],z[U]),Z.setTooltip(z[U-4],z[U-1]);break;case 91:this.$=z[U-2],Z.setCssStyle(z[U-1],z[U]);break;case 92:Z.setCssClass(z[U-1],z[U]);break;case 93:this.$=[z[U]];break;case 94:z[U-2].push(z[U]),this.$=z[U-2];break;case 96:this.$=z[U-1]+z[U];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:n,38:22,42:i,43:23,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:w,84:D,99:$,101:E,102:R},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(F,[2,5],{8:[1,48]}),{8:[1,49]},e(S,[2,19],{22:[1,50]}),e(S,[2,21]),e(S,[2,22]),e(S,[2,23]),e(S,[2,24]),e(S,[2,25]),e(S,[2,26]),e(S,[2,27]),e(S,[2,28]),e(S,[2,29]),e(S,[2,30]),{34:[1,51]},{36:[1,52]},e(S,[2,33]),e(S,[2,49],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:O,67:v,68:C,69:A,70:N,71:P,72:I}),{39:[1,65]},e(M,[2,40],{39:[1,67],44:[1,66]}),e(S,[2,51]),e(S,[2,52]),{16:68,58:p,84:D,99:$,101:E},{16:39,17:40,19:69,58:p,84:D,99:$,101:E,102:R},{16:39,17:40,19:70,58:p,84:D,99:$,101:E,102:R},{16:39,17:40,19:71,58:p,84:D,99:$,101:E,102:R},{58:[1,72]},{13:[1,73]},{16:39,17:40,19:74,58:p,84:D,99:$,101:E,102:R},{13:V,53:75},{56:77,58:[1,78]},e(S,[2,62]),e(S,[2,63]),e(S,[2,64]),e(S,[2,65]),e(G,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],58:p,84:D,99:$,101:E,102:R}),e(G,[2,15],{20:[1,82]}),{15:83,16:84,17:85,58:p,84:D,99:$,101:E,102:R},{16:39,17:40,19:86,58:p,84:D,99:$,101:E,102:R},e(j,[2,119]),e(j,[2,120]),e(j,[2,121]),e(j,[2,122]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,123]),e(F,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:t,35:r,37:n,42:i,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:w,84:D,99:$,101:E,102:R}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:n,38:22,42:i,43:23,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:w,84:D,99:$,101:E,102:R},e(S,[2,20]),e(S,[2,31]),e(S,[2,32]),{13:[1,90],16:39,17:40,19:89,58:p,84:D,99:$,101:E,102:R},{51:91,64:56,65:57,66:O,67:v,68:C,69:A,70:N,71:P,72:I},e(S,[2,50]),{65:92,71:P,72:I},e(tt,[2,69],{64:93,66:O,67:v,68:C,69:A,70:N}),e(ct,[2,70]),e(ct,[2,71]),e(ct,[2,72]),e(ct,[2,73]),e(ct,[2,74]),e(H,[2,75]),e(H,[2,76]),{8:[1,95],24:96,40:94,43:23,46:s},{16:97,58:p,84:D,99:$,101:E},{45:98,49:kt},{48:[1,100]},{13:[1,101]},{13:[1,102]},{77:[1,103],79:[1,104]},{22:dt,57:105,58:gt,80:ot,82:106,83:107,84:it,85:at,86:K,87:Q,88:st,89:W},{58:[1,117]},{13:V,53:118},e(S,[2,58]),e(S,[2,124]),{22:dt,57:119,58:gt,59:[1,120],80:ot,82:106,83:107,84:it,85:at,86:K,87:Q,88:st,89:W},e(mt,[2,60]),{16:39,17:40,19:121,58:p,84:D,99:$,101:E,102:R},e(G,[2,16]),e(G,[2,17]),e(G,[2,18]),{39:[2,36]},{15:123,16:84,17:85,18:[1,122],39:[2,9],58:p,84:D,99:$,101:E,102:R},{39:[2,10]},e(q,[2,44],{11:124,12:[1,125]}),e(F,[2,7]),{9:[1,126]},e(et,[2,53]),{16:39,17:40,19:127,58:p,84:D,99:$,101:E,102:R},{13:[1,129],16:39,17:40,19:128,58:p,84:D,99:$,101:E,102:R},e(tt,[2,68],{64:130,66:O,67:v,68:C,69:A,70:N}),e(tt,[2,67]),{41:[1,131]},{24:96,40:132,43:23,46:s},{8:[1,133],41:[2,37]},e(M,[2,41],{39:[1,134]}),{41:[1,135]},{41:[2,47],45:136,49:kt},{16:39,17:40,19:137,58:p,84:D,99:$,101:E,102:R},e(S,[2,77],{13:[1,138]}),e(S,[2,79],{13:[1,140],75:[1,139]}),e(S,[2,83],{13:[1,141],78:[1,142]}),{13:[1,143]},e(S,[2,91],{59:ke}),e(ut,[2,93],{83:145,22:dt,58:gt,80:ot,84:it,85:at,86:K,87:Q,88:st,89:W}),e(jt,[2,95]),e(jt,[2,97]),e(jt,[2,98]),e(jt,[2,99]),e(jt,[2,100]),e(jt,[2,101]),e(jt,[2,102]),e(jt,[2,103]),e(jt,[2,104]),e(jt,[2,105]),e(S,[2,92]),e(S,[2,57]),e(S,[2,59],{59:ke}),{58:[1,146]},e(G,[2,14]),{15:147,16:84,17:85,58:p,84:D,99:$,101:E,102:R},{39:[2,12]},e(q,[2,45]),{13:[1,148]},{1:[2,4]},e(et,[2,55]),e(et,[2,54]),{16:39,17:40,19:149,58:p,84:D,99:$,101:E,102:R},e(tt,[2,66]),e(S,[2,34]),{41:[1,150]},{24:96,40:151,41:[2,38],43:23,46:s},{45:152,49:kt},e(M,[2,42]),{41:[2,48]},e(S,[2,46]),e(S,[2,78]),e(S,[2,80]),e(S,[2,81],{75:[1,153]}),e(S,[2,84]),e(S,[2,85],{13:[1,154]}),e(S,[2,87],{13:[1,156],75:[1,155]}),{22:dt,58:gt,80:ot,82:157,83:107,84:it,85:at,86:K,87:Q,88:st,89:W},e(jt,[2,96]),e(mt,[2,61]),{39:[2,11]},{14:[1,158]},e(et,[2,56]),e(S,[2,35]),{41:[2,39]},{41:[1,159]},e(S,[2,82]),e(S,[2,86]),e(S,[2,88]),e(S,[2,89],{75:[1,160]}),e(ut,[2,94],{83:145,22:dt,58:gt,80:ot,84:it,85:at,86:K,87:Q,88:st,89:W}),e(q,[2,8]),e(M,[2,43]),e(S,[2,90])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],123:[2,12],126:[2,4],136:[2,48],147:[2,11],151:[2,39]},parseError:a(function(bt,ht){if(ht.recoverable)this.trace(bt);else{var Dt=new Error(bt);throw Dt.hash=ht,Dt}},"parseError"),parse:a(function(bt){var ht=this,Dt=[0],Z=[],Nt=[null],z=[],Wt=this.table,U="",Ct=0,xt=0,Xt=0,Mt=2,St=1,ze=z.slice.call(arguments,1),Pt=Object.create(this.lexer),or={yy:{}};for(var ir in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ir)&&(or.yy[ir]=this.yy[ir]);Pt.setInput(bt,or.yy),or.yy.lexer=Pt,or.yy.parser=this,typeof Pt.yylloc>"u"&&(Pt.yylloc={});var xr=Pt.yylloc;z.push(xr);var sr=Pt.options&&Pt.options.ranges;typeof or.yy.parseError=="function"?this.parseError=or.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(re){Dt.length=Dt.length-2*re,Nt.length=Nt.length-re,z.length=z.length-re}a(Te,"popStack");function Ke(){var re;return re=Z.pop()||Pt.lex()||St,typeof re!="number"&&(re instanceof Array&&(Z=re,re=Z.pop()),re=ht.symbols_[re]||re),re}a(Ke,"lex");for(var Se,hr,kn,Ee,Fe,Ae,ye={},fe,ge,xe,Ht;;){if(kn=Dt[Dt.length-1],this.defaultActions[kn]?Ee=this.defaultActions[kn]:((Se===null||typeof Se>"u")&&(Se=Ke()),Ee=Wt[kn]&&Wt[kn][Se]),typeof Ee>"u"||!Ee.length||!Ee[0]){var Rn="";Ht=[];for(fe in Wt[kn])this.terminals_[fe]&&fe>Mt&&Ht.push("'"+this.terminals_[fe]+"'");Pt.showPosition?Rn="Parse error on line "+(Ct+1)+`:
1127
+ `,"getStyles"),Lnt=qRt});var uN,Zc,Nnt,Int,HRt,Dnt,hN,YRt,XRt,Gy,qh,Mnt,Xo,fN,KRt,QRt,ZRt,JRt,tDt,eDt,rDt,Ont,nDt,iDt,sDt,aDt,oDt,lDt,cDt,Pnt,uDt,dN,hDt,dn,Bnt=x(()=>{"use strict";uN=Zi(Gf(),1);cn();we();Pe();o0();Zc=18*2,Nnt="actor-top",Int="actor-bottom",HRt="actor-box",Dnt="actor-man",hN=a(function(e,t){return Bu(e,t)},"drawRect"),YRt=a(function(e,t,r,n,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let s=t.links,o=t.actorCnt,l=t.rectData;var u="none";i&&(u="block !important");let h=e.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var f="";l.class!==void 0&&(f=" "+l.class);let d=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+f),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",d),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),s!=null){var m=20;for(let b in s){var g=h.append("a"),y=(0,uN.sanitizeUrl)(s[b]);g.attr("xlink:href",y),g.attr("target","_blank"),hDt(n)(b,g,l.x+10,l.height+m,d,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:l.height+m,width:d}},"drawPopup"),XRt=a(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Gy=a(async function(e,t,r=null){let n=e.append("foreignObject"),i=await Kl(t.text,be()),o=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),t.class==="noteText"){let l=e.node().firstChild;l.setAttribute("height",o.height+2*t.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-o.width/2)).attr("y",Math.round(u.y+u.height/2-o.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let f=l;l=u,u=f}n.attr("x",Math.round(l+Math.abs(l-u)/2-o.width/2)),t.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-o.height))}return[n]},"drawKatex"),qh=a(function(e,t){let r=0,n=0,i=t.text.split(Lt.lineBreakRegex),[s,o]=xo(t.fontSize),l=[],u=0,h=a(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=a(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=a(()=>Math.round(t.y+(r+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=a(()=>Math.round(t.y+(r+n+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[f,d]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&s!==void 0&&(u=f*s);let p=e.append("text");p.attr("x",t.x),p.attr("y",h()),t.anchor!==void 0&&p.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&p.style("font-family",t.fontFamily),o!==void 0&&p.style("font-size",o),t.fontWeight!==void 0&&p.style("font-weight",t.fontWeight),t.fill!==void 0&&p.attr("fill",t.fill),t.class!==void 0&&p.attr("class",t.class),t.dy!==void 0?p.attr("dy",t.dy):u!==0&&p.attr("dy",u);let m=d||b4;if(t.tspan){let g=p.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(m)}else p.text(m);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p)}return l},"drawText"),Mnt=a(function(e,t){function r(i,s,o,l,u){return i+","+s+" "+(i+o)+","+s+" "+(i+o)+","+(s+l-u)+" "+(i+o-u*1.2)+","+(s+l)+" "+i+","+(s+l)}a(r,"genPoints");let n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,qh(e,t),n},"drawLabel"),Xo=-1,fN=a((e,t,r,n)=>{e.select&&r.forEach(i=>{let s=t.get(i),o=e.select("#actor"+s.actorCnt);!n.mirrorActors&&s.stopy?o.attr("y2",s.stopy+s.height/2):n.mirrorActors&&o.attr("y2",s.stopy)})},"fixLifeLineHeights"),KRt=a(function(e,t,r,n){let i=n?t.stopy:t.starty,s=t.x+t.width/2,o=i+t.height,l=e.append("g").lower();var u=l;n||(Xo++,Object.keys(t.links||{}).length&&!r.forceMenus&&u.attr("onclick",XRt(`actor${Xo}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+Xo).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),u=l.append("g"),t.actorCnt=Xo,t.links!=null&&u.attr("id","root-"+Xo));let h=Pa();var f="actor";t.properties?.class?f=t.properties.class:h.fill="#eaeaea",n?f+=` ${Int}`:f+=` ${Nnt}`,h.x=t.x,h.y=i,h.width=t.width,h.height=t.height,h.class=f,h.rx=3,h.ry=3,h.name=t.name;let d=hN(u,h);if(t.rectData=h,t.properties?.icon){let m=t.properties.icon.trim();m.charAt(0)==="@"?qB(u,h.x+h.width-20,h.y+10,m.substr(1)):jB(u,h.x+h.width-20,h.y+10,m)}dN(r,_n(t.description))(t.description,u,h.x,h.y,h.width,h.height,{class:`actor ${HRt}`},r);let p=t.height;if(d.node){let m=d.node().getBBox();t.height=m.height,p=m.height}return p},"drawActorTypeParticipant"),QRt=a(function(e,t,r,n){let i=n?t.stopy:t.starty,s=t.x+t.width/2,o=i+80,l=e.append("g").lower();n||(Xo++,l.append("line").attr("id","actor"+Xo).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=Xo);let u=e.append("g"),h=Dnt;n?h+=` ${Int}`:h+=` ${Nnt}`,u.attr("class",h),u.attr("name",t.name);let f=Pa();f.x=t.x,f.y=i,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor",f.rx=3,f.ry=3,u.append("line").attr("id","actor-man-torso"+Xo).attr("x1",s).attr("y1",i+25).attr("x2",s).attr("y2",i+45),u.append("line").attr("id","actor-man-arms"+Xo).attr("x1",s-Zc/2).attr("y1",i+33).attr("x2",s+Zc/2).attr("y2",i+33),u.append("line").attr("x1",s-Zc/2).attr("y1",i+60).attr("x2",s).attr("y2",i+45),u.append("line").attr("x1",s).attr("y1",i+45).attr("x2",s+Zc/2-2).attr("y2",i+60);let d=u.append("circle");d.attr("cx",t.x+t.width/2),d.attr("cy",i+10),d.attr("r",15),d.attr("width",t.width),d.attr("height",t.height);let p=u.node().getBBox();return t.height=p.height,dN(r,_n(t.description))(t.description,u,f.x,f.y+35,f.width,f.height,{class:`actor ${Dnt}`},r),t.height},"drawActorTypeActor"),ZRt=a(async function(e,t,r,n){switch(t.type){case"actor":return await QRt(e,t,r,n);case"participant":return await KRt(e,t,r,n)}},"drawActor"),JRt=a(function(e,t,r){let i=e.append("g");Ont(i,t),t.name&&dN(r)(t.name,i,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),i.lower()},"drawBox"),tDt=a(function(e){return e.append("g")},"anchorElement"),eDt=a(function(e,t,r,n,i){let s=Pa(),o=t.anchored;s.x=t.startx,s.y=t.starty,s.class="activation"+i%3,s.width=t.stopx-t.startx,s.height=r-t.starty,hN(o,s)},"drawActivation"),rDt=a(async function(e,t,r,n){let{boxMargin:i,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=n,d=e.append("g"),p=a(function(y,b,k,T){return d.append("line").attr("x1",y).attr("y1",b).attr("x2",k).attr("y2",T).attr("class","loopLine")},"drawLoopLine");p(t.startx,t.starty,t.stopx,t.starty),p(t.stopx,t.starty,t.stopx,t.stopy),p(t.startx,t.stopy,t.stopx,t.stopy),p(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(y){p(t.startx,y.y,t.stopx,y.y).style("stroke-dasharray","3, 3")});let m=a0();m.text=r,m.x=t.startx,m.y=t.starty,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=o||20,m.textMargin=s,m.class="labelText",Mnt(d,m),m=Pnt(),m.text=t.title,m.x=t.startx+l/2+(t.stopx-t.startx)/2,m.y=t.starty+i+s,m.anchor="middle",m.valign="middle",m.textMargin=s,m.class="loopText",m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=!0;let g=_n(m.text)?await Gy(d,m,t):qh(d,m);if(t.sectionTitles!==void 0){for(let[y,b]of Object.entries(t.sectionTitles))if(b.message){m.text=b.message,m.x=t.startx+(t.stopx-t.startx)/2,m.y=t.sections[y].y+i+s,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=t.wrap,_n(m.text)?(t.starty=t.sections[y].y,await Gy(d,m,t)):qh(d,m);let k=Math.round(g.map(T=>(T._groups||T)[0][0].getBBox().height).reduce((T,_)=>T+_));t.sections[y].height+=k-(i+s)}}return t.height=Math.round(t.stopy-t.starty),d},"drawLoop"),Ont=a(function(e,t){U2(e,t)},"drawBackgroundRect"),nDt=a(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),iDt=a(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),sDt=a(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),aDt=a(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),oDt=a(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),lDt=a(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),cDt=a(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Pnt=a(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),uDt=a(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),dN=function(){function e(s,o,l,u,h,f,d){let p=o.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(s);i(p,d)}a(e,"byText");function t(s,o,l,u,h,f,d,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[b,k]=xo(m),T=s.split(Lt.lineBreakRegex);for(let _=0;_<T.length;_++){let L=_*b-b*(T.length-1)/2,w=o.append("text").attr("x",l+h/2).attr("y",u).style("text-anchor","middle").style("font-size",k).style("font-weight",y).style("font-family",g);w.append("tspan").attr("x",l+h/2).attr("dy",L).text(T[_]),w.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(w,d)}}a(t,"byTspan");function r(s,o,l,u,h,f,d,p){let m=o.append("switch"),y=m.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),t(s,m,l,u,h,f,d,p),i(y,d)}a(r,"byFo");async function n(s,o,l,u,h,f,d,p){let m=await pu(s,be()),g=o.append("switch"),b=g.append("foreignObject").attr("x",l+h/2-m.width/2).attr("y",u+f/2-m.height/2).attr("width",m.width).attr("height",m.height).append("xhtml:div").style("height","100%").style("width","100%");b.append("div").style("text-align","center").style("vertical-align","middle").html(await Kl(s,be())),t(s,g,l,u,h,f,d,p),i(b,d)}a(n,"byKatex");function i(s,o){for(let l in o)o.hasOwnProperty(l)&&s.attr(l,o[l])}return a(i,"_setTextAttrs"),function(s,o=!1){return o?n:s.textPlacement==="fo"?r:s.textPlacement==="old"?e:t}}(),hDt=function(){function e(i,s,o,l,u,h,f){let d=s.append("text").attr("x",o).attr("y",l).style("text-anchor","start").text(i);n(d,f)}a(e,"byText");function t(i,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:m,actorFontWeight:g}=d,y=i.split(Lt.lineBreakRegex);for(let b=0;b<y.length;b++){let k=b*p-p*(y.length-1)/2,T=s.append("text").attr("x",o).attr("y",l).style("text-anchor","start").style("font-size",p).style("font-weight",g).style("font-family",m);T.append("tspan").attr("x",o).attr("dy",k).text(y[b]),T.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(T,f)}}a(t,"byTspan");function r(i,s,o,l,u,h,f,d){let p=s.append("switch"),g=p.append("foreignObject").attr("x",o).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,p,o,l,u,h,f,d),n(g,f)}a(r,"byFo");function n(i,s){for(let o in s)s.hasOwnProperty(o)&&i.attr(o,s[o])}return a(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?e:t}}(),dn={drawRect:hN,drawText:qh,drawLabel:Mnt,drawActor:ZRt,drawBox:JRt,drawPopup:YRt,anchorElement:tDt,drawActivation:eDt,drawLoop:rDt,drawBackgroundRect:Ont,insertArrowHead:aDt,insertArrowFilledHead:oDt,insertSequenceNumber:lDt,insertArrowCrossHead:cDt,insertDatabaseIcon:nDt,insertComputerIcon:iDt,insertClockIcon:sDt,getTextObj:Pnt,getNoteRect:uDt,fixLifeLineHeights:fN,sanitizeUrl:uN.sanitizeUrl}});async function dDt(e,t){Ot.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=t,s=Lt.splitBreaks(i).length,o=_n(i),l=o?await pu(i,X()):ae.calculateTextDimensions(i,Hh(lt));if(!o){let d=l.height/s;t.height+=d,Ot.bumpVerticalPos(d)}let u,h=l.height-10,f=l.width;if(r===n){u=Ot.getVerticalPos()+h,lt.rightAngles||(h+=lt.boxMargin,u=Ot.getVerticalPos()+h),h+=30;let d=Lt.getMax(f/2,lt.width/2);Ot.insert(r-d,Ot.getVerticalPos()-10+h,n+d,Ot.getVerticalPos()+30+h)}else h+=lt.boxMargin,u=Ot.getVerticalPos()+h,Ot.insert(r,u-10,n,u);return Ot.bumpVerticalPos(h),t.height+=h,t.stopy=t.starty+t.height,Ot.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),u}function Ko(e,t,r,n,i){Ot.bumpVerticalPos(r);let s=n;if(t.id&&t.message&&e[t.id]){let o=e[t.id].width,l=Hh(lt);t.message=ae.wrapLabel(`[${t.message}]`,o-2*lt.wrapPadding,l),t.width=o,t.wrap=!0;let u=ae.calculateTextDimensions(t.message,l),h=Lt.getMax(u.height,lt.labelBoxHeight);s=n+h,B.debug(`${h} - ${t.message}`)}i(t),Ot.bumpVerticalPos(s)}function gDt(e,t,r,n,i,s,o){function l(h,f){h.x<i.get(e.from).x?(Ot.insert(t.stopx-f,t.starty,t.startx,t.stopy+h.height/2+lt.noteMargin),t.stopx=t.stopx+f):(Ot.insert(t.startx,t.starty,t.stopx+f,t.stopy+h.height/2+lt.noteMargin),t.stopx=t.stopx-f)}a(l,"receiverAdjustment");function u(h,f){h.x<i.get(e.to).x?(Ot.insert(t.startx-f,t.starty,t.stopx,t.stopy+h.height/2+lt.noteMargin),t.startx=t.startx+f):(Ot.insert(t.stopx,t.starty,t.startx+f,t.stopy+h.height/2+lt.noteMargin),t.startx=t.startx-f)}if(a(u,"senderAdjustment"),s.get(e.to)==n){let h=i.get(e.to),f=h.type=="actor"?Zc/2+3:h.width/2+3;l(h,f),h.starty=r-h.height/2,Ot.bumpVerticalPos(h.height/2)}else if(o.get(e.from)==n){let h=i.get(e.from);if(lt.mirrorActors){let f=h.type=="actor"?Zc/2:h.width/2;u(h,f)}h.stopy=r-h.height/2,Ot.bumpVerticalPos(h.height/2)}else if(o.get(e.to)==n){let h=i.get(e.to);if(lt.mirrorActors){let f=h.type=="actor"?Zc/2+3:h.width/2+3;l(h,f)}h.stopy=r-h.height/2,Ot.bumpVerticalPos(h.height/2)}}async function xDt(e,t,r){let n={};for(let i of t)if(e.get(i.to)&&e.get(i.from)){let s=e.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!s.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!s.nextActor)continue;let o=i.placement!==void 0,l=!o,u=o?_m(lt):Hh(lt),h=i.wrap?ae.wrapLabel(i.message,lt.width-2*lt.wrapPadding,u):i.message,d=(_n(h)?await pu(i.message,X()):ae.calculateTextDimensions(h,u)).width+2*lt.wrapPadding;l&&i.from===s.nextActor?n[i.to]=Lt.getMax(n[i.to]||0,d):l&&i.from===s.prevActor?n[i.from]=Lt.getMax(n[i.from]||0,d):l&&i.from===i.to?(n[i.from]=Lt.getMax(n[i.from]||0,d/2),n[i.to]=Lt.getMax(n[i.to]||0,d/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=Lt.getMax(n[i.from]||0,d):i.placement===r.db.PLACEMENT.LEFTOF?n[s.prevActor]=Lt.getMax(n[s.prevActor]||0,d):i.placement===r.db.PLACEMENT.OVER&&(s.prevActor&&(n[s.prevActor]=Lt.getMax(n[s.prevActor]||0,d/2)),s.nextActor&&(n[i.from]=Lt.getMax(n[i.from]||0,d/2)))}return B.debug("maxMessageWidthPerActor:",n),n}async function kDt(e,t,r){let n=0;for(let s of e.keys()){let o=e.get(s);o.wrap&&(o.description=ae.wrapLabel(o.description,lt.width-2*lt.wrapPadding,pN(lt)));let l=_n(o.description)?await pu(o.description,X()):ae.calculateTextDimensions(o.description,pN(lt));o.width=o.wrap?lt.width:Lt.getMax(lt.width,l.width+2*lt.wrapPadding),o.height=o.wrap?Lt.getMax(l.height,lt.height):lt.height,n=Lt.getMax(n,o.height)}for(let s in t){let o=e.get(s);if(!o)continue;let l=e.get(o.nextActor);if(!l){let d=t[s]+lt.actorMargin-o.width/2;o.margin=Lt.getMax(d,lt.actorMargin);continue}let h=t[s]+lt.actorMargin-o.width/2-l.width/2;o.margin=Lt.getMax(h,lt.actorMargin)}let i=0;return r.forEach(s=>{let o=Hh(lt),l=s.actorKeys.reduce((f,d)=>f+=e.get(d).width+(e.get(d).margin||0),0);l-=2*lt.boxTextMargin,s.wrap&&(s.name=ae.wrapLabel(s.name,l-2*lt.wrapPadding,o));let u=ae.calculateTextDimensions(s.name,o);i=Lt.getMax(u.height,i);let h=Lt.getMax(l,u.width+2*lt.wrapPadding);if(s.margin=lt.boxTextMargin,l<h){let f=(h-l)/2;s.margin+=f}}),r.forEach(s=>s.textMaxHeight=i),Lt.getMax(n,lt.height)}var lt,Ot,fDt,Hh,_m,pN,pDt,mDt,mN,$nt,Gnt,DC,Fnt,yDt,bDt,TDt,SDt,CDt,Vnt,znt=x(()=>{"use strict";$e();Bnt();Gt();Pe();Pe();o0();pe();af();we();Mn();lt={},Ot={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:a(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:a(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:a(function(e){this.boxes.push(e)},"addBox"),addActor:a(function(e){this.actors.push(e)},"addActor"),addLoop:a(function(e){this.loops.push(e)},"addLoop"),addMessage:a(function(e){this.messages.push(e)},"addMessage"),addNote:a(function(e){this.notes.push(e)},"addNote"),lastActor:a(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:a(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:a(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:a(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:a(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Gnt(X())},"init"),updateVal:a(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:a(function(e,t,r,n){let i=this,s=0;function o(l){return a(function(h){s++;let f=i.sequenceItems.length-s+1;i.updateVal(h,"starty",t-f*lt.boxMargin,Math.min),i.updateVal(h,"stopy",n+f*lt.boxMargin,Math.max),i.updateVal(Ot.data,"startx",e-f*lt.boxMargin,Math.min),i.updateVal(Ot.data,"stopx",r+f*lt.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",e-f*lt.boxMargin,Math.min),i.updateVal(h,"stopx",r+f*lt.boxMargin,Math.max),i.updateVal(Ot.data,"starty",t-f*lt.boxMargin,Math.min),i.updateVal(Ot.data,"stopy",n+f*lt.boxMargin,Math.max))},"updateItemBounds")}a(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:a(function(e,t,r,n){let i=Lt.getMin(e,r),s=Lt.getMax(e,r),o=Lt.getMin(t,n),l=Lt.getMax(t,n);this.updateVal(Ot.data,"startx",i,Math.min),this.updateVal(Ot.data,"starty",o,Math.min),this.updateVal(Ot.data,"stopx",s,Math.max),this.updateVal(Ot.data,"stopy",l,Math.max),this.updateBounds(i,o,s,l)},"insert"),newActivation:a(function(e,t,r){let n=r.get(e.from),i=DC(e.from).length||0,s=n.x+n.width/2+(i-1)*lt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+lt.activationWidth,stopy:void 0,actor:e.from,anchored:dn.anchorElement(t)})},"newActivation"),endActivation:a(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:a(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:a(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:a(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:a(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:a(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Ot.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:a(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:a(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:a(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=Lt.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:a(function(){return this.verticalPos},"getVerticalPos"),getBounds:a(function(){return{bounds:this.data,models:this.models}},"getBounds")},fDt=a(async function(e,t){Ot.bumpVerticalPos(lt.boxMargin),t.height=lt.boxMargin,t.starty=Ot.getVerticalPos();let r=Pa();r.x=t.startx,r.y=t.starty,r.width=t.width||lt.width,r.class="note";let n=e.append("g"),i=dn.drawRect(n,r),s=a0();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=lt.noteFontFamily,s.fontSize=lt.noteFontSize,s.fontWeight=lt.noteFontWeight,s.anchor=lt.noteAlign,s.textMargin=lt.noteMargin,s.valign="center";let o=_n(s.text)?await Gy(n,s):qh(n,s),l=Math.round(o.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));i.attr("height",l+2*lt.noteMargin),t.height+=l+2*lt.noteMargin,Ot.bumpVerticalPos(l+2*lt.noteMargin),t.stopy=t.starty+l+2*lt.noteMargin,t.stopx=t.startx+r.width,Ot.insert(t.startx,t.starty,t.stopx,t.stopy),Ot.models.addNote(t)},"drawNote"),Hh=a(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),_m=a(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),pN=a(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");a(dDt,"boundMessage");pDt=a(async function(e,t,r,n){let{startx:i,stopx:s,starty:o,message:l,type:u,sequenceIndex:h,sequenceVisible:f}=t,d=ae.calculateTextDimensions(l,Hh(lt)),p=a0();p.x=i,p.y=o+10,p.width=s-i,p.class="messageText",p.dy="1em",p.text=l,p.fontFamily=lt.messageFontFamily,p.fontSize=lt.messageFontSize,p.fontWeight=lt.messageFontWeight,p.anchor=lt.messageAlign,p.valign="center",p.textMargin=lt.wrapPadding,p.tspan=!1,_n(p.text)?await Gy(e,p,{startx:i,stopx:s,starty:r}):qh(e,p);let m=d.width,g;i===s?lt.rightAngles?g=e.append("path").attr("d",`M ${i},${r} H ${i+Lt.getMax(lt.width/2,m/2)} V ${r+25} H ${i}`):g=e.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=e.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",s),g.attr("y2",r)),u===n.db.LINETYPE.DOTTED||u===n.db.LINETYPE.DOTTED_CROSS||u===n.db.LINETYPE.DOTTED_POINT||u===n.db.LINETYPE.DOTTED_OPEN||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let y="";lt.arrowMarkerAbsolute&&(y=el(!0)),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(u===n.db.LINETYPE.SOLID||u===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+y+"#arrowhead)"),(u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+y+"#arrowhead)"),g.attr("marker-end","url("+y+"#arrowhead)")),(u===n.db.LINETYPE.SOLID_POINT||u===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+y+"#filled-head)"),(u===n.db.LINETYPE.SOLID_CROSS||u===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+y+"#crosshead)"),(f||lt.showSequenceNumbers)&&((u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(i<s?g.attr("x1",i+2*6):g.attr("x1",i+6)),e.append("line").attr("x1",i).attr("y1",r).attr("x2",i).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+y+"#sequencenumber)"),e.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},"drawMessage"),mDt=a(function(e,t,r,n,i,s,o){let l=0,u=0,h,f=0;for(let d of n){let p=t.get(d),m=p.box;h&&h!=m&&(o||Ot.models.addBox(h),u+=lt.boxMargin+h.margin),m&&m!=h&&(o||(m.x=l+u,m.y=i),u+=m.margin),p.width=p.width||lt.width,p.height=Lt.getMax(p.height||lt.height,lt.height),p.margin=p.margin||lt.actorMargin,f=Lt.getMax(f,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=Ot.getVerticalPos(),Ot.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,Ot.models.addActor(p)}h&&!o&&Ot.models.addBox(h),Ot.bumpVerticalPos(f)},"addActorRenderingData"),mN=a(async function(e,t,r,n){if(n){let i=0;Ot.bumpVerticalPos(lt.boxMargin*2);for(let s of r){let o=t.get(s);o.stopy||(o.stopy=Ot.getVerticalPos());let l=await dn.drawActor(e,o,lt,!0);i=Lt.getMax(i,l)}Ot.bumpVerticalPos(i+lt.boxMargin)}else for(let i of r){let s=t.get(i);await dn.drawActor(e,s,lt,!1)}},"drawActors"),$nt=a(function(e,t,r,n){let i=0,s=0;for(let o of r){let l=t.get(o),u=bDt(l),h=dn.drawPopup(e,l,u,lt,lt.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>s&&(s=h.width+l.x)}return{maxHeight:i,maxWidth:s}},"drawActorsPopup"),Gnt=a(function(e){Hr(lt,e),e.fontFamily&&(lt.actorFontFamily=lt.noteFontFamily=lt.messageFontFamily=e.fontFamily),e.fontSize&&(lt.actorFontSize=lt.noteFontSize=lt.messageFontSize=e.fontSize),e.fontWeight&&(lt.actorFontWeight=lt.noteFontWeight=lt.messageFontWeight=e.fontWeight)},"setConf"),DC=a(function(e){return Ot.activations.filter(function(t){return t.actor===e})},"actorActivations"),Fnt=a(function(e,t){let r=t.get(e),n=DC(e),i=n.reduce(function(o,l){return Lt.getMin(o,l.startx)},r.x+r.width/2-1),s=n.reduce(function(o,l){return Lt.getMax(o,l.stopx)},r.x+r.width/2+1);return[i,s]},"activationBounds");a(Ko,"adjustLoopHeightForWrap");a(gDt,"adjustCreatedDestroyedData");yDt=a(async function(e,t,r,n){let{securityLevel:i,sequence:s}=X();lt=s;let o;i==="sandbox"&&(o=yt("#i"+t));let l=i==="sandbox"?yt(o.nodes()[0].contentDocument.body):yt("body"),u=i==="sandbox"?o.nodes()[0].contentDocument:document;Ot.init(),B.debug(n.db);let h=i==="sandbox"?l.select(`[id="${t}"]`):yt(`[id="${t}"]`),f=n.db.getActors(),d=n.db.getCreatedActors(),p=n.db.getDestroyedActors(),m=n.db.getBoxes(),g=n.db.getActorKeys(),y=n.db.getMessages(),b=n.db.getDiagramTitle(),k=n.db.hasAtLeastOneBox(),T=n.db.hasAtLeastOneBoxWithTitle(),_=await xDt(f,y,n);if(lt.height=await kDt(f,_,m),dn.insertComputerIcon(h),dn.insertDatabaseIcon(h),dn.insertClockIcon(h),k&&(Ot.bumpVerticalPos(lt.boxMargin),T&&Ot.bumpVerticalPos(m[0].textMaxHeight)),lt.hideUnusedParticipants===!0){let I=new Set;y.forEach(M=>{I.add(M.from),I.add(M.to)}),g=g.filter(M=>I.has(M))}mDt(h,f,d,g,0,y,!1);let L=await CDt(y,f,_,n);dn.insertArrowHead(h),dn.insertArrowCrossHead(h),dn.insertArrowFilledHead(h),dn.insertSequenceNumber(h);function w(I,M){let V=Ot.endActivation(I);V.starty+18>M&&(V.starty=M-6,M+=12),dn.drawActivation(h,V,M,lt,DC(I.from).length),Ot.insert(V.startx,M-10,V.stopx,M)}a(w,"activeEnd");let D=1,$=1,E=[],R=[],F=0;for(let I of y){let M,V,G;switch(I.type){case n.db.LINETYPE.NOTE:Ot.resetVerticalPos(),V=I.noteModel,await fDt(h,V);break;case n.db.LINETYPE.ACTIVE_START:Ot.newActivation(I,h,f);break;case n.db.LINETYPE.ACTIVE_END:w(I,Ot.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.LOOP_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"loop",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.RECT_START:Ko(L,I,lt.boxMargin,lt.boxMargin,j=>Ot.newLoop(void 0,j.message));break;case n.db.LINETYPE.RECT_END:M=Ot.endLoop(),R.push(M),Ot.models.addLoop(M),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.OPT_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"opt",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.ALT_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.ALT_ELSE:Ko(L,I,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,j=>Ot.addSectionToLoop(j));break;case n.db.LINETYPE.ALT_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"alt",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j)),Ot.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Ko(L,I,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,j=>Ot.addSectionToLoop(j));break;case n.db.LINETYPE.PAR_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"par",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.AUTONUMBER:D=I.message.start||D,$=I.message.step||$,I.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.CRITICAL_OPTION:Ko(L,I,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,j=>Ot.addSectionToLoop(j));break;case n.db.LINETYPE.CRITICAL_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"critical",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;case n.db.LINETYPE.BREAK_START:Ko(L,I,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,j=>Ot.newLoop(j));break;case n.db.LINETYPE.BREAK_END:M=Ot.endLoop(),await dn.drawLoop(h,M,"break",lt),Ot.bumpVerticalPos(M.stopy-Ot.getVerticalPos()),Ot.models.addLoop(M);break;default:try{G=I.msgModel,G.starty=Ot.getVerticalPos(),G.sequenceIndex=D,G.sequenceVisible=n.db.showSequenceNumbers();let j=await dDt(h,G);gDt(I,G,j,F,f,d,p),E.push({messageModel:G,lineStartY:j}),Ot.models.addMessage(G)}catch(j){B.error("error while drawing message",j)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(I.type)&&(D=D+$),F++}B.debug("createdActors",d),B.debug("destroyedActors",p),await mN(h,f,g,!1);for(let I of E)await pDt(h,I.messageModel,I.lineStartY,n);lt.mirrorActors&&await mN(h,f,g,!0),R.forEach(I=>dn.drawBackgroundRect(h,I)),fN(h,f,g,lt);for(let I of Ot.models.boxes)I.height=Ot.getVerticalPos()-I.y,Ot.insert(I.x,I.y,I.x+I.width,I.height),I.startx=I.x,I.starty=I.y,I.stopx=I.startx+I.width,I.stopy=I.starty+I.height,I.stroke="rgb(0,0,0, 0.5)",dn.drawBox(h,I,lt);k&&Ot.bumpVerticalPos(lt.boxMargin);let S=$nt(h,f,g,u),{bounds:O}=Ot.getBounds();O.startx===void 0&&(O.startx=0),O.starty===void 0&&(O.starty=0),O.stopx===void 0&&(O.stopx=0),O.stopy===void 0&&(O.stopy=0);let v=O.stopy-O.starty;v<S.maxHeight&&(v=S.maxHeight);let C=v+2*lt.diagramMarginY;lt.mirrorActors&&(C=C-lt.boxMargin+lt.bottomMarginAdj);let A=O.stopx-O.startx;A<S.maxWidth&&(A=S.maxWidth);let N=A+2*lt.diagramMarginX;b&&h.append("text").text(b).attr("x",(O.stopx-O.startx)/2-2*lt.diagramMarginX).attr("y",-25),Ar(h,C,N,lt.useMaxWidth);let P=b?40:0;h.attr("viewBox",O.startx-lt.diagramMarginX+" -"+(lt.diagramMarginY+P)+" "+N+" "+(C+P)),B.debug("models:",Ot.models)},"draw");a(xDt,"getMaxMessageWidthPerActor");bDt=a(function(e){let t=0,r=pN(lt);for(let n in e.links){let s=ae.calculateTextDimensions(n,r).width+2*lt.wrapPadding+2*lt.boxMargin;t<s&&(t=s)}return t},"getRequiredPopupWidth");a(kDt,"calculateActorMargins");TDt=a(async function(e,t,r){let n=t.get(e.from),i=t.get(e.to),s=n.x,o=i.x,l=e.wrap&&e.message,u=_n(e.message)?await pu(e.message,X()):ae.calculateTextDimensions(l?ae.wrapLabel(e.message,lt.width,_m(lt)):e.message,_m(lt)),h={width:l?lt.width:Lt.getMax(lt.width,u.width+2*lt.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===r.db.PLACEMENT.RIGHTOF?(h.width=l?Lt.getMax(lt.width,u.width):Lt.getMax(n.width/2+i.width/2,u.width+2*lt.noteMargin),h.startx=s+(n.width+lt.actorMargin)/2):e.placement===r.db.PLACEMENT.LEFTOF?(h.width=l?Lt.getMax(lt.width,u.width+2*lt.noteMargin):Lt.getMax(n.width/2+i.width/2,u.width+2*lt.noteMargin),h.startx=s-h.width+(n.width-lt.actorMargin)/2):e.to===e.from?(u=ae.calculateTextDimensions(l?ae.wrapLabel(e.message,Lt.getMax(lt.width,n.width),_m(lt)):e.message,_m(lt)),h.width=l?Lt.getMax(lt.width,n.width):Lt.getMax(n.width,lt.width,u.width+2*lt.noteMargin),h.startx=s+(n.width-h.width)/2):(h.width=Math.abs(s+n.width/2-(o+i.width/2))+lt.actorMargin,h.startx=s<o?s+n.width/2-lt.actorMargin/2:o+i.width/2-lt.actorMargin/2),l&&(h.message=ae.wrapLabel(e.message,h.width-2*lt.wrapPadding,_m(lt))),B.debug(`NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${e.message}]`),h},"buildNoteModel"),SDt=a(function(e,t,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[n,i]=Fnt(e.from,t),[s,o]=Fnt(e.to,t),l=n<=s,u=l?i:n,h=l?s:o,f=Math.abs(s-o)>2,d=a(y=>l?-y:y,"adjustValue");e.from===e.to?h=u:(e.activate&&!f&&(h+=d(lt.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(u-=d(3)));let p=[n,i,s,o],m=Math.abs(u-h);e.wrap&&e.message&&(e.message=ae.wrapLabel(e.message,Lt.getMax(m+2*lt.wrapPadding,lt.width),Hh(lt)));let g=ae.calculateTextDimensions(e.message,Hh(lt));return{width:Lt.getMax(e.wrap?0:g.width+2*lt.wrapPadding,m+2*lt.wrapPadding,lt.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},"buildMessageModel"),CDt=a(async function(e,t,r,n){let i={},s=[],o,l,u;for(let h of e){switch(h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:s.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(o=s.pop(),i[o.id]=o,i[h.id]=o,s.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=s.pop(),i[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:{let d=t.get(h.from?h.from:h.to.actor),p=DC(h.from?h.from:h.to.actor).length,m=d.x+d.width/2+(p-1)*lt.activationWidth/2,g={startx:m,stopx:m+lt.activationWidth,actor:h.from,enabled:!0};Ot.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let d=Ot.activations.map(p=>p.actor).lastIndexOf(h.from);Ot.activations.splice(d,1).splice(0,1)}break}h.placement!==void 0?(l=await TDt(h,t,n),h.noteModel=l,s.forEach(d=>{o=d,o.from=Lt.getMin(o.from,l.startx),o.to=Lt.getMax(o.to,l.startx+l.width),o.width=Lt.getMax(o.width,Math.abs(o.from-o.to))-lt.labelBoxWidth})):(u=SDt(h,t,n),h.msgModel=u,u.startx&&u.stopx&&s.length>0&&s.forEach(d=>{if(o=d,u.startx===u.stopx){let p=t.get(h.from),m=t.get(h.to);o.from=Lt.getMin(p.x-u.width/2,p.x-p.width/2,o.from),o.to=Lt.getMax(m.x+u.width/2,m.x+p.width/2,o.to),o.width=Lt.getMax(o.width,Math.abs(o.to-o.from))-lt.labelBoxWidth}else o.from=Lt.getMin(u.startx,o.from),o.to=Lt.getMax(u.stopx,o.to),o.width=Lt.getMax(o.width,u.width)-lt.labelBoxWidth}))}return Ot.activations=[],B.debug("Loop type widths:",i),i},"calculateLoopBounds"),Vnt={bounds:Ot,drawActors:mN,drawActorsPopup:$nt,setConf:Gnt,draw:yDt}});var Wnt={};Me(Wnt,{diagram:()=>_Dt});var _Dt,Unt=x(()=>{"use strict";Ent();Ant();Rnt();pe();znt();_Dt={parser:vnt,get db(){return new RC},renderer:Vnt,styles:Lnt,init:a(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,lg({sequence:{wrap:e.wrap}}))},"init")}});var gN,NC,yN=x(()=>{"use strict";gN=function(){var e=a(function(It,bt,ht,Dt){for(ht=ht||{},Dt=It.length;Dt--;ht[It[Dt]]=bt);return ht},"o"),t=[1,18],r=[1,19],n=[1,20],i=[1,41],s=[1,42],o=[1,26],l=[1,24],u=[1,25],h=[1,32],f=[1,33],d=[1,34],p=[1,45],m=[1,35],g=[1,36],y=[1,37],b=[1,38],k=[1,27],T=[1,28],_=[1,29],L=[1,30],w=[1,31],D=[1,44],$=[1,46],E=[1,43],R=[1,47],F=[1,9],S=[1,8,9],O=[1,58],v=[1,59],C=[1,60],A=[1,61],N=[1,62],P=[1,63],I=[1,64],M=[1,8,9,41],V=[1,76],G=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],j=[1,8,9,12,13,18,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],tt=[13,58,84,99,101,102],ct=[13,58,71,72,84,99,101,102],H=[13,58,66,67,68,69,70,84,99,101,102],kt=[1,99],dt=[1,116],gt=[1,108],ot=[1,114],it=[1,109],at=[1,110],K=[1,111],Q=[1,112],st=[1,113],W=[1,115],mt=[22,58,59,80,84,85,86,87,88,89],q=[1,8,9,39,41,44],et=[1,8,9,22],ke=[1,144],ut=[1,8,9,59],jt=[1,8,9,22,58,59,80,84,85,86,87,88,89],Ne={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[17,1],[53,1]],performAction:a(function(bt,ht,Dt,Z,Nt,z,Wt){var U=z.length-1;switch(Nt){case 8:this.$=z[U-1];break;case 9:case 10:case 13:case 15:this.$=z[U];break;case 11:case 14:this.$=z[U-2]+"."+z[U];break;case 12:case 16:this.$=z[U-1]+z[U];break;case 17:case 18:this.$=z[U-1]+"~"+z[U]+"~";break;case 19:Z.addRelation(z[U]);break;case 20:z[U-1].title=Z.cleanupLabel(z[U]),Z.addRelation(z[U-1]);break;case 31:this.$=z[U].trim(),Z.setAccTitle(this.$);break;case 32:case 33:this.$=z[U].trim(),Z.setAccDescription(this.$);break;case 34:Z.addClassesToNamespace(z[U-3],z[U-1]);break;case 35:Z.addClassesToNamespace(z[U-4],z[U-1]);break;case 36:this.$=z[U],Z.addNamespace(z[U]);break;case 37:this.$=[z[U]];break;case 38:this.$=[z[U-1]];break;case 39:z[U].unshift(z[U-2]),this.$=z[U];break;case 41:Z.setCssClass(z[U-2],z[U]);break;case 42:Z.addMembers(z[U-3],z[U-1]);break;case 43:Z.setCssClass(z[U-5],z[U-3]),Z.addMembers(z[U-5],z[U-1]);break;case 44:this.$=z[U],Z.addClass(z[U]);break;case 45:this.$=z[U-1],Z.addClass(z[U-1]),Z.setClassLabel(z[U-1],z[U]);break;case 46:Z.addAnnotation(z[U],z[U-2]);break;case 47:case 60:this.$=[z[U]];break;case 48:z[U].push(z[U-1]),this.$=z[U];break;case 49:break;case 50:Z.addMember(z[U-1],Z.cleanupLabel(z[U]));break;case 51:break;case 52:break;case 53:this.$={id1:z[U-2],id2:z[U],relation:z[U-1],relationTitle1:"none",relationTitle2:"none"};break;case 54:this.$={id1:z[U-3],id2:z[U],relation:z[U-1],relationTitle1:z[U-2],relationTitle2:"none"};break;case 55:this.$={id1:z[U-3],id2:z[U],relation:z[U-2],relationTitle1:"none",relationTitle2:z[U-1]};break;case 56:this.$={id1:z[U-4],id2:z[U],relation:z[U-2],relationTitle1:z[U-3],relationTitle2:z[U-1]};break;case 57:Z.addNote(z[U],z[U-1]);break;case 58:Z.addNote(z[U]);break;case 59:this.$=z[U-2],Z.defineClass(z[U-1],z[U]);break;case 61:this.$=z[U-2].concat([z[U]]);break;case 62:Z.setDirection("TB");break;case 63:Z.setDirection("BT");break;case 64:Z.setDirection("RL");break;case 65:Z.setDirection("LR");break;case 66:this.$={type1:z[U-2],type2:z[U],lineType:z[U-1]};break;case 67:this.$={type1:"none",type2:z[U],lineType:z[U-1]};break;case 68:this.$={type1:z[U-1],type2:"none",lineType:z[U]};break;case 69:this.$={type1:"none",type2:"none",lineType:z[U]};break;case 70:this.$=Z.relationType.AGGREGATION;break;case 71:this.$=Z.relationType.EXTENSION;break;case 72:this.$=Z.relationType.COMPOSITION;break;case 73:this.$=Z.relationType.DEPENDENCY;break;case 74:this.$=Z.relationType.LOLLIPOP;break;case 75:this.$=Z.lineType.LINE;break;case 76:this.$=Z.lineType.DOTTED_LINE;break;case 77:case 83:this.$=z[U-2],Z.setClickEvent(z[U-1],z[U]);break;case 78:case 84:this.$=z[U-3],Z.setClickEvent(z[U-2],z[U-1]),Z.setTooltip(z[U-2],z[U]);break;case 79:this.$=z[U-2],Z.setLink(z[U-1],z[U]);break;case 80:this.$=z[U-3],Z.setLink(z[U-2],z[U-1],z[U]);break;case 81:this.$=z[U-3],Z.setLink(z[U-2],z[U-1]),Z.setTooltip(z[U-2],z[U]);break;case 82:this.$=z[U-4],Z.setLink(z[U-3],z[U-2],z[U]),Z.setTooltip(z[U-3],z[U-1]);break;case 85:this.$=z[U-3],Z.setClickEvent(z[U-2],z[U-1],z[U]);break;case 86:this.$=z[U-4],Z.setClickEvent(z[U-3],z[U-2],z[U-1]),Z.setTooltip(z[U-3],z[U]);break;case 87:this.$=z[U-3],Z.setLink(z[U-2],z[U]);break;case 88:this.$=z[U-4],Z.setLink(z[U-3],z[U-1],z[U]);break;case 89:this.$=z[U-4],Z.setLink(z[U-3],z[U-1]),Z.setTooltip(z[U-3],z[U]);break;case 90:this.$=z[U-5],Z.setLink(z[U-4],z[U-2],z[U]),Z.setTooltip(z[U-4],z[U-1]);break;case 91:this.$=z[U-2],Z.setCssStyle(z[U-1],z[U]);break;case 92:Z.setCssClass(z[U-1],z[U]);break;case 93:this.$=[z[U]];break;case 94:z[U-2].push(z[U]),this.$=z[U-2];break;case 96:this.$=z[U-1]+z[U];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:n,38:22,42:i,43:23,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:w,84:D,99:$,101:E,102:R},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(F,[2,5],{8:[1,48]}),{8:[1,49]},e(S,[2,19],{22:[1,50]}),e(S,[2,21]),e(S,[2,22]),e(S,[2,23]),e(S,[2,24]),e(S,[2,25]),e(S,[2,26]),e(S,[2,27]),e(S,[2,28]),e(S,[2,29]),e(S,[2,30]),{34:[1,51]},{36:[1,52]},e(S,[2,33]),e(S,[2,49],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:O,67:v,68:C,69:A,70:N,71:P,72:I}),{39:[1,65]},e(M,[2,40],{39:[1,67],44:[1,66]}),e(S,[2,51]),e(S,[2,52]),{16:68,58:p,84:D,99:$,101:E},{16:39,17:40,19:69,58:p,84:D,99:$,101:E,102:R},{16:39,17:40,19:70,58:p,84:D,99:$,101:E,102:R},{16:39,17:40,19:71,58:p,84:D,99:$,101:E,102:R},{58:[1,72]},{13:[1,73]},{16:39,17:40,19:74,58:p,84:D,99:$,101:E,102:R},{13:V,53:75},{56:77,58:[1,78]},e(S,[2,62]),e(S,[2,63]),e(S,[2,64]),e(S,[2,65]),e(G,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],58:p,84:D,99:$,101:E,102:R}),e(G,[2,15],{20:[1,82]}),{15:83,16:84,17:85,58:p,84:D,99:$,101:E,102:R},{16:39,17:40,19:86,58:p,84:D,99:$,101:E,102:R},e(j,[2,119]),e(j,[2,120]),e(j,[2,121]),e(j,[2,122]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,123]),e(F,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:t,35:r,37:n,42:i,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:w,84:D,99:$,101:E,102:R}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:n,38:22,42:i,43:23,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:w,84:D,99:$,101:E,102:R},e(S,[2,20]),e(S,[2,31]),e(S,[2,32]),{13:[1,90],16:39,17:40,19:89,58:p,84:D,99:$,101:E,102:R},{51:91,64:56,65:57,66:O,67:v,68:C,69:A,70:N,71:P,72:I},e(S,[2,50]),{65:92,71:P,72:I},e(tt,[2,69],{64:93,66:O,67:v,68:C,69:A,70:N}),e(ct,[2,70]),e(ct,[2,71]),e(ct,[2,72]),e(ct,[2,73]),e(ct,[2,74]),e(H,[2,75]),e(H,[2,76]),{8:[1,95],24:96,40:94,43:23,46:s},{16:97,58:p,84:D,99:$,101:E},{45:98,49:kt},{48:[1,100]},{13:[1,101]},{13:[1,102]},{77:[1,103],79:[1,104]},{22:dt,57:105,58:gt,80:ot,82:106,83:107,84:it,85:at,86:K,87:Q,88:st,89:W},{58:[1,117]},{13:V,53:118},e(S,[2,58]),e(S,[2,124]),{22:dt,57:119,58:gt,59:[1,120],80:ot,82:106,83:107,84:it,85:at,86:K,87:Q,88:st,89:W},e(mt,[2,60]),{16:39,17:40,19:121,58:p,84:D,99:$,101:E,102:R},e(G,[2,16]),e(G,[2,17]),e(G,[2,18]),{39:[2,36]},{15:123,16:84,17:85,18:[1,122],39:[2,9],58:p,84:D,99:$,101:E,102:R},{39:[2,10]},e(q,[2,44],{11:124,12:[1,125]}),e(F,[2,7]),{9:[1,126]},e(et,[2,53]),{16:39,17:40,19:127,58:p,84:D,99:$,101:E,102:R},{13:[1,129],16:39,17:40,19:128,58:p,84:D,99:$,101:E,102:R},e(tt,[2,68],{64:130,66:O,67:v,68:C,69:A,70:N}),e(tt,[2,67]),{41:[1,131]},{24:96,40:132,43:23,46:s},{8:[1,133],41:[2,37]},e(M,[2,41],{39:[1,134]}),{41:[1,135]},{41:[2,47],45:136,49:kt},{16:39,17:40,19:137,58:p,84:D,99:$,101:E,102:R},e(S,[2,77],{13:[1,138]}),e(S,[2,79],{13:[1,140],75:[1,139]}),e(S,[2,83],{13:[1,141],78:[1,142]}),{13:[1,143]},e(S,[2,91],{59:ke}),e(ut,[2,93],{83:145,22:dt,58:gt,80:ot,84:it,85:at,86:K,87:Q,88:st,89:W}),e(jt,[2,95]),e(jt,[2,97]),e(jt,[2,98]),e(jt,[2,99]),e(jt,[2,100]),e(jt,[2,101]),e(jt,[2,102]),e(jt,[2,103]),e(jt,[2,104]),e(jt,[2,105]),e(S,[2,92]),e(S,[2,57]),e(S,[2,59],{59:ke}),{58:[1,146]},e(G,[2,14]),{15:147,16:84,17:85,58:p,84:D,99:$,101:E,102:R},{39:[2,12]},e(q,[2,45]),{13:[1,148]},{1:[2,4]},e(et,[2,55]),e(et,[2,54]),{16:39,17:40,19:149,58:p,84:D,99:$,101:E,102:R},e(tt,[2,66]),e(S,[2,34]),{41:[1,150]},{24:96,40:151,41:[2,38],43:23,46:s},{45:152,49:kt},e(M,[2,42]),{41:[2,48]},e(S,[2,46]),e(S,[2,78]),e(S,[2,80]),e(S,[2,81],{75:[1,153]}),e(S,[2,84]),e(S,[2,85],{13:[1,154]}),e(S,[2,87],{13:[1,156],75:[1,155]}),{22:dt,58:gt,80:ot,82:157,83:107,84:it,85:at,86:K,87:Q,88:st,89:W},e(jt,[2,96]),e(mt,[2,61]),{39:[2,11]},{14:[1,158]},e(et,[2,56]),e(S,[2,35]),{41:[2,39]},{41:[1,159]},e(S,[2,82]),e(S,[2,86]),e(S,[2,88]),e(S,[2,89],{75:[1,160]}),e(ut,[2,94],{83:145,22:dt,58:gt,80:ot,84:it,85:at,86:K,87:Q,88:st,89:W}),e(q,[2,8]),e(M,[2,43]),e(S,[2,90])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],123:[2,12],126:[2,4],136:[2,48],147:[2,11],151:[2,39]},parseError:a(function(bt,ht){if(ht.recoverable)this.trace(bt);else{var Dt=new Error(bt);throw Dt.hash=ht,Dt}},"parseError"),parse:a(function(bt){var ht=this,Dt=[0],Z=[],Nt=[null],z=[],Wt=this.table,U="",Ct=0,xt=0,Xt=0,Mt=2,St=1,ze=z.slice.call(arguments,1),Pt=Object.create(this.lexer),or={yy:{}};for(var ir in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ir)&&(or.yy[ir]=this.yy[ir]);Pt.setInput(bt,or.yy),or.yy.lexer=Pt,or.yy.parser=this,typeof Pt.yylloc>"u"&&(Pt.yylloc={});var xr=Pt.yylloc;z.push(xr);var sr=Pt.options&&Pt.options.ranges;typeof or.yy.parseError=="function"?this.parseError=or.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(re){Dt.length=Dt.length-2*re,Nt.length=Nt.length-re,z.length=z.length-re}a(Te,"popStack");function Ke(){var re;return re=Z.pop()||Pt.lex()||St,typeof re!="number"&&(re instanceof Array&&(Z=re,re=Z.pop()),re=ht.symbols_[re]||re),re}a(Ke,"lex");for(var Se,hr,kn,Ee,Fe,Ae,ye={},fe,ge,xe,Ht;;){if(kn=Dt[Dt.length-1],this.defaultActions[kn]?Ee=this.defaultActions[kn]:((Se===null||typeof Se>"u")&&(Se=Ke()),Ee=Wt[kn]&&Wt[kn][Se]),typeof Ee>"u"||!Ee.length||!Ee[0]){var Rn="";Ht=[];for(fe in Wt[kn])this.terminals_[fe]&&fe>Mt&&Ht.push("'"+this.terminals_[fe]+"'");Pt.showPosition?Rn="Parse error on line "+(Ct+1)+`:
1128
1128
  `+Pt.showPosition()+`
1129
1129
  Expecting `+Ht.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'":Rn="Parse error on line "+(Ct+1)+": Unexpected "+(Se==St?"end of input":"'"+(this.terminals_[Se]||Se)+"'"),this.parseError(Rn,{text:Pt.match,token:this.terminals_[Se]||Se,line:Pt.yylineno,loc:xr,expected:Ht})}if(Ee[0]instanceof Array&&Ee.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kn+", token: "+Se);switch(Ee[0]){case 1:Dt.push(Se),Nt.push(Pt.yytext),z.push(Pt.yylloc),Dt.push(Ee[1]),Se=null,hr?(Se=hr,hr=null):(xt=Pt.yyleng,U=Pt.yytext,Ct=Pt.yylineno,xr=Pt.yylloc,Xt>0&&Xt--);break;case 2:if(ge=this.productions_[Ee[1]][1],ye.$=Nt[Nt.length-ge],ye._$={first_line:z[z.length-(ge||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(ge||1)].first_column,last_column:z[z.length-1].last_column},sr&&(ye._$.range=[z[z.length-(ge||1)].range[0],z[z.length-1].range[1]]),Ae=this.performAction.apply(ye,[U,xt,Ct,or.yy,Ee[1],Nt,z].concat(ze)),typeof Ae<"u")return Ae;ge&&(Dt=Dt.slice(0,-1*ge*2),Nt=Nt.slice(0,-1*ge),z=z.slice(0,-1*ge)),Dt.push(this.productions_[Ee[1]][0]),Nt.push(ye.$),z.push(ye._$),xe=Wt[Dt[Dt.length-2]][Dt[Dt.length-1]],Dt.push(xe);break;case 3:return!0}}return!0},"parse")},se=function(){var It={EOF:1,parseError:a(function(ht,Dt){if(this.yy.parser)this.yy.parser.parseError(ht,Dt);else throw new Error(ht)},"parseError"),setInput:a(function(bt,ht){return this.yy=ht||this.yy||{},this._input=bt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var bt=this._input[0];this.yytext+=bt,this.yyleng++,this.offset++,this.match+=bt,this.matched+=bt;var ht=bt.match(/(?:\r\n?|\n).*/g);return ht?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),bt},"input"),unput:a(function(bt){var ht=bt.length,Dt=bt.split(/(?:\r\n?|\n)/g);this._input=bt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ht),this.offset-=ht;var Z=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),Dt.length-1&&(this.yylineno-=Dt.length-1);var Nt=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:Dt?(Dt.length===Z.length?this.yylloc.first_column:0)+Z[Z.length-Dt.length].length-Dt[0].length:this.yylloc.first_column-ht},this.options.ranges&&(this.yylloc.range=[Nt[0],Nt[0]+this.yyleng-ht]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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).
1130
1130
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(bt){this.unput(this.match.slice(bt))},"less"),pastInput:a(function(){var bt=this.matched.substr(0,this.matched.length-this.match.length);return(bt.length>20?"...":"")+bt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var bt=this.match;return bt.length<20&&(bt+=this._input.substr(0,20-bt.length)),(bt.substr(0,20)+(bt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var bt=this.pastInput(),ht=new Array(bt.length+1).join("-");return bt+this.upcomingInput()+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mermaid-js/tiny",
3
- "version": "11.10.0",
3
+ "version": "11.10.1",
4
4
  "description": "Tiny version of mermaid",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/mermaid.tiny.js",