2?o[2]:void 0;for(w&&jN(o[0],o[1],w)&&(p=1);++f-1?w[k?o[b]:b]:void 0}}var EIt=Math.max;function TIt(s,o,f){var p=s==null?0:s.length;if(!p)return-1;var w=f==null?0:iAt(f);return w<0&&(w=EIt(p+w,0)),XIe(s,t8(o),w)}var _It=xIt(TIt);const Tde=_It;function JOe(s,o){var f=-1,p=e8(s)?Array(s.length):[];return PK(s,function(w,k,b){p[++f]=o(w,k,b)}),p}function $f(s,o){var f=jf(s)?AA:JOe;return f(s,t8(o))}function CIt(s,o){return s==null?s:kde(s,ZOe(o),JE)}function SIt(s,o){return s>o}var AIt=Object.prototype,LIt=AIt.hasOwnProperty;function MIt(s,o){return s!=null&&LIt.call(s,o)}function eo(s,o){return s!=null&&VOe(s,o,MIt)}function DIt(s,o){return AA(o,function(f){return s[f]})}function w5(s){return s==null?[]:DIt(s,M2(s))}var IIt="[object Map]",OIt="[object Set]",NIt=Object.prototype,PIt=NIt.hasOwnProperty;function FA(s){if(s==null)return!0;if(e8(s)&&(jf(s)||typeof s=="string"||typeof s.splice=="function"||DA(s)||LK(s)||MA(s)))return!s.length;var o=PA(s);if(o==IIt||o==OIt)return!s.size;if(SK(s))return!cOe(s).length;for(var f in s)if(PIt.call(s,f))return!1;return!0}function of(s){return s===void 0}function eNe(s,o){return so||k&&b&&A&&!_&&!N||p&&b&&A||!f&&A||!w)return 1;if(!p&&!k&&!N&&s=_)return A;var N=f[p];return A*(N=="desc"?-1:1)}}return s.index-o.index}function zIt(s,o,f){o.length?o=AA(o,function(k){return jf(k)?function(b){return DK(b,k.length===1?k[0]:k)}:k}):o=[ZE];var p=-1;o=AA(o,AK(t8));var w=JOe(s,function(k,b,_){var A=AA(o,function(N){return N(k)});return{criteria:A,index:++p,value:k}});return jIt(w,function(k,b){return HIt(k,b,f)})}function GIt(s,o){return RIt(s,o,function(f,p){return UOe(s,p)})}var qIt=ILt(function(s,o){return s==null?{}:GIt(s,o)});const VN=qIt;var VIt=Math.ceil,UIt=Math.max;function KIt(s,o,f,p){for(var w=-1,k=UIt(VIt((o-s)/(f||1)),0),b=Array(k);k--;)b[p?k:++w]=s,s+=f;return b}function WIt(s){return function(o,f,p){return p&&typeof p!="number"&&jN(o,f,p)&&(f=p=void 0),o=kK(o),f===void 0?(f=o,o=0):f=kK(f),p=p===void 0?o1&&jN(s,o[0],o[1])?o=[]:f>2&&jN(o[0],o[1],o[2])&&(o=[o[0]]),zIt(s,IK(o,1),[])});const KN=QIt;var ZIt=1/0,JIt=NA&&1/wde(new NA([,-0]))[1]==ZIt?function(s){return new NA(s)}:uAt;const eOt=JIt;var tOt=200;function nOt(s,o,f){var p=-1,w=yAt,k=s.length,b=!0,_=[],A=_;if(f)b=!1,w=yIt;else if(k>=tOt){var N=o?null:eOt(s);if(N)return wde(N);b=!1,w=FOe,A=new GN}else A=o?[]:_;e:for(;++p1?w.setNode(k,f):w.setNode(k)}),this}setNode(o,f){return eo(this._nodes,o)?(arguments.length>1&&(this._nodes[o]=f),this):(this._nodes[o]=arguments.length>1?f:this._defaultNodeLabelFn(o),this._isCompound&&(this._parent[o]=r9,this._children[o]={},this._children[r9][o]=!0),this._in[o]={},this._preds[o]={},this._out[o]={},this._sucs[o]={},++this._nodeCount,this)}node(o){return this._nodes[o]}hasNode(o){return eo(this._nodes,o)}removeNode(o){var f=this;if(eo(this._nodes,o)){var p=function(w){f.removeEdge(f._edgeObjs[w])};delete this._nodes[o],this._isCompound&&(this._removeFromParentsChildList(o),delete this._parent[o],hr(this.children(o),function(w){f.setParent(w)}),delete this._children[o]),hr(M2(this._in[o]),p),delete this._in[o],delete this._preds[o],hr(M2(this._out[o]),p),delete this._out[o],delete this._sucs[o],--this._nodeCount}return this}setParent(o,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(of(f))f=r9;else{f+="";for(var p=f;!of(p);p=this.parent(p))if(p===o)throw new Error("Setting "+f+" as parent of "+o+" would create a cycle");this.setNode(f)}return this.setNode(o),this._removeFromParentsChildList(o),this._parent[o]=f,this._children[f][o]=!0,this}_removeFromParentsChildList(o){delete this._children[this._parent[o]][o]}parent(o){if(this._isCompound){var f=this._parent[o];if(f!==r9)return f}}children(o){if(of(o)&&(o=r9),this._isCompound){var f=this._children[o];if(f)return M2(f)}else{if(o===r9)return this.nodes();if(this.hasNode(o))return[]}}predecessors(o){var f=this._preds[o];if(f)return M2(f)}successors(o){var f=this._sucs[o];if(f)return M2(f)}neighbors(o){var f=this.predecessors(o);if(f)return iOt(f,this.successors(o))}isLeaf(o){var f;return this.isDirected()?f=this.successors(o):f=this.neighbors(o),f.length===0}filterNodes(o){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var p=this;hr(this._nodes,function(b,_){o(_)&&f.setNode(_,b)}),hr(this._edgeObjs,function(b){f.hasNode(b.v)&&f.hasNode(b.w)&&f.setEdge(b,p.edge(b))});var w={};function k(b){var _=p.parent(b);return _===void 0||f.hasNode(_)?(w[b]=_,_):_ in w?w[_]:k(_)}return this._isCompound&&hr(f.nodes(),function(b){f.setParent(b,k(b))}),f}setDefaultEdgeLabel(o){return yA(o)||(o=LA(o)),this._defaultEdgeLabelFn=o,this}edgeCount(){return this._edgeCount}edges(){return w5(this._edgeObjs)}setPath(o,f){var p=this,w=arguments;return UN(o,function(k,b){return w.length>1?p.setEdge(k,b,f):p.setEdge(k,b),b}),this}setEdge(){var o,f,p,w,k=!1,b=arguments[0];typeof b=="object"&&b!==null&&"v"in b?(o=b.v,f=b.w,p=b.name,arguments.length===2&&(w=arguments[1],k=!0)):(o=b,f=arguments[1],p=arguments[3],arguments.length>2&&(w=arguments[2],k=!0)),o=""+o,f=""+f,of(p)||(p=""+p);var _=WN(this._isDirected,o,f,p);if(eo(this._edgeLabels,_))return k&&(this._edgeLabels[_]=w),this;if(!of(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(o),this.setNode(f),this._edgeLabels[_]=k?w:this._defaultEdgeLabelFn(o,f,p);var A=uOt(this._isDirected,o,f,p);return o=A.v,f=A.w,Object.freeze(A),this._edgeObjs[_]=A,nNe(this._preds[f],o),nNe(this._sucs[o],f),this._in[f][_]=A,this._out[o][_]=A,this._edgeCount++,this}edge(o,f,p){var w=arguments.length===1?Ade(this._isDirected,arguments[0]):WN(this._isDirected,o,f,p);return this._edgeLabels[w]}hasEdge(o,f,p){var w=arguments.length===1?Ade(this._isDirected,arguments[0]):WN(this._isDirected,o,f,p);return eo(this._edgeLabels,w)}removeEdge(o,f,p){var w=arguments.length===1?Ade(this._isDirected,arguments[0]):WN(this._isDirected,o,f,p),k=this._edgeObjs[w];return k&&(o=k.v,f=k.w,delete this._edgeLabels[w],delete this._edgeObjs[w],rNe(this._preds[f],o),rNe(this._sucs[o],f),delete this._in[f][w],delete this._out[o][w],this._edgeCount--),this}inEdges(o,f){var p=this._in[o];if(p){var w=w5(p);return f?v5(w,function(k){return k.v===f}):w}}outEdges(o,f){var p=this._out[o];if(p){var w=w5(p);return f?v5(w,function(k){return k.w===f}):w}}nodeEdges(o,f){var p=this.inEdges(o,f);if(p)return p.concat(this.outEdges(o,f))}}Hf.prototype._nodeCount=0,Hf.prototype._edgeCount=0;function nNe(s,o){s[o]?s[o]++:s[o]=1}function rNe(s,o){--s[o]||delete s[o]}function WN(s,o,f,p){var w=""+o,k=""+f;if(!s&&w>k){var b=w;w=k,k=b}return w+tNe+k+tNe+(of(p)?cOt:p)}function uOt(s,o,f,p){var w=""+o,k=""+f;if(!s&&w>k){var b=w;w=k,k=b}var _={v:w,w:k};return p&&(_.name=p),_}function Ade(s,o){return WN(s,o.v,o.w,o.name)}class lOt{constructor(){var o={};o._next=o._prev=o,this._sentinel=o}dequeue(){var o=this._sentinel,f=o._prev;if(f!==o)return iNe(f),f}enqueue(o){var f=this._sentinel;o._prev&&o._next&&iNe(o),o._next=f._next,f._next._prev=o,f._next=o,o._prev=f}toString(){for(var o=[],f=this._sentinel,p=f._prev;p!==f;)o.push(JSON.stringify(p,hOt)),p=p._prev;return"["+o.join(", ")+"]"}}function iNe(s){s._prev._next=s._next,s._next._prev=s._prev,delete s._next,delete s._prev}function hOt(s,o){if(s!=="_next"&&s!=="_prev")return o}var fOt=LA(1);function dOt(s,o){if(s.nodeCount()<=1)return[];var f=pOt(s,o||fOt),p=gOt(f.graph,f.buckets,f.zeroIdx);return OA($f(p,function(w){return s.outEdges(w.v,w.w)}))}function gOt(s,o,f){for(var p=[],w=o[o.length-1],k=o[0],b;s.nodeCount();){for(;b=k.dequeue();)Lde(s,o,f,b);for(;b=w.dequeue();)Lde(s,o,f,b);if(s.nodeCount()){for(var _=o.length-2;_>0;--_)if(b=o[_].dequeue(),b){p=p.concat(Lde(s,o,f,b,!0));break}}}return p}function Lde(s,o,f,p,w){var k=w?[]:void 0;return hr(s.inEdges(p.v),function(b){var _=s.edge(b),A=s.node(b.v);w&&k.push({v:b.v,w:b.w}),A.out-=_,Mde(o,f,A)}),hr(s.outEdges(p.v),function(b){var _=s.edge(b),A=b.w,N=s.node(A);N.in-=_,Mde(o,f,N)}),s.removeNode(p.v),k}function pOt(s,o){var f=new Hf,p=0,w=0;hr(s.nodes(),function(_){f.setNode(_,{v:_,in:0,out:0})}),hr(s.edges(),function(_){var A=f.edge(_.v,_.w)||0,N=o(_),B=A+N;f.setEdge(_.v,_.w,B),w=Math.max(w,f.node(_.v).out+=N),p=Math.max(p,f.node(_.w).in+=N)});var k=n9(w+p+3).map(function(){return new lOt}),b=p+1;return hr(f.nodes(),function(_){Mde(k,b,f.node(_))}),{graph:f,buckets:k,zeroIdx:b}}function Mde(s,o,f){f.out?f.in?s[f.out-f.in+o].enqueue(f):s[s.length-1].enqueue(f):s[0].enqueue(f)}function bOt(s){var o=s.graph().acyclicer==="greedy"?dOt(s,f(s)):vOt(s);hr(o,function(p){var w=s.edge(p);s.removeEdge(p),w.forwardName=p.name,w.reversed=!0,s.setEdge(p.w,p.v,w,RK("rev"))});function f(p){return function(w){return p.edge(w).weight}}}function vOt(s){var o=[],f={},p={};function w(k){eo(p,k)||(p[k]=!0,f[k]=!0,hr(s.outEdges(k),function(b){eo(f,b.w)?o.push(b):w(b.w)}),delete f[k])}return hr(s.nodes(),w),o}function wOt(s){hr(s.edges(),function(o){var f=s.edge(o);if(f.reversed){s.removeEdge(o);var p=f.forwardName;delete f.reversed,delete f.forwardName,s.setEdge(o.w,o.v,f,p)}})}function RA(s,o,f,p){var w;do w=RK(p);while(s.hasNode(w));return f.dummy=o,s.setNode(w,f),w}function mOt(s){var o=new Hf().setGraph(s.graph());return hr(s.nodes(),function(f){o.setNode(f,s.node(f))}),hr(s.edges(),function(f){var p=o.edge(f.v,f.w)||{weight:0,minlen:1},w=s.edge(f);o.setEdge(f.v,f.w,{weight:p.weight+w.weight,minlen:Math.max(p.minlen,w.minlen)})}),o}function sNe(s){var o=new Hf({multigraph:s.isMultigraph()}).setGraph(s.graph());return hr(s.nodes(),function(f){s.children(f).length||o.setNode(f,s.node(f))}),hr(s.edges(),function(f){o.setEdge(f,s.edge(f))}),o}function aNe(s,o){var f=s.x,p=s.y,w=o.x-f,k=o.y-p,b=s.width/2,_=s.height/2;if(!w&&!k)throw new Error("Not possible to find intersection inside of the rectangle");var A,N;return Math.abs(k)*b>Math.abs(w)*_?(k<0&&(_=-_),A=_*w/k,N=_):(w<0&&(b=-b),A=b,N=b*k/w),{x:f+A,y:p+N}}function jK(s){var o=$f(n9(cNe(s)+1),function(){return[]});return hr(s.nodes(),function(f){var p=s.node(f),w=p.rank;of(w)||(o[w][p.order]=f)}),o}function yOt(s){var o=qN($f(s.nodes(),function(f){return s.node(f).rank}));hr(s.nodes(),function(f){var p=s.node(f);eo(p,"rank")&&(p.rank-=o)})}function kOt(s){var o=qN($f(s.nodes(),function(k){return s.node(k).rank})),f=[];hr(s.nodes(),function(k){var b=s.node(k).rank-o;f[b]||(f[b]=[]),f[b].push(k)});var p=0,w=s.graph().nodeRankFactor;hr(f,function(k,b){of(k)&&b%w!==0?--p:p&&hr(k,function(_){s.node(_).rank+=p})})}function oNe(s,o,f,p){var w={width:0,height:0};return arguments.length>=4&&(w.rank=f,w.order=p),RA(s,"border",w,o)}function cNe(s){return t9($f(s.nodes(),function(o){var f=s.node(o).rank;if(!of(f))return f}))}function xOt(s,o){var f={lhs:[],rhs:[]};return hr(s,function(p){o(p)?f.lhs.push(p):f.rhs.push(p)}),f}function EOt(s,o){var f=WOe();try{return o()}finally{console.log(s+" time: "+(WOe()-f)+"ms")}}function TOt(s,o){return o()}function _Ot(s){function o(f){var p=s.children(f),w=s.node(f);if(p.length&&hr(p,o),eo(w,"minRank")){w.borderLeft=[],w.borderRight=[];for(var k=w.minRank,b=w.maxRank+1;kb.lim&&(_=b,A=!0);var N=v5(o.edges(),function(B){return A===yNe(s,s.node(B.v),_)&&A!==yNe(s,s.node(B.w),_)});return Sde(N,function(B){return YN(o,B)})}function mNe(s,o,f,p){var w=f.v,k=f.w;s.removeEdge(w,k),s.setEdge(p.v,p.w,{}),Pde(s),Nde(s,o),$Ot(s,o)}function $Ot(s,o){var f=Tde(s.nodes(),function(w){return!o.node(w).parent}),p=ROt(s,f);p=p.slice(1),hr(p,function(w){var k=s.node(w).parent,b=o.edge(w,k),_=!1;b||(b=o.edge(k,w),_=!0),o.node(w).rank=o.node(k).rank+(_?b.minlen:-b.minlen)})}function HOt(s,o,f){return s.hasEdge(o,f)}function yNe(s,o,f){return f.low<=o.lim&&o.lim<=f.lim}function zOt(s){switch(s.graph().ranker){case"network-simplex":kNe(s);break;case"tight-tree":qOt(s);break;case"longest-path":GOt(s);break;default:kNe(s)}}var GOt=Ode;function qOt(s){Ode(s),fNe(s)}function kNe(s){i9(s)}function VOt(s){var o=RA(s,"root",{},"_root"),f=UOt(s),p=t9(w5(f))-1,w=2*p+1;s.graph().nestingRoot=o,hr(s.edges(),function(b){s.edge(b).minlen*=w});var k=KOt(s)+1;hr(s.children(),function(b){xNe(s,o,w,k,p,f,b)}),s.graph().nodeRankFactor=w}function xNe(s,o,f,p,w,k,b){var _=s.children(b);if(!_.length){b!==o&&s.setEdge(o,b,{weight:0,minlen:f});return}var A=oNe(s,"_bt"),N=oNe(s,"_bb"),B=s.node(b);s.setParent(A,b),B.borderTop=A,s.setParent(N,b),B.borderBottom=N,hr(_,function(F){xNe(s,o,f,p,w,k,F);var H=s.node(F),j=H.borderTop?H.borderTop:F,V=H.borderBottom?H.borderBottom:F,Z=H.borderTop?p:2*p,ae=j!==V?1:w-k[b]+1;s.setEdge(A,j,{weight:Z,minlen:ae,nestingEdge:!0}),s.setEdge(V,N,{weight:Z,minlen:ae,nestingEdge:!0})}),s.parent(b)||s.setEdge(o,A,{weight:0,minlen:w+k[b]})}function UOt(s){var o={};function f(p,w){var k=s.children(p);k&&k.length&&hr(k,function(b){f(b,w+1)}),o[p]=w}return hr(s.children(),function(p){f(p,1)}),o}function KOt(s){return UN(s.edges(),function(o,f){return o+s.edge(f).weight},0)}function WOt(s){var o=s.graph();s.removeNode(o.nestingRoot),delete o.nestingRoot,hr(s.edges(),function(f){var p=s.edge(f);p.nestingEdge&&s.removeEdge(f)})}function YOt(s,o,f){var p={},w;hr(f,function(k){for(var b=s.parent(k),_,A;b;){if(_=s.parent(b),_?(A=p[_],p[_]=b):(A=w,w=b),A&&A!==b){o.setEdge(A,b);return}b=_}})}function XOt(s,o,f){var p=QOt(s),w=new Hf({compound:!0}).setGraph({root:p}).setDefaultNodeLabel(function(k){return s.node(k)});return hr(s.nodes(),function(k){var b=s.node(k),_=s.parent(k);(b.rank===o||b.minRank<=o&&o<=b.maxRank)&&(w.setNode(k),w.setParent(k,_||p),hr(s[f](k),function(A){var N=A.v===k?A.w:A.v,B=w.edge(N,k),F=of(B)?0:B.weight;w.setEdge(N,k,{weight:s.edge(A).weight+F})}),eo(b,"minRank")&&w.setNode(k,{borderLeft:b.borderLeft[o],borderRight:b.borderRight[o]}))}),w}function QOt(s){for(var o;s.hasNode(o=RK("_root")););return o}function ZOt(s,o){for(var f=0,p=1;p0;)B%2&&(F+=_[B+1]),B=B-1>>1,_[B]+=N.weight;A+=N.weight*F})),A}function eNt(s){var o={},f=v5(s.nodes(),function(_){return!s.children(_).length}),p=t9($f(f,function(_){return s.node(_).rank})),w=$f(n9(p+1),function(){return[]});function k(_){if(!eo(o,_)){o[_]=!0;var A=s.node(_);w[A.rank].push(_),hr(s.successors(_),k)}}var b=KN(f,function(_){return s.node(_).rank});return hr(b,k),w}function tNt(s,o){return $f(o,function(f){var p=s.inEdges(f);if(p.length){var w=UN(p,function(k,b){var _=s.edge(b),A=s.node(b.v);return{sum:k.sum+_.weight*A.order,weight:k.weight+_.weight}},{sum:0,weight:0});return{v:f,barycenter:w.sum/w.weight,weight:w.weight}}else return{v:f}})}function nNt(s,o){var f={};hr(s,function(w,k){var b=f[w.v]={indegree:0,in:[],out:[],vs:[w.v],i:k};of(w.barycenter)||(b.barycenter=w.barycenter,b.weight=w.weight)}),hr(o.edges(),function(w){var k=f[w.v],b=f[w.w];!of(k)&&!of(b)&&(b.indegree++,k.out.push(f[w.w]))});var p=v5(f,function(w){return!w.indegree});return rNt(p)}function rNt(s){var o=[];function f(k){return function(b){b.merged||(of(b.barycenter)||of(k.barycenter)||b.barycenter>=k.barycenter)&&iNt(k,b)}}function p(k){return function(b){b.in.push(k),--b.indegree===0&&s.push(b)}}for(;s.length;){var w=s.pop();o.push(w),hr(w.in.reverse(),f(w)),hr(w.out,p(w))}return $f(v5(o,function(k){return!k.merged}),function(k){return VN(k,["vs","i","barycenter","weight"])})}function iNt(s,o){var f=0,p=0;s.weight&&(f+=s.barycenter*s.weight,p+=s.weight),o.weight&&(f+=o.barycenter*o.weight,p+=o.weight),s.vs=o.vs.concat(s.vs),s.barycenter=f/p,s.weight=p,s.i=Math.min(o.i,s.i),o.merged=!0}function sNt(s,o){var f=xOt(s,function(B){return eo(B,"barycenter")}),p=f.lhs,w=KN(f.rhs,function(B){return-B.i}),k=[],b=0,_=0,A=0;p.sort(aNt(!!o)),A=ENe(k,w,A),hr(p,function(B){A+=B.vs.length,k.push(B.vs),b+=B.barycenter*B.weight,_+=B.weight,A=ENe(k,w,A)});var N={vs:OA(k)};return _&&(N.barycenter=b/_,N.weight=_),N}function ENe(s,o,f){for(var p;o.length&&(p=BK(o)).i<=f;)o.pop(),s.push(p.vs),f++;return f}function aNt(s){return function(o,f){return o.barycenterf.barycenter?1:s?f.i-o.i:o.i-f.i}}function TNe(s,o,f,p){var w=s.children(o),k=s.node(o),b=k?k.borderLeft:void 0,_=k?k.borderRight:void 0,A={};b&&(w=v5(w,function(V){return V!==b&&V!==_}));var N=tNt(s,w);hr(N,function(V){if(s.children(V.v).length){var Z=TNe(s,V.v,f,p);A[V.v]=Z,eo(Z,"barycenter")&&cNt(V,Z)}});var B=nNt(N,f);oNt(B,A);var F=sNt(B,p);if(b&&(F.vs=OA([b,F.vs,_]),s.predecessors(b).length)){var H=s.node(s.predecessors(b)[0]),j=s.node(s.predecessors(_)[0]);eo(F,"barycenter")||(F.barycenter=0,F.weight=0),F.barycenter=(F.barycenter*F.weight+H.order+j.order)/(F.weight+2),F.weight+=2}return F}function oNt(s,o){hr(s,function(f){f.vs=OA(f.vs.map(function(p){return o[p]?o[p].vs:p}))})}function cNt(s,o){of(s.barycenter)?(s.barycenter=o.barycenter,s.weight=o.weight):(s.barycenter=(s.barycenter*s.weight+o.barycenter*o.weight)/(s.weight+o.weight),s.weight+=o.weight)}function uNt(s){var o=cNe(s),f=_Ne(s,n9(1,o+1),"inEdges"),p=_Ne(s,n9(o-1,-1,-1),"outEdges"),w=eNt(s);CNe(s,w);for(var k=Number.POSITIVE_INFINITY,b,_=0,A=0;A<4;++_,++A){lNt(_%2?f:p,_%4>=2),w=jK(s);var N=ZOt(s,w);Nb||_>o[A].lim));for(N=A,A=p;(A=s.parent(A))!==N;)k.push(A);return{path:w.concat(k.reverse()),lca:N}}function dNt(s){var o={},f=0;function p(w){var k=f;hr(s.children(w),p),o[w]={low:k,lim:f++}}return hr(s.children(),p),o}function gNt(s,o){var f={};function p(w,k){var b=0,_=0,A=w.length,N=BK(k);return hr(k,function(B,F){var H=bNt(s,B),j=H?s.node(H).order:A;(H||B===N)&&(hr(k.slice(_,F+1),function(V){hr(s.predecessors(V),function(Z){var ae=s.node(Z),le=ae.order;(leN)&&SNe(f,H,B)})})}function w(k,b){var _=-1,A,N=0;return hr(b,function(B,F){if(s.node(B).dummy==="border"){var H=s.predecessors(B);H.length&&(A=s.node(H[0]).order,p(b,N,F,_,A),N=F,_=A)}p(b,N,b.length,A,k.length)}),b}return UN(o,w),f}function bNt(s,o){if(s.node(o).dummy)return Tde(s.predecessors(o),function(f){return s.node(f).dummy})}function SNe(s,o,f){if(o>f){var p=o;o=f,f=p}var w=s[o];w||(s[o]=w={}),w[f]=!0}function vNt(s,o,f){if(o>f){var p=o;o=f,f=p}return eo(s[o],f)}function wNt(s,o,f,p){var w={},k={},b={};return hr(o,function(_){hr(_,function(A,N){w[A]=A,k[A]=A,b[A]=N})}),hr(o,function(_){var A=-1;hr(_,function(N){var B=p(N);if(B.length){B=KN(B,function(Z){return b[Z]});for(var F=(B.length-1)/2,H=Math.floor(F),j=Math.ceil(F);H<=j;++H){var V=B[H];k[N]===N&&A!Number.isNaN(ce.y));const b=o.points,_=RE().x(function(ce){return ce.x}).y(function(ce){return ce.y}).curve(pA),A=s.append("path").attr("d",_(b)).attr("id","edge"+ANe).attr("class","relation");let N="";p.arrowMarkerAbsolute&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\("),N=N.replace(/\)/g,"\\)")),f.relation.lineType==1&&A.attr("class","relation dashed-line"),f.relation.lineType==10&&A.attr("class","relation dotted-line"),f.relation.type1!=="none"&&A.attr("marker-start","url("+N+"#"+k(f.relation.type1)+"Start)"),f.relation.type2!=="none"&&A.attr("marker-end","url("+N+"#"+k(f.relation.type2)+"End)");let B,F;const H=o.points.length;let j=Pa.calcLabelPosition(o.points);B=j.x,F=j.y;let V,Z,ae,le;if(H%2!==0&&H>1){let ce=Pa.calcCardinalityPosition(f.relation.type1!=="none",o.points,o.points[0]),be=Pa.calcCardinalityPosition(f.relation.type2!=="none",o.points,o.points[H-1]);je.debug("cardinality_1_point "+JSON.stringify(ce)),je.debug("cardinality_2_point "+JSON.stringify(be)),V=ce.x,Z=ce.y,ae=be.x,le=be.y}if(f.title!==void 0){const ce=s.append("g").attr("class","classLabel"),be=ce.append("text").attr("class","label").attr("x",B).attr("y",F).attr("fill","red").attr("text-anchor","middle").text(f.title);window.label=be;const xe=be.node().getBBox();ce.insert("rect",":first-child").attr("class","box").attr("x",xe.x-p.padding/2).attr("y",xe.y-p.padding/2).attr("width",xe.width+p.padding).attr("height",xe.height+p.padding)}je.info("Rendering relation "+JSON.stringify(f)),f.relationTitle1!==void 0&&f.relationTitle1!=="none"&&s.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",V).attr("y",Z).attr("fill","black").attr("font-size","6").text(f.relationTitle1),f.relationTitle2!==void 0&&f.relationTitle2!=="none"&&s.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",ae).attr("y",le).attr("fill","black").attr("font-size","6").text(f.relationTitle2),ANe++},JNt=function(s,o,f,p){je.debug("Rendering class ",o,f);const w=o.id,k={id:w,label:o.id,width:0,height:0},b=s.append("g").attr("id",p.db.lookUpDomId(w)).attr("class","classGroup");let _;o.link?_=b.append("svg:a").attr("xlink:href",o.link).attr("target",o.linkTarget).append("text").attr("y",f.textHeight+f.padding).attr("x",0):_=b.append("text").attr("y",f.textHeight+f.padding).attr("x",0);let A=!0;o.annotations.forEach(function(Ee){const Me=_.append("tspan").text("«"+Ee+"»");A||Me.attr("dy",f.textHeight),A=!1});let N=o.id;o.type!==void 0&&o.type!==""&&(N+="<"+o.type+">");const B=_.append("tspan").text(N).attr("class","title");A||B.attr("dy",f.textHeight);const F=_.node().getBBox().height,H=b.append("line").attr("x1",0).attr("y1",f.padding+F+f.dividerMargin/2).attr("y2",f.padding+F+f.dividerMargin/2),j=b.append("text").attr("x",f.padding).attr("y",F+f.dividerMargin+f.textHeight).attr("fill","white").attr("class","classText");A=!0,o.members.forEach(function(Ee){LNe(j,Ee,A,f),A=!1});const V=j.node().getBBox(),Z=b.append("line").attr("x1",0).attr("y1",f.padding+F+f.dividerMargin+V.height).attr("y2",f.padding+F+f.dividerMargin+V.height),ae=b.append("text").attr("x",f.padding).attr("y",F+2*f.dividerMargin+V.height+f.textHeight).attr("fill","white").attr("class","classText");A=!0,o.methods.forEach(function(Ee){LNe(ae,Ee,A,f),A=!1});const le=b.node().getBBox();var ce=" ";o.cssClasses.length>0&&(ce=ce+o.cssClasses.join(" "));const xe=b.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",le.width+2*f.padding).attr("height",le.height+f.padding+.5*f.dividerMargin).attr("class",ce).node().getBBox().width;return _.node().childNodes.forEach(function(Ee){Ee.setAttribute("x",(xe-Ee.getBBox().width)/2)}),o.tooltip&&_.insert("title").text(o.tooltip),H.attr("x2",xe),Z.attr("x2",xe),k.width=xe,k.height=le.height+f.padding+.5*f.dividerMargin,k},ePt=function(s,o,f,p){je.debug("Rendering note ",o,f);const w=o.id,k={id:w,text:o.text,width:0,height:0},b=s.append("g").attr("id",w).attr("class","classGroup");let _=b.append("text").attr("y",f.textHeight+f.padding).attr("x",0);const A=JSON.parse(`"${o.text}"`).split(`
+`);A.forEach(function(H){je.debug(`Adding line: ${H}`),_.append("tspan").text(H).attr("class","title").attr("dy",f.textHeight)});const N=b.node().getBBox(),F=b.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",N.width+2*f.padding).attr("height",N.height+A.length*f.textHeight+f.padding+.5*f.dividerMargin).node().getBBox().width;return _.node().childNodes.forEach(function(H){H.setAttribute("x",(F-H.getBBox().width)/2)}),k.width=F,k.height=N.height+A.length*f.textHeight+f.padding+.5*f.dividerMargin,k},$K=function(s){const o=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,f=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let p=s.match(o),w=s.match(f);return p&&!w?tPt(p):w?nPt(w):rPt(s)},tPt=function(s){let o="",f="";try{let p=s[1]?s[1].trim():"",w=s[2]?s[2].trim():"",k=s[3]?Uk(s[3].trim()):"",b=s[4]?s[4].trim():"",_=s[5]?s[5].trim():"";f=p+w+k+" "+b,o=Rde(_)}catch{f=s}return{displayText:f,cssStyle:o}},nPt=function(s){let o="",f="";try{let p=s[1]?s[1].trim():"",w=s[2]?s[2].trim():"",k=s[3]?Uk(s[3].trim()):"",b=s[4]?s[4].trim():"",_=s[5]?" : "+Uk(s[5]).trim():"";f=p+w+"("+k+")"+_,o=Rde(b)}catch{f=s}return{displayText:f,cssStyle:o}},rPt=function(s){let o="",f="",p="",w=s.indexOf("("),k=s.indexOf(")");if(w>1&&k>w&&k<=s.length){let b="",_="",A=s.substring(0,1);A.match(/\w/)?_=s.substring(0,w).trim():(A.match(/[#+~-]/)&&(b=A),_=s.substring(1,w).trim());const N=s.substring(w+1,k);s.substring(k+1,1),f=Rde(s.substring(k+1,k+2)),o=b+_+"("+Uk(N.trim())+")",kf[1].label===s);if(o)return o[0]},iPt=function(s){s.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),s.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),s.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),s.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),s.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),s.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),s.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),s.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 18,7 L9,13 L14,7 L9,1 Z")},sPt={draw:function(s,o,f,p){const w=Pt().class;HK={},je.info("Rendering diagram "+s);const k=Pt().securityLevel;let b;k==="sandbox"&&(b=sr("#i"+o));const _=sr(k==="sandbox"?b.nodes()[0].contentDocument.body:"body"),A=_.select(`[id='${o}']`);iPt(A);const N=new Hf({multigraph:!0});N.setGraph({isMultiGraph:!0}),N.setDefaultEdgeLabel(function(){return{}});const B=p.db.getClasses(),F=Object.keys(B);for(const ce of F){const be=B[ce],xe=jde.drawClass(A,be,w,p);HK[xe.id]=xe,N.setNode(xe.id,xe),je.info("Org height: "+xe.height)}p.db.getRelations().forEach(function(ce){je.info("tjoho"+XN(ce.id1)+XN(ce.id2)+JSON.stringify(ce)),N.setEdge(XN(ce.id1),XN(ce.id2),{relation:ce},ce.title||"DEFAULT")}),p.db.getNotes().forEach(function(ce){je.debug(`Adding note: ${JSON.stringify(ce)}`);const be=jde.drawNote(A,ce,w,p);HK[be.id]=be,N.setNode(be.id,be),ce.class&&ce.class in B&&N.setEdge(ce.id,XN(ce.class),{relation:{id1:ce.id,id2:ce.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),jA(N),N.nodes().forEach(function(ce){ce!==void 0&&N.node(ce)!==void 0&&(je.debug("Node "+ce+": "+JSON.stringify(N.node(ce))),_.select("#"+(p.db.lookUpDomId(ce)||ce)).attr("transform","translate("+(N.node(ce).x-N.node(ce).width/2)+","+(N.node(ce).y-N.node(ce).height/2)+" )"))}),N.edges().forEach(function(ce){ce!==void 0&&N.edge(ce)!==void 0&&(je.debug("Edge "+ce.v+" -> "+ce.w+": "+JSON.stringify(N.edge(ce))),jde.drawEdge(A,N.edge(ce),N.edge(ce).relation,w,p))});const V=A.node().getBBox(),Z=V.width+zK*2,ae=V.height+zK*2;Uw(A,ae,Z,w.useMaxWidth);const le=`${V.x-zK} ${V.y-zK} ${Z} ${ae}`;je.debug(`viewBox ${le}`),A.attr("viewBox",le)}};function m5(s){var o={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:aPt(s),edges:oPt(s)};return of(s.graph())||(o.value=kDt(s.graph())),o}function aPt(s){return $f(s.nodes(),function(o){var f=s.node(o),p=s.parent(o),w={v:o};return of(f)||(w.value=f),of(p)||(w.parent=p),w})}function oPt(s){return $f(s.edges(),function(o){var f=s.edge(o),p={v:o.v,w:o.w};return of(o.name)||(p.name=o.name),of(f)||(p.value=f),p})}const cPt=(s,o,f,p)=>{o.forEach(w=>{uPt[w](s,f,p)})},uPt={extension:(s,o,f)=>{je.trace("Making markers for ",f),s.append("defs").append("marker").attr("id",o+"-extensionStart").attr("class","marker extension "+o).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),s.append("defs").append("marker").attr("id",o+"-extensionEnd").attr("class","marker extension "+o).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(s,o)=>{s.append("defs").append("marker").attr("id",o+"-compositionStart").attr("class","marker composition "+o).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),s.append("defs").append("marker").attr("id",o+"-compositionEnd").attr("class","marker composition "+o).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(s,o)=>{s.append("defs").append("marker").attr("id",o+"-aggregationStart").attr("class","marker aggregation "+o).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),s.append("defs").append("marker").attr("id",o+"-aggregationEnd").attr("class","marker aggregation "+o).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(s,o)=>{s.append("defs").append("marker").attr("id",o+"-dependencyStart").attr("class","marker dependency "+o).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),s.append("defs").append("marker").attr("id",o+"-dependencyEnd").attr("class","marker dependency "+o).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(s,o)=>{s.append("defs").append("marker").attr("id",o+"-lollipopStart").attr("class","marker lollipop "+o).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(s,o)=>{s.append("marker").attr("id",o+"-pointEnd").attr("class","marker "+o).attr("viewBox","0 0 12 20").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),s.append("marker").attr("id",o+"-pointStart").attr("class","marker "+o).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(s,o)=>{s.append("marker").attr("id",o+"-circleEnd").attr("class","marker "+o).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),s.append("marker").attr("id",o+"-circleStart").attr("class","marker "+o).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(s,o)=>{s.append("marker").attr("id",o+"-crossEnd").attr("class","marker cross "+o).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),s.append("marker").attr("id",o+"-crossStart").attr("class","marker cross "+o).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(s,o)=>{s.append("defs").append("marker").attr("id",o+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},MNe=cPt;function lPt(s,o){o&&s.attr("style",o)}function hPt(s){const o=sr(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),f=o.append("xhtml:div"),p=s.label,w=s.isNode?"nodeLabel":"edgeLabel";return f.html('"+p+""),lPt(f,s.labelStyle),f.style("display","inline-block"),f.style("white-space","nowrap"),f.attr("xmlns","http://www.w3.org/1999/xhtml"),o.node()}const ip=(s,o,f,p)=>{let w=s||"";if(typeof w=="object"&&(w=w[0]),l1(Pt().flowchart.htmlLabels)){w=w.replace(/\\n|\n/g,"
"),je.info("vertexText"+w);const k={isNode:p,label:nge(w).replace(/fa[blrs]?:fa-[\w-]+/g,_=>``),labelStyle:o.replace("fill:","color:")};return hPt(k)}else{const k=document.createElementNS("http://www.w3.org/2000/svg","text");k.setAttribute("style",o.replace("color:","fill:"));let b=[];typeof w=="string"?b=w.split(/\\n|\n|
/gi):Array.isArray(w)?b=w:b=[];for(const _ of b){const A=document.createElementNS("http://www.w3.org/2000/svg","tspan");A.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),A.setAttribute("dy","1em"),A.setAttribute("x","0"),f?A.setAttribute("class","title-row"):A.setAttribute("class","row"),A.textContent=_.trim(),k.appendChild(A)}return k}},y0=(s,o,f,p)=>{let w;f?w=f:w="node default";const k=s.insert("g").attr("class",w).attr("id",o.domId||o.id),b=k.insert("g").attr("class","label").attr("style",o.labelStyle);let _;o.labelText===void 0?_="":_=typeof o.labelText=="string"?o.labelText:o.labelText[0];const A=b.node().appendChild(ip(T2(nge(_),Pt()),o.labelStyle,!1,p));let N=A.getBBox();if(l1(Pt().flowchart.htmlLabels)){const F=A.children[0],H=sr(A);N=F.getBoundingClientRect(),H.attr("width",N.width),H.attr("height",N.height)}const B=o.padding/2;return b.attr("transform","translate("+-N.width/2+", "+-N.height/2+")"),{shapeSvg:k,bbox:N,halfPadding:B,label:b}},cf=(s,o)=>{const f=o.node().getBBox();s.width=f.width,s.height=f.height};function y5(s,o,f,p){return s.insert("polygon",":first-child").attr("points",p.map(function(w){return w.x+","+w.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-o/2+","+f/2+")")}let Zo={},Jw={},DNe={};const fPt=()=>{Jw={},DNe={},Zo={}},GK=(s,o)=>(je.trace("In isDecendant",o," ",s," = ",Jw[o].includes(s)),!!Jw[o].includes(s)),dPt=(s,o)=>(je.info("Decendants of ",o," is ",Jw[o]),je.info("Edge is ",s),s.v===o||s.w===o?!1:Jw[o]?Jw[o].includes(s.v)||GK(s.v,o)||GK(s.w,o)||Jw[o].includes(s.w):(je.debug("Tilt, ",o,",not in decendants"),!1)),INe=(s,o,f,p)=>{je.warn("Copying children of ",s,"root",p,"data",o.node(s),p);const w=o.children(s)||[];s!==p&&w.push(s),je.warn("Copying (nodes) clusterId",s,"nodes",w),w.forEach(k=>{if(o.children(k).length>0)INe(k,o,f,p);else{const b=o.node(k);je.info("cp ",k," to ",p," with parent ",s),f.setNode(k,b),p!==o.parent(k)&&(je.warn("Setting parent",k,o.parent(k)),f.setParent(k,o.parent(k))),s!==p&&k!==s?(je.debug("Setting parent",k,s),f.setParent(k,s)):(je.info("In copy ",s,"root",p,"data",o.node(s),p),je.debug("Not Setting parent for node=",k,"cluster!==rootId",s!==p,"node!==clusterId",k!==s));const _=o.edges(k);je.debug("Copying Edges",_),_.forEach(A=>{je.info("Edge",A);const N=o.edge(A.v,A.w,A.name);je.info("Edge data",N,p);try{dPt(A,p)?(je.info("Copying as ",A.v,A.w,N,A.name),f.setEdge(A.v,A.w,N,A.name),je.info("newGraph edges ",f.edges(),f.edge(f.edges()[0]))):je.info("Skipping copy of edge ",A.v,"-->",A.w," rootId: ",p," clusterId:",s)}catch(B){je.error(B)}})}je.debug("Removing node",k),o.removeNode(k)})},ONe=(s,o)=>{const f=o.children(s);let p=[...f];for(const w of f)DNe[w]=s,p=[...p,...ONe(w,o)];return p},QN=(s,o)=>{je.trace("Searching",s);const f=o.children(s);if(je.trace("Searching children of id ",s,f),f.length<1)return je.trace("This is a valid node",s),s;for(const p of f){const w=QN(p,o);if(w)return je.trace("Found replacement for",s," => ",w),w}},qK=s=>!Zo[s]||!Zo[s].externalConnections?s:Zo[s]?Zo[s].id:s,gPt=(s,o)=>{if(!s||o>10){je.debug("Opting out, no graph ");return}else je.debug("Opting in, graph ");s.nodes().forEach(function(f){s.children(f).length>0&&(je.warn("Cluster identified",f," Replacement id in edges: ",QN(f,s)),Jw[f]=ONe(f,s),Zo[f]={id:QN(f,s),clusterData:s.node(f)})}),s.nodes().forEach(function(f){const p=s.children(f),w=s.edges();p.length>0?(je.debug("Cluster identified",f,Jw),w.forEach(k=>{if(k.v!==f&&k.w!==f){const b=GK(k.v,f),_=GK(k.w,f);b^_&&(je.warn("Edge: ",k," leaves cluster ",f),je.warn("Decendants of XXX ",f,": ",Jw[f]),Zo[f].externalConnections=!0)}})):je.debug("Not a cluster ",f,Jw)}),s.edges().forEach(function(f){const p=s.edge(f);je.warn("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),je.warn("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(s.edge(f)));let w=f.v,k=f.w;if(je.warn("Fix XXX",Zo,"ids:",f.v,f.w,"Translating: ",Zo[f.v]," --- ",Zo[f.w]),Zo[f.v]&&Zo[f.w]&&Zo[f.v]===Zo[f.w]){je.warn("Fixing and trixing link to self - removing XXX",f.v,f.w,f.name),je.warn("Fixing and trixing - removing XXX",f.v,f.w,f.name),w=qK(f.v),k=qK(f.w),s.removeEdge(f.v,f.w,f.name);const b=f.w+"---"+f.v;s.setNode(b,{domId:b,id:b,labelStyle:"",labelText:p.label,padding:0,shape:"labelRect",style:""});const _=JSON.parse(JSON.stringify(p)),A=JSON.parse(JSON.stringify(p));_.label="",_.arrowTypeEnd="none",A.label="",_.fromCluster=f.v,A.toCluster=f.v,s.setEdge(w,b,_,f.name+"-cyclic-special"),s.setEdge(b,k,A,f.name+"-cyclic-special")}else(Zo[f.v]||Zo[f.w])&&(je.warn("Fixing and trixing - removing XXX",f.v,f.w,f.name),w=qK(f.v),k=qK(f.w),s.removeEdge(f.v,f.w,f.name),w!==f.v&&(p.fromCluster=f.v),k!==f.w&&(p.toCluster=f.w),je.warn("Fix Replacing with XXX",w,k,f.name),s.setEdge(w,k,p,f.name))}),je.warn("Adjusted Graph",m5(s)),NNe(s,0),je.trace(Zo)},NNe=(s,o)=>{if(je.warn("extractor - ",o,m5(s),s.children("D")),o>10){je.error("Bailing out");return}let f=s.nodes(),p=!1;for(const w of f){const k=s.children(w);p=p||k.length>0}if(!p){je.debug("Done, no node has children",s.nodes());return}je.debug("Nodes = ",f,o);for(const w of f)if(je.debug("Extracting node",w,Zo,Zo[w]&&!Zo[w].externalConnections,!s.parent(w),s.node(w),s.children("D")," Depth ",o),!Zo[w])je.debug("Not a cluster",w,o);else if(!Zo[w].externalConnections&&s.children(w)&&s.children(w).length>0){je.warn("Cluster without external connections, without a parent and with children",w,o);let b=s.graph().rankdir==="TB"?"LR":"TB";Zo[w]&&Zo[w].clusterData&&Zo[w].clusterData.dir&&(b=Zo[w].clusterData.dir,je.warn("Fixing dir",Zo[w].clusterData.dir,b));const _=new Hf({multigraph:!0,compound:!0}).setGraph({rankdir:b,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});je.warn("Old graph before copy",m5(s)),INe(w,s,_,w),s.setNode(w,{clusterNode:!0,id:w,clusterData:Zo[w].clusterData,labelText:Zo[w].labelText,graph:_}),je.warn("New graph after copy node: (",w,")",m5(_)),je.debug("Old graph after copy",m5(s))}else je.warn("Cluster ** ",w," **not meeting the criteria !externalConnections:",!Zo[w].externalConnections," no parent: ",!s.parent(w)," children ",s.children(w)&&s.children(w).length>0,s.children("D"),o),je.debug(Zo);f=s.nodes(),je.warn("New list of nodes",f);for(const w of f){const k=s.node(w);je.warn(" Now next level",w,k),k.clusterNode&&NNe(k.graph,o+1)}},PNe=(s,o)=>{if(o.length===0)return[];let f=Object.assign(o);return o.forEach(p=>{const w=s.children(p),k=PNe(s,w);f=[...f,...k]}),f},pPt=s=>PNe(s,s.children());function bPt(s,o){return s.intersect(o)}function BNe(s,o,f,p){var w=s.x,k=s.y,b=w-p.x,_=k-p.y,A=Math.sqrt(o*o*_*_+f*f*b*b),N=Math.abs(o*f*b/A);p.x0}function mPt(s,o,f){var p=s.x,w=s.y,k=[],b=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY;typeof o.forEach=="function"?o.forEach(function(V){b=Math.min(b,V.x),_=Math.min(_,V.y)}):(b=Math.min(b,o.x),_=Math.min(_,o.y));for(var A=p-s.width/2-b,N=w-s.height/2-_,B=0;B1&&k.sort(function(V,Z){var ae=V.x-f.x,le=V.y-f.y,ce=Math.sqrt(ae*ae+le*le),be=Z.x-f.x,xe=Z.y-f.y,Ee=Math.sqrt(be*be+xe*xe);return ce{var f=s.x,p=s.y,w=o.x-f,k=o.y-p,b=s.width/2,_=s.height/2,A,N;return Math.abs(k)*b>Math.abs(w)*_?(k<0&&(_=-_),A=k===0?0:_*w/k,N=_):(w<0&&(b=-b),A=b,N=w===0?0:b*k/w),{x:f+A,y:p+N}},Ah={node:bPt,circle:vPt,ellipse:BNe,polygon:mPt,rect:ZN},yPt=(s,o)=>{const{shapeSvg:f,bbox:p,halfPadding:w}=y0(s,o,"node "+o.classes,!0);je.info("Classes = ",o.classes);const k=f.insert("rect",":first-child");return k.attr("rx",o.rx).attr("ry",o.ry).attr("x",-p.width/2-w).attr("y",-p.height/2-w).attr("width",p.width+o.padding).attr("height",p.height+o.padding),cf(o,k),o.intersect=function(b){return Ah.rect(o,b)},f},RNe=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=p.height+o.padding,b=w+k,_=[{x:b/2,y:0},{x:b,y:-b/2},{x:b/2,y:-b},{x:0,y:-b/2}];je.info("Question main (Circle)");const A=y5(f,b,b,_);return A.attr("style",o.style),cf(o,A),o.intersect=function(N){return je.warn("Intersect called"),Ah.polygon(o,_,N)},f},kPt=(s,o)=>{const f=s.insert("g").attr("class","node default").attr("id",o.domId||o.id),p=28,w=[{x:0,y:p/2},{x:p/2,y:0},{x:0,y:-p/2},{x:-p/2,y:0}];return f.insert("polygon",":first-child").attr("points",w.map(function(b){return b.x+","+b.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),o.width=28,o.height=28,o.intersect=function(b){return Ah.circle(o,14,b)},f},xPt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=4,k=p.height+o.padding,b=k/w,_=p.width+2*b+o.padding,A=[{x:b,y:0},{x:_-b,y:0},{x:_,y:-k/2},{x:_-b,y:-k},{x:b,y:-k},{x:0,y:-k/2}],N=y5(f,_,k,A);return N.attr("style",o.style),cf(o,N),o.intersect=function(B){return Ah.polygon(o,A,B)},f},EPt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=p.height+o.padding,b=[{x:-k/2,y:0},{x:w,y:0},{x:w,y:-k},{x:-k/2,y:-k},{x:0,y:-k/2}];return y5(f,w,k,b).attr("style",o.style),o.width=w+k,o.height=k,o.intersect=function(A){return Ah.polygon(o,b,A)},f},TPt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=p.height+o.padding,b=[{x:-2*k/6,y:0},{x:w-k/6,y:0},{x:w+2*k/6,y:-k},{x:k/6,y:-k}],_=y5(f,w,k,b);return _.attr("style",o.style),cf(o,_),o.intersect=function(A){return Ah.polygon(o,b,A)},f},_Pt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=p.height+o.padding,b=[{x:2*k/6,y:0},{x:w+k/6,y:0},{x:w-2*k/6,y:-k},{x:-k/6,y:-k}],_=y5(f,w,k,b);return _.attr("style",o.style),cf(o,_),o.intersect=function(A){return Ah.polygon(o,b,A)},f},CPt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=p.height+o.padding,b=[{x:-2*k/6,y:0},{x:w+2*k/6,y:0},{x:w-k/6,y:-k},{x:k/6,y:-k}],_=y5(f,w,k,b);return _.attr("style",o.style),cf(o,_),o.intersect=function(A){return Ah.polygon(o,b,A)},f},SPt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=p.height+o.padding,b=[{x:k/6,y:0},{x:w-k/6,y:0},{x:w+2*k/6,y:-k},{x:-2*k/6,y:-k}],_=y5(f,w,k,b);return _.attr("style",o.style),cf(o,_),o.intersect=function(A){return Ah.polygon(o,b,A)},f},APt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=p.height+o.padding,b=[{x:0,y:0},{x:w+k/2,y:0},{x:w,y:-k/2},{x:w+k/2,y:-k},{x:0,y:-k}],_=y5(f,w,k,b);return _.attr("style",o.style),cf(o,_),o.intersect=function(A){return Ah.polygon(o,b,A)},f},LPt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=w/2,b=k/(2.5+w/50),_=p.height+b+o.padding,A="M 0,"+b+" a "+k+","+b+" 0,0,0 "+w+" 0 a "+k+","+b+" 0,0,0 "+-w+" 0 l 0,"+_+" a "+k+","+b+" 0,0,0 "+w+" 0 l 0,"+-_,N=f.attr("label-offset-y",b).insert("path",":first-child").attr("style",o.style).attr("d",A).attr("transform","translate("+-w/2+","+-(_/2+b)+")");return cf(o,N),o.intersect=function(B){const F=Ah.rect(o,B),H=F.x-o.x;if(k!=0&&(Math.abs(H)o.height/2-b)){let j=b*b*(1-H*H/(k*k));j!=0&&(j=Math.sqrt(j)),j=b-j,B.y-o.y>0&&(j=-j),F.y+=j}return F},f},MPt=(s,o)=>{const{shapeSvg:f,bbox:p,halfPadding:w}=y0(s,o,"node "+o.classes,!0);je.trace("Classes = ",o.classes);const k=f.insert("rect",":first-child"),b=p.width+o.padding,_=p.height+o.padding;if(k.attr("class","basic label-container").attr("style",o.style).attr("rx",o.rx).attr("ry",o.ry).attr("x",-p.width/2-w).attr("y",-p.height/2-w).attr("width",b).attr("height",_),o.props){const A=new Set(Object.keys(o.props));o.props.borders&&(jNe(k,o.props.borders,b,_),A.delete("borders")),A.forEach(N=>{je.warn(`Unknown node property ${N}`)})}return cf(o,k),o.intersect=function(A){return Ah.rect(o,A)},f},DPt=(s,o)=>{const{shapeSvg:f}=y0(s,o,"label",!0);je.trace("Classes = ",o.classes);const p=f.insert("rect",":first-child"),w=0,k=0;if(p.attr("width",w).attr("height",k),f.attr("class","label edgeLabel"),o.props){const b=new Set(Object.keys(o.props));o.props.borders&&(jNe(p,o.props.borders,w,k),b.delete("borders")),b.forEach(_=>{je.warn(`Unknown node property ${_}`)})}return cf(o,p),o.intersect=function(b){return Ah.rect(o,b)},f};function jNe(s,o,f,p){const w=[],k=_=>{w.push(_,0)},b=_=>{w.push(0,_)};o.includes("t")?(je.debug("add top border"),k(f)):b(f),o.includes("r")?(je.debug("add right border"),k(p)):b(p),o.includes("b")?(je.debug("add bottom border"),k(f)):b(f),o.includes("l")?(je.debug("add left border"),k(p)):b(p),s.attr("stroke-dasharray",w.join(" "))}const IPt=(s,o)=>{let f;o.classes?f="node "+o.classes:f="node default";const p=s.insert("g").attr("class",f).attr("id",o.domId||o.id),w=p.insert("rect",":first-child"),k=p.insert("line"),b=p.insert("g").attr("class","label"),_=o.labelText.flat?o.labelText.flat():o.labelText;let A="";typeof _=="object"?A=_[0]:A=_,je.info("Label text abc79",A,_,typeof _=="object");const N=b.node().appendChild(ip(A,o.labelStyle,!0,!0));let B={width:0,height:0};if(l1(Pt().flowchart.htmlLabels)){const Z=N.children[0],ae=sr(N);B=Z.getBoundingClientRect(),ae.attr("width",B.width),ae.attr("height",B.height)}je.info("Text 2",_);const F=_.slice(1,_.length);let H=N.getBBox();const j=b.node().appendChild(ip(F.join?F.join("
"):F,o.labelStyle,!0,!0));if(l1(Pt().flowchart.htmlLabels)){const Z=j.children[0],ae=sr(j);B=Z.getBoundingClientRect(),ae.attr("width",B.width),ae.attr("height",B.height)}const V=o.padding/2;return sr(j).attr("transform","translate( "+(B.width>H.width?0:(H.width-B.width)/2)+", "+(H.height+V+5)+")"),sr(N).attr("transform","translate( "+(B.width{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.height+o.padding,k=p.width+w/4+o.padding,b=f.insert("rect",":first-child").attr("style",o.style).attr("rx",w/2).attr("ry",w/2).attr("x",-k/2).attr("y",-w/2).attr("width",k).attr("height",w);return cf(o,b),o.intersect=function(_){return Ah.rect(o,_)},f},NPt=(s,o)=>{const{shapeSvg:f,bbox:p,halfPadding:w}=y0(s,o,void 0,!0),k=f.insert("circle",":first-child");return k.attr("style",o.style).attr("rx",o.rx).attr("ry",o.ry).attr("r",p.width/2+w).attr("width",p.width+o.padding).attr("height",p.height+o.padding),je.info("Circle main"),cf(o,k),o.intersect=function(b){return je.info("Circle intersect",o,p.width/2+w,b),Ah.circle(o,p.width/2+w,b)},f},PPt=(s,o)=>{const{shapeSvg:f,bbox:p,halfPadding:w}=y0(s,o,void 0,!0),k=5,b=f.insert("g",":first-child"),_=b.insert("circle"),A=b.insert("circle");return _.attr("style",o.style).attr("rx",o.rx).attr("ry",o.ry).attr("r",p.width/2+w+k).attr("width",p.width+o.padding+k*2).attr("height",p.height+o.padding+k*2),A.attr("style",o.style).attr("rx",o.rx).attr("ry",o.ry).attr("r",p.width/2+w).attr("width",p.width+o.padding).attr("height",p.height+o.padding),je.info("DoubleCircle main"),cf(o,_),o.intersect=function(N){return je.info("DoubleCircle intersect",o,p.width/2+w+k,N),Ah.circle(o,p.width/2+w+k,N)},f},BPt=(s,o)=>{const{shapeSvg:f,bbox:p}=y0(s,o,void 0,!0),w=p.width+o.padding,k=p.height+o.padding,b=[{x:0,y:0},{x:w,y:0},{x:w,y:-k},{x:0,y:-k},{x:0,y:0},{x:-8,y:0},{x:w+8,y:0},{x:w+8,y:-k},{x:-8,y:-k},{x:-8,y:0}],_=y5(f,w,k,b);return _.attr("style",o.style),cf(o,_),o.intersect=function(A){return Ah.polygon(o,b,A)},f},FPt=(s,o)=>{const f=s.insert("g").attr("class","node default").attr("id",o.domId||o.id),p=f.insert("circle",":first-child");return p.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),cf(o,p),o.intersect=function(w){return Ah.circle(o,7,w)},f},$Ne=(s,o,f)=>{const p=s.insert("g").attr("class","node default").attr("id",o.domId||o.id);let w=70,k=10;f==="LR"&&(w=10,k=70);const b=p.append("rect").attr("x",-1*w/2).attr("y",-1*k/2).attr("width",w).attr("height",k).attr("class","fork-join");return cf(o,b),o.height=o.height+o.padding/2,o.width=o.width+o.padding/2,o.intersect=function(_){return Ah.rect(o,_)},p},HNe={rhombus:RNe,question:RNe,rect:MPt,labelRect:DPt,rectWithTitle:IPt,choice:kPt,circle:NPt,doublecircle:PPt,stadium:OPt,hexagon:xPt,rect_left_inv_arrow:EPt,lean_right:TPt,lean_left:_Pt,trapezoid:CPt,inv_trapezoid:SPt,rect_right_inv_arrow:APt,cylinder:LPt,start:FPt,end:(s,o)=>{const f=s.insert("g").attr("class","node default").attr("id",o.domId||o.id),p=f.insert("circle",":first-child"),w=f.insert("circle",":first-child");return w.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),p.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),cf(o,w),o.intersect=function(k){return Ah.circle(o,7,k)},f},note:yPt,subroutine:BPt,fork:$Ne,join:$Ne,class_box:(s,o)=>{const f=o.padding/2,p=4,w=8;let k;o.classes?k="node "+o.classes:k="node default";const b=s.insert("g").attr("class",k).attr("id",o.domId||o.id),_=b.insert("rect",":first-child"),A=b.insert("line"),N=b.insert("line");let B=0,F=p;const H=b.insert("g").attr("class","label");let j=0;const V=o.classData.annotations&&o.classData.annotations[0],Z=o.classData.annotations[0]?"«"+o.classData.annotations[0]+"»":"",ae=H.node().appendChild(ip(Z,o.labelStyle,!0,!0));let le=ae.getBBox();if(l1(Pt().flowchart.htmlLabels)){const ye=ae.children[0],re=sr(ae);le=ye.getBoundingClientRect(),re.attr("width",le.width),re.attr("height",le.height)}o.classData.annotations[0]&&(F+=le.height+p,B+=le.width);let ce=o.classData.id;o.classData.type!==void 0&&o.classData.type!==""&&(Pt().flowchart.htmlLabels?ce+="<"+o.classData.type+">":ce+="<"+o.classData.type+">");const be=H.node().appendChild(ip(ce,o.labelStyle,!0,!0));sr(be).attr("class","classTitle");let xe=be.getBBox();if(l1(Pt().flowchart.htmlLabels)){const ye=be.children[0],re=sr(be);xe=ye.getBoundingClientRect(),re.attr("width",xe.width),re.attr("height",xe.height)}F+=xe.height+p,xe.width>B&&(B=xe.width);const Ee=[];o.classData.members.forEach(ye=>{const re=$K(ye);let we=re.displayText;Pt().flowchart.htmlLabels&&(we=we.replace(//g,">"));const ke=H.node().appendChild(ip(we,re.cssStyle?re.cssStyle:o.labelStyle,!0,!0));let he=ke.getBBox();if(l1(Pt().flowchart.htmlLabels)){const De=ke.children[0],X=sr(ke);he=De.getBoundingClientRect(),X.attr("width",he.width),X.attr("height",he.height)}he.width>B&&(B=he.width),F+=he.height+p,Ee.push(ke)}),F+=w;const Me=[];if(o.classData.methods.forEach(ye=>{const re=$K(ye);let we=re.displayText;Pt().flowchart.htmlLabels&&(we=we.replace(//g,">"));const ke=H.node().appendChild(ip(we,re.cssStyle?re.cssStyle:o.labelStyle,!0,!0));let he=ke.getBBox();if(l1(Pt().flowchart.htmlLabels)){const De=ke.children[0],X=sr(ke);he=De.getBoundingClientRect(),X.attr("width",he.width),X.attr("height",he.height)}he.width>B&&(B=he.width),F+=he.height+p,Me.push(ke)}),F+=w,V){let ye=(B-le.width)/2;sr(ae).attr("transform","translate( "+(-1*B/2+ye)+", "+-1*F/2+")"),j=le.height+p}let fe=(B-xe.width)/2;return sr(be).attr("transform","translate( "+(-1*B/2+fe)+", "+(-1*F/2+j)+")"),j+=xe.height+p,A.attr("class","divider").attr("x1",-B/2-f).attr("x2",B/2+f).attr("y1",-F/2-f+w+j).attr("y2",-F/2-f+w+j),j+=w,Ee.forEach(ye=>{sr(ye).attr("transform","translate( "+-B/2+", "+(-1*F/2+j+w/2)+")"),j+=xe.height+p}),j+=w,N.attr("class","divider").attr("x1",-B/2-f).attr("x2",B/2+f).attr("y1",-F/2-f+w+j).attr("y2",-F/2-f+w+j),j+=w,Me.forEach(ye=>{sr(ye).attr("transform","translate( "+-B/2+", "+(-1*F/2+j)+")"),j+=xe.height+p}),_.attr("class","outer title-state").attr("x",-B/2-f).attr("y",-(F/2)-f).attr("width",B+o.padding).attr("height",F+o.padding),cf(o,_),o.intersect=function(ye){return Ah.rect(o,ye)},b}};let $A={};const zNe=(s,o,f)=>{let p,w;if(o.link){let k;Pt().securityLevel==="sandbox"?k="_top":o.linkTarget&&(k=o.linkTarget||"_blank"),p=s.insert("svg:a").attr("xlink:href",o.link).attr("target",k),w=HNe[o.shape](p,o,f)}else w=HNe[o.shape](s,o,f),p=w;return o.tooltip&&w.attr("title",o.tooltip),o.class&&w.attr("class","node default "+o.class),$A[o.id]=p,o.haveCallback&&$A[o.id].attr("class",$A[o.id].attr("class")+" clickable"),p},RPt=(s,o)=>{$A[o.id]=s},jPt=()=>{$A={}},GNe=s=>{const o=$A[s.id];je.trace("Transforming node",s.diff,s,"translate("+(s.x-s.width/2-5)+", "+s.width/2+")");const f=8,p=s.diff||0;return s.clusterNode?o.attr("transform","translate("+(s.x+p-s.width/2)+", "+(s.y-s.height/2-f)+")"):o.attr("transform","translate("+s.x+", "+s.y+")"),p},$Pt={rect:(s,o)=>{je.trace("Creating subgraph rect for ",o.id,o);const f=s.insert("g").attr("class","cluster"+(o.class?" "+o.class:"")).attr("id",o.id),p=f.insert("rect",":first-child"),w=f.insert("g").attr("class","cluster-label"),k=w.node().appendChild(ip(o.labelText,o.labelStyle,void 0,!0));let b=k.getBBox();if(l1(Pt().flowchart.htmlLabels)){const F=k.children[0],H=sr(k);b=F.getBoundingClientRect(),H.attr("width",b.width),H.attr("height",b.height)}const _=0*o.padding,A=_/2,N=o.width<=b.width+_?b.width+_:o.width;o.width<=b.width+_?o.diff=(b.width-o.width)/2-o.padding/2:o.diff=-o.padding/2,je.trace("Data ",o,JSON.stringify(o)),p.attr("style",o.style).attr("rx",o.rx).attr("ry",o.ry).attr("x",o.x-N/2).attr("y",o.y-o.height/2-A).attr("width",N).attr("height",o.height+_),w.attr("transform","translate("+(o.x-b.width/2)+", "+(o.y-o.height/2)+")");const B=p.node().getBBox();return o.width=B.width,o.height=B.height,o.intersect=function(F){return ZN(o,F)},f},roundedWithTitle:(s,o)=>{const f=s.insert("g").attr("class",o.classes).attr("id",o.id),p=f.insert("rect",":first-child"),w=f.insert("g").attr("class","cluster-label"),k=f.append("rect"),b=w.node().appendChild(ip(o.labelText,o.labelStyle,void 0,!0));let _=b.getBBox();if(l1(Pt().flowchart.htmlLabels)){const H=b.children[0],j=sr(b);_=H.getBoundingClientRect(),j.attr("width",_.width),j.attr("height",_.height)}_=b.getBBox();const A=0*o.padding,N=A/2,B=o.width<=_.width+o.padding?_.width+o.padding:o.width;o.width<=_.width+o.padding?o.diff=(_.width+o.padding*0-o.width)/2:o.diff=-o.padding/2,p.attr("class","outer").attr("x",o.x-B/2-N).attr("y",o.y-o.height/2-N).attr("width",B+A).attr("height",o.height+A),k.attr("class","inner").attr("x",o.x-B/2-N).attr("y",o.y-o.height/2-N+_.height-1).attr("width",B+A).attr("height",o.height+A-_.height-3),w.attr("transform","translate("+(o.x-_.width/2)+", "+(o.y-o.height/2-o.padding/3+(l1(Pt().flowchart.htmlLabels)?5:3))+")");const F=p.node().getBBox();return o.height=F.height,o.intersect=function(H){return ZN(o,H)},f},noteGroup:(s,o)=>{const f=s.insert("g").attr("class","note-cluster").attr("id",o.id),p=f.insert("rect",":first-child"),w=0*o.padding,k=w/2;p.attr("rx",o.rx).attr("ry",o.ry).attr("x",o.x-o.width/2-k).attr("y",o.y-o.height/2-k).attr("width",o.width+w).attr("height",o.height+w).attr("fill","none");const b=p.node().getBBox();return o.width=b.width,o.height=b.height,o.intersect=function(_){return ZN(o,_)},f},divider:(s,o)=>{const f=s.insert("g").attr("class",o.classes).attr("id",o.id),p=f.insert("rect",":first-child"),w=0*o.padding,k=w/2;p.attr("class","divider").attr("x",o.x-o.width/2-k).attr("y",o.y-o.height/2).attr("width",o.width+w).attr("height",o.height+w);const b=p.node().getBBox();return o.width=b.width,o.height=b.height,o.diff=-o.padding/2,o.intersect=function(_){return ZN(o,_)},f}};let qNe={};const HPt=(s,o)=>{je.trace("Inserting cluster");const f=o.shape||"rect";qNe[o.id]=$Pt[f](s,o)},zPt=()=>{qNe={}};let VK={},Bd={};const GPt=()=>{VK={},Bd={}},VNe=(s,o)=>{const f=ip(o.label,o.labelStyle),p=s.insert("g").attr("class","edgeLabel"),w=p.insert("g").attr("class","label");w.node().appendChild(f);let k=f.getBBox();if(l1(Pt().flowchart.htmlLabels)){const _=f.children[0],A=sr(f);k=_.getBoundingClientRect(),A.attr("width",k.width),A.attr("height",k.height)}w.attr("transform","translate("+-k.width/2+", "+-k.height/2+")"),VK[o.id]=p,o.width=k.width,o.height=k.height;let b;if(o.startLabelLeft){const _=ip(o.startLabelLeft,o.labelStyle),A=s.insert("g").attr("class","edgeTerminals"),N=A.insert("g").attr("class","inner");b=N.node().appendChild(_);const B=_.getBBox();N.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),Bd[o.id]||(Bd[o.id]={}),Bd[o.id].startLeft=A,UK(b,o.startLabelLeft)}if(o.startLabelRight){const _=ip(o.startLabelRight,o.labelStyle),A=s.insert("g").attr("class","edgeTerminals"),N=A.insert("g").attr("class","inner");b=A.node().appendChild(_),N.node().appendChild(_);const B=_.getBBox();N.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),Bd[o.id]||(Bd[o.id]={}),Bd[o.id].startRight=A,UK(b,o.startLabelRight)}if(o.endLabelLeft){const _=ip(o.endLabelLeft,o.labelStyle),A=s.insert("g").attr("class","edgeTerminals"),N=A.insert("g").attr("class","inner");b=N.node().appendChild(_);const B=_.getBBox();N.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),A.node().appendChild(_),Bd[o.id]||(Bd[o.id]={}),Bd[o.id].endLeft=A,UK(b,o.endLabelLeft)}if(o.endLabelRight){const _=ip(o.endLabelRight,o.labelStyle),A=s.insert("g").attr("class","edgeTerminals"),N=A.insert("g").attr("class","inner");b=N.node().appendChild(_);const B=_.getBBox();N.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),A.node().appendChild(_),Bd[o.id]||(Bd[o.id]={}),Bd[o.id].endRight=A,UK(b,o.endLabelRight)}return f};function UK(s,o){Pt().flowchart.htmlLabels&&s&&(s.style.width=o.length*9+"px",s.style.height="12px")}const qPt=(s,o)=>{je.info("Moving label abc78 ",s.id,s.label,VK[s.id]);let f=o.updatedPath?o.updatedPath:o.originalPath;if(s.label){const p=VK[s.id];let w=s.x,k=s.y;if(f){const b=Pa.calcLabelPosition(f);je.info("Moving label "+s.label+" from (",w,",",k,") to (",b.x,",",b.y,") abc78"),o.updatedPath&&(w=b.x,k=b.y)}p.attr("transform","translate("+w+", "+k+")")}if(s.startLabelLeft){const p=Bd[s.id].startLeft;let w=s.x,k=s.y;if(f){const b=Pa.calcTerminalLabelPosition(s.arrowTypeStart?10:0,"start_left",f);w=b.x,k=b.y}p.attr("transform","translate("+w+", "+k+")")}if(s.startLabelRight){const p=Bd[s.id].startRight;let w=s.x,k=s.y;if(f){const b=Pa.calcTerminalLabelPosition(s.arrowTypeStart?10:0,"start_right",f);w=b.x,k=b.y}p.attr("transform","translate("+w+", "+k+")")}if(s.endLabelLeft){const p=Bd[s.id].endLeft;let w=s.x,k=s.y;if(f){const b=Pa.calcTerminalLabelPosition(s.arrowTypeEnd?10:0,"end_left",f);w=b.x,k=b.y}p.attr("transform","translate("+w+", "+k+")")}if(s.endLabelRight){const p=Bd[s.id].endRight;let w=s.x,k=s.y;if(f){const b=Pa.calcTerminalLabelPosition(s.arrowTypeEnd?10:0,"end_right",f);w=b.x,k=b.y}p.attr("transform","translate("+w+", "+k+")")}},VPt=(s,o)=>{const f=s.x,p=s.y,w=Math.abs(o.x-f),k=Math.abs(o.y-p),b=s.width/2,_=s.height/2;return w>=b||k>=_},UPt=(s,o,f)=>{je.warn(`intersection calc abc89:
+ outsidePoint: ${JSON.stringify(o)}
+ insidePoint : ${JSON.stringify(f)}
+ node : x:${s.x} y:${s.y} w:${s.width} h:${s.height}`);const p=s.x,w=s.y,k=Math.abs(p-f.x),b=s.width/2;let _=f.xMath.abs(p-o.x)*A){let F=f.y{je.warn("abc88 cutPathAtIntersect",s,o);let f=[],p=s[0],w=!1;return s.forEach(k=>{if(je.info("abc88 checking point",k,o),!VPt(o,k)&&!w){const b=UPt(o,p,k);je.warn("abc88 inside",k,p,b),je.warn("abc88 intersection",b);let _=!1;f.forEach(A=>{_=_||A.x===b.x&&A.y===b.y}),f.some(A=>A.x===b.x&&A.y===b.y)?je.warn("abc88 no intersect",b,f):f.push(b),w=!0}else je.warn("abc88 outside",k,p),p=k,w||f.push(k)}),je.warn("abc88 returning points",f),f},KPt=function(s,o,f,p,w,k){let b=f.points,_=!1;const A=k.node(o.v);var N=k.node(o.w);je.info("abc88 InsertEdge: ",f),N.intersect&&A.intersect&&(b=b.slice(1,f.points.length-1),b.unshift(A.intersect(b[0])),je.info("Last point",b[b.length-1],N,N.intersect(b[b.length-1])),b.push(N.intersect(b[b.length-1]))),f.toCluster&&(je.info("to cluster abc88",p[f.toCluster]),b=UNe(f.points,p[f.toCluster].node),_=!0),f.fromCluster&&(je.info("from cluster abc88",p[f.fromCluster]),b=UNe(b.reverse(),p[f.fromCluster].node).reverse(),_=!0);const B=b.filter(le=>!Number.isNaN(le.y));let F;w==="graph"||w==="flowchart"?F=f.curve||pA:F=pA;const H=RE().x(function(le){return le.x}).y(function(le){return le.y}).curve(F);let j;switch(f.thickness){case"normal":j="edge-thickness-normal";break;case"thick":j="edge-thickness-thick";break;default:j=""}switch(f.pattern){case"solid":j+=" edge-pattern-solid";break;case"dotted":j+=" edge-pattern-dotted";break;case"dashed":j+=" edge-pattern-dashed";break}const V=s.append("path").attr("d",H(B)).attr("id",f.id).attr("class"," "+j+(f.classes?" "+f.classes:"")).attr("style",f.style);let Z="";switch((Pt().flowchart.arrowMarkerAbsolute||Pt().state.arrowMarkerAbsolute)&&(Z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Z=Z.replace(/\(/g,"\\("),Z=Z.replace(/\)/g,"\\)")),je.info("arrowTypeStart",f.arrowTypeStart),je.info("arrowTypeEnd",f.arrowTypeEnd),f.arrowTypeStart){case"arrow_cross":V.attr("marker-start","url("+Z+"#"+w+"-crossStart)");break;case"arrow_point":V.attr("marker-start","url("+Z+"#"+w+"-pointStart)");break;case"arrow_barb":V.attr("marker-start","url("+Z+"#"+w+"-barbStart)");break;case"arrow_circle":V.attr("marker-start","url("+Z+"#"+w+"-circleStart)");break;case"aggregation":V.attr("marker-start","url("+Z+"#"+w+"-aggregationStart)");break;case"extension":V.attr("marker-start","url("+Z+"#"+w+"-extensionStart)");break;case"composition":V.attr("marker-start","url("+Z+"#"+w+"-compositionStart)");break;case"dependency":V.attr("marker-start","url("+Z+"#"+w+"-dependencyStart)");break;case"lollipop":V.attr("marker-start","url("+Z+"#"+w+"-lollipopStart)");break}switch(f.arrowTypeEnd){case"arrow_cross":V.attr("marker-end","url("+Z+"#"+w+"-crossEnd)");break;case"arrow_point":V.attr("marker-end","url("+Z+"#"+w+"-pointEnd)");break;case"arrow_barb":V.attr("marker-end","url("+Z+"#"+w+"-barbEnd)");break;case"arrow_circle":V.attr("marker-end","url("+Z+"#"+w+"-circleEnd)");break;case"aggregation":V.attr("marker-end","url("+Z+"#"+w+"-aggregationEnd)");break;case"extension":V.attr("marker-end","url("+Z+"#"+w+"-extensionEnd)");break;case"composition":V.attr("marker-end","url("+Z+"#"+w+"-compositionEnd)");break;case"dependency":V.attr("marker-end","url("+Z+"#"+w+"-dependencyEnd)");break;case"lollipop":V.attr("marker-end","url("+Z+"#"+w+"-lollipopEnd)");break}let ae={};return _&&(ae.updatedPath=b),ae.originalPath=f.points,ae},KNe=(s,o,f,p)=>{je.info("Graph in recursive render: XXX",m5(o),p);const w=o.graph().rankdir;je.trace("Dir in recursive render - dir:",w);const k=s.insert("g").attr("class","root");o.nodes()?je.info("Recursive render XXX",o.nodes()):je.info("No nodes found for",o),o.edges().length>0&&je.trace("Recursive edges",o.edge(o.edges()[0]));const b=k.insert("g").attr("class","clusters"),_=k.insert("g").attr("class","edgePaths"),A=k.insert("g").attr("class","edgeLabels"),N=k.insert("g").attr("class","nodes");o.nodes().forEach(function(F){const H=o.node(F);if(p!==void 0){const j=JSON.parse(JSON.stringify(p.clusterData));je.info("Setting data for cluster XXX (",F,") ",j,p),o.setNode(p.id,j),o.parent(F)||(je.trace("Setting parent",F,p.id),o.setParent(F,p.id,j))}if(je.info("(Insert) Node XXX"+F+": "+JSON.stringify(o.node(F))),H&&H.clusterNode){je.info("Cluster identified",F,H.width,o.node(F));const j=KNe(N,H.graph,f,o.node(F)),V=j.elem;cf(H,V),H.diff=j.diff||0,je.info("Node bounds (abc123)",F,H,H.width,H.x,H.y),RPt(V,H),je.warn("Recursive render complete ",V,H)}else o.children(F).length>0?(je.info("Cluster - the non recursive path XXX",F,H.id,H,o),je.info(QN(H.id,o)),Zo[H.id]={id:QN(H.id,o),node:H}):(je.info("Node - the non recursive path",F,H.id,H),zNe(N,o.node(F),w))}),o.edges().forEach(function(F){const H=o.edge(F.v,F.w,F.name);je.info("Edge "+F.v+" -> "+F.w+": "+JSON.stringify(F)),je.info("Edge "+F.v+" -> "+F.w+": ",F," ",JSON.stringify(o.edge(F))),je.info("Fix",Zo,"ids:",F.v,F.w,"Translateing: ",Zo[F.v],Zo[F.w]),VNe(A,H)}),o.edges().forEach(function(F){je.info("Edge "+F.v+" -> "+F.w+": "+JSON.stringify(F))}),je.info("#############################################"),je.info("### Layout ###"),je.info("#############################################"),je.info(o),jA(o),je.info("Graph after layout:",m5(o));let B=0;return pPt(o).forEach(function(F){const H=o.node(F);je.info("Position "+F+": "+JSON.stringify(o.node(F))),je.info("Position "+F+": ("+H.x,","+H.y,") width: ",H.width," height: ",H.height),H&&H.clusterNode?GNe(H):o.children(F).length>0?(HPt(b,H),Zo[H.id].node=H):GNe(H)}),o.edges().forEach(function(F){const H=o.edge(F);je.info("Edge "+F.v+" -> "+F.w+": "+JSON.stringify(H),H);const j=KPt(_,F,H,Zo,f,o);qPt(H,j)}),o.nodes().forEach(function(F){const H=o.node(F);je.info(F,H.type,H.diff),H.type==="group"&&(B=H.diff)}),{elem:k,diff:B}},$de=(s,o,f,p,w)=>{MNe(s,f,p,w),jPt(),GPt(),zPt(),fPt(),je.warn("Graph at first:",m5(o)),gPt(o),je.warn("Graph after:",m5(o)),KNe(s,o,p)},WNe=s=>xa.sanitizeText(s,Pt());let YNe={dividerMargin:10,padding:5,textHeight:10};const WPt=function(s,o,f,p){const w=Object.keys(s);je.info("keys:",w),je.info(s),w.forEach(function(k){const b=s[k];let _="";b.cssClasses.length>0&&(_=_+" "+b.cssClasses.join(" "));const A={labelStyle:""};let N=b.text!==void 0?b.text:b.id,B=0,F="";switch(b.type){case"class":F="class_box";break;default:F="class_box"}o.setNode(b.id,{labelStyle:A.labelStyle,shape:F,labelText:WNe(N),classData:b,rx:B,ry:B,class:_,style:A.style,id:b.id,domId:b.domId,tooltip:p.db.getTooltip(b.id)||"",haveCallback:b.haveCallback,link:b.link,width:b.type==="group"?500:void 0,type:b.type,padding:Pt().flowchart.padding}),je.info("setNode",{labelStyle:A.labelStyle,shape:F,labelText:N,rx:B,ry:B,class:_,style:A.style,id:b.id,width:b.type==="group"?500:void 0,type:b.type,padding:Pt().flowchart.padding})})},YPt=function(s,o,f,p){je.info(s),s.forEach(function(w,k){const b=w;let _="";const A={labelStyle:"",style:""};let N=b.text,B=0,F="note";if(o.setNode(b.id,{labelStyle:A.labelStyle,shape:F,labelText:WNe(N),noteData:b,rx:B,ry:B,class:_,style:A.style,id:b.id,domId:b.id,tooltip:"",type:"note",padding:Pt().flowchart.padding}),je.info("setNode",{labelStyle:A.labelStyle,shape:F,labelText:N,rx:B,ry:B,style:A.style,id:b.id,type:"note",padding:Pt().flowchart.padding}),!b.class||!(b.class in p))return;const H=f+k,j={};j.classes="relation",j.pattern="dotted",j.id=`edgeNote${H}`,j.arrowhead="none",je.info(`Note edge: ${JSON.stringify(j)}, ${JSON.stringify(b)}`),j.startLabelRight="",j.endLabelLeft="",j.arrowTypeStart="none",j.arrowTypeEnd="none";let V="fill:none",Z="";j.style=V,j.labelStyle=Z,j.curve=Jg(YNe.curve,Pd),o.setEdge(b.id,b.class,j,H)})},XPt=function(s,o){const f=Pt().flowchart;let p=0;s.forEach(function(w){p++;const k={};k.classes="relation",k.pattern=w.relation.lineType==1?"dashed":"solid",k.id="id"+p,w.type==="arrow_open"?k.arrowhead="none":k.arrowhead="normal",je.info(k,w),k.startLabelRight=w.relationTitle1==="none"?"":w.relationTitle1,k.endLabelLeft=w.relationTitle2==="none"?"":w.relationTitle2,k.arrowTypeStart=XNe(w.relation.type1),k.arrowTypeEnd=XNe(w.relation.type2);let b="",_="";if(w.style!==void 0){const A=qw(w.style);b=A.style,_=A.labelStyle}else b="fill:none";k.style=b,k.labelStyle=_,w.interpolate!==void 0?k.curve=Jg(w.interpolate,Pd):s.defaultInterpolate!==void 0?k.curve=Jg(s.defaultInterpolate,Pd):k.curve=Jg(f.curve,Pd),w.text=w.title,w.text===void 0?w.style!==void 0&&(k.arrowheadStyle="fill: #333"):(k.arrowheadStyle="fill: #333",k.labelpos="c",Pt().flowchart.htmlLabels?(k.labelType="html",k.label=''+w.text+""):(k.labelType="text",k.label=w.text.replace(xa.lineBreakRegex,`
+`),w.style===void 0&&(k.style=k.style||"stroke: #333; stroke-width: 1.5px;fill:none"),k.labelStyle=k.labelStyle.replace("color:","fill:"))),o.setEdge(w.id1,w.id2,k,p)})},QPt=function(s){Object.keys(s).forEach(function(f){YNe[f]=s[f]})},ZPt=function(s,o,f,p){je.info("Drawing class - ",o);const w=Pt().flowchart,k=Pt().securityLevel;je.info("config:",w);const b=w.nodeSpacing||50,_=w.rankSpacing||50,A=new Hf({multigraph:!0,compound:!0}).setGraph({rankdir:p.db.getDirection(),nodesep:b,ranksep:_,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),N=p.db.getClasses(),B=p.db.getRelations(),F=p.db.getNotes();je.info(B),WPt(N,A,o,p),XPt(B,A),YPt(F,A,B.length+1,N);let H;k==="sandbox"&&(H=sr("#i"+o));const j=sr(k==="sandbox"?H.nodes()[0].contentDocument.body:"body"),V=j.select(`[id="${o}"]`),Z=j.select("#"+o+" g");if($de(Z,A,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",o),Pa.insertTitle(V,"classTitleText",w.titleTopMargin,p.db.getDiagramTitle()),KE(A,V,w.diagramPadding,w.useMaxWidth),!w.htmlLabels){const ae=k==="sandbox"?H.nodes()[0].contentDocument:document,le=ae.querySelectorAll('[id="'+o+'"] .edgeLabel .label');for(const ce of le){const be=ce.getBBox(),xe=ae.createElementNS("http://www.w3.org/2000/svg","rect");xe.setAttribute("rx",0),xe.setAttribute("ry",0),xe.setAttribute("width",be.width),xe.setAttribute("height",be.height),ce.insertBefore(xe,ce.firstChild)}}};function XNe(s){let o;switch(s){case 0:o="aggregation";break;case 1:o="extension";break;case 2:o="composition";break;case 3:o="dependency";break;case 4:o="lollipop";break;default:o="none"}return o}const JPt={setConf:QPt,draw:ZPt};var Hde=function(){var s=function(ke,he,De,X){for(De=De||{},X=ke.length;X--;De[ke[X]]=he);return De},o=[1,2],f=[1,5],p=[6,9,11,23,25,27,29,30,31,51],w=[1,17],k=[1,18],b=[1,19],_=[1,20],A=[1,21],N=[1,22],B=[1,25],F=[1,30],H=[1,31],j=[1,32],V=[1,33],Z=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,51],ae=[1,45],le=[30,31,48,49],ce=[4,6,9,11,23,25,27,29,30,31,51],be=[44,45,46,47],xe=[22,37],Ee=[1,65],Me=[1,64],fe=[22,37,39,41],ye={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,NON_IDENTIFYING:48,IDENTIFYING:49,WORD:50,open_directive:51,type_directive:52,arg_directive:53,close_directive:54,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"NON_IDENTIFYING",49:"IDENTIFYING",50:"WORD",51:"open_directive",52:"type_directive",53:"arg_directive",54:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(he,De,X,Re,pe,Ge,de){var ct=Ge.length-1;switch(pe){case 1:break;case 3:this.$=[];break;case 4:Ge[ct-1].push(Ge[ct]),this.$=Ge[ct-1];break;case 5:case 6:this.$=Ge[ct];break;case 7:case 8:this.$=[];break;case 12:Re.addEntity(Ge[ct-4]),Re.addEntity(Ge[ct-2]),Re.addRelationship(Ge[ct-4],Ge[ct],Ge[ct-2],Ge[ct-3]);break;case 13:Re.addEntity(Ge[ct-3]),Re.addAttributes(Ge[ct-3],Ge[ct-1]);break;case 14:Re.addEntity(Ge[ct-2]);break;case 15:Re.addEntity(Ge[ct]);break;case 16:case 17:this.$=Ge[ct].trim(),Re.setAccTitle(this.$);break;case 18:case 19:this.$=Ge[ct].trim(),Re.setAccDescription(this.$);break;case 20:case 43:this.$=Ge[ct];break;case 21:case 41:case 42:this.$=Ge[ct].replace(/"/g,"");break;case 22:case 30:this.$=[Ge[ct]];break;case 23:Ge[ct].push(Ge[ct-1]),this.$=Ge[ct];break;case 24:this.$={attributeType:Ge[ct-1],attributeName:Ge[ct]};break;case 25:this.$={attributeType:Ge[ct-2],attributeName:Ge[ct-1],attributeKeyTypeList:Ge[ct]};break;case 26:this.$={attributeType:Ge[ct-2],attributeName:Ge[ct-1],attributeComment:Ge[ct]};break;case 27:this.$={attributeType:Ge[ct-3],attributeName:Ge[ct-2],attributeKeyTypeList:Ge[ct-1],attributeComment:Ge[ct]};break;case 28:case 29:case 32:this.$=Ge[ct];break;case 31:Ge[ct-2].push(Ge[ct]),this.$=Ge[ct-2];break;case 33:this.$=Ge[ct].replace(/"/g,"");break;case 34:this.$={cardA:Ge[ct],relType:Ge[ct-1],cardB:Ge[ct-2]};break;case 35:this.$=Re.Cardinality.ZERO_OR_ONE;break;case 36:this.$=Re.Cardinality.ZERO_OR_MORE;break;case 37:this.$=Re.Cardinality.ONE_OR_MORE;break;case 38:this.$=Re.Cardinality.ONLY_ONE;break;case 39:this.$=Re.Identification.NON_IDENTIFYING;break;case 40:this.$=Re.Identification.IDENTIFYING;break;case 44:Re.parseDirective("%%{","open_directive");break;case 45:Re.parseDirective(Ge[ct],"type_directive");break;case 46:Ge[ct]=Ge[ct].trim().replace(/'/g,'"'),Re.parseDirective(Ge[ct],"arg_directive");break;case 47:Re.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:o,7:3,12:4,51:f},{1:[3]},s(p,[2,3],{5:6}),{3:7,4:o,7:3,12:4,51:f},{13:8,52:[1,9]},{52:[2,44]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:w,25:k,27:b,29:_,30:A,31:N,51:f},{1:[2,2]},{14:23,15:[1,24],54:B},s([15,54],[2,45]),s(p,[2,8],{1:[2,1]}),s(p,[2,4]),{7:15,10:26,12:4,17:16,23:w,25:k,27:b,29:_,30:A,31:N,51:f},s(p,[2,6]),s(p,[2,7]),s(p,[2,11]),s(p,[2,15],{18:27,42:29,20:[1,28],44:F,45:H,46:j,47:V}),{24:[1,34]},{26:[1,35]},{28:[1,36]},s(p,[2,19]),s(Z,[2,20]),s(Z,[2,21]),{11:[1,37]},{16:38,53:[1,39]},{11:[2,47]},s(p,[2,5]),{17:40,30:A,31:N},{21:41,22:[1,42],32:43,33:44,37:ae},{43:46,48:[1,47],49:[1,48]},s(le,[2,35]),s(le,[2,36]),s(le,[2,37]),s(le,[2,38]),s(p,[2,16]),s(p,[2,17]),s(p,[2,18]),s(ce,[2,9]),{14:49,54:B},{54:[2,46]},{15:[1,50]},{22:[1,51]},s(p,[2,14]),{21:52,22:[2,22],32:43,33:44,37:ae},{34:53,37:[1,54]},{37:[2,28]},{42:55,44:F,45:H,46:j,47:V},s(be,[2,39]),s(be,[2,40]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],50:[1,58]},s(p,[2,13]),{22:[2,23]},s(xe,[2,24],{35:61,36:62,38:63,40:Ee,41:Me}),s([22,37,40,41],[2,29]),s([30,31],[2,34]),s(ce,[2,10]),s(p,[2,12]),s(p,[2,41]),s(p,[2,42]),s(p,[2,43]),s(xe,[2,25],{36:66,39:[1,67],41:Me}),s(xe,[2,26]),s(fe,[2,30]),s(xe,[2,33]),s(fe,[2,32]),s(xe,[2,27]),{38:68,40:Ee},s(fe,[2,31])],defaultActions:{5:[2,44],7:[2,2],25:[2,47],39:[2,46],45:[2,28],52:[2,23]},parseError:function(he,De){if(De.recoverable)this.trace(he);else{var X=new Error(he);throw X.hash=De,X}},parse:function(he){var De=this,X=[0],Re=[],pe=[null],Ge=[],de=this.table,ct="",bt=0,St=0,yt=2,Mt=1,nn=Ge.slice.call(arguments,1),dn=Object.create(this.lexer),vt={yy:{}};for(var Lr in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Lr)&&(vt.yy[Lr]=this.yy[Lr]);dn.setInput(he,vt.yy),vt.yy.lexer=dn,vt.yy.parser=this,typeof dn.yylloc>"u"&&(dn.yylloc={});var xt=dn.yylloc;Ge.push(xt);var Tt=dn.options&&dn.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wt(){var Fr;return Fr=Re.pop()||dn.lex()||Mt,typeof Fr!="number"&&(Fr instanceof Array&&(Re=Fr,Fr=Re.pop()),Fr=De.symbols_[Fr]||Fr),Fr}for(var At,He,Ze,Lt,Ve={},Mn,Oe,Di,rn;;){if(He=X[X.length-1],this.defaultActions[He]?Ze=this.defaultActions[He]:((At===null||typeof At>"u")&&(At=wt()),Ze=de[He]&&de[He][At]),typeof Ze>"u"||!Ze.length||!Ze[0]){var pi="";rn=[];for(Mn in de[He])this.terminals_[Mn]&&Mn>yt&&rn.push("'"+this.terminals_[Mn]+"'");dn.showPosition?pi="Parse error on line "+(bt+1)+`:
+`+dn.showPosition()+`
+Expecting `+rn.join(", ")+", got '"+(this.terminals_[At]||At)+"'":pi="Parse error on line "+(bt+1)+": Unexpected "+(At==Mt?"end of input":"'"+(this.terminals_[At]||At)+"'"),this.parseError(pi,{text:dn.match,token:this.terminals_[At]||At,line:dn.yylineno,loc:xt,expected:rn})}if(Ze[0]instanceof Array&&Ze.length>1)throw new Error("Parse Error: multiple actions possible at state: "+He+", token: "+At);switch(Ze[0]){case 1:X.push(At),pe.push(dn.yytext),Ge.push(dn.yylloc),X.push(Ze[1]),At=null,St=dn.yyleng,ct=dn.yytext,bt=dn.yylineno,xt=dn.yylloc;break;case 2:if(Oe=this.productions_[Ze[1]][1],Ve.$=pe[pe.length-Oe],Ve._$={first_line:Ge[Ge.length-(Oe||1)].first_line,last_line:Ge[Ge.length-1].last_line,first_column:Ge[Ge.length-(Oe||1)].first_column,last_column:Ge[Ge.length-1].last_column},Tt&&(Ve._$.range=[Ge[Ge.length-(Oe||1)].range[0],Ge[Ge.length-1].range[1]]),Lt=this.performAction.apply(Ve,[ct,St,bt,vt.yy,Ze[1],pe,Ge].concat(nn)),typeof Lt<"u")return Lt;Oe&&(X=X.slice(0,-1*Oe*2),pe=pe.slice(0,-1*Oe),Ge=Ge.slice(0,-1*Oe)),X.push(this.productions_[Ze[1]][0]),pe.push(Ve.$),Ge.push(Ve._$),Di=de[X[X.length-2]][X[X.length-1]],X.push(Di);break;case 3:return!0}}return!0}},re=function(){var ke={EOF:1,parseError:function(De,X){if(this.yy.parser)this.yy.parser.parseError(De,X);else throw new Error(De)},setInput:function(he,De){return this.yy=De||this.yy||{},this._input=he,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var he=this._input[0];this.yytext+=he,this.yyleng++,this.offset++,this.match+=he,this.matched+=he;var De=he.match(/(?:\r\n?|\n).*/g);return De?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),he},unput:function(he){var De=he.length,X=he.split(/(?:\r\n?|\n)/g);this._input=he+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-De),this.offset-=De;var Re=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),X.length-1&&(this.yylineno-=X.length-1);var pe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:X?(X.length===Re.length?this.yylloc.first_column:0)+Re[Re.length-X.length].length-X[0].length:this.yylloc.first_column-De},this.options.ranges&&(this.yylloc.range=[pe[0],pe[0]+this.yyleng-De]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(he){this.unput(this.match.slice(he))},pastInput:function(){var he=this.matched.substr(0,this.matched.length-this.match.length);return(he.length>20?"...":"")+he.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var he=this.match;return he.length<20&&(he+=this._input.substr(0,20-he.length)),(he.substr(0,20)+(he.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var he=this.pastInput(),De=new Array(he.length+1).join("-");return he+this.upcomingInput()+`
+`+De+"^"},test_match:function(he,De){var X,Re,pe;if(this.options.backtrack_lexer&&(pe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(pe.yylloc.range=this.yylloc.range.slice(0))),Re=he[0].match(/(?:\r\n?|\n).*/g),Re&&(this.yylineno+=Re.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Re?Re[Re.length-1].length-Re[Re.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+he[0].length},this.yytext+=he[0],this.match+=he[0],this.matches=he,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(he[0].length),this.matched+=he[0],X=this.performAction.call(this,this.yy,this,De,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X)return X;if(this._backtrack){for(var Ge in pe)this[Ge]=pe[Ge];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var he,De,X,Re;this._more||(this.yytext="",this.match="");for(var pe=this._currentRules(),Ge=0;GeDe[0].length)){if(De=X,Re=Ge,this.options.backtrack_lexer){if(he=this.test_match(X,pe[Ge]),he!==!1)return he;if(this._backtrack){De=!1;continue}else return!1}else if(!this.options.flex)break}return De?(he=this.test_match(De,pe[Re]),he!==!1?he:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var De=this.next();return De||this.lex()},begin:function(De){this.conditionStack.push(De)},popState:function(){var De=this.conditionStack.length-1;return De>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(De){return De=this.conditionStack.length-1-Math.abs(De||0),De>=0?this.conditionStack[De]:"INITIAL"},pushState:function(De){this.begin(De)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(De,X,Re,pe){switch(Re){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),51;case 8:return this.begin("type_directive"),52;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),54;case 11:return 53;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 50;case 19:return 4;case 20:return this.begin("block"),20;case 21:return 39;case 22:break;case 23:return 40;case 24:return 37;case 25:return 37;case 26:return 41;case 27:break;case 28:return this.popState(),22;case 29:return X.yytext[0];case 30:return 44;case 31:return 46;case 32:return 46;case 33:return 46;case 34:return 44;case 35:return 44;case 36:return 45;case 37:return 45;case 38:return 45;case 39:return 45;case 40:return 45;case 41:return 46;case 42:return 45;case 43:return 46;case 44:return 47;case 45:return 47;case 46:return 47;case 47:return 47;case 48:return 44;case 49:return 45;case 50:return 46;case 51:return 48;case 52:return 49;case 53:return 49;case 54:return 48;case 55:return 48;case 56:return 48;case 57:return 30;case 58:return X.yytext[0];case 59:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28,29],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],inclusive:!0}}};return ke}();ye.lexer=re;function we(){this.yy={}}return we.prototype=ye,ye.Parser=we,new we}();Hde.parser=Hde;const eBt=Hde,tBt=s=>s.match(/^\s*erDiagram/)!==null;let JN={},zde=[];const nBt={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},rBt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},iBt=function(s,o,f){Fl.parseDirective(this,s,o,f)},QNe=function(s){return JN[s]===void 0&&(JN[s]={attributes:[]},je.info("Added new entity :",s)),JN[s]},sBt={Cardinality:nBt,Identification:rBt,parseDirective:iBt,getConfig:()=>Pt().er,addEntity:QNe,addAttributes:function(s,o){let f=QNe(s),p;for(p=o.length-1;p>=0;p--)f.attributes.push(o[p]),je.debug("Added attribute ",o[p].attributeName)},getEntities:()=>JN,addRelationship:function(s,o,f,p){let w={entityA:s,roleA:o,entityB:f,relSpec:p};zde.push(w),je.debug("Added new relationship :",w)},getRelationships:()=>zde,clear:function(){JN={},zde=[],tp()},setAccTitle:np,getAccTitle:C2,setAccDescription:S2,getAccDescription:A2,setDiagramTitle:Kw,getDiagramTitle:Ww},k5={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},x5={ERMarkers:k5,insertMarkers:function(s,o){let f;s.append("defs").append("marker").attr("id",k5.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",o.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),s.append("defs").append("marker").attr("id",k5.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",o.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),f=s.append("defs").append("marker").attr("id",k5.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),f.append("circle").attr("stroke",o.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),f.append("path").attr("stroke",o.stroke).attr("fill","none").attr("d","M9,0 L9,18"),f=s.append("defs").append("marker").attr("id",k5.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),f.append("circle").attr("stroke",o.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),f.append("path").attr("stroke",o.stroke).attr("fill","none").attr("d","M21,0 L21,18"),s.append("defs").append("marker").attr("id",k5.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",o.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),s.append("defs").append("marker").attr("id",k5.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",o.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),f=s.append("defs").append("marker").attr("id",k5.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),f.append("circle").attr("stroke",o.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),f.append("path").attr("stroke",o.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),f=s.append("defs").append("marker").attr("id",k5.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),f.append("circle").attr("stroke",o.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),f.append("path").attr("stroke",o.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}},aBt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function oBt(s){return typeof s=="string"&&aBt.test(s)}const Fd=[];for(let s=0;s<256;++s)Fd.push((s+256).toString(16).slice(1));function cBt(s,o=0){return(Fd[s[o+0]]+Fd[s[o+1]]+Fd[s[o+2]]+Fd[s[o+3]]+"-"+Fd[s[o+4]]+Fd[s[o+5]]+"-"+Fd[s[o+6]]+Fd[s[o+7]]+"-"+Fd[s[o+8]]+Fd[s[o+9]]+"-"+Fd[s[o+10]]+Fd[s[o+11]]+Fd[s[o+12]]+Fd[s[o+13]]+Fd[s[o+14]]+Fd[s[o+15]]).toLowerCase()}function uBt(s){if(!oBt(s))throw TypeError("Invalid UUID");let o;const f=new Uint8Array(16);return f[0]=(o=parseInt(s.slice(0,8),16))>>>24,f[1]=o>>>16&255,f[2]=o>>>8&255,f[3]=o&255,f[4]=(o=parseInt(s.slice(9,13),16))>>>8,f[5]=o&255,f[6]=(o=parseInt(s.slice(14,18),16))>>>8,f[7]=o&255,f[8]=(o=parseInt(s.slice(19,23),16))>>>8,f[9]=o&255,f[10]=(o=parseInt(s.slice(24,36),16))/1099511627776&255,f[11]=o/4294967296&255,f[12]=o>>>24&255,f[13]=o>>>16&255,f[14]=o>>>8&255,f[15]=o&255,f}function lBt(s){s=unescape(encodeURIComponent(s));const o=[];for(let f=0;f>>32-o}function pBt(s){const o=[1518500249,1859775393,2400959708,3395469782],f=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof s=="string"){const b=unescape(encodeURIComponent(s));s=[];for(let _=0;_>>0;H=F,F=B,B=Gde(N,30)>>>0,N=A,A=Z}f[0]=f[0]+A>>>0,f[1]=f[1]+N>>>0,f[2]=f[2]+B>>>0,f[3]=f[3]+F>>>0,f[4]=f[4]+H>>>0}return[f[0]>>24&255,f[0]>>16&255,f[0]>>8&255,f[0]&255,f[1]>>24&255,f[1]>>16&255,f[1]>>8&255,f[1]&255,f[2]>>24&255,f[2]>>16&255,f[2]>>8&255,f[2]&255,f[3]>>24&255,f[3]>>16&255,f[3]>>8&255,f[3]&255,f[4]>>24&255,f[4]>>16&255,f[4]>>8&255,f[4]&255]}const bBt=dBt("v5",80,pBt),vBt=/[^\dA-Za-z](\W)*/g;let d1={},eP=new Map;const wBt=function(s){const o=Object.keys(s);for(const f of o)d1[f]=s[f]},mBt=(s,o,f)=>{const p=d1.entityPadding/3,w=d1.entityPadding/3,k=d1.fontSize*.85,b=o.node().getBBox(),_=[];let A=!1,N=!1,B=0,F=0,H=0,j=0,V=b.height+p*2,Z=1;f.forEach(be=>{be.attributeKeyTypeList!==void 0&&be.attributeKeyTypeList.length>0&&(A=!0),be.attributeComment!==void 0&&(N=!0)}),f.forEach(be=>{const xe=`${o.node().id}-attr-${Z}`;let Ee=0;const Me=Uk(be.attributeType),fe=s.append("text").classed("er entityLabel",!0).attr("id",`${xe}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Pt().fontFamily).style("font-size",k+"px").text(Me),ye=s.append("text").classed("er entityLabel",!0).attr("id",`${xe}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Pt().fontFamily).style("font-size",k+"px").text(be.attributeName),re={};re.tn=fe,re.nn=ye;const we=fe.node().getBBox(),ke=ye.node().getBBox();if(B=Math.max(B,we.width),F=Math.max(F,ke.width),Ee=Math.max(we.height,ke.height),A){const he=be.attributeKeyTypeList!==void 0?be.attributeKeyTypeList.join(","):"",De=s.append("text").classed("er entityLabel",!0).attr("id",`${xe}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Pt().fontFamily).style("font-size",k+"px").text(he);re.kn=De;const X=De.node().getBBox();H=Math.max(H,X.width),Ee=Math.max(Ee,X.height)}if(N){const he=s.append("text").classed("er entityLabel",!0).attr("id",`${xe}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Pt().fontFamily).style("font-size",k+"px").text(be.attributeComment||"");re.cn=he;const De=he.node().getBBox();j=Math.max(j,De.width),Ee=Math.max(Ee,De.height)}re.height=Ee,_.push(re),V+=Ee+p*2,Z+=1});let ae=4;A&&(ae+=2),N&&(ae+=2);const le=B+F+H+j,ce={width:Math.max(d1.minEntityWidth,Math.max(b.width+d1.entityPadding*2,le+w*ae)),height:f.length>0?V:Math.max(d1.minEntityHeight,b.height+d1.entityPadding*2)};if(f.length>0){const be=Math.max(0,(ce.width-le-w*ae)/(ae/2));o.attr("transform","translate("+ce.width/2+","+(p+b.height/2)+")");let xe=b.height+p*2,Ee="attributeBoxOdd";_.forEach(Me=>{const fe=xe+p+Me.height/2;Me.tn.attr("transform","translate("+w+","+fe+")");const ye=s.insert("rect","#"+Me.tn.node().id).classed(`er ${Ee}`,!0).attr("x",0).attr("y",xe).attr("width",B+w*2+be).attr("height",Me.height+p*2),re=parseFloat(ye.attr("x"))+parseFloat(ye.attr("width"));Me.nn.attr("transform","translate("+(re+w)+","+fe+")");const we=s.insert("rect","#"+Me.nn.node().id).classed(`er ${Ee}`,!0).attr("x",re).attr("y",xe).attr("width",F+w*2+be).attr("height",Me.height+p*2);let ke=parseFloat(we.attr("x"))+parseFloat(we.attr("width"));if(A){Me.kn.attr("transform","translate("+(ke+w)+","+fe+")");const he=s.insert("rect","#"+Me.kn.node().id).classed(`er ${Ee}`,!0).attr("x",ke).attr("y",xe).attr("width",H+w*2+be).attr("height",Me.height+p*2);ke=parseFloat(he.attr("x"))+parseFloat(he.attr("width"))}N&&(Me.cn.attr("transform","translate("+(ke+w)+","+fe+")"),s.insert("rect","#"+Me.cn.node().id).classed(`er ${Ee}`,"true").attr("x",ke).attr("y",xe).attr("width",j+w*2+be).attr("height",Me.height+p*2)),xe+=Me.height+p*2,Ee=Ee==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else ce.height=Math.max(d1.minEntityHeight,V),o.attr("transform","translate("+ce.width/2+","+ce.height/2+")");return ce},yBt=function(s,o,f){const p=Object.keys(o);let w;return p.forEach(function(k){const b=CBt(k,"entity");eP.set(k,b);const _=s.append("g").attr("id",b);w=w===void 0?b:w;const A="text-"+b,N=_.append("text").classed("er entityLabel",!0).attr("id",A).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",Pt().fontFamily).style("font-size",d1.fontSize+"px").text(k),{width:B,height:F}=mBt(_,N,o[k].attributes),j=_.insert("rect","#"+A).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",B).attr("height",F).node().getBBox();f.setNode(b,{width:j.width,height:j.height,shape:"rect",id:b})}),w},kBt=function(s,o){o.nodes().forEach(function(f){f!==void 0&&o.node(f)!==void 0&&s.select("#"+f).attr("transform","translate("+(o.node(f).x-o.node(f).width/2)+","+(o.node(f).y-o.node(f).height/2)+" )")})},ZNe=function(s){return(s.entityA+s.roleA+s.entityB).replace(/\s/g,"")},xBt=function(s,o){return s.forEach(function(f){o.setEdge(eP.get(f.entityA),eP.get(f.entityB),{relationship:f},ZNe(f))}),s};let JNe=0;const EBt=function(s,o,f,p,w){JNe++;const k=f.edge(eP.get(o.entityA),eP.get(o.entityB),ZNe(o)),b=RE().x(function(V){return V.x}).y(function(V){return V.y}).curve(pA),_=s.insert("path","#"+p).classed("er relationshipLine",!0).attr("d",b(k.points)).style("stroke",d1.stroke).style("fill","none");o.relSpec.relType===w.db.Identification.NON_IDENTIFYING&&_.attr("stroke-dasharray","8,8");let A="";switch(d1.arrowMarkerAbsolute&&(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,A=A.replace(/\(/g,"\\("),A=A.replace(/\)/g,"\\)")),o.relSpec.cardA){case w.db.Cardinality.ZERO_OR_ONE:_.attr("marker-end","url("+A+"#"+x5.ERMarkers.ZERO_OR_ONE_END+")");break;case w.db.Cardinality.ZERO_OR_MORE:_.attr("marker-end","url("+A+"#"+x5.ERMarkers.ZERO_OR_MORE_END+")");break;case w.db.Cardinality.ONE_OR_MORE:_.attr("marker-end","url("+A+"#"+x5.ERMarkers.ONE_OR_MORE_END+")");break;case w.db.Cardinality.ONLY_ONE:_.attr("marker-end","url("+A+"#"+x5.ERMarkers.ONLY_ONE_END+")");break}switch(o.relSpec.cardB){case w.db.Cardinality.ZERO_OR_ONE:_.attr("marker-start","url("+A+"#"+x5.ERMarkers.ZERO_OR_ONE_START+")");break;case w.db.Cardinality.ZERO_OR_MORE:_.attr("marker-start","url("+A+"#"+x5.ERMarkers.ZERO_OR_MORE_START+")");break;case w.db.Cardinality.ONE_OR_MORE:_.attr("marker-start","url("+A+"#"+x5.ERMarkers.ONE_OR_MORE_START+")");break;case w.db.Cardinality.ONLY_ONE:_.attr("marker-start","url("+A+"#"+x5.ERMarkers.ONLY_ONE_START+")");break}const N=_.node().getTotalLength(),B=_.node().getPointAtLength(N*.5),F="rel"+JNe,j=s.append("text").classed("er relationshipLabel",!0).attr("id",F).attr("x",B.x).attr("y",B.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",Pt().fontFamily).style("font-size",d1.fontSize+"px").text(o.roleA).node().getBBox();s.insert("rect","#"+F).classed("er relationshipLabelBox",!0).attr("x",B.x-j.width/2).attr("y",B.y-j.height/2).attr("width",j.width).attr("height",j.height)},TBt=function(s,o,f,p){d1=Pt().er,je.info("Drawing ER diagram");const w=Pt().securityLevel;let k;w==="sandbox"&&(k=sr("#i"+o));const _=sr(w==="sandbox"?k.nodes()[0].contentDocument.body:"body").select(`[id='${o}']`);x5.insertMarkers(_,d1);let A;A=new Hf({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:d1.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const N=yBt(_,p.db.getEntities(),A),B=xBt(p.db.getRelationships(),A);jA(A),kBt(_,A),B.forEach(function(Z){EBt(_,Z,A,N,p)});const F=d1.diagramPadding;Pa.insertTitle(_,"entityTitleText",d1.titleTopMargin,p.db.getDiagramTitle());const H=_.node().getBBox(),j=H.width+F*2,V=H.height+F*2;Uw(_,V,j,d1.useMaxWidth),_.attr("viewBox",`${H.x-F} ${H.y-F} ${j} ${V}`)},_Bt="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function CBt(s="",o=""){const f=s.replace(vBt,"");return`${ePe(o)}${ePe(f)}${bBt(s,_Bt)}`}function ePe(s=""){return s.length>0?`${s}-`:""}const SBt={setConf:wBt,draw:TBt};var qde=function(){var s=function(Rd,cs,Es,Ya){for(Es=Es||{},Ya=Rd.length;Ya--;Es[Rd[Ya]]=cs);return Es},o=[1,9],f=[1,7],p=[1,6],w=[1,8],k=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],b=[2,10],_=[1,20],A=[1,21],N=[1,22],B=[1,23],F=[1,30],H=[1,32],j=[1,33],V=[1,34],Z=[1,62],ae=[1,48],le=[1,52],ce=[1,36],be=[1,37],xe=[1,38],Ee=[1,39],Me=[1,40],fe=[1,56],ye=[1,63],re=[1,51],we=[1,53],ke=[1,55],he=[1,59],De=[1,60],X=[1,41],Re=[1,42],pe=[1,43],Ge=[1,44],de=[1,61],ct=[1,50],bt=[1,54],St=[1,57],yt=[1,58],Mt=[1,49],nn=[1,66],dn=[1,71],vt=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Lr=[1,75],xt=[1,74],Tt=[1,76],wt=[20,21,23,81,82],At=[1,99],He=[1,104],Ze=[1,107],Lt=[1,108],Ve=[1,101],Mn=[1,106],Oe=[1,109],Di=[1,102],rn=[1,114],pi=[1,113],Fr=[1,103],tr=[1,105],Wn=[1,110],er=[1,111],Fn=[1,112],nr=[1,115],ha=[20,21,22,23,81,82],fa=[20,21,22,23,53,81,82],is=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Xi=[20,21,23],da=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Cc=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],na=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Ji=[1,149],Fi=[1,157],vr=[1,158],wr=[1,159],ni=[1,160],Yn=[1,144],Gi=[1,145],un=[1,141],Ks=[1,152],Hn=[1,153],Ms=[1,154],Ea=[1,155],Va=[1,156],Ba=[1,161],Ta=[1,162],ss=[1,147],Zs=[1,150],Fa=[1,146],$s=[1,143],ap=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Xb=[1,165],bu=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],ra=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Ju=[12,21,22,24],lf=[22,106],el=[1,250],Rl=[1,245],vu=[1,246],Mh=[1,254],ah=[1,251],Ai=[1,248],$t=[1,247],Mr=[1,249],bi=[1,252],Aa=[1,253],Nc=[1,255],$c=[1,273],wu=[20,21,23,106],oh=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],tl={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(cs,Es,Ya,Ei,uc,Ot,im){var Kt=Ot.length-1;switch(uc){case 5:Ei.parseDirective("%%{","open_directive");break;case 6:Ei.parseDirective(Ot[Kt],"type_directive");break;case 7:Ot[Kt]=Ot[Kt].trim().replace(/'/g,'"'),Ei.parseDirective(Ot[Kt],"arg_directive");break;case 8:Ei.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(Ot[Kt])||Ot[Kt].length>0)&&Ot[Kt-1].push(Ot[Kt]),this.$=Ot[Kt-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=Ot[Kt];break;case 19:Ei.setDirection("TB"),this.$="TB";break;case 20:Ei.setDirection(Ot[Kt-1]),this.$=Ot[Kt-1];break;case 35:this.$=Ot[Kt-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Ei.addSubGraph(Ot[Kt-6],Ot[Kt-1],Ot[Kt-4]);break;case 42:this.$=Ei.addSubGraph(Ot[Kt-3],Ot[Kt-1],Ot[Kt-3]);break;case 43:this.$=Ei.addSubGraph(void 0,Ot[Kt-1],void 0);break;case 45:this.$=Ot[Kt].trim(),Ei.setAccTitle(this.$);break;case 46:case 47:this.$=Ot[Kt].trim(),Ei.setAccDescription(this.$);break;case 51:Ei.addLink(Ot[Kt-2].stmt,Ot[Kt],Ot[Kt-1]),this.$={stmt:Ot[Kt],nodes:Ot[Kt].concat(Ot[Kt-2].nodes)};break;case 52:Ei.addLink(Ot[Kt-3].stmt,Ot[Kt-1],Ot[Kt-2]),this.$={stmt:Ot[Kt-1],nodes:Ot[Kt-1].concat(Ot[Kt-3].nodes)};break;case 53:this.$={stmt:Ot[Kt-1],nodes:Ot[Kt-1]};break;case 54:this.$={stmt:Ot[Kt],nodes:Ot[Kt]};break;case 55:this.$=[Ot[Kt]];break;case 56:this.$=Ot[Kt-4].concat(Ot[Kt]);break;case 57:this.$=[Ot[Kt-2]],Ei.setClass(Ot[Kt-2],Ot[Kt]);break;case 58:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"square");break;case 59:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"doublecircle");break;case 60:this.$=Ot[Kt-5],Ei.addVertex(Ot[Kt-5],Ot[Kt-2],"circle");break;case 61:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"ellipse");break;case 62:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"stadium");break;case 63:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"subroutine");break;case 64:this.$=Ot[Kt-7],Ei.addVertex(Ot[Kt-7],Ot[Kt-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Ot[Kt-5],Ot[Kt-3]]]));break;case 65:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"cylinder");break;case 66:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"round");break;case 67:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"diamond");break;case 68:this.$=Ot[Kt-5],Ei.addVertex(Ot[Kt-5],Ot[Kt-2],"hexagon");break;case 69:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"odd");break;case 70:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"trapezoid");break;case 71:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"inv_trapezoid");break;case 72:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"lean_right");break;case 73:this.$=Ot[Kt-3],Ei.addVertex(Ot[Kt-3],Ot[Kt-1],"lean_left");break;case 74:this.$=Ot[Kt],Ei.addVertex(Ot[Kt]);break;case 75:Ot[Kt-1].text=Ot[Kt],this.$=Ot[Kt-1];break;case 76:case 77:Ot[Kt-2].text=Ot[Kt-1],this.$=Ot[Kt-2];break;case 78:this.$=Ot[Kt];break;case 79:var id=Ei.destructLink(Ot[Kt],Ot[Kt-2]);this.$={type:id.type,stroke:id.stroke,length:id.length,text:Ot[Kt-1]};break;case 80:var id=Ei.destructLink(Ot[Kt]);this.$={type:id.type,stroke:id.stroke,length:id.length};break;case 81:this.$=Ot[Kt-1];break;case 83:case 97:case 153:this.$=Ot[Kt-1]+""+Ot[Kt];break;case 98:case 99:this.$=Ot[Kt-4],Ei.addClass(Ot[Kt-2],Ot[Kt]);break;case 100:this.$=Ot[Kt-4],Ei.setClass(Ot[Kt-2],Ot[Kt]);break;case 101:case 109:this.$=Ot[Kt-1],Ei.setClickEvent(Ot[Kt-1],Ot[Kt]);break;case 102:case 110:this.$=Ot[Kt-3],Ei.setClickEvent(Ot[Kt-3],Ot[Kt-2]),Ei.setTooltip(Ot[Kt-3],Ot[Kt]);break;case 103:this.$=Ot[Kt-2],Ei.setClickEvent(Ot[Kt-2],Ot[Kt-1],Ot[Kt]);break;case 104:this.$=Ot[Kt-4],Ei.setClickEvent(Ot[Kt-4],Ot[Kt-3],Ot[Kt-2]),Ei.setTooltip(Ot[Kt-4],Ot[Kt]);break;case 105:case 111:this.$=Ot[Kt-1],Ei.setLink(Ot[Kt-1],Ot[Kt]);break;case 106:case 112:this.$=Ot[Kt-3],Ei.setLink(Ot[Kt-3],Ot[Kt-2]),Ei.setTooltip(Ot[Kt-3],Ot[Kt]);break;case 107:case 113:this.$=Ot[Kt-3],Ei.setLink(Ot[Kt-3],Ot[Kt-2],Ot[Kt]);break;case 108:case 114:this.$=Ot[Kt-5],Ei.setLink(Ot[Kt-5],Ot[Kt-4],Ot[Kt]),Ei.setTooltip(Ot[Kt-5],Ot[Kt-2]);break;case 115:this.$=Ot[Kt-4],Ei.addVertex(Ot[Kt-2],void 0,void 0,Ot[Kt]);break;case 116:case 118:this.$=Ot[Kt-4],Ei.updateLink(Ot[Kt-2],Ot[Kt]);break;case 117:this.$=Ot[Kt-4],Ei.updateLink([Ot[Kt-2]],Ot[Kt]);break;case 119:this.$=Ot[Kt-8],Ei.updateLinkInterpolate([Ot[Kt-6]],Ot[Kt-2]),Ei.updateLink([Ot[Kt-6]],Ot[Kt]);break;case 120:this.$=Ot[Kt-8],Ei.updateLinkInterpolate(Ot[Kt-6],Ot[Kt-2]),Ei.updateLink(Ot[Kt-6],Ot[Kt]);break;case 121:this.$=Ot[Kt-6],Ei.updateLinkInterpolate([Ot[Kt-4]],Ot[Kt]);break;case 122:this.$=Ot[Kt-6],Ei.updateLinkInterpolate(Ot[Kt-4],Ot[Kt]);break;case 123:case 125:this.$=[Ot[Kt]];break;case 124:case 126:Ot[Kt-2].push(Ot[Kt]),this.$=Ot[Kt-2];break;case 128:this.$=Ot[Kt-1]+Ot[Kt];break;case 150:this.$=Ot[Kt];break;case 151:this.$=Ot[Kt-1]+""+Ot[Kt];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:o,16:4,21:f,22:p,24:w},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:o,16:4,21:f,22:p,24:w},s(k,b,{17:11}),{7:12,13:[1,13]},{16:14,21:f,22:p,24:w},{16:15,21:f,22:p,24:w},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:_,21:A,22:N,23:B,32:24,33:25,34:26,35:27,36:28,37:29,38:F,43:31,44:H,46:j,48:V,50:35,51:45,52:Z,54:46,66:ae,67:le,86:ce,87:be,88:xe,89:Ee,90:Me,91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,116:47,118:X,119:Re,120:pe,121:Ge,122:de,123:ct,124:bt,125:St,126:yt,127:Mt},{8:64,10:[1,65],15:nn},s([10,15],[2,6]),s(k,[2,17]),s(k,[2,18]),s(k,[2,19]),{20:[1,68],21:[1,69],22:dn,27:67,30:70},s(vt,[2,11]),s(vt,[2,12]),s(vt,[2,13]),s(vt,[2,14]),s(vt,[2,15]),s(vt,[2,16]),{9:72,20:Lr,21:xt,23:Tt,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Lr,21:xt,23:Tt},{9:81,20:Lr,21:xt,23:Tt},{9:82,20:Lr,21:xt,23:Tt},{9:83,20:Lr,21:xt,23:Tt},{9:84,20:Lr,21:xt,23:Tt},{9:86,20:Lr,21:xt,22:[1,85],23:Tt},s(vt,[2,44]),{45:[1,87]},{47:[1,88]},s(vt,[2,47]),s(wt,[2,54],{30:89,22:dn}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:At,52:He,66:Ze,67:Lt,84:[1,97],91:Ve,97:96,98:[1,94],100:[1,95],105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:98,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(vt,[2,158]),s(vt,[2,159]),s(vt,[2,160]),s(vt,[2,161]),s(ha,[2,55],{53:[1,116]}),s(fa,[2,74],{116:129,40:[1,117],52:Z,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:ae,67:le,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,122:de,123:ct,124:bt,125:St,126:yt,127:Mt}),s(is,[2,150]),s(is,[2,175]),s(is,[2,176]),s(is,[2,177]),s(is,[2,178]),s(is,[2,179]),s(is,[2,180]),s(is,[2,181]),s(is,[2,182]),s(is,[2,183]),s(is,[2,184]),s(is,[2,185]),s(is,[2,186]),s(is,[2,187]),s(is,[2,188]),s(is,[2,189]),s(is,[2,190]),{9:130,20:Lr,21:xt,23:Tt},{11:131,14:[1,132]},s(Xi,[2,8]),s(k,[2,20]),s(k,[2,26]),s(k,[2,27]),{21:[1,133]},s(da,[2,34],{30:134,22:dn}),s(vt,[2,35]),{50:135,51:45,52:Z,54:46,66:ae,67:le,91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,116:47,122:de,123:ct,124:bt,125:St,126:yt,127:Mt},s(Cc,[2,48]),s(Cc,[2,49]),s(Cc,[2,50]),s(na,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Ji,24:Fi,26:vr,38:wr,39:139,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),s(vt,[2,36]),s(vt,[2,37]),s(vt,[2,38]),s(vt,[2,39]),s(vt,[2,40]),{22:Ji,24:Fi,26:vr,38:wr,39:163,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(ap,b,{17:164}),s(vt,[2,45]),s(vt,[2,46]),s(wt,[2,53],{52:Xb}),{26:At,52:He,66:Ze,67:Lt,91:Ve,97:166,102:[1,167],105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:98,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{95:[1,168],103:169,105:[1,170]},{26:At,52:He,66:Ze,67:Lt,91:Ve,95:[1,171],97:172,105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:98,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{26:At,52:He,66:Ze,67:Lt,91:Ve,97:173,105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:98,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(Xi,[2,101],{22:[1,174],99:[1,175]}),s(Xi,[2,105],{22:[1,176]}),s(Xi,[2,109],{115:100,117:178,22:[1,177],26:At,52:He,66:Ze,67:Lt,91:Ve,105:Mn,106:Oe,109:Di,111:rn,112:pi,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr}),s(Xi,[2,111],{22:[1,179]}),s(bu,[2,152]),s(bu,[2,154]),s(bu,[2,155]),s(bu,[2,156]),s(bu,[2,157]),s(ra,[2,162]),s(ra,[2,163]),s(ra,[2,164]),s(ra,[2,165]),s(ra,[2,166]),s(ra,[2,167]),s(ra,[2,168]),s(ra,[2,169]),s(ra,[2,170]),s(ra,[2,171]),s(ra,[2,172]),s(ra,[2,173]),s(ra,[2,174]),{52:Z,54:180,66:ae,67:le,91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,116:47,122:de,123:ct,124:bt,125:St,126:yt,127:Mt},{22:Ji,24:Fi,26:vr,38:wr,39:181,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:182,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:184,42:ni,52:He,57:[1,183],66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:185,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:186,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:187,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{66:[1,188]},{22:Ji,24:Fi,26:vr,38:wr,39:189,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:190,42:ni,52:He,66:Ze,67:Lt,71:[1,191],73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:192,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:193,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:194,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(is,[2,151]),s(Ju,[2,3]),{8:195,15:nn},{15:[2,7]},s(k,[2,28]),s(da,[2,33]),s(wt,[2,51],{30:196,22:dn}),s(na,[2,75],{22:[1,197]}),{22:[1,198]},{22:Ji,24:Fi,26:vr,38:wr,39:199,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,82:[1,200],83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(ra,[2,82]),s(ra,[2,84]),s(ra,[2,140]),s(ra,[2,141]),s(ra,[2,142]),s(ra,[2,143]),s(ra,[2,144]),s(ra,[2,145]),s(ra,[2,146]),s(ra,[2,147]),s(ra,[2,148]),s(ra,[2,149]),s(ra,[2,85]),s(ra,[2,86]),s(ra,[2,87]),s(ra,[2,88]),s(ra,[2,89]),s(ra,[2,90]),s(ra,[2,91]),s(ra,[2,92]),s(ra,[2,93]),s(ra,[2,94]),s(ra,[2,95]),{9:203,20:Lr,21:xt,22:Ji,23:Tt,24:Fi,26:vr,38:wr,40:[1,202],42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{18:18,19:19,20:_,21:A,22:N,23:B,32:24,33:25,34:26,35:27,36:28,37:29,38:F,42:[1,204],43:31,44:H,46:j,48:V,50:35,51:45,52:Z,54:46,66:ae,67:le,86:ce,87:be,88:xe,89:Ee,90:Me,91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,116:47,118:X,119:Re,120:pe,121:Ge,122:de,123:ct,124:bt,125:St,126:yt,127:Mt},{22:dn,30:205},{22:[1,206],26:At,52:He,66:Ze,67:Lt,91:Ve,105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:178,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},s(lf,[2,123]),{22:[1,211]},{22:[1,212],26:At,52:He,66:Ze,67:Lt,91:Ve,105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:178,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:[1,213],26:At,52:He,66:Ze,67:Lt,91:Ve,105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:178,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{84:[1,214]},s(Xi,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},s(bu,[2,153]),{84:[1,219],101:[1,220]},s(ha,[2,57],{116:129,52:Z,66:ae,67:le,91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,122:de,123:ct,124:bt,125:St,126:yt,127:Mt}),{22:Ji,24:Fi,26:vr,38:wr,41:[1,221],42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,56:[1,222],66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:223,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,58:[1,224],66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,60:[1,225],66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,62:[1,226],66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,64:[1,227],66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{67:[1,228]},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,66:Ze,67:Lt,70:[1,229],73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,66:Ze,67:Lt,72:[1,230],73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,39:231,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,41:[1,232],42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,66:Ze,67:Lt,73:Yn,75:[1,233],77:[1,234],81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,66:Ze,67:Lt,73:Yn,75:[1,236],77:[1,235],81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{9:237,20:Lr,21:xt,23:Tt},s(wt,[2,52],{52:Xb}),s(na,[2,77]),s(na,[2,76]),{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,66:Ze,67:Lt,68:[1,238],73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(na,[2,79]),s(ra,[2,83]),{22:Ji,24:Fi,26:vr,38:wr,39:239,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(ap,b,{17:240}),s(vt,[2,43]),{51:241,52:Z,54:46,66:ae,67:le,91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,116:47,122:de,123:ct,124:bt,125:St,126:yt,127:Mt},{22:el,66:Rl,67:vu,86:Mh,96:242,102:ah,105:Ai,107:243,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},{22:el,66:Rl,67:vu,86:Mh,96:256,102:ah,105:Ai,107:243,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},{22:el,66:Rl,67:vu,86:Mh,96:257,102:ah,104:[1,258],105:Ai,107:243,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},{22:el,66:Rl,67:vu,86:Mh,96:259,102:ah,104:[1,260],105:Ai,107:243,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},{105:[1,261]},{22:el,66:Rl,67:vu,86:Mh,96:262,102:ah,105:Ai,107:243,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},{22:el,66:Rl,67:vu,86:Mh,96:263,102:ah,105:Ai,107:243,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},{26:At,52:He,66:Ze,67:Lt,91:Ve,97:264,105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:98,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(Xi,[2,102]),{84:[1,265]},s(Xi,[2,106],{22:[1,266]}),s(Xi,[2,107]),s(Xi,[2,110]),s(Xi,[2,112],{22:[1,267]}),s(Xi,[2,113]),s(fa,[2,58]),s(fa,[2,59]),{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,58:[1,268],66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(fa,[2,66]),s(fa,[2,61]),s(fa,[2,62]),s(fa,[2,63]),{66:[1,269]},s(fa,[2,65]),s(fa,[2,67]),{22:Ji,24:Fi,26:vr,38:wr,42:ni,52:He,66:Ze,67:Lt,72:[1,270],73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(fa,[2,69]),s(fa,[2,70]),s(fa,[2,72]),s(fa,[2,71]),s(fa,[2,73]),s(Ju,[2,4]),s([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Ji,24:Fi,26:vr,38:wr,41:[1,271],42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{18:18,19:19,20:_,21:A,22:N,23:B,32:24,33:25,34:26,35:27,36:28,37:29,38:F,42:[1,272],43:31,44:H,46:j,48:V,50:35,51:45,52:Z,54:46,66:ae,67:le,86:ce,87:be,88:xe,89:Ee,90:Me,91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,116:47,118:X,119:Re,120:pe,121:Ge,122:de,123:ct,124:bt,125:St,126:yt,127:Mt},s(ha,[2,56]),s(Xi,[2,115],{106:$c}),s(wu,[2,125],{108:274,22:el,66:Rl,67:vu,86:Mh,102:ah,105:Ai,109:$t,110:Mr,111:bi,112:Aa,113:Nc}),s(oh,[2,127]),s(oh,[2,129]),s(oh,[2,130]),s(oh,[2,131]),s(oh,[2,132]),s(oh,[2,133]),s(oh,[2,134]),s(oh,[2,135]),s(oh,[2,136]),s(oh,[2,137]),s(oh,[2,138]),s(oh,[2,139]),s(Xi,[2,116],{106:$c}),s(Xi,[2,117],{106:$c}),{22:[1,275]},s(Xi,[2,118],{106:$c}),{22:[1,276]},s(lf,[2,124]),s(Xi,[2,98],{106:$c}),s(Xi,[2,99],{106:$c}),s(Xi,[2,100],{115:100,117:178,26:At,52:He,66:Ze,67:Lt,91:Ve,105:Mn,106:Oe,109:Di,111:rn,112:pi,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr}),s(Xi,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Lr,21:xt,23:Tt},s(vt,[2,42]),{22:el,66:Rl,67:vu,86:Mh,102:ah,105:Ai,107:283,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},s(oh,[2,128]),{26:At,52:He,66:Ze,67:Lt,91:Ve,97:284,105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:98,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{26:At,52:He,66:Ze,67:Lt,91:Ve,97:285,105:Mn,106:Oe,109:Di,111:rn,112:pi,115:100,117:98,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(Xi,[2,108]),s(Xi,[2,114]),s(fa,[2,60]),{22:Ji,24:Fi,26:vr,38:wr,39:286,42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:140,84:un,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},s(fa,[2,68]),s(ap,b,{17:287}),s(wu,[2,126],{108:274,22:el,66:Rl,67:vu,86:Mh,102:ah,105:Ai,109:$t,110:Mr,111:bi,112:Aa,113:Nc}),s(Xi,[2,121],{115:100,117:178,22:[1,288],26:At,52:He,66:Ze,67:Lt,91:Ve,105:Mn,106:Oe,109:Di,111:rn,112:pi,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr}),s(Xi,[2,122],{115:100,117:178,22:[1,289],26:At,52:He,66:Ze,67:Lt,91:Ve,105:Mn,106:Oe,109:Di,111:rn,112:pi,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr}),{22:Ji,24:Fi,26:vr,38:wr,41:[1,290],42:ni,52:He,66:Ze,67:Lt,73:Yn,81:Gi,83:201,85:151,86:Ks,87:Hn,88:Ms,89:Ea,90:Va,91:Ba,92:Ta,94:142,95:ss,105:Mn,106:Oe,109:Zs,111:rn,112:pi,113:Fa,114:$s,115:148,122:Fr,123:tr,124:Wn,125:er,126:Fn,127:nr},{18:18,19:19,20:_,21:A,22:N,23:B,32:24,33:25,34:26,35:27,36:28,37:29,38:F,42:[1,291],43:31,44:H,46:j,48:V,50:35,51:45,52:Z,54:46,66:ae,67:le,86:ce,87:be,88:xe,89:Ee,90:Me,91:fe,95:ye,105:re,106:we,109:ke,111:he,112:De,116:47,118:X,119:Re,120:pe,121:Ge,122:de,123:ct,124:bt,125:St,126:yt,127:Mt},{22:el,66:Rl,67:vu,86:Mh,96:292,102:ah,105:Ai,107:243,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},{22:el,66:Rl,67:vu,86:Mh,96:293,102:ah,105:Ai,107:243,108:244,109:$t,110:Mr,111:bi,112:Aa,113:Nc},s(fa,[2,64]),s(vt,[2,41]),s(Xi,[2,119],{106:$c}),s(Xi,[2,120],{106:$c})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(cs,Es){if(Es.recoverable)this.trace(cs);else{var Ya=new Error(cs);throw Ya.hash=Es,Ya}},parse:function(cs){var Es=this,Ya=[0],Ei=[],uc=[null],Ot=[],im=this.table,Kt="",id=0,sm=0,f3=2,s8=1,I2=Ot.slice.call(arguments,1),fl=Object.create(this.lexer),Zb={yy:{}};for(var op in this.yy)Object.prototype.hasOwnProperty.call(this.yy,op)&&(Zb.yy[op]=this.yy[op]);fl.setInput(cs,Zb.yy),Zb.yy.lexer=fl,Zb.yy.parser=this,typeof fl.yylloc>"u"&&(fl.yylloc={});var I5=fl.yylloc;Ot.push(I5);var f9=fl.options&&fl.options.ranges;typeof Zb.yy.parseError=="function"?this.parseError=Zb.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d9(){var up;return up=Ei.pop()||fl.lex()||s8,typeof up!="number"&&(up instanceof Array&&(Ei=up,up=Ei.pop()),up=Es.symbols_[up]||up),up}for(var p1,Jb,b1,O5,cp={},d3,x0,Fu,g3;;){if(Jb=Ya[Ya.length-1],this.defaultActions[Jb]?b1=this.defaultActions[Jb]:((p1===null||typeof p1>"u")&&(p1=d9()),b1=im[Jb]&&im[Jb][p1]),typeof b1>"u"||!b1.length||!b1[0]){var Jo="";g3=[];for(d3 in im[Jb])this.terminals_[d3]&&d3>f3&&g3.push("'"+this.terminals_[d3]+"'");fl.showPosition?Jo="Parse error on line "+(id+1)+`:
+`+fl.showPosition()+`
+Expecting `+g3.join(", ")+", got '"+(this.terminals_[p1]||p1)+"'":Jo="Parse error on line "+(id+1)+": Unexpected "+(p1==s8?"end of input":"'"+(this.terminals_[p1]||p1)+"'"),this.parseError(Jo,{text:fl.match,token:this.terminals_[p1]||p1,line:fl.yylineno,loc:I5,expected:g3})}if(b1[0]instanceof Array&&b1.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Jb+", token: "+p1);switch(b1[0]){case 1:Ya.push(p1),uc.push(fl.yytext),Ot.push(fl.yylloc),Ya.push(b1[1]),p1=null,sm=fl.yyleng,Kt=fl.yytext,id=fl.yylineno,I5=fl.yylloc;break;case 2:if(x0=this.productions_[b1[1]][1],cp.$=uc[uc.length-x0],cp._$={first_line:Ot[Ot.length-(x0||1)].first_line,last_line:Ot[Ot.length-1].last_line,first_column:Ot[Ot.length-(x0||1)].first_column,last_column:Ot[Ot.length-1].last_column},f9&&(cp._$.range=[Ot[Ot.length-(x0||1)].range[0],Ot[Ot.length-1].range[1]]),O5=this.performAction.apply(cp,[Kt,sm,id,Zb.yy,b1[1],uc,Ot].concat(I2)),typeof O5<"u")return O5;x0&&(Ya=Ya.slice(0,-1*x0*2),uc=uc.slice(0,-1*x0),Ot=Ot.slice(0,-1*x0)),Ya.push(this.productions_[b1[1]][0]),uc.push(cp.$),Ot.push(cp._$),Fu=im[Ya[Ya.length-2]][Ya[Ya.length-1]],Ya.push(Fu);break;case 3:return!0}}return!0}},Qb=function(){var Rd={EOF:1,parseError:function(Es,Ya){if(this.yy.parser)this.yy.parser.parseError(Es,Ya);else throw new Error(Es)},setInput:function(cs,Es){return this.yy=Es||this.yy||{},this._input=cs,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var cs=this._input[0];this.yytext+=cs,this.yyleng++,this.offset++,this.match+=cs,this.matched+=cs;var Es=cs.match(/(?:\r\n?|\n).*/g);return Es?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),cs},unput:function(cs){var Es=cs.length,Ya=cs.split(/(?:\r\n?|\n)/g);this._input=cs+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Es),this.offset-=Es;var Ei=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),Ya.length-1&&(this.yylineno-=Ya.length-1);var uc=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:Ya?(Ya.length===Ei.length?this.yylloc.first_column:0)+Ei[Ei.length-Ya.length].length-Ya[0].length:this.yylloc.first_column-Es},this.options.ranges&&(this.yylloc.range=[uc[0],uc[0]+this.yyleng-Es]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(cs){this.unput(this.match.slice(cs))},pastInput:function(){var cs=this.matched.substr(0,this.matched.length-this.match.length);return(cs.length>20?"...":"")+cs.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var cs=this.match;return cs.length<20&&(cs+=this._input.substr(0,20-cs.length)),(cs.substr(0,20)+(cs.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var cs=this.pastInput(),Es=new Array(cs.length+1).join("-");return cs+this.upcomingInput()+`
+`+Es+"^"},test_match:function(cs,Es){var Ya,Ei,uc;if(this.options.backtrack_lexer&&(uc={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&&(uc.yylloc.range=this.yylloc.range.slice(0))),Ei=cs[0].match(/(?:\r\n?|\n).*/g),Ei&&(this.yylineno+=Ei.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ei?Ei[Ei.length-1].length-Ei[Ei.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+cs[0].length},this.yytext+=cs[0],this.match+=cs[0],this.matches=cs,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(cs[0].length),this.matched+=cs[0],Ya=this.performAction.call(this,this.yy,this,Es,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ya)return Ya;if(this._backtrack){for(var Ot in uc)this[Ot]=uc[Ot];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var cs,Es,Ya,Ei;this._more||(this.yytext="",this.match="");for(var uc=this._currentRules(),Ot=0;OtEs[0].length)){if(Es=Ya,Ei=Ot,this.options.backtrack_lexer){if(cs=this.test_match(Ya,uc[Ot]),cs!==!1)return cs;if(this._backtrack){Es=!1;continue}else return!1}else if(!this.options.flex)break}return Es?(cs=this.test_match(Es,uc[Ei]),cs!==!1?cs:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Es=this.next();return Es||this.lex()},begin:function(Es){this.conditionStack.push(Es)},popState:function(){var Es=this.conditionStack.length-1;return Es>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Es){return Es=this.conditionStack.length-1-Math.abs(Es||0),Es>=0?this.conditionStack[Es]:"INITIAL"},pushState:function(Es){this.begin(Es)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Es,Ya,Ei,uc){switch(Ei){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return Es.lex.firstGraph()&&this.begin("dir"),24;case 36:return Es.lex.firstGraph()&&this.begin("dir"),24;case 37:return Es.lex.firstGraph()&&this.begin("dir"),24;case 38:return 38;case 39:return 42;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),25;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return this.popState(),26;case 55:return 118;case 56:return 119;case 57:return 120;case 58:return 121;case 59:return 105;case 60:return 111;case 61:return 53;case 62:return 67;case 63:return 52;case 64:return 20;case 65:return 106;case 66:return 126;case 67:return 82;case 68:return 82;case 69:return 82;case 70:return 81;case 71:return 81;case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:return 125;case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[44,45,46,47,48,49,50,51,52,53,54],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,43,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,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}};return Rd}();tl.lexer=Qb;function rm(){this.yy={}}return rm.prototype=tl,tl.Parser=rm,new rm}();qde.parser=qde;const Vde=qde,ABt=(s,o)=>{var f,p;return((f=o==null?void 0:o.flowchart)==null?void 0:f.defaultRenderer)==="dagre-wrapper"||((p=o==null?void 0:o.flowchart)==null?void 0:p.defaultRenderer)==="elk"?!1:s.match(/^\s*graph/)!==null},LBt=(s,o)=>{var f,p;return((f=o==null?void 0:o.flowchart)==null?void 0:f.defaultRenderer)==="dagre-d3"||((p=o==null?void 0:o.flowchart)==null?void 0:p.defaultRenderer)==="elk"?!1:s.match(/^\s*graph/)!==null?!0:s.match(/^\s*flowchart/)!==null},MBt="flowchart-";let tPe=0,Ude=Pt(),Bl={},s9=[],HA={},E5=[],KK={},Kde={},WK=0,Wde=!0,Ub,YK,XK=[];const QK=s=>xa.sanitizeText(s,Ude),nPe=function(s,o,f){Fl.parseDirective(this,s,o,f)},tP=function(s){const o=Object.keys(Bl);for(const f of o)if(Bl[f].id===s)return Bl[f].domId;return s},rPe=function(s,o,f,p,w,k,b={}){let _,A=s;A!==void 0&&A.trim().length!==0&&(Bl[A]===void 0&&(Bl[A]={id:A,domId:MBt+A+"-"+tPe,styles:[],classes:[]}),tPe++,o!==void 0?(Ude=Pt(),_=QK(o.trim()),_[0]==='"'&&_[_.length-1]==='"'&&(_=_.substring(1,_.length-1)),Bl[A].text=_):Bl[A].text===void 0&&(Bl[A].text=s),f!==void 0&&(Bl[A].type=f),p!=null&&p.forEach(function(N){Bl[A].styles.push(N)}),w!=null&&w.forEach(function(N){Bl[A].classes.push(N)}),k!==void 0&&(Bl[A].dir=k),Bl[A].props===void 0?Bl[A].props=b:b!==void 0&&Object.assign(Bl[A].props,b))},iPe=function(s,o,f,p){const b={start:s,end:o,type:void 0,text:""};p=f.text,p!==void 0&&(b.text=QK(p.trim()),b.text[0]==='"'&&b.text[b.text.length-1]==='"'&&(b.text=b.text.substring(1,b.text.length-1))),f!==void 0&&(b.type=f.type,b.stroke=f.stroke,b.length=f.length),s9.push(b)},sPe=function(s,o,f,p){let w,k;for(w=0;w/)&&(Ub="LR"),Ub.match(/.*v/)&&(Ub="TB"),Ub==="TD"&&(Ub="TB")},ZK=function(s,o){s.split(",").forEach(function(f){let p=f;Bl[p]!==void 0&&Bl[p].classes.push(o),KK[p]!==void 0&&KK[p].classes.push(o)})},DBt=function(s,o){s.split(",").forEach(function(f){o!==void 0&&(Kde[YK==="gen-1"?tP(f):f]=QK(o))})},IBt=function(s,o,f){let p=tP(s);if(Pt().securityLevel!=="loose"||o===void 0)return;let w=[];if(typeof f=="string"){w=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k")),w.classed("hover",!0)}).on("mouseout",function(){o.transition().duration(500).style("opacity",0),sr(this).classed("hover",!1)})};XK.push(wPe);const mPe=function(s="gen-1"){Bl={},HA={},s9=[],XK=[wPe],E5=[],KK={},WK=0,Kde=[],Wde=!0,YK=s,tp()},yPe=s=>{YK=s||"gen-2"},kPe=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},xPe=function(s,o,f){let p=s.trim(),w=f;s===f&&f.match(/\s/)&&(p=void 0);function k(B){const F={boolean:{},number:{},string:{}},H=[];let j;return{nodeList:B.filter(function(Z){const ae=typeof Z;return Z.stmt&&Z.stmt==="dir"?(j=Z.value,!1):Z.trim()===""?!1:ae in F?F[ae].hasOwnProperty(Z)?!1:F[ae][Z]=!0:H.includes(Z)?!1:H.push(Z)}),dir:j}}let b=[];const{nodeList:_,dir:A}=k(b.concat.apply(b,o));if(b=_,YK==="gen-1")for(let B=0;B2e3)return;if(EPe[nP]=o,E5[o].id===s)return{result:!0,count:0};let p=0,w=1;for(;p=0){const b=TPe(s,k);if(b.result)return{result:!0,count:w+b.count};w=w+b.count}p=p+1}return{result:!1,count:w}},_Pe=function(s){return EPe[s]},CPe=function(){nP=-1,E5.length>0&&TPe("none",E5.length-1)},SPe=function(){return E5},APe=()=>Wde?(Wde=!1,!0):!1,NBt=s=>{let o=s.trim(),f="arrow_open";switch(o[0]){case"<":f="arrow_point",o=o.slice(1);break;case"x":f="arrow_cross",o=o.slice(1);break;case"o":f="arrow_circle",o=o.slice(1);break}let p="normal";return o.includes("=")&&(p="thick"),o.includes(".")&&(p="dotted"),{type:f,stroke:p}},PBt=(s,o)=>{const f=o.length;let p=0;for(let w=0;w{const o=s.trim();let f=o.slice(0,-1),p="arrow_open";switch(o.slice(-1)){case"x":p="arrow_cross",o[0]==="x"&&(p="double_"+p,f=f.slice(1));break;case">":p="arrow_point",o[0]==="<"&&(p="double_"+p,f=f.slice(1));break;case"o":p="arrow_circle",o[0]==="o"&&(p="double_"+p,f=f.slice(1));break}let w="normal",k=f.length-1;f[0]==="="&&(w="thick");let b=PBt(".",f);return b&&(w="dotted",k=b),{type:p,stroke:w,length:k}},LPe=(s,o)=>{const f=BBt(s);let p;if(o){if(p=NBt(o),p.stroke!==f.stroke)return{type:"INVALID",stroke:"INVALID"};if(p.type==="arrow_open")p.type=f.type;else{if(p.type!==f.type)return{type:"INVALID",stroke:"INVALID"};p.type="double_"+p.type}return p.type==="double_arrow"&&(p.type="double_arrow_point"),p.length=f.length,p}return f},MPe=(s,o)=>{let f=!1;return s.forEach(p=>{p.nodes.indexOf(o)>=0&&(f=!0)}),f},DPe=(s,o)=>{const f=[];return s.nodes.forEach((p,w)=>{MPe(o,p)||f.push(s.nodes[w])}),{nodes:f}},IPe={firstGraph:APe},a3={parseDirective:nPe,defaultConfig:()=>_A.flowchart,setAccTitle:np,getAccTitle:C2,getAccDescription:A2,setAccDescription:S2,addVertex:rPe,lookUpDomId:tP,addLink:sPe,updateLinkInterpolate:aPe,updateLink:oPe,addClass:cPe,setDirection:uPe,setClass:ZK,setTooltip:DBt,getTooltip:hPe,setClickEvent:fPe,setLink:lPe,bindFunctions:dPe,getDirection:gPe,getVertices:pPe,getEdges:bPe,getClasses:vPe,clear:mPe,setGen:yPe,defaultStyle:kPe,addSubGraph:xPe,getDepthFirstPos:_Pe,indexNodes:CPe,getSubGraphs:SPe,destructLink:LPe,lex:IPe,exists:MPe,makeUniq:DPe,setDiagramTitle:Kw,getDiagramTitle:Ww},FBt=Object.freeze(Object.defineProperty({__proto__:null,addClass:cPe,addLink:sPe,addSingleLink:iPe,addSubGraph:xPe,addVertex:rPe,bindFunctions:dPe,clear:mPe,default:a3,defaultStyle:kPe,destructLink:LPe,firstGraph:APe,getClasses:vPe,getDepthFirstPos:_Pe,getDirection:gPe,getEdges:bPe,getSubGraphs:SPe,getTooltip:hPe,getVertices:pPe,indexNodes:CPe,lex:IPe,lookUpDomId:tP,parseDirective:nPe,setClass:ZK,setClickEvent:fPe,setDirection:uPe,setGen:yPe,setLink:lPe,updateLink:oPe,updateLinkInterpolate:aPe},Symbol.toStringTag,{value:"Module"}));function OPe(s,o){return!!s.children(o).length}function NPe(s){return Yde(s.v)+":"+Yde(s.w)+":"+Yde(s.name)}var RBt=/:/g;function Yde(s){return s?String(s).replace(RBt,"\\:"):""}function o3(s,o){o&&s.attr("style",o)}function PPe(s,o,f){o&&s.attr("class",o).attr("class",f+" "+s.attr("class"))}function em(s,o){var f=o.graph();if(fOe(f)){var p=f.transition;if(yA(p))return p(s)}return s}var Xde={normal:$Bt,vee:HBt,undirected:zBt};function jBt(s){Xde=s}function $Bt(s,o,f,p){var w=s.append("marker").attr("id",o).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),k=w.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");o3(k,f[p+"Style"]),f[p+"Class"]&&k.attr("class",f[p+"Class"])}function HBt(s,o,f,p){var w=s.append("marker").attr("id",o).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),k=w.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");o3(k,f[p+"Style"]),f[p+"Class"]&&k.attr("class",f[p+"Class"])}function zBt(s,o,f,p){var w=s.append("marker").attr("id",o).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),k=w.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");o3(k,f[p+"Style"]),f[p+"Class"]&&k.attr("class",f[p+"Class"])}function JK(s,o){var f=s.append("foreignObject").attr("width","100000"),p=f.append("xhtml:div");p.attr("xmlns","http://www.w3.org/1999/xhtml");var w=o.label;switch(typeof w){case"function":p.insert(w);break;case"object":p.insert(function(){return w});break;default:p.html(w)}o3(p,o.labelStyle),p.style("display","inline-block"),p.style("white-space","nowrap");var k=p.node().getBoundingClientRect();return f.attr("width",k.width).attr("height",k.height),f}function GBt(s,o){var f=s;return f.node().appendChild(o.label),o3(f,o.labelStyle),f}function qBt(s,o){for(var f=s.append("text"),p=VBt(o.label).split(`
+`),w=0;w0}function c3(s,o,f){var p=s.x,w=s.y,k=[],b=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY;o.forEach(function(V){b=Math.min(b,V.x),_=Math.min(_,V.y)});for(var A=p-s.width/2-b,N=w-s.height/2-_,B=0;B1&&k.sort(function(V,Z){var ae=V.x-f.x,le=V.y-f.y,ce=Math.sqrt(ae*ae+le*le),be=Z.x-f.x,xe=Z.y-f.y,Ee=Math.sqrt(be*be+xe*xe);return ceMath.abs(w)*_?(k<0&&(_=-_),A=k===0?0:_*w/k,N=_):(w<0&&(b=-b),A=b,N=w===0?0:b*k/w),{x:f+A,y:p+N}}var r0e={rect:oFt,ellipse:cFt,circle:uFt,diamond:lFt};function aFt(s){r0e=s}function oFt(s,o,f){var p=s.insert("rect",":first-child").attr("rx",f.rx).attr("ry",f.ry).attr("x",-o.width/2).attr("y",-o.height/2).attr("width",o.width).attr("height",o.height);return f.intersect=function(w){return n0e(f,w)},p}function cFt(s,o,f){var p=o.width/2,w=o.height/2,k=s.insert("ellipse",":first-child").attr("x",-o.width/2).attr("y",-o.height/2).attr("rx",p).attr("ry",w);return f.intersect=function(b){return RPe(f,p,w,b)},k}function uFt(s,o,f){var p=Math.max(o.width,o.height)/2,w=s.insert("circle",":first-child").attr("x",-o.width/2).attr("y",-o.height/2).attr("r",p);return f.intersect=function(k){return iFt(f,p,k)},w}function lFt(s,o,f){var p=o.width*Math.SQRT2/2,w=o.height*Math.SQRT2/2,k=[{x:0,y:-w},{x:-p,y:0},{x:0,y:w},{x:p,y:0}],b=s.insert("polygon",":first-child").attr("points",k.map(function(_){return _.x+","+_.y}).join(" "));return f.intersect=function(_){return c3(f,k,_)},b}function hFt(){var s=function(o,f){gFt(f);var p=rP(o,"output"),w=rP(p,"clusters"),k=rP(p,"edgePaths"),b=Jde(rP(p,"edgeLabels"),f),_=t0e(rP(p,"nodes"),f,r0e);jA(f),rFt(_,f),nFt(b,f),e0e(k,f,Xde);var A=Zde(w,f);tFt(A,f),pFt(f)};return s.createNodes=function(o){return arguments.length?(eFt(o),s):t0e},s.createClusters=function(o){return arguments.length?(UBt(o),s):Zde},s.createEdgeLabels=function(o){return arguments.length?(KBt(o),s):Jde},s.createEdgePaths=function(o){return arguments.length?(WBt(o),s):e0e},s.shapes=function(o){return arguments.length?(aFt(o),s):r0e},s.arrows=function(o){return arguments.length?(jBt(o),s):Xde},s}var fFt={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},dFt={arrowhead:"normal",curve:Pd};function gFt(s){s.nodes().forEach(function(o){var f=s.node(o);!eo(f,"label")&&!s.children(o).length&&(f.label=o),eo(f,"paddingX")&&BA(f,{paddingLeft:f.paddingX,paddingRight:f.paddingX}),eo(f,"paddingY")&&BA(f,{paddingTop:f.paddingY,paddingBottom:f.paddingY}),eo(f,"padding")&&BA(f,{paddingLeft:f.padding,paddingRight:f.padding,paddingTop:f.padding,paddingBottom:f.padding}),BA(f,fFt),hr(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(p){f[p]=Number(f[p])}),eo(f,"width")&&(f._prevWidth=f.width),eo(f,"height")&&(f._prevHeight=f.height)}),s.edges().forEach(function(o){var f=s.edge(o);eo(f,"label")||(f.label=""),BA(f,dFt)})}function pFt(s){hr(s.nodes(),function(o){var f=s.node(o);eo(f,"_prevWidth")?f.width=f._prevWidth:delete f.width,eo(f,"_prevHeight")?f.height=f._prevHeight:delete f.height,delete f._prevWidth,delete f._prevHeight})}function rP(s,o){var f=s.select("g."+o);return f.empty()&&(f=s.append("g").attr("class",o)),f}function $Pe(s,o,f){const p=o.width,w=o.height,k=(p+w)*.9,b=[{x:k/2,y:0},{x:k,y:-k/2},{x:k/2,y:-k},{x:0,y:-k/2}],_=T5(s,k,k,b);return f.intersect=function(A){return c3(f,b,A)},_}function HPe(s,o,f){const w=o.height,k=w/4,b=o.width+2*k,_=[{x:k,y:0},{x:b-k,y:0},{x:b,y:-w/2},{x:b-k,y:-w},{x:k,y:-w},{x:0,y:-w/2}],A=T5(s,b,w,_);return f.intersect=function(N){return c3(f,_,N)},A}function zPe(s,o,f){const p=o.width,w=o.height,k=[{x:-w/2,y:0},{x:p,y:0},{x:p,y:-w},{x:-w/2,y:-w},{x:0,y:-w/2}],b=T5(s,p,w,k);return f.intersect=function(_){return c3(f,k,_)},b}function GPe(s,o,f){const p=o.width,w=o.height,k=[{x:-2*w/6,y:0},{x:p-w/6,y:0},{x:p+2*w/6,y:-w},{x:w/6,y:-w}],b=T5(s,p,w,k);return f.intersect=function(_){return c3(f,k,_)},b}function qPe(s,o,f){const p=o.width,w=o.height,k=[{x:2*w/6,y:0},{x:p+w/6,y:0},{x:p-2*w/6,y:-w},{x:-w/6,y:-w}],b=T5(s,p,w,k);return f.intersect=function(_){return c3(f,k,_)},b}function VPe(s,o,f){const p=o.width,w=o.height,k=[{x:-2*w/6,y:0},{x:p+2*w/6,y:0},{x:p-w/6,y:-w},{x:w/6,y:-w}],b=T5(s,p,w,k);return f.intersect=function(_){return c3(f,k,_)},b}function UPe(s,o,f){const p=o.width,w=o.height,k=[{x:w/6,y:0},{x:p-w/6,y:0},{x:p+2*w/6,y:-w},{x:-2*w/6,y:-w}],b=T5(s,p,w,k);return f.intersect=function(_){return c3(f,k,_)},b}function KPe(s,o,f){const p=o.width,w=o.height,k=[{x:0,y:0},{x:p+w/2,y:0},{x:p,y:-w/2},{x:p+w/2,y:-w},{x:0,y:-w}],b=T5(s,p,w,k);return f.intersect=function(_){return c3(f,k,_)},b}function WPe(s,o,f){const p=o.height,w=o.width+p/4,k=s.insert("rect",":first-child").attr("rx",p/2).attr("ry",p/2).attr("x",-w/2).attr("y",-p/2).attr("width",w).attr("height",p);return f.intersect=function(b){return n0e(f,b)},k}function YPe(s,o,f){const p=o.width,w=o.height,k=[{x:0,y:0},{x:p,y:0},{x:p,y:-w},{x:0,y:-w},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-w},{x:-8,y:-w},{x:-8,y:0}],b=T5(s,p,w,k);return f.intersect=function(_){return c3(f,k,_)},b}function XPe(s,o,f){const p=o.width,w=p/2,k=w/(2.5+p/50),b=o.height+k,_="M 0,"+k+" a "+w+","+k+" 0,0,0 "+p+" 0 a "+w+","+k+" 0,0,0 "+-p+" 0 l 0,"+b+" a "+w+","+k+" 0,0,0 "+p+" 0 l 0,"+-b,A=s.attr("label-offset-y",k).insert("path",":first-child").attr("d",_).attr("transform","translate("+-p/2+","+-(b/2+k)+")");return f.intersect=function(N){const B=n0e(f,N),F=B.x-f.x;if(w!=0&&(Math.abs(F)f.height/2-k)){let H=k*k*(1-F*F/(w*w));H!=0&&(H=Math.sqrt(H)),H=k-H,N.y-f.y>0&&(H=-H),B.y+=H}return B},A}function bFt(s){s.shapes().question=$Pe,s.shapes().hexagon=HPe,s.shapes().stadium=WPe,s.shapes().subroutine=YPe,s.shapes().cylinder=XPe,s.shapes().rect_left_inv_arrow=zPe,s.shapes().lean_right=GPe,s.shapes().lean_left=qPe,s.shapes().trapezoid=VPe,s.shapes().inv_trapezoid=UPe,s.shapes().rect_right_inv_arrow=KPe}function vFt(s){s({question:$Pe}),s({hexagon:HPe}),s({stadium:WPe}),s({subroutine:YPe}),s({cylinder:XPe}),s({rect_left_inv_arrow:zPe}),s({lean_right:GPe}),s({lean_left:qPe}),s({trapezoid:VPe}),s({inv_trapezoid:UPe}),s({rect_right_inv_arrow:KPe})}function T5(s,o,f,p){return s.insert("polygon",":first-child").attr("points",p.map(function(w){return w.x+","+w.y}).join(" ")).attr("transform","translate("+-o/2+","+f/2+")")}const wFt={addToRender:bFt,addToRenderV2:vFt},QPe={},mFt=function(s){const o=Object.keys(s);for(const f of o)QPe[f]=s[f]},ZPe=function(s,o,f,p,w,k){const b=p?p.select(`[id="${f}"]`):sr(`[id="${f}"]`),_=w||document;Object.keys(s).forEach(function(N){const B=s[N];let F="default";B.classes.length>0&&(F=B.classes.join(" "));const H=qw(B.styles);let j=B.text!==void 0?B.text:B.id,V;if(l1(Pt().flowchart.htmlLabels)){const le={label:j.replace(/fa[blrs]?:fa-[\w-]+/g,ce=>``)};V=JK(b,le).node(),V.parentNode.removeChild(V)}else{const le=_.createElementNS("http://www.w3.org/2000/svg","text");le.setAttribute("style",H.labelStyle.replace("color:","fill:"));const ce=j.split(xa.lineBreakRegex);for(const be of ce){const xe=_.createElementNS("http://www.w3.org/2000/svg","tspan");xe.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),xe.setAttribute("dy","1em"),xe.setAttribute("x","1"),xe.textContent=be,le.appendChild(xe)}V=le}let Z=0,ae="";switch(B.type){case"round":Z=5,ae="rect";break;case"square":ae="rect";break;case"diamond":ae="question";break;case"hexagon":ae="hexagon";break;case"odd":ae="rect_left_inv_arrow";break;case"lean_right":ae="lean_right";break;case"lean_left":ae="lean_left";break;case"trapezoid":ae="trapezoid";break;case"inv_trapezoid":ae="inv_trapezoid";break;case"odd_right":ae="rect_left_inv_arrow";break;case"circle":ae="circle";break;case"ellipse":ae="ellipse";break;case"stadium":ae="stadium";break;case"subroutine":ae="subroutine";break;case"cylinder":ae="cylinder";break;case"group":ae="rect";break;default:ae="rect"}je.warn("Adding node",B.id,B.domId),o.setNode(k.db.lookUpDomId(B.id),{labelType:"svg",labelStyle:H.labelStyle,shape:ae,label:V,rx:Z,ry:Z,class:F,style:H.style,id:k.db.lookUpDomId(B.id)})})},JPe=function(s,o,f){let p=0,w,k;if(s.defaultStyle!==void 0){const b=qw(s.defaultStyle);w=b.style,k=b.labelStyle}s.forEach(function(b){p++;var _="L-"+b.start+"-"+b.end,A="LS-"+b.start,N="LE-"+b.end;const B={};b.type==="arrow_open"?B.arrowhead="none":B.arrowhead="normal";let F="",H="";if(b.style!==void 0){const j=qw(b.style);F=j.style,H=j.labelStyle}else switch(b.stroke){case"normal":F="fill:none",w!==void 0&&(F=w),k!==void 0&&(H=k);break;case"dotted":F="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":F=" stroke-width: 3.5px;fill:none";break}B.style=F,B.labelStyle=H,b.interpolate!==void 0?B.curve=Jg(b.interpolate,Pd):s.defaultInterpolate!==void 0?B.curve=Jg(s.defaultInterpolate,Pd):B.curve=Jg(QPe.curve,Pd),b.text===void 0?b.style!==void 0&&(B.arrowheadStyle="fill: #333"):(B.arrowheadStyle="fill: #333",B.labelpos="c",l1(Pt().flowchart.htmlLabels)?(B.labelType="html",B.label=`${b.text.replace(/fa[blrs]?:fa-[\w-]+/g,j=>``)}`):(B.labelType="text",B.label=b.text.replace(xa.lineBreakRegex,`
+`),b.style===void 0&&(B.style=B.style||"stroke: #333; stroke-width: 1.5px;fill:none"),B.labelStyle=B.labelStyle.replace("color:","fill:"))),B.id=_,B.class=A+" "+N,B.minlen=b.length||1,o.setEdge(f.db.lookUpDomId(b.start),f.db.lookUpDomId(b.end),B,p)})},yFt={setConf:mFt,addVertices:ZPe,addEdges:JPe,getClasses:function(s,o){je.info("Extracting classes"),o.db.clear();try{return o.parse(s),o.db.getClasses()}catch(f){return je.error(f),{}}},draw:function(s,o,f,p){je.info("Drawing flowchart"),p.db.clear();const{securityLevel:w,flowchart:k}=Pt();let b;w==="sandbox"&&(b=sr("#i"+o));const _=sr(w==="sandbox"?b.nodes()[0].contentDocument.body:"body"),A=w==="sandbox"?b.nodes()[0].contentDocument:document;try{p.parser.parse(s)}catch{je.debug("Parsing failed")}let N=p.db.getDirection();N===void 0&&(N="TD");const B=k.nodeSpacing||50,F=k.rankSpacing||50,H=new Hf({multigraph:!0,compound:!0}).setGraph({rankdir:N,nodesep:B,ranksep:F,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let j;const V=p.db.getSubGraphs();for(let Me=V.length-1;Me>=0;Me--)j=V[Me],p.db.addVertex(j.id,j.title,"group",void 0,j.classes);const Z=p.db.getVertices();je.warn("Get vertices",Z);const ae=p.db.getEdges();let le=0;for(le=V.length-1;le>=0;le--){j=V[le],_fe("cluster").append("text");for(let Me=0;Me0&&(B=N.classes.join(" "));const F=qw(N.styles);let H=N.text!==void 0?N.text:N.id,j;if(l1(Pt().flowchart.htmlLabels)){const ae={label:H.replace(/fa[blrs]?:fa-[\w-]+/g,le=>``)};j=JK(b,ae).node(),j.parentNode.removeChild(j)}else{const ae=w.createElementNS("http://www.w3.org/2000/svg","text");ae.setAttribute("style",F.labelStyle.replace("color:","fill:"));const le=H.split(xa.lineBreakRegex);for(const ce of le){const be=w.createElementNS("http://www.w3.org/2000/svg","tspan");be.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),be.setAttribute("dy","1em"),be.setAttribute("x","1"),be.textContent=ce,ae.appendChild(be)}j=ae}let V=0,Z="";switch(N.type){case"round":V=5,Z="rect";break;case"square":Z="rect";break;case"diamond":Z="question";break;case"hexagon":Z="hexagon";break;case"odd":Z="rect_left_inv_arrow";break;case"lean_right":Z="lean_right";break;case"lean_left":Z="lean_left";break;case"trapezoid":Z="trapezoid";break;case"inv_trapezoid":Z="inv_trapezoid";break;case"odd_right":Z="rect_left_inv_arrow";break;case"circle":Z="circle";break;case"ellipse":Z="ellipse";break;case"stadium":Z="stadium";break;case"subroutine":Z="subroutine";break;case"cylinder":Z="cylinder";break;case"group":Z="rect";break;case"doublecircle":Z="doublecircle";break;default:Z="rect"}o.setNode(N.id,{labelStyle:F.labelStyle,shape:Z,labelText:H,rx:V,ry:V,class:B,style:F.style,id:N.id,link:N.link,linkTarget:N.linkTarget,tooltip:k.db.getTooltip(N.id)||"",domId:k.db.lookUpDomId(N.id),haveCallback:N.haveCallback,width:N.type==="group"?500:void 0,dir:N.dir,type:N.type,props:N.props,padding:Pt().flowchart.padding}),je.info("setNode",{labelStyle:F.labelStyle,shape:Z,labelText:H,rx:V,ry:V,class:B,style:F.style,id:N.id,domId:k.db.lookUpDomId(N.id),width:N.type==="group"?500:void 0,type:N.type,dir:N.dir,props:N.props,padding:Pt().flowchart.padding})})},nBe=function(s,o,f){je.info("abc78 edges = ",s);let p=0,w={},k,b;if(s.defaultStyle!==void 0){const _=qw(s.defaultStyle);k=_.style,b=_.labelStyle}s.forEach(function(_){p++;var A="L-"+_.start+"-"+_.end;w[A]===void 0?(w[A]=0,je.info("abc78 new entry",A,w[A])):(w[A]++,je.info("abc78 new entry",A,w[A]));let N=A+"-"+w[A];je.info("abc78 new link id to be used is",A,N,w[A]);var B="LS-"+_.start,F="LE-"+_.end;const H={style:"",labelStyle:""};switch(H.minlen=_.length||1,_.type==="arrow_open"?H.arrowhead="none":H.arrowhead="normal",H.arrowTypeStart="arrow_open",H.arrowTypeEnd="arrow_open",_.type){case"double_arrow_cross":H.arrowTypeStart="arrow_cross";case"arrow_cross":H.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":H.arrowTypeStart="arrow_point";case"arrow_point":H.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":H.arrowTypeStart="arrow_circle";case"arrow_circle":H.arrowTypeEnd="arrow_circle";break}let j="",V="";switch(_.stroke){case"normal":j="fill:none;",k!==void 0&&(j=k),b!==void 0&&(V=b),H.thickness="normal",H.pattern="solid";break;case"dotted":H.thickness="normal",H.pattern="dotted",H.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":H.thickness="thick",H.pattern="solid",H.style="stroke-width: 3.5px;fill:none;";break}if(_.style!==void 0){const Z=qw(_.style);j=Z.style,V=Z.labelStyle}H.style=H.style+=j,H.labelStyle=H.labelStyle+=V,_.interpolate!==void 0?H.curve=Jg(_.interpolate,Pd):s.defaultInterpolate!==void 0?H.curve=Jg(s.defaultInterpolate,Pd):H.curve=Jg(eBe.curve,Pd),_.text===void 0?_.style!==void 0&&(H.arrowheadStyle="fill: #333"):(H.arrowheadStyle="fill: #333",H.labelpos="c"),H.labelType="text",H.label=_.text.replace(xa.lineBreakRegex,`
+`),_.style===void 0&&(H.style=H.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),H.labelStyle=H.labelStyle.replace("color:","fill:"),H.id=N,H.classes="flowchart-link "+B+" "+F,o.setEdge(_.start,_.end,H,p)})},i0e={setConf:kFt,addVertices:tBe,addEdges:nBe,getClasses:function(s,o){je.info("Extracting classes"),o.db.clear();try{return o.parse(s),o.db.getClasses()}catch{return}},draw:function(s,o,f,p){je.info("Drawing flowchart"),p.db.clear(),a3.setGen("gen-2"),p.parser.parse(s);let w=p.db.getDirection();w===void 0&&(w="TD");const{securityLevel:k,flowchart:b}=Pt(),_=b.nodeSpacing||50,A=b.rankSpacing||50;let N;k==="sandbox"&&(N=sr("#i"+o));const B=sr(k==="sandbox"?N.nodes()[0].contentDocument.body:"body"),F=k==="sandbox"?N.nodes()[0].contentDocument:document,H=new Hf({multigraph:!0,compound:!0}).setGraph({rankdir:w,nodesep:_,ranksep:A,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let j;const V=p.db.getSubGraphs();je.info("Subgraphs - ",V);for(let Ee=V.length-1;Ee>=0;Ee--)j=V[Ee],je.info("Subgraph - ",j),p.db.addVertex(j.id,j.title,"group",void 0,j.classes,j.dir);const Z=p.db.getVertices(),ae=p.db.getEdges();je.info("Edges",ae);let le=0;for(le=V.length-1;le>=0;le--){j=V[le],_fe("cluster").append("text");for(let Ee=0;Ee"u"&&(yt.yylloc={});var dn=yt.yylloc;X.push(dn);var vt=yt.options&&yt.options.ranges;typeof Mt.yy.parseError=="function"?this.parseError=Mt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Lr(){var Di;return Di=he.pop()||yt.lex()||bt,typeof Di!="number"&&(Di instanceof Array&&(he=Di,Di=he.pop()),Di=we.symbols_[Di]||Di),Di}for(var xt,Tt,wt,At,He={},Ze,Lt,Ve,Mn;;){if(Tt=ke[ke.length-1],this.defaultActions[Tt]?wt=this.defaultActions[Tt]:((xt===null||typeof xt>"u")&&(xt=Lr()),wt=Re[Tt]&&Re[Tt][xt]),typeof wt>"u"||!wt.length||!wt[0]){var Oe="";Mn=[];for(Ze in Re[Tt])this.terminals_[Ze]&&Ze>ct&&Mn.push("'"+this.terminals_[Ze]+"'");yt.showPosition?Oe="Parse error on line "+(Ge+1)+`:
+`+yt.showPosition()+`
+Expecting `+Mn.join(", ")+", got '"+(this.terminals_[xt]||xt)+"'":Oe="Parse error on line "+(Ge+1)+": Unexpected "+(xt==bt?"end of input":"'"+(this.terminals_[xt]||xt)+"'"),this.parseError(Oe,{text:yt.match,token:this.terminals_[xt]||xt,line:yt.yylineno,loc:dn,expected:Mn})}if(wt[0]instanceof Array&&wt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Tt+", token: "+xt);switch(wt[0]){case 1:ke.push(xt),De.push(yt.yytext),X.push(yt.yylloc),ke.push(wt[1]),xt=null,de=yt.yyleng,pe=yt.yytext,Ge=yt.yylineno,dn=yt.yylloc;break;case 2:if(Lt=this.productions_[wt[1]][1],He.$=De[De.length-Lt],He._$={first_line:X[X.length-(Lt||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(Lt||1)].first_column,last_column:X[X.length-1].last_column},vt&&(He._$.range=[X[X.length-(Lt||1)].range[0],X[X.length-1].range[1]]),At=this.performAction.apply(He,[pe,de,Ge,Mt.yy,wt[1],De,X].concat(St)),typeof At<"u")return At;Lt&&(ke=ke.slice(0,-1*Lt*2),De=De.slice(0,-1*Lt),X=X.slice(0,-1*Lt)),ke.push(this.productions_[wt[1]][0]),De.push(He.$),X.push(He._$),Ve=Re[ke[ke.length-2]][ke[ke.length-1]],ke.push(Ve);break;case 3:return!0}}return!0}},Me=function(){var ye={EOF:1,parseError:function(we,ke){if(this.yy.parser)this.yy.parser.parseError(we,ke);else throw new Error(we)},setInput:function(re,we){return this.yy=we||this.yy||{},this._input=re,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var re=this._input[0];this.yytext+=re,this.yyleng++,this.offset++,this.match+=re,this.matched+=re;var we=re.match(/(?:\r\n?|\n).*/g);return we?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),re},unput:function(re){var we=re.length,ke=re.split(/(?:\r\n?|\n)/g);this._input=re+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-we),this.offset-=we;var he=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),ke.length-1&&(this.yylineno-=ke.length-1);var De=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:ke?(ke.length===he.length?this.yylloc.first_column:0)+he[he.length-ke.length].length-ke[0].length:this.yylloc.first_column-we},this.options.ranges&&(this.yylloc.range=[De[0],De[0]+this.yyleng-we]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(re){this.unput(this.match.slice(re))},pastInput:function(){var re=this.matched.substr(0,this.matched.length-this.match.length);return(re.length>20?"...":"")+re.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var re=this.match;return re.length<20&&(re+=this._input.substr(0,20-re.length)),(re.substr(0,20)+(re.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var re=this.pastInput(),we=new Array(re.length+1).join("-");return re+this.upcomingInput()+`
+`+we+"^"},test_match:function(re,we){var ke,he,De;if(this.options.backtrack_lexer&&(De={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&&(De.yylloc.range=this.yylloc.range.slice(0))),he=re[0].match(/(?:\r\n?|\n).*/g),he&&(this.yylineno+=he.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:he?he[he.length-1].length-he[he.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+re[0].length},this.yytext+=re[0],this.match+=re[0],this.matches=re,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(re[0].length),this.matched+=re[0],ke=this.performAction.call(this,this.yy,this,we,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ke)return ke;if(this._backtrack){for(var X in De)this[X]=De[X];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var re,we,ke,he;this._more||(this.yytext="",this.match="");for(var De=this._currentRules(),X=0;Xwe[0].length)){if(we=ke,he=X,this.options.backtrack_lexer){if(re=this.test_match(ke,De[X]),re!==!1)return re;if(this._backtrack){we=!1;continue}else return!1}else if(!this.options.flex)break}return we?(re=this.test_match(we,De[he]),re!==!1?re:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var we=this.next();return we||this.lex()},begin:function(we){this.conditionStack.push(we)},popState:function(){var we=this.conditionStack.length-1;return we>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(we){return we=this.conditionStack.length-1-Math.abs(we||0),we>=0?this.conditionStack[we]:"INITIAL"},pushState:function(we){this.begin(we)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(we,ke,he,De){switch(he){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 38;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 26:this.popState();break;case 27:return 37;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return ye}();Ee.lexer=Me;function fe(){this.yy={}}return fe.prototype=Ee,Ee.Parser=fe,new fe}();s0e.parser=s0e;const xFt=s0e,EFt=s=>s.match(/^\s*gantt/)!==null;var a0e={},TFt={get exports(){return a0e},set exports(s){a0e=s}};(function(s,o){(function(f,p){s.exports=p()})(g0,function(){var f="day";return function(p,w,k){var b=function(N){return N.add(4-N.isoWeekday(),f)},_=w.prototype;_.isoWeekYear=function(){return b(this).year()},_.isoWeek=function(N){if(!this.$utils().u(N))return this.add(7*(N-this.isoWeek()),f);var B,F,H,j,V=b(this),Z=(B=this.isoWeekYear(),F=this.$u,H=(F?k.utc:k)().year(B).startOf("year"),j=4-H.isoWeekday(),H.isoWeekday()>4&&(j+=7),H.add(j,f));return V.diff(Z,"week")+1},_.isoWeekday=function(N){return this.$utils().u(N)?this.day()||7:this.day(this.day()%7?N:N-7)};var A=_.startOf;_.startOf=function(N,B){var F=this.$utils(),H=!!F.u(B)||B;return F.p(N)==="isoweek"?H?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):A.bind(this)(N,B)}}})})(TFt);const _Ft=a0e;var o0e={},CFt={get exports(){return o0e},set exports(s){o0e=s}};(function(s,o){(function(f,p){s.exports=p()})(g0,function(){var f={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},p=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,w=/\d\d/,k=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,_={},A=function(Z){return(Z=+Z)+(Z>68?1900:2e3)},N=function(Z){return function(ae){this[Z]=+ae}},B=[/[+-]\d\d:?(\d\d)?|Z/,function(Z){(this.zone||(this.zone={})).offset=function(ae){if(!ae||ae==="Z")return 0;var le=ae.match(/([+-]|\d\d)/g),ce=60*le[1]+(+le[2]||0);return ce===0?0:le[0]==="+"?-ce:ce}(Z)}],F=function(Z){var ae=_[Z];return ae&&(ae.indexOf?ae:ae.s.concat(ae.f))},H=function(Z,ae){var le,ce=_.meridiem;if(ce){for(var be=1;be<=24;be+=1)if(Z.indexOf(ce(be,0,ae))>-1){le=be>12;break}}else le=Z===(ae?"pm":"PM");return le},j={A:[b,function(Z){this.afternoon=H(Z,!1)}],a:[b,function(Z){this.afternoon=H(Z,!0)}],S:[/\d/,function(Z){this.milliseconds=100*+Z}],SS:[w,function(Z){this.milliseconds=10*+Z}],SSS:[/\d{3}/,function(Z){this.milliseconds=+Z}],s:[k,N("seconds")],ss:[k,N("seconds")],m:[k,N("minutes")],mm:[k,N("minutes")],H:[k,N("hours")],h:[k,N("hours")],HH:[k,N("hours")],hh:[k,N("hours")],D:[k,N("day")],DD:[w,N("day")],Do:[b,function(Z){var ae=_.ordinal,le=Z.match(/\d+/);if(this.day=le[0],ae)for(var ce=1;ce<=31;ce+=1)ae(ce).replace(/\[|\]/g,"")===Z&&(this.day=ce)}],M:[k,N("month")],MM:[w,N("month")],MMM:[b,function(Z){var ae=F("months"),le=(F("monthsShort")||ae.map(function(ce){return ce.slice(0,3)})).indexOf(Z)+1;if(le<1)throw new Error;this.month=le%12||le}],MMMM:[b,function(Z){var ae=F("months").indexOf(Z)+1;if(ae<1)throw new Error;this.month=ae%12||ae}],Y:[/[+-]?\d+/,N("year")],YY:[w,function(Z){this.year=A(Z)}],YYYY:[/\d{4}/,N("year")],Z:B,ZZ:B};function V(Z){var ae,le;ae=Z,le=_&&_.formats;for(var ce=(Z=ae.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(re,we,ke){var he=ke&&ke.toUpperCase();return we||le[ke]||f[ke]||le[he].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(De,X,Re){return X||Re.slice(1)})})).match(p),be=ce.length,xe=0;xe-1)return new Date((Ge==="X"?1e3:1)*pe);var ct=V(Ge)(pe),bt=ct.year,St=ct.month,yt=ct.day,Mt=ct.hours,nn=ct.minutes,dn=ct.seconds,vt=ct.milliseconds,Lr=ct.zone,xt=new Date,Tt=yt||(bt||St?1:xt.getDate()),wt=bt||xt.getFullYear(),At=0;bt&&!St||(At=St>0?St-1:xt.getMonth());var He=Mt||0,Ze=nn||0,Lt=dn||0,Ve=vt||0;return Lr?new Date(Date.UTC(wt,At,Tt,He,Ze,Lt,Ve+60*Lr.offset*1e3)):de?new Date(Date.UTC(wt,At,Tt,He,Ze,Lt,Ve)):new Date(wt,At,Tt,He,Ze,Lt,Ve)}catch{return new Date("")}}(Ee,ye,Me),this.init(),he&&he!==!0&&(this.$L=this.locale(he).$L),ke&&Ee!=this.format(ye)&&(this.$d=new Date("")),_={}}else if(ye instanceof Array)for(var De=ye.length,X=1;X<=De;X+=1){fe[1]=ye[X-1];var Re=le.apply(this,fe);if(Re.isValid()){this.$d=Re.$d,this.$L=Re.$L,this.init();break}X===De&&(this.$d=new Date(""))}else be.call(this,xe)}}})})(CFt);const SFt=o0e;var c0e={},AFt={get exports(){return c0e},set exports(s){c0e=s}};(function(s,o){(function(f,p){s.exports=p()})(g0,function(){return function(f,p){var w=p.prototype,k=w.format;w.format=function(b){var _=this,A=this.$locale();if(!this.isValid())return k.bind(this)(b);var N=this.$utils(),B=(b||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(F){switch(F){case"Q":return Math.ceil((_.$M+1)/3);case"Do":return A.ordinal(_.$D);case"gggg":return _.weekYear();case"GGGG":return _.isoWeekYear();case"wo":return A.ordinal(_.week(),"W");case"w":case"ww":return N.s(_.week(),F==="w"?1:2,"0");case"W":case"WW":return N.s(_.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return N.s(String(_.$H===0?24:_.$H),F==="k"?1:2,"0");case"X":return Math.floor(_.$d.getTime()/1e3);case"x":return _.$d.getTime();case"z":return"["+_.offsetName()+"]";case"zzz":return"["+_.offsetName("long")+"]";default:return F}});return k.bind(this)(B)}}})})(AFt);const LFt=c0e;Qg.extend(_Ft),Qg.extend(SFt),Qg.extend(LFt);let u3="",u0e="",l0e,h0e="",iP=[],sP=[],f0e={},d0e=[],eW=[],zA="";const rBe=["active","done","crit","milestone"];let g0e=[],aP=!1,p0e=!1,b0e=0;const MFt=function(s,o,f){Fl.parseDirective(this,s,o,f)},DFt=function(){d0e=[],eW=[],zA="",g0e=[],tW=0,w0e=void 0,nW=void 0,g1=[],u3="",u0e="",l0e=void 0,h0e="",iP=[],sP=[],aP=!1,p0e=!1,b0e=0,f0e={},tp()},IFt=function(s){u0e=s},OFt=function(){return u0e},NFt=function(s){l0e=s},PFt=function(){return l0e},BFt=function(s){h0e=s},FFt=function(){return h0e},RFt=function(s){u3=s},jFt=function(){aP=!0},$Ft=function(){return aP},HFt=function(){p0e=!0},zFt=function(){return p0e},GFt=function(){return u3},qFt=function(s){iP=s.toLowerCase().split(/[\s,]+/)},VFt=function(){return iP},UFt=function(s){sP=s.toLowerCase().split(/[\s,]+/)},KFt=function(){return sP},WFt=function(){return f0e},YFt=function(s){zA=s,d0e.push(s)},XFt=function(){return d0e},QFt=function(){let s=uBe();const o=10;let f=0;for(;!s&&f=6&&f.includes("weekends")||f.includes(s.format("dddd").toLowerCase())?!0:f.includes(s.format(o.trim()))},sBe=function(s,o,f,p){if(!f.length||s.manualEndTime)return;let w;s.startTime instanceof Date?w=Qg(s.startTime):w=Qg(s.startTime,o,!0),w=w.add(1,"d");let k;s.endTime instanceof Date?k=Qg(s.endTime):k=Qg(s.endTime,o,!0);const[b,_]=ZFt(w,k,o,f,p);s.endTime=b.toDate(),s.renderEndTime=_},ZFt=function(s,o,f,p,w){let k=!1,b=null;for(;s<=o;)k||(b=o.toDate()),k=iBe(s,f,p,w),k&&(o=o.add(1,"d")),s=s.add(1,"d");return[o,b]},v0e=function(s,o,f){f=f.trim();const w=/^after\s+([\d\w- ]+)/.exec(f.trim());if(w!==null){let b=null;if(w[1].split(" ").forEach(function(_){let A=qA(_);A!==void 0&&(b?A.endTime>b.endTime&&(b=A):b=A)}),b)return b.endTime;{const _=new Date;return _.setHours(0,0,0,0),_}}let k=Qg(f,o.trim(),!0);if(k.isValid())return k.toDate();{je.debug("Invalid date:"+f),je.debug("With date format:"+o.trim());const b=new Date(f);if(b===void 0||isNaN(b.getTime()))throw new Error("Invalid date:"+f);return b}},aBe=function(s){const o=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(s.trim());return o!==null?[Number.parseFloat(o[1]),o[2]]:[NaN,"ms"]},oBe=function(s,o,f,p=!1){f=f.trim();let w=Qg(f,o.trim(),!0);if(w.isValid())return p&&(w=w.add(1,"d")),w.toDate();let k=Qg(s);const[b,_]=aBe(f);if(!Number.isNaN(b)){const A=k.add(b,_);A.isValid()&&(k=A)}return k.toDate()};let tW=0;const GA=function(s){return s===void 0?(tW=tW+1,"task"+tW):s},JFt=function(s,o){let f;o.substr(0,1)===":"?f=o.substr(1,o.length):f=o;const p=f.split(","),w={};fBe(p,w,rBe);for(let b=0;b{window.open(f,"_self")}),f0e[p]=f)}),lBe(s,"clickable")},lBe=function(s,o){s.split(",").forEach(function(f){let p=qA(f);p!==void 0&&p.classes.push(o)})},iRt=function(s,o,f){if(Pt().securityLevel!=="loose"||o===void 0)return;let p=[];if(typeof f=="string"){p=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k{Pa.runFunc(o,...p)})},hBe=function(s,o){g0e.push(function(){const f=document.querySelector(`[id="${s}"]`);f!==null&&f.addEventListener("click",function(){o()})},function(){const f=document.querySelector(`[id="${s}-text"]`);f!==null&&f.addEventListener("click",function(){o()})})},m0e={parseDirective:MFt,getConfig:()=>Pt().gantt,clear:DFt,setDateFormat:RFt,getDateFormat:GFt,enableInclusiveEndDates:jFt,endDatesAreInclusive:$Ft,enableTopAxis:HFt,topAxisEnabled:zFt,setAxisFormat:IFt,getAxisFormat:OFt,setTickInterval:NFt,getTickInterval:PFt,setTodayMarker:BFt,getTodayMarker:FFt,setAccTitle:np,getAccTitle:C2,setDiagramTitle:Kw,getDiagramTitle:Ww,setAccDescription:S2,getAccDescription:A2,addSection:YFt,getSections:XFt,getTasks:QFt,addTask:tRt,findTaskById:qA,addTaskOrg:nRt,setIncludes:qFt,getIncludes:VFt,setExcludes:UFt,getExcludes:KFt,setClickEvent:function(s,o,f){s.split(",").forEach(function(p){iRt(p,o,f)}),lBe(s,"clickable")},setLink:rRt,getLinks:WFt,bindFunctions:function(s){g0e.forEach(function(o){o(s)})},parseDuration:aBe,isInvalidDate:iBe};function fBe(s,o,f){let p=!0;for(;p;)p=!1,f.forEach(function(w){const k="^\\s*"+w+"\\s*$",b=new RegExp(k);s[0].match(b)&&(o[w]=!0,s.shift(1),p=!0)})}const sRt=function(){je.debug("Something is calling, setConf, remove the call")};let _5;const aRt={setConf:sRt,draw:function(s,o,f,p){const w=Pt().gantt,k=Pt().securityLevel;let b;k==="sandbox"&&(b=sr("#i"+o));const _=sr(k==="sandbox"?b.nodes()[0].contentDocument.body:"body"),A=k==="sandbox"?b.nodes()[0].contentDocument:document,N=A.getElementById(o);_5=N.parentElement.offsetWidth,_5===void 0&&(_5=1200),w.useWidth!==void 0&&(_5=w.useWidth);const B=p.db.getTasks(),F=B.length*(w.barHeight+w.barGap)+2*w.topPadding;N.setAttribute("viewBox","0 0 "+_5+" "+F);const H=_.select(`[id="${o}"]`),j=Gxt().domain([k4t(B,function(we){return we.startTime}),y4t(B,function(we){return we.endTime})]).rangeRound([0,_5-w.leftPadding-w.rightPadding]);let V=[];for(const we of B)V.push(we.type);const Z=V;V=fe(V);function ae(we,ke){const he=we.startTime,De=ke.startTime;let X=0;return he>De?X=1:he0&&(yt=bt.classes.join(" "));let Mt=0;for(const[dn,vt]of V.entries())bt.type===vt&&(Mt=dn%w.numberSectionStyles);let nn="";return bt.active?bt.crit?nn+=" activeCrit":nn=" active":bt.done?bt.crit?nn=" doneCrit":nn=" done":bt.crit&&(nn+=" crit"),nn.length===0&&(nn=" task"),bt.milestone&&(nn=" milestone "+nn),nn+=Mt,nn+=" "+yt,St+nn}),Ge.append("text").attr("id",function(bt){return bt.id+"-text"}).text(function(bt){return bt.task}).attr("font-size",w.fontSize).attr("x",function(bt){let St=j(bt.startTime),yt=j(bt.renderEndTime||bt.endTime);bt.milestone&&(St+=.5*(j(bt.endTime)-j(bt.startTime))-.5*X),bt.milestone&&(yt=St+X);const Mt=this.getBBox().width;return Mt>yt-St?yt+Mt+1.5*w.leftPadding>pe?St+De-5:yt+De+5:(yt-St)/2+St+De}).attr("y",function(bt,St){return St=bt.order,St*ke+w.barHeight/2+(w.fontSize/2-2)+he}).attr("text-height",X).attr("class",function(bt){const St=j(bt.startTime);let yt=j(bt.endTime);bt.milestone&&(yt=St+X);const Mt=this.getBBox().width;let nn="";bt.classes.length>0&&(nn=bt.classes.join(" "));let dn=0;for(const[Lr,xt]of V.entries())bt.type===xt&&(dn=Lr%w.numberSectionStyles);let vt="";return bt.active&&(bt.crit?vt="activeCritText"+dn:vt="activeText"+dn),bt.done?bt.crit?vt=vt+" doneCritText"+dn:vt=vt+" doneText"+dn:bt.crit&&(vt=vt+" critText"+dn),bt.milestone&&(vt+=" milestoneText"),Mt>yt-St?yt+Mt+1.5*w.leftPadding>pe?nn+" taskTextOutsideLeft taskTextOutside"+dn+" "+vt:nn+" taskTextOutsideRight taskTextOutside"+dn+" "+vt+" width-"+Mt:nn+" taskText taskText"+dn+" "+vt+" width-"+Mt}),Pt().securityLevel==="sandbox"){let bt;bt=sr("#i"+o);const St=bt.nodes()[0].contentDocument;Ge.filter(function(yt){return de[yt.id]!==void 0}).each(function(yt){var Mt=St.querySelector("#"+yt.id),nn=St.querySelector("#"+yt.id+"-text");const dn=Mt.parentNode;var vt=St.createElement("a");vt.setAttribute("xlink:href",de[yt.id]),vt.setAttribute("target","_top"),dn.appendChild(vt),vt.appendChild(Mt),vt.appendChild(nn)})}}function be(we,ke,he,De,X,Re,pe,Ge){const de=Re.reduce((dn,{startTime:vt})=>dn?Math.min(dn,vt):vt,0),ct=Re.reduce((dn,{endTime:vt})=>dn?Math.max(dn,vt):vt,0),bt=p.db.getDateFormat();if(!de||!ct)return;const St=[];let yt=null,Mt=Qg(de);for(;Mt.valueOf()<=ct;)p.db.isInvalidDate(Mt,bt,pe,Ge)?yt?yt.end=Mt:yt={start:Mt,end:Mt}:yt&&(St.push(yt),yt=null),Mt=Mt.add(1,"d");H.append("g").selectAll("rect").data(St).enter().append("rect").attr("id",function(dn){return"exclude-"+dn.start.format("YYYY-MM-DD")}).attr("x",function(dn){return j(dn.start)+he}).attr("y",w.gridLineStartPadding).attr("width",function(dn){const vt=dn.end.add(1,"day");return j(vt)-j(dn.start)}).attr("height",X-ke-w.gridLineStartPadding).attr("transform-origin",function(dn,vt){return(j(dn.start)+he+.5*(j(dn.end)-j(dn.start))).toString()+"px "+(vt*we+.5*X).toString()+"px"}).attr("class","exclude-range")}function xe(we,ke,he,De){let X=L4t(j).tickSize(-De+ke+w.gridLineStartPadding).tickFormat(wU(p.db.getAxisFormat()||w.axisFormat||"%Y-%m-%d"));const pe=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(p.db.getTickInterval()||w.tickInterval);if(pe!==null){const Ge=pe[1];switch(pe[2]){case"minute":X.ticks(dU.every(Ge));break;case"hour":X.ticks(gU.every(Ge));break;case"day":X.ticks(cA.every(Ge));break;case"week":X.ticks(uA.every(Ge));break;case"month":X.ticks(bU.every(Ge));break}}if(H.append("g").attr("class","grid").attr("transform","translate("+we+", "+(De-50)+")").call(X).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),p.db.topAxisEnabled()||w.topAxis){let Ge=A4t(j).tickSize(-De+ke+w.gridLineStartPadding).tickFormat(wU(p.db.getAxisFormat()||w.axisFormat||"%Y-%m-%d"));if(pe!==null){const de=pe[1];switch(pe[2]){case"minute":Ge.ticks(dU.every(de));break;case"hour":Ge.ticks(gU.every(de));break;case"day":Ge.ticks(cA.every(de));break;case"week":Ge.ticks(uA.every(de));break;case"month":Ge.ticks(bU.every(de));break}}H.append("g").attr("class","grid").attr("transform","translate("+we+", "+ke+")").call(Ge).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function Ee(we,ke){const he=[];let De=0;for(const[X,Re]of V.entries())he[X]=[Re,re(Re,Z)];H.append("g").selectAll("text").data(he).enter().append(function(X){const Re=X[0].split(xa.lineBreakRegex),pe=-(Re.length-1)/2,Ge=A.createElementNS("http://www.w3.org/2000/svg","text");Ge.setAttribute("dy",pe+"em");for(const[de,ct]of Re.entries()){const bt=A.createElementNS("http://www.w3.org/2000/svg","tspan");bt.setAttribute("alignment-baseline","central"),bt.setAttribute("x","10"),de>0&&bt.setAttribute("dy","1em"),bt.textContent=ct,Ge.appendChild(bt)}return Ge}).attr("x",10).attr("y",function(X,Re){if(Re>0)for(let pe=0;pe"u"&&(be.yylloc={});var Me=be.yylloc;F.push(Me);var fe=be.options&&be.options.ranges;typeof xe.yy.parseError=="function"?this.parseError=xe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ye(){var ct;return ct=N.pop()||be.lex()||le,typeof ct!="number"&&(ct instanceof Array&&(N=ct,ct=N.pop()),ct=_.symbols_[ct]||ct),ct}for(var re,we,ke,he,De={},X,Re,pe,Ge;;){if(we=A[A.length-1],this.defaultActions[we]?ke=this.defaultActions[we]:((re===null||typeof re>"u")&&(re=ye()),ke=H[we]&&H[we][re]),typeof ke>"u"||!ke.length||!ke[0]){var de="";Ge=[];for(X in H[we])this.terminals_[X]&&X>ae&&Ge.push("'"+this.terminals_[X]+"'");be.showPosition?de="Parse error on line "+(V+1)+`:
+`+be.showPosition()+`
+Expecting `+Ge.join(", ")+", got '"+(this.terminals_[re]||re)+"'":de="Parse error on line "+(V+1)+": Unexpected "+(re==le?"end of input":"'"+(this.terminals_[re]||re)+"'"),this.parseError(de,{text:be.match,token:this.terminals_[re]||re,line:be.yylineno,loc:Me,expected:Ge})}if(ke[0]instanceof Array&&ke.length>1)throw new Error("Parse Error: multiple actions possible at state: "+we+", token: "+re);switch(ke[0]){case 1:A.push(re),B.push(be.yytext),F.push(be.yylloc),A.push(ke[1]),re=null,Z=be.yyleng,j=be.yytext,V=be.yylineno,Me=be.yylloc;break;case 2:if(Re=this.productions_[ke[1]][1],De.$=B[B.length-Re],De._$={first_line:F[F.length-(Re||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(Re||1)].first_column,last_column:F[F.length-1].last_column},fe&&(De._$.range=[F[F.length-(Re||1)].range[0],F[F.length-1].range[1]]),he=this.performAction.apply(De,[j,Z,V,xe.yy,ke[1],B,F].concat(ce)),typeof he<"u")return he;Re&&(A=A.slice(0,-1*Re*2),B=B.slice(0,-1*Re),F=F.slice(0,-1*Re)),A.push(this.productions_[ke[1]][0]),B.push(De.$),F.push(De._$),pe=H[A[A.length-2]][A[A.length-1]],A.push(pe);break;case 3:return!0}}return!0}},p=function(){var k={EOF:1,parseError:function(_,A){if(this.yy.parser)this.yy.parser.parseError(_,A);else throw new Error(_)},setInput:function(b,_){return this.yy=_||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var _=b.match(/(?:\r\n?|\n).*/g);return _?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},unput:function(b){var _=b.length,A=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-_),this.offset-=_;var N=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===N.length?this.yylloc.first_column:0)+N[N.length-A.length].length-A[0].length:this.yylloc.first_column-_},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-_]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(b){this.unput(this.match.slice(b))},pastInput:function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var b=this.pastInput(),_=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
+`+_+"^"},test_match:function(b,_){var A,N,B;if(this.options.backtrack_lexer&&(B={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&&(B.yylloc.range=this.yylloc.range.slice(0))),N=b[0].match(/(?:\r\n?|\n).*/g),N&&(this.yylineno+=N.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:N?N[N.length-1].length-N[N.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],A=this.performAction.call(this,this.yy,this,_,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var F in B)this[F]=B[F];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,_,A,N;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),F=0;F_[0].length)){if(_=A,N=F,this.options.backtrack_lexer){if(b=this.test_match(A,B[F]),b!==!1)return b;if(this._backtrack){_=!1;continue}else return!1}else if(!this.options.flex)break}return _?(b=this.test_match(_,B[N]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var _=this.next();return _||this.lex()},begin:function(_){this.conditionStack.push(_)},popState:function(){var _=this.conditionStack.length-1;return _>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(_){return _=this.conditionStack.length-1-Math.abs(_||0),_>=0?this.conditionStack[_]:"INITIAL"},pushState:function(_){this.begin(_)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(_,A,N,B){switch(N){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return k}();f.lexer=p;function w(){this.yy={}}return w.prototype=f,f.Parser=w,new w}();y0e.parser=y0e;const oRt=y0e;var dBe="",gBe=!1;const cRt={setMessage:s=>{je.debug("Setting message to: "+s),dBe=s},getMessage:()=>dBe,setInfo:s=>{gBe=s},getInfo:()=>gBe,clear:tp},uRt={draw:(s,o,f)=>{try{je.debug(`Rendering info diagram
+`+s);const p=Pt().securityLevel;let w;p==="sandbox"&&(w=sr("#i"+o));const b=sr(p==="sandbox"?w.nodes()[0].contentDocument.body:"body").select("#"+o);b.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+f),b.attr("height",100),b.attr("width",400)}catch(p){je.error("Error while rendering info diagram"),je.error(p.message)}}},lRt=s=>s.match(/^\s*info/)!==null;var k0e=function(){var s=function(Me,fe,ye,re){for(ye=ye||{},re=Me.length;re--;ye[Me[re]]=fe);return ye},o=[1,4],f=[1,5],p=[1,6],w=[1,7],k=[1,9],b=[1,11,13,15,17,19,20,26,27,28,29],_=[2,5],A=[1,6,11,13,15,17,19,20,26,27,28,29],N=[26,27,28],B=[2,8],F=[1,18],H=[1,19],j=[1,20],V=[1,21],Z=[1,22],ae=[1,23],le=[1,28],ce=[6,26,27,28,29],be={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(fe,ye,re,we,ke,he,De){var X=he.length-1;switch(ke){case 4:we.setShowData(!0);break;case 7:this.$=he[X-1];break;case 9:we.addSection(he[X-1],we.cleanupValue(he[X]));break;case 10:this.$=he[X].trim(),we.setDiagramTitle(this.$);break;case 11:this.$=he[X].trim(),we.setAccTitle(this.$);break;case 12:case 13:this.$=he[X].trim(),we.setAccDescription(this.$);break;case 14:we.addSection(he[X].substr(8)),this.$=he[X].substr(8);break;case 21:we.parseDirective("%%{","open_directive");break;case 22:we.parseDirective(he[X],"type_directive");break;case 23:he[X]=he[X].trim().replace(/'/g,'"'),we.parseDirective(he[X],"arg_directive");break;case 24:we.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:o,21:8,26:f,27:p,28:w,29:k},{1:[3]},{3:10,4:2,5:3,6:o,21:8,26:f,27:p,28:w,29:k},{3:11,4:2,5:3,6:o,21:8,26:f,27:p,28:w,29:k},s(b,_,{7:12,8:[1,13]}),s(A,[2,18]),s(A,[2,19]),s(A,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},s(N,B,{21:8,9:16,10:17,5:24,1:[2,3],11:F,13:H,15:j,17:V,19:Z,20:ae,29:k}),s(b,_,{7:25}),{23:26,24:[1,27],32:le},s([24,32],[2,22]),s(b,[2,6]),{4:29,26:f,27:p,28:w},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},s(N,[2,13]),s(N,[2,14]),s(N,[2,15]),s(N,B,{21:8,9:16,10:17,5:24,1:[2,4],11:F,13:H,15:j,17:V,19:Z,20:ae,29:k}),s(ce,[2,16]),{25:34,31:[1,35]},s(ce,[2,24]),s(b,[2,7]),s(N,[2,9]),s(N,[2,10]),s(N,[2,11]),s(N,[2,12]),{23:36,32:le},{32:[2,23]},s(ce,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(fe,ye){if(ye.recoverable)this.trace(fe);else{var re=new Error(fe);throw re.hash=ye,re}},parse:function(fe){var ye=this,re=[0],we=[],ke=[null],he=[],De=this.table,X="",Re=0,pe=0,Ge=2,de=1,ct=he.slice.call(arguments,1),bt=Object.create(this.lexer),St={yy:{}};for(var yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yt)&&(St.yy[yt]=this.yy[yt]);bt.setInput(fe,St.yy),St.yy.lexer=bt,St.yy.parser=this,typeof bt.yylloc>"u"&&(bt.yylloc={});var Mt=bt.yylloc;he.push(Mt);var nn=bt.options&&bt.options.ranges;typeof St.yy.parseError=="function"?this.parseError=St.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dn(){var Mn;return Mn=we.pop()||bt.lex()||de,typeof Mn!="number"&&(Mn instanceof Array&&(we=Mn,Mn=we.pop()),Mn=ye.symbols_[Mn]||Mn),Mn}for(var vt,Lr,xt,Tt,wt={},At,He,Ze,Lt;;){if(Lr=re[re.length-1],this.defaultActions[Lr]?xt=this.defaultActions[Lr]:((vt===null||typeof vt>"u")&&(vt=dn()),xt=De[Lr]&&De[Lr][vt]),typeof xt>"u"||!xt.length||!xt[0]){var Ve="";Lt=[];for(At in De[Lr])this.terminals_[At]&&At>Ge&&Lt.push("'"+this.terminals_[At]+"'");bt.showPosition?Ve="Parse error on line "+(Re+1)+`:
+`+bt.showPosition()+`
+Expecting `+Lt.join(", ")+", got '"+(this.terminals_[vt]||vt)+"'":Ve="Parse error on line "+(Re+1)+": Unexpected "+(vt==de?"end of input":"'"+(this.terminals_[vt]||vt)+"'"),this.parseError(Ve,{text:bt.match,token:this.terminals_[vt]||vt,line:bt.yylineno,loc:Mt,expected:Lt})}if(xt[0]instanceof Array&&xt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Lr+", token: "+vt);switch(xt[0]){case 1:re.push(vt),ke.push(bt.yytext),he.push(bt.yylloc),re.push(xt[1]),vt=null,pe=bt.yyleng,X=bt.yytext,Re=bt.yylineno,Mt=bt.yylloc;break;case 2:if(He=this.productions_[xt[1]][1],wt.$=ke[ke.length-He],wt._$={first_line:he[he.length-(He||1)].first_line,last_line:he[he.length-1].last_line,first_column:he[he.length-(He||1)].first_column,last_column:he[he.length-1].last_column},nn&&(wt._$.range=[he[he.length-(He||1)].range[0],he[he.length-1].range[1]]),Tt=this.performAction.apply(wt,[X,pe,Re,St.yy,xt[1],ke,he].concat(ct)),typeof Tt<"u")return Tt;He&&(re=re.slice(0,-1*He*2),ke=ke.slice(0,-1*He),he=he.slice(0,-1*He)),re.push(this.productions_[xt[1]][0]),ke.push(wt.$),he.push(wt._$),Ze=De[re[re.length-2]][re[re.length-1]],re.push(Ze);break;case 3:return!0}}return!0}},xe=function(){var Me={EOF:1,parseError:function(ye,re){if(this.yy.parser)this.yy.parser.parseError(ye,re);else throw new Error(ye)},setInput:function(fe,ye){return this.yy=ye||this.yy||{},this._input=fe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var fe=this._input[0];this.yytext+=fe,this.yyleng++,this.offset++,this.match+=fe,this.matched+=fe;var ye=fe.match(/(?:\r\n?|\n).*/g);return ye?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),fe},unput:function(fe){var ye=fe.length,re=fe.split(/(?:\r\n?|\n)/g);this._input=fe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ye),this.offset-=ye;var we=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),re.length-1&&(this.yylineno-=re.length-1);var ke=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:re?(re.length===we.length?this.yylloc.first_column:0)+we[we.length-re.length].length-re[0].length:this.yylloc.first_column-ye},this.options.ranges&&(this.yylloc.range=[ke[0],ke[0]+this.yyleng-ye]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(fe){this.unput(this.match.slice(fe))},pastInput:function(){var fe=this.matched.substr(0,this.matched.length-this.match.length);return(fe.length>20?"...":"")+fe.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var fe=this.match;return fe.length<20&&(fe+=this._input.substr(0,20-fe.length)),(fe.substr(0,20)+(fe.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var fe=this.pastInput(),ye=new Array(fe.length+1).join("-");return fe+this.upcomingInput()+`
+`+ye+"^"},test_match:function(fe,ye){var re,we,ke;if(this.options.backtrack_lexer&&(ke={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&&(ke.yylloc.range=this.yylloc.range.slice(0))),we=fe[0].match(/(?:\r\n?|\n).*/g),we&&(this.yylineno+=we.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:we?we[we.length-1].length-we[we.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+fe[0].length},this.yytext+=fe[0],this.match+=fe[0],this.matches=fe,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(fe[0].length),this.matched+=fe[0],re=this.performAction.call(this,this.yy,this,ye,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),re)return re;if(this._backtrack){for(var he in ke)this[he]=ke[he];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var fe,ye,re,we;this._more||(this.yytext="",this.match="");for(var ke=this._currentRules(),he=0;heye[0].length)){if(ye=re,we=he,this.options.backtrack_lexer){if(fe=this.test_match(re,ke[he]),fe!==!1)return fe;if(this._backtrack){ye=!1;continue}else return!1}else if(!this.options.flex)break}return ye?(fe=this.test_match(ye,ke[we]),fe!==!1?fe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ye=this.next();return ye||this.lex()},begin:function(ye){this.conditionStack.push(ye)},popState:function(){var ye=this.conditionStack.length-1;return ye>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ye){return ye=this.conditionStack.length-1-Math.abs(ye||0),ye>=0?this.conditionStack[ye]:"INITIAL"},pushState:function(ye){this.begin(ye)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(ye,re,we,ke){switch(we){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return Me}();be.lexer=xe;function Ee(){this.yy={}}return Ee.prototype=be,be.Parser=Ee,new Ee}();k0e.parser=k0e;const hRt=k0e,fRt=s=>s.match(/^\s*pie/)!==null||s.match(/^\s*bar/)!==null;let rW={},x0e=!1;const dRt={parseDirective:function(s,o,f){Fl.parseDirective(this,s,o,f)},getConfig:()=>Pt().pie,addSection:function(s,o){s=xa.sanitizeText(s,Pt()),rW[s]===void 0&&(rW[s]=o,je.debug("Added new section :",s))},getSections:()=>rW,cleanupValue:function(s){return s.substring(0,1)===":"&&(s=s.substring(1).trim()),Number(s.trim())},clear:function(){rW={},x0e=!1,tp()},setAccTitle:np,getAccTitle:C2,setDiagramTitle:Kw,getDiagramTitle:Ww,setShowData:function(s){x0e=s},getShowData:function(){return x0e},getAccDescription:A2,setAccDescription:S2};let C5=Pt(),S5;const oP=450,gRt={draw:(s,o,f,p)=>{try{C5=Pt(),je.debug(`Rendering info diagram
+`+s);const ce=Pt().securityLevel;let be;ce==="sandbox"&&(be=sr("#i"+o));const xe=sr(ce==="sandbox"?be.nodes()[0].contentDocument.body:"body"),Ee=ce==="sandbox"?be.nodes()[0].contentDocument:document;p.db.clear(),p.parser.parse(s),je.debug("Parsed info diagram");const Me=Ee.getElementById(o);S5=Me.parentElement.offsetWidth,S5===void 0&&(S5=1200),C5.useWidth!==void 0&&(S5=C5.useWidth),C5.pie.useWidth!==void 0&&(S5=C5.pie.useWidth);const fe=xe.select("#"+o);Uw(fe,oP,S5,C5.pie.useMaxWidth),Me.setAttribute("viewBox","0 0 "+S5+" "+oP);var w=40,k=18,b=4,_=Math.min(S5,oP)/2-w,A=fe.append("g").attr("transform","translate("+S5/2+","+oP/2+")"),N=p.db.getSections(),B=0;Object.keys(N).forEach(function(re){B+=N[re]});const ye=C5.themeVariables;var F=[ye.pie1,ye.pie2,ye.pie3,ye.pie4,ye.pie5,ye.pie6,ye.pie7,ye.pie8,ye.pie9,ye.pie10,ye.pie11,ye.pie12],H=ZLe().range(F),j=Object.entries(N).map(function(re,we){return{order:we,name:re[0],value:re[1]}}),V=n7t().value(function(re){return re.value}).sort(function(re,we){return re.order-we.order}),Z=V(j),ae=gN().innerRadius(0).outerRadius(_);A.selectAll("mySlices").data(Z).enter().append("path").attr("d",ae).attr("fill",function(re){return H(re.data.name)}).attr("class","pieCircle"),A.selectAll("mySlices").data(Z).enter().append("text").text(function(re){return(re.data.value/B*100).toFixed(0)+"%"}).attr("transform",function(re){return"translate("+ae.centroid(re)+")"}).style("text-anchor","middle").attr("class","slice"),A.append("text").text(p.db.getDiagramTitle()).attr("x",0).attr("y",-(oP-50)/2).attr("class","pieTitleText");var le=A.selectAll(".legend").data(H.domain()).enter().append("g").attr("class","legend").attr("transform",function(re,we){const ke=k+b,he=ke*H.domain().length/2,De=12*k,X=we*ke-he;return"translate("+De+","+X+")"});le.append("rect").attr("width",k).attr("height",k).style("fill",H).style("stroke",H),le.data(Z).append("text").attr("x",k+b).attr("y",k-b).text(function(re){return p.db.getShowData()||C5.showData||C5.pie.showData?re.data.name+" ["+re.data.value+"]":re.data.name})}catch(ce){je.error("Error while rendering info diagram"),je.error(ce)}}};var E0e=function(){var s=function(Lr,xt,Tt,wt){for(Tt=Tt||{},wt=Lr.length;wt--;Tt[Lr[wt]]=xt);return Tt},o=[1,3],f=[1,5],p=[1,6],w=[1,7],k=[1,8],b=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],_=[1,22],A=[2,13],N=[1,26],B=[1,27],F=[1,28],H=[1,29],j=[1,30],V=[1,31],Z=[1,24],ae=[1,32],le=[1,33],ce=[1,36],be=[71,72],xe=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],Ee=[1,56],Me=[1,57],fe=[1,58],ye=[1,59],re=[1,60],we=[1,61],ke=[1,62],he=[62,63],De=[1,74],X=[1,70],Re=[1,71],pe=[1,72],Ge=[1,73],de=[1,75],ct=[1,79],bt=[1,80],St=[1,77],yt=[1,78],Mt=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],nn={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(xt,Tt,wt,At,He,Ze,Lt){var Ve=Ze.length-1;switch(He){case 6:this.$=Ze[Ve].trim(),At.setAccTitle(this.$);break;case 7:case 8:this.$=Ze[Ve].trim(),At.setAccDescription(this.$);break;case 9:At.parseDirective("%%{","open_directive");break;case 10:At.parseDirective(Ze[Ve],"type_directive");break;case 11:Ze[Ve]=Ze[Ve].trim().replace(/'/g,'"'),At.parseDirective(Ze[Ve],"arg_directive");break;case 12:At.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:At.addRequirement(Ze[Ve-3],Ze[Ve-4]);break;case 20:At.setNewReqId(Ze[Ve-2]);break;case 21:At.setNewReqText(Ze[Ve-2]);break;case 22:At.setNewReqRisk(Ze[Ve-2]);break;case 23:At.setNewReqVerifyMethod(Ze[Ve-2]);break;case 26:this.$=At.RequirementType.REQUIREMENT;break;case 27:this.$=At.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=At.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=At.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=At.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=At.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=At.RiskLevel.LOW_RISK;break;case 33:this.$=At.RiskLevel.MED_RISK;break;case 34:this.$=At.RiskLevel.HIGH_RISK;break;case 35:this.$=At.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=At.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=At.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=At.VerifyType.VERIFY_TEST;break;case 39:At.addElement(Ze[Ve-3]);break;case 40:At.setNewElementType(Ze[Ve-2]);break;case 41:At.setNewElementDocRef(Ze[Ve-2]);break;case 44:At.addRelationship(Ze[Ve-2],Ze[Ve],Ze[Ve-4]);break;case 45:At.addRelationship(Ze[Ve-2],Ze[Ve-4],Ze[Ve]);break;case 46:this.$=At.Relationships.CONTAINS;break;case 47:this.$=At.Relationships.COPIES;break;case 48:this.$=At.Relationships.DERIVES;break;case 49:this.$=At.Relationships.SATISFIES;break;case 50:this.$=At.Relationships.VERIFIES;break;case 51:this.$=At.Relationships.REFINES;break;case 52:this.$=At.Relationships.TRACES;break}},table:[{3:1,4:2,6:o,9:4,14:f,16:p,18:w,19:k},{1:[3]},{3:10,4:2,5:[1,9],6:o,9:4,14:f,16:p,18:w,19:k},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},s(b,[2,8]),{20:[2,9]},{3:16,4:2,6:o,9:4,14:f,16:p,18:w,19:k},{1:[2,2]},{4:21,5:_,7:17,8:A,9:4,14:f,16:p,18:w,19:k,23:18,24:19,25:20,26:23,32:25,40:N,41:B,42:F,43:H,44:j,45:V,53:Z,71:ae,72:le},{11:34,12:[1,35],22:ce},s([12,22],[2,10]),s(b,[2,6]),s(b,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:_,7:38,8:A,9:4,14:f,16:p,18:w,19:k,23:18,24:19,25:20,26:23,32:25,40:N,41:B,42:F,43:H,44:j,45:V,53:Z,71:ae,72:le},{4:21,5:_,7:39,8:A,9:4,14:f,16:p,18:w,19:k,23:18,24:19,25:20,26:23,32:25,40:N,41:B,42:F,43:H,44:j,45:V,53:Z,71:ae,72:le},{4:21,5:_,7:40,8:A,9:4,14:f,16:p,18:w,19:k,23:18,24:19,25:20,26:23,32:25,40:N,41:B,42:F,43:H,44:j,45:V,53:Z,71:ae,72:le},{4:21,5:_,7:41,8:A,9:4,14:f,16:p,18:w,19:k,23:18,24:19,25:20,26:23,32:25,40:N,41:B,42:F,43:H,44:j,45:V,53:Z,71:ae,72:le},{4:21,5:_,7:42,8:A,9:4,14:f,16:p,18:w,19:k,23:18,24:19,25:20,26:23,32:25,40:N,41:B,42:F,43:H,44:j,45:V,53:Z,71:ae,72:le},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},s(be,[2,26]),s(be,[2,27]),s(be,[2,28]),s(be,[2,29]),s(be,[2,30]),s(be,[2,31]),s(xe,[2,55]),s(xe,[2,56]),s(b,[2,4]),{13:51,21:[1,52]},s(b,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:Ee,65:Me,66:fe,67:ye,68:re,69:we,70:ke},{61:63,64:Ee,65:Me,66:fe,67:ye,68:re,69:we,70:ke},{11:64,22:ce},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},s(he,[2,46]),s(he,[2,47]),s(he,[2,48]),s(he,[2,49]),s(he,[2,50]),s(he,[2,51]),s(he,[2,52]),{63:[1,68]},s(b,[2,5]),{5:De,29:69,30:X,33:Re,35:pe,37:Ge,39:de},{5:ct,39:bt,55:76,56:St,58:yt},{32:81,71:ae,72:le},{32:82,71:ae,72:le},s(Mt,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:De,29:87,30:X,33:Re,35:pe,37:Ge,39:de},s(Mt,[2,25]),s(Mt,[2,39]),{31:[1,88]},{31:[1,89]},{5:ct,39:bt,55:90,56:St,58:yt},s(Mt,[2,43]),s(Mt,[2,44]),s(Mt,[2,45]),{32:91,71:ae,72:le},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},s(Mt,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},s(Mt,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:De,29:116,30:X,33:Re,35:pe,37:Ge,39:de},{5:De,29:117,30:X,33:Re,35:pe,37:Ge,39:de},{5:De,29:118,30:X,33:Re,35:pe,37:Ge,39:de},{5:De,29:119,30:X,33:Re,35:pe,37:Ge,39:de},{5:ct,39:bt,55:120,56:St,58:yt},{5:ct,39:bt,55:121,56:St,58:yt},s(Mt,[2,20]),s(Mt,[2,21]),s(Mt,[2,22]),s(Mt,[2,23]),s(Mt,[2,40]),s(Mt,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(xt,Tt){if(Tt.recoverable)this.trace(xt);else{var wt=new Error(xt);throw wt.hash=Tt,wt}},parse:function(xt){var Tt=this,wt=[0],At=[],He=[null],Ze=[],Lt=this.table,Ve="",Mn=0,Oe=0,Di=2,rn=1,pi=Ze.slice.call(arguments,1),Fr=Object.create(this.lexer),tr={yy:{}};for(var Wn in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Wn)&&(tr.yy[Wn]=this.yy[Wn]);Fr.setInput(xt,tr.yy),tr.yy.lexer=Fr,tr.yy.parser=this,typeof Fr.yylloc>"u"&&(Fr.yylloc={});var er=Fr.yylloc;Ze.push(er);var Fn=Fr.options&&Fr.options.ranges;typeof tr.yy.parseError=="function"?this.parseError=tr.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function nr(){var wr;return wr=At.pop()||Fr.lex()||rn,typeof wr!="number"&&(wr instanceof Array&&(At=wr,wr=At.pop()),wr=Tt.symbols_[wr]||wr),wr}for(var ha,fa,is,Xi,da={},Cc,na,Ji,Fi;;){if(fa=wt[wt.length-1],this.defaultActions[fa]?is=this.defaultActions[fa]:((ha===null||typeof ha>"u")&&(ha=nr()),is=Lt[fa]&&Lt[fa][ha]),typeof is>"u"||!is.length||!is[0]){var vr="";Fi=[];for(Cc in Lt[fa])this.terminals_[Cc]&&Cc>Di&&Fi.push("'"+this.terminals_[Cc]+"'");Fr.showPosition?vr="Parse error on line "+(Mn+1)+`:
+`+Fr.showPosition()+`
+Expecting `+Fi.join(", ")+", got '"+(this.terminals_[ha]||ha)+"'":vr="Parse error on line "+(Mn+1)+": Unexpected "+(ha==rn?"end of input":"'"+(this.terminals_[ha]||ha)+"'"),this.parseError(vr,{text:Fr.match,token:this.terminals_[ha]||ha,line:Fr.yylineno,loc:er,expected:Fi})}if(is[0]instanceof Array&&is.length>1)throw new Error("Parse Error: multiple actions possible at state: "+fa+", token: "+ha);switch(is[0]){case 1:wt.push(ha),He.push(Fr.yytext),Ze.push(Fr.yylloc),wt.push(is[1]),ha=null,Oe=Fr.yyleng,Ve=Fr.yytext,Mn=Fr.yylineno,er=Fr.yylloc;break;case 2:if(na=this.productions_[is[1]][1],da.$=He[He.length-na],da._$={first_line:Ze[Ze.length-(na||1)].first_line,last_line:Ze[Ze.length-1].last_line,first_column:Ze[Ze.length-(na||1)].first_column,last_column:Ze[Ze.length-1].last_column},Fn&&(da._$.range=[Ze[Ze.length-(na||1)].range[0],Ze[Ze.length-1].range[1]]),Xi=this.performAction.apply(da,[Ve,Oe,Mn,tr.yy,is[1],He,Ze].concat(pi)),typeof Xi<"u")return Xi;na&&(wt=wt.slice(0,-1*na*2),He=He.slice(0,-1*na),Ze=Ze.slice(0,-1*na)),wt.push(this.productions_[is[1]][0]),He.push(da.$),Ze.push(da._$),Ji=Lt[wt[wt.length-2]][wt[wt.length-1]],wt.push(Ji);break;case 3:return!0}}return!0}},dn=function(){var Lr={EOF:1,parseError:function(Tt,wt){if(this.yy.parser)this.yy.parser.parseError(Tt,wt);else throw new Error(Tt)},setInput:function(xt,Tt){return this.yy=Tt||this.yy||{},this._input=xt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var xt=this._input[0];this.yytext+=xt,this.yyleng++,this.offset++,this.match+=xt,this.matched+=xt;var Tt=xt.match(/(?:\r\n?|\n).*/g);return Tt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),xt},unput:function(xt){var Tt=xt.length,wt=xt.split(/(?:\r\n?|\n)/g);this._input=xt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Tt),this.offset-=Tt;var At=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),wt.length-1&&(this.yylineno-=wt.length-1);var He=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:wt?(wt.length===At.length?this.yylloc.first_column:0)+At[At.length-wt.length].length-wt[0].length:this.yylloc.first_column-Tt},this.options.ranges&&(this.yylloc.range=[He[0],He[0]+this.yyleng-Tt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(xt){this.unput(this.match.slice(xt))},pastInput:function(){var xt=this.matched.substr(0,this.matched.length-this.match.length);return(xt.length>20?"...":"")+xt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var xt=this.match;return xt.length<20&&(xt+=this._input.substr(0,20-xt.length)),(xt.substr(0,20)+(xt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var xt=this.pastInput(),Tt=new Array(xt.length+1).join("-");return xt+this.upcomingInput()+`
+`+Tt+"^"},test_match:function(xt,Tt){var wt,At,He;if(this.options.backtrack_lexer&&(He={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&&(He.yylloc.range=this.yylloc.range.slice(0))),At=xt[0].match(/(?:\r\n?|\n).*/g),At&&(this.yylineno+=At.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:At?At[At.length-1].length-At[At.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+xt[0].length},this.yytext+=xt[0],this.match+=xt[0],this.matches=xt,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(xt[0].length),this.matched+=xt[0],wt=this.performAction.call(this,this.yy,this,Tt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),wt)return wt;if(this._backtrack){for(var Ze in He)this[Ze]=He[Ze];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var xt,Tt,wt,At;this._more||(this.yytext="",this.match="");for(var He=this._currentRules(),Ze=0;ZeTt[0].length)){if(Tt=wt,At=Ze,this.options.backtrack_lexer){if(xt=this.test_match(wt,He[Ze]),xt!==!1)return xt;if(this._backtrack){Tt=!1;continue}else return!1}else if(!this.options.flex)break}return Tt?(xt=this.test_match(Tt,He[At]),xt!==!1?xt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Tt=this.next();return Tt||this.lex()},begin:function(Tt){this.conditionStack.push(Tt)},popState:function(){var Tt=this.conditionStack.length-1;return Tt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Tt){return Tt=this.conditionStack.length-1-Math.abs(Tt||0),Tt>=0?this.conditionStack[Tt]:"INITIAL"},pushState:function(Tt){this.begin(Tt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Tt,wt,At,He){switch(At){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return wt.yytext=wt.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return Lr}();nn.lexer=dn;function vt(){this.yy={}}return vt.prototype=nn,nn.Parser=vt,new vt}();E0e.parser=E0e;const pRt=E0e,bRt=s=>s.match(/^\s*requirement(Diagram)?/)!==null;let T0e=[],sp={},cP={},n8={},uP={};const vRt={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(s,o,f){Fl.parseDirective(this,s,o,f)},getConfig:()=>Pt().req,addRequirement:(s,o)=>(cP[s]===void 0&&(cP[s]={name:s,type:o,id:sp.id,text:sp.text,risk:sp.risk,verifyMethod:sp.verifyMethod}),sp={},cP[s]),getRequirements:()=>cP,setNewReqId:s=>{sp!==void 0&&(sp.id=s)},setNewReqText:s=>{sp!==void 0&&(sp.text=s)},setNewReqRisk:s=>{sp!==void 0&&(sp.risk=s)},setNewReqVerifyMethod:s=>{sp!==void 0&&(sp.verifyMethod=s)},setAccTitle:np,getAccTitle:C2,setAccDescription:S2,getAccDescription:A2,addElement:s=>(uP[s]===void 0&&(uP[s]={name:s,type:n8.type,docRef:n8.docRef},je.info("Added new requirement: ",s)),n8={},uP[s]),getElements:()=>uP,setNewElementType:s=>{n8!==void 0&&(n8.type=s)},setNewElementDocRef:s=>{n8!==void 0&&(n8.docRef=s)},addRelationship:(s,o,f)=>{T0e.push({type:s,src:o,dst:f})},getRelationships:()=>T0e,clear:()=>{T0e=[],sp={},cP={},n8={},uP={},tp()}},_0e={CONTAINS:"contains",ARROW:"arrow"},pBe={ReqMarkers:_0e,insertLineEndings:(s,o)=>{let f=s.append("defs").append("marker").attr("id",_0e.CONTAINS+"_line_ending").attr("refX",0).attr("refY",o.line_height/2).attr("markerWidth",o.line_height).attr("markerHeight",o.line_height).attr("orient","auto").append("g");f.append("circle").attr("cx",o.line_height/2).attr("cy",o.line_height/2).attr("r",o.line_height/2).attr("fill","none"),f.append("line").attr("x1",0).attr("x2",o.line_height).attr("y1",o.line_height/2).attr("y2",o.line_height/2).attr("stroke-width",1),f.append("line").attr("y1",0).attr("y2",o.line_height).attr("x1",o.line_height/2).attr("x2",o.line_height/2).attr("stroke-width",1),s.append("defs").append("marker").attr("id",_0e.ARROW+"_line_ending").attr("refX",o.line_height).attr("refY",.5*o.line_height).attr("markerWidth",o.line_height).attr("markerHeight",o.line_height).attr("orient","auto").append("path").attr("d",`M0,0
+ L${o.line_height},${o.line_height/2}
+ M${o.line_height},${o.line_height/2}
+ L0,${o.line_height}`).attr("stroke-width",1)}};let Lh={},bBe=0;const vBe=(s,o)=>s.insert("rect","#"+o).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Lh.rect_min_width+"px").attr("height",Lh.rect_min_height+"px"),wBe=(s,o,f)=>{let p=Lh.rect_min_width/2,w=s.append("text").attr("class","req reqLabel reqTitle").attr("id",o).attr("x",p).attr("y",Lh.rect_padding).attr("dominant-baseline","hanging"),k=0;f.forEach(N=>{k==0?w.append("tspan").attr("text-anchor","middle").attr("x",Lh.rect_min_width/2).attr("dy",0).text(N):w.append("tspan").attr("text-anchor","middle").attr("x",Lh.rect_min_width/2).attr("dy",Lh.line_height*.75).text(N),k++});let b=1.5*Lh.rect_padding,_=k*Lh.line_height*.75,A=b+_;return s.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Lh.rect_min_width).attr("y1",A).attr("y2",A),{titleNode:w,y:A}},mBe=(s,o,f,p)=>{let w=s.append("text").attr("class","req reqLabel").attr("id",o).attr("x",Lh.rect_padding).attr("y",p).attr("dominant-baseline","hanging"),k=0;const b=30;let _=[];return f.forEach(A=>{let N=A.length;for(;N>b&&k<3;){let B=A.substring(0,b);A=A.substring(b,A.length),N=A.length,_[_.length]=B,k++}if(k==3){let B=_[_.length-1];_[_.length-1]=B.substring(0,B.length-4)+"..."}else _[_.length]=A;k=0}),_.forEach(A=>{w.append("tspan").attr("x",Lh.rect_padding).attr("dy",Lh.line_height).text(A)}),w},wRt=(s,o,f,p)=>{const w=o.node().getTotalLength(),k=o.node().getPointAtLength(w*.5),b="rel"+bBe;bBe++;const A=s.append("text").attr("class","req relationshipLabel").attr("id",b).attr("x",k.x).attr("y",k.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(p).node().getBBox();s.insert("rect","#"+b).attr("class","req reqLabelBox").attr("x",k.x-A.width/2).attr("y",k.y-A.height/2).attr("width",A.width).attr("height",A.height).attr("fill","white").attr("fill-opacity","85%")},mRt=function(s,o,f,p,w){const k=f.edge(VA(o.src),VA(o.dst)),b=RE().x(function(A){return A.x}).y(function(A){return A.y}),_=s.insert("path","#"+p).attr("class","er relationshipLine").attr("d",b(k.points)).attr("fill","none");o.type==w.db.Relationships.CONTAINS?_.attr("marker-start","url("+xa.getUrl(Lh.arrowMarkerAbsolute)+"#"+o.type+"_line_ending)"):(_.attr("stroke-dasharray","10,7"),_.attr("marker-end","url("+xa.getUrl(Lh.arrowMarkerAbsolute)+"#"+pBe.ReqMarkers.ARROW+"_line_ending)")),wRt(s,_,Lh,`<<${o.type}>>`)},yRt=(s,o,f)=>{Object.keys(s).forEach(p=>{let w=s[p];p=VA(p),je.info("Added new requirement: ",p);const k=f.append("g").attr("id",p),b="req-"+p,_=vBe(k,b);let A=wBe(k,p+"_title",[`<<${w.type}>>`,`${w.name}`]);mBe(k,p+"_body",[`Id: ${w.id}`,`Text: ${w.text}`,`Risk: ${w.risk}`,`Verification: ${w.verifyMethod}`],A.y);const N=_.node().getBBox();o.setNode(p,{width:N.width,height:N.height,shape:"rect",id:p})})},kRt=(s,o,f)=>{Object.keys(s).forEach(p=>{let w=s[p];const k=VA(p),b=f.append("g").attr("id",k),_="element-"+k,A=vBe(b,_);let N=wBe(b,_+"_title",["<>",`${p}`]);mBe(b,_+"_body",[`Type: ${w.type||"Not Specified"}`,`Doc Ref: ${w.docRef||"None"}`],N.y);const B=A.node().getBBox();o.setNode(k,{width:B.width,height:B.height,shape:"rect",id:k})})},xRt=(s,o)=>(s.forEach(function(f){let p=VA(f.src),w=VA(f.dst);o.setEdge(p,w,{relationship:f})}),s),ERt=function(s,o){o.nodes().forEach(function(f){f!==void 0&&o.node(f)!==void 0&&(s.select("#"+f),s.select("#"+f).attr("transform","translate("+(o.node(f).x-o.node(f).width/2)+","+(o.node(f).y-o.node(f).height/2)+" )"))})},VA=s=>s.replace(/\s/g,"").replace(/\./g,"_"),TRt={draw:(s,o,f,p)=>{Lh=Pt().requirement,p.db.clear(),p.parser.parse(s);const w=Lh.securityLevel;let k;w==="sandbox"&&(k=sr("#i"+o));const _=sr(w==="sandbox"?k.nodes()[0].contentDocument.body:"body").select(`[id='${o}']`);pBe.insertLineEndings(_,Lh);const A=new Hf({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Lh.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let N=p.db.getRequirements(),B=p.db.getElements(),F=p.db.getRelationships();yRt(N,A,_),kRt(B,A,_),xRt(F,A),jA(A),ERt(_,A),F.forEach(function(ae){mRt(_,ae,A,o,p)});const H=Lh.rect_padding,j=_.node().getBBox(),V=j.width+H*2,Z=j.height+H*2;Uw(_,Z,V,Lh.useMaxWidth),_.attr("viewBox",`${j.x-H} ${j.y-H} ${V} ${Z}`)}};var C0e=function(){var s=function(Tt,wt,At,He){for(At=At||{},He=Tt.length;He--;At[Tt[He]]=wt);return At},o=[1,2],f=[1,3],p=[1,5],w=[1,7],k=[2,5],b=[1,15],_=[1,17],A=[1,19],N=[1,21],B=[1,22],F=[1,23],H=[1,29],j=[1,30],V=[1,31],Z=[1,32],ae=[1,33],le=[1,34],ce=[1,35],be=[1,36],xe=[1,37],Ee=[1,38],Me=[1,39],fe=[1,40],ye=[1,42],re=[1,43],we=[1,45],ke=[1,46],he=[1,47],De=[1,48],X=[1,49],Re=[1,50],pe=[1,53],Ge=[1,4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],de=[4,5,21,54,56],ct=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],bt=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,53,54,56,57,62,63,64,65,73,83],St=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,52,54,56,57,62,63,64,65,73,83],yt=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,54,56,57,62,63,64,65,73,83],Mt=[71,72,73],nn=[1,125],dn=[1,4,5,7,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],vt={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,box:19,restOfLine:20,end:21,signal:22,autonumber:23,NUM:24,off:25,activate:26,actor:27,deactivate:28,note_statement:29,links_statement:30,link_statement:31,properties_statement:32,details_statement:33,title:34,legacy_title:35,acc_title:36,acc_title_value:37,acc_descr:38,acc_descr_value:39,acc_descr_multiline_value:40,loop:41,rect:42,opt:43,alt:44,else_sections:45,par:46,par_sections:47,critical:48,option_sections:49,break:50,option:51,and:52,else:53,participant:54,AS:55,participant_actor:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,ACTOR:73,SOLID_OPEN_ARROW:74,DOTTED_OPEN_ARROW:75,SOLID_ARROW:76,DOTTED_ARROW:77,SOLID_CROSS:78,DOTTED_CROSS:79,SOLID_POINT:80,DOTTED_POINT:81,TXT:82,open_directive:83,type_directive:84,arg_directive:85,close_directive:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"box",20:"restOfLine",21:"end",23:"autonumber",24:"NUM",25:"off",26:"activate",28:"deactivate",34:"title",35:"legacy_title",36:"acc_title",37:"acc_title_value",38:"acc_descr",39:"acc_descr_value",40:"acc_descr_multiline_value",41:"loop",42:"rect",43:"opt",44:"alt",46:"par",48:"critical",50:"break",51:"option",52:"and",53:"else",54:"participant",55:"AS",56:"participant_actor",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"ACTOR",74:"SOLID_OPEN_ARROW",75:"DOTTED_OPEN_ARROW",76:"SOLID_ARROW",77:"DOTTED_ARROW",78:"SOLID_CROSS",79:"DOTTED_CROSS",80:"SOLID_POINT",81:"DOTTED_POINT",82:"TXT",83:"open_directive",84:"type_directive",85:"arg_directive",86:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[49,1],[49,4],[47,1],[47,4],[45,1],[45,4],[13,5],[13,3],[13,5],[13,3],[29,4],[29,4],[30,3],[31,3],[32,3],[33,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[22,5],[22,5],[22,4],[27,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(wt,At,He,Ze,Lt,Ve,Mn){var Oe=Ve.length-1;switch(Lt){case 4:return Ze.apply(Ve[Oe]),Ve[Oe];case 5:case 10:this.$=[];break;case 6:case 11:Ve[Oe-1].push(Ve[Oe]),this.$=Ve[Oe-1];break;case 7:case 8:case 12:case 13:this.$=Ve[Oe];break;case 9:case 14:this.$=[];break;case 18:Ve[Oe-1].unshift({type:"boxStart",boxData:Ze.parseBoxData(Ve[Oe-2])}),Ve[Oe-1].push({type:"boxEnd",boxText:Ve[Oe-2]}),this.$=Ve[Oe-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(Ve[Oe-2]),sequenceIndexStep:Number(Ve[Oe-1]),sequenceVisible:!0,signalType:Ze.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(Ve[Oe-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:Ze.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:Ze.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:Ze.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"activeStart",signalType:Ze.LINETYPE.ACTIVE_START,actor:Ve[Oe-1]};break;case 25:this.$={type:"activeEnd",signalType:Ze.LINETYPE.ACTIVE_END,actor:Ve[Oe-1]};break;case 31:Ze.setDiagramTitle(Ve[Oe].substring(6)),this.$=Ve[Oe].substring(6);break;case 32:Ze.setDiagramTitle(Ve[Oe].substring(7)),this.$=Ve[Oe].substring(7);break;case 33:this.$=Ve[Oe].trim(),Ze.setAccTitle(this.$);break;case 34:case 35:this.$=Ve[Oe].trim(),Ze.setAccDescription(this.$);break;case 36:Ve[Oe-1].unshift({type:"loopStart",loopText:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.LOOP_START}),Ve[Oe-1].push({type:"loopEnd",loopText:Ve[Oe-2],signalType:Ze.LINETYPE.LOOP_END}),this.$=Ve[Oe-1];break;case 37:Ve[Oe-1].unshift({type:"rectStart",color:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.RECT_START}),Ve[Oe-1].push({type:"rectEnd",color:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.RECT_END}),this.$=Ve[Oe-1];break;case 38:Ve[Oe-1].unshift({type:"optStart",optText:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.OPT_START}),Ve[Oe-1].push({type:"optEnd",optText:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.OPT_END}),this.$=Ve[Oe-1];break;case 39:Ve[Oe-1].unshift({type:"altStart",altText:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.ALT_START}),Ve[Oe-1].push({type:"altEnd",signalType:Ze.LINETYPE.ALT_END}),this.$=Ve[Oe-1];break;case 40:Ve[Oe-1].unshift({type:"parStart",parText:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.PAR_START}),Ve[Oe-1].push({type:"parEnd",signalType:Ze.LINETYPE.PAR_END}),this.$=Ve[Oe-1];break;case 41:Ve[Oe-1].unshift({type:"criticalStart",criticalText:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.CRITICAL_START}),Ve[Oe-1].push({type:"criticalEnd",signalType:Ze.LINETYPE.CRITICAL_END}),this.$=Ve[Oe-1];break;case 42:Ve[Oe-1].unshift({type:"breakStart",breakText:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.BREAK_START}),Ve[Oe-1].push({type:"breakEnd",optText:Ze.parseMessage(Ve[Oe-2]),signalType:Ze.LINETYPE.BREAK_END}),this.$=Ve[Oe-1];break;case 45:this.$=Ve[Oe-3].concat([{type:"option",optionText:Ze.parseMessage(Ve[Oe-1]),signalType:Ze.LINETYPE.CRITICAL_OPTION},Ve[Oe]]);break;case 47:this.$=Ve[Oe-3].concat([{type:"and",parText:Ze.parseMessage(Ve[Oe-1]),signalType:Ze.LINETYPE.PAR_AND},Ve[Oe]]);break;case 49:this.$=Ve[Oe-3].concat([{type:"else",altText:Ze.parseMessage(Ve[Oe-1]),signalType:Ze.LINETYPE.ALT_ELSE},Ve[Oe]]);break;case 50:Ve[Oe-3].type="addParticipant",Ve[Oe-3].description=Ze.parseMessage(Ve[Oe-1]),this.$=Ve[Oe-3];break;case 51:Ve[Oe-1].type="addParticipant",this.$=Ve[Oe-1];break;case 52:Ve[Oe-3].type="addActor",Ve[Oe-3].description=Ze.parseMessage(Ve[Oe-1]),this.$=Ve[Oe-3];break;case 53:Ve[Oe-1].type="addActor",this.$=Ve[Oe-1];break;case 54:this.$=[Ve[Oe-1],{type:"addNote",placement:Ve[Oe-2],actor:Ve[Oe-1].actor,text:Ve[Oe]}];break;case 55:Ve[Oe-2]=[].concat(Ve[Oe-1],Ve[Oe-1]).slice(0,2),Ve[Oe-2][0]=Ve[Oe-2][0].actor,Ve[Oe-2][1]=Ve[Oe-2][1].actor,this.$=[Ve[Oe-1],{type:"addNote",placement:Ze.PLACEMENT.OVER,actor:Ve[Oe-2].slice(0,2),text:Ve[Oe]}];break;case 56:this.$=[Ve[Oe-1],{type:"addLinks",actor:Ve[Oe-1].actor,text:Ve[Oe]}];break;case 57:this.$=[Ve[Oe-1],{type:"addALink",actor:Ve[Oe-1].actor,text:Ve[Oe]}];break;case 58:this.$=[Ve[Oe-1],{type:"addProperties",actor:Ve[Oe-1].actor,text:Ve[Oe]}];break;case 59:this.$=[Ve[Oe-1],{type:"addDetails",actor:Ve[Oe-1].actor,text:Ve[Oe]}];break;case 62:this.$=[Ve[Oe-2],Ve[Oe]];break;case 63:this.$=Ve[Oe];break;case 64:this.$=Ze.PLACEMENT.LEFTOF;break;case 65:this.$=Ze.PLACEMENT.RIGHTOF;break;case 66:this.$=[Ve[Oe-4],Ve[Oe-1],{type:"addMessage",from:Ve[Oe-4].actor,to:Ve[Oe-1].actor,signalType:Ve[Oe-3],msg:Ve[Oe]},{type:"activeStart",signalType:Ze.LINETYPE.ACTIVE_START,actor:Ve[Oe-1]}];break;case 67:this.$=[Ve[Oe-4],Ve[Oe-1],{type:"addMessage",from:Ve[Oe-4].actor,to:Ve[Oe-1].actor,signalType:Ve[Oe-3],msg:Ve[Oe]},{type:"activeEnd",signalType:Ze.LINETYPE.ACTIVE_END,actor:Ve[Oe-4]}];break;case 68:this.$=[Ve[Oe-3],Ve[Oe-1],{type:"addMessage",from:Ve[Oe-3].actor,to:Ve[Oe-1].actor,signalType:Ve[Oe-2],msg:Ve[Oe]}];break;case 69:this.$={type:"addParticipant",actor:Ve[Oe]};break;case 70:this.$=Ze.LINETYPE.SOLID_OPEN;break;case 71:this.$=Ze.LINETYPE.DOTTED_OPEN;break;case 72:this.$=Ze.LINETYPE.SOLID;break;case 73:this.$=Ze.LINETYPE.DOTTED;break;case 74:this.$=Ze.LINETYPE.SOLID_CROSS;break;case 75:this.$=Ze.LINETYPE.DOTTED_CROSS;break;case 76:this.$=Ze.LINETYPE.SOLID_POINT;break;case 77:this.$=Ze.LINETYPE.DOTTED_POINT;break;case 78:this.$=Ze.parseMessage(Ve[Oe].trim().substring(1));break;case 79:Ze.parseDirective("%%{","open_directive");break;case 80:Ze.parseDirective(Ve[Oe],"type_directive");break;case 81:Ve[Oe]=Ve[Oe].trim().replace(/'/g,'"'),Ze.parseDirective(Ve[Oe],"arg_directive");break;case 82:Ze.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:o,5:f,6:4,7:p,14:6,83:w},{1:[3]},{3:8,4:o,5:f,6:4,7:p,14:6,83:w},{3:9,4:o,5:f,6:4,7:p,14:6,83:w},{3:10,4:o,5:f,6:4,7:p,14:6,83:w},s([1,4,5,19,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],k,{8:11}),{15:12,84:[1,13]},{84:[2,79]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:b,5:_,6:41,9:14,10:16,13:18,14:6,19:A,22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},{16:51,17:[1,52],86:pe},s([17,86],[2,80]),s(Ge,[2,6]),{6:41,10:54,13:18,14:6,19:A,22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},s(Ge,[2,8]),s(Ge,[2,9]),s(Ge,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:Re},{27:61,73:Re},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},s(Ge,[2,31]),s(Ge,[2,32]),{37:[1,67]},{39:[1,68]},s(Ge,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},s(Ge,[2,43]),{27:76,73:Re},{27:77,73:Re},{70:78,74:[1,79],75:[1,80],76:[1,81],77:[1,82],78:[1,83],79:[1,84],80:[1,85],81:[1,86]},{58:87,60:[1,88],68:[1,89],69:[1,90]},{27:91,73:Re},{27:92,73:Re},{27:93,73:Re},{27:94,73:Re},s([5,55,67,74,75,76,77,78,79,80,81,82],[2,69]),{5:[1,95]},{18:96,85:[1,97]},{5:[2,82]},s(Ge,[2,7]),s(de,[2,10],{11:98}),s(Ge,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},s(Ge,[2,23]),{5:[1,102]},{5:[1,103]},s(Ge,[2,26]),s(Ge,[2,27]),s(Ge,[2,28]),s(Ge,[2,29]),s(Ge,[2,30]),s(Ge,[2,33]),s(Ge,[2,34]),s(ct,k,{8:104}),s(ct,k,{8:105}),s(ct,k,{8:106}),s(bt,k,{45:107,8:108}),s(St,k,{47:109,8:110}),s(yt,k,{49:111,8:112}),s(ct,k,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:Re},s(Mt,[2,70]),s(Mt,[2,71]),s(Mt,[2,72]),s(Mt,[2,73]),s(Mt,[2,74]),s(Mt,[2,75]),s(Mt,[2,76]),s(Mt,[2,77]),{27:121,73:Re},{27:123,61:122,73:Re},{73:[2,64]},{73:[2,65]},{59:124,82:nn},{59:126,82:nn},{59:127,82:nn},{59:128,82:nn},s(dn,[2,15]),{16:129,86:pe},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:ye,56:re},{5:[1,135]},s(Ge,[2,21]),s(Ge,[2,22]),s(Ge,[2,24]),s(Ge,[2,25]),{4:b,5:_,6:41,9:14,10:16,13:18,14:6,19:A,21:[1,136],22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},{4:b,5:_,6:41,9:14,10:16,13:18,14:6,19:A,21:[1,137],22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},{4:b,5:_,6:41,9:14,10:16,13:18,14:6,19:A,21:[1,138],22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},{21:[1,139]},{4:b,5:_,6:41,9:14,10:16,13:18,14:6,19:A,21:[2,48],22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,53:[1,140],54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},{21:[1,141]},{4:b,5:_,6:41,9:14,10:16,13:18,14:6,19:A,21:[2,46],22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,52:[1,142],54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},{21:[1,143]},{4:b,5:_,6:41,9:14,10:16,13:18,14:6,19:A,21:[2,44],22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,51:[1,144],54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},{4:b,5:_,6:41,9:14,10:16,13:18,14:6,19:A,21:[1,145],22:20,23:N,26:B,27:44,28:F,29:24,30:25,31:26,32:27,33:28,34:H,35:j,36:V,38:Z,40:ae,41:le,42:ce,43:be,44:xe,46:Ee,48:Me,50:fe,54:ye,56:re,57:we,62:ke,63:he,64:De,65:X,73:Re,83:w},{20:[1,146]},s(Ge,[2,51]),{20:[1,147]},s(Ge,[2,53]),{27:148,73:Re},{27:149,73:Re},{59:150,82:nn},{59:151,82:nn},{59:152,82:nn},{67:[1,153],82:[2,63]},{5:[2,56]},{5:[2,78]},{5:[2,57]},{5:[2,58]},{5:[2,59]},{5:[1,154]},s(Ge,[2,18]),s(de,[2,11]),{13:155,54:ye,56:re},s(de,[2,13]),s(de,[2,14]),s(Ge,[2,20]),s(Ge,[2,36]),s(Ge,[2,37]),s(Ge,[2,38]),s(Ge,[2,39]),{20:[1,156]},s(Ge,[2,40]),{20:[1,157]},s(Ge,[2,41]),{20:[1,158]},s(Ge,[2,42]),{5:[1,159]},{5:[1,160]},{59:161,82:nn},{59:162,82:nn},{5:[2,68]},{5:[2,54]},{5:[2,55]},{27:163,73:Re},s(dn,[2,16]),s(de,[2,12]),s(bt,k,{8:108,45:164}),s(St,k,{8:110,47:165}),s(yt,k,{8:112,49:166}),s(Ge,[2,50]),s(Ge,[2,52]),{5:[2,66]},{5:[2,67]},{82:[2,62]},{21:[2,49]},{21:[2,47]},{21:[2,45]}],defaultActions:{7:[2,79],8:[2,1],9:[2,2],10:[2,3],53:[2,82],89:[2,64],90:[2,65],97:[2,81],124:[2,56],125:[2,78],126:[2,57],127:[2,58],128:[2,59],150:[2,68],151:[2,54],152:[2,55],161:[2,66],162:[2,67],163:[2,62],164:[2,49],165:[2,47],166:[2,45]},parseError:function(wt,At){if(At.recoverable)this.trace(wt);else{var He=new Error(wt);throw He.hash=At,He}},parse:function(wt){var At=this,He=[0],Ze=[],Lt=[null],Ve=[],Mn=this.table,Oe="",Di=0,rn=0,pi=2,Fr=1,tr=Ve.slice.call(arguments,1),Wn=Object.create(this.lexer),er={yy:{}};for(var Fn in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Fn)&&(er.yy[Fn]=this.yy[Fn]);Wn.setInput(wt,er.yy),er.yy.lexer=Wn,er.yy.parser=this,typeof Wn.yylloc>"u"&&(Wn.yylloc={});var nr=Wn.yylloc;Ve.push(nr);var ha=Wn.options&&Wn.options.ranges;typeof er.yy.parseError=="function"?this.parseError=er.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fa(){var Yn;return Yn=Ze.pop()||Wn.lex()||Fr,typeof Yn!="number"&&(Yn instanceof Array&&(Ze=Yn,Yn=Ze.pop()),Yn=At.symbols_[Yn]||Yn),Yn}for(var is,Xi,da,Cc,na={},Ji,Fi,vr,wr;;){if(Xi=He[He.length-1],this.defaultActions[Xi]?da=this.defaultActions[Xi]:((is===null||typeof is>"u")&&(is=fa()),da=Mn[Xi]&&Mn[Xi][is]),typeof da>"u"||!da.length||!da[0]){var ni="";wr=[];for(Ji in Mn[Xi])this.terminals_[Ji]&&Ji>pi&&wr.push("'"+this.terminals_[Ji]+"'");Wn.showPosition?ni="Parse error on line "+(Di+1)+`:
+`+Wn.showPosition()+`
+Expecting `+wr.join(", ")+", got '"+(this.terminals_[is]||is)+"'":ni="Parse error on line "+(Di+1)+": Unexpected "+(is==Fr?"end of input":"'"+(this.terminals_[is]||is)+"'"),this.parseError(ni,{text:Wn.match,token:this.terminals_[is]||is,line:Wn.yylineno,loc:nr,expected:wr})}if(da[0]instanceof Array&&da.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xi+", token: "+is);switch(da[0]){case 1:He.push(is),Lt.push(Wn.yytext),Ve.push(Wn.yylloc),He.push(da[1]),is=null,rn=Wn.yyleng,Oe=Wn.yytext,Di=Wn.yylineno,nr=Wn.yylloc;break;case 2:if(Fi=this.productions_[da[1]][1],na.$=Lt[Lt.length-Fi],na._$={first_line:Ve[Ve.length-(Fi||1)].first_line,last_line:Ve[Ve.length-1].last_line,first_column:Ve[Ve.length-(Fi||1)].first_column,last_column:Ve[Ve.length-1].last_column},ha&&(na._$.range=[Ve[Ve.length-(Fi||1)].range[0],Ve[Ve.length-1].range[1]]),Cc=this.performAction.apply(na,[Oe,rn,Di,er.yy,da[1],Lt,Ve].concat(tr)),typeof Cc<"u")return Cc;Fi&&(He=He.slice(0,-1*Fi*2),Lt=Lt.slice(0,-1*Fi),Ve=Ve.slice(0,-1*Fi)),He.push(this.productions_[da[1]][0]),Lt.push(na.$),Ve.push(na._$),vr=Mn[He[He.length-2]][He[He.length-1]],He.push(vr);break;case 3:return!0}}return!0}},Lr=function(){var Tt={EOF:1,parseError:function(At,He){if(this.yy.parser)this.yy.parser.parseError(At,He);else throw new Error(At)},setInput:function(wt,At){return this.yy=At||this.yy||{},this._input=wt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var wt=this._input[0];this.yytext+=wt,this.yyleng++,this.offset++,this.match+=wt,this.matched+=wt;var At=wt.match(/(?:\r\n?|\n).*/g);return At?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),wt},unput:function(wt){var At=wt.length,He=wt.split(/(?:\r\n?|\n)/g);this._input=wt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-At),this.offset-=At;var Ze=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),He.length-1&&(this.yylineno-=He.length-1);var Lt=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:He?(He.length===Ze.length?this.yylloc.first_column:0)+Ze[Ze.length-He.length].length-He[0].length:this.yylloc.first_column-At},this.options.ranges&&(this.yylloc.range=[Lt[0],Lt[0]+this.yyleng-At]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(wt){this.unput(this.match.slice(wt))},pastInput:function(){var wt=this.matched.substr(0,this.matched.length-this.match.length);return(wt.length>20?"...":"")+wt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var wt=this.match;return wt.length<20&&(wt+=this._input.substr(0,20-wt.length)),(wt.substr(0,20)+(wt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var wt=this.pastInput(),At=new Array(wt.length+1).join("-");return wt+this.upcomingInput()+`
+`+At+"^"},test_match:function(wt,At){var He,Ze,Lt;if(this.options.backtrack_lexer&&(Lt={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&&(Lt.yylloc.range=this.yylloc.range.slice(0))),Ze=wt[0].match(/(?:\r\n?|\n).*/g),Ze&&(this.yylineno+=Ze.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ze?Ze[Ze.length-1].length-Ze[Ze.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+wt[0].length},this.yytext+=wt[0],this.match+=wt[0],this.matches=wt,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(wt[0].length),this.matched+=wt[0],He=this.performAction.call(this,this.yy,this,At,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),He)return He;if(this._backtrack){for(var Ve in Lt)this[Ve]=Lt[Ve];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var wt,At,He,Ze;this._more||(this.yytext="",this.match="");for(var Lt=this._currentRules(),Ve=0;VeAt[0].length)){if(At=He,Ze=Ve,this.options.backtrack_lexer){if(wt=this.test_match(He,Lt[Ve]),wt!==!1)return wt;if(this._backtrack){At=!1;continue}else return!1}else if(!this.options.flex)break}return At?(wt=this.test_match(At,Lt[Ze]),wt!==!1?wt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var At=this.next();return At||this.lex()},begin:function(At){this.conditionStack.push(At)},popState:function(){var At=this.conditionStack.length-1;return At>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(At){return At=this.conditionStack.length-1-Math.abs(At||0),At>=0?this.conditionStack[At]:"INITIAL"},pushState:function(At){this.begin(At)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(At,He,Ze,Lt){switch(Ze){case 0:return this.begin("open_directive"),83;case 1:return this.begin("type_directive"),84;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),86;case 4:return 85;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 24;case 12:return this.begin("LINE"),19;case 13:return this.begin("ID"),54;case 14:return this.begin("ID"),56;case 15:return He.yytext=He.yytext.trim(),this.begin("ALIAS"),73;case 16:return this.popState(),this.popState(),this.begin("LINE"),55;case 17:return this.popState(),this.popState(),5;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),44;case 22:return this.begin("LINE"),53;case 23:return this.begin("LINE"),46;case 24:return this.begin("LINE"),52;case 25:return this.begin("LINE"),48;case 26:return this.begin("LINE"),51;case 27:return this.begin("LINE"),50;case 28:return this.popState(),20;case 29:return 21;case 30:return 68;case 31:return 69;case 32:return 62;case 33:return 63;case 34:return 64;case 35:return 65;case 36:return 60;case 37:return 57;case 38:return this.begin("ID"),26;case 39:return this.begin("ID"),28;case 40:return 34;case 41:return 35;case 42:return this.begin("acc_title"),36;case 43:return this.popState(),"acc_title_value";case 44:return this.begin("acc_descr"),38;case 45:return this.popState(),"acc_descr_value";case 46:this.begin("acc_descr_multiline");break;case 47:this.popState();break;case 48:return"acc_descr_multiline_value";case 49:return 7;case 50:return 23;case 51:return 25;case 52:return 67;case 53:return 5;case 54:return He.yytext=He.yytext.trim(),73;case 55:return 76;case 56:return 77;case 57:return 74;case 58:return 75;case 59:return 78;case 60:return 79;case 61:return 80;case 62:return 81;case 63:return 82;case 64:return 71;case 65:return 72;case 66:return 5;case 67:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?: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,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[47,48],inclusive:!1},acc_descr:{rules:[45],inclusive:!1},acc_title:{rules:[43],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,15],inclusive:!1},ALIAS:{rules:[7,8,16,17],inclusive:!1},LINE:{rules:[7,8,28],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return Tt}();vt.lexer=Lr;function xt(){this.yy={}}return xt.prototype=vt,vt.Parser=xt,new xt}();C0e.parser=C0e;const _Rt=C0e,CRt=s=>s.match(/^\s*sequenceDiagram/)!==null;let lP,r8={},UA=[],tm=[],iW=!1,S0e,A5;const SRt=function(s,o,f){Fl.parseDirective(this,s,o,f)},ARt=function(s){UA.push({name:s.text,wrap:s.wrap===void 0&&a9()||!!s.wrap,fill:s.color,actorKeys:[]}),A5=UA.slice(-1)[0]},A0e=function(s,o,f,p){let w=A5;const k=r8[s];if(k){if(A5&&k.box&&A5!==k.box)throw new Error("A same participant should only be defined in one Box: "+k.name+" can't be in '"+k.box.name+"' and in '"+A5.name+"' at the same time.");if(w=k.box?k.box:A5,k.box=w,k&&o===k.name&&f==null)return}(f==null||f.text==null)&&(f={text:o,wrap:null,type:p}),(p==null||f.text==null)&&(f={text:o,wrap:null,type:p}),r8[s]={box:w,name:o,description:f.text,wrap:f.wrap===void 0&&a9()||!!f.wrap,prevActor:lP,links:{},properties:{},actorCnt:null,rectData:null,type:p||"participant"},lP&&r8[lP]&&(r8[lP].nextActor=s),A5&&A5.actorKeys.push(s),lP=s},LRt=s=>{let o,f=0;for(o=0;o>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},k}return tm.push({from:s,to:o,message:f.text,wrap:f.wrap===void 0&&a9()||!!f.wrap,type:p}),!0},DRt=function(){return UA.length>0},IRt=function(){return UA.some(s=>s.name)},ORt=function(){return tm},NRt=function(){return UA},PRt=function(){return r8},hP=function(s){return r8[s]},BRt=function(){return Object.keys(r8)},FRt=function(){iW=!0},RRt=function(){iW=!1},jRt=()=>iW,$Rt=function(s){S0e=s},a9=()=>S0e!==void 0?S0e:Pt().sequence.wrap,HRt=function(){r8={},UA=[],tm=[],iW=!1,tp()},zRt=function(s){const o=s.trim(),f={text:o.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:o.match(/^:?wrap:/)!==null?!0:o.match(/^:?nowrap:/)!==null?!1:void 0};return je.debug("parseMessage:",f),f},GRt=function(s){const o=s.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let f=o!=null&&o[1]?o[1].trim():"transparent",p=o!=null&&o[2]?o[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",f)||(f="transparent",p=s.trim());else{const k=new Option().style;k.color=f,k.color!==f&&(f="transparent",p=s.trim())}return{color:f,text:p!==void 0?T2(p.replace(/^:?(?:no)?wrap:/,""),Pt()):void 0,wrap:p!==void 0?p.match(/^:?wrap:/)!==null?!0:p.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},fP={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},qRt={FILLED:0,OPEN:1},VRt={LEFTOF:0,RIGHTOF:1,OVER:2},yBe=function(s,o,f){f.text,f.wrap===void 0&&a9()||f.wrap;const p=[].concat(s,s);tm.push({from:p[0],to:p[1],message:f.text,wrap:f.wrap===void 0&&a9()||!!f.wrap,type:fP.NOTE,placement:o})},kBe=function(s,o){const f=hP(s);try{let p=T2(o.text,Pt());p=p.replace(/&/g,"&"),p=p.replace(/=/g,"=");const w=JSON.parse(p);L0e(f,w)}catch(p){je.error("error while parsing actor link text",p)}},URt=function(s,o){const f=hP(s);try{const b={};let _=T2(o.text,Pt());var p=_.indexOf("@");_=_.replace(/&/g,"&"),_=_.replace(/=/g,"=");var w=_.slice(0,p-1).trim(),k=_.slice(p+1).trim();b[w]=k,L0e(f,b)}catch(b){je.error("error while parsing actor link text",b)}};function L0e(s,o){if(s.links==null)s.links=o;else for(let f in o)s.links[f]=o[f]}const xBe=function(s,o){const f=hP(s);try{let p=T2(o.text,Pt());const w=JSON.parse(p);EBe(f,w)}catch(p){je.error("error while parsing actor properties text",p)}};function EBe(s,o){if(s.properties==null)s.properties=o;else for(let f in o)s.properties[f]=o[f]}function KRt(){A5=void 0}const TBe=function(s,o){const f=hP(s),p=document.getElementById(o.text);try{const w=p.innerHTML,k=JSON.parse(w);k.properties&&EBe(f,k.properties),k.links&&L0e(f,k.links)}catch(w){je.error("error while parsing actor details text",w)}},WRt=function(s,o){if(s!==void 0&&s.properties!==void 0)return s.properties[o]},_Be=function(s){if(Array.isArray(s))s.forEach(function(o){_Be(o)});else switch(s.type){case"sequenceIndex":tm.push({from:void 0,to:void 0,message:{start:s.sequenceIndex,step:s.sequenceIndexStep,visible:s.sequenceVisible},wrap:!1,type:s.signalType});break;case"addParticipant":A0e(s.actor,s.actor,s.description,"participant");break;case"addActor":A0e(s.actor,s.actor,s.description,"actor");break;case"activeStart":uf(s.actor,void 0,void 0,s.signalType);break;case"activeEnd":uf(s.actor,void 0,void 0,s.signalType);break;case"addNote":yBe(s.actor,s.placement,s.text);break;case"addLinks":kBe(s.actor,s.text);break;case"addALink":URt(s.actor,s.text);break;case"addProperties":xBe(s.actor,s.text);break;case"addDetails":TBe(s.actor,s.text);break;case"addMessage":uf(s.from,s.to,s.msg,s.signalType);break;case"boxStart":ARt(s.boxData);break;case"boxEnd":KRt();break;case"loopStart":uf(void 0,void 0,s.loopText,s.signalType);break;case"loopEnd":uf(void 0,void 0,void 0,s.signalType);break;case"rectStart":uf(void 0,void 0,s.color,s.signalType);break;case"rectEnd":uf(void 0,void 0,void 0,s.signalType);break;case"optStart":uf(void 0,void 0,s.optText,s.signalType);break;case"optEnd":uf(void 0,void 0,void 0,s.signalType);break;case"altStart":uf(void 0,void 0,s.altText,s.signalType);break;case"else":uf(void 0,void 0,s.altText,s.signalType);break;case"altEnd":uf(void 0,void 0,void 0,s.signalType);break;case"setAccTitle":np(s.text);break;case"parStart":uf(void 0,void 0,s.parText,s.signalType);break;case"and":uf(void 0,void 0,s.parText,s.signalType);break;case"parEnd":uf(void 0,void 0,void 0,s.signalType);break;case"criticalStart":uf(void 0,void 0,s.criticalText,s.signalType);break;case"option":uf(void 0,void 0,s.optionText,s.signalType);break;case"criticalEnd":uf(void 0,void 0,void 0,s.signalType);break;case"breakStart":uf(void 0,void 0,s.breakText,s.signalType);break;case"breakEnd":uf(void 0,void 0,void 0,s.signalType);break}},CBe={addActor:A0e,addMessage:MRt,addSignal:uf,addLinks:kBe,addDetails:TBe,addProperties:xBe,autoWrap:a9,setWrap:$Rt,enableSequenceNumbers:FRt,disableSequenceNumbers:RRt,showSequenceNumbers:jRt,getMessages:ORt,getActors:PRt,getActor:hP,getActorKeys:BRt,getActorProperty:WRt,getAccTitle:C2,getBoxes:NRt,getDiagramTitle:Ww,setDiagramTitle:Kw,parseDirective:SRt,getConfig:()=>Pt().sequence,clear:HRt,parseMessage:zRt,parseBoxData:GRt,LINETYPE:fP,ARROWTYPE:qRt,PLACEMENT:VRt,addNote:yBe,setAccTitle:np,apply:_Be,setAccDescription:S2,getAccDescription:A2,hasAtLeastOneBox:DRt,hasAtLeastOneBoxWithTitle:IRt};let M0e=[];const YRt=s=>{M0e.push(s)},SBe=()=>{M0e.forEach(s=>{s()}),M0e=[]},sW=function(s,o){const f=s.append("rect");return f.attr("x",o.x),f.attr("y",o.y),f.attr("fill",o.fill),f.attr("stroke",o.stroke),f.attr("width",o.width),f.attr("height",o.height),f.attr("rx",o.rx),f.attr("ry",o.ry),o.class!==void 0&&f.attr("class",o.class),f},ABe=(s,o)=>{YRt(()=>{const f=document.querySelectorAll(s);f.length!==0&&(f[0].addEventListener("mouseover",function(){JRt("actor"+o+"_popup")}),f[0].addEventListener("mouseout",function(){ejt("actor"+o+"_popup")}))})},XRt=function(s,o,f,p,w){if(o.links===void 0||o.links===null||Object.keys(o.links).length===0)return{height:0,width:0};const k=o.links,b=o.actorCnt,_=o.rectData;var A="none";w&&(A="block !important");const N=s.append("g");N.attr("id","actor"+b+"_popup"),N.attr("class","actorPopupMenu"),N.attr("display",A),ABe("#actor"+b+"_popup",b);var B="";_.class!==void 0&&(B=" "+_.class);let F=_.width>f?_.width:f;const H=N.append("rect");if(H.attr("class","actorPopupMenuPanel"+B),H.attr("x",_.x),H.attr("y",_.height),H.attr("fill",_.fill),H.attr("stroke",_.stroke),H.attr("width",F),H.attr("height",_.height),H.attr("rx",_.rx),H.attr("ry",_.ry),k!=null){var j=20;for(let ae in k){var V=N.append("a"),Z=a5(k[ae]);V.attr("xlink:href",Z),V.attr("target","_blank"),pjt(p)(ae,V,_.x+10,_.height+j,F,20,{class:"actor"},p),j+=30}}return H.attr("height",j),{height:_.height+j,width:F}},LBe=function(s,o,f,p){const w=s.append("image");w.attr("x",o),w.attr("y",f);var k=a5(p);w.attr("xlink:href",k)},MBe=function(s,o,f,p){const w=s.append("use");w.attr("x",o),w.attr("y",f);var k=a5(p);w.attr("xlink:href","#"+k)},QRt=function(s){return"var pu = document.getElementById('"+s+"'); if (pu != null) { pu.style.display = 'block'; }"},ZRt=function(s){return"var pu = document.getElementById('"+s+"'); if (pu != null) { pu.style.display = 'none'; }"},JRt=function(s){var o=document.getElementById(s);o!=null&&(o.style.display="block")},ejt=function(s){var o=document.getElementById(s);o!=null&&(o.style.display="none")},KA=function(s,o){let f=0,p=0;const w=o.text.split(xa.lineBreakRegex),[k,b]=TN(o.fontSize);let _=[],A=0,N=()=>o.y;if(o.valign!==void 0&&o.textMargin!==void 0&&o.textMargin>0)switch(o.valign){case"top":case"start":N=()=>Math.round(o.y+o.textMargin);break;case"middle":case"center":N=()=>Math.round(o.y+(f+p+o.textMargin)/2);break;case"bottom":case"end":N=()=>Math.round(o.y+(f+p+2*o.textMargin)-o.textMargin);break}if(o.anchor!==void 0&&o.textMargin!==void 0&&o.width!==void 0)switch(o.anchor){case"left":case"start":o.x=Math.round(o.x+o.textMargin),o.anchor="start",o.dominantBaseline="middle",o.alignmentBaseline="middle";break;case"middle":case"center":o.x=Math.round(o.x+o.width/2),o.anchor="middle",o.dominantBaseline="middle",o.alignmentBaseline="middle";break;case"right":case"end":o.x=Math.round(o.x+o.width-o.textMargin),o.anchor="end",o.dominantBaseline="middle",o.alignmentBaseline="middle";break}for(let[B,F]of w.entries()){o.textMargin!==void 0&&o.textMargin===0&&k!==void 0&&(A=B*k);const H=s.append("text");if(H.attr("x",o.x),H.attr("y",N()),o.anchor!==void 0&&H.attr("text-anchor",o.anchor).attr("dominant-baseline",o.dominantBaseline).attr("alignment-baseline",o.alignmentBaseline),o.fontFamily!==void 0&&H.style("font-family",o.fontFamily),b!==void 0&&H.style("font-size",b),o.fontWeight!==void 0&&H.style("font-weight",o.fontWeight),o.fill!==void 0&&H.attr("fill",o.fill),o.class!==void 0&&H.attr("class",o.class),o.dy!==void 0?H.attr("dy",o.dy):A!==0&&H.attr("dy",A),o.tspan){const j=H.append("tspan");j.attr("x",o.x),o.fill!==void 0&&j.attr("fill",o.fill),j.text(F)}else H.text(F);o.valign!==void 0&&o.textMargin!==void 0&&o.textMargin>0&&(p+=(H._groups||H)[0][0].getBBox().height,f=p),_.push(H)}return _},DBe=function(s,o){function f(w,k,b,_,A){return w+","+k+" "+(w+b)+","+k+" "+(w+b)+","+(k+_-A)+" "+(w+b-A*1.2)+","+(k+_)+" "+w+","+(k+_)}const p=s.append("polygon");return p.attr("points",f(o.x,o.y,o.width,o.height,7)),p.attr("class","labelBox"),o.y=o.y+o.height/2,KA(s,o),p};let l3=-1;const IBe=(s,o)=>{s.selectAll&&s.selectAll(".actor-line").attr("class","200").attr("y2",o-55)},tjt=function(s,o,f,p){const w=o.x+o.width/2,k=o.y+5,b=s.append("g");var _=b;p||(l3++,_.append("line").attr("id","actor"+l3).attr("x1",w).attr("y1",k).attr("x2",w).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),_=b.append("g"),o.actorCnt=l3,o.links!=null&&(_.attr("id","root-"+l3),ABe("#root-"+l3,l3)));const A=aW();var N="actor";o.properties!=null&&o.properties.class?N=o.properties.class:A.fill="#eaeaea",A.x=o.x,A.y=o.y,A.width=o.width,A.height=o.height,A.class=N,A.rx=3,A.ry=3;const B=sW(_,A);if(o.rectData=A,o.properties!=null&&o.properties.icon){const H=o.properties.icon.trim();H.charAt(0)==="@"?MBe(_,A.x+A.width-20,A.y+10,H.substr(1)):LBe(_,A.x+A.width-20,A.y+10,H)}I0e(f)(o.description,_,A.x,A.y,A.width,A.height,{class:"actor"},f);let F=o.height;if(B.node){const H=B.node().getBBox();o.height=H.height,F=H.height}return F},njt=function(s,o,f,p){const w=o.x+o.width/2,k=o.y+80;p||(l3++,s.append("line").attr("id","actor"+l3).attr("x1",w).attr("y1",k).attr("x2",w).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const b=s.append("g");b.attr("class","actor-man");const _=aW();_.x=o.x,_.y=o.y,_.fill="#eaeaea",_.width=o.width,_.height=o.height,_.class="actor",_.rx=3,_.ry=3,b.append("line").attr("id","actor-man-torso"+l3).attr("x1",w).attr("y1",o.y+25).attr("x2",w).attr("y2",o.y+45),b.append("line").attr("id","actor-man-arms"+l3).attr("x1",w-18).attr("y1",o.y+33).attr("x2",w+18).attr("y2",o.y+33),b.append("line").attr("x1",w-18).attr("y1",o.y+60).attr("x2",w).attr("y2",o.y+45),b.append("line").attr("x1",w).attr("y1",o.y+45).attr("x2",w+16).attr("y2",o.y+60);const A=b.append("circle");A.attr("cx",o.x+o.width/2),A.attr("cy",o.y+10),A.attr("r",15),A.attr("width",o.width),A.attr("height",o.height);const N=b.node().getBBox();return o.height=N.height,I0e(f)(o.description,b,_.x,_.y+35,_.width,_.height,{class:"actor"},f),o.height},rjt=function(s,o,f,p){switch(o.type){case"actor":return njt(s,o,f,p);case"participant":return tjt(s,o,f,p)}},ijt=function(s,o,f){const w=s.append("g");OBe(w,o),o.name&&I0e(f)(o.name,w,o.x,o.y+(o.textMaxHeight||0)/2,o.width,0,{class:"text"},f),w.lower()},sjt=function(s){return s.append("g")},ajt=function(s,o,f,p,w){const k=aW(),b=o.anchored;k.x=o.startx,k.y=o.starty,k.class="activation"+w%3,k.width=o.stopx-o.startx,k.height=f-o.starty,sW(b,k)},ojt=function(s,o,f,p){const{boxMargin:w,boxTextMargin:k,labelBoxHeight:b,labelBoxWidth:_,messageFontFamily:A,messageFontSize:N,messageFontWeight:B}=p,F=s.append("g"),H=function(Z,ae,le,ce){return F.append("line").attr("x1",Z).attr("y1",ae).attr("x2",le).attr("y2",ce).attr("class","loopLine")};H(o.startx,o.starty,o.stopx,o.starty),H(o.stopx,o.starty,o.stopx,o.stopy),H(o.startx,o.stopy,o.stopx,o.stopy),H(o.startx,o.starty,o.startx,o.stopy),o.sections!==void 0&&o.sections.forEach(function(Z){H(o.startx,Z.y,o.stopx,Z.y).style("stroke-dasharray","3, 3")});let j=D0e();j.text=f,j.x=o.startx,j.y=o.starty,j.fontFamily=A,j.fontSize=N,j.fontWeight=B,j.anchor="middle",j.valign="middle",j.tspan=!1,j.width=_||50,j.height=b||20,j.textMargin=k,j.class="labelText",DBe(F,j),j=D0e(),j.text=o.title,j.x=o.startx+_/2+(o.stopx-o.startx)/2,j.y=o.starty+w+k,j.anchor="middle",j.valign="middle",j.textMargin=k,j.class="loopText",j.fontFamily=A,j.fontSize=N,j.fontWeight=B,j.wrap=!0;let V=KA(F,j);return o.sectionTitles!==void 0&&o.sectionTitles.forEach(function(Z,ae){if(Z.message){j.text=Z.message,j.x=o.startx+(o.stopx-o.startx)/2,j.y=o.sections[ae].y+w+k,j.class="loopText",j.anchor="middle",j.valign="middle",j.tspan=!1,j.fontFamily=A,j.fontSize=N,j.fontWeight=B,j.wrap=o.wrap,V=KA(F,j);let le=Math.round(V.map(ce=>(ce._groups||ce)[0][0].getBBox().height).reduce((ce,be)=>ce+be));o.sections[ae].height+=le-(w+k)}}),o.height=Math.round(o.stopy-o.starty),F},OBe=function(s,o){sW(s,{x:o.startx,y:o.starty,width:o.stopx-o.startx,height:o.stopy-o.starty,fill:o.fill,stroke:o.stroke,class:"rect"}).lower()},cjt=function(s){s.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},ujt=function(s){s.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},ljt=function(s){s.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},hjt=function(s){s.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},fjt=function(s){s.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},djt=function(s){s.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},gjt=function(s){s.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",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")},D0e=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}},aW=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},I0e=function(){function s(w,k,b,_,A,N,B){const F=k.append("text").attr("x",b+A/2).attr("y",_+N/2+5).style("text-anchor","middle").text(w);p(F,B)}function o(w,k,b,_,A,N,B,F){const{actorFontSize:H,actorFontFamily:j,actorFontWeight:V}=F,[Z,ae]=TN(H),le=w.split(xa.lineBreakRegex);for(let ce=0;ces.height||0))+(this.loops.length===0?0:this.loops.map(s=>s.height||0).reduce((s,o)=>s+o))+(this.messages.length===0?0:this.messages.map(s=>s.height||0).reduce((s,o)=>s+o))+(this.notes.length===0?0:this.notes.map(s=>s.height||0).reduce((s,o)=>s+o))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(s){this.boxes.push(s)},addActor:function(s){this.actors.push(s)},addLoop:function(s){this.loops.push(s)},addMessage:function(s){this.messages.push(s)},addNote:function(s){this.notes.push(s)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init: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,PBe(Pt())},updateVal:function(s,o,f,p){s[o]===void 0?s[o]=f:s[o]=p(f,s[o])},updateBounds:function(s,o,f,p){const w=this;let k=0;function b(_){return function(N){k++;const B=w.sequenceItems.length-k+1;w.updateVal(N,"starty",o-B*hn.boxMargin,Math.min),w.updateVal(N,"stopy",p+B*hn.boxMargin,Math.max),w.updateVal(ai.data,"startx",s-B*hn.boxMargin,Math.min),w.updateVal(ai.data,"stopx",f+B*hn.boxMargin,Math.max),_!=="activation"&&(w.updateVal(N,"startx",s-B*hn.boxMargin,Math.min),w.updateVal(N,"stopx",f+B*hn.boxMargin,Math.max),w.updateVal(ai.data,"starty",o-B*hn.boxMargin,Math.min),w.updateVal(ai.data,"stopy",p+B*hn.boxMargin,Math.max))}}this.sequenceItems.forEach(b()),this.activations.forEach(b("activation"))},insert:function(s,o,f,p){const w=Math.min(s,f),k=Math.max(s,f),b=Math.min(o,p),_=Math.max(o,p);this.updateVal(ai.data,"startx",w,Math.min),this.updateVal(ai.data,"starty",b,Math.min),this.updateVal(ai.data,"stopx",k,Math.max),this.updateVal(ai.data,"stopy",_,Math.max),this.updateBounds(w,b,k,_)},newActivation:function(s,o,f){const p=f[s.from.actor],w=oW(s.from.actor).length||0,k=p.x+p.width/2+(w-1)*hn.activationWidth/2;this.activations.push({startx:k,starty:this.verticalPos+2,stopx:k+hn.activationWidth,stopy:void 0,actor:s.from.actor,anchored:sh.anchorElement(o)})},endActivation:function(s){const o=this.activations.map(function(f){return f.actor}).lastIndexOf(s.from.actor);return this.activations.splice(o,1)[0]},createLoop:function(s={message:void 0,wrap:!1,width:void 0},o){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:s.message,wrap:s.wrap,width:s.width,height:0,fill:o}},newLoop:function(s={message:void 0,wrap:!1,width:void 0},o){this.sequenceItems.push(this.createLoop(s,o))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(s){const o=this.sequenceItems.pop();o.sections=o.sections||[],o.sectionTitles=o.sectionTitles||[],o.sections.push({y:ai.getVerticalPos(),height:0}),o.sectionTitles.push(s),this.sequenceItems.push(o)},bumpVerticalPos:function(s){this.verticalPos=this.verticalPos+s,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},bjt=function(s,o){ai.bumpVerticalPos(hn.boxMargin),o.height=hn.boxMargin,o.starty=ai.getVerticalPos();const f=sh.getNoteRect();f.x=o.startx,f.y=o.starty,f.width=o.width||hn.width,f.class="note";const p=s.append("g"),w=sh.drawRect(p,f),k=sh.getTextObj();k.x=o.startx,k.y=o.starty,k.width=f.width,k.dy="1em",k.text=o.message,k.class="noteText",k.fontFamily=hn.noteFontFamily,k.fontSize=hn.noteFontSize,k.fontWeight=hn.noteFontWeight,k.anchor=hn.noteAlign,k.textMargin=hn.noteMargin,k.valign="center";const b=KA(p,k),_=Math.round(b.map(A=>(A._groups||A)[0][0].getBBox().height).reduce((A,N)=>A+N));w.attr("height",_+2*hn.noteMargin),o.height+=_+2*hn.noteMargin,ai.bumpVerticalPos(_+2*hn.noteMargin),o.stopy=o.starty+_+2*hn.noteMargin,o.stopx=o.startx+f.width,ai.insert(o.startx,o.starty,o.stopx,o.stopy),ai.models.addNote(o)},o9=s=>({fontFamily:s.messageFontFamily,fontSize:s.messageFontSize,fontWeight:s.messageFontWeight}),WA=s=>({fontFamily:s.noteFontFamily,fontSize:s.noteFontSize,fontWeight:s.noteFontWeight}),O0e=s=>({fontFamily:s.actorFontFamily,fontSize:s.actorFontSize,fontWeight:s.actorFontWeight});function vjt(s,o){ai.bumpVerticalPos(10);const{startx:f,stopx:p,message:w}=o,k=xa.splitBreaks(w).length,b=Pa.calculateTextDimensions(w,o9(hn)),_=b.height/k;o.height+=_,ai.bumpVerticalPos(_);let A,N=b.height-10;const B=b.width;if(f===p){A=ai.getVerticalPos()+N,hn.rightAngles||(N+=hn.boxMargin,A=ai.getVerticalPos()+N),N+=30;const F=Math.max(B/2,hn.width/2);ai.insert(f-F,ai.getVerticalPos()-10+N,p+F,ai.getVerticalPos()+30+N)}else N+=hn.boxMargin,A=ai.getVerticalPos()+N,ai.insert(f,A-10,p,A);return ai.bumpVerticalPos(N),o.height+=N,o.stopy=o.starty+o.height,ai.insert(o.fromBounds,o.starty,o.toBounds,o.stopy),A}const wjt=function(s,o,f,p){const{startx:w,stopx:k,starty:b,message:_,type:A,sequenceIndex:N,sequenceVisible:B}=o,F=Pa.calculateTextDimensions(_,o9(hn)),H=sh.getTextObj();H.x=w,H.y=b+10,H.width=k-w,H.class="messageText",H.dy="1em",H.text=_,H.fontFamily=hn.messageFontFamily,H.fontSize=hn.messageFontSize,H.fontWeight=hn.messageFontWeight,H.anchor=hn.messageAlign,H.valign="center",H.textMargin=hn.wrapPadding,H.tspan=!1,KA(s,H);const j=F.width;let V;w===k?hn.rightAngles?V=s.append("path").attr("d",`M ${w},${f} H ${w+Math.max(hn.width/2,j/2)} V ${f+25} H ${w}`):V=s.append("path").attr("d","M "+w+","+f+" C "+(w+60)+","+(f-10)+" "+(w+60)+","+(f+30)+" "+w+","+(f+20)):(V=s.append("line"),V.attr("x1",w),V.attr("y1",f),V.attr("x2",k),V.attr("y2",f)),A===p.db.LINETYPE.DOTTED||A===p.db.LINETYPE.DOTTED_CROSS||A===p.db.LINETYPE.DOTTED_POINT||A===p.db.LINETYPE.DOTTED_OPEN?(V.style("stroke-dasharray","3, 3"),V.attr("class","messageLine1")):V.attr("class","messageLine0");let Z="";hn.arrowMarkerAbsolute&&(Z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Z=Z.replace(/\(/g,"\\("),Z=Z.replace(/\)/g,"\\)")),V.attr("stroke-width",2),V.attr("stroke","none"),V.style("fill","none"),(A===p.db.LINETYPE.SOLID||A===p.db.LINETYPE.DOTTED)&&V.attr("marker-end","url("+Z+"#arrowhead)"),(A===p.db.LINETYPE.SOLID_POINT||A===p.db.LINETYPE.DOTTED_POINT)&&V.attr("marker-end","url("+Z+"#filled-head)"),(A===p.db.LINETYPE.SOLID_CROSS||A===p.db.LINETYPE.DOTTED_CROSS)&&V.attr("marker-end","url("+Z+"#crosshead)"),(B||hn.showSequenceNumbers)&&(V.attr("marker-start","url("+Z+"#sequencenumber)"),s.append("text").attr("x",w).attr("y",f+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(N))},N0e=function(s,o,f,p,w,k,b){if(w.hideUnusedParticipants===!0){const F=new Set;k.forEach(H=>{F.add(H.from),F.add(H.to)}),f=f.filter(H=>F.has(H))}let _=0,A=0,N=0,B;for(const F of f){const H=o[F],j=H.box;B&&B!=j&&(b||ai.models.addBox(B),A+=hn.boxMargin+B.margin),j&&j!=B&&(b||(j.x=_+A,j.y=p),A+=j.margin),H.width=H.width||hn.width,H.height=Math.max(H.height||hn.height,hn.height),H.margin=H.margin||hn.actorMargin,H.x=_+A,H.y=ai.getVerticalPos();const V=sh.drawActor(s,H,hn,b);N=Math.max(N,V),ai.insert(H.x,p,H.x+H.width,H.height),_+=H.width+A,H.box&&(H.box.width=_+j.margin-H.box.x),A=H.margin,B=H.box,ai.models.addActor(H)}B&&!b&&ai.models.addBox(B),ai.bumpVerticalPos(N)},NBe=function(s,o,f,p){let w=0,k=0;for(const b of f){const _=o[b],A=kjt(_),N=sh.drawPopup(s,_,A,hn,hn.forceMenus,p);N.height>w&&(w=N.height),N.width+_.x>k&&(k=N.width+_.x)}return{maxHeight:w,maxWidth:k}},PBe=function(s){nd(hn,s),s.fontFamily&&(hn.actorFontFamily=hn.noteFontFamily=hn.messageFontFamily=s.fontFamily),s.fontSize&&(hn.actorFontSize=hn.noteFontSize=hn.messageFontSize=s.fontSize),s.fontWeight&&(hn.actorFontWeight=hn.noteFontWeight=hn.messageFontWeight=s.fontWeight)},oW=function(s){return ai.activations.filter(function(o){return o.actor===s})},BBe=function(s,o){const f=o[s],p=oW(s),w=p.reduce(function(b,_){return Math.min(b,_.startx)},f.x+f.width/2),k=p.reduce(function(b,_){return Math.max(b,_.stopx)},f.x+f.width/2);return[w,k]};function h3(s,o,f,p,w){ai.bumpVerticalPos(f);let k=p;if(o.id&&o.message&&s[o.id]){const b=s[o.id].width,_=o9(hn);o.message=Pa.wrapLabel(`[${o.message}]`,b-2*hn.wrapPadding,_),o.width=b,o.wrap=!0;const A=Pa.calculateTextDimensions(o.message,_),N=Math.max(A.height,hn.labelBoxHeight);k=p+N,je.debug(`${N} - ${o.message}`)}w(o),ai.bumpVerticalPos(k)}const mjt=function(s,o,f,p){const{securityLevel:w,sequence:k}=Pt();hn=k,p.db.clear(),p.parser.parse(s);let b;w==="sandbox"&&(b=sr("#i"+o));const _=sr(w==="sandbox"?b.nodes()[0].contentDocument.body:"body"),A=w==="sandbox"?b.nodes()[0].contentDocument:document;ai.init(),je.debug(p.db);const N=w==="sandbox"?_.select(`[id="${o}"]`):sr(`[id="${o}"]`),B=p.db.getActors(),F=p.db.getBoxes(),H=p.db.getActorKeys(),j=p.db.getMessages(),V=p.db.getDiagramTitle(),Z=p.db.hasAtLeastOneBox(),ae=p.db.hasAtLeastOneBoxWithTitle(),le=yjt(B,j,p);hn.height=xjt(B,le,F),sh.insertComputerIcon(N),sh.insertDatabaseIcon(N),sh.insertClockIcon(N),Z&&(ai.bumpVerticalPos(hn.boxMargin),ae&&ai.bumpVerticalPos(F[0].textMaxHeight)),N0e(N,B,H,0,hn,j,!1);const ce=_jt(j,B,le,p);sh.insertArrowHead(N),sh.insertArrowCrossHead(N),sh.insertArrowFilledHead(N),sh.insertSequenceNumber(N);function be(Re,pe){const Ge=ai.endActivation(Re);Ge.starty+18>pe&&(Ge.starty=pe-6,pe+=12),sh.drawActivation(N,Ge,pe,hn,oW(Re.from.actor).length),ai.insert(Ge.startx,pe-10,Ge.stopx,pe)}let xe=1,Ee=1;const Me=[];j.forEach(function(Re){let pe,Ge,de;switch(Re.type){case p.db.LINETYPE.NOTE:Ge=Re.noteModel,bjt(N,Ge);break;case p.db.LINETYPE.ACTIVE_START:ai.newActivation(Re,N,B);break;case p.db.LINETYPE.ACTIVE_END:be(Re,ai.getVerticalPos());break;case p.db.LINETYPE.LOOP_START:h3(ce,Re,hn.boxMargin,hn.boxMargin+hn.boxTextMargin,ct=>ai.newLoop(ct));break;case p.db.LINETYPE.LOOP_END:pe=ai.endLoop(),sh.drawLoop(N,pe,"loop",hn),ai.bumpVerticalPos(pe.stopy-ai.getVerticalPos()),ai.models.addLoop(pe);break;case p.db.LINETYPE.RECT_START:h3(ce,Re,hn.boxMargin,hn.boxMargin,ct=>ai.newLoop(void 0,ct.message));break;case p.db.LINETYPE.RECT_END:pe=ai.endLoop(),sh.drawBackgroundRect(N,pe),ai.models.addLoop(pe),ai.bumpVerticalPos(pe.stopy-ai.getVerticalPos());break;case p.db.LINETYPE.OPT_START:h3(ce,Re,hn.boxMargin,hn.boxMargin+hn.boxTextMargin,ct=>ai.newLoop(ct));break;case p.db.LINETYPE.OPT_END:pe=ai.endLoop(),sh.drawLoop(N,pe,"opt",hn),ai.bumpVerticalPos(pe.stopy-ai.getVerticalPos()),ai.models.addLoop(pe);break;case p.db.LINETYPE.ALT_START:h3(ce,Re,hn.boxMargin,hn.boxMargin+hn.boxTextMargin,ct=>ai.newLoop(ct));break;case p.db.LINETYPE.ALT_ELSE:h3(ce,Re,hn.boxMargin+hn.boxTextMargin,hn.boxMargin,ct=>ai.addSectionToLoop(ct));break;case p.db.LINETYPE.ALT_END:pe=ai.endLoop(),sh.drawLoop(N,pe,"alt",hn),ai.bumpVerticalPos(pe.stopy-ai.getVerticalPos()),ai.models.addLoop(pe);break;case p.db.LINETYPE.PAR_START:h3(ce,Re,hn.boxMargin,hn.boxMargin+hn.boxTextMargin,ct=>ai.newLoop(ct));break;case p.db.LINETYPE.PAR_AND:h3(ce,Re,hn.boxMargin+hn.boxTextMargin,hn.boxMargin,ct=>ai.addSectionToLoop(ct));break;case p.db.LINETYPE.PAR_END:pe=ai.endLoop(),sh.drawLoop(N,pe,"par",hn),ai.bumpVerticalPos(pe.stopy-ai.getVerticalPos()),ai.models.addLoop(pe);break;case p.db.LINETYPE.AUTONUMBER:xe=Re.message.start||xe,Ee=Re.message.step||Ee,Re.message.visible?p.db.enableSequenceNumbers():p.db.disableSequenceNumbers();break;case p.db.LINETYPE.CRITICAL_START:h3(ce,Re,hn.boxMargin,hn.boxMargin+hn.boxTextMargin,ct=>ai.newLoop(ct));break;case p.db.LINETYPE.CRITICAL_OPTION:h3(ce,Re,hn.boxMargin+hn.boxTextMargin,hn.boxMargin,ct=>ai.addSectionToLoop(ct));break;case p.db.LINETYPE.CRITICAL_END:pe=ai.endLoop(),sh.drawLoop(N,pe,"critical",hn),ai.bumpVerticalPos(pe.stopy-ai.getVerticalPos()),ai.models.addLoop(pe);break;case p.db.LINETYPE.BREAK_START:h3(ce,Re,hn.boxMargin,hn.boxMargin+hn.boxTextMargin,ct=>ai.newLoop(ct));break;case p.db.LINETYPE.BREAK_END:pe=ai.endLoop(),sh.drawLoop(N,pe,"break",hn),ai.bumpVerticalPos(pe.stopy-ai.getVerticalPos()),ai.models.addLoop(pe);break;default:try{de=Re.msgModel,de.starty=ai.getVerticalPos(),de.sequenceIndex=xe,de.sequenceVisible=p.db.showSequenceNumbers();const ct=vjt(N,de);Me.push({messageModel:de,lineStartY:ct}),ai.models.addMessage(de)}catch(ct){je.error("error while drawing message",ct)}}[p.db.LINETYPE.SOLID_OPEN,p.db.LINETYPE.DOTTED_OPEN,p.db.LINETYPE.SOLID,p.db.LINETYPE.DOTTED,p.db.LINETYPE.SOLID_CROSS,p.db.LINETYPE.DOTTED_CROSS,p.db.LINETYPE.SOLID_POINT,p.db.LINETYPE.DOTTED_POINT].includes(Re.type)&&(xe=xe+Ee)}),Me.forEach(Re=>wjt(N,Re.messageModel,Re.lineStartY,p)),hn.mirrorActors&&(ai.bumpVerticalPos(hn.boxMargin*2),N0e(N,B,H,ai.getVerticalPos(),hn,j,!0),ai.bumpVerticalPos(hn.boxMargin),IBe(N,ai.getVerticalPos())),ai.models.boxes.forEach(function(Re){Re.height=ai.getVerticalPos()-Re.y,ai.insert(Re.x,Re.y,Re.x+Re.width,Re.height),Re.startx=Re.x,Re.starty=Re.y,Re.stopx=Re.startx+Re.width,Re.stopy=Re.starty+Re.height,Re.stroke="rgb(0,0,0, 0.5)",sh.drawBox(N,Re,hn)}),Z&&ai.bumpVerticalPos(hn.boxMargin);const fe=NBe(N,B,H,A),{bounds:ye}=ai.getBounds();je.debug("For line height fix Querying: #"+o+" .actor-line"),_fe("#"+o+" .actor-line").attr("y2",ye.stopy);let we=ye.stopy-ye.starty;we{const b=s[k];b.wrap&&(b.description=Pa.wrapLabel(b.description,hn.width-2*hn.wrapPadding,O0e(hn)));const _=Pa.calculateTextDimensions(b.description,O0e(hn));b.width=b.wrap?hn.width:Math.max(hn.width,_.width+2*hn.wrapPadding),b.height=b.wrap?Math.max(_.height,hn.height):hn.height,p=Math.max(p,b.height)});for(const k in o){const b=s[k];if(!b)continue;const _=s[b.nextActor];if(!_){const F=o[k]+hn.actorMargin-b.width/2;b.margin=Math.max(F,hn.actorMargin);continue}const N=o[k]+hn.actorMargin-b.width/2-_.width/2;b.margin=Math.max(N,hn.actorMargin)}let w=0;return f.forEach(k=>{const b=o9(hn);let _=k.actorKeys.reduce((B,F)=>B+=s[F].width+(s[F].margin||0),0);_-=2*hn.boxTextMargin,k.wrap&&(k.name=Pa.wrapLabel(k.name,_-2*hn.wrapPadding,b));const A=Pa.calculateTextDimensions(k.name,b);w=Math.max(A.height,w);const N=Math.max(_,A.width+2*hn.wrapPadding);if(k.margin=hn.boxTextMargin,_k.textMaxHeight=w),Math.max(p,hn.height)}const Ejt=function(s,o,f){const p=o[s.from].x,w=o[s.to].x,k=s.wrap&&s.message;let b=Pa.calculateTextDimensions(k?Pa.wrapLabel(s.message,hn.width,WA(hn)):s.message,WA(hn));const _={width:k?hn.width:Math.max(hn.width,b.width+2*hn.noteMargin),height:0,startx:o[s.from].x,stopx:0,starty:0,stopy:0,message:s.message};return s.placement===f.db.PLACEMENT.RIGHTOF?(_.width=k?Math.max(hn.width,b.width):Math.max(o[s.from].width/2+o[s.to].width/2,b.width+2*hn.noteMargin),_.startx=p+(o[s.from].width+hn.actorMargin)/2):s.placement===f.db.PLACEMENT.LEFTOF?(_.width=Math.max(k?hn.width:o[s.from].width/2+o[s.to].width/2,b.width+2*hn.noteMargin),_.startx=p-_.width+(o[s.from].width-hn.actorMargin)/2):s.to===s.from?(b=Pa.calculateTextDimensions(k?Pa.wrapLabel(s.message,Math.max(hn.width,o[s.from].width),WA(hn)):s.message,WA(hn)),_.width=k?Math.max(hn.width,o[s.from].width):Math.max(o[s.from].width,hn.width,b.width+2*hn.noteMargin),_.startx=p+(o[s.from].width-_.width)/2):(_.width=Math.abs(p+o[s.from].width/2-(w+o[s.to].width/2))+hn.actorMargin,_.startx=pH.actor).lastIndexOf(N.from.actor);delete ai.activations.splice(F,1)[0]}break}N.placement!==void 0?(_=Ejt(N,o,p),N.noteModel=_,k.forEach(F=>{b=F,b.from=Math.min(b.from,_.startx),b.to=Math.max(b.to,_.startx+_.width),b.width=Math.max(b.width,Math.abs(b.from-b.to))-hn.labelBoxWidth})):(A=Tjt(N,o,p),N.msgModel=A,A.startx&&A.stopx&&k.length>0&&k.forEach(F=>{if(b=F,A.startx===A.stopx){const H=o[N.from],j=o[N.to];b.from=Math.min(H.x-A.width/2,H.x-H.width/2,b.from),b.to=Math.max(j.x+A.width/2,j.x+H.width/2,b.to),b.width=Math.max(b.width,Math.abs(b.to-b.from))-hn.labelBoxWidth}else b.from=Math.min(A.startx,b.from),b.to=Math.max(A.stopx,b.to),b.width=Math.max(b.width,A.width)-hn.labelBoxWidth}))}),ai.activations=[],je.debug("Loop type widths:",w),w},FBe={bounds:ai,drawActors:N0e,drawActorsPopup:NBe,setConf:PBe,draw:mjt};var P0e=function(){var s=function(bt,St,yt,Mt){for(yt=yt||{},Mt=bt.length;Mt--;yt[bt[Mt]]=St);return yt},o=[1,2],f=[1,3],p=[1,5],w=[1,7],k=[2,5],b=[1,15],_=[1,17],A=[1,21],N=[1,22],B=[1,23],F=[1,24],H=[1,37],j=[1,25],V=[1,26],Z=[1,27],ae=[1,28],le=[1,29],ce=[1,32],be=[1,33],xe=[1,34],Ee=[1,35],Me=[1,36],fe=[1,39],ye=[1,40],re=[1,41],we=[1,42],ke=[1,38],he=[1,45],De=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],X=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],Re=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],pe=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],Ge={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(St,yt,Mt,nn,dn,vt,Lr){var xt=vt.length-1;switch(dn){case 4:return nn.setRootDoc(vt[xt]),vt[xt];case 5:this.$=[];break;case 6:vt[xt]!="nl"&&(vt[xt-1].push(vt[xt]),this.$=vt[xt-1]);break;case 7:case 8:this.$=vt[xt];break;case 9:this.$="nl";break;case 12:this.$=vt[xt];break;case 13:const He=vt[xt-1];He.description=nn.trimColon(vt[xt]),this.$=He;break;case 14:this.$={stmt:"relation",state1:vt[xt-2],state2:vt[xt]};break;case 15:const Ze=nn.trimColon(vt[xt]);this.$={stmt:"relation",state1:vt[xt-3],state2:vt[xt-1],description:Ze};break;case 19:this.$={stmt:"state",id:vt[xt-3],type:"default",description:"",doc:vt[xt-1]};break;case 20:var Tt=vt[xt],wt=vt[xt-2].trim();if(vt[xt].match(":")){var At=vt[xt].split(":");Tt=At[0],wt=[wt,At[1]]}this.$={stmt:"state",id:Tt,type:"default",description:wt};break;case 21:this.$={stmt:"state",id:vt[xt-3],type:"default",description:vt[xt-5],doc:vt[xt-1]};break;case 22:this.$={stmt:"state",id:vt[xt],type:"fork"};break;case 23:this.$={stmt:"state",id:vt[xt],type:"join"};break;case 24:this.$={stmt:"state",id:vt[xt],type:"choice"};break;case 25:this.$={stmt:"state",id:nn.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:vt[xt-1].trim(),note:{position:vt[xt-2].trim(),text:vt[xt].trim()}};break;case 30:this.$=vt[xt].trim(),nn.setAccTitle(this.$);break;case 31:case 32:this.$=vt[xt].trim(),nn.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:vt[xt-1].trim(),classes:vt[xt].trim()};break;case 35:this.$={stmt:"applyClass",id:vt[xt-1].trim(),styleClass:vt[xt].trim()};break;case 38:nn.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:nn.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:nn.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:nn.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:vt[xt].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:vt[xt-2].trim(),classes:[vt[xt].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:vt[xt-2].trim(),classes:[vt[xt].trim()],type:"default",description:""};break;case 50:nn.parseDirective("%%{","open_directive");break;case 51:nn.parseDirective(vt[xt],"type_directive");break;case 52:vt[xt]=vt[xt].trim().replace(/'/g,'"'),nn.parseDirective(vt[xt],"arg_directive");break;case 53:nn.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:o,5:f,6:4,7:p,45:6,60:w},{1:[3]},{3:8,4:o,5:f,6:4,7:p,45:6,60:w},{3:9,4:o,5:f,6:4,7:p,45:6,60:w},{3:10,4:o,5:f,6:4,7:p,45:6,60:w},s([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],k,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:b,5:_,6:30,9:14,10:16,11:18,12:19,13:20,16:A,17:N,19:B,22:F,24:H,25:j,26:V,27:Z,28:ae,29:le,32:31,33:ce,35:be,37:xe,38:Ee,42:Me,45:6,50:fe,51:ye,52:re,53:we,56:ke,60:w},{47:43,48:[1,44],63:he},s([48,63],[2,51]),s(De,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:A,17:N,19:B,22:F,24:H,25:j,26:V,27:Z,28:ae,29:le,32:31,33:ce,35:be,37:xe,38:Ee,42:Me,45:6,50:fe,51:ye,52:re,53:we,56:ke,60:w},s(De,[2,8]),s(De,[2,9]),s(De,[2,10]),s(De,[2,11]),s(De,[2,12],{14:[1,47],15:[1,48]}),s(De,[2,16]),{18:[1,49]},s(De,[2,18],{20:[1,50]}),{23:[1,51]},s(De,[2,22]),s(De,[2,23]),s(De,[2,24]),s(De,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},s(De,[2,28]),s(De,[2,29]),{34:[1,56]},{36:[1,57]},s(De,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},s(X,[2,44],{57:[1,61]}),s(X,[2,45],{57:[1,62]}),s(De,[2,38]),s(De,[2,39]),s(De,[2,40]),s(De,[2,41]),s(Re,[2,36]),{49:63,62:[1,64]},s(Re,[2,53]),s(De,[2,7]),s(De,[2,13]),{13:65,24:H,56:ke},s(De,[2,17]),s(pe,k,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},s(De,[2,30]),s(De,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:he},{63:[2,52]},s(De,[2,14],{14:[1,76]}),{4:b,5:_,6:30,9:14,10:16,11:18,12:19,13:20,16:A,17:N,19:B,21:[1,77],22:F,24:H,25:j,26:V,27:Z,28:ae,29:le,32:31,33:ce,35:be,37:xe,38:Ee,42:Me,45:6,50:fe,51:ye,52:re,53:we,56:ke,60:w},s(De,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},s(De,[2,33]),s(De,[2,34]),s(De,[2,35]),s(X,[2,46]),s(X,[2,47]),s(Re,[2,37]),s(De,[2,15]),s(De,[2,19]),s(pe,k,{8:81}),s(De,[2,26]),s(De,[2,27]),{4:b,5:_,6:30,9:14,10:16,11:18,12:19,13:20,16:A,17:N,19:B,21:[1,82],22:F,24:H,25:j,26:V,27:Z,28:ae,29:le,32:31,33:ce,35:be,37:xe,38:Ee,42:Me,45:6,50:fe,51:ye,52:re,53:we,56:ke,60:w},s(De,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(St,yt){if(yt.recoverable)this.trace(St);else{var Mt=new Error(St);throw Mt.hash=yt,Mt}},parse:function(St){var yt=this,Mt=[0],nn=[],dn=[null],vt=[],Lr=this.table,xt="",Tt=0,wt=0,At=2,He=1,Ze=vt.slice.call(arguments,1),Lt=Object.create(this.lexer),Ve={yy:{}};for(var Mn in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Mn)&&(Ve.yy[Mn]=this.yy[Mn]);Lt.setInput(St,Ve.yy),Ve.yy.lexer=Lt,Ve.yy.parser=this,typeof Lt.yylloc>"u"&&(Lt.yylloc={});var Oe=Lt.yylloc;vt.push(Oe);var Di=Lt.options&&Lt.options.ranges;typeof Ve.yy.parseError=="function"?this.parseError=Ve.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function rn(){var Xi;return Xi=nn.pop()||Lt.lex()||He,typeof Xi!="number"&&(Xi instanceof Array&&(nn=Xi,Xi=nn.pop()),Xi=yt.symbols_[Xi]||Xi),Xi}for(var pi,Fr,tr,Wn,er={},Fn,nr,ha,fa;;){if(Fr=Mt[Mt.length-1],this.defaultActions[Fr]?tr=this.defaultActions[Fr]:((pi===null||typeof pi>"u")&&(pi=rn()),tr=Lr[Fr]&&Lr[Fr][pi]),typeof tr>"u"||!tr.length||!tr[0]){var is="";fa=[];for(Fn in Lr[Fr])this.terminals_[Fn]&&Fn>At&&fa.push("'"+this.terminals_[Fn]+"'");Lt.showPosition?is="Parse error on line "+(Tt+1)+`:
+`+Lt.showPosition()+`
+Expecting `+fa.join(", ")+", got '"+(this.terminals_[pi]||pi)+"'":is="Parse error on line "+(Tt+1)+": Unexpected "+(pi==He?"end of input":"'"+(this.terminals_[pi]||pi)+"'"),this.parseError(is,{text:Lt.match,token:this.terminals_[pi]||pi,line:Lt.yylineno,loc:Oe,expected:fa})}if(tr[0]instanceof Array&&tr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Fr+", token: "+pi);switch(tr[0]){case 1:Mt.push(pi),dn.push(Lt.yytext),vt.push(Lt.yylloc),Mt.push(tr[1]),pi=null,wt=Lt.yyleng,xt=Lt.yytext,Tt=Lt.yylineno,Oe=Lt.yylloc;break;case 2:if(nr=this.productions_[tr[1]][1],er.$=dn[dn.length-nr],er._$={first_line:vt[vt.length-(nr||1)].first_line,last_line:vt[vt.length-1].last_line,first_column:vt[vt.length-(nr||1)].first_column,last_column:vt[vt.length-1].last_column},Di&&(er._$.range=[vt[vt.length-(nr||1)].range[0],vt[vt.length-1].range[1]]),Wn=this.performAction.apply(er,[xt,wt,Tt,Ve.yy,tr[1],dn,vt].concat(Ze)),typeof Wn<"u")return Wn;nr&&(Mt=Mt.slice(0,-1*nr*2),dn=dn.slice(0,-1*nr),vt=vt.slice(0,-1*nr)),Mt.push(this.productions_[tr[1]][0]),dn.push(er.$),vt.push(er._$),ha=Lr[Mt[Mt.length-2]][Mt[Mt.length-1]],Mt.push(ha);break;case 3:return!0}}return!0}},de=function(){var bt={EOF:1,parseError:function(yt,Mt){if(this.yy.parser)this.yy.parser.parseError(yt,Mt);else throw new Error(yt)},setInput:function(St,yt){return this.yy=yt||this.yy||{},this._input=St,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var St=this._input[0];this.yytext+=St,this.yyleng++,this.offset++,this.match+=St,this.matched+=St;var yt=St.match(/(?:\r\n?|\n).*/g);return yt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),St},unput:function(St){var yt=St.length,Mt=St.split(/(?:\r\n?|\n)/g);this._input=St+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-yt),this.offset-=yt;var nn=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),Mt.length-1&&(this.yylineno-=Mt.length-1);var dn=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:Mt?(Mt.length===nn.length?this.yylloc.first_column:0)+nn[nn.length-Mt.length].length-Mt[0].length:this.yylloc.first_column-yt},this.options.ranges&&(this.yylloc.range=[dn[0],dn[0]+this.yyleng-yt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(St){this.unput(this.match.slice(St))},pastInput:function(){var St=this.matched.substr(0,this.matched.length-this.match.length);return(St.length>20?"...":"")+St.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var St=this.match;return St.length<20&&(St+=this._input.substr(0,20-St.length)),(St.substr(0,20)+(St.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var St=this.pastInput(),yt=new Array(St.length+1).join("-");return St+this.upcomingInput()+`
+`+yt+"^"},test_match:function(St,yt){var Mt,nn,dn;if(this.options.backtrack_lexer&&(dn={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&&(dn.yylloc.range=this.yylloc.range.slice(0))),nn=St[0].match(/(?:\r\n?|\n).*/g),nn&&(this.yylineno+=nn.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:nn?nn[nn.length-1].length-nn[nn.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+St[0].length},this.yytext+=St[0],this.match+=St[0],this.matches=St,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(St[0].length),this.matched+=St[0],Mt=this.performAction.call(this,this.yy,this,yt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Mt)return Mt;if(this._backtrack){for(var vt in dn)this[vt]=dn[vt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var St,yt,Mt,nn;this._more||(this.yytext="",this.match="");for(var dn=this._currentRules(),vt=0;vtyt[0].length)){if(yt=Mt,nn=vt,this.options.backtrack_lexer){if(St=this.test_match(Mt,dn[vt]),St!==!1)return St;if(this._backtrack){yt=!1;continue}else return!1}else if(!this.options.flex)break}return yt?(St=this.test_match(yt,dn[nn]),St!==!1?St:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var yt=this.next();return yt||this.lex()},begin:function(yt){this.conditionStack.push(yt)},popState:function(){var yt=this.conditionStack.length-1;return yt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(yt){return yt=this.conditionStack.length-1-Math.abs(yt||0),yt>=0?this.conditionStack[yt]:"INITIAL"},pushState:function(yt){this.begin(yt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(yt,Mt,nn,dn){switch(nn){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),Mt.yytext=Mt.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),Mt.yytext=Mt.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),Mt.yytext=Mt.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),Mt.yytext=Mt.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),Mt.yytext=Mt.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),Mt.yytext=Mt.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),Mt.yytext=Mt.yytext.substr(2).trim(),31;case 69:return this.popState(),Mt.yytext=Mt.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return Mt.yytext=Mt.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<