1import{C as v,A as _,c as C,d as D,i as x}from"./vendor-charts-BlE0PIEs.js";import{d as I,E as c,c as u,l as r,H as T,A as O,F as w,y as B,b as y,e as A,p as E,q as g,k as R,R as p}from"./vendor-vuetify-DaY1MzuL.js";import{_ as z}from"./index-CkbxFzmV.js";import"./vendor-sentry-CdlvO8A5.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a72773ed-5b22-43fe-8824-2643c74ba6ac",e._sentryDebugIdIdentifier="sentry-dbid-a72773ed-5b22-43fe-8824-2643c74ba6ac")}catch{}const L={class:"chart-zone"},N={class:"wrapper"},P={class:"legend-zone"},V={class:"d-flex"},q={key:0},F=I({__name:"InjPieChart",props:{isReport:{type:Boolean,default:!1},injuriesData:{},column:{type:Boolean}},setup(e){v.register(_,C,D);const t=e,b={Leg:["cruciate ligament surgery","meniscus tear","meniscus injury","ankle problems","cruciate ligament tear","ankle surgery","ankle injury","adductor pain","hamstring injury","ankle ligament tear","thigh problems","torn muscle fiber in the adductor area","ankle sprain","foot injury","internal ligament strain","hamstring strain","contracture","calf problems","adductor injury","calf injury","ankle sprain","broken toe","knee injury","knee problems","foot bruise","achilles heel problems","knee surgery","achilles tendon surgery","torn thigh muscle","broken tibia","bruised knee","patellar tendon tear","torn lateral knee ligament","patellar tendon problems","torn lateral ankle ligament","syndesmotic ligament tear","calf stiffness","arch problems","injury to the ankle","achilles tendon problems","cruciate ligament injury","fatigue fracture","hamstring muscle injury","adductor tear","calf strain","leg injury","hairline fracture in the fibula","hairline crack in foot","achilles tendon irritation","toe injury","metatarsal fracture","patellar tendon rupture"],"Arm/hand":["hand injury","broken arm","arm injury","metacarpal fracture","broken hand"],"Upper body":["chest injury","stomach problems","abdominal problems","rib fracture","hip problems","pubalgia","inguinal hernia","inflammation of pubic bone","bruised ribs","minor knock","knock","vertebral injury","hip flexor problems","strain in the thigh and gluteal muscles","back problems","neck injury","lumbago","shoulder injury","capsular injury","back injury","abdominal muscle strain","groin problems","injury to abdominal muscles","groin injury","hip injury"]},f={Leg:"#ff6b6b","Arm/hand":"#ff8f8f","Upper body":"#ffb3b3",Other:"#ffd6d6"},h=s=>{for(const i in b)if(b[i].includes(s.toLowerCase()))return i;return"Other"},l=p(()=>{if(!t.injuriesData)return;const i=(a=>{const n={};for(const d of a){const m=h(d.injury);n[m]?n[m]+=d.days:n[m]=d.days}return n})(t.injuriesData),o=Object.entries(i);return o.sort((a,n)=>n[1]-a[1]),Object.fromEntries(o)}),j=p(()=>({animation:t.isReport?!1:{duration:500},responsive:!0,devicePixelRatio:2,aspectRatio:1/1,plugins:{legend:{display:!1}},datasets:{pie:{}},elements:{arc:{borderWidth:0}}})),k=p(()=>({labels:Object.keys(l.value||{}),datasets:[{data:Object.values(l.value||{}),backgroundColor:Object.keys(l.value||{}).map(s=>f[s])}]}));return(s,i)=>(c(),u("div",{class:y(["chart-container inj-pie",{column:e.column}])},[r("div",L,[r("div",N,[T(O(x),{data:k.value,options:j.value},null,8,["data","options"])])]),r("div",P,[(c(!0),u(w,null,B(l.value,(o,a,n)=>(c(),u("div",{key:a,class:y(["legend-item ga-2",{"flex-column-reverse":e.column,"align-start":e.column}])},[r("div",V,[r("div",{class:"legend-square mr-2",style:A({backgroundColor:`${f[a]}`})},null,4),r("div",null,[E(g(a),1),e.column?R("",!0):(c(),u("span",q,":"))])]),r("div",{class:y(["tx-subtitle-3 text-black",{"ml-auto":!e.column}])},g(o)+" days",3)],2))),128))])],2))}}),W=z(F,[["__scopeId","data-v-db1cbdeb"]]);export{W as default}; 2//# sourceMappingURL=InjPieChart-DHDyTpeM.js.map
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.