1import{_ as v}from"./zeyI5Q1c.js";import{u as h,w as _,b as y,d as c,e as x,f as d,g as C,h as k,i as w,j as E,k as N,t as D,l as I,c as l,m as B,r as T}from"./CmsKYKpe.js";import{C as $,p as A,a as V,b as R,c as z,A as F}from"./DrWKw2CS.js";import{p as L,D as S,e as O,u as p}from"./B-Lx8lz5.js";import"./CaWirnM8.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"a02251240713bb88b557c5a391cacf7c15ddda42"};var e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="0ad963f1-ec83-45ee-bf9c-4856a461b19b",o._sentryDebugIdIdentifier="sentry-dbid-0ad963f1-ec83-45ee-bf9c-4856a461b19b")}catch{}})();const P={class:"pt-2 sm:pt-5"},q={class:"pt-1 text-right"},G={__name:"DoughnutChartBlock",props:{content:{type:null,required:!0},contentModifiers:{}},emits:["update:content"],setup(o){const e=h(o,"content",{type:null,required:!0});$.register(A,V,R,z,F,L);const r=l(()=>e.value.items?.map(t=>t.label)??[]),i=l(()=>e.value.items?.map(t=>t.value)??[]),f=l(()=>{const t=p().getThemeHex(),a=e.value.items?.length??0;return p().generateColorsSameLightness(t,a)}),n=T([]),u=B("chartContainer");_(i,t=>{n.value=t}),y(u,([t])=>{t?.isIntersecting?n.value=i.value:n.value=[]},{threshold:.1});const b=l(()=>({datasets:[{backgroundColor:f.value,data:n.value,hoverOffset:6}],labels:r.value})),m=l(()=>({animation:{duration:1200},layout:{padding:0},maintainAspectRatio:!1,plugins:{datalabels:{anchor:"center",color:"#ffffff",display:e.value.showValueLabels??!1,formatter:t=>{const a=typeof t=="number"?t:Number(t);return Number.isNaN(a)?"":e.value.isPercent?`${a}%`:`${a}`}},legend:{align:"center",labels:{padding:20},padding:{top:4},position:"bottom"},subtitle:{align:"end",color:"#9CA3AF",display:!!(e.value.source?.label&&!e.value.source?.url),font:{size:11},padding:10,position:"bottom",text:e.value.source?.label??""},title:{color:"#1F2937",display:!!e.value.title,font:{size:16,weight:"bold"},padding:{bottom:16},text:e.value.title},tooltip:{backgroundColor:"#ffffff",bodyColor:"#374151",bodyFont:{size:14},borderColor:"#E5E7EB",borderWidth:1,callbacks:{label:t=>{const a=e.value.items[t.dataIndex];return a?.description?.trim()?` ${a.description.trim()}`:""},title:t=>{const a=t[0];if(!a)return"";const s=e.value.items[a.dataIndex];if(!s)return"";const g=e.value.isPercent?`${s.value}%`:`${s.value}`;return`${s.label} (${g})`}},caretPadding:8,cornerRadius:12,displayColors:!0,enabled:!1,external:O,padding:12,titleColor:"#111827",titleFont:{size:15,weight:"bold"}}},responsive:!0}));return(t,a)=>{const s=v;return c(),x("div",P,[d("div",{ref_key:"chartContainer",ref:u,class:"flex max-h-[450px] flex-col space-y-3"},[C(k(S),{data:b.value,options:m.value},null,8,["data","options"])],512),d("div",q,[e.value.source?.url?(c(),w(s,{key:0,href:e.value.source.url,target:"_blank",class:"text-[10px] !text-gray-400 hover:!text-gray-700"},{default:E(()=>[N(D(e.value.source?.label),1)]),_:1},8,["href"])):I("",!0)])])}}};export{G as default};
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.