1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5879],{5879:function(t,e,a){let i;a.r(e),a.d(e,{diagram:function(){return T}});var r=a(2667),d=a(7128),n=a(5680),s=a(2437),g=a(347),o=a(9526);a(7326),a(6902),a(458);let l={},p=(t,e)=>{l[t]=e},h=t=>l[t],c=()=>Object.keys(l),x={get:h,set:p,keys:c,size:()=>c().length},u=t=>t.append("circle").attr("class","start-state").attr("r",(0,g.g)().state.sizeUnit).attr("cx",(0,g.g)().state.padding+(0,g.g)().state.sizeUnit).attr("cy",(0,g.g)().state.padding+(0,g.g)().state.sizeUnit),f=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,g.g)().state.textHeight).attr("class","divider").attr("x2",2*(0,g.g)().state.textHeight).attr("y1",0).attr("y2",0),y=(t,e)=>{let a=t.append("text").attr("x",2*(0,g.g)().state.padding).attr("y",(0,g.g)().state.textHeight+2*(0,g.g)().state.padding).attr("font-size",(0,g.g)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,g.g)().state.padding).attr("y",(0,g.g)().state.padding).attr("width",i.width+2*(0,g.g)().state.padding).attr("height",i.height+2*(0,g.g)().state.padding).attr("rx",(0,g.g)().state.radius),a},w=(t,e)=>{let a=function(t,e,a){let i=t.append("tspan").attr("x",2*(0,g.g)().state.padding).text(e);a||i.attr("dy",(0,g.g)().state.textHeight)},i=t.append("text").attr("x",2*(0,g.g)().state.padding).attr("y",(0,g.g)().state.textHeight+1.3*(0,g.g)().state.padding).attr("font-size",(0,g.g)().state.fontSize).attr("class","state-title").text(e.descriptions[0]),r=i.node().getBBox(),d=r.height,n=t.append("text").attr("x",(0,g.g)().state.padding).attr("y",d+.4*(0,g.g)().state.padding+(0,g.g)().state.dividerMargin+(0,g.g)().state.textHeight).attr("class","state-description"),s=!0,o=!0;e.descriptions.forEach(function(t){s||(a(n,t,o),o=!1),s=!1});let l=t.append("line").attr("x1",(0,g.g)().state.padding).attr("y1",(0,g.g)().state.padding+d+(0,g.g)().state.dividerMargin/2).attr("y2",(0,g.g)().state.padding+d+(0,g.g)().state.dividerMargin/2).attr("class","descr-divider"),p=n.node().getBBox(),h=Math.max(p.width,r.width);return l.attr("x2",h+3*(0,g.g)().state.padding),t.insert("rect",":first-child").attr("x",(0,g.g)().state.padding).attr("y",(0,g.g)().state.padding).attr("width",h+2*(0,g.g)().state.padding).attr("height",p.height+d+2*(0,g.g)().state.padding).attr("rx",(0,g.g)().state.radius),t},b=(t,e,a)=>{let i;let r=(0,g.g)().state.padding,d=2*(0,g.g)().state.padding,n=t.node().getBBox(),s=n.width,o=n.x,l=t.append("text").attr("x",0).attr("y",(0,g.g)().state.titleShift).attr("font-size",(0,g.g)().state.fontSize).attr("class","state-title").text(e.id),p=l.node().getBBox(),h=p.width+d,c=Math.max(h,s);c===s&&(c+=d);let x=t.node().getBBox();e.doc,i=o-r,h>s&&(i=(s-c)/2+r),Math.abs(o-x.x)<r&&h>s&&(i=o-(h-s)/2);let u=1-(0,g.g)().state.textHeight;return t.insert("rect",":first-child").attr("x",i).attr("y",u).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",x.height+(0,g.g)().state.textHeight+(0,g.g)().state.titleShift+1).attr("rx","0"),l.attr("x",i+r),h<=s&&l.attr("x",o+(c-d)/2-h/2+r),t.insert("rect",":first-child").attr("x",i).attr("y",(0,g.g)().state.titleShift-(0,g.g)().state.textHeight-(0,g.g)().state.padding).attr("width",c).attr("height",3*(0,g.g)().state.textHeight).attr("rx",(0,g.g)().state.radius),t.insert("rect",":first-child").attr("x",i).attr("y",(0,g.g)().state.titleShift-(0,g.g)().state.textHeight-(0,g.g)().state.padding).attr("width",c).attr("height",x.height+3+2*(0,g.g)().state.textHeight).attr("rx",(0,g.g)().state.radius),t},m=t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,g.g)().state.sizeUnit+(0,g.g)().state.miniPadding).attr("cx",(0,g.g)().state.padding+(0,g.g)().state.sizeUnit+(0,g.g)().state.miniPadding).attr("cy",(0,g.g)().state.padding+(0,g.g)().state.sizeUnit+(0,g.g)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,g.g)().state.sizeUnit).attr("cx",(0,g.g)().state.padding+(0,g.g)().state.sizeUnit+2).attr("cy",(0,g.g)().state.padding+(0,g.g)().state.sizeUnit+2)),B=(t,e)=>{let a=(0,g.g)().state.forkWidth,i=(0,g.g)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,g.g)().state.padding).attr("y",(0,g.g)().state.padding)},k=(t,e,a,i)=>{let r=0,d=i.append("text");d.style("text-anchor","start"),d.attr("class","noteText");let n=t.replace(/\r\n/g,"<br/>");n=n.replace(/\n/g,"<br/>");let s=n.split(g.e.lineBreakRegex),o=1.25*(0,g.g)().state.noteMargin;for(let t of s){let i=t.trim();if(i.length>0){let t=d.append("tspan");if(t.text(i),0===o){let e=t.node().getBBox();o+=e.height}r+=o,t.attr("x",e+(0,g.g)().state.noteMargin),t.attr("y",a+r+1.25*(0,g.g)().state.noteMargin)}}return{textWidth:d.node().getBBox().width,textHeight:r}},N=(t,e)=>{e.attr("class","state-note");let a=e.append("rect").attr("x",0).attr("y",(0,g.g)().state.padding),i=e.append("g"),{textWidth:r,textHeight:d}=k(t,0,0,i);return a.attr("height",d+2*(0,g.g)().state.noteMargin),a.attr("width",r+2*(0,g.g)().state.noteMargin),a},E=function(t,e){let a=e.id,i={id:a,label:e.id,width:0,height:0},r=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&u(r),"end"===e.type&&m(r),("fork"===e.type||"join"===e.type)&&B(r,e),"note"===e.type&&N(e.note.text,r),"divider"===e.type&&f(r),"default"===e.type&&0===e.descriptions.length&&y(r,e),"default"===e.type&&e.descriptions.length>0&&w(r,e);let d=r.node().getBBox();return i.width=d.width+2*(0,g.g)().state.padding,i.height=d.height+2*(0,g.g)().state.padding,x.set(a,i),i},M=0,v=function(t,e,a){e.points=e.points.filter(t=>!Number.isNaN(t.y));let i=e.points,n=(0,d.jvg)().x(function(t){return t.x}).y(function(t){return t.y}).curve(d.$0Z),s=t.append("path").attr("d",n(i)).attr("id","edge"+M).attr("class","transition"),l="";if((0,g.g)().state.arrowMarkerAbsolute&&(l=(l=(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),s.attr("marker-end","url("+l+"#"+function(t){switch(t){case r.d.relationType.AGGREGATION:return"aggregation";case r.d.relationType.EXTENSION:return"extension";case r.d.relationType.COMPOSITION:return"composition";case r.d.relationType.DEPENDENCY:return"dependency"}}(r.d.relationType.DEPENDENCY)+"End)"),void 0!==a.title){let i=t.append("g").attr("class","stateLabel"),{x:r,y:d}=o.u.calcLabelPosition(e.points),n=g.e.getRows(a.title),s=0,l=[],p=0,h=0;for(let t=0;t<=n.length;t++){let e=i.append("text").attr("text-anchor","middle").text(n[t]).attr("x",r).attr("y",d+s),a=e.node().getBBox();if(p=Math.max(p,a.width),h=Math.min(h,a.x),g.l.info(a.x,r,d+s),0===s){let t=e.node().getBBox();s=t.height,g.l.info("Title height",s,d)}l.push(e)}let c=s*n.length;if(n.length>1){let t=(n.length-1)*s*.5;l.forEach((e,a)=>e.attr("y",d+a*s-t)),c=s*n.length}let x=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",r-p/2-(0,g.g)().state.padding/2).attr("y",d-c/2-(0,g.g)().state.padding/2-3.5).attr("width",p+(0,g.g)().state.padding).attr("height",c+(0,g.g)().state.padding),g.l.info(x)}M++},S={},z=function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},H=t=>t?t.length*i.fontSizeFactor:1,L=(t,e,a,r,d,o,l)=>{let p;let h=new s.k({compound:!0,multigraph:!0}),c=!0;for(p=0;p<t.length;p++)if("relation"===t[p].stmt){c=!1;break}a?h.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:c?1:i.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):h.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:i.edgeLengthFactor,nodeSep:c?1:50,ranker:"tight-tree",isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}}),l.db.extract(t);let x=l.db.getStates(),u=l.db.getRelations(),f=Object.keys(x);for(let t of f){let n;let s=x[t];
1if(a&&(s.parentId=a),s.doc){let t=e.append("g").attr("id",s.id).attr("class","stateGroup");n=L(s.doc,t,s.id,!r,d,o,l);{let e=(t=b(t,s,r)).node().getBBox();n.width=e.width,n.height=e.height+i.padding/2,S[s.id]={y:i.compositTitleSize}}}else n=E(e,s);if(s.note){let t={descriptions:[],id:s.id+"-note",note:s.note,type:"note"},a=E(e,t);"left of"===s.note.position?(h.setNode(n.id+"-note",a),h.setNode(n.id,n)):(h.setNode(n.id,n),h.setNode(n.id+"-note",a)),h.setParent(n.id,n.id+"-group"),h.setParent(n.id+"-note",n.id+"-group")}else h.setNode(n.id,n)}g.l.debug("Count=",h.nodeCount(),h);let y=0;u.forEach(function(t){y++,g.l.debug("Setting edge",t),h.setEdge(t.id1,t.id2,{relation:t,width:H(t.title),height:i.labelHeight*g.e.getRows(t.title).length,labelpos:"c"},"id"+y)}),(0,n.bK)(h),g.l.debug("Graph after layout",h.nodes());let w=e.node();h.nodes().forEach(function(t){if(void 0!==t&&void 0!==h.node(t)){g.l.warn("Node "+t+": "+JSON.stringify(h.node(t))),d.select("#"+w.id+" #"+t).attr("transform","translate("+(h.node(t).x-h.node(t).width/2)+","+(h.node(t).y+(S[t]?S[t].y:0)-h.node(t).height/2)+" )"),d.select("#"+w.id+" #"+t).attr("data-x-shift",h.node(t).x-h.node(t).width/2);let e=o.querySelectorAll("#"+w.id+" #"+t+" .divider");e.forEach(t=>{let e=t.parentElement,a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),Number.isNaN(i=parseInt(e.getAttribute("data-x-shift"),10))&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})}else g.l.debug("No Node "+t+": "+JSON.stringify(h.node(t)))});let m=w.getBBox();
1h.edges().forEach(function(t){void 0!==t&&void 0!==h.edge(t)&&(g.l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(h.edge(t))),v(e,h.edge(t),h.edge(t).relation))}),m=w.getBBox();let B={id:a||"root",label:a||"root",width:0,height:0};return B.width=m.width+2*i.padding,B.height=m.height+2*i.padding,g.l.debug("Doc rendered",B,h),B},T={parser:r.p,db:r.d,renderer:{setConf:function(){},draw:function(t,e,a,r){let n;i=(0,g.g)().state;let l=(0,g.g)().securityLevel;"sandbox"===l&&(n=(0,d.Ys)("#i"+e));let p="sandbox"===l?(0,d.Ys)(n.nodes()[0].contentDocument.body):(0,d.Ys)("body"),h="sandbox"===l?n.nodes()[0].contentDocument:document;g.l.debug("Rendering diagram "+t);let c=p.select(`[id='${e}']`);z(c);let x=new s.k({multigraph:!0,compound:!0,rankdir:"RL"});x.setDefaultEdgeLabel(function(){return{}});let u=r.db.getRootDoc();L(u,c,void 0,!1,p,h,r);let f=i.padding,y=c.node().getBBox(),w=y.width+2*f,b=y.height+2*f;(0,o.k)(c,b,1.75*w,i.useMaxWidth),c.attr("viewBox",`${y.x-i.padding} ${y.y-i.padding} `+w+" "+b)}},styles:r.s,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,r.d.clear()}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.