PageSourceSearch

https://duendesoftware.com/_astro/diagram-VX7I27RA.C8BeCVH-.js

js duendesoftware.com collected 2026-10-02 06:36:01 UTC 15,900 bytes, 24 lines download raw bytes

vendor: 4,140 bytes, line 1
1import{p as me}from"./chunk-JWPE2WC7.Cw8m6J2o.js";import{_ as w,E as ge,y as te,A as Q,D as ye,d as Se,l as ee,bd as B,j as Y,b as ve,a as xe,n as be,o as we,g as Ce,s as Te,B as Le,be as $e,p as Ae}from"./mermaid.core.CKwbH3qH.js";import{s as Fe}from"./chunk-POPQ4Y6H.BsSxMT2_.js";import{p as Ne}from"./cynefin-OW5HDTMX.jnTtrgEw.js";import{b as I}from"./defaultLocale.DX6XiGOO.js";import{o as K}from"./ordinal.BYWQX77i.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],s,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),s=n.children)for(o=s.length-1;o>=0;--o)l.push(s[o]);return this}function Ve(e,a){for(var n=this,l=[n],s=[],o,h,d,g=-1;n=l.pop();)if(s.push(n),o=n.children)for(h=0,d=o.length;h<d;++h)l.push(o[h]);for(;n=s.pop();)e.call(a,n,++g,this);return this}function De(e,a){let n=-1;for(const l of this)if(e.call(a,l,++n,this))return l}function Pe(e){return this.eachAfter(function(a){for(var n=+e(a.data)||0,l=a.children,s=l&&l.length;--s>=0;)n+=l[s].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function Ee(e){for(var a=this,n=Re(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var s=l.length;e!==n;)l.splice(s,0,e),e=e.parent;return l}function Re(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),s=null;for(e=n.pop(),a=l.pop();e===a;)s=e,e=n.pop(),a=l.pop();return s}function We(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ge(){var e=this,a,n=[e],l,s,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(s=0,o=l.length;s<o;++s)n.push(l[s]);while(n.length)}function ae(e,a){e instanceof Map?(e=[void 0,e],a===void 0&&(a=je)):a===void 0&&(a=Xe);for(var n=new U(e),l,s=[n],o,h,d,g;l=s.pop();)if((h=a(l.data))&&(g=(h=Array.from(h)).length))for(l.children=h,d=g-1;d>=0;--d)s.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function qe(){return ae(this).eachBefore(Ye)}function Xe(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ye(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:Ee,ancestors:We,descendants:He,leaves:Ie,links:Oe,copy:qe,[Symbol.iterator]:Ge};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function Je(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 Ke(e,a,n,l,s){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++d<g;)h=o[d],h.y0=n,h.y1=s,h.x0=a,h.x1=a+=h.value*c}function Qe(e,a,n,l,s){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(s-n)/e.value;++d<g;)h=o[d],h.x0=a,h.x1=l,h.y0=n,h.y1=n+=h.value*c}var et=(1+Math.sqrt(5))/2;function tt(e,a,n,l,s,o){for(var h=[],d=a.children,g,c,u=0,b=0,r=d.length,x,S,v=a.value,p,y,N,$,V,R,M;u<r;){x=s-n,S=o-l;do p=d[b++].value;while(!p&&b<r);for(y=N=p,R=Math.max(S/x,x/S)/(v*e),M=p*p*R,V=Math.max(N/M,M/y);b<r;++b){if(p+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=p*p*R,$=Math.max(N/M,M/y),$>V){p-=c;break}V=$}h.push(g={value:p,dice:x<S,children:d.slice(u,b)}),g.dice?Ke(g,n,l,s,v?l+=S*p/v:o):Qe(g,n,l,v?n+=x*p/v:s,o),v-=p,u=b}return h}const at=(function e(a){function n(l,s,o,h,d){tt(a,l,s,o,h,d)}return n.ratio=function(l){return e((l=+l)>1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,s=[0],o=O,h=O,d=O,g=O,c=O;function u(r){return r.x0=r.y0=0,r.x1=n,r.y1=l,r.eachBefore(b),s=[0],a&&r.eachBefore(Je),r}function b(r){var x=s[r.depth],S=r.x0+x,v=r.y0+x,p=r.x1-x,y=r.y1-x;
vendor: 4,664 bytes, line 1
1p<S&&(S=p=(S+p)/2),y<v&&(v=y=(v+y)/2),r.x0=S,r.y0=v,r.x1=p,r.y1=y,r.children&&(x=s[r.depth+1]=o(r)/2,S+=c(r)-x,v+=h(r)-x,p-=d(r)-x,y-=g(r)-x,p<S&&(S=p=(S+p)/2),y<v&&(v=y=(v+y)/2),e(r,S,v,p,y))}return u.round=function(r){return arguments.length?(a=!!r,u):a},u.size=function(r){return arguments.length?(n=+r[0],l=+r[1],u):[n,l]},u.tile=function(r){return arguments.length?(e=Ze(r),u):e},u.padding=function(r){return arguments.length?u.paddingInner(r).paddingOuter(r):u.paddingInner()},u.paddingInner=function(r){return arguments.length?(o=typeof r=="function"?r:G(+r),u):o},u.paddingOuter=function(r){return arguments.length?u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):u.paddingTop()},u.paddingTop=function(r){return arguments.length?(h=typeof r=="function"?r:G(+r),u):h},u.paddingRight=function(r){return arguments.length?(d=typeof r=="function"?r:G(+r),u):d},u.paddingBottom=function(r){return arguments.length?(g=typeof r=="function"?r:G(+r),u):g},u.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:G(+r),u):c},u}var ie=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ve,this.getAccTitle=xe,this.setDiagramTitle=be,this.getDiagramTitle=we,this.getAccDescription=Ce,this.setAccDescription=Te}static{w(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=Le,a=te();return Q({...e.treemap,...a.treemap??{}})}addNode(e,a){this.nodes.push(e),this.levels.set(e,a),a===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,a){const n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=a.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(s=>{$e(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const s={name:l.name,children:l.type==="Leaf"?void 0:[]};for(s.classSelector=l?.classSelector,l?.cssCompiledStyles&&(s.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(s.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(s);else{const o=n[n.length-1].node;o.children?o.children.push(s):o.children=[s]}l.type!=="Leaf"&&n.push({node:s,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=st(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],u=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};n.push(b)}const l=oe(n),s=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&s(d.children,h+1)},"addNodesRecursively");s(l,0)},"populate"),st=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new 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.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},rt=10,E=10,q=25,it=w((e,a,n,l)=>{const s=l.db,o=s.getConfig(),h=o.padding??rt,d=s.getDiagramTitle(),g=s.getRoot(),{themeVariables:c}=te();if(!g)return;const u=d?30:0,b=ye(a),r=o.nodeWidth?o.nodeWidth*E:960,x=o.nodeHeight?o.nodeHeight*E:500,S=r,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let p;try{const t=o.valueFormat||",";if(t==="$0,0")p=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";p=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);p=w(f=>"$"+I(i||"")(f),"valueFormat")}else p=I(t)}catch(t){ee.error("Error creating format function:",t),p=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([
vendor: 4,417 bytes, line 1
1c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([r,x]).paddingTop(t=>t.children&&t.children.length>0?q+E:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?E:0).paddingRight(t=>t.children&&t.children.length>0?E:0).paddingBottom(t=>t.children&&t.children.length>0?E:0).round(!0)(R),he=ne.descendants().filter(t=>t.children&&t.children.length>0),W=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),W.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?p(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,se=A?8:10,J=A?1:2,j=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);j.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}
1-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(T<se||P<se){i.style("display","none");return}let m=parseInt(i.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(F<H&&m===D));)i.style("font-size",`${m}px`),k=m+J+F;i.style("font-size",`${m}px`),A?(m<D||P<D)&&i.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&i.style("display","none")}),o.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?p(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,re=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>re||m<H?f.style("display","none"):f.style("display",null)});const ue=o.diagramPadding??8;Fe(b,ue,"flowchart",o?.useMaxWidth||!1)},"draw"),ot=w(function(e,a){return a.db.getClasses()},"getClasses"),ct={draw:it,getClasses:ot},ht={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},dt=w(({treemap:e}={})=>{const a=ge(),n=te(),l=Q(a,n.themeVariables),s=Q(ht,e),o=s.titleColor??l.titleColor,h=s.labelColor??l.textColor,d=s.valueColor??l.textColor;return`
2  .treemapNode.section {
3    stroke: ${s.sectionStrokeColor};
4    stroke-width: ${s.sectionStrokeWidth};
5    fill: ${s.sectionFillColor};
6  }
7  .treemapNode.leaf {
8    stroke: ${s.leafStrokeColor};
9    stroke-width: ${s.leafStrokeWidth};
10    fill: ${s.leafFillColor};
11  }
12  .treemapLabel {
13    fill: ${h};
14    font-size: ${s.labelFontSize};
15  }
16  .treemapValue {
17    fill: ${d};
18    font-size: ${s.valueFontSize};
19  }
20  .treemapTitle {
21    fill: ${o};
22    font-size: ${s.titleFontSize};
23  }
24  `},"getStyles"),ut=dt,xt={parser:ce,get db(){return new ie},renderer:ct,styles:ut};export{xt as diagram};

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.