1"use strict";(self.webpackChunkphpvms_docs=self.webpackChunkphpvms_docs||[]).push([[8207],{25871(e,t,a){function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(40797).K2)(i,"populateCommonDb")},48207(e,t,a){a.d(t,{diagram:()=>C});var i=a(38342),l=a(25871),n=a(28718),r=a(17726),s=a(40797),o=a(78731),c=a(70451),p=r.UI.pie,d={sections:new Map,showData:!1,config:p},u=d.sections,h=d.showData,g=structuredClone(p),m=(0,s.K2)(()=>structuredClone(g),"getConfig"),f=(0,s.K2)(()=>{u=new Map,h=d.showData,(0,r.IU)()},"clear"),w=(0,s.K2)(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);u.has(e)||(u.set(e,t),s.Rm.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),x=(0,s.K2)(()=>u,"getSections"),S=(0,s.K2)(e=>{h=e},"setShowData"),$=(0,s.K2)(()=>h,"getShowData"),D={getConfig:m,clear:f,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:w,getSections:x,setShowData:S,getShowData:$},T=(0,s.K2)((e,t)=>{(0,l.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),b={parse:(0,s.K2)(async e=>{const t=await(0,o.qg)("pie",e);s.Rm.debug(t),T(t,D)},"parse")},v=(0,s.K2)(e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`,"getStyles"),y=(0,s.K2)(e=>{const t=[...e.values()].reduce((e,t)=>e+t,0),a=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return(0,c.rLf)().value(e=>e.value).sort(null)(a)},"createPieArcs"),C={parser:b,db:D,renderer:{draw:(0,s.K2)((e,t,a,l)=>{s.Rm.debug("rendering pie chart\n"+e);const o=l.db,p=(0,r.D7)(),d=(0,n.$t)(o.getConfig(),p.pie),u=18,h=450,g=h,m=(0,i.D)(t),f=m.append("g");f.attr("transform","translate(225,225)");const{themeVariables:w}=p;let[x]=(0,n.I5)(w.pieOuterStrokeWidth);x??=2;const S=d.textPosition,$=Math.min(g,h)/2-40,D=(0,c.JLW)().innerRadius(0).outerRadius($),T=(0,c.JLW)().innerRadius($*S).outerRadius($*S);f.append("circle").attr("cx",0).attr("cy",0).attr("r",$+x/2).attr("class","pieOuterCircle");const b=o.getSections(),v=y(b),C=[w.pie1,w.pie2,w.pie3,w.pie4,w.pie5,w.pie6,w.pie7,w.pie8,w.pie9,w.pie10,w.pie11,w.pie12];let k=0;b.forEach(e=>{k+=e});const A=v.filter(e=>"0"!==(e.data.value/k*100).toFixed(0)),K=(0,c.UMr)(C).domain([...b.keys()]);f.selectAll("mySlices").data(A).enter().append("path").attr("d",D).attr("fill",e=>K(e.data.label)).attr("class","pieCircle"),f.selectAll("mySlices").data(A).enter().append("text").text(e=>(e.data.value/k*100).toFixed(0)+"%").attr("transform",e=>"translate("+T.centroid(e)+")").style("text-anchor","middle").attr("class","slice");const R=f.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),M=[...b.entries()].map(([e,t])=>({label:e,value:t})),z=f.selectAll(".legend").data(M).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*M.length/2)+")");z.append("rect").attr("width",u).attr("height",u).style("fill",e=>K(e.label)).style("stroke",e=>K(e.label)),z.append("text").attr("x",22).attr("y",14).text(e=>o.getShowData()?`${e.label} [${e.value}]`:e.label);const O=512+Math.max(...z.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),W=R.node()?.getBoundingClientRect().width??0,F=225-W/2,L=225+W/2,I=Math.min(0,F),B=Math.max(O,L)-I;m.attr("viewBox",`${I} 0 ${B} 450`),(0,r.a$)(m,h,B,d.useMaxWidth)},"draw")},styles:v}}}]);
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.