@donartcha/openlag 0.1.0
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.
- package/LICENSE +373 -0
- package/README.md +82 -0
- package/bin/openlag.js +2 -0
- package/dist/assets/arc-4YUHkXo3.js +1 -0
- package/dist/assets/architectureDiagram-3BPJPVTR-WeGmL7HM.js +36 -0
- package/dist/assets/blockDiagram-GPEHLZMM-CtV7ubAx.js +132 -0
- package/dist/assets/c4Diagram-AAUBKEIU-DqYDW5c3.js +10 -0
- package/dist/assets/channel-Tsel3-MK.js +1 -0
- package/dist/assets/chunk-2J33WTMH-BE8P9tjh.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-Bi7oLGF5.js +1 -0
- package/dist/assets/chunk-55IACEB6-D9Xhxp_r.js +1 -0
- package/dist/assets/chunk-727SXJPM-Dz8jKE60.js +206 -0
- package/dist/assets/chunk-AQP2D5EJ-BzmM0IeH.js +231 -0
- package/dist/assets/chunk-FMBD7UC4-Cvl5dpcx.js +15 -0
- package/dist/assets/chunk-ND2GUHAM-Dz2efqnq.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-CwblgSnQ.js +1 -0
- package/dist/assets/classDiagram-4FO5ZUOK-Bgm-_cW8.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-Bgm-_cW8.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-h_A3nZUx.js +1 -0
- package/dist/assets/cytoscape.esm-D_LviqZs.js +331 -0
- package/dist/assets/dagre-BM42HDAG-CN_B2Doz.js +4 -0
- package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/assets/diagram-2AECGRRQ-C9TAFwjG.js +43 -0
- package/dist/assets/diagram-5GNKFQAL-BThljQLo.js +10 -0
- package/dist/assets/diagram-KO2AKTUF-bRPq25Se.js +3 -0
- package/dist/assets/diagram-LMA3HP47-BubLCIus.js +24 -0
- package/dist/assets/diagram-OG6HWLK6-CJpfhIsS.js +24 -0
- package/dist/assets/erDiagram-TEJ5UH35-6Xkza9wL.js +85 -0
- package/dist/assets/flowDiagram-I6XJVG4X-Bq_to3hX.js +162 -0
- package/dist/assets/ganttDiagram-6RSMTGT7-C3CmvYl7.js +292 -0
- package/dist/assets/gitGraphDiagram-PVQCEYII-C93LTfrl.js +106 -0
- package/dist/assets/graph-CAnANduQ.js +1 -0
- package/dist/assets/index-0RMQQ34p.css +1 -0
- package/dist/assets/index-ByxguSZe.js +729 -0
- package/dist/assets/infoDiagram-5YYISTIA-CMfuwygl.js +2 -0
- package/dist/assets/init-Gi6I4Gst.js +1 -0
- package/dist/assets/ishikawaDiagram-YF4QCWOH-CbJ5ojDF.js +70 -0
- package/dist/assets/journeyDiagram-JHISSGLW-C_Xz8YyT.js +139 -0
- package/dist/assets/kanban-definition-UN3LZRKU-GVv_iRMq.js +89 -0
- package/dist/assets/katex-DkKDou_j.js +257 -0
- package/dist/assets/layout-DGIYPm2g.js +1 -0
- package/dist/assets/linear-BNEtUH2J.js +1 -0
- package/dist/assets/mindmap-definition-RKZ34NQL-DIsL0XSF.js +96 -0
- package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/assets/pieDiagram-4H26LBE5-CSCTSOjk.js +30 -0
- package/dist/assets/quadrantDiagram-W4KKPZXB-CQQ9OaFY.js +7 -0
- package/dist/assets/requirementDiagram-4Y6WPE33-Cjn3la_S.js +84 -0
- package/dist/assets/sankeyDiagram-5OEKKPKP-DoVspvVc.js +40 -0
- package/dist/assets/sequenceDiagram-3UESZ5HK-UsoGmL4w.js +162 -0
- package/dist/assets/stateDiagram-AJRCARHV-DLmf7Dc8.js +1 -0
- package/dist/assets/stateDiagram-v2-BHNVJYJU-jkiDZ_3u.js +1 -0
- package/dist/assets/timeline-definition-PNZ67QCA-HfyRxZ8p.js +120 -0
- package/dist/assets/vennDiagram-CIIHVFJN-B6pM3L33.js +34 -0
- package/dist/assets/wardley-L42UT6IY-B-LdKtrI.js +173 -0
- package/dist/assets/wardleyDiagram-YWT4CUSO-BD45zhOu.js +78 -0
- package/dist/assets/xychartDiagram-2RQKCTM6-zsDMbUiS.js +7 -0
- package/dist/cli/openlag.js +1793 -0
- package/dist/index.html +14 -0
- package/index.html +13 -0
- package/package.json +84 -0
- package/scripts/cli/build.ts +34 -0
- package/scripts/cli/dev.ts +35 -0
- package/scripts/cli/generate.ts +92 -0
- package/scripts/cli/init.ts +427 -0
- package/scripts/cli/lint.ts +29 -0
- package/scripts/cli/openlag.ts +110 -0
- package/scripts/cli/vite-bin.ts +8 -0
- package/scripts/core/parser/diagnostic.ts +34 -0
- package/scripts/core/parser/normalizer.ts +27 -0
- package/scripts/core/parser/scanner.ts +30 -0
- package/scripts/core/parser/schemas.ts +23 -0
- package/scripts/core/parser/types.ts +30 -0
- package/scripts/core/parser.ts +127 -0
- package/scripts/generate-relations.ts +53 -0
- package/scripts/lint/lint-engine.ts +85 -0
- package/scripts/lint/lint-profiles.ts +49 -0
- package/scripts/lint/lint-rules.ts +174 -0
- package/scripts/lint/lint-types.ts +43 -0
- package/src/App.tsx +164 -0
- package/src/components/DocumentationView.tsx +905 -0
- package/src/components/GraphView.tsx +529 -0
- package/src/components/GuideView.tsx +535 -0
- package/src/components/ImpactView.tsx +365 -0
- package/src/components/MarkdownRenderer.tsx +120 -0
- package/src/components/OrphansView.tsx +360 -0
- package/src/components/SettingsView.tsx +146 -0
- package/src/core/generated/relation-definitions.ts +622 -0
- package/src/core/graph/GraphQueryLayer.ts +194 -0
- package/src/core/registry/ArtifactRegistry.ts +19 -0
- package/src/core/registry/RelationRegistry.ts +27 -0
- package/src/core/semantic/artifact-layers.ts +43 -0
- package/src/core/semantic/ownership-rules.ts +13 -0
- package/src/core/semantic/types.ts +11 -0
- package/src/index.css +121 -0
- package/src/lib/reportUtils.ts +59 -0
- package/src/main.tsx +10 -0
- package/src/store.ts +146 -0
- package/src/types.ts +77 -0
- package/vite.config.ts +31 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{p as xt,q as _t,s as vt,g as bt,b as St,a as wt,_ as d,c as lt,A as Lt,d as H,Y as Et,z as At,k as Tt}from"./index-ByxguSZe.js";import{o as Mt}from"./ordinal-Cboi1Yqb.js";import"./init-Gi6I4Gst.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a<n;)s[a]="#"+t.slice(a*6,++a*6);return s}const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,n){return Q(t.source,n.source)||t.index-n.index}function ht(t,n){return Q(t.target,n.target)||t.index-n.index}function Q(t,n){return t.y0-n.y0}function it(t){return t.value}function zt(t){return t.index}function Dt(t){return t.nodes}function jt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,y=8,p,m=zt,o=kt,l,h,x=Dt,_=jt,g=6;function v(){const i={nodes:x.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:X(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:X(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(y=p=+i,v):y},v.nodes=function(i){return arguments.length?(x=typeof i=="function"?i:X(i),v):x},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:X(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:k,target:b}=r;typeof k!="object"&&(k=r.source=ft(c,k)),typeof b!="object"&&(b=r.target=ft(c,b)),k.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.depth=r;for(const{target:b}of k.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.height=r;for(const{source:b}of k.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const k=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=k,r.x0=t+k*c,r.x1=r.x0+u,e[k]?e[k].push(r):e[k]=[r]}if(l)for(const r of e)r.sort(l);return e}function z(i){const f=pt(i,c=>(a-n-(c.length-1)*p)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}e=(a-e+p)/(c.length+1);for(let r=0;r<c.length;++r){const k=c[r];k.y0+=e*(r+1),k.y1+=e*(r+1)}w(c)}}function S(i){const f=N(i);p=Math.min(y,(a-n)/(ct(f,c=>c.length)-1)),z(f);for(let c=0;c<g;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/g);R(f,e,r),C(f,e,r)}}function C(i,f,c){for(let e=1,r=i.length;e<r;++e){const k=i[e];for(const b of k){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let q=et*(b.layer-Y.layer);L+=P(Y,b)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,j(b)}l===void 0&&k.sort(Q),D(k,c)}}function R(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const k=i[r];for(const b of k){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let q=et*(Y.layer-b.layer);L+=E(b,Y)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,j(b)}l===void 0&&k.sort(Q),D(k,c)}}function D(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-p,c-1,f),V(i,e.y1+p,c+1,f),O(i,a,i.length-1,f),V(i,n,0,f)}function V(i,f,c,e){for(;c<i.length;++c){const r=i[c],k=(f-r.y0)*e;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],k=(r.y1-f)*e;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function j({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+p}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,y){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+y)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var y=this._x1,p=this._y1,m=s-t,o=a-n,l=y-t,h=p-n,x=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(h*m-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-y,g=a-p,v=m*m+o*o,T=_*_+g*g,A=Math.sqrt(v),M=Math.sqrt(x),I=u*Math.tan((rt-Math.acos((v+x-T)/(2*A*M)))/2),N=I/M,z=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*g)+","+(this._x1=t+z*m)+","+(this._y1=n+z*o)}},arc:function(t,n,s,a,u,y){t=+t,n=+n,s=+s,y=!!y;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,h=1^y,x=y?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(x<0&&(x=x%st+st),x>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Rt,u=Vt,y=null;function p(){var m,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(y||(y=m=mt()),t(y,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return y=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:dt(+m),p):a},p.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),p):u},p.context=function(m){return arguments.length?(y=m??null,p):y},p}function qt(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=(function(){var t=d(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:d(function(o,l,h,x,_,g,v){var T=g.length-1;switch(_){case 7:const A=x.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=x.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),I=parseFloat(g[T].trim());x.addLink(A,M,I);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:d(function(o){var l=this,h=[0],x=[],_=[null],g=[],v=this.table,T="",A=0,M=0,I=2,N=1,z=g.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;g.push(D);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,g.length=g.length-L}d(O,"popStack");function j(){var L;return L=x.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=l.symbols_[L]||L),L}d(j,"lex");for(var w,P,E,i,f={},c,e,r,k;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=j()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";k=[];for(c in v[P])this.terminals_[c]&&c>I&&k.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+k.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:D,expected:k})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),g.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,D=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:g[g.length-(e||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(e||1)].first_column,last_column:g[g.length-1].last_column},V&&(f._$.range=[g[g.length-(e||1)].range[0],g[g.length-1].range[1]]),i=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,g].concat(z)),typeof i<"u")return i;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),g=g.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),g.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},y=(function(){var m={EOF:1,parseError:d(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:d(function(o,l){return this.yy=l||this.yy||{},this._input=o,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:d(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:d(function(o){var l=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(o){this.unput(this.match.slice(o))},"less"),pastInput:d(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:d(function(o,l){var h,x,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),x=o[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],h=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var g in _)this[g]=_[g];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,h,x;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),g=0;g<_.length;g++)if(h=this._input.match(this.rules[_[g]]),h&&(!l||h[0].length>l[0].length)){if(l=h,x=g,this.options.backtrack_lexer){if(o=this.test_match(h,_[g]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,_[x]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var l=this.next();return l||this.lex()},"lex"),begin:d(function(l){this.conditionStack.push(l)},"begin"),popState:d(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:d(function(l){this.begin(l)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(l,h,x,_){switch(x){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return m})();u.lexer=y;function p(){this.yy={}}return d(p,"Parser"),p.prototype=u,u.Parser=p,new p})();at.parser=at;var K=at,J=[],tt=[],Z=new Map,Zt=d(()=>{J=[],tt=[],Z=new Map,At()},"clear"),W,Jt=(W=class{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}},d(W,"SankeyLink"),W),te=d((t,n,s)=>{J.push(new Jt(t,n,s))},"addLink"),G,ee=(G=class{constructor(n){this.ID=n}},d(G,"SankeyNode"),G),ne=d(t=>{t=Tt.sanitizeText(t,lt());let n=Z.get(t);return n===void 0&&(n=new ee(t),Z.set(t,n),tt.push(n)),n},"findOrCreateNode"),ie=d(()=>tt,"getNodes"),re=d(()=>J,"getLinks"),se=d(()=>({nodes:tt.map(t=>({id:t.ID})),links:J.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:d(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:re,getGraph:se,addLink:te,findOrCreateNode:ne,getAccTitle:wt,setAccTitle:St,getAccDescription:bt,setAccDescription:vt,getDiagramTitle:_t,setDiagramTitle:xt,clear:Zt},$,gt=($=class{static next(n){return new $(n+ ++$.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}},d($,"Uid"),$.count=0,$),ae={left:It,right:Ot,center:$t,justify:kt},le=d(t=>{let n=0,s=0;for(const a of t){const u=a.value??0;u>n&&(n=u,s=a.layer??0)}return s},"findCentralNodeLayer"),ce=d(function(t,n,s,a){const{securityLevel:u,sankey:y}=lt(),p=Lt.sankey;let m;u==="sandbox"&&(m=H("#i"+n));const o=u==="sandbox"?H(m.nodes()[0].contentDocument.body):H("body"),l=u==="sandbox"?o.select(`[id="${n}"]`):H(`[id="${n}"]`),h=(y==null?void 0:y.width)??p.width,x=(y==null?void 0:y.height)??p.width,_=(y==null?void 0:y.useMaxWidth)??p.useMaxWidth,g=(y==null?void 0:y.nodeAlignment)??p.nodeAlignment,v=(y==null?void 0:y.prefix)??p.prefix,T=(y==null?void 0:y.suffix)??p.suffix,A=(y==null?void 0:y.showValues)??p.showValues,M=(y==null?void 0:y.nodeWidth)??p.nodeWidth??10,I=(y==null?void 0:y.nodePadding)??p.nodePadding??12,N=(y==null?void 0:y.labelStyle)??p.labelStyle??"legacy",z=(y==null?void 0:y.nodeColors)??{},S=a.db.getGraph(),C=ae[g];Bt().nodeId(e=>e.id).nodeWidth(M).nodePadding(I+(A?15:0)).nodeAlign(C).extent([[0,0],[h,x]])(S);const D=le(S.nodes),V=Mt(Ct),O=d(e=>z[e]??V(e),"getNodeColor");l.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=gt.next("node-")).id).attr("transform",function(e){return"translate("+e.x0+","+e.y0+")"}).attr("x",e=>e.x0).attr("y",e=>e.y0).append("rect").attr("height",e=>e.y1-e.y0).attr("width",e=>e.x1-e.x0).attr("fill",e=>O(e.id));const j=d(({id:e,value:r})=>A?`${e}
|
|
7
|
+
${v}${Math.round(r*100)/100}${T}`:e,"getText"),w=d(e=>N==="outlined"?(e.layer??0)<D?{x:e.x0-6,anchor:"end"}:{x:e.x1+6,anchor:"start"}:e.x0<h/2?{x:e.x1+6,anchor:"start"}:{x:e.x0-6,anchor:"end"},"getLabelPosition"),P=l.append("g").attr("class","node-labels").attr("font-size",14),E=d(e=>P.selectAll(e?`.${e}`:"text").data(S.nodes).join("text").attr("class",e??null).attr("x",r=>w(r).x).attr("y",r=>(r.y1+r.y0)/2).attr("dy",`${A?"0":"0.35"}em`).attr("text-anchor",r=>w(r).anchor).text(j),"appendLabel");N==="outlined"?(E("sankey-label-bg"),E("sankey-label-fg")):E();const i=l.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),f=(y==null?void 0:y.linkColor)??"gradient";if(f==="gradient"){const e=i.append("linearGradient").attr("id",r=>(r.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",r=>r.source.x1).attr("x2",r=>r.target.x0);e.append("stop").attr("offset","0%").attr("stop-color",r=>O(r.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",r=>O(r.target.id))}let c;switch(f){case"gradient":c=d(e=>e.uid,"coloring");break;case"source":c=d(e=>O(e.source.id),"coloring");break;case"target":c=d(e=>O(e.target.id),"coloring");break;default:c=f}i.append("path").attr("d",Kt()).attr("stroke",c).attr("stroke-width",e=>Math.max(1,e.width)),Et(void 0,l,0,_)},"draw"),ue={draw:ce},he=d(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
+
`).trim(),"prepareTextForParsing"),fe=d(t=>`.label {
|
|
9
|
+
font-family: ${t.fontFamily};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.node-labels {
|
|
13
|
+
font-family: ${t.fontFamily};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Outlined label style - background stroke for better readability */
|
|
17
|
+
.sankey-label-bg {
|
|
18
|
+
stroke: ${t.mainBkg||t.background||"#fff"};
|
|
19
|
+
stroke-width: 4px;
|
|
20
|
+
stroke-linejoin: round;
|
|
21
|
+
paint-order: stroke;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Foreground label text */
|
|
25
|
+
.sankey-label-fg {
|
|
26
|
+
fill: ${t.textColor};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Node styling */
|
|
30
|
+
.node rect {
|
|
31
|
+
shape-rendering: crispEdges;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Link styling */
|
|
35
|
+
.link {
|
|
36
|
+
fill: none;
|
|
37
|
+
stroke-opacity: 0.5;
|
|
38
|
+
mix-blend-mode: multiply;
|
|
39
|
+
}
|
|
40
|
+
`,"getStyles"),ye=fe,de=K.parse.bind(K);K.parse=t=>de(he(t));var me={styles:ye,parser:K,db:oe,renderer:ue};export{me as diagram};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import{_ as g,n as er,c as j,d as Bt,l as st,j as Me,e as rr,f as ar,k as P,b as De,s as sr,p as ir,a as nr,g as or,q as cr,t as lr,J as hr,z as dr,i as Vt,u as Z,L as $,M as mt,N as Be,Z as Tr,D as Wt,O as pr,P as Ve}from"./index-ByxguSZe.js";import{a as Er,b as re,g as dt,d as ur,e as ae,f as se}from"./chunk-ND2GUHAM-Dz2efqnq.js";import{I as fr}from"./chunk-QZHKN3VN-CwblgSnQ.js";var jt=(function(){var e=g(function(ut,N,v,k){for(v=v||{},k=ut.length;k--;v[ut[k]]=N);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],E=[1,14],d=[1,15],l=[1,17],x=[1,18],u=[1,19],O=[1,25],p=[1,26],f=[1,27],_=[1,28],I=[1,29],L=[1,30],b=[1,31],m=[1,32],w=[1,33],S=[1,34],Y=[1,35],M=[1,36],V=[1,37],G=[1,38],W=[1,39],X=[1,40],Q=[1,42],z=[1,43],it=[1,44],tt=[1,45],nt=[1,46],K=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Pt=[1,74],A=[1,80],D=[1,81],et=[1,82],rt=[1,83],F=[1,84],ie=[1,85],ne=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],Ae=[2,78],St=[4,5,17,51,53,54],kt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],zt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],we=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ut=[5,52],q=[70,71,72,73],ct=[1,151],Gt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:g(function(N,v,k,y,U,c,wt){var T=c.length-1;switch(U){case 3:return y.apply(c[T]),c[T];case 4:case 10:this.$=[];break;case 5:case 11:c[T-1].push(c[T]),this.$=c[T-1];break;case 6:case 7:case 12:case 13:this.$=c[T];break;case 8:case 9:case 14:this.$=[];break;case 16:c[T].type="createParticipant",this.$=c[T];break;case 17:c[T-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[T-2])}),c[T-1].push({type:"boxEnd",boxText:c[T-2]}),this.$=c[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-2]),sequenceIndexStep:Number(c[T-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[T-1].actor};break;case 30:y.setDiagramTitle(c[T].substring(6)),this.$=c[T].substring(6);break;case 31:y.setDiagramTitle(c[T].substring(7)),this.$=c[T].substring(7);break;case 32:this.$=c[T].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[T].trim(),y.setAccDescription(this.$);break;case 35:c[T-1].unshift({type:"loopStart",loopText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.LOOP_START}),c[T-1].push({type:"loopEnd",loopText:c[T-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[T-1];break;case 36:c[T-1].unshift({type:"rectStart",color:y.parseMessage(c[T-2]),signalType:y.LINETYPE.RECT_START}),c[T-1].push({type:"rectEnd",color:y.parseMessage(c[T-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[T-1];break;case 37:c[T-1].unshift({type:"optStart",optText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.OPT_START}),c[T-1].push({type:"optEnd",optText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[T-1];break;case 38:c[T-1].unshift({type:"altStart",altText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.ALT_START}),c[T-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[T-1];break;case 39:c[T-1].unshift({type:"parStart",parText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.PAR_START}),c[T-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[T-1];break;case 40:c[T-1].unshift({type:"parStart",parText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[T-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[T-1];break;case 41:c[T-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.CRITICAL_START}),c[T-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[T-1];break;case 42:c[T-1].unshift({type:"breakStart",breakText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.BREAK_START}),c[T-1].push({type:"breakEnd",optText:y.parseMessage(c[T-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[T-1];break;case 44:this.$=c[T-3].concat([{type:"option",optionText:y.parseMessage(c[T-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[T]]);break;case 46:this.$=c[T-3].concat([{type:"and",parText:y.parseMessage(c[T-1]),signalType:y.LINETYPE.PAR_AND},c[T]]);break;case 48:this.$=c[T-3].concat([{type:"else",altText:y.parseMessage(c[T-1]),signalType:y.LINETYPE.ALT_ELSE},c[T]]);break;case 49:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=y.parseMessage(c[T-1]),this.$=c[T-3];break;case 50:c[T-1].draw="participant",c[T-1].type="addParticipant",this.$=c[T-1];break;case 51:c[T-3].draw="actor",c[T-3].type="addParticipant",c[T-3].description=y.parseMessage(c[T-1]),this.$=c[T-3];break;case 52:case 57:c[T-1].draw="actor",c[T-1].type="addParticipant",this.$=c[T-1];break;case 53:c[T-1].type="destroyParticipant",this.$=c[T-1];break;case 54:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=y.parseMessage(c[T-1]),this.$=c[T-3];break;case 55:c[T-1].draw="participant",c[T-1].type="addParticipant",this.$=c[T-1];break;case 56:c[T-3].draw="actor",c[T-3].type="addParticipant",c[T-3].description=y.parseMessage(c[T-1]),this.$=c[T-3];break;case 58:this.$=[c[T-1],{type:"addNote",placement:c[T-2],actor:c[T-1].actor,text:c[T]}];break;case 59:c[T-2]=[].concat(c[T-1],c[T-1]).slice(0,2),c[T-2][0]=c[T-2][0].actor,c[T-2][1]=c[T-2][1].actor,this.$=[c[T-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[T-2].slice(0,2),text:c[T]}];break;case 60:this.$=[c[T-1],{type:"addLinks",actor:c[T-1].actor,text:c[T]}];break;case 61:this.$=[c[T-1],{type:"addALink",actor:c[T-1].actor,text:c[T]}];break;case 62:this.$=[c[T-1],{type:"addProperties",actor:c[T-1].actor,text:c[T]}];break;case 63:this.$=[c[T-1],{type:"addDetails",actor:c[T-1].actor,text:c[T]}];break;case 66:this.$=[c[T-2],c[T]];break;case 67:this.$=c[T];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[T-1].actor}];break;case 71:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[T-4].actor}];break;case 72:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor}];break;case 73:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-2],msg:c[T],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[T-4].actor}];break;case 74:this.$=[c[T-5],c[T-1],{type:"addMessage",from:c[T-5].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[T-5].actor}];break;case 75:this.$=[c[T-3],c[T-1],{type:"addMessage",from:c[T-3].actor,to:c[T-1].actor,signalType:c[T-2],msg:c[T]}];break;case 76:this.$={type:"addParticipant",actor:c[T-1],config:c[T]};break;case 77:this.$=c[T-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[T]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},e(C,[2,5]),{9:48,13:13,14:E,15:d,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:G,53:W,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:K},{23:56,73:K},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Pt},{23:75,55:76,73:Pt},{23:77,73:K},{69:78,72:[1,79],78:A,79:D,80:et,81:rt,82:F,83:ie,84:ne,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:K},{23:111,73:K},{23:112,73:K},{23:113,73:K},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ae),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(kt,i,{7:120}),e(kt,i,{7:121}),e(kt,i,{7:122}),e(Se,i,{41:123,7:124}),e(zt,i,{43:125,7:126}),e(zt,i,{7:126,43:127}),e(we,i,{46:128,7:129}),e(kt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ut,Ae,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:K},{69:146,78:A,79:D,80:et,81:rt,82:F,83:ie,84:ne,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:K},{23:149,60:148,73:K},{73:[2,68]},{73:[2,69]},{58:150,104:ct},{58:152,104:ct},{58:153,104:ct},{58:154,104:ct},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:G,53:W,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[1,161],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[1,162],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[1,163],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[2,47],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,50:[1,165],51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[2,45],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,49:[1,167],51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[2,43],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,48:[1,170],51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:d,17:[1,171],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:G,53:W,54:X,56:Q,61:z,62:it,63:tt,64:nt,73:K},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Ut,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:K},{23:178,73:K},{23:179,73:K},{58:180,104:ct},{23:181,72:[1,182],73:K},{58:183,104:ct},{58:184,104:ct},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:G,53:W,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ct},{58:196,104:ct},{58:197,104:ct},{5:[2,75]},{58:198,104:ct},{23:199,73:K},{5:[2,58]},{5:[2,59]},{23:200,73:K},e(St,[2,12]),e(Se,i,{7:124,41:201}),e(zt,i,{7:126,43:202}),e(we,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Ut,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ct},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:g(function(N,v){if(v.recoverable)this.trace(N);else{var k=new Error(N);throw k.hash=v,k}},"parseError"),parse:g(function(N){var v=this,k=[0],y=[],U=[null],c=[],wt=this.table,T="",vt=0,Ne=0,Qe=2,me=1,$e=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(gt.yy[Xt]=this.yy[Xt]);J.setInput(N,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Jt=J.yylloc;c.push(Jt);var je=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(ot){k.length=k.length-2*ot,U.length=U.length-ot,c.length=c.length-ot}g(tr,"popStack");function Pe(){var ot;return ot=y.pop()||J.lex()||me,typeof ot!="number"&&(ot instanceof Array&&(y=ot,ot=y.pop()),ot=v.symbols_[ot]||ot),ot}g(Pe,"lex");for(var at,xt,lt,Zt,Ot={},Ct,Tt,ke,Mt;;){if(xt=k[k.length-1],this.defaultActions[xt]?lt=this.defaultActions[xt]:((at===null||typeof at>"u")&&(at=Pe()),lt=wt[xt]&&wt[xt][at]),typeof lt>"u"||!lt.length||!lt[0]){var Qt="";Mt=[];for(Ct in wt[xt])this.terminals_[Ct]&&Ct>Qe&&Mt.push("'"+this.terminals_[Ct]+"'");J.showPosition?Qt="Parse error on line "+(vt+1)+`:
|
|
2
|
+
`+J.showPosition()+`
|
|
3
|
+
Expecting `+Mt.join(", ")+", got '"+(this.terminals_[at]||at)+"'":Qt="Parse error on line "+(vt+1)+": Unexpected "+(at==me?"end of input":"'"+(this.terminals_[at]||at)+"'"),this.parseError(Qt,{text:J.match,token:this.terminals_[at]||at,line:J.yylineno,loc:Jt,expected:Mt})}if(lt[0]instanceof Array&<.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+at);switch(lt[0]){case 1:k.push(at),U.push(J.yytext),c.push(J.yylloc),k.push(lt[1]),at=null,Ne=J.yyleng,T=J.yytext,vt=J.yylineno,Jt=J.yylloc;break;case 2:if(Tt=this.productions_[lt[1]][1],Ot.$=U[U.length-Tt],Ot._$={first_line:c[c.length-(Tt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Tt||1)].first_column,last_column:c[c.length-1].last_column},je&&(Ot._$.range=[c[c.length-(Tt||1)].range[0],c[c.length-1].range[1]]),Zt=this.performAction.apply(Ot,[T,Ne,vt,gt.yy,lt[1],U,c].concat($e)),typeof Zt<"u")return Zt;Tt&&(k=k.slice(0,-1*Tt*2),U=U.slice(0,-1*Tt),c=c.slice(0,-1*Tt)),k.push(this.productions_[lt[1]][0]),U.push(Ot.$),c.push(Ot._$),ke=wt[k[k.length-2]][k[k.length-1]],k.push(ke);break;case 3:return!0}}return!0},"parse")},Ze=(function(){var ut={EOF:1,parseError:g(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:g(function(N,v){return this.yy=v||this.yy||{},this._input=N,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:g(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var v=N.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:g(function(N){var v=N.length,k=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var U=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:k?(k.length===y.length?this.yylloc.first_column:0)+y[y.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(N){this.unput(this.match.slice(N))},"less"),pastInput:g(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var N=this.pastInput(),v=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
|
|
5
|
+
`+v+"^"},"showPosition"),test_match:g(function(N,v){var k,y,U;if(this.options.backtrack_lexer&&(U={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(U.yylloc.range=this.yylloc.range.slice(0))),y=N[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],k=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var c in U)this[c]=U[c];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,v,k,y;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),c=0;c<U.length;c++)if(k=this._input.match(this.rules[U[c]]),k&&(!v||k[0].length>v[0].length)){if(v=k,y=c,this.options.backtrack_lexer){if(N=this.test_match(k,U[c]),N!==!1)return N;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(N=this.test_match(v,U[y]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var v=this.next();return v||this.lex()},"lex"),begin:g(function(v){this.conditionStack.push(v)},"begin"),popState:g(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:g(function(v){this.begin(v)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:g(function(v,k,y,U){switch(y){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return k.yytext=k.yytext.trim(),73;case 12:return k.yytext=k.yytext.trim(),this.begin("ALIAS"),73;case 13:return k.yytext=k.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return k.yytext=k.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return k.yytext=k.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return ut})();Gt.lexer=Ze;function Dt(){this.yy={}}return g(Dt,"Parser"),Dt.prototype=Gt,Gt.Parser=Dt,new Dt})();jt.parser=jt;var _r=jt,gr={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},xr={FILLED:0,OPEN:1},Ir={LEFTOF:0,RIGHTOF:1,OVER:2},Yt={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},bt,yr=(bt=class{constructor(){this.state=new fr(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=De,this.setAccDescription=sr,this.setDiagramTitle=ir,this.getAccTitle=nr,this.getAccDescription=or,this.getDiagramTitle=cr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(j().wrap),this.LINETYPE=gr,this.ARROWTYPE=xr,this.PLACEMENT=Ir}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,a,r,i,n){let s=this.state.records.currentBox,o;if(n!==void 0){let d;n.includes(`
|
|
7
|
+
`)?d=n+`
|
|
8
|
+
`:d=`{
|
|
9
|
+
`+n+`
|
|
10
|
+
}`,o=lr(d,{schema:hr})}i=(o==null?void 0:o.type)??i,o!=null&&o.alias&&(!r||r.text===a)&&(r={text:o.alias,wrap:r==null?void 0:r.wrap,type:i});const E=this.state.records.actors.get(t);if(E){if(this.state.records.currentBox&&E.box&&this.state.records.currentBox!==E.box)throw new Error(`A same participant should only be defined in one Box: ${E.name} can't be in '${E.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=E.box?E.box:this.state.records.currentBox,E.box=s,E&&a===E.name&&r==null)return}if((r==null?void 0:r.text)==null&&(r={text:a,type:i}),(i==null||r.text==null)&&(r={text:a,type:i}),this.state.records.actors.set(t,{box:s,name:a,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){const d=this.state.records.actors.get(this.state.records.prevActor);d&&(d.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let a,r=0;if(!t)return 0;for(a=0;a<this.state.records.messages.length;a++)this.state.records.messages[a].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[a].from===t&&r++,this.state.records.messages[a].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[a].from===t&&r--;return r}addMessage(t,a,r,i){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:r.text,wrap:r.wrap??this.autoWrap(),answer:i})}addSignal(t,a,r,i,n=!1,s){if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1){const E=new Error("Trying to inactivate an inactive participant ("+t+")");throw E.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},E}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:(r==null?void 0:r.text)??"",wrap:(r==null?void 0:r.wrap)??this.autoWrap(),type:i,activate:n,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();const a=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(a===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:a}}autoWrap(){var t;return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:((t=j().sequence)==null?void 0:t.wrap)??!1}clear(){this.state.reset(),dr()}parseMessage(t){const a=t.trim(),{wrap:r,cleanedText:i}=this.extractWrap(a),n={text:i,wrap:r};return st.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(t){const a=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let r=a!=null&&a[1]?a[1].trim():"transparent",i=a!=null&&a[2]?a[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",r)||(r="transparent",i=t.trim());else{const o=new Option().style;o.color=r,o.color!==r&&(r="transparent",i=t.trim())}const{wrap:n,cleanedText:s}=this.extractWrap(i);return{text:s?Vt(s,j()):void 0,color:r,wrap:n}}addNote(t,a,r){const i={actor:t,placement:a,message:r.text,wrap:r.wrap??this.autoWrap()},n=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:a})}addLinks(t,a){const r=this.getActor(t);try{let i=Vt(a.text,j());i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");const n=JSON.parse(i);this.insertLinks(r,n)}catch(i){st.error("error while parsing actor link text",i)}}addALink(t,a){const r=this.getActor(t);try{const i={};let n=Vt(a.text,j());const s=n.indexOf("@");n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");const o=n.slice(0,s-1).trim(),E=n.slice(s+1).trim();i[o]=E,this.insertLinks(r,i)}catch(i){st.error("error while parsing actor link text",i)}}insertLinks(t,a){if(t.links==null)t.links=a;else for(const r in a)t.links[r]=a[r]}addProperties(t,a){const r=this.getActor(t);try{const i=Vt(a.text,j()),n=JSON.parse(i);this.insertProperties(r,n)}catch(i){st.error("error while parsing actor properties text",i)}}insertProperties(t,a){if(t.properties==null)t.properties=a;else for(const r in a)t.properties[r]=a[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,a){const r=this.getActor(t),i=document.getElementById(a.text);try{const n=i.innerHTML,s=JSON.parse(n);s.properties&&this.insertProperties(r,s.properties),s.links&&this.insertLinks(r,s.links)}catch(n){st.error("error while parsing actor details text",n)}}getActorProperty(t,a){if((t==null?void 0:t.properties)!==void 0)return t.properties[a]}apply(t){if(Array.isArray(t))t.forEach(a=>{this.apply(a)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":De(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return j().sequence}},g(bt,"SequenceDB"),bt),Rr=g(e=>{const t=e.dropShadow??"none",{look:a}=j();return`.actor {
|
|
11
|
+
stroke: ${e.actorBorder};
|
|
12
|
+
fill: ${e.actorBkg};
|
|
13
|
+
stroke-width: ${e.strokeWidth??1};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
rect.actor.outer-path[data-look="neo"] {
|
|
17
|
+
filter: ${t};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
rect.note[data-look="neo"] {
|
|
21
|
+
stroke:${e.noteBorderColor};
|
|
22
|
+
fill:${e.noteBkgColor};
|
|
23
|
+
filter: ${t};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
text.actor > tspan {
|
|
27
|
+
fill: ${e.actorTextColor};
|
|
28
|
+
stroke: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.actor-line {
|
|
32
|
+
stroke: ${e.actorLineColor};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.innerArc {
|
|
36
|
+
stroke-width: 1.5;
|
|
37
|
+
stroke-dasharray: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.messageLine0 {
|
|
41
|
+
stroke-width: 1.5;
|
|
42
|
+
stroke-dasharray: none;
|
|
43
|
+
stroke: ${e.signalColor};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.messageLine1 {
|
|
47
|
+
stroke-width: 1.5;
|
|
48
|
+
stroke-dasharray: 2, 2;
|
|
49
|
+
stroke: ${e.signalColor};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[id$="-arrowhead"] path {
|
|
53
|
+
fill: ${e.signalColor};
|
|
54
|
+
stroke: ${e.signalColor};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.sequenceNumber {
|
|
58
|
+
fill: ${e.sequenceNumberColor};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[id$="-sequencenumber"] {
|
|
62
|
+
fill: ${e.signalColor};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[id$="-crosshead"] path {
|
|
66
|
+
fill: ${e.signalColor};
|
|
67
|
+
stroke: ${e.signalColor};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.messageText {
|
|
71
|
+
fill: ${e.signalTextColor};
|
|
72
|
+
stroke: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.labelBox {
|
|
76
|
+
stroke: ${e.labelBoxBorderColor};
|
|
77
|
+
fill: ${e.labelBoxBkgColor};
|
|
78
|
+
filter: ${a==="neo"?t:"none"};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.labelText, .labelText > tspan {
|
|
82
|
+
fill: ${e.labelTextColor};
|
|
83
|
+
stroke: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.loopText, .loopText > tspan {
|
|
87
|
+
fill: ${e.loopTextColor};
|
|
88
|
+
stroke: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.sectionTitle, .sectionTitle > tspan {
|
|
92
|
+
fill: ${e.loopTextColor};
|
|
93
|
+
stroke: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.loopLine {
|
|
97
|
+
stroke-width: 2px;
|
|
98
|
+
stroke-dasharray: 2, 2;
|
|
99
|
+
stroke: ${e.labelBoxBorderColor};
|
|
100
|
+
fill: ${e.labelBoxBorderColor};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.note {
|
|
104
|
+
//stroke: #decc93;
|
|
105
|
+
stroke: ${e.noteBorderColor};
|
|
106
|
+
fill: ${e.noteBkgColor};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.noteText, .noteText > tspan {
|
|
110
|
+
fill: ${e.noteTextColor};
|
|
111
|
+
stroke: none;
|
|
112
|
+
${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.activation0 {
|
|
116
|
+
fill: ${e.activationBkgColor};
|
|
117
|
+
stroke: ${e.activationBorderColor};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.activation1 {
|
|
121
|
+
fill: ${e.activationBkgColor};
|
|
122
|
+
stroke: ${e.activationBorderColor};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.activation2 {
|
|
126
|
+
fill: ${e.activationBkgColor};
|
|
127
|
+
stroke: ${e.activationBorderColor};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.actorPopupMenu {
|
|
131
|
+
position: absolute;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.actorPopupMenuPanel {
|
|
135
|
+
position: absolute;
|
|
136
|
+
fill: ${e.actorBkg};
|
|
137
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
138
|
+
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
139
|
+
}
|
|
140
|
+
.actor-man circle, line {
|
|
141
|
+
fill: ${e.actorBkg};
|
|
142
|
+
stroke-width: 2px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
g rect.rect {
|
|
146
|
+
filter: ${t};
|
|
147
|
+
stroke: ${e.nodeBorder};
|
|
148
|
+
}
|
|
149
|
+
`},"getStyles"),Or=Rr,It=36,ft="actor-top",_t="actor-bottom",Ft="actor-box",yt="actor-man",pt=new Set(["redux-color","redux-dark-color"]),Nt=g(function(e,t){const a=ur(e,t);return Wt().look==="neo"&&a.attr("data-look","neo"),a},"drawRect"),Lr=g(function(e,t,a,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const n=t.links,s=t.actorCnt,o=t.rectData;var E="none";i&&(E="block !important");const d=e.append("g");d.attr("id","actor"+s+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",E);var l="";o.class!==void 0&&(l=" "+o.class);let x=o.width>a?o.width:a;const u=d.append("rect");if(u.attr("class","actorPopupMenuPanel"+l),u.attr("x",o.x),u.attr("y",o.height),u.attr("fill",o.fill),u.attr("stroke",o.stroke),u.attr("width",x),u.attr("height",o.height),u.attr("rx",o.rx),u.attr("ry",o.ry),n!=null){var O=20;for(let _ in n){var p=d.append("a"),f=Me.sanitizeUrl(n[_]);p.attr("xlink:href",f),p.attr("target","_blank"),Gr(r)(_,p,o.x+10,o.height+O,x,20,{class:"actor"},r),O+=30}}return u.attr("height",O),{height:o.height+O,width:x}},"drawPopup"),qt=g(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Kt=g(async function(e,t,a=null){let r=e.append("foreignObject");const i=await Ve(t.text,Wt()),s=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){const o=e.node().firstChild;o.setAttribute("height",s.height+2*t.textMargin);const E=o.getBBox();r.attr("x",Math.round(E.x+E.width/2-s.width/2)).attr("y",Math.round(E.y+E.height/2-s.height/2))}else if(a){let{startx:o,stopx:E,starty:d}=a;if(o>E){const l=o;o=E,E=l}r.attr("x",Math.round(o+Math.abs(o-E)/2-s.width/2)),t.class==="loopText"?r.attr("y",Math.round(d)):r.attr("y",Math.round(d-s.height))}return[r]},"drawKatex"),At=g(function(e,t){let a=0,r=0;const i=t.text.split(P.lineBreakRegex),[n,s]=Be(t.fontSize);let o=[],E=0,d=g(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":d=g(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":d=g(()=>Math.round(t.y+(a+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":d=g(()=>Math.round(t.y+(a+r+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[l,x]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&n!==void 0&&(E=l*n);const u=e.append("text");u.attr("x",t.x),u.attr("y",d()),t.anchor!==void 0&&u.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&u.style("font-family",t.fontFamily),s!==void 0&&u.style("font-size",s),t.fontWeight!==void 0&&u.style("font-weight",t.fontWeight),t.fill!==void 0&&u.attr("fill",t.fill),t.class!==void 0&&u.attr("class",t.class),t.dy!==void 0?u.attr("dy",t.dy):E!==0&&u.attr("dy",E);const O=x||Tr;if(t.tspan){const p=u.append("tspan");p.attr("x",t.x),t.fill!==void 0&&p.attr("fill",t.fill),p.text(O)}else u.text(O);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(u._groups||u)[0][0].getBBox().height,a=r),o.push(u)}return o},"drawText"),Ye=g(function(e,t){function a(i,n,s,o,E){return i+","+n+" "+(i+s)+","+n+" "+(i+s)+","+(n+o-E)+" "+(i+s-E*1.2)+","+(n+o)+" "+i+","+(n+o)}g(a,"genPoints");const r=e.append("polygon");return r.attr("points",a(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=t.y+t.height/2,At(e,t),r},"drawLabel"),B=-1,We=g((e,t,a,r)=>{e.select&&a.forEach(i=>{const n=t.get(i),s=e.select("#actor"+n.actorCnt);!r.mirrorActors&&n.stopy?s.attr("y2",n.stopy+n.height/2):r.mirrorActors&&s.attr("y2",n.stopy)})},"fixLifeLineHeights"),br=g(function(e,t,a,r,i){var m,w;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u}=l,O=e.append("g").lower();var p=O;r||(B++,Object.keys(t.links||{}).length&&!a.forceMenus&&p.attr("onclick",qt(`actor${B}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+B).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).attr("data-et","life-line").attr("data-id",t.name),p=O.append("g"),t.actorCnt=B,t.links!=null&&p.attr("id","root-"+B),E==="neo"&&p.attr("data-look","neo"));const f=dt();var _="actor";(m=t.properties)!=null&&m.class?_=t.properties.class:f.fill="#eaeaea",r?_+=` ${_t}`:_+=` ${ft}`,f.x=t.x,f.y=n,f.width=t.width,f.height=t.height,f.class=_,f.rx=3,f.ry=3,f.name=t.name,E==="neo"&&(f.rx=6,f.ry=6);const I=Nt(p,f),L=i.get(t.name)??0;if(pt.has(d)&&(I.style("stroke",u[L%u.length]),I.style("fill",x[L%u.length])),E==="neo"&&I.attr("filter","url(#drop-shadow)"),t.rectData=f,(w=t.properties)!=null&&w.icon){const S=t.properties.icon.trim();S.charAt(0)==="@"?ae(p,f.x+f.width-20,f.y+10,S.substr(1)):se(p,f.x+f.width-20,f.y+10,S)}r||(p.attr("data-et","participant"),p.attr("data-type","participant"),p.attr("data-id",t.name)),Et(a,$(t.description))(t.description,p,f.x,f.y,f.width,f.height,{class:`actor ${Ft}`},a);let b=t.height;if(I.node){const S=I.node().getBBox();t.height=S.height,b=S.height}return b},"drawActorTypeParticipant"),Ar=g(function(e,t,a,r,i){var Y,M;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u}=l,O=e.append("g").lower();var p=O;r||(B++,Object.keys(t.links||{}).length&&!a.forceMenus&&p.attr("onclick",qt(`actor${B}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+B).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).attr("data-et","life-line").attr("data-id",t.name),p=O.append("g"),t.actorCnt=B,t.links!=null&&p.attr("id","root-"+B),E==="neo"&&p.attr("data-look","neo"));const f=dt();var _="actor";(Y=t.properties)!=null&&Y.class?_=t.properties.class:f.fill="#eaeaea",r?_+=` ${_t}`:_+=` ${ft}`,f.x=t.x,f.y=n,f.width=t.width,f.height=t.height,f.class=_,f.name=t.name;const I=6,L={...f,x:f.x+-I,y:f.y+ +I,class:"actor"},b=Nt(p,f),m=Nt(p,L);t.rectData=f,E==="neo"&&p.attr("filter","url(#drop-shadow)");const w=i.get(t.name)??0;if(pt.has(d)&&(b.style("stroke",u[w%u.length]),b.style("fill",x[w%u.length]),m.style("stroke",u[w%u.length]),m.style("fill",x[w%u.length])),(M=t.properties)!=null&&M.icon){const V=t.properties.icon.trim();V.charAt(0)==="@"?ae(p,f.x+f.width-20,f.y+10,V.substr(1)):se(p,f.x+f.width-20,f.y+10,V)}Et(a,$(t.description))(t.description,p,f.x-I,f.y+I,f.width,f.height,{class:`actor ${Ft}`},a);let S=t.height;if(b.node){const V=b.node().getBBox();t.height=V.height,S=V.height}return r||(p.attr("data-et","participant"),p.attr("data-type","collections"),p.attr("data-id",t.name)),S},"drawActorTypeCollections"),Sr=g(function(e,t,a,r,i){var V,G;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u}=l,O=e.append("g").lower();let p=O;r||(B++,Object.keys(t.links||{}).length&&!a.forceMenus&&p.attr("onclick",qt(`actor${B}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+B).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).attr("data-et","life-line").attr("data-id",t.name),p=O.append("g"),t.actorCnt=B,t.links!=null&&p.attr("id","root-"+B),E==="neo"&&p.attr("data-look","neo"));const f=dt();let _="actor";(V=t.properties)!=null&&V.class?_=t.properties.class:f.fill="#eaeaea",r?_+=` ${_t}`:_+=` ${ft}`,p.attr("class",_),f.x=t.x,f.y=n,f.width=t.width,f.height=t.height,f.name=t.name;const I=f.height/2,L=I/(2.5+f.height/50),b=p.append("g"),m=p.append("g"),w=`M ${f.x},${f.y+I}
|
|
150
|
+
a ${L},${I} 0 0 0 0,${f.height}
|
|
151
|
+
h ${f.width-2*L}
|
|
152
|
+
a ${L},${I} 0 0 0 0,-${f.height}
|
|
153
|
+
Z
|
|
154
|
+
`;b.append("path").attr("d",w),m.append("path").attr("d",`M ${f.x},${f.y+I}
|
|
155
|
+
a ${L},${I} 0 0 0 0,${f.height}`),b.attr("transform",`translate(${L}, ${-(f.height/2)})`),m.attr("transform",`translate(${f.width-L}, ${-f.height/2})`),t.rectData=f,E==="neo"&&b.attr("filter","url(#drop-shadow)");const S=i.get(t.name)??0;if(pt.has(d)&&(b.style("stroke",u[S%u.length]),b.style("fill",x[S%u.length]),m.style("stroke",u[S%u.length]),m.style("fill",x[S%u.length])),(G=t.properties)!=null&&G.icon){const W=t.properties.icon.trim(),X=f.x+f.width-20,Q=f.y+10;W.charAt(0)==="@"?ae(p,X,Q,W.substr(1)):se(p,X,Q,W)}Et(a,$(t.description))(t.description,p,f.x,f.y,f.width,f.height,{class:`actor ${Ft}`},a);let Y=t.height;const M=b.select("path:last-child");if(M.node()){const W=M.node().getBBox();t.height=W.height,Y=W.height}return r||(p.attr("data-et","participant"),p.attr("data-type","queue"),p.attr("data-id",t.name)),Y},"drawActorTypeQueue"),wr=g(function(e,t,a,r,i,n){var V;const s=r?t.stopy:t.starty,o=t.x+t.width/2,E=s+75,{look:d,theme:l,themeVariables:x}=a,{bkgColorArray:u,borderColorArray:O,actorBorder:p,actorBkg:f}=x,_=e.append("g").lower();r||(B++,_.append("line").attr("id","actor"+B).attr("x1",o).attr("y1",E).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const I=e.append("g");let L=yt;r?L+=` ${_t}`:L+=` ${ft}`,I.attr("class",L),I.attr("name",t.name);const b=dt();b.x=t.x,b.y=s,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor";const m=t.x+t.width/2,w=s+32,S=22;I.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),I.append("circle").attr("cx",m).attr("cy",w).attr("r",S).attr("filter",`${d==="neo"?"url(#drop-shadow)":""}`),I.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${m}, ${w-S})`);const Y=n.get(t.name)??0;pt.has(l)?(I.style("stroke",O[Y%O.length]),I.style("fill",u[Y%O.length])):(I.style("stroke",p),I.style("fill",f));const M=I.node().getBBox();return t.height=M.height+2*(((V=a==null?void 0:a.sequence)==null?void 0:V.labelBoxHeight)??0),Et(a,$(t.description))(t.description,I,b.x,b.y+S+(r?5:12),b.width,b.height,{class:`actor ${yt}`},a),r||(I.attr("data-et","participant"),I.attr("data-type","control"),I.attr("data-id",t.name)),t.height},"drawActorTypeControl"),Nr=g(function(e,t,a,r,i){var S;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+75,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u}=l,O=e.append("g").lower(),p=e.append("g");let f="actor";r?f+=` ${_t}`:f+=` ${ft}`,p.attr("class",f),p.attr("name",t.name);const _=dt();_.x=t.x,_.y=n,_.fill="#eaeaea",_.width=t.width,_.height=t.height,_.class="actor";const I=t.x+t.width/2,L=n+(r?10:25),b=22;p.append("circle").attr("cx",I).attr("cy",L).attr("r",b).attr("width",t.width).attr("height",t.height),p.append("line").attr("x1",I-b).attr("x2",I+b).attr("y1",L+b).attr("y2",L+b).attr("stroke-width",2),E==="neo"&&p.attr("filter","url(#drop-shadow)");const m=i.get(t.name)??0;pt.has(d)&&(p.style("stroke",u[m%u.length]),p.style("fill",x[m%u.length]));const w=p.node().getBBox();return t.height=w.height+(((S=a==null?void 0:a.sequence)==null?void 0:S.labelBoxHeight)??0),r||(B++,O.append("line").attr("id","actor"+B).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).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B),Et(a,$(t.description))(t.description,p,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${yt}`},a),r?p.attr("transform",`translate(0, ${b})`):(p.attr("transform",`translate(0, ${b/2-5})`),p.attr("data-et","participant"),p.attr("data-type","entity"),p.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),mr=g(function(e,t,a,r,i){var G;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height+2*a.boxTextMargin,{theme:E,themeVariables:d,look:l}=a,{bkgColorArray:x,borderColorArray:u,actorBorder:O}=d,p=e.append("g").lower();let f=p;r||(B++,Object.keys(t.links||{}).length&&!a.forceMenus&&f.attr("onclick",qt(`actor${B}_popup`)).attr("cursor","pointer"),f.append("line").attr("id","actor"+B).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).attr("data-et","life-line").attr("data-id",t.name),f=p.append("g"),t.actorCnt=B,t.links!=null&&f.attr("id","root-"+B),l==="neo"&&f.attr("data-look","neo"));const _=dt();let I="actor";(G=t.properties)!=null&&G.class?I=t.properties.class:_.fill="#eaeaea",r?I+=` ${_t}`:I+=` ${ft}`,_.x=t.x,_.y=n,_.width=t.width,_.height=t.height,_.class=I,_.name=t.name,_.x=t.x,_.y=n;const L=_.width/3,b=_.width/3,m=L/2,w=m/(2.5+L/50),S=f.append("g");S.attr("class",I);const Y=`
|
|
156
|
+
M ${_.x},${_.y+w}
|
|
157
|
+
a ${m},${w} 0 0 0 ${L},0
|
|
158
|
+
a ${m},${w} 0 0 0 -${L},0
|
|
159
|
+
l 0,${b-2*w}
|
|
160
|
+
a ${m},${w} 0 0 0 ${L},0
|
|
161
|
+
l 0,-${b-2*w}
|
|
162
|
+
`;S.append("path").attr("d",Y),l==="neo"&&S.attr("filter","url(#drop-shadow)");const M=i.get(t.name)??0;pt.has(E)?(S.style("stroke",u[M%u.length]),S.style("fill",x[M%u.length])):S.style("stroke",O),S.attr("transform",`translate(${L}, ${w})`),t.rectData=_,Et(a,$(t.description))(t.description,f,_.x,_.y+35,_.width,_.height,{class:`actor ${Ft}`},a);const V=S.select("path:last-child");if(V.node()){const W=V.node().getBBox();t.height=W.height+(a.sequence.labelBoxHeight??0)}return r||(f.attr("data-et","participant"),f.attr("data-type","database"),f.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),Pr=g(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+80,E=22,d=e.append("g").lower(),{look:l,theme:x,themeVariables:u}=a,{bkgColorArray:O,borderColorArray:p,actorBorder:f}=u;r||(B++,d.append("line").attr("id","actor"+B).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).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const _=e.append("g");let I=yt;r?I+=` ${_t}`:I+=` ${ft}`,_.attr("class",I),_.attr("name",t.name);const L=dt();L.x=t.x,L.y=n,L.fill="#eaeaea",L.width=t.width,L.height=t.height,L.class="actor",_.append("line").attr("id","actor-man-torso"+B).attr("x1",t.x+t.width/2-E*2.5).attr("y1",n+12).attr("x2",t.x+t.width/2-15).attr("y2",n+12),_.append("line").attr("id","actor-man-arms"+B).attr("x1",t.x+t.width/2-E*2.5).attr("y1",n+2).attr("x2",t.x+t.width/2-E*2.5).attr("y2",n+22),_.append("circle").attr("cx",t.x+t.width/2).attr("cy",n+12).attr("r",E),l==="neo"&&_.attr("filter","url(#drop-shadow)");const b=i.get(t.name)??0;pt.has(x)?(_.style("stroke",p[b%p.length]),_.style("fill",O[b%p.length])):_.style("stroke",f);const m=_.node().getBBox();return t.height=m.height+(a.sequence.labelBoxHeight??0),Et(a,$(t.description))(t.description,_,L.x,L.y+15,L.width,L.height,{class:`actor ${yt}`},a),_.attr("transform",`translate(0,${E/2+10})`),r||(_.attr("data-et","participant"),_.attr("data-type","boundary"),_.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),kr=g(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+80,{look:E,theme:d,themeVariables:l}=a,{bkgColorArray:x,borderColorArray:u,actorBorder:O}=l,p=e.append("g").lower();r||(B++,p.append("line").attr("id","actor"+B).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).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const f=e.append("g");let _=yt;r?_+=` ${_t}`:_+=` ${ft}`,f.attr("class",_),f.attr("name",t.name),r||f.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);const I=E==="neo"?.5:1,L=E==="neo"?n+(1-I)*30:n;f.append("line").attr("id","actor-man-torso"+B).attr("x1",s).attr("y1",L+25*I).attr("x2",s).attr("y2",L+45*I),f.append("line").attr("id","actor-man-arms"+B).attr("x1",s-It/2*I).attr("y1",L+33*I).attr("x2",s+It/2*I).attr("y2",L+33*I),f.append("line").attr("x1",s-It/2*I).attr("y1",L+60*I).attr("x2",s).attr("y2",L+45*I),f.append("line").attr("x1",s).attr("y1",L+45*I).attr("x2",s+(It/2-2)*I).attr("y2",L+60*I);const b=f.append("circle");b.attr("cx",t.x+t.width/2),b.attr("cy",L+10*I),b.attr("r",15*I),b.attr("width",t.width*I),b.attr("height",t.height*I);const m=f.node().getBBox();t.height=m.height;const w=dt();w.x=t.x,w.y=L,w.fill="#eaeaea",w.width=t.width,w.height=t.height/I,w.class="actor",w.rx=3,w.ry=3;const S=i.get(t.name)??0;return pt.has(d)?(f.style("stroke",u[S%u.length]),f.style("fill",x[S%u.length])):f.style("stroke",O),Et(a,$(t.description))(t.description,f,w.x,L+35*I-(E==="neo"?10:0),w.width,w.height,{class:`actor ${yt}`},a),t.height},"drawActorTypeActor"),Dr=g(async function(e,t,a,r,i,n,s){const o=s??new Map([...n.db.getActors().values()].map((E,d)=>[E.name,d]));switch(t.type){case"actor":return await kr(e,t,a,r,o);case"participant":return await br(e,t,a,r,o);case"boundary":return await Pr(e,t,a,r,o);case"control":return await wr(e,t,a,r,i,o);case"entity":return await Nr(e,t,a,r,o);case"database":return await mr(e,t,a,r,o);case"collections":return await Ar(e,t,a,r,o);case"queue":return await Sr(e,t,a,r,o)}},"drawActor"),vr=g(function(e,t,a){const i=e.append("g");Ke(i,t),t.name&&Et(a)(t.name,i,t.x,t.y+a.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},a),i.lower()},"drawBox"),Cr=g(function(e){return e.append("g")},"anchorElement"),Mr=g(function(e,t,a,r,i,n,s){const{theme:o,themeVariables:E}=r,{bkgColorArray:d,borderColorArray:l,mainBkg:x}=E,u=dt(),O=t.anchored,p=t.actor;u.x=t.startx,u.y=t.starty,u.class="activation"+i%3,u.width=t.stopx-t.startx,u.height=a-t.starty;const f=Nt(O,u),I=(s??new Map([...n.db.getActors().values()].map((L,b)=>[L.name,b]))).get(p)??0;pt.has(o)&&(f.style("stroke",l[I%l.length]),f.style("fill",d[I%l.length]??x))},"drawActivation"),Br=g(async function(e,t,a,r,i){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:E,messageFontFamily:d,messageFontSize:l,messageFontWeight:x}=r,u=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),O=g(function(_,I,L,b){return u.append("line").attr("x1",_).attr("y1",I).attr("x2",L).attr("y2",b).attr("class","loopLine")},"drawLoopLine");O(t.startx,t.starty,t.stopx,t.starty),O(t.stopx,t.starty,t.stopx,t.stopy),O(t.startx,t.stopy,t.stopx,t.stopy),O(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(_){O(t.startx,_.y,t.stopx,_.y).style("stroke-dasharray","3, 3")});let p=re();p.text=a,p.x=t.startx,p.y=t.starty,p.fontFamily=d,p.fontSize=l,p.fontWeight=x,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=Math.max(E??0,50),p.height=o+(r.look==="neo"?15:0)||20,p.textMargin=s,p.class="labelText",Ye(u,p),p=Fe(),p.text=t.title,p.x=t.startx+E/2+(t.stopx-t.startx)/2,p.y=t.starty+n+s,p.anchor="middle",p.valign="middle",p.textMargin=s,p.class="loopText",p.fontFamily=d,p.fontSize=l,p.fontWeight=x,p.wrap=!0;let f=$(p.text)?await Kt(u,p,t):At(u,p);if(t.sectionTitles!==void 0){for(const[_,I]of Object.entries(t.sectionTitles))if(I.message){p.text=I.message,p.x=t.startx+(t.stopx-t.startx)/2,p.y=t.sections[_].y+n+s,p.class="sectionTitle",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=d,p.fontSize=l,p.fontWeight=x,p.wrap=t.wrap,$(p.text)?(t.starty=t.sections[_].y,await Kt(u,p,t)):At(u,p);let L=Math.round(f.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,m)=>b+m));t.sections[_].height+=L-(n+s)}}return t.height=Math.round(t.stopy-t.starty),u},"drawLoop"),Ke=g(function(e,t){Er(e,t)},"drawBackgroundRect"),Vr=g(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Yr=g(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Wr=g(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Kr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),Fr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),qr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),Hr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),zr=g(function(e,t){const{theme:a}=t;e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a==="redux"||a==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),Fe=g(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"),Ur=g(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Et=(function(){function e(n,s,o,E,d,l,x){const u=s.append("text").attr("x",o+d/2).attr("y",E+l/2+5).style("text-anchor","middle").text(n);i(u,x)}g(e,"byText");function t(n,s,o,E,d,l,x,u){const{actorFontSize:O,actorFontFamily:p,actorFontWeight:f}=u,[_,I]=Be(O),L=n.split(P.lineBreakRegex);for(let b=0;b<L.length;b++){const m=b*_-_*(L.length-1)/2,w=s.append("text").attr("x",o+d/2).attr("y",E).style("text-anchor","middle").style("font-size",I).style("font-weight",f).style("font-family",p);w.append("tspan").attr("x",o+d/2).attr("dy",m).text(L[b]),w.attr("y",E+l/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(w,x)}}g(t,"byTspan");function a(n,s,o,E,d,l,x,u){const O=s.append("switch"),f=O.append("foreignObject").attr("x",o).attr("y",E).attr("width",d).attr("height",l).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");f.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,O,o,E,d,l,x,u),i(f,x)}g(a,"byFo");async function r(n,s,o,E,d,l,x,u){const O=await mt(n,Wt()),p=s.append("switch"),_=p.append("foreignObject").attr("x",o+d/2-O.width/2).attr("y",E+l/2-O.height/2).attr("width",O.width).attr("height",O.height).append("xhtml:div").style("height","100%").style("width","100%");_.append("div").style("text-align","center").style("vertical-align","middle").html(await Ve(n,Wt())),t(n,p,o,E,d,l,x,u),i(_,x)}g(r,"byKatex");function i(n,s){for(const o in s)s.hasOwnProperty(o)&&n.attr(o,s[o])}return g(i,"_setTextAttrs"),function(n,s=!1){return s?r:n.textPlacement==="fo"?a:n.textPlacement==="old"?e:t}})(),Gr=(function(){function e(i,n,s,o,E,d,l){const x=n.append("text").attr("x",s).attr("y",o).style("text-anchor","start").text(i);r(x,l)}g(e,"byText");function t(i,n,s,o,E,d,l,x){const{actorFontSize:u,actorFontFamily:O,actorFontWeight:p}=x,f=i.split(P.lineBreakRegex);for(let _=0;_<f.length;_++){const I=_*u-u*(f.length-1)/2,L=n.append("text").attr("x",s).attr("y",o).style("text-anchor","start").style("font-size",u).style("font-weight",p).style("font-family",O);L.append("tspan").attr("x",s).attr("dy",I).text(f[_]),L.attr("y",o+d/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(L,l)}}g(t,"byTspan");function a(i,n,s,o,E,d,l,x){const u=n.append("switch"),p=u.append("foreignObject").attr("x",s).attr("y",o).attr("width",E).attr("height",d).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");p.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,u,s,o,E,d,l,x),r(p,l)}g(a,"byFo");function r(i,n){for(const s in n)n.hasOwnProperty(s)&&i.attr(s,n[s])}return g(r,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?e:t}})(),Xr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),Jr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),Zr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),Qr=g(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),H={drawRect:Nt,drawText:At,drawLabel:Ye,drawActor:Dr,drawBox:vr,drawPopup:Lr,anchorElement:Cr,drawActivation:Mr,drawLoop:Br,drawBackgroundRect:Ke,insertArrowHead:Kr,insertArrowFilledHead:Fr,insertSequenceNumber:qr,insertArrowCrossHead:Hr,insertDatabaseIcon:Vr,insertComputerIcon:Yr,insertClockIcon:Wr,getTextObj:Fe,getNoteRect:Ur,fixLifeLineHeights:We,sanitizeUrl:Me.sanitizeUrl,insertDropShadow:zr,insertSolidTopArrowHead:Xr,insertSolidBottomArrowHead:Jr,insertStickTopArrowHead:Zr,insertStickBottomArrowHead:Qr},h={},R={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:g(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:g(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:g(function(e){this.boxes.push(e)},"addBox"),addActor:g(function(e){this.actors.push(e)},"addActor"),addLoop:g(function(e){this.loops.push(e)},"addLoop"),addMessage:g(function(e){this.messages.push(e)},"addMessage"),addNote:g(function(e){this.notes.push(e)},"addNote"),lastActor:g(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:g(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:g(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:g(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:g(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,ze(j())},"init"),updateVal:g(function(e,t,a,r){e[t]===void 0?e[t]=a:e[t]=r(a,e[t])},"updateVal"),updateBounds:g(function(e,t,a,r){const i=this;let n=0;function s(o){return g(function(d){n++;const l=i.sequenceItems.length-n+1;i.updateVal(d,"starty",t-l*h.boxMargin,Math.min),i.updateVal(d,"stopy",r+l*h.boxMargin,Math.max),i.updateVal(R.data,"startx",e-l*h.boxMargin,Math.min),i.updateVal(R.data,"stopx",a+l*h.boxMargin,Math.max),o!=="activation"&&(i.updateVal(d,"startx",e-l*h.boxMargin,Math.min),i.updateVal(d,"stopx",a+l*h.boxMargin,Math.max),i.updateVal(R.data,"starty",t-l*h.boxMargin,Math.min),i.updateVal(R.data,"stopy",r+l*h.boxMargin,Math.max))},"updateItemBounds")}g(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:g(function(e,t,a,r){const i=P.getMin(e,a),n=P.getMax(e,a),s=P.getMin(t,r),o=P.getMax(t,r);this.updateVal(R.data,"startx",i,Math.min),this.updateVal(R.data,"starty",s,Math.min),this.updateVal(R.data,"stopx",n,Math.max),this.updateVal(R.data,"stopy",o,Math.max),this.updateBounds(i,s,n,o)},"insert"),newActivation:g(function(e,t,a){const r=a.get(e.from),i=Ht(e.from).length||0,n=r.x+r.width/2+(i-1)*h.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+h.activationWidth,stopy:void 0,actor:e.from,anchored:H.anchorElement(t)})},"newActivation"),endActivation:g(function(e){const t=this.activations.map(function(a){return a.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:g(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:g(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:g(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:g(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:g(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:R.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:g(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:g(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:g(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=P.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:g(function(){return this.verticalPos},"getVerticalPos"),getBounds:g(function(){return{bounds:this.data,models:this.models}},"getBounds")},$r=g(async function(e,t,a){R.bumpVerticalPos(h.boxMargin),t.height=h.boxMargin,t.starty=R.getVerticalPos();const r=dt();r.x=t.startx,r.y=t.starty,r.width=t.width||h.width,r.class="note";const i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+a);const n=H.drawRect(i,r),s=re();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=h.noteFontFamily,s.fontSize=h.noteFontSize,s.fontWeight=h.noteFontWeight,s.anchor=h.noteAlign,s.textMargin=h.noteMargin,s.valign="center";const o=$(s.text)?await Kt(i,s):At(i,s),E=Math.round(o.map(d=>(d._groups||d)[0][0].getBBox().height).reduce((d,l)=>d+l));n.attr("height",E+2*h.noteMargin),t.height+=E+2*h.noteMargin,R.bumpVerticalPos(E+2*h.noteMargin),t.stopy=t.starty+E+2*h.noteMargin,t.stopx=t.startx+r.width,R.insert(t.startx,t.starty,t.stopx,t.stopy),R.models.addNote(t)},"drawNote"),ve=g(function(e,t,a,r,i,n,s){const o=r.db.getActors(),E=o.get(t.from),d=o.get(t.to),l=a.sequenceVisible;let x=E.x+E.width/2,u=d.x+d.width/2;const O=x<=u,p=Je(t,r),f=e.append("g"),_=16.5,I=g((S,Y)=>{const M=S?_:-_;return Y?-M:M},"getCircleOffset"),L=g(S=>{f.append("circle").attr("cx",S).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:b,CENTRAL_CONNECTION_REVERSE:m,CENTRAL_CONNECTION_DUAL:w}=r.db.LINETYPE;if(l)switch(t.centralConnection){case b:p&&(u+=I(O,!0));break;case m:p||(x+=I(O,!1));break;case w:p?u+=I(O,!0):x+=I(O,!1);break}switch(t.centralConnection){case b:L(u);break;case m:L(x);break;case w:L(x),L(u);break}},"drawCentralConnection"),Rt=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),Lt=g(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),te=g(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function qe(e,t){R.bumpVerticalPos(10);const{startx:a,stopx:r,message:i}=t,n=P.splitBreaks(i).length,s=$(i),o=s?await mt(i,j()):Z.calculateTextDimensions(i,Rt(h));if(!s){const x=o.height/n;t.height+=x,R.bumpVerticalPos(x)}let E,d=o.height-10;const l=o.width;if(a===r){E=R.getVerticalPos()+d,h.rightAngles||(d+=h.boxMargin,E=R.getVerticalPos()+d),d+=30;const x=P.getMax(l/2,h.width/2);R.insert(a-x,R.getVerticalPos()-10+d,r+x,R.getVerticalPos()+30+d)}else d+=h.boxMargin,E=R.getVerticalPos()+d,R.insert(a,E-10,r,E);return R.bumpVerticalPos(d),t.height+=d,t.stopy=t.starty+t.height,R.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),E}g(qe,"boundMessage");var jr=g(async function(e,t,a,r,i,n){const{startx:s,stopx:o,starty:E,message:d,type:l,sequenceIndex:x,sequenceVisible:u}=t,O=Z.calculateTextDimensions(d,Rt(h)),p=re();p.x=Math.min(s,o),p.y=E+10,p.width=Math.abs(o-s),p.class="messageText",p.dy="1em",p.text=d,p.fontFamily=h.messageFontFamily,p.fontSize=h.messageFontSize,p.fontWeight=h.messageFontWeight,p.anchor=h.messageAlign,p.valign="center",p.textMargin=h.wrapPadding,p.tspan=!1,$(p.text)?await Kt(e,p,{startx:s,stopx:o,starty:a}):At(e,p);const f=O.width;let _;if(s===o){const L=u||h.showSequenceNumbers,b=Je(i,r),m=na(i,r),w=s+(L&&(b||m)?10:0);h.rightAngles?_=e.append("path").attr("d",`M ${w},${a} H ${s+P.getMax(h.width/2,f/2)} V ${a+25} H ${s}`):_=e.append("path").attr("d","M "+w+","+a+" C "+(w+60)+","+(a-10)+" "+(s+60)+","+(a+30)+" "+s+","+(a+20)),$t(i,r)&&ve(e,i,t,r,s,o,a)}else _=e.append("line"),_.attr("x1",s),_.attr("y1",a),_.attr("x2",o),_.attr("y2",a),$t(i,r)&&ve(e,i,t,r,s,o,a);l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||l===r.db.LINETYPE.SOLID_TOP_DOTTED||l===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||l===r.db.LINETYPE.STICK_TOP_DOTTED||l===r.db.LINETYPE.STICK_BOTTOM_DOTTED||l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(_.style("stroke-dasharray","3, 3"),_.attr("class","messageLine1")):_.attr("class","messageLine0"),_.attr("data-et","message"),_.attr("data-id","i"+t.id),_.attr("data-from",t.from),_.attr("data-to",t.to);let I="";if(h.arrowMarkerAbsolute&&(I=pr(!0)),_.attr("stroke-width",2),_.attr("stroke","none"),_.style("fill","none"),(l===r.db.LINETYPE.SOLID_TOP||l===r.db.LINETYPE.SOLID_TOP_DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-solidTopArrowHead)"),(l===r.db.LINETYPE.SOLID_BOTTOM||l===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-solidBottomArrowHead)"),(l===r.db.LINETYPE.STICK_TOP||l===r.db.LINETYPE.STICK_TOP_DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-stickTopArrowHead)"),(l===r.db.LINETYPE.STICK_BOTTOM||l===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-stickBottomArrowHead)"),(l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&_.attr("marker-start","url("+I+"#"+n+"-solidBottomArrowHead)"),(l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&_.attr("marker-start","url("+I+"#"+n+"-solidTopArrowHead)"),(l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&_.attr("marker-start","url("+I+"#"+n+"-stickBottomArrowHead)"),(l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&_.attr("marker-start","url("+I+"#"+n+"-stickTopArrowHead)"),(l===r.db.LINETYPE.SOLID||l===r.db.LINETYPE.DOTTED)&&_.attr("marker-end","url("+I+"#"+n+"-arrowhead)"),(l===r.db.LINETYPE.BIDIRECTIONAL_SOLID||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(_.attr("marker-start","url("+I+"#"+n+"-arrowhead)"),_.attr("marker-end","url("+I+"#"+n+"-arrowhead)")),(l===r.db.LINETYPE.SOLID_POINT||l===r.db.LINETYPE.DOTTED_POINT)&&_.attr("marker-end","url("+I+"#"+n+"-filled-head)"),(l===r.db.LINETYPE.SOLID_CROSS||l===r.db.LINETYPE.DOTTED_CROSS)&&_.attr("marker-end","url("+I+"#"+n+"-crosshead)"),u||h.showSequenceNumbers){const L=l===r.db.LINETYPE.BIDIRECTIONAL_SOLID||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,b=l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||l===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||l===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||l===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||l===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,m=6,w=$t(i,r);let S=s,Y=o;L?(s<o?S=s+m*2:(S=s-m+(w?-5:0),S+=(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),_.attr("x1",S)):b?(o>s?Y=o-2*m:(Y=o-m,S+=(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),Y+=w?15:0,_.attr("x2",Y),_.attr("x1",S)):_.attr("x1",s+m);let M=0;const V=s===o,G=s<=o;V?M=t.fromBounds+1:b?M=G?t.toBounds-1:t.fromBounds+1:M=G?t.fromBounds+1:t.toBounds-1;let W="12px";const X=x.toString().length;X>5?W="7px":X>3&&(W="9px"),e.append("line").attr("x1",M).attr("y1",a).attr("x2",M).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+I+"#"+n+"-sequencenumber)"),e.append("text").attr("x",M).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",W).attr("text-anchor","middle").attr("class","sequenceNumber").text(x)}},"drawMessage"),ta=g(function(e,t,a,r,i,n,s){let o=0,E=0,d,l=0;for(const x of r){const u=t.get(x),O=u.box;d&&d!=O&&(s||R.models.addBox(d),E+=h.boxMargin+d.margin),O&&O!=d&&(s||(O.x=o+E,O.y=i),E+=O.margin),u.width=P.getMax(u.width||h.width,h.width),u.height=P.getMax(u.height||h.height,h.height),u.margin=u.margin||h.actorMargin,l=P.getMax(l,u.height),a.get(u.name)&&(E+=u.width/2),u.x=o+E,u.starty=R.getVerticalPos(),R.insert(u.x,i,u.x+u.width,u.height),o+=u.width+E,u.box&&(u.box.width=o+O.margin-u.box.x),E=u.margin,d=u.box,R.models.addActor(u)}d&&!s&&R.models.addBox(d),R.bumpVerticalPos(l)},"addActorRenderingData"),ee=g(async function(e,t,a,r,i,n,s){if(r){let o=0;R.bumpVerticalPos(h.boxMargin*2);for(const E of a){const d=t.get(E);d.stopy||(d.stopy=R.getVerticalPos());const l=await H.drawActor(e,d,h,!0,i,n,s);o=P.getMax(o,l)}R.bumpVerticalPos(o+h.boxMargin)}else for(const o of a){const E=t.get(o);await H.drawActor(e,E,h,!1,i,n,s)}},"drawActors"),He=g(function(e,t,a,r){let i=0,n=0;for(const s of a){const o=t.get(s),E=ra(o),d=H.drawPopup(e,o,E,h,h.forceMenus,r);d.height>i&&(i=d.height),d.width+o.x>n&&(n=d.width+o.x)}return{maxHeight:i,maxWidth:n}},"drawActorsPopup"),ze=g(function(e){ar(h,e),e.fontFamily&&(h.actorFontFamily=h.noteFontFamily=h.messageFontFamily=e.fontFamily),e.fontSize&&(h.actorFontSize=h.noteFontSize=h.messageFontSize=e.fontSize),e.fontWeight&&(h.actorFontWeight=h.noteFontWeight=h.messageFontWeight=e.fontWeight)},"setConf"),Ht=g(function(e){return R.activations.filter(function(t){return t.actor===e})},"actorActivations"),Ce=g(function(e,t){const a=t.get(e),r=Ht(e),i=r.reduce(function(s,o){return P.getMin(s,o.startx)},a.x+a.width/2-1),n=r.reduce(function(s,o){return P.getMax(s,o.stopx)},a.x+a.width/2+1);return[i,n]},"activationBounds");function ht(e,t,a,r,i){R.bumpVerticalPos(a);let n=r;if(t.id&&t.message&&e[t.id]){const s=e[t.id].width,o=Rt(h);t.message=Z.wrapLabel(`[${t.message}]`,s-2*h.wrapPadding,o),t.width=s,t.wrap=!0;const E=Z.calculateTextDimensions(t.message,o),d=P.getMax(E.height,h.labelBoxHeight);n=r+d,st.debug(`${d} - ${t.message}`)}i(t),R.bumpVerticalPos(n)}g(ht,"adjustLoopHeightForWrap");function Ue(e,t,a,r,i,n,s){function o(l,x){l.x<i.get(e.from).x?(R.insert(t.stopx-x,t.starty,t.startx,t.stopy+l.height/2+h.noteMargin),t.stopx=t.stopx+x):(R.insert(t.startx,t.starty,t.stopx+x,t.stopy+l.height/2+h.noteMargin),t.stopx=t.stopx-x)}g(o,"receiverAdjustment");function E(l,x){l.x<i.get(e.to).x?(R.insert(t.startx-x,t.starty,t.stopx,t.stopy+l.height/2+h.noteMargin),t.startx=t.startx+x):(R.insert(t.stopx,t.starty,t.startx+x,t.stopy+l.height/2+h.noteMargin),t.startx=t.startx-x)}g(E,"senderAdjustment");const d=[Yt.ACTOR,Yt.CONTROL,Yt.ENTITY,Yt.DATABASE];if(n.get(e.to)==r){const l=i.get(e.to),x=d.includes(l.type)?It/2+3:l.width/2+3;o(l,x),l.starty=a-l.height/2,R.bumpVerticalPos(l.height/2)}else if(s.get(e.from)==r){const l=i.get(e.from);if(h.mirrorActors){const x=d.includes(l.type)?It/2:l.width/2;E(l,x)}l.stopy=a-l.height/2,R.bumpVerticalPos(l.height/2)}else if(s.get(e.to)==r){const l=i.get(e.to);if(h.mirrorActors){const x=d.includes(l.type)?It/2+3:l.width/2+3;o(l,x)}l.stopy=a-l.height/2,R.bumpVerticalPos(l.height/2)}}g(Ue,"adjustCreatedDestroyedData");var ea=g(async function(e,t,a,r){const{securityLevel:i,sequence:n,look:s}=j();h=n;let o;i==="sandbox"&&(o=Bt("#i"+t));const E=i==="sandbox"?Bt(o.nodes()[0].contentDocument.body):Bt("body"),d=i==="sandbox"?o.nodes()[0].contentDocument:document;R.init(),st.debug(r.db);const l=i==="sandbox"?E.select(`[id="${t}"]`):Bt(`[id="${t}"]`),x=r.db.getActors(),u=r.db.getCreatedActors(),O=r.db.getDestroyedActors(),p=r.db.getBoxes();let f=r.db.getActorKeys();const _=r.db.getMessages(),I=r.db.getDiagramTitle(),L=r.db.hasAtLeastOneBox(),b=r.db.hasAtLeastOneBoxWithTitle(),m=await Ge(x,_,r);if(h.height=await Xe(x,m,p),H.insertComputerIcon(l,t),H.insertDatabaseIcon(l,t),H.insertClockIcon(l,t),L&&(R.bumpVerticalPos(h.boxMargin),b&&R.bumpVerticalPos(p[0].textMaxHeight)),h.hideUnusedParticipants===!0){const A=new Set;_.forEach(D=>{A.add(D.from),A.add(D.to)}),f=f.filter(D=>A.has(D))}const w=new Map(f.map((A,D)=>{var et;return[((et=x.get(A))==null?void 0:et.name)??A,D]}));ta(l,x,u,f,0,_,!1);const S=await ca(_,x,m,r);H.insertArrowHead(l,t),H.insertArrowCrossHead(l,t),H.insertArrowFilledHead(l,t),H.insertSequenceNumber(l,t),H.insertSolidTopArrowHead(l,t),H.insertSolidBottomArrowHead(l,t),H.insertStickTopArrowHead(l,t),H.insertStickBottomArrowHead(l,t),s==="neo"&&H.insertDropShadow(l,h);function Y(A,D){const et=R.endActivation(A);et.starty+18>D&&(et.starty=D-6,D+=12),H.drawActivation(l,et,D,h,Ht(A.from).length,r,w),R.insert(et.startx,D-10,et.stopx,D)}g(Y,"activeEnd");let M=1,V=1;const G=[],W=[];let X=0;for(const A of _){let D,et,rt;switch(A.type){case r.db.LINETYPE.NOTE:R.resetVerticalPos(),et=A.noteModel,await $r(l,et,A.id);break;case r.db.LINETYPE.ACTIVE_START:R.newActivation(A,l,x);break;case r.db.LINETYPE.CENTRAL_CONNECTION:R.newActivation(A,l,x);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:R.newActivation(A,l,x);break;case r.db.LINETYPE.ACTIVE_END:Y(A,R.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.LOOP_END:D=R.endLoop(),await H.drawLoop(l,D,"loop",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.RECT_START:ht(S,A,h.boxMargin,h.boxMargin,F=>R.newLoop(void 0,F.message));break;case r.db.LINETYPE.RECT_END:D=R.endLoop(),W.push(D),R.models.addLoop(D),R.bumpVerticalPos(D.stopy-R.getVerticalPos());break;case r.db.LINETYPE.OPT_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.OPT_END:D=R.endLoop(),await H.drawLoop(l,D,"opt",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.ALT_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.ALT_ELSE:ht(S,A,h.boxMargin+h.boxTextMargin,h.boxMargin,F=>R.addSectionToLoop(F));break;case r.db.LINETYPE.ALT_END:D=R.endLoop(),await H.drawLoop(l,D,"alt",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F)),R.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:ht(S,A,h.boxMargin+h.boxTextMargin,h.boxMargin,F=>R.addSectionToLoop(F));break;case r.db.LINETYPE.PAR_END:D=R.endLoop(),await H.drawLoop(l,D,"par",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.AUTONUMBER:M=A.message.start||M,V=A.message.step||V,A.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.CRITICAL_OPTION:ht(S,A,h.boxMargin+h.boxTextMargin,h.boxMargin,F=>R.addSectionToLoop(F));break;case r.db.LINETYPE.CRITICAL_END:D=R.endLoop(),await H.drawLoop(l,D,"critical",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.BREAK_START:ht(S,A,h.boxMargin,h.boxMargin+h.boxTextMargin,F=>R.newLoop(F));break;case r.db.LINETYPE.BREAK_END:D=R.endLoop(),await H.drawLoop(l,D,"break",h,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;default:try{rt=A.msgModel,rt.starty=R.getVerticalPos(),rt.sequenceIndex=M,rt.sequenceVisible=r.db.showSequenceNumbers(),rt.id=A.id,rt.from=A.from,rt.to=A.to;const F=await qe(l,rt);Ue(A,rt,F,X,x,u,O),G.push({messageModel:rt,lineStartY:F,msg:A}),R.models.addMessage(rt)}catch(F){st.error("error while drawing message",F)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,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(A.type)&&(M=Math.round((M+V)*100)/100),X++}st.debug("createdActors",u),st.debug("destroyedActors",O),await ee(l,x,f,!1,t,r,w);for(const A of G)await jr(l,A.messageModel,A.lineStartY,r,A.msg,t);h.mirrorActors&&await ee(l,x,f,!0,t,r,w),W.forEach(A=>H.drawBackgroundRect(l,A)),We(l,x,f,h);for(const A of R.models.boxes){A.height=R.getVerticalPos()-A.y,R.insert(A.x,A.y,A.x+A.width,A.height);const D=h.boxMargin*2;A.startx=A.x-D,A.starty=A.y-D*.25,A.stopx=A.startx+A.width+2*D,A.stopy=A.starty+A.height+D*.75,A.stroke="rgb(0,0,0, 0.5)",H.drawBox(l,A,h)}L&&R.bumpVerticalPos(h.boxMargin);const Q=He(l,x,f,d),{bounds:z}=R.getBounds();z.startx===void 0&&(z.startx=0),z.starty===void 0&&(z.starty=0),z.stopx===void 0&&(z.stopx=0),z.stopy===void 0&&(z.stopy=0);let it=z.stopy-z.starty;it<Q.maxHeight&&(it=Q.maxHeight);let tt=it+2*h.diagramMarginY;h.mirrorActors&&(tt=tt-h.boxMargin+h.bottomMarginAdj);let nt=z.stopx-z.startx;nt<Q.maxWidth&&(nt=Q.maxWidth);const K=nt+2*h.diagramMarginX;I&&l.append("text").text(I).attr("x",(z.stopx-z.startx)/2-2*h.diagramMarginX).attr("y",-25),rr(l,tt,K,h.useMaxWidth);const C=I?40:0,Pt=x.size&&s==="neo"?30:0;l.attr("viewBox",z.startx-h.diagramMarginX+" -"+(h.diagramMarginY+C)+" "+K+" "+(tt+C+Pt)),st.debug("models:",R.models)},"draw");async function Ge(e,t,a){const r={};for(const i of t)if(e.get(i.to)&&e.get(i.from)){const n=e.get(i.to);if(i.placement===a.db.PLACEMENT.LEFTOF&&!n.prevActor||i.placement===a.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;const s=i.placement!==void 0,o=!s,E=s?Lt(h):Rt(h),d=i.wrap?Z.wrapLabel(i.message,h.width-2*h.wrapPadding,E):i.message,x=($(d)?await mt(i.message,j()):Z.calculateTextDimensions(d,E)).width+2*h.wrapPadding;o&&i.from===n.nextActor?r[i.to]=P.getMax(r[i.to]||0,x):o&&i.from===n.prevActor?r[i.from]=P.getMax(r[i.from]||0,x):o&&i.from===i.to?(r[i.from]=P.getMax(r[i.from]||0,x/2),r[i.to]=P.getMax(r[i.to]||0,x/2)):i.placement===a.db.PLACEMENT.RIGHTOF?r[i.from]=P.getMax(r[i.from]||0,x):i.placement===a.db.PLACEMENT.LEFTOF?r[n.prevActor]=P.getMax(r[n.prevActor]||0,x):i.placement===a.db.PLACEMENT.OVER&&(n.prevActor&&(r[n.prevActor]=P.getMax(r[n.prevActor]||0,x/2)),n.nextActor&&(r[i.from]=P.getMax(r[i.from]||0,x/2)))}return st.debug("maxMessageWidthPerActor:",r),r}g(Ge,"getMaxMessageWidthPerActor");var ra=g(function(e){let t=0;const a=te(h);for(const r in e.links){const n=Z.calculateTextDimensions(r,a).width+2*h.wrapPadding+2*h.boxMargin;t<n&&(t=n)}return t},"getRequiredPopupWidth");async function Xe(e,t,a){let r=0;for(const n of e.keys()){const s=e.get(n);s.wrap&&(s.description=Z.wrapLabel(s.description,h.width-2*h.wrapPadding,te(h)));const o=$(s.description)?await mt(s.description,j()):Z.calculateTextDimensions(s.description,te(h));s.width=s.wrap?h.width:P.getMax(h.width,o.width+2*h.wrapPadding),s.height=s.wrap?P.getMax(o.height,h.height):h.height,r=P.getMax(r,s.height)}for(const n in t){const s=e.get(n);if(!s)continue;const o=e.get(s.nextActor);if(!o){const x=t[n]+h.actorMargin-s.width/2;s.margin=P.getMax(x,h.actorMargin);continue}const d=t[n]+h.actorMargin-s.width/2-o.width/2;s.margin=P.getMax(d,h.actorMargin)}let i=0;return a.forEach(n=>{const s=Rt(h);let o=n.actorKeys.reduce((x,u)=>x+=e.get(u).width+(e.get(u).margin||0),0);const E=h.boxMargin*8;o+=E,o-=2*h.boxTextMargin,n.wrap&&(n.name=Z.wrapLabel(n.name,o-2*h.wrapPadding,s));const d=Z.calculateTextDimensions(n.name,s);i=P.getMax(d.height,i);const l=P.getMax(o,d.width+2*h.wrapPadding);if(n.margin=h.boxTextMargin,o<l){const x=(l-o)/2;n.margin+=x}}),a.forEach(n=>n.textMaxHeight=i),P.getMax(r,h.height)}g(Xe,"calculateActorMargins");var aa=g(async function(e,t,a){const r=t.get(e.from),i=t.get(e.to),n=r.x,s=i.x,o=e.wrap&&e.message;let E=$(e.message)?await mt(e.message,j()):Z.calculateTextDimensions(o?Z.wrapLabel(e.message,h.width,Lt(h)):e.message,Lt(h));const d={width:o?h.width:P.getMax(h.width,E.width+2*h.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===a.db.PLACEMENT.RIGHTOF?(d.width=o?P.getMax(h.width,E.width):P.getMax(r.width/2+i.width/2,E.width+2*h.noteMargin),d.startx=n+(r.width+h.actorMargin)/2):e.placement===a.db.PLACEMENT.LEFTOF?(d.width=o?P.getMax(h.width,E.width+2*h.noteMargin):P.getMax(r.width/2+i.width/2,E.width+2*h.noteMargin),d.startx=n-d.width+(r.width-h.actorMargin)/2):e.to===e.from?(E=Z.calculateTextDimensions(o?Z.wrapLabel(e.message,P.getMax(h.width,r.width),Lt(h)):e.message,Lt(h)),d.width=o?P.getMax(h.width,r.width):P.getMax(r.width,h.width,E.width+2*h.noteMargin),d.startx=n+(r.width-d.width)/2):(d.width=Math.abs(n+r.width/2-(s+i.width/2))+h.actorMargin,d.startx=n<s?n+r.width/2-h.actorMargin/2:s+i.width/2-h.actorMargin/2),o&&(d.message=Z.wrapLabel(e.message,d.width-2*h.wrapPadding,Lt(h))),st.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${e.message}]`),d},"buildNoteModel"),sa=4,$t=g(function(e,t){const{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[a,r,i].includes(e.centralConnection)},"hasCentralConnection"),ia=g(function(e,t,a){const{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:s}=t.db.LINETYPE;let o=0;return(e.centralConnection===r||e.centralConnection===i)&&(o+=sa),(e.centralConnection===r||e.centralConnection===i)&&(e.type===n||e.type===s)&&(o+=a?0:-6),o},"calculateCentralConnectionOffset"),Je=g(function(e,t){const{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:n,STICK_ARROW_TOP_REVERSE:s,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:E,STICK_ARROW_BOTTOM_REVERSE_DOTTED:d}=t.db.LINETYPE;return[a,r,i,n,s,o,E,d].includes(e.type)},"isReverseArrowType"),na=g(function(e,t){const{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[a,r].includes(e.type)},"isBidirectionalArrowType"),oa=g(function(e,t,a){const{look:r}=j();if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};const[i,n]=Ce(e.from,t),[s,o]=Ce(e.to,t),E=i<=s;let d=E?n:i,l=E?s:o;r==="neo"&&(e.type!==a.db.LINETYPE.SOLID_OPEN&&(l+=E?-3:3),(e.type===a.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(d+=E?3:-3)),d+=ia(e,a,E);const x=Math.abs(s-o)>2,u=g(_=>E?-_:_,"adjustValue");e.from===e.to?l=d:(e.activate&&!x&&(l+=u(h.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(l+=u(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(d-=u(3)));const O=[i,n,s,o],p=Math.abs(d-l);e.wrap&&e.message&&(e.message=Z.wrapLabel(e.message,P.getMax(p+2*h.wrapPadding,h.width),Rt(h)));const f=Z.calculateTextDimensions(e.message,Rt(h));return{width:P.getMax(e.wrap?0:f.width+2*h.wrapPadding,p+2*h.wrapPadding,h.width),height:0,startx:d,stopx:l,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,O),toBounds:Math.max.apply(null,O)}},"buildMessageModel"),ca=g(async function(e,t,a,r){const i={},n=[];let s,o,E;for(const d of e){switch(d.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:n.push({id:d.id,msg:d.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:d.message&&(s=n.pop(),i[s.id]=s,i[d.id]=s,n.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=n.pop(),i[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{const x=t.get(d.from?d.from:d.to.actor),u=Ht(d.from?d.from:d.to.actor).length,O=x.x+x.width/2+(u-1)*h.activationWidth/2,p={startx:O,stopx:O+h.activationWidth,actor:d.from,enabled:!0};R.activations.push(p)}break;case r.db.LINETYPE.ACTIVE_END:{const x=R.activations.map(u=>u.actor).lastIndexOf(d.from);R.activations.splice(x,1).splice(0,1)}break}d.placement!==void 0?(o=await aa(d,t,r),d.noteModel=o,n.forEach(x=>{s=x,s.from=P.getMin(s.from,o.startx),s.to=P.getMax(s.to,o.startx+o.width),s.width=P.getMax(s.width,Math.abs(s.from-s.to))-h.labelBoxWidth})):(E=oa(d,t,r),d.msgModel=E,E.startx&&E.stopx&&n.length>0&&n.forEach(x=>{if(s=x,E.startx===E.stopx){const u=t.get(d.from),O=t.get(d.to);s.from=P.getMin(u.x-E.width/2,u.x-u.width/2,s.from),s.to=P.getMax(O.x+E.width/2,O.x+u.width/2,s.to),s.width=P.getMax(s.width,Math.abs(s.to-s.from))-h.labelBoxWidth}else s.from=P.getMin(E.startx,s.from),s.to=P.getMax(E.stopx,s.to),s.width=P.getMax(s.width,E.width)-h.labelBoxWidth}))}return R.activations=[],st.debug("Loop type widths:",i),i},"calculateLoopBounds"),la={bounds:R,drawActors:ee,drawActorsPopup:He,setConf:ze,draw:ea},pa={parser:_r,get db(){return new yr},renderer:la,styles:Or,init:g(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,er({sequence:{wrap:e.wrap}}))},"init")};export{pa as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as A,a as W,S as N}from"./chunk-AQP2D5EJ-BzmM0IeH.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./index-ByxguSZe.js";import{G as O}from"./graph-CAnANduQ.js";import{l as J}from"./layout-DGIYPm2g.js";import"./chunk-55IACEB6-D9Xhxp_r.js";import"./chunk-2J33WTMH-BE8P9tjh.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");R(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=R(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},gt={parser:W,get db(){return new N(1)},renderer:it,styles:A,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{gt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as t,b as r,a,S as s}from"./chunk-AQP2D5EJ-BzmM0IeH.js";import{_ as i}from"./index-ByxguSZe.js";import"./chunk-55IACEB6-D9Xhxp_r.js";import"./chunk-2J33WTMH-BE8P9tjh.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
|