@bkm016/basalt 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-0mjb3sm3.js → chunk-jymx3a77.js} +165 -152
- package/{chunk-3mqf9ped.js → chunk-zq32mwxj.js} +110 -110
- package/compiled.js +1 -1
- package/package.json +1 -1
- package/ui-test-worker.js +1 -1
- package/web/{chunk-9yfftz38.js → chunk-05mvzx00.js} +1 -1
- package/web/chunk-086dshck.js +1 -0
- package/web/chunk-0fy590s0.js +1 -0
- package/web/{chunk-se4h6wx0.js → chunk-0hvxb5d5.js} +1 -1
- package/web/chunk-0mdf1qja.js +1 -0
- package/web/{chunk-w3zgfhjb.js → chunk-0y971zgq.js} +2 -2
- package/web/{chunk-j89s11x8.js → chunk-1t38sgrk.js} +2 -2
- package/web/{chunk-z4bp6p32.js → chunk-1zfxaafq.js} +1 -1
- package/web/{chunk-g7kz8f7q.js → chunk-27812gqr.js} +5 -5
- package/web/{chunk-rag65pfs.js → chunk-2ds0a2z1.js} +3 -3
- package/web/{chunk-rh3xb76f.js → chunk-2f2agfpj.js} +11 -11
- package/web/{chunk-wtvch4ad.js → chunk-2tsxj613.js} +3 -3
- package/web/{chunk-y2rzeb4v.js → chunk-2weaa3gn.js} +2 -2
- package/web/{chunk-8h2x89tw.js → chunk-3020mmp1.js} +1 -1
- package/web/{chunk-mykrm8ba.js → chunk-30aeb767.js} +2 -2
- package/web/chunk-32zmk3f5.js +1 -0
- package/web/{chunk-rxvm70w5.js → chunk-36dc7tcg.js} +2 -2
- package/web/{chunk-j37p0b13.js → chunk-3a57m7xm.js} +3 -3
- package/web/{chunk-tt93zbn4.js → chunk-3b4wqmnh.js} +7 -7
- package/web/chunk-3d3wnh8a.js +2 -0
- package/web/{chunk-zse05v6j.js → chunk-3ftb27f3.js} +8 -8
- package/web/{chunk-de40q05r.js → chunk-47mbbmst.js} +3 -3
- package/web/chunk-48479gnx.js +1 -0
- package/web/{chunk-5v5q13hz.js → chunk-4gc663j0.js} +2 -2
- package/web/{chunk-88wd49xe.js → chunk-4rwwtfnd.js} +2 -2
- package/web/{chunk-eqndhs21.js → chunk-4wwd3pfz.js} +2 -2
- package/web/{chunk-myd6sc76.js → chunk-57pyz29y.js} +2 -2
- package/web/{chunk-32ty2xfn.js → chunk-59nk506k.js} +1 -1
- package/web/{chunk-m4fxd5d9.js → chunk-5ahx98zj.js} +8 -8
- package/web/chunk-6cjm2yr7.js +1 -0
- package/web/{chunk-frnh4zqf.js → chunk-6jb2zyp6.js} +2 -2
- package/web/{chunk-3eexx7y5.js → chunk-793m5jjh.js} +1 -1
- package/web/{chunk-p55vhns6.js → chunk-7dycbjxn.js} +4 -4
- package/web/chunk-7ycxz39p.js +1 -0
- package/web/{chunk-gw8x1g61.js → chunk-8151c970.js} +1 -1
- package/web/{chunk-jccz14ye.js → chunk-885kpj14.js} +2 -2
- package/web/{chunk-vasppf6b.js → chunk-8csw0mvf.js} +2 -2
- package/web/{chunk-x850q01z.js → chunk-8z7texmv.js} +1 -1
- package/web/{chunk-sd3xat3r.js → chunk-90fkdzx3.js} +6 -6
- package/web/chunk-94denx9h.js +39 -0
- package/web/{chunk-zms6mrqk.js → chunk-96xhmmqz.js} +6 -6
- package/web/chunk-9jy8nc4r.js +1 -0
- package/web/{chunk-dv1berk6.js → chunk-9kkzmss7.js} +3 -3
- package/web/chunk-9wr33d0t.js +1 -0
- package/web/{chunk-fmmrthpa.js → chunk-a3pye9ag.js} +3 -3
- package/web/chunk-a4tdrxdh.js +1 -0
- package/web/chunk-a9fvsyc1.js +1 -0
- package/web/chunk-apvbvg4d.js +1 -0
- package/web/{chunk-wrevb4ew.js → chunk-b3j07x0n.js} +6 -6
- package/web/{chunk-0770q5e1.js → chunk-b6sqwmq7.js} +1 -1
- package/web/chunk-bkxcc7v5.js +1 -0
- package/web/chunk-bve354k7.js +1 -0
- package/web/{chunk-nawxgz87.js → chunk-cbwvfedy.js} +8 -8
- package/web/{chunk-x5g1yy12.js → chunk-cpshsp24.js} +1 -1
- package/web/chunk-cwpxakby.js +1 -0
- package/web/chunk-d3f763n7.js +2 -0
- package/web/{chunk-grm2208k.js → chunk-d4519smc.js} +14 -14
- package/web/chunk-de29pe57.js +1 -0
- package/web/chunk-dk0fnj87.js +1 -0
- package/web/{chunk-c57f714b.js → chunk-drchr3yn.js} +2 -2
- package/web/chunk-dsbyfvwz.js +1 -0
- package/web/{chunk-xtn305fd.js → chunk-dtrh40vr.js} +1 -1
- package/web/chunk-e68jw0bg.js +1 -0
- package/web/{chunk-tfqarvdx.js → chunk-e763h2px.js} +67 -67
- package/web/{chunk-pgwf37s2.js → chunk-enryqmj7.js} +5 -5
- package/web/{chunk-jke2ev6m.js → chunk-f79ajymt.js} +2 -2
- package/web/{chunk-qq6m2my8.js → chunk-fj753yzt.js} +2 -2
- package/web/{chunk-5svqfj4g.js → chunk-g0rtcedn.js} +3 -3
- package/web/{chunk-18neka5g.js → chunk-g31dbnzm.js} +4 -4
- package/web/{chunk-1ev0n3n4.js → chunk-g4as4zzd.js} +4 -4
- package/web/{chunk-6e87m0nm.js → chunk-gten0rpx.js} +2 -2
- package/web/{chunk-sjkg40ay.js → chunk-gyhr27dm.js} +1 -1
- package/web/{chunk-js6kb05s.js → chunk-hjyev38w.js} +6 -6
- package/web/{chunk-rwfmccmh.js → chunk-hm8thq7c.js} +4 -4
- package/web/{chunk-07agqp8h.js → chunk-j4gvtszc.js} +2 -2
- package/web/chunk-jd7npyv9.js +8 -0
- package/web/chunk-jhpg2kcf.js +1 -0
- package/web/{chunk-qdzy124b.js → chunk-jqqbkdtw.js} +2 -2
- package/web/chunk-jzz5htxp.js +1 -0
- package/web/chunk-ka3q31t1.js +1 -0
- package/web/chunk-kahab58k.js +1139 -0
- package/web/{chunk-q4bst4an.js → chunk-kfbgvh0c.js} +1 -1
- package/web/chunk-krgvx75q.js +1 -0
- package/web/chunk-kxeaj44h.js +1 -0
- package/web/chunk-m1rdyvb5.js +1 -0
- package/web/{chunk-z5qn0xev.js → chunk-m24yb8md.js} +2 -2
- package/web/chunk-m7k4wr3k.js +1 -0
- package/web/chunk-mdj3r75b.js +1 -0
- package/web/{chunk-h5ckjk48.js → chunk-mpdeqzc9.js} +10 -10
- package/web/{chunk-knm82fw9.js → chunk-mykbcvqz.js} +1 -1
- package/web/{chunk-1qh7f5kr.js → chunk-n33753da.js} +1 -1
- package/web/{chunk-yppgejg7.js → chunk-nafe18y9.js} +10 -10
- package/web/chunk-nbcpbqq4.js +1 -0
- package/web/{chunk-bc3ajvfg.js → chunk-nhx8pw7p.js} +1 -1
- package/web/chunk-nkpdd9hw.js +1 -0
- package/web/{chunk-eh7wp62z.js → chunk-p1yc8hwn.js} +1 -1
- package/web/chunk-p29brxyt.js +1 -0
- package/web/chunk-p8fbes0t.js +1 -0
- package/web/chunk-pbp1p5ex.js +1 -0
- package/web/{chunk-n4yzs2q0.js → chunk-ppjw1mps.js} +4 -4
- package/web/{chunk-7tkgbbf9.js → chunk-pq56b3mq.js} +2 -2
- package/web/{chunk-vvvd3grf.js → chunk-pzg25qqe.js} +2 -2
- package/web/{chunk-t5nvgz7z.js → chunk-q65zxczs.js} +7 -7
- package/web/{chunk-g7dc4hrd.js → chunk-q8v5j963.js} +2 -2
- package/web/{chunk-zz1qkaar.js → chunk-qykt7avq.js} +2 -2
- package/web/chunk-r6q1301x.js +1 -0
- package/web/chunk-r8kghrkb.js +1 -0
- package/web/chunk-rhxn7mxg.js +1 -0
- package/web/{chunk-46jnkghq.js → chunk-rqympya7.js} +2 -2
- package/web/{chunk-k0cg4n2k.js → chunk-s0xy00v5.js} +2 -2
- package/web/chunk-svqshmpg.js +1 -0
- package/web/chunk-swzxq7r3.css +1 -0
- package/web/{chunk-905vw286.js → chunk-t18tn37m.js} +2 -2
- package/web/chunk-tbsaseer.js +1 -0
- package/web/{chunk-rbqnre6q.js → chunk-tggja45g.js} +3 -3
- package/web/chunk-tgkdyxbn.js +1 -0
- package/web/{chunk-sc63488q.js → chunk-tpdcrrf1.js} +1 -1
- package/web/chunk-v0zfnvc1.js +1 -0
- package/web/{chunk-tqze6d6b.js → chunk-v3dn9bfw.js} +1 -1
- package/web/chunk-vj31fs16.js +1 -0
- package/web/chunk-vr79r8vh.js +1 -0
- package/web/chunk-wb9tax0m.js +1 -0
- package/web/{chunk-26ecc2xh.js → chunk-wbwets5x.js} +19 -19
- package/web/chunk-x9eghjjd.js +1 -0
- package/web/{chunk-awkdw9rw.js → chunk-xbyrgyy0.js} +2 -2
- package/web/{chunk-qy1zx2yw.js → chunk-xjc5fmcr.js} +24 -24
- package/web/{chunk-qh62nkem.js → chunk-ydtrc1ay.js} +2 -2
- package/web/chunk-yrh86m0n.js +1 -0
- package/web/chunk-z3ky5ews.js +2 -0
- package/web/{chunk-ehtmb6sn.js → chunk-zdhyq3ch.js} +13 -13
- package/web/{chunk-gsw1tv96.js → chunk-zv73g4qq.js} +2 -2
- package/web/index.html +1 -1
- package/web/chunk-045d3b5d.js +0 -1
- package/web/chunk-12qf1r6m.js +0 -1
- package/web/chunk-1ex3wgms.js +0 -2
- package/web/chunk-2cz7tx8q.js +0 -1
- package/web/chunk-4am8j3k3.js +0 -1
- package/web/chunk-5qvmefq2.js +0 -1
- package/web/chunk-5z2n4z9x.css +0 -1
- package/web/chunk-6y55gk1n.js +0 -1
- package/web/chunk-7np1jp3x.js +0 -8
- package/web/chunk-7qq1ypvj.js +0 -1
- package/web/chunk-87e8d1hv.js +0 -1
- package/web/chunk-8y2526ve.js +0 -1
- package/web/chunk-918e5t4x.js +0 -2
- package/web/chunk-96m2m3e8.js +0 -1
- package/web/chunk-9f4zzqbx.js +0 -1
- package/web/chunk-a1n4468c.js +0 -1
- package/web/chunk-arnzrqnm.js +0 -1
- package/web/chunk-b46ws7rf.js +0 -1
- package/web/chunk-bwy3e58v.js +0 -1
- package/web/chunk-d5gshd1a.js +0 -1
- package/web/chunk-dp0k5vhd.js +0 -1
- package/web/chunk-et1hytyv.js +0 -1
- package/web/chunk-f7jpakwh.js +0 -1
- package/web/chunk-f9m9seam.js +0 -1
- package/web/chunk-g2erm7k0.js +0 -1
- package/web/chunk-g3kbn0t2.js +0 -1
- package/web/chunk-ght0t49g.js +0 -1
- package/web/chunk-ghwm7bdj.js +0 -2
- package/web/chunk-gx340asc.js +0 -1
- package/web/chunk-h0c42zy3.js +0 -1
- package/web/chunk-h2txs73e.js +0 -39
- package/web/chunk-h3tkacc7.js +0 -1
- package/web/chunk-je78j3vr.js +0 -1
- package/web/chunk-kxdtg9dt.js +0 -1
- package/web/chunk-m9xzt9p7.js +0 -1
- package/web/chunk-mzzaet63.js +0 -1
- package/web/chunk-ngt1j8py.js +0 -1139
- package/web/chunk-q34as3v6.js +0 -1
- package/web/chunk-qe0bgeda.js +0 -1
- package/web/chunk-sat7zyva.js +0 -1
- package/web/chunk-sk0hpa80.js +0 -1
- package/web/chunk-tj1fn8v2.js +0 -1
- package/web/chunk-tvcxrx6h.js +0 -1
- package/web/chunk-tzpnh70q.js +0 -1
- package/web/chunk-vb7g4xg6.js +0 -1
- package/web/chunk-wzfe6jtq.js +0 -1
- package/web/chunk-xh4xn1az.js +0 -1
- package/web/chunk-xk904wqv.js +0 -1
- package/web/chunk-xzwxcxb4.js +0 -1
- package/web/chunk-yekaz74b.js +0 -1
- package/web/chunk-ys2tns0p.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{G}from"./chunk-
|
|
1
|
+
import{G}from"./chunk-p1yc8hwn.js";import{t,a,ke,M,x,F,C,S,E,T,A,L,R,V,U}from"./chunk-e763h2px.js";import{Q}from"./chunk-xjc5fmcr.js";var v={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},k=32,O={axes:[],curves:[],options:v},h=structuredClone(O),H=M.radar,j=t(()=>U({...H,...x().radar}),"getConfig"),I=t(()=>h.axes,"getAxes"),X=t(()=>h.curves,"getCurves"),K=t(()=>h.options,"getOptions"),N=t((n)=>{h.axes=n.map((e)=>({name:e.name,label:e.label??e.name}))},"setAxes"),Y=t((n)=>{h.curves=n.map((e)=>({name:e.name,label:e.label??e.name,entries:Z(e.entries)}))},"setCurves"),Z=t((n)=>{if(n[0].axis==null)return n.map((r)=>r.value);let e=I();if(e.length===0)throw Error("Axes must be populated before curves for reference entries");return e.map((r)=>{let s=n.find((o)=>o.axis?.$refText===r.name);if(s===void 0)throw Error("Missing entry for axis "+r.label);return s.value})},"computeCurveEntries"),q=t((n)=>{let e=n.reduce((r,s)=>(r[s.name]=s,r),{});if(h.options={showLegend:e.showLegend?.value??v.showLegend,ticks:e.ticks?.value??v.ticks,max:e.max?.value??v.max,min:e.min?.value??v.min,graticule:e.graticule?.value??v.graticule},h.options.ticks>k)a.warn(`Radar diagram ticks (${h.options.ticks}) exceeds maximum allowed (${k}). Using ${k} instead.`),h.options.ticks=k},"setOptions"),J=t(()=>{C(),h=structuredClone(O)},"clear"),w={getAxes:I,getCurves:X,getOptions:K,setAxes:N,setCurves:Y,setOptions:q,getConfig:j,clear:J,setAccTitle:S,getAccTitle:E,setDiagramTitle:L,getDiagramTitle:R,getAccDescription:A,setAccDescription:T},tt=t((n)=>{G(n,w);let{axes:e,curves:r,options:s}=n;w.setAxes(e),w.setCurves(r),w.setOptions(s)},"populate"),et={parse:t(async(n)=>{let e=await Q("radar",n);a.debug(e),tt(e)},"parse")},at=t((n,e,r,s)=>{let o=s.db,c=o.getAxes(),d=o.getCurves(),i=o.getOptions(),l=o.getConfig(),u=o.getDiagramTitle(),m=V(e),p=rt(m,l),g=i.max??Math.max(...d.map((b)=>Math.max(...b.entries))),f=i.min,y=Math.min(l.width,l.height)/2;nt(p,c,y,i.ticks,i.graticule),st(p,c,y,l),_(p,c,d,f,g,i.graticule,l),z(p,d,i.showLegend,l),p.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),rt=t((n,e)=>{let r=e.width+e.marginLeft+e.marginRight,s=e.height+e.marginTop+e.marginBottom,o={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return F(n,s,r,e.useMaxWidth??!0),n.attr("viewBox",`0 0 ${r} ${s}`).attr("overflow","visible"),n.append("g").attr("transform",`translate(${o.x}, ${o.y})`)},"drawFrame"),nt=t((n,e,r,s,o)=>{if(o==="circle")for(let c=0;c<s;c++){let d=r*(c+1)/s;n.append("circle").attr("r",d).attr("class","radarGraticule")}else if(o==="polygon"){let c=e.length;for(let d=0;d<s;d++){let i=r*(d+1)/s,l=e.map((u,m)=>{let p=2*m*Math.PI/c-Math.PI/2,g=i*Math.cos(p),f=i*Math.sin(p);return`${g},${f}`}).join(" ");n.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),st=t((n,e,r,s)=>{let o=e.length;for(let c=0;c<o;c++){let d=e[c].label,i=2*c*Math.PI/o-Math.PI/2,l=Math.cos(i),u=Math.sin(i);n.append("line").attr("x1",0).attr("y1",0).attr("x2",r*s.axisScaleFactor*l).attr("y2",r*s.axisScaleFactor*u).attr("class","radarAxisLine");let m=l>0.01?"start":l<-0.01?"end":"middle",p=u>0.01?"hanging":u<-0.01?"auto":"central",g=4;n.append("text").text(d).attr("x",r*s.axisLabelFactor*l+g*l).attr("y",r*s.axisLabelFactor*u+g*u).attr("text-anchor",m).attr("dominant-baseline",p).attr("class","radarAxisLabel")}},"drawAxes");function _(n,e,r,s,o,c,d){let i=e.length,l=Math.min(d.width,d.height)/2;r.forEach((u,m)=>{if(u.entries.length!==i)return;let p=u.entries.map((g,f)=>{let y=2*Math.PI*f/i-Math.PI/2,b=D(g,s,o,l),B=b*Math.cos(y),W=b*Math.sin(y);return{x:B,y:W}});if(c==="circle")n.append("path").attr("d",P(p,d.curveTension)).attr("class",`radarCurve-${m}`);else if(c==="polygon")n.append("polygon").attr("points",p.map((g)=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${m}`)})}t(_,"drawCurves");function D(n,e,r,s){let o=Math.min(Math.max(n,e),r);return s*(o-e)/(r-e)}t(D,"relativeRadius");function P(n,e){let r=n.length,s=`M${n[0].x},${n[0].y}`;for(let o=0;o<r;o++){let c=n[(o-1+r)%r],d=n[o],i=n[(o+1)%r],l=n[(o+2)%r],u={x:d.x+(i.x-c.x)*e,y:d.y+(i.y-c.y)*e},m={x:i.x-(l.x-d.x)*e,y:i.y-(l.y-d.y)*e};s+=` C${u.x},${u.y} ${m.x},${m.y} ${i.x},${i.y}`}return`${s} Z`}t(P,"closedRoundCurve");function z(n,e,r,s){if(!r)return;let o=(s.width/2+s.marginRight)*3/4,c=-(s.height/2+s.marginTop)*3/4,d=20;e.forEach((i,l)=>{let u=n.append("g").attr("transform",`translate(${o}, ${c+l*d})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(i.label)})}t(z,"drawLegend");var ot={draw:at},it=t((n,e)=>{let r="";for(let s=0;s<n.THEME_COLOR_LIMIT;s++){let o=n[`cScale${s}`];r+=`
|
|
2
2
|
.radarCurve-${s} {
|
|
3
3
|
color: ${o};
|
|
4
4
|
fill: ${o};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{t,a,K,u,d,
|
|
1
|
+
import{t,a,K,u,d,M,x,mo,O,l,ge,ye}from"./chunk-e763h2px.js";import{he}from"./chunk-tpdcrrf1.js";import{ue}from"./chunk-n33753da.js";var _e=new Uint8Array(16);function ee(){return crypto.getRandomValues(_e)}var S=[];for(let e=0;e<256;++e)S.push((e+256).toString(16).slice(1));function de(e,i=0){return(S[e[i+0]]+S[e[i+1]]+S[e[i+2]]+S[e[i+3]]+"-"+S[e[i+4]]+S[e[i+5]]+"-"+S[e[i+6]]+S[e[i+7]]+"-"+S[e[i+8]]+S[e[i+9]]+"-"+S[e[i+10]]+S[e[i+11]]+S[e[i+12]]+S[e[i+13]]+S[e[i+14]]+S[e[i+15]]).toLowerCase()}function Se(e,i,p){if(!i&&!e&&crypto.randomUUID)return crypto.randomUUID();return xe(e,i,p)}function xe(e,i,p){e=e||{};let h=e.random??e.rng?.()??ee();if(h.length<16)throw Error("Random bytes length must be >= 16");if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,i){if(p=p||0,p<0||p+16>i.length)throw RangeError(`UUID byte range ${p}:${p+15} is out of buffer bounds`);for(let n=0;n<16;++n)i[p+n]=h[n];return i}return de(h)}var te=Se;var ne=function(){var e=t(function(C,o,r,c){for(r=r||{},c=C.length;c--;r[C[c]]=o);return r},"o"),i=[1,4],p=[1,13],h=[1,12],n=[1,15],f=[1,16],k=[1,20],E=[1,19],N=[6,7,8],A=[1,26],B=[1,24],P=[1,25],m=[6,7,11],V=[1,6,13,15,16,19,22],ie=[1,33],re=[1,34],F=[1,6,7,11,13,15,16,19,22],z={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:t(function(o,r,c,g,b,s,G){var y=s.length-1;switch(b){case 6:case 7:return g;case 8:g.getLogger().trace("Stop NL ");break;case 9:g.getLogger().trace("Stop EOF ");break;case 11:g.getLogger().trace("Stop NL2 ");break;case 12:g.getLogger().trace("Stop EOF2 ");break;case 15:g.getLogger().info("Node: ",s[y].id),g.addNode(s[y-1].length,s[y].id,s[y].descr,s[y].type);break;case 16:g.getLogger().trace("Icon: ",s[y]),g.decorateNode({icon:s[y]});break;case 17:case 21:g.decorateNode({class:s[y]});break;case 18:g.getLogger().trace("SPACELIST");break;case 19:g.getLogger().trace("Node: ",s[y].id),g.addNode(0,s[y].id,s[y].descr,s[y].type);break;case 20:g.decorateNode({icon:s[y]});break;case 25:g.getLogger().trace("node found ..",s[y-2]),this.$={id:s[y-1],descr:s[y-1],type:g.getType(s[y-2],s[y])};break;case 26:this.$={id:s[y],descr:s[y],type:g.nodeType.DEFAULT};break;case 27:g.getLogger().trace("node found ..",s[y-3]),this.$={id:s[y-3],descr:s[y-1],type:g.getType(s[y-2],s[y])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:p,7:[1,10],9:9,12:11,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},e(N,[2,3]),{1:[2,2]},e(N,[2,4]),e(N,[2,5]),{1:[2,6],6:p,12:21,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},{6:p,9:22,12:11,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},{6:A,7:B,10:23,11:P},e(m,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:k,22:E}),e(m,[2,18]),e(m,[2,19]),e(m,[2,20]),e(m,[2,21]),e(m,[2,23]),e(m,[2,24]),e(m,[2,26],{19:[1,30]}),{20:[1,31]},{6:A,7:B,10:32,11:P},{1:[2,7],6:p,12:21,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},e(V,[2,14],{7:ie,11:re}),e(F,[2,8]),e(F,[2,9]),e(F,[2,10]),e(m,[2,15]),e(m,[2,16]),e(m,[2,17]),{20:[1,35]},{21:[1,36]},e(V,[2,13],{7:ie,11:re}),e(F,[2,11]),e(F,[2,12]),{21:[1,37]},e(m,[2,25]),e(m,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(o,r){if(r.recoverable)this.trace(o);else{var c=Error(o);throw c.hash=r,c}},"parseError"),parse:t(function(o){var r=this,c=[0],g=[],b=[null],s=[],G=this.table,y="",H=0,se=0,oe=0,me=2,ae=1,ke=s.slice.call(arguments,1),_=Object.create(this.lexer),w={yy:{}};for(var Y in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Y))w.yy[Y]=this.yy[Y];if(_.setInput(o,w.yy),w.yy.lexer=_,w.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var q=_.yylloc;s.push(q);var be=_.options&&_.options.ranges;if(typeof w.yy.parseError==="function")this.parseError=w.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Ee(v){c.length=c.length-2*v,b.length=b.length-v,s.length=s.length-v}t(Ee,"popStack");function ce(){var v=g.pop()||_.lex()||ae;if(typeof v!=="number"){if(v instanceof Array)g=v,v=g.pop();v=r.symbols_[v]||v}return v}t(ce,"lex");var L,J,R,D,we,Q,U={},W,T,le,X;while(!0){if(R=c[c.length-1],this.defaultActions[R])D=this.defaultActions[R];else{if(L===null||typeof L>"u")L=ce();D=G[R]&&G[R][L]}if(typeof D>"u"||!D.length||!D[0]){var Z="";X=[];for(W in G[R])if(this.terminals_[W]&&W>me)X.push("'"+this.terminals_[W]+"'");if(_.showPosition)Z="Parse error on line "+(H+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
|
-
Expecting `+X.join(", ")+", got '"+(this.terminals_[
|
|
3
|
+
Expecting `+X.join(", ")+", got '"+(this.terminals_[L]||L)+"'";else Z="Parse error on line "+(H+1)+": Unexpected "+(L==ae?"end of input":"'"+(this.terminals_[L]||L)+"'");this.parseError(Z,{text:_.match,token:this.terminals_[L]||L,line:_.yylineno,loc:q,expected:X})}if(D[0]instanceof Array&&D.length>1)throw Error("Parse Error: multiple actions possible at state: "+R+", token: "+L);switch(D[0]){case 1:if(c.push(L),b.push(_.yytext),s.push(_.yylloc),c.push(D[1]),L=null,!J){if(se=_.yyleng,y=_.yytext,H=_.yylineno,q=_.yylloc,oe>0)oe--}else L=J,J=null;break;case 2:if(T=this.productions_[D[1]][1],U.$=b[b.length-T],U._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},be)U._$.range=[s[s.length-(T||1)].range[0],s[s.length-1].range[1]];if(Q=this.performAction.apply(U,[y,se,H,w.yy,D[1],b,s].concat(ke)),typeof Q<"u")return Q;if(T)c=c.slice(0,-1*T*2),b=b.slice(0,-1*T),s=s.slice(0,-1*T);c.push(this.productions_[D[1]][0]),b.push(U.$),s.push(U._$),le=G[c[c.length-2]][c[c.length-1]],c.push(le);break;case 3:return!0}}return!0},"parse")},fe=function(){var C={EOF:1,parseError:t(function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw Error(r)},"parseError"),setInput:t(function(o,r){if(this.yy=r||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var r=o.match(/(?:\r\n?|\n).*/g);if(r)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),o},"input"),unput:t(function(o){var r=o.length,c=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var g=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1)this.yylineno-=c.length-1;var b=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===g.length?this.yylloc.first_column:0)+g[g.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges)this.yylloc.range=[b[0],b[0]+this.yyleng-r];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(o){this.unput(this.match.slice(o))},"less"),pastInput:t(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var o=this.match;if(o.length<20)o+=this._input.substr(0,20-o.length);return(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var o=this.pastInput(),r=Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
5
|
`+r+"^"},"showPosition"),test_match:t(function(o,r){var c,g,b;if(this.options.backtrack_lexer){if(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)}if(g=o[0].match(/(?:\r\n?|\n).*/g),g)this.yylineno+=g.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],c=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(c)return c;else if(this._backtrack){for(var s in b)this[s]=b[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var o,r,c,g;if(!this._more)this.yytext="",this.match="";var b=this._currentRules();for(var s=0;s<b.length;s++)if(c=this._input.match(this.rules[b[s]]),c&&(!r||c[0].length>r[0].length)){if(r=c,g=s,this.options.backtrack_lexer)if(o=this.test_match(c,b[s]),o!==!1)return o;else if(this._backtrack){r=!1;continue}else return!1;else if(!this.options.flex)break}if(r){if(o=this.test_match(r,b[g]),o!==!1)return o;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var r=this.next();if(r)return r;else return this.lex()},"lex"),begin:t(function(r){this.conditionStack.push(r)},"begin"),popState:t(function(){var r=this.conditionStack.length-1;if(r>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(r){if(r=this.conditionStack.length-1-Math.abs(r||0),r>=0)return this.conditionStack[r];else return"INITIAL"},"topState"),pushState:t(function(r){this.begin(r)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(r,c,g,b){var s=b;switch(g){case 0:return r.getLogger().trace("Found comment",c.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:r.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return r.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:r.getLogger().trace("end icon"),this.popState();break;case 10:return r.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return r.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return r.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return r.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:r.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return r.getLogger().trace("description:",c.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),r.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),r.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),r.getLogger().trace("node end ...",c.yytext),"NODE_DEND";break;case 30:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),r.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),r.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return r.getLogger().trace("Long description:",c.yytext),20;break;case 36:return r.getLogger().trace("Long description:",c.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return
|
|
7
|
-
`+e);let n=h.db,f=n.getData(),k=he(i,f.config.securityLevel);if(f.type=h.type,f.layoutAlgorithm=ye(f.config.layout,{fallback:"cose-bilkent"}),f.diagramId=i,!n.getMindmap())return;f.nodes.forEach((m)=>{if(m.shape==="rounded")m.radius=15,m.taper=15,m.stroke="none",m.width=0,m.padding=15;else if(m.shape==="circle")m.padding=10;else if(m.shape==="rect")m.width=0,m.padding=10;else if(m.shape==="hexagon")m.width=0,m.height=0}),await ge(f,k);let{themeVariables:
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var r=this.next();if(r)return r;else return this.lex()},"lex"),begin:t(function(r){this.conditionStack.push(r)},"begin"),popState:t(function(){var r=this.conditionStack.length-1;if(r>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(r){if(r=this.conditionStack.length-1-Math.abs(r||0),r>=0)return this.conditionStack[r];else return"INITIAL"},"topState"),pushState:t(function(r){this.begin(r)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(r,c,g,b){var s=b;switch(g){case 0:return r.getLogger().trace("Found comment",c.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:r.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return r.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:r.getLogger().trace("end icon"),this.popState();break;case 10:return r.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return r.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return r.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return r.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:r.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return r.getLogger().trace("description:",c.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),r.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),r.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),r.getLogger().trace("node end ...",c.yytext),"NODE_DEND";break;case 30:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),r.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),r.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return r.getLogger().trace("Long description:",c.yytext),20;break;case 36:return r.getLogger().trace("Long description:",c.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return C}();z.lexer=fe;function j(){this.yy={}}return t(j,"Parser"),j.prototype=z,z.Parser=j,new j}();ne.parser=ne;var Ne=ne,pe=12,I={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Le=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=I,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{t(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<e)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,i,p,h){a.info("addNode",e,i,p,h);let n=!1;if(this.nodes.length===0)this.baseLevel=e,e=0,n=!0;else if(this.baseLevel!==void 0)e=e-this.baseLevel,n=!1;let f=l(),k=f.mindmap?.padding??M.mindmap.padding;switch(h){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:k*=2;break}let E={id:this.count++,nodeId:O(i,f),level:e,descr:O(p,f),type:h,children:[],width:f.mindmap?.maxNodeWidth??M.mindmap.maxNodeWidth,padding:k,isRoot:n},N=this.getParent(e);if(N)N.children.push(E),this.nodes.push(E);else if(n)this.nodes.push(E);else throw Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,i){switch(a.debug("In get type",e,i),e){case"[":return this.nodeType.RECT;case"(":return i===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,i){this.elements[e]=i}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let i=l(),p=this.nodes[this.nodes.length-1];if(e.icon)p.icon=O(e.icon,i);if(e.class)p.class=O(e.class,i)}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,i,p=0,h=!1){if(e.level===0)e.section=void 0;else e.section=h?(p-1)%(pe-1):i;if(e.children)for(let[n,f]of e.children.entries()){let k=e.level===0?n%(pe-1):i;this.assignSections(f,k,p+1,h)}}flattenNodes(e,i){let p=l(),h=["mindmap-node"];if(e.isRoot===!0)h.push("section-root","section--1");else if(e.section!==void 0)h.push(`section-${e.section}`);if(e.class)h.push(e.class);let n=h.join(" "),f=t((E)=>{let A=(p.theme?.toLowerCase()??"").includes("redux");switch(E){case I.CIRCLE:return"mindmapCircle";case I.RECT:return"rect";case I.ROUNDED_RECT:return"rounded";case I.CLOUD:return"cloud";case I.BANG:return"bang";case I.HEXAGON:return"hexagon";case I.DEFAULT:return A?"rounded":"defaultMindmapNode";case I.NO_BORDER:default:return"rect"}},"getShapeFromType"),k={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:n,cssStyles:[],centerLabel:!0,look:p.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(i.push(k),e.children)for(let E of e.children)this.flattenNodes(E,i)}generateEdges(e,i){if(!e.children)return;let p=l();for(let h of e.children){let n="edge";if(h.section!==void 0)n+=` section-edge-${h.section}`;let f=e.level+1;n+=` edge-depth-${f}`;let k={id:`edge_${e.id}_${h.id}`,start:e.id.toString(),end:h.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:p.look,classes:n,depth:e.level,section:h.section};i.push(k),this.generateEdges(h,i)}}getData(){let e=this.getMindmap(),i=l(),h=mo().layout!==void 0,n=i;if(!h)n.layout="cose-bilkent";if(!e)return{nodes:[],edges:[],config:n};a.debug("getData: mindmapRoot",e,i),this.assignSections(e,void 0,0,i.mindmap?.colorBy==="depth");let f=[],k=[];this.flattenNodes(e,f),this.generateEdges(e,k),a.debug(`getData: processed ${f.length} nodes and ${k.length} edges`);let E=new Map;for(let N of f)E.set(N.id,{shape:N.shape,width:N.width,height:N.height,padding:N.padding});return{nodes:f,edges:k,config:n,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+te()}}getLogger(){return a}},De=t(async(e,i,p,h)=>{a.debug(`Rendering mindmap diagram
|
|
7
|
+
`+e);let n=h.db,f=n.getData(),k=he(i,f.config.securityLevel);if(f.type=h.type,f.layoutAlgorithm=ye(f.config.layout,{fallback:"cose-bilkent"}),f.diagramId=i,!n.getMindmap())return;f.nodes.forEach((m)=>{if(m.shape==="rounded")m.radius=15,m.taper=15,m.stroke="none",m.width=0,m.padding=15;else if(m.shape==="circle")m.padding=10;else if(m.shape==="rect")m.width=0,m.padding=10;else if(m.shape==="hexagon")m.width=0,m.height=0}),await ge(f,k);let{themeVariables:N}=x(),{useGradient:A,gradientStart:B,gradientStop:P}=N;if(A&&B&&P){let m=k.attr("id"),V=k.append("defs").append("linearGradient").attr("id",`${m}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");V.append("stop").attr("offset","0%").attr("stop-color",B).attr("stop-opacity",1),V.append("stop").attr("offset","100%").attr("stop-color",P).attr("stop-opacity",1)}ue(k,f.config.mindmap?.padding??M.mindmap.padding,"mindmapDiagram",f.config.mindmap?.useMaxWidth??M.mindmap.useMaxWidth)},"draw"),ve={draw:De},Te=t((e)=>{let{theme:i,look:p}=e,h="";for(let n=0;n<e.THEME_COLOR_LIMIT;n++)if(e["lineColor"+n]=e["lineColor"+n]||e["cScaleInv"+n],K(e["lineColor"+n]))e["lineColor"+n]=u(e["lineColor"+n],20);else e["lineColor"+n]=d(e["lineColor"+n],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){let f=""+(p==="neo"?Math.max(10-(n-1)*2,2):17-3*n),k=i==="redux"||i==="redux-dark"?e.nodeBorder:e["cScaleLabel"+(i==="neutral"?1:n)];h+=`
|
|
8
8
|
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
|
|
9
9
|
fill: ${e["cScale"+n]};
|
|
10
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wi}from"./chunk-xjc5fmcr.js";export{wi as createRadarServices};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{G}from"./chunk-eh7wp62z.js";import{t,a,ke,N,x,F,C,S,E,T,A,L,R,p,V,Zr,k,U}from"./chunk-tfqarvdx.js";import{Pt}from"./chunk-9yfftz38.js";import{J}from"./chunk-qy1zx2yw.js";import{Xe}from"./chunk-07agqp8h.js";import{ue}from"./chunk-1qh7f5kr.js";function je(e){var n=0,l=e.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;e.value=n}function ge(){return this.eachAfter(je)}function ye(e,n){let l=-1;for(let o of this)e.call(n,o,++l,this);return this}function xe(e,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(e.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(e,n){var l=this,o=[l],s=[],d,f,h,b=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())e.call(n,l,++b,this);return this}function ve(e,n){let l=-1;for(let o of this)if(e.call(n,o,++l,this))return o}function be(e){return this.eachAfter(function(n){var l=+e(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function we(e){return this.eachBefore(function(n){if(n.children)n.children.sort(e)})}function Ce(e){var n=this,l=Ze(n,e),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(e!==l)o.splice(s,0,e),e=e.parent;return o}function Ze(e,n){if(e===n)return e;var l=e.ancestors(),o=n.ancestors(),s=null;e=l.pop(),n=o.pop();while(e===n)s=e,e=l.pop(),n=o.pop();return s}function Te(){var e=this,n=[e];while(e=e.parent)n.push(e);return n}function Le(){return Array.from(this)}function $e(){var e=[];return this.eachBefore(function(n){if(!n.children)e.push(n)}),e}function Ae(){var e=this,n=[];return e.each(function(l){if(l!==e)n.push({source:l.parent,target:l})}),n}function*Fe(){var e=this,n,l=[e],o,s,d;do{n=l.reverse(),l=[];while(e=n.pop())if(yield e,o=e.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(e,n){if(e instanceof Map){if(e=[void 0,e],n===void 0)n=Ke}else if(n===void 0)n=Je;var l=new ie(e),o,s=[l],d,f,h,b;while(o=s.pop())if((f=n(o.data))&&(b=(f=Array.from(f)).length)){o.children=f;for(h=b-1;h>=0;--h)s.push(d=f[h]=new ie(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ue(){return re(this).eachBefore(Qe)}function Je(e){return e.children}function Ke(e){return Array.isArray(e)?e[1]:null}function Qe(e){if(e.data.value!==void 0)e.value=e.data.value;e.data=e.data.data}function et(e){var n=0;do e.height=n;while((e=e.parent)&&e.height<++n)}function ie(e){this.data=e,this.depth=this.height=0,this.parent=null}ie.prototype=re.prototype={constructor:ie,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:we,path:Ce,ancestors:Te,descendants:Le,leaves:$e,links:Ae,copy:Ue,[Symbol.iterator]:Fe};function Be(e){if(typeof e!=="function")throw Error();return e}function ne(){return 0}function Q(e){return function(){return e}}function Ne(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Me(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(o-n)/e.value;while(++h<b)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(s-l)/e.value;while(++h<b)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(e,n,l,o,s,d){var f=[],h=n.children,b,u,m=0,D=0,i=h.length,z,M,_=n.value,g,w,X,O,ee,oe,Y;while(m<i){z=s-l,M=d-o;do g=h[D++].value;while(!g&&D<i);w=X=g,oe=Math.max(M/z,z/M)/(_*e),Y=g*g*oe,ee=Math.max(X/Y,Y/w);for(;D<i;++D){if(g+=u=h[D].value,u<w)w=u;if(u>X)X=u;if(Y=g*g*oe,O=Math.max(X/Y,Y/w),O>ee){g-=u;break}ee=O}if(f.push(b={value:g,dice:z<M,children:h.slice(m,D)}),b.dice)Me(b,l,o,s,_?o+=M*g/_:d);else _e(b,l,o,_?l+=z*g/_:s,d);_-=g,m=D}return f}var Ee=function e(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return e((o=+o)>1?o:1)},l}(tt);function fe(){var e=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,b=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(D),s=[0],n)i.eachBefore(Ne);return i}function D(i){var z=s[i.depth],M=i.x0+z,_=i.y0+z,g=i.x1-z,w=i.y1-z;if(g<M)M=g=(M+g)/2;if(w<_)_=w=(_+w)/2;if(i.x0=M,i.y0=_,i.x1=g,i.y1=w,i.children){if(z=s[i.depth+1]=d(i)/2,M+=u(i)-z,_+=f(i)-z,g-=h(i)-z,w-=b(i)-z,g<M)M=g=(M+g)/2;if(w<_)_=w=(_+w)/2;e(i,M,_,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(e=Be(i),m):e},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:Q(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:Q(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:Q(+i),m):h},m.paddingBottom=function(i){return arguments.length?(b=typeof i==="function"?i:Q(+i),m):b},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:Q(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getAccDescription=A,this.setAccDescription=T}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=N,n=x();return U({...e.treemap,...n.treemap??{}})}addNode(e,n){if(this.nodes.push(e),this.levels.set(e,n),n===0)this.outerNodes.push(e),this.root??=e}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,n){let l=this.classes.get(e)??{id:e,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Zr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(e,l)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(e){if(!e.length)return[];let n=[],l=[];return e.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}t(We,"buildHierarchy");var rt=t((e,n)=>{G(e,n);let l=[];for(let d of e.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of e.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,b=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,D={level:h,name:b,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(D)}let o=We(l),s=t((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=t((e)=>e.name?String(e.name):"","getItemName"),He={parser:{yy:void 0},parse:t(async(e)=>{try{let l=await J("treemap",e);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,le=10,ce=25,ot=t((e,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),b=s.getRoot(),{themeVariables:u}=x();if(!b)return;let m=h?30:0,D=V(n),i=d.nodeWidth?d.nodeWidth*le:960,z=d.nodeHeight?d.nodeHeight*le:500,M=i,_=z+m;D.attr("viewBox",`0 0 ${M} ${_}`),F(D,_,M,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=t((c)=>"$"+Pt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=t((P)=>"$"+Pt(","+y)(P),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=t((y)=>"$"+Pt(c||"")(y),"valueFormat")}else g=Pt(r)}catch(r){a.error("Error creating format function:",r),g=Pt(",")}let w=Xe().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),X=Xe().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),O=Xe().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)D.append("text").attr("x",M/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let ee=D.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),oe=re(b).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,z]).paddingTop((r)=>r.children&&r.children.length>0?ce+le:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?le:0).paddingRight((r)=>r.children&&r.children.length>0?le:0).paddingBottom((r)=>r.children&&r.children.length>0?le:0).round(!0)(oe),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),se=ee.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",ce).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),se.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",ce),se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>X(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),se.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",ce/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let P=r.x1-r.x0,W=6,B;if(d.showValues!==!1&&r.value){let I=P-10,K=30,Ge=10;B=I-30-10-W}else B=P-W-6;let v=Math.max(15,B),Z=c.node();if(Z.getComputedTextLength()>v){let K=y;while(K.length>0){if(K=y.substring(0,K.length-1),K.length===0){if(c.text("..."),Z.getComputedTextLength()>v)c.text("");break}if(c.text(K+"..."),Z.getComputedTextLength()<=v)break}}}),d.showValues!==!1)se.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",ce/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),q=De.length>20,Oe=q?16:38,pe=q?14:28,te=q?4:8,ae=q?4:6,he=q?2:4,Ve=q?8:10,me=q?1:2,de=ee.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(de.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),de.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),de.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+O(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,P=r.y1-r.y0,W=c.node(),B=y-2*he,j=P-2*he;if(B<Ve||j<Ve){c.style("display","none");return}let v=parseInt(c.style("font-size"),10),Z=0.6;while(W.getComputedTextLength()>B&&v>te)v--,c.style("font-size",`${v}px`);let H=Math.max(ae,Math.min(pe,Math.round(v*Z))),I=v+me+H;while(I>j&&v>te){if(v--,H=Math.max(ae,Math.min(pe,Math.round(v*Z))),H<ae&&v===te)break;if(c.style("font-size",`${v}px`),I=v+me+H,H<=ae&&I>j);}if(c.style("font-size",`${v}px`),q){if(v<te||j<te)c.style("display","none")}else if(W.getComputedTextLength()>B||v<te||j<v)c.style("display","none")}),d.showValues!==!1)de.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${pe}px;fill:`+O(c.data.name)+";",P=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+P.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),P=this.parentNode;if(!P){y.style("display","none");return}let W=p(P).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let B=parseFloat(W.style("font-size")),v=Math.max(ae,Math.min(pe,Math.round(B*0.6)));y.style("font-size",`${v}px`);let H=(c.y1-c.y0)/2+B/2+me;y.attr("y",H);let I=c.x1-c.x0,Pe=c.y1-c.y0-4,Ye=I-2*he;if(y.node().getComputedTextLength()>Ye||H+v>Pe||v<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;ue(D,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=t(function(e,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=t(({treemap:e}={})=>{let n=ke(),l=x(),o=U(n,l.themeVariables),s=U(ct,e),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
|
|
1
|
+
import{G}from"./chunk-p1yc8hwn.js";import{t,a,ke,M,x,F,C,S,E,T,A,L,R,p,V,Hr,k,U}from"./chunk-e763h2px.js";import{Nt}from"./chunk-05mvzx00.js";import{Q}from"./chunk-xjc5fmcr.js";import{Ke}from"./chunk-j4gvtszc.js";import{ue}from"./chunk-n33753da.js";function Ye(e){var n=0,l=e.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;e.value=n}function ge(){return this.eachAfter(Ye)}function ye(e,n){let l=-1;for(let o of this)e.call(n,o,++l,this);return this}function xe(e,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(e.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(e,n){var l=this,o=[l],s=[],d,f,h,b=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())e.call(n,l,++b,this);return this}function ve(e,n){let l=-1;for(let o of this)if(e.call(n,o,++l,this))return o}function be(e){return this.eachAfter(function(n){var l=+e(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function we(e){return this.eachBefore(function(n){if(n.children)n.children.sort(e)})}function Ce(e){var n=this,l=je(n,e),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(e!==l)o.splice(s,0,e),e=e.parent;return o}function je(e,n){if(e===n)return e;var l=e.ancestors(),o=n.ancestors(),s=null;e=l.pop(),n=o.pop();while(e===n)s=e,e=l.pop(),n=o.pop();return s}function Te(){var e=this,n=[e];while(e=e.parent)n.push(e);return n}function Le(){return Array.from(this)}function $e(){var e=[];return this.eachBefore(function(n){if(!n.children)e.push(n)}),e}function Ae(){var e=this,n=[];return e.each(function(l){if(l!==e)n.push({source:l.parent,target:l})}),n}function*Fe(){var e=this,n,l=[e],o,s,d;do{n=l.reverse(),l=[];while(e=n.pop())if(yield e,o=e.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(e,n){if(e instanceof Map){if(e=[void 0,e],n===void 0)n=Je}else if(n===void 0)n=Ue;var l=new ie(e),o,s=[l],d,f,h,b;while(o=s.pop())if((f=n(o.data))&&(b=(f=Array.from(f)).length)){o.children=f;for(h=b-1;h>=0;--h)s.push(d=f[h]=new ie(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ze(){return re(this).eachBefore(Qe)}function Ue(e){return e.children}function Je(e){return Array.isArray(e)?e[1]:null}function Qe(e){if(e.data.value!==void 0)e.value=e.data.value;e.data=e.data.data}function et(e){var n=0;do e.height=n;while((e=e.parent)&&e.height<++n)}function ie(e){this.data=e,this.depth=this.height=0,this.parent=null}ie.prototype=re.prototype={constructor:ie,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:we,path:Ce,ancestors:Te,descendants:Le,leaves:$e,links:Ae,copy:Ze,[Symbol.iterator]:Fe};function Be(e){if(typeof e!=="function")throw Error();return e}function ne(){return 0}function K(e){return function(){return e}}function Ne(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Me(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(o-n)/e.value;while(++h<b)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(s-l)/e.value;while(++h<b)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(e,n,l,o,s,d){var f=[],h=n.children,b,u,m=0,D=0,i=h.length,z,N,_=n.value,g,w,X,O,ee,oe,Y;while(m<i){z=s-l,N=d-o;do g=h[D++].value;while(!g&&D<i);w=X=g,oe=Math.max(N/z,z/N)/(_*e),Y=g*g*oe,ee=Math.max(X/Y,Y/w);for(;D<i;++D){if(g+=u=h[D].value,u<w)w=u;if(u>X)X=u;if(Y=g*g*oe,O=Math.max(X/Y,Y/w),O>ee){g-=u;break}ee=O}if(f.push(b={value:g,dice:z<N,children:h.slice(m,D)}),b.dice)Me(b,l,o,s,_?o+=N*g/_:d);else _e(b,l,o,_?l+=z*g/_:s,d);_-=g,m=D}return f}var Ee=function e(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return e((o=+o)>1?o:1)},l}(tt);function fe(){var e=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,b=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(D),s=[0],n)i.eachBefore(Ne);return i}function D(i){var z=s[i.depth],N=i.x0+z,_=i.y0+z,g=i.x1-z,w=i.y1-z;if(g<N)N=g=(N+g)/2;if(w<_)_=w=(_+w)/2;if(i.x0=N,i.y0=_,i.x1=g,i.y1=w,i.children){if(z=s[i.depth+1]=d(i)/2,N+=u(i)-z,_+=f(i)-z,g-=h(i)-z,w-=b(i)-z,g<N)N=g=(N+g)/2;if(w<_)_=w=(_+w)/2;e(i,N,_,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(e=Be(i),m):e},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:K(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:K(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:K(+i),m):h},m.paddingBottom=function(i){return arguments.length?(b=typeof i==="function"?i:K(+i),m):b},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:K(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getAccDescription=A,this.setAccDescription=T}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=M,n=x();return U({...e.treemap,...n.treemap??{}})}addNode(e,n){if(this.nodes.push(e),this.levels.set(e,n),n===0)this.outerNodes.push(e),this.root??=e}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,n){let l=this.classes.get(e)??{id:e,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Hr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(e,l)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(e){if(!e.length)return[];let n=[],l=[];return e.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}t(We,"buildHierarchy");var rt=t((e,n)=>{G(e,n);let l=[];for(let d of e.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of e.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,b=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,D={level:h,name:b,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(D)}let o=We(l),s=t((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=t((e)=>e.name?String(e.name):"","getItemName"),He={parser:{yy:void 0},parse:t(async(e)=>{try{let l=await Q("treemap",e);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,le=10,ce=25,ot=t((e,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),b=s.getRoot(),{themeVariables:u}=x();if(!b)return;let m=h?30:0,D=V(n),i=d.nodeWidth?d.nodeWidth*le:960,z=d.nodeHeight?d.nodeHeight*le:500,N=i,_=z+m;D.attr("viewBox",`0 0 ${N} ${_}`),F(D,_,N,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=t((c)=>"$"+Nt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=t((P)=>"$"+Nt(","+y)(P),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=t((y)=>"$"+Nt(c||"")(y),"valueFormat")}else g=Nt(r)}catch(r){a.error("Error creating format function:",r),g=Nt(",")}let w=Ke().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),X=Ke().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),O=Ke().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)D.append("text").attr("x",N/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let ee=D.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),oe=re(b).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,z]).paddingTop((r)=>r.children&&r.children.length>0?ce+le:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?le:0).paddingRight((r)=>r.children&&r.children.length>0?le:0).paddingBottom((r)=>r.children&&r.children.length>0?le:0).round(!0)(oe),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),se=ee.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",ce).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),se.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",ce),se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>X(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),se.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",ce/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let P=r.x1-r.x0,W=6,B;if(d.showValues!==!1&&r.value){let I=P-10,J=30,Ge=10;B=I-30-10-W}else B=P-W-6;let v=Math.max(15,B),Z=c.node();if(Z.getComputedTextLength()>v){let J=y;while(J.length>0){if(J=y.substring(0,J.length-1),J.length===0){if(c.text("..."),Z.getComputedTextLength()>v)c.text("");break}if(c.text(J+"..."),Z.getComputedTextLength()<=v)break}}}),d.showValues!==!1)se.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",ce/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),q=De.length>20,Oe=q?16:38,pe=q?14:28,te=q?4:8,ae=q?4:6,he=q?2:4,Ve=q?8:10,me=q?1:2,de=ee.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(de.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),de.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),de.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+O(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,P=r.y1-r.y0,W=c.node(),B=y-2*he,j=P-2*he;if(B<Ve||j<Ve){c.style("display","none");return}let v=parseInt(c.style("font-size"),10),Z=0.6;while(W.getComputedTextLength()>B&&v>te)v--,c.style("font-size",`${v}px`);let H=Math.max(ae,Math.min(pe,Math.round(v*Z))),I=v+me+H;while(I>j&&v>te){if(v--,H=Math.max(ae,Math.min(pe,Math.round(v*Z))),H<ae&&v===te)break;if(c.style("font-size",`${v}px`),I=v+me+H,H<=ae&&I>j);}if(c.style("font-size",`${v}px`),q){if(v<te||j<te)c.style("display","none")}else if(W.getComputedTextLength()>B||v<te||j<v)c.style("display","none")}),d.showValues!==!1)de.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${pe}px;fill:`+O(c.data.name)+";",P=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+P.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),P=this.parentNode;if(!P){y.style("display","none");return}let W=p(P).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let B=parseFloat(W.style("font-size")),v=Math.max(ae,Math.min(pe,Math.round(B*0.6)));y.style("font-size",`${v}px`);let H=(c.y1-c.y0)/2+B/2+me;y.attr("y",H);let I=c.x1-c.x0,Pe=c.y1-c.y0-4,Xe=I-2*he;if(y.node().getComputedTextLength()>Xe||H+v>Pe||v<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;ue(D,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=t(function(e,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=t(({treemap:e}={})=>{let n=ke(),l=x(),o=U(n,l.themeVariables),s=U(ct,e),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${s.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${s.sectionStrokeWidth};
|