@glycanage/web-components 1.220.0 → 1.222.0

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.
@@ -1 +1 @@
1
- import{c as Y,S as J,i as K,f as Q,s as U,e as L,b as O,n as t,p as j,g as q,q as C,u as B,k as W,o as _,A as tt}from"./index2.js";import{g as et}from"./globals.js";import{h as N}from"./helpers.js";const{document:it}=et;function st(T){let e,f,b,s,A,o,i,g;return{c(){e=L("div"),f=L("div"),b=O(),s=L("div"),s.textContent="Chronological age",A=O(),o=L("div"),o.textContent="Biological age",i=O(),g=L("link"),t(f,"width","100%"),t(f,"height","100%"),t(s,"position","absolute"),t(s,"bottom","6px"),t(s,"left","50%"),t(s,"transform","translateX(-50%)"),t(s,"font-family","Sen, sans-serif"),t(s,"font-size","12px"),t(s,"color","#09341F"),t(s,"opacity","0.8"),t(o,"position","absolute"),t(o,"top","50%"),t(o,"right","88%"),t(o,"transform","translateY(-50%) rotate(-90deg)"),t(o,"font-family","Sen, sans-serif"),t(o,"font-size","12px"),t(o,"color","#09341F"),t(o,"opacity","0.8"),t(o,"white-space","nowrap"),t(e,"width","100%"),t(e,"height","100%"),t(e,"position","relative"),t(e,"border","1px solid #09341F33"),t(e,"border-radius","10px"),j(g,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),j(g,"rel","stylesheet")},m(n,x){q(n,e,x),C(e,f),T[2](f),C(e,b),C(e,s),C(e,A),C(e,o),q(n,i,x),C(it.head,g)},p:B,i:B,o:B,d(n){n&&(W(e),W(i)),T[2](null),W(g)}}}function ot(T,e,f){let{service:b=window.GaReportService}=e,s,A,o=[],i={},g="",n=0,x=0,p=0,S;function G(){S&&(i=echarts.init(S,null,{devicePixelRatio:4,renderer:"svg"}));const a=S.getBoundingClientRect();var d={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"transparent",grid:{top:"15px",left:"50px",right:"45px",bottom:"45px"},dataset:[{source:A.data.map(r=>[r.x,r.y])}],tooltip:{show:!1},xAxis:{min:10,max:90,interval:10,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(r){return r===0||r===100?"":r}},splitLine:{show:!0}},yAxis:{min:15,max:85,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!1,color:"#09341F",opacity:.8,formatter(r){return r===0||r===.6?"":r}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},symbolSize:4,itemStyle:{color:"#09341F",opacity:.15,borderWidth:1,lineWidth:12}}],graphic:[]};i.setOption(d);const y=10,H=6,w=2,M=1.5,h=1.5,I=N(p);{const r=i.convertToPixel("xAxis",n),m=i.convertToPixel("yAxis",15),k=i.convertToPixel("yAxis",x),P=Math.abs(k-m),R=k<m?-1:1;let c=0;for(;c<P;){const v=Math.min(y,P-c),$=R===-1?m-c-v:m+c;d.graphic.push({type:"rect",zlevel:10,shape:{x:r-w/2-h,y:$-h,width:w+h*2,height:v+h*2,r:M+h},style:{fill:"#FFFFFF"},z:14}),d.graphic.push({type:"rect",zlevel:10,shape:{x:r-w/2,y:$,width:w,height:v,r:M},style:{fill:I},z:15}),c+=y+H}}{const r=i.convertToPixel("yAxis",x),m=i.convertToPixel("xAxis",10),k=i.convertToPixel("xAxis",n),P=Math.abs(k-m),R=k>m?1:-1;let c=0;for(;c<P;){const v=Math.min(y,P-c),$=R===1?m+c:m-c-v;d.graphic.push({type:"rect",zlevel:10,shape:{x:$-h,y:r-w/2-h,width:v+h*2,height:w+h*2,r:M+h},style:{fill:"#FFFFFF"},z:14}),d.graphic.push({type:"rect",zlevel:10,shape:{x:$,y:r-w/2,width:v,height:w,r:M},style:{fill:I},z:15}),c+=y+H}}d.graphic.push({name:"Measured result",type:"circle",zlevel:10,shape:{cx:i.convertToPixel("xAxis",n),cy:i.convertToPixel("yAxis",x),r:6},style:{fill:N(p),stroke:"#FFFFFF",lineWidth:2},z:15});const V=i.convertToPixel("xAxis",n),Z=i.convertToPixel("yAxis",x),l=document.createElementNS("http://www.w3.org/2000/svg","svg"),u=document.createElement("div");l.setAttribute("width","75"),l.setAttribute("height","36"),l.setAttribute("viewBox","-2 -2 75 36"),l.setAttribute("fill","none"),l.setAttribute("xmlns","http://www.w3.org/2000/svg");const z=document.createElementNS("http://www.w3.org/2000/svg","path");z.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),z.setAttribute("fill",N(p)),z.setAttribute("stroke","#FFFFFF"),z.setAttribute("stroke-width","4"),z.setAttribute("paint-order","stroke");const F=document.createElementNS("http://www.w3.org/2000/svg","path");F.setAttribute("d","M7 10L1.13333 14.4C0.0666666 15.2 0.0666666 16.8 1.13333 17.6L7 22"),F.setAttribute("fill","none"),F.setAttribute("stroke","#FFFFFF"),F.setAttribute("stroke-width","2.5"),F.setAttribute("stroke-linejoin","round"),F.setAttribute("stroke-linecap","round");const E=document.createElementNS("http://www.w3.org/2000/svg","path");E.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),E.setAttribute("fill",N(p)),l.appendChild(F),l.appendChild(z),l.appendChild(E),l.style.position="absolute",l.style.left=`${a.left+V+8}px`,l.style.top=`${a.top+Z-17}px`,l.style.zIndex="8",u.innerText=`${Number.parseFloat(p)} pct`,u.style.position="absolute",u.style.left=`${a.left+V+26}px`,u.style.top=`${a.top+Z-10}px`,u.style.font="bold 16px sans-serif",u.style.color="white",u.style.zIndex="999",u.style.fontFamily="Sen",document.body.appendChild(u),document.body.appendChild(l),i.setOption(d)}_(async()=>{s=await b.getReport(),g=s.sex,A=await b.getAgeData(g),n=Number(s.chronologicalage),x=Number(s.glycanage),o=A.data.filter(y=>y.x>=n-5&&y.x<=n+5);let a=o.filter(y=>y.y<x).length,d=o.length;p=Math.round(a/d*100),(p===100||p===0)&&(p=p===100?99:1),G()});function X(a){tt[a?"unshift":"push"](()=>{S=a,f(0,S)})}return T.$$set=a=>{"service"in a&&f(1,b=a.service)},[S,b,X]}class D extends J{constructor(e){super(),K(this,e,ot,st,U,{service:1})}get service(){return this.$$.ctx[1]}set service(e){this.$$set({service:e}),Q()}}customElements.define("ga-biological-age-rank-scatter",Y(D,{service:{}},[],[],!1));export{D as default};
1
+ import{c as Y,S as J,i as K,f as Q,s as U,e as L,b as O,n as t,p as Z,g as j,q as z,u as B,k as G,o as _,A as tt}from"./index2.js";import{g as et}from"./globals.js";import{h as N}from"./helpers.js";const{document:it}=et;function st(T){let e,f,b,s,A,o,i,g;return{c(){e=L("div"),f=L("div"),b=O(),s=L("div"),s.textContent="Chronological age",A=O(),o=L("div"),o.textContent="Biological age",i=O(),g=L("link"),t(f,"width","100%"),t(f,"height","100%"),t(s,"position","absolute"),t(s,"bottom","6px"),t(s,"left","50%"),t(s,"transform","translateX(-50%)"),t(s,"font-family","Sen, sans-serif"),t(s,"font-size","12px"),t(s,"color","#09341F"),t(s,"opacity","0.8"),t(o,"position","absolute"),t(o,"top","50%"),t(o,"right","88%"),t(o,"transform","translateY(-50%) rotate(-90deg)"),t(o,"font-family","Sen, sans-serif"),t(o,"font-size","12px"),t(o,"color","#09341F"),t(o,"opacity","0.8"),t(o,"white-space","nowrap"),t(e,"width","100%"),t(e,"height","100%"),t(e,"position","relative"),t(e,"border","1px solid #09341F33"),t(e,"border-radius","10px"),Z(g,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),Z(g,"rel","stylesheet")},m(n,x){j(n,e,x),z(e,f),T[2](f),z(e,b),z(e,s),z(e,A),z(e,o),j(n,i,x),z(it.head,g)},p:B,i:B,o:B,d(n){n&&(G(e),G(i)),T[2](null),G(g)}}}function ot(T,e,f){let{service:b=window.GaReportService}=e,s,A,o=[],i={},g="",n=0,x=0,p=0,S;function D(){S&&(i=echarts.init(S,null,{devicePixelRatio:4,renderer:"svg"}));const a=S.getBoundingClientRect();var d={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"transparent",grid:{top:"15px",left:"50px",right:"45px",bottom:"45px"},dataset:[{source:A.data.map(r=>[r.CA,r.GA])}],tooltip:{show:!1},xAxis:{min:10,max:90,interval:10,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(r){return r===0||r===100?"":r}},splitLine:{show:!0}},yAxis:{min:15,max:85,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!1,color:"#09341F",opacity:.8,formatter(r){return r===0||r===.6?"":r}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},symbolSize:4,itemStyle:{color:"#09341F",opacity:.15,borderWidth:1,lineWidth:12}}],graphic:[]};i.setOption(d);const y=10,W=6,w=2,M=1.5,h=1.5,H=N(p);{const r=i.convertToPixel("xAxis",n),m=i.convertToPixel("yAxis",15),k=i.convertToPixel("yAxis",x),P=Math.abs(k-m),R=k<m?-1:1;let c=0;for(;c<P;){const v=Math.min(y,P-c),$=R===-1?m-c-v:m+c;d.graphic.push({type:"rect",zlevel:10,shape:{x:r-w/2-h,y:$-h,width:w+h*2,height:v+h*2,r:M+h},style:{fill:"#FFFFFF"},z:14}),d.graphic.push({type:"rect",zlevel:10,shape:{x:r-w/2,y:$,width:w,height:v,r:M},style:{fill:H},z:15}),c+=y+W}}{const r=i.convertToPixel("yAxis",x),m=i.convertToPixel("xAxis",10),k=i.convertToPixel("xAxis",n),P=Math.abs(k-m),R=k>m?1:-1;let c=0;for(;c<P;){const v=Math.min(y,P-c),$=R===1?m+c:m-c-v;d.graphic.push({type:"rect",zlevel:10,shape:{x:$-h,y:r-w/2-h,width:v+h*2,height:w+h*2,r:M+h},style:{fill:"#FFFFFF"},z:14}),d.graphic.push({type:"rect",zlevel:10,shape:{x:$,y:r-w/2,width:v,height:w,r:M},style:{fill:H},z:15}),c+=y+W}}d.graphic.push({name:"Measured result",type:"circle",zlevel:10,shape:{cx:i.convertToPixel("xAxis",n),cy:i.convertToPixel("yAxis",x),r:6},style:{fill:N(p),stroke:"#FFFFFF",lineWidth:2},z:15});const I=i.convertToPixel("xAxis",n),V=i.convertToPixel("yAxis",x),l=document.createElementNS("http://www.w3.org/2000/svg","svg"),u=document.createElement("div");l.setAttribute("width","75"),l.setAttribute("height","36"),l.setAttribute("viewBox","-2 -2 75 36"),l.setAttribute("fill","none"),l.setAttribute("xmlns","http://www.w3.org/2000/svg");const C=document.createElementNS("http://www.w3.org/2000/svg","path");C.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),C.setAttribute("fill",N(p)),C.setAttribute("stroke","#FFFFFF"),C.setAttribute("stroke-width","4"),C.setAttribute("paint-order","stroke");const F=document.createElementNS("http://www.w3.org/2000/svg","path");F.setAttribute("d","M7 10L1.13333 14.4C0.0666666 15.2 0.0666666 16.8 1.13333 17.6L7 22"),F.setAttribute("fill","none"),F.setAttribute("stroke","#FFFFFF"),F.setAttribute("stroke-width","2.5"),F.setAttribute("stroke-linejoin","round"),F.setAttribute("stroke-linecap","round");const E=document.createElementNS("http://www.w3.org/2000/svg","path");E.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),E.setAttribute("fill",N(p)),l.appendChild(F),l.appendChild(C),l.appendChild(E),l.style.position="absolute",l.style.left=`${a.left+I+8}px`,l.style.top=`${a.top+V-17}px`,l.style.zIndex="8",u.innerText=`${Number.parseFloat(p)} pct`,u.style.position="absolute",u.style.left=`${a.left+I+26}px`,u.style.top=`${a.top+V-10}px`,u.style.font="bold 16px sans-serif",u.style.color="white",u.style.zIndex="999",u.style.fontFamily="Sen",document.body.appendChild(u),document.body.appendChild(l),i.setOption(d)}_(async()=>{s=await b.getReport(),g=s.sex,A=await b.getAgeData(g),n=Number(s.chronologicalage),x=Number(s.glycanage),o=A.data.filter(y=>y.CA>=n-5&&y.CA<=n+5);let a=o.filter(y=>y.GA<x).length,d=o.length;p=Math.round(a/d*100),(p===100||p===0)&&(p=p===100?99:1),D()});function X(a){tt[a?"unshift":"push"](()=>{S=a,f(0,S)})}return T.$$set=a=>{"service"in a&&f(1,b=a.service)},[S,b,X]}class q extends J{constructor(e){super(),K(this,e,ot,st,U,{service:1})}get service(){return this.$$.ctx[1]}set service(e){this.$$set({service:e}),Q()}}customElements.define("ga-biological-age-rank-scatter",Y(q,{service:{}},[],[],!1));export{q as default};
@@ -1,3 +1,3 @@
1
- import{c as ye,S as Be,i as Ce,f as ke,s as Fe,a as Ae,d as je,g as xe,u as ue,k as me,o as ze,e as i,m as b,b as g,v as z,n as s,p as t,q as e,r as X}from"./index2.js";import{s as Y,h as m,j as S}from"./helpers.js";function Se(o){Ae(o,"svelte-1rqq33g",".main.svelte-1rqq33g{height:100%;width:100%;display:flex;flex-direction:column}.label.svelte-1rqq33g{height:15%;width:100%;display:flex;justify-content:center}.graph.svelte-1rqq33g{height:85%;width:100%;display:flex;align-items:center;justify-content:center;border:1px solid #09341F33;border-radius:10px}.graph-container.svelte-1rqq33g{width:85%;height:100%;display:flex;align-items:center;justify-content:space-between;position:relative}.colorBox.svelte-1rqq33g{height:7px;width:14.3%;border-radius:24px}.colorBoxShort.svelte-1rqq33g{height:7px;width:5%;border-radius:24px}.slider.svelte-1rqq33g{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%;max-height:70px}.slider-number.svelte-1rqq33g{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -120%);width:24%;font-size:0.71rem;color:white}.text-left.svelte-1rqq33g{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:58%;left:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-middle.svelte-1rqq33g{position:absolute;height:15%;top:58%;left:35%;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-right.svelte-1rqq33g{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:58%;right:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.slider-triangle.svelte-1rqq33g{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%}")}function we(o){let a,r,n,c,y,B,$,h,C,p=Y(o[0],"english")+"",k,W,Z,v,l,_,le,E,se,G,re,H,ie,I,oe,J,ae,K,ne,O,ce,F,x,w,P,ge,A,D,ee,Q,T=Y(o[0],"english")+"",te,de,he,j,u,L,U,fe,q,V,qe,M,pe,N,ve,R;return{c(){a=i("div"),r=i("div"),n=b(`Biological age ranks in the\xA0
2
- `),c=i("span"),y=i("b"),B=b(o[0]),$=g(),h=i("sup"),C=i("b"),k=b(p),W=b(`
3
- \xA0percentile:`),Z=g(),v=i("div"),l=i("div"),_=i("div"),le=g(),E=i("div"),se=g(),G=i("div"),re=g(),H=i("div"),ie=g(),I=i("div"),oe=g(),J=i("div"),ae=g(),K=i("div"),ne=g(),O=i("div"),ce=g(),F=i("div"),x=z("svg"),w=z("rect"),ge=g(),A=i("div"),D=i("b"),ee=b(o[0]),Q=i("sup"),te=b(T),de=b(" percentile"),he=g(),j=i("div"),u=z("svg"),L=z("path"),fe=g(),q=z("svg"),V=z("path"),qe=g(),M=i("div"),M.textContent="Better than peers",pe=g(),N=i("div"),N.textContent="Average/Median",ve=g(),R=i("div"),R.textContent="Worse than peers",s(c,"color",m(o[0])),s(c,"height","80%"),s(c,"display","flex"),s(h,"color",m(o[0])),s(h,"font-size","0.65rem"),t(r,"class","label svelte-1rqq33g"),t(_,"class","colorBoxShort svelte-1rqq33g"),s(_,"background-color","#015566"),t(E,"class","colorBox svelte-1rqq33g"),s(E,"background-color","#015566"),t(G,"class","colorBox svelte-1rqq33g"),s(G,"background-color","#13A195"),t(H,"class","colorBox svelte-1rqq33g"),s(H,"background-color","#66CCAA"),t(I,"class","colorBox svelte-1rqq33g"),s(I,"background-color","#66CCAA"),t(J,"class","colorBox svelte-1rqq33g"),s(J,"background-color","#F2800D"),t(K,"class","colorBox svelte-1rqq33g"),s(K,"background-color","#DF2120"),t(O,"class","colorBoxShort svelte-1rqq33g"),s(O,"background-color","#DF2120"),t(w,"width","100"),t(w,"height","24"),t(w,"rx","4"),t(w,"fill",P=m(o[0])),t(x,"width","100"),t(x,"height","24"),t(x,"viewBox","0 0 100 24"),t(x,"fill","none"),t(x,"xmlns","http://www.w3.org/2000/svg"),t(F,"class","slider svelte-1rqq33g"),s(F,"left",S(o[0])+"%"),s(Q,"font-size","0.5rem"),t(A,"class","slider-number svelte-1rqq33g"),s(A,"left",S(o[0])+"%"),t(L,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),t(L,"fill",U=m(o[0])),t(u,"width","12"),t(u,"height","8"),t(u,"viewBox","0 0 12 8"),t(u,"fill","none"),t(u,"xmlns","http://www.w3.org/2000/svg"),t(j,"class","slider-triangle svelte-1rqq33g"),s(j,"left",S(o[0])+"%"),t(V,"d","M4.39707 0.25C4.58952 -0.083333 5.07064 -0.0833333 5.26309 0.25L9.59322 7.75C9.78567 8.08333 9.5451 8.5 9.1602 8.5H0.499951C0.115051 8.5 -0.125512 8.08333 0.0669386 7.75L4.39707 0.25Z"),t(V,"fill","#66CCAA"),t(q,"width","10"),t(q,"height","9"),t(q,"viewBox","0 0 10 9"),t(q,"fill","none"),t(q,"xmlns","http://www.w3.org/2000/svg"),s(q,"position","absolute"),s(q,"left","50%"),s(q,"top","50%"),s(q,"transform","translate(-50%, 30%)"),t(M,"class","text-left svelte-1rqq33g"),s(M,"width","34.7%"),t(N,"class","text-middle svelte-1rqq33g"),s(N,"width","29.5%"),t(R,"class","text-right svelte-1rqq33g"),s(R,"width","34.7%"),t(l,"class","graph-container svelte-1rqq33g"),t(v,"class","graph svelte-1rqq33g"),t(a,"class","main svelte-1rqq33g")},m(d,f){xe(d,a,f),e(a,r),e(r,n),e(r,c),e(c,y),e(y,B),e(r,$),e(r,h),e(h,C),e(C,k),e(r,W),e(a,Z),e(a,v),e(v,l),e(l,_),e(l,le),e(l,E),e(l,se),e(l,G),e(l,re),e(l,H),e(l,ie),e(l,I),e(l,oe),e(l,J),e(l,ae),e(l,K),e(l,ne),e(l,O),e(l,ce),e(l,F),e(F,x),e(x,w),e(l,ge),e(l,A),e(A,D),e(D,ee),e(D,Q),e(Q,te),e(D,de),e(l,he),e(l,j),e(j,u),e(u,L),e(l,fe),e(l,q),e(q,V),e(l,qe),e(l,M),e(l,pe),e(l,N),e(l,ve),e(l,R)},p(d,f){f&1&&X(B,d[0]),f&1&&s(c,"color",m(d[0])),f&1&&p!==(p=Y(d[0],"english")+"")&&X(k,p),f&1&&s(h,"color",m(d[0])),f&1&&P!==(P=m(d[0]))&&t(w,"fill",P),f&1&&s(F,"left",S(d[0])+"%"),f&1&&X(ee,d[0]),f&1&&T!==(T=Y(d[0],"english")+"")&&X(te,T),f&1&&s(A,"left",S(d[0])+"%"),f&1&&U!==(U=m(d[0]))&&t(L,"fill",U),f&1&&s(j,"left",S(d[0])+"%")},d(d){d&&me(a)}}}function $e(o){let a,r=o[1]&&we(o);return{c(){r&&r.c(),a=je()},m(n,c){r&&r.m(n,c),xe(n,a,c)},p(n,[c]){n[1]?r?r.p(n,c):(r=we(n),r.c(),r.m(a.parentNode,a)):r&&(r.d(1),r=null)},i:ue,o:ue,d(n){n&&me(a),r&&r.d(n)}}}function De(o,a,r){let{service:n=window.GaReportService}=a,c,y,B="",$=0,h=0,C=!1;return ze(async()=>{c=await n.getReport(),B=c.sex,y=await n.getAgeData(B),$=Number(c.glycanage);let p=Number(c.chronologicalage),k=y.data.filter(v=>v.x>=p-5&&v.x<=p+5),W=k.filter(v=>v.y<$).length,Z=k.length;r(0,h=Math.round(W/Z*100)),(h===100||h===0)&&r(0,h=h===100?99:1),r(1,C=!0)}),o.$$set=p=>{"service"in p&&r(2,n=p.service)},[h,C,n]}class be extends Be{constructor(a){super(),Ce(this,a,De,$e,Fe,{service:2},Se)}get service(){return this.$$.ctx[2]}set service(a){this.$$set({service:a}),ke()}}customElements.define("ga-biological-age-rank",ye(be,{service:{}},[],[],!0));export{be as default};
1
+ import{c as ye,S as Be,i as Ce,f as ke,s as Ae,a as Fe,d as je,g as xe,u as ue,k as me,o as ze,e as i,m as b,b as g,v as z,n as s,p as t,q as e,r as X}from"./index2.js";import{s as Y,h as m,j as S}from"./helpers.js";function Se(o){Fe(o,"svelte-1rqq33g",".main.svelte-1rqq33g{height:100%;width:100%;display:flex;flex-direction:column}.label.svelte-1rqq33g{height:15%;width:100%;display:flex;justify-content:center}.graph.svelte-1rqq33g{height:85%;width:100%;display:flex;align-items:center;justify-content:center;border:1px solid #09341F33;border-radius:10px}.graph-container.svelte-1rqq33g{width:85%;height:100%;display:flex;align-items:center;justify-content:space-between;position:relative}.colorBox.svelte-1rqq33g{height:7px;width:14.3%;border-radius:24px}.colorBoxShort.svelte-1rqq33g{height:7px;width:5%;border-radius:24px}.slider.svelte-1rqq33g{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%;max-height:70px}.slider-number.svelte-1rqq33g{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -120%);width:24%;font-size:0.71rem;color:white}.text-left.svelte-1rqq33g{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:58%;left:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-middle.svelte-1rqq33g{position:absolute;height:15%;top:58%;left:35%;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-right.svelte-1rqq33g{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:58%;right:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.slider-triangle.svelte-1rqq33g{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%}")}function we(o){let a,r,n,c,y,B,$,h,C,p=Y(o[0],"english")+"",k,G,W,v,l,Z,le,_,se,E,re,H,ie,I,oe,J,ae,K,ne,O,ce,A,x,w,P,ge,F,D,ee,Q,T=Y(o[0],"english")+"",te,de,he,j,u,L,U,fe,q,V,qe,M,pe,N,ve,R;return{c(){a=i("div"),r=i("div"),n=b(`Biological age ranks in the\xA0
2
+ `),c=i("span"),y=i("b"),B=b(o[0]),$=g(),h=i("sup"),C=i("b"),k=b(p),G=b(`
3
+ \xA0percentile:`),W=g(),v=i("div"),l=i("div"),Z=i("div"),le=g(),_=i("div"),se=g(),E=i("div"),re=g(),H=i("div"),ie=g(),I=i("div"),oe=g(),J=i("div"),ae=g(),K=i("div"),ne=g(),O=i("div"),ce=g(),A=i("div"),x=z("svg"),w=z("rect"),ge=g(),F=i("div"),D=i("b"),ee=b(o[0]),Q=i("sup"),te=b(T),de=b(" percentile"),he=g(),j=i("div"),u=z("svg"),L=z("path"),fe=g(),q=z("svg"),V=z("path"),qe=g(),M=i("div"),M.textContent="Better than peers",pe=g(),N=i("div"),N.textContent="Average/Median",ve=g(),R=i("div"),R.textContent="Worse than peers",s(c,"color",m(o[0])),s(c,"height","80%"),s(c,"display","flex"),s(h,"color",m(o[0])),s(h,"font-size","0.65rem"),t(r,"class","label svelte-1rqq33g"),t(Z,"class","colorBoxShort svelte-1rqq33g"),s(Z,"background-color","#015566"),t(_,"class","colorBox svelte-1rqq33g"),s(_,"background-color","#015566"),t(E,"class","colorBox svelte-1rqq33g"),s(E,"background-color","#13A195"),t(H,"class","colorBox svelte-1rqq33g"),s(H,"background-color","#66CCAA"),t(I,"class","colorBox svelte-1rqq33g"),s(I,"background-color","#66CCAA"),t(J,"class","colorBox svelte-1rqq33g"),s(J,"background-color","#F2800D"),t(K,"class","colorBox svelte-1rqq33g"),s(K,"background-color","#DF2120"),t(O,"class","colorBoxShort svelte-1rqq33g"),s(O,"background-color","#DF2120"),t(w,"width","100"),t(w,"height","24"),t(w,"rx","4"),t(w,"fill",P=m(o[0])),t(x,"width","100"),t(x,"height","24"),t(x,"viewBox","0 0 100 24"),t(x,"fill","none"),t(x,"xmlns","http://www.w3.org/2000/svg"),t(A,"class","slider svelte-1rqq33g"),s(A,"left",S(o[0])+"%"),s(Q,"font-size","0.5rem"),t(F,"class","slider-number svelte-1rqq33g"),s(F,"left",S(o[0])+"%"),t(L,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),t(L,"fill",U=m(o[0])),t(u,"width","12"),t(u,"height","8"),t(u,"viewBox","0 0 12 8"),t(u,"fill","none"),t(u,"xmlns","http://www.w3.org/2000/svg"),t(j,"class","slider-triangle svelte-1rqq33g"),s(j,"left",S(o[0])+"%"),t(V,"d","M4.39707 0.25C4.58952 -0.083333 5.07064 -0.0833333 5.26309 0.25L9.59322 7.75C9.78567 8.08333 9.5451 8.5 9.1602 8.5H0.499951C0.115051 8.5 -0.125512 8.08333 0.0669386 7.75L4.39707 0.25Z"),t(V,"fill","#66CCAA"),t(q,"width","10"),t(q,"height","9"),t(q,"viewBox","0 0 10 9"),t(q,"fill","none"),t(q,"xmlns","http://www.w3.org/2000/svg"),s(q,"position","absolute"),s(q,"left","50%"),s(q,"top","50%"),s(q,"transform","translate(-50%, 30%)"),t(M,"class","text-left svelte-1rqq33g"),s(M,"width","34.7%"),t(N,"class","text-middle svelte-1rqq33g"),s(N,"width","29.5%"),t(R,"class","text-right svelte-1rqq33g"),s(R,"width","34.7%"),t(l,"class","graph-container svelte-1rqq33g"),t(v,"class","graph svelte-1rqq33g"),t(a,"class","main svelte-1rqq33g")},m(d,f){xe(d,a,f),e(a,r),e(r,n),e(r,c),e(c,y),e(y,B),e(r,$),e(r,h),e(h,C),e(C,k),e(r,G),e(a,W),e(a,v),e(v,l),e(l,Z),e(l,le),e(l,_),e(l,se),e(l,E),e(l,re),e(l,H),e(l,ie),e(l,I),e(l,oe),e(l,J),e(l,ae),e(l,K),e(l,ne),e(l,O),e(l,ce),e(l,A),e(A,x),e(x,w),e(l,ge),e(l,F),e(F,D),e(D,ee),e(D,Q),e(Q,te),e(D,de),e(l,he),e(l,j),e(j,u),e(u,L),e(l,fe),e(l,q),e(q,V),e(l,qe),e(l,M),e(l,pe),e(l,N),e(l,ve),e(l,R)},p(d,f){f&1&&X(B,d[0]),f&1&&s(c,"color",m(d[0])),f&1&&p!==(p=Y(d[0],"english")+"")&&X(k,p),f&1&&s(h,"color",m(d[0])),f&1&&P!==(P=m(d[0]))&&t(w,"fill",P),f&1&&s(A,"left",S(d[0])+"%"),f&1&&X(ee,d[0]),f&1&&T!==(T=Y(d[0],"english")+"")&&X(te,T),f&1&&s(F,"left",S(d[0])+"%"),f&1&&U!==(U=m(d[0]))&&t(L,"fill",U),f&1&&s(j,"left",S(d[0])+"%")},d(d){d&&me(a)}}}function $e(o){let a,r=o[1]&&we(o);return{c(){r&&r.c(),a=je()},m(n,c){r&&r.m(n,c),xe(n,a,c)},p(n,[c]){n[1]?r?r.p(n,c):(r=we(n),r.c(),r.m(a.parentNode,a)):r&&(r.d(1),r=null)},i:ue,o:ue,d(n){n&&me(a),r&&r.d(n)}}}function De(o,a,r){let{service:n=window.GaReportService}=a,c,y,B="",$=0,h=0,C=!1;return ze(async()=>{c=await n.getReport(),B=c.sex,y=await n.getAgeData(B),$=Number(c.glycanage);let p=Number(c.chronologicalage),k=y.data.filter(v=>v.CA>=p-5&&v.CA<=p+5),G=k.filter(v=>v.GA<$).length,W=k.length;r(0,h=Math.round(G/W*100)),(h===100||h===0)&&r(0,h=h===100?99:1),r(1,C=!0)}),o.$$set=p=>{"service"in p&&r(2,n=p.service)},[h,C,n]}class be extends Be{constructor(a){super(),Ce(this,a,De,$e,Ae,{service:2},Se)}get service(){return this.$$.ctx[2]}set service(a){this.$$set({service:a}),ke()}}customElements.define("ga-biological-age-rank",ye(be,{service:{}},[],[],!0));export{be as default};
@@ -1 +1 @@
1
- import{c as K,S as Q,i as U,f as _,s as tt,e as $,b as O,n as t,p as q,g as D,q as C,u as G,k as I,o as et,A as it}from"./index2.js";import{g as st}from"./globals.js";import{f as M}from"./helpers.js";const{document:ot}=st;function rt(k){let e,f,g,s,A,o,n,i;return{c(){e=$("div"),f=$("div"),g=O(),s=$("div"),s.textContent="Age",A=O(),o=$("div"),o.textContent="Immune resilience index",n=O(),i=$("link"),t(f,"width","100%"),t(f,"height","100%"),t(s,"position","absolute"),t(s,"bottom","6px"),t(s,"left","50%"),t(s,"transform","translateX(-50%)"),t(s,"font-family","Sen, sans-serif"),t(s,"font-size","12px"),t(s,"color","#09341F"),t(s,"opacity","0.8"),t(o,"position","absolute"),t(o,"top","50%"),t(o,"right","83%"),t(o,"transform","translateY(-50%) rotate(-90deg)"),t(o,"font-family","Sen, sans-serif"),t(o,"font-size","12px"),t(o,"color","#09341F"),t(o,"opacity","0.8"),t(o,"white-space","nowrap"),t(e,"width","100%"),t(e,"height","100%"),t(e,"position","relative"),t(e,"border","1px solid #09341F33"),t(e,"border-radius","10px"),q(i,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),q(i,"rel","stylesheet")},m(w,c){D(w,e,c),C(e,f),k[2](f),C(e,g),C(e,s),C(e,A),C(e,o),D(w,n,c),C(ot.head,i)},p:G,i:G,o:G,d(w){w&&(I(e),I(n)),k[2](null),I(i)}}}function lt(k,e,f){let{service:g=window.GaReportService}=e,s,A,o=[],n=0,i={},w="",c=0,W=0,B=0,S,h=0;function Y(){S&&(i=echarts.init(S,null,{devicePixelRatio:4,renderer:"svg"}));const a=S.getBoundingClientRect();var d={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"transparent",grid:{top:"15px",left:"50px",right:"45px",bottom:"45px"},dataset:[{source:A.data.map(r=>[r.x,r.y])}],tooltip:{show:!1},xAxis:{min:15,max:95,interval:20,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(r){return r===0||r===100?"":r}},splitLine:{show:!0}},yAxis:{min:0,max:w==="M"?3:3.5,interval:.5,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!1,color:"#09341F",opacity:.8,formatter(r){return r===0||r===.6?"":r}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},symbolSize:4,itemStyle:{color:"#09341F",opacity:.15,borderWidth:1,lineWidth:12}},{name:"Resilience index",type:"scatter",data:[{x:c,y:n}],itemStyle:{color:M(h)}}],graphic:[]};i.setOption(d);const y=10,H=6,b=2,N=1.5,x=1.5,V=M(h);{const r=i.convertToPixel("xAxis",c),m=i.convertToPixel("yAxis",0),T=i.convertToPixel("yAxis",n),P=Math.abs(T-m),R=T<m?-1:1;let p=0;for(;p<P;){const v=Math.min(y,P-p),L=R===-1?m-p-v:m+p;d.graphic.push({type:"rect",zlevel:10,shape:{x:r-b/2-x,y:L-x,width:b+x*2,height:v+x*2,r:N+x},style:{fill:"#FFFFFF"},z:14}),d.graphic.push({type:"rect",zlevel:10,shape:{x:r-b/2,y:L,width:b,height:v,r:N},style:{fill:V},z:15}),p+=y+H}}{const r=i.convertToPixel("yAxis",n),m=i.convertToPixel("xAxis",15),T=i.convertToPixel("xAxis",c),P=Math.abs(T-m),R=T>m?1:-1;let p=0;for(;p<P;){const v=Math.min(y,P-p),L=R===1?m+p:m-p-v;d.graphic.push({type:"rect",zlevel:10,shape:{x:L-x,y:r-b/2-x,width:v+x*2,height:b+x*2,r:N+x},style:{fill:"#FFFFFF"},z:14}),d.graphic.push({type:"rect",zlevel:10,shape:{x:L,y:r-b/2,width:v,height:b,r:N},style:{fill:V},z:15}),p+=y+H}}d.graphic.push({name:"Measured result",type:"circle",zlevel:10,shape:{cx:i.convertToPixel("xAxis",c),cy:i.convertToPixel("yAxis",n),r:6},style:{fill:M(h),stroke:"#FFFFFF",lineWidth:2},z:15});const Z=i.convertToPixel("xAxis",c),j=i.convertToPixel("yAxis",n),l=document.createElementNS("http://www.w3.org/2000/svg","svg"),u=document.createElement("div");l.setAttribute("width","75"),l.setAttribute("height","36"),l.setAttribute("viewBox","-2 -2 75 36"),l.setAttribute("fill","none"),l.setAttribute("xmlns","http://www.w3.org/2000/svg");const z=document.createElementNS("http://www.w3.org/2000/svg","path");z.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),z.setAttribute("fill",M(h)),z.setAttribute("stroke","#FFFFFF"),z.setAttribute("stroke-width","4"),z.setAttribute("paint-order","stroke");const F=document.createElementNS("http://www.w3.org/2000/svg","path");F.setAttribute("d","M7 10L1.13333 14.4C0.0666666 15.2 0.0666666 16.8 1.13333 17.6L7 22"),F.setAttribute("fill","none"),F.setAttribute("stroke","#FFFFFF"),F.setAttribute("stroke-width","2.5"),F.setAttribute("stroke-linejoin","round"),F.setAttribute("stroke-linecap","round");const E=document.createElementNS("http://www.w3.org/2000/svg","path");E.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),E.setAttribute("fill",M(h)),l.appendChild(F),l.appendChild(z),l.appendChild(E),l.style.position="absolute",l.style.left=`${a.left+Z+8}px`,l.style.top=`${a.top+j-17}px`,l.style.zIndex="8",u.innerText=`${Number.parseFloat(n).toFixed(3)}`,u.style.position="absolute",u.style.left=`${a.left+Z+28}px`,u.style.top=`${a.top+j-8}px`,u.style.font="bold 16px sans-serif",u.style.color="white",u.style.zIndex="999",u.style.fontFamily="Sen",document.body.appendChild(u),document.body.appendChild(l),i.setOption(d)}et(async()=>{s=await g.getReport(),w=s.sex,A=await g.getResilienceData(w),B=Number(s.G0yourscore),W=Number(s.G2yourscore),c=Number(s.chronologicalage),n=Number((W/B).toFixed(3)),o=A.data.filter(y=>y.x>=c-5&&y.x<=c+5);let a=o.filter(y=>y.y<n).length,d=o.length;h=Math.round(a/d*100),(h===100||h===0)&&(h=h===100?99:1),Y()});function J(a){it[a?"unshift":"push"](()=>{S=a,f(0,S)})}return k.$$set=a=>{"service"in a&&f(1,g=a.service)},[S,g,J]}class X extends Q{constructor(e){super(),U(this,e,lt,rt,tt,{service:1})}get service(){return this.$$.ctx[1]}set service(e){this.$$set({service:e}),_()}}customElements.define("ga-immune-resilience-index-scatter",K(X,{service:{}},[],[],!1));export{X as default};
1
+ import{c as K,S as Q,i as U,f as _,s as tt,e as $,b as O,n as t,p as q,g as D,q as C,u as G,k as I,o as et,A as it}from"./index2.js";import{g as st}from"./globals.js";import{f as M}from"./helpers.js";const{document:ot}=st;function rt(k){let e,f,g,s,A,o,n,i;return{c(){e=$("div"),f=$("div"),g=O(),s=$("div"),s.textContent="Age",A=O(),o=$("div"),o.textContent="Immune resilience index",n=O(),i=$("link"),t(f,"width","100%"),t(f,"height","100%"),t(s,"position","absolute"),t(s,"bottom","6px"),t(s,"left","50%"),t(s,"transform","translateX(-50%)"),t(s,"font-family","Sen, sans-serif"),t(s,"font-size","12px"),t(s,"color","#09341F"),t(s,"opacity","0.8"),t(o,"position","absolute"),t(o,"top","50%"),t(o,"right","83%"),t(o,"transform","translateY(-50%) rotate(-90deg)"),t(o,"font-family","Sen, sans-serif"),t(o,"font-size","12px"),t(o,"color","#09341F"),t(o,"opacity","0.8"),t(o,"white-space","nowrap"),t(e,"width","100%"),t(e,"height","100%"),t(e,"position","relative"),t(e,"border","1px solid #09341F33"),t(e,"border-radius","10px"),q(i,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),q(i,"rel","stylesheet")},m(w,c){D(w,e,c),C(e,f),k[2](f),C(e,g),C(e,s),C(e,A),C(e,o),D(w,n,c),C(ot.head,i)},p:G,i:G,o:G,d(w){w&&(I(e),I(n)),k[2](null),I(i)}}}function lt(k,e,f){let{service:g=window.GaReportService}=e,s,A,o=[],n=0,i={},w="",c=0,W=0,B=0,S,h=0;function Y(){S&&(i=echarts.init(S,null,{devicePixelRatio:4,renderer:"svg"}));const a=S.getBoundingClientRect();var d={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"transparent",grid:{top:"15px",left:"50px",right:"45px",bottom:"45px"},dataset:[{source:A.data.map(r=>[r.CA,r.SS])}],tooltip:{show:!1},xAxis:{min:15,max:95,interval:20,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(r){return r===0||r===100?"":r}},splitLine:{show:!0}},yAxis:{min:0,max:w==="M"?3:3.5,interval:.5,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!1,color:"#09341F",opacity:.8,formatter(r){return r===0||r===.6?"":r}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},symbolSize:4,itemStyle:{color:"#09341F",opacity:.15,borderWidth:1,lineWidth:12}},{name:"Resilience index",type:"scatter",data:[{x:c,y:n}],itemStyle:{color:M(h)}}],graphic:[]};i.setOption(d);const u=10,H=6,b=2,N=1.5,x=1.5,V=M(h);{const r=i.convertToPixel("xAxis",c),m=i.convertToPixel("yAxis",0),T=i.convertToPixel("yAxis",n),P=Math.abs(T-m),R=T<m?-1:1;let p=0;for(;p<P;){const v=Math.min(u,P-p),L=R===-1?m-p-v:m+p;d.graphic.push({type:"rect",zlevel:10,shape:{x:r-b/2-x,y:L-x,width:b+x*2,height:v+x*2,r:N+x},style:{fill:"#FFFFFF"},z:14}),d.graphic.push({type:"rect",zlevel:10,shape:{x:r-b/2,y:L,width:b,height:v,r:N},style:{fill:V},z:15}),p+=u+H}}{const r=i.convertToPixel("yAxis",n),m=i.convertToPixel("xAxis",15),T=i.convertToPixel("xAxis",c),P=Math.abs(T-m),R=T>m?1:-1;let p=0;for(;p<P;){const v=Math.min(u,P-p),L=R===1?m+p:m-p-v;d.graphic.push({type:"rect",zlevel:10,shape:{x:L-x,y:r-b/2-x,width:v+x*2,height:b+x*2,r:N+x},style:{fill:"#FFFFFF"},z:14}),d.graphic.push({type:"rect",zlevel:10,shape:{x:L,y:r-b/2,width:v,height:b,r:N},style:{fill:V},z:15}),p+=u+H}}d.graphic.push({name:"Measured result",type:"circle",zlevel:10,shape:{cx:i.convertToPixel("xAxis",c),cy:i.convertToPixel("yAxis",n),r:6},style:{fill:M(h),stroke:"#FFFFFF",lineWidth:2},z:15});const Z=i.convertToPixel("xAxis",c),j=i.convertToPixel("yAxis",n),l=document.createElementNS("http://www.w3.org/2000/svg","svg"),y=document.createElement("div");l.setAttribute("width","75"),l.setAttribute("height","36"),l.setAttribute("viewBox","-2 -2 75 36"),l.setAttribute("fill","none"),l.setAttribute("xmlns","http://www.w3.org/2000/svg");const z=document.createElementNS("http://www.w3.org/2000/svg","path");z.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),z.setAttribute("fill",M(h)),z.setAttribute("stroke","#FFFFFF"),z.setAttribute("stroke-width","4"),z.setAttribute("paint-order","stroke");const F=document.createElementNS("http://www.w3.org/2000/svg","path");F.setAttribute("d","M7 10L1.13333 14.4C0.0666666 15.2 0.0666666 16.8 1.13333 17.6L7 22"),F.setAttribute("fill","none"),F.setAttribute("stroke","#FFFFFF"),F.setAttribute("stroke-width","2.5"),F.setAttribute("stroke-linejoin","round"),F.setAttribute("stroke-linecap","round");const E=document.createElementNS("http://www.w3.org/2000/svg","path");E.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),E.setAttribute("fill",M(h)),l.appendChild(F),l.appendChild(z),l.appendChild(E),l.style.position="absolute",l.style.left=`${a.left+Z+8}px`,l.style.top=`${a.top+j-17}px`,l.style.zIndex="8",y.innerText=`${Number.parseFloat(n).toFixed(3)}`,y.style.position="absolute",y.style.left=`${a.left+Z+28}px`,y.style.top=`${a.top+j-8}px`,y.style.font="bold 16px sans-serif",y.style.color="white",y.style.zIndex="999",y.style.fontFamily="Sen",document.body.appendChild(y),document.body.appendChild(l),i.setOption(d)}et(async()=>{s=await g.getReport(),w=s.sex,A=await g.getResilienceData(w),B=Number(s.G0yourscore),W=Number(s.G2yourscore),c=Number(s.chronologicalage),n=Number((W/B).toFixed(3)),o=A.data.filter(u=>u.CA>=c-5&&u.CA<=c+5);let a=o.filter(u=>u.SS<n).length,d=o.length;h=Math.round(a/d*100),(h===100||h===0)&&(h=h===100?99:1),Y()});function J(a){it[a?"unshift":"push"](()=>{S=a,f(0,S)})}return k.$$set=a=>{"service"in a&&f(1,g=a.service)},[S,g,J]}class X extends Q{constructor(e){super(),U(this,e,lt,rt,tt,{service:1})}get service(){return this.$$.ctx[1]}set service(e){this.$$set({service:e}),_()}}customElements.define("ga-immune-resilience-index-scatter",K(X,{service:{}},[],[],!1));export{X as default};
@@ -1,3 +1,3 @@
1
- import{c as je,S as be,i as we,f as ye,s as Be,a as Fe,d as ke,g as xe,u as pe,k as ue,o as Ce,e as o,m as w,b as d,v as U,n as i,p as t,q as e,r as V}from"./index2.js";import{s as W,f as j,j as N}from"./helpers.js";function Ae(r){Fe(r,"svelte-8jht07",".main.svelte-8jht07{height:100%;width:100%;display:flex;flex-direction:column}.label.svelte-8jht07{height:15%;width:100%;display:flex;justify-content:center}.graph.svelte-8jht07{height:85%;width:100%;display:flex;align-items:center;justify-content:center;border:1px solid #09341F33;border-radius:10px}.graph-container.svelte-8jht07{width:85%;height:100%;display:flex;align-items:center;justify-content:space-between;position:relative}.colorBox.svelte-8jht07{height:7px;width:14.3%;border-radius:24px}.colorBoxShort.svelte-8jht07{height:7px;width:5%;border-radius:24px}.slider.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%;max-height:70px}.slider-number.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -120%);width:24%;font-size:0.71rem;color:white}.text-left.svelte-8jht07{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:62%;left:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-middle.svelte-8jht07{position:absolute;height:15%;top:62%;left:35%;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-right.svelte-8jht07{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:62%;right:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.slider-triangle.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%}")}function me(r){let n,l,c,a,y,B,$,x,F,g=W(r[0],"english")+"",k,u,D,C,s,p,ee,q,te,E,se,I,le,O,ie,Z,oe,H,re,J,ne,A,m,b,K,ae,S,G,X,P,Q=W(r[0],"english")+"",Y,ce,he,z,f,L,T,de,R,ve,M,ge,_;return{c(){n=o("div"),l=o("div"),c=w(`Immune resilience index ranks in the\xA0
2
- `),a=o("span"),y=o("b"),B=w(r[0]),$=d(),x=o("sup"),F=o("b"),k=w(g),u=w(`
3
- \xA0percentile:`),D=d(),C=o("div"),s=o("div"),p=o("div"),ee=d(),q=o("div"),te=d(),E=o("div"),se=d(),I=o("div"),le=d(),O=o("div"),ie=d(),Z=o("div"),oe=d(),H=o("div"),re=d(),J=o("div"),ne=d(),A=o("div"),m=U("svg"),b=U("rect"),ae=d(),S=o("div"),G=o("b"),X=w(r[0]),P=o("sup"),Y=w(Q),ce=w(" percentile"),he=d(),z=o("div"),f=U("svg"),L=U("path"),de=d(),R=o("div"),R.textContent="Suboptimal",ve=d(),M=o("div"),M.textContent="Average",ge=d(),_=o("div"),_.textContent="Optimal",i(a,"color",j(r[0])),i(a,"height","80%"),i(a,"display","flex"),i(x,"color",j(r[0])),i(x,"font-size","0.65rem"),t(l,"class","label svelte-8jht07"),t(p,"class","colorBoxShort svelte-8jht07"),i(p,"background-color","#DF2120"),t(q,"class","colorBox svelte-8jht07"),i(q,"background-color","#DF2120"),t(E,"class","colorBox svelte-8jht07"),i(E,"background-color","#F2800D"),t(I,"class","colorBox svelte-8jht07"),i(I,"background-color","#66CCAA"),t(O,"class","colorBox svelte-8jht07"),i(O,"background-color","#66CCAA"),t(Z,"class","colorBox svelte-8jht07"),i(Z,"background-color","#13A195"),t(H,"class","colorBox svelte-8jht07"),i(H,"background-color","#015566"),t(J,"class","colorBoxShort svelte-8jht07"),i(J,"background-color","#015566"),t(b,"width","100"),t(b,"height","24"),t(b,"rx","4"),t(b,"fill",K=j(r[0])),t(m,"width","100"),t(m,"height","24"),t(m,"viewBox","0 0 100 24"),t(m,"fill","none"),t(m,"xmlns","http://www.w3.org/2000/svg"),t(A,"class","slider svelte-8jht07"),i(A,"left",N(r[0])+"%"),i(P,"font-size","0.5rem"),t(S,"class","slider-number svelte-8jht07"),i(S,"left",N(r[0])+"%"),t(L,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),t(L,"fill",T=j(r[0])),t(f,"width","12"),t(f,"height","8"),t(f,"viewBox","0 0 12 8"),t(f,"fill","none"),t(f,"xmlns","http://www.w3.org/2000/svg"),t(z,"class","slider-triangle svelte-8jht07"),i(z,"left",N(r[0])+"%"),t(R,"class","text-left svelte-8jht07"),i(R,"width","34.7%"),t(M,"class","text-middle svelte-8jht07"),i(M,"width","29.5%"),t(_,"class","text-right svelte-8jht07"),i(_,"width","34.7%"),t(s,"class","graph-container svelte-8jht07"),t(C,"class","graph svelte-8jht07"),t(n,"class","main svelte-8jht07")},m(h,v){xe(h,n,v),e(n,l),e(l,c),e(l,a),e(a,y),e(y,B),e(l,$),e(l,x),e(x,F),e(F,k),e(l,u),e(n,D),e(n,C),e(C,s),e(s,p),e(s,ee),e(s,q),e(s,te),e(s,E),e(s,se),e(s,I),e(s,le),e(s,O),e(s,ie),e(s,Z),e(s,oe),e(s,H),e(s,re),e(s,J),e(s,ne),e(s,A),e(A,m),e(m,b),e(s,ae),e(s,S),e(S,G),e(G,X),e(G,P),e(P,Y),e(G,ce),e(s,he),e(s,z),e(z,f),e(f,L),e(s,de),e(s,R),e(s,ve),e(s,M),e(s,ge),e(s,_)},p(h,v){v&1&&V(B,h[0]),v&1&&i(a,"color",j(h[0])),v&1&&g!==(g=W(h[0],"english")+"")&&V(k,g),v&1&&i(x,"color",j(h[0])),v&1&&K!==(K=j(h[0]))&&t(b,"fill",K),v&1&&i(A,"left",N(h[0])+"%"),v&1&&V(X,h[0]),v&1&&Q!==(Q=W(h[0],"english")+"")&&V(Y,Q),v&1&&i(S,"left",N(h[0])+"%"),v&1&&T!==(T=j(h[0]))&&t(L,"fill",T),v&1&&i(z,"left",N(h[0])+"%")},d(h){h&&ue(n)}}}function Se(r){let n,l=r[1]&&me(r);return{c(){l&&l.c(),n=ke()},m(c,a){l&&l.m(c,a),xe(c,n,a)},p(c,[a]){c[1]?l?l.p(c,a):(l=me(c),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i:pe,o:pe,d(c){c&&ue(n),l&&l.d(c)}}}function ze(r,n,l){let{service:c=window.GaReportService}=n,a,y,B="",$=0,x=0,F=0,g=0,k=!1;return Ce(async()=>{a=await c.getReport(),B=a.sex,y=await c.getResilienceData(B),x=Number(a.G0yourscore),$=Number(a.G2yourscore),F=Number($/x);let u=Number(a.chronologicalage),D=y.data.filter(p=>p.x>=u-5&&p.x<=u+5),C=D.filter(p=>p.y<F).length,s=D.length;l(0,g=Math.round(C/s*100)),(g===100||g===0)&&l(0,g=g===100?99:1),l(1,k=!0)}),r.$$set=u=>{"service"in u&&l(2,c=u.service)},[g,k,c]}class fe extends be{constructor(n){super(),we(this,n,ze,Se,Be,{service:2},Ae)}get service(){return this.$$.ctx[2]}set service(n){this.$$set({service:n}),ye()}}customElements.define("ga-immune-resilience-index",je(fe,{service:{}},[],[],!0));export{fe as default};
1
+ import{c as je,S as be,i as we,f as ye,s as Be,a as ke,d as Ce,g as pe,u as xe,k as ue,o as Fe,e as o,m as w,b as d,v as U,n as i,p as t,q as e,r as V}from"./index2.js";import{s as W,f as j,j as N}from"./helpers.js";function Ae(r){ke(r,"svelte-8jht07",".main.svelte-8jht07{height:100%;width:100%;display:flex;flex-direction:column}.label.svelte-8jht07{height:15%;width:100%;display:flex;justify-content:center}.graph.svelte-8jht07{height:85%;width:100%;display:flex;align-items:center;justify-content:center;border:1px solid #09341F33;border-radius:10px}.graph-container.svelte-8jht07{width:85%;height:100%;display:flex;align-items:center;justify-content:space-between;position:relative}.colorBox.svelte-8jht07{height:7px;width:14.3%;border-radius:24px}.colorBoxShort.svelte-8jht07{height:7px;width:5%;border-radius:24px}.slider.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%;max-height:70px}.slider-number.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -120%);width:24%;font-size:0.71rem;color:white}.text-left.svelte-8jht07{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:62%;left:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-middle.svelte-8jht07{position:absolute;height:15%;top:62%;left:35%;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-right.svelte-8jht07{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:62%;right:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.slider-triangle.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%}")}function me(r){let n,l,c,a,y,B,$,p,k,g=W(r[0],"english")+"",C,u,D,F,s,x,ee,q,te,E,se,I,le,O,ie,Z,oe,H,re,J,ne,A,m,b,K,ae,S,G,X,P,Q=W(r[0],"english")+"",Y,ce,he,z,f,L,T,de,R,ve,M,ge,_;return{c(){n=o("div"),l=o("div"),c=w(`Immune resilience index ranks in the\xA0
2
+ `),a=o("span"),y=o("b"),B=w(r[0]),$=d(),p=o("sup"),k=o("b"),C=w(g),u=w(`
3
+ \xA0percentile:`),D=d(),F=o("div"),s=o("div"),x=o("div"),ee=d(),q=o("div"),te=d(),E=o("div"),se=d(),I=o("div"),le=d(),O=o("div"),ie=d(),Z=o("div"),oe=d(),H=o("div"),re=d(),J=o("div"),ne=d(),A=o("div"),m=U("svg"),b=U("rect"),ae=d(),S=o("div"),G=o("b"),X=w(r[0]),P=o("sup"),Y=w(Q),ce=w(" percentile"),he=d(),z=o("div"),f=U("svg"),L=U("path"),de=d(),R=o("div"),R.textContent="Suboptimal",ve=d(),M=o("div"),M.textContent="Average",ge=d(),_=o("div"),_.textContent="Optimal",i(a,"color",j(r[0])),i(a,"height","80%"),i(a,"display","flex"),i(p,"color",j(r[0])),i(p,"font-size","0.65rem"),t(l,"class","label svelte-8jht07"),t(x,"class","colorBoxShort svelte-8jht07"),i(x,"background-color","#DF2120"),t(q,"class","colorBox svelte-8jht07"),i(q,"background-color","#DF2120"),t(E,"class","colorBox svelte-8jht07"),i(E,"background-color","#F2800D"),t(I,"class","colorBox svelte-8jht07"),i(I,"background-color","#66CCAA"),t(O,"class","colorBox svelte-8jht07"),i(O,"background-color","#66CCAA"),t(Z,"class","colorBox svelte-8jht07"),i(Z,"background-color","#13A195"),t(H,"class","colorBox svelte-8jht07"),i(H,"background-color","#015566"),t(J,"class","colorBoxShort svelte-8jht07"),i(J,"background-color","#015566"),t(b,"width","100"),t(b,"height","24"),t(b,"rx","4"),t(b,"fill",K=j(r[0])),t(m,"width","100"),t(m,"height","24"),t(m,"viewBox","0 0 100 24"),t(m,"fill","none"),t(m,"xmlns","http://www.w3.org/2000/svg"),t(A,"class","slider svelte-8jht07"),i(A,"left",N(r[0])+"%"),i(P,"font-size","0.5rem"),t(S,"class","slider-number svelte-8jht07"),i(S,"left",N(r[0])+"%"),t(L,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),t(L,"fill",T=j(r[0])),t(f,"width","12"),t(f,"height","8"),t(f,"viewBox","0 0 12 8"),t(f,"fill","none"),t(f,"xmlns","http://www.w3.org/2000/svg"),t(z,"class","slider-triangle svelte-8jht07"),i(z,"left",N(r[0])+"%"),t(R,"class","text-left svelte-8jht07"),i(R,"width","34.7%"),t(M,"class","text-middle svelte-8jht07"),i(M,"width","29.5%"),t(_,"class","text-right svelte-8jht07"),i(_,"width","34.7%"),t(s,"class","graph-container svelte-8jht07"),t(F,"class","graph svelte-8jht07"),t(n,"class","main svelte-8jht07")},m(h,v){pe(h,n,v),e(n,l),e(l,c),e(l,a),e(a,y),e(y,B),e(l,$),e(l,p),e(p,k),e(k,C),e(l,u),e(n,D),e(n,F),e(F,s),e(s,x),e(s,ee),e(s,q),e(s,te),e(s,E),e(s,se),e(s,I),e(s,le),e(s,O),e(s,ie),e(s,Z),e(s,oe),e(s,H),e(s,re),e(s,J),e(s,ne),e(s,A),e(A,m),e(m,b),e(s,ae),e(s,S),e(S,G),e(G,X),e(G,P),e(P,Y),e(G,ce),e(s,he),e(s,z),e(z,f),e(f,L),e(s,de),e(s,R),e(s,ve),e(s,M),e(s,ge),e(s,_)},p(h,v){v&1&&V(B,h[0]),v&1&&i(a,"color",j(h[0])),v&1&&g!==(g=W(h[0],"english")+"")&&V(C,g),v&1&&i(p,"color",j(h[0])),v&1&&K!==(K=j(h[0]))&&t(b,"fill",K),v&1&&i(A,"left",N(h[0])+"%"),v&1&&V(X,h[0]),v&1&&Q!==(Q=W(h[0],"english")+"")&&V(Y,Q),v&1&&i(S,"left",N(h[0])+"%"),v&1&&T!==(T=j(h[0]))&&t(L,"fill",T),v&1&&i(z,"left",N(h[0])+"%")},d(h){h&&ue(n)}}}function Se(r){let n,l=r[1]&&me(r);return{c(){l&&l.c(),n=Ce()},m(c,a){l&&l.m(c,a),pe(c,n,a)},p(c,[a]){c[1]?l?l.p(c,a):(l=me(c),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i:xe,o:xe,d(c){c&&ue(n),l&&l.d(c)}}}function ze(r,n,l){let{service:c=window.GaReportService}=n,a,y,B="",$=0,p=0,k=0,g=0,C=!1;return Fe(async()=>{a=await c.getReport(),B=a.sex,y=await c.getResilienceData(B),p=Number(a.G0yourscore),$=Number(a.G2yourscore),k=Number($/p);let u=Number(a.chronologicalage),D=y.data.filter(x=>x.CA>=u-5&&x.CA<=u+5),F=D.filter(x=>x.SS<k).length,s=D.length;l(0,g=Math.round(F/s*100)),(g===100||g===0)&&l(0,g=g===100?99:1),l(1,C=!0)}),r.$$set=u=>{"service"in u&&l(2,c=u.service)},[g,C,c]}class fe extends be{constructor(n){super(),we(this,n,ze,Se,Be,{service:2},Ae)}get service(){return this.$$.ctx[2]}set service(n){this.$$set({service:n}),ye()}}customElements.define("ga-immune-resilience-index",je(fe,{service:{}},[],[],!0));export{fe as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@glycanage/web-components",
3
3
  "description": "A collection of web-components",
4
- "version": "1.220.0",
4
+ "version": "1.222.0",
5
5
  "type": "module",
6
6
  "main": "dist/lib/@glycanage/web-components.js",
7
7
  "scripts": {