@glycanage/web-components 1.207.0 → 1.209.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.
- package/dist/action-steps-three.wc.js +1 -1
- package/dist/biological-age-rank.wc.js +3 -0
- package/dist/immune-resilience-index.wc.js +1 -0
- package/dist/index.js +1 -1
- package/dist/index3.js +87 -0
- package/dist/scatter-plot-custom-clinical.wc.js +1 -1
- package/dist/scatter-plot-custom.wc.js +1 -1
- package/dist/scatter-plot.wc.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r_,S as
|
|
1
|
+
import{c as r_,S as n_,i as s_,f as J,s as a_,a as l_,d as A_,g as I_,u as T_,k as P_,o as o_,e as o,m as u,b as p,p as H,n as t,q as T,r as h}from"./index2.js";import{a as R}from"./helpers.js";function Y_(A){l_(A,"svelte-ky3o6q",".main.svelte-ky3o6q{height:100%;width:100%;display:flex;flex-direction:column;gap:40px}.number.svelte-ky3o6q{display:flex;align-items:center;justify-content:center;font-size:10px;color:white;min-height:1.7rem;margin-right:1rem;border-radius:48px;position:absolute;top:-5%;font-weight:bold;left:3%}.items-baseline.svelte-ky3o6q{align-items:baseline}.further.svelte-ky3o6q{font-weight:700;font-size:10px;line-height:160%;letter-spacing:0.005em;color:rgba(9, 52, 31, 0.8)}")}function t_(A){let a,_,l,e=R(A[0],"PRIMARY_FOCUS")+"",C,F,s,E,I,S,P,i,r,n,c,g,d,v=R(A[0],"FURTHER_TESTING")+"",D,K,Q,f,w,W,U,m,V=R(A[0],"SECONDARY_FOCUS")+"",N,X,b,L,$,q,Z,k,z,__,G,e_,O,x=R(A[0],"FURTHER_TESTING")+"",j,R_,E_,y,B;return{c(){a=o("div"),_=o("div"),l=o("div"),C=u(e),F=p(),s=o("div"),E=o("div"),I=o("b"),S=u(A[2]),P=p(),i=o("div"),r=u(A[3]),n=p(),c=o("div"),g=p(),d=o("div"),D=u(v),K=u(":"),Q=p(),f=o("div"),w=u(A[4]),W=p(),U=o("div"),m=o("div"),N=u(V),X=p(),b=o("div"),L=o("div"),$=o("b"),q=u(A[5]),Z=p(),k=o("div"),z=u(A[6]),__=p(),G=o("div"),e_=p(),O=o("div"),j=u(x),R_=u(":"),E_=p(),y=o("div"),B=u(A[7]),H(l,"class","number svelte-ky3o6q"),t(l,"width","auto"),t(l,"padding-left","0.6rem"),t(l,"padding-right","0.6rem"),t(l,"background",A[1]==="whitelabel"?"#14181F":"#36624C"),t(E,"margin-bottom","0.3rem"),t(E,"font-size","12px"),t(i,"font-size","68%"),t(c,"height","24px"),H(d,"class","further svelte-ky3o6q"),t(f,"font-size","68%"),t(s,"padding","1.5rem 2rem 1.1rem 2rem"),H(_,"class","items-baseline svelte-ky3o6q"),t(_,"display","flex"),t(_,"height","auto"),t(_,"position","relative"),t(_,"border-radius","12px"),t(_,"background-color",A[1]==="whitelabel"?"#D1D4E0":"#E4EDE9"),H(m,"class","number svelte-ky3o6q"),t(m,"width","auto"),t(m,"padding-left","0.6rem"),t(m,"padding-right","0.6rem"),t(m,"background",A[1]==="whitelabel"?"#14181F":"#86AF9A"),t(L,"margin-bottom","0.3rem"),t(L,"font-size","12px"),t(k,"font-size","68%"),t(G,"height","24px"),H(O,"class","further svelte-ky3o6q"),t(y,"font-size","68%"),t(b,"padding","1.5rem 2rem 1.1rem 2rem"),H(U,"class","items-baseline svelte-ky3o6q"),t(U,"display","flex"),t(U,"height","auto"),t(U,"position","relative"),t(U,"border-radius","12px"),t(U,"background-color",A[1]==="whitelabel"?"#F0F1F5":"#F2F6F4"),H(a,"class","main svelte-ky3o6q")},m(Y,M){I_(Y,a,M),T(a,_),T(_,l),T(l,C),T(_,F),T(_,s),T(s,E),T(E,I),T(I,S),T(s,P),T(s,i),T(i,r),T(s,n),T(s,c),T(s,g),T(s,d),T(d,D),T(d,K),T(s,Q),T(s,f),T(f,w),T(a,W),T(a,U),T(U,m),T(m,N),T(U,X),T(U,b),T(b,L),T(L,$),T($,q),T(b,Z),T(b,k),T(k,z),T(b,__),T(b,G),T(b,e_),T(b,O),T(O,j),T(O,R_),T(b,E_),T(b,y),T(y,B)},p(Y,M){M[0]&1&&e!==(e=R(Y[0],"PRIMARY_FOCUS")+"")&&h(C,e),M[0]&2&&t(l,"background",Y[1]==="whitelabel"?"#14181F":"#36624C"),M[0]&4&&h(S,Y[2]),M[0]&8&&h(r,Y[3]),M[0]&1&&v!==(v=R(Y[0],"FURTHER_TESTING")+"")&&h(D,v),M[0]&16&&h(w,Y[4]),M[0]&2&&t(_,"background-color",Y[1]==="whitelabel"?"#D1D4E0":"#E4EDE9"),M[0]&1&&V!==(V=R(Y[0],"SECONDARY_FOCUS")+"")&&h(N,V),M[0]&2&&t(m,"background",Y[1]==="whitelabel"?"#14181F":"#86AF9A"),M[0]&32&&h(q,Y[5]),M[0]&64&&h(z,Y[6]),M[0]&1&&x!==(x=R(Y[0],"FURTHER_TESTING")+"")&&h(j,x),M[0]&128&&h(B,Y[7]),M[0]&2&&t(U,"background-color",Y[1]==="whitelabel"?"#F0F1F5":"#F2F6F4")},d(Y){Y&&P_(a)}}}function S_(A){let a,_=A[8]&&t_(A);return{c(){_&&_.c(),a=A_()},m(l,e){_&&_.m(l,e),I_(l,a,e)},p(l,e){l[8]?_?_.p(l,e):(_=t_(l),_.c(),_.m(a.parentNode,a)):_&&(_.d(1),_=null)},i:T_,o:T_,d(l){l&&P_(a),_&&_.d(l)}}}function d_(A,a,_){let{service:l=window.GaReportService}=a,{lang:e}=a,{branding:C="glycanage"}=a,F,s=0,E=0,I=0,S=0,P=0,i="",r="",n="",c="",g="",d="",v=!1;return o_(async()=>{F=await l.getReport(),s=Number(F.Bpercentile),E=Number(F.Spercentile),I=Number(F.G0percentile),S=Number(F.G1percentile),P=Number(F.G2percentile),Number(F.P18percentile),Number(F.P22percentile),Number(F.P23percentile),Number(F.P26percentile),E>=67&&P>=67&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_1")),_(3,r=R(e,"PRIMARY_DESC_1")),_(4,n=R(e,"PRIMARY_FURTHER_1"))),E>=67&&P>=67&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_2")),_(3,r=R(e,"PRIMARY_DESC_2")),_(4,n=R(e,"PRIMARY_FURTHER_2"))),E>=67&&P>33&&P<67&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_3")),_(3,r=R(e,"PRIMARY_DESC_3")),_(4,n=R(e,"PRIMARY_FURTHER_3"))),E>33&&E<67&&P>=67&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_4")),_(3,r=R(e,"PRIMARY_DESC_4")),_(4,n=R(e,"PRIMARY_FURTHER_4"))),E>=67&&P>33&&P<67&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_5")),_(3,r=R(e,"PRIMARY_DESC_5")),_(4,n=R(e,"PRIMARY_FURTHER_5"))),E>33&&E<67&&P>=67&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_6")),_(3,r=R(e,"PRIMARY_DESC_6")),_(4,n=R(e,"PRIMARY_FURTHER_6"))),E>33&&E<67&&P>33&&P<67&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_7")),_(3,r=R(e,"PRIMARY_DESC_7")),_(4,n=R(e,"PRIMARY_FURTHER_7"))),E>33&&E<67&&P>33&&P<67&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_8")),_(3,r=R(e,"PRIMARY_DESC_8")),_(4,n=R(e,"PRIMARY_FURTHER_8"))),E>=67&&P>=67&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_9")),_(3,r=R(e,"PRIMARY_DESC_9")),_(4,n=R(e,"PRIMARY_FURTHER_9"))),E>=67&&P<=33&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_10")),_(3,r=R(e,"PRIMARY_DESC_10")),_(4,n=R(e,"PRIMARY_FURTHER_10"))),E<=33&&P>=67&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_11")),_(3,r=R(e,"PRIMARY_DESC_11")),_(4,n=R(e,"PRIMARY_FURTHER_11"))),E>=67&&P>33&&P<67&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_12")),_(3,r=R(e,"PRIMARY_DESC_12")),_(4,n=R(e,"PRIMARY_FURTHER_12"))),E>33&&E<67&&P>=67&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_13")),_(3,r=R(e,"PRIMARY_DESC_13")),_(4,n=R(e,"PRIMARY_FURTHER_13"))),E>=67&&P<=33&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_14")),_(3,r=R(e,"PRIMARY_DESC_14")),_(4,n=R(e,"PRIMARY_FURTHER_14"))),E>33&&E<67&&P<=33&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_15")),_(3,r=R(e,"PRIMARY_DESC_15")),_(4,n=R(e,"PRIMARY_FURTHER_15"))),E<=33&&P>=67&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_16")),_(3,r=R(e,"PRIMARY_DESC_16")),_(4,n=R(e,"PRIMARY_FURTHER_16"))),E<=33&&P>33&&P<67&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_17")),_(3,r=R(e,"PRIMARY_DESC_17")),_(4,n=R(e,"PRIMARY_FURTHER_17"))),E>33&&E<67&&P>33&&P<67&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_18")),_(3,r=R(e,"PRIMARY_DESC_18")),_(4,n=R(e,"PRIMARY_FURTHER_18"))),E>33&&E<67&&P<=33&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_19")),_(3,r=R(e,"PRIMARY_DESC_19")),_(4,n=R(e,"PRIMARY_FURTHER_19"))),E<=33&&P>33&&P<67&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_20")),_(3,r=R(e,"PRIMARY_DESC_20")),_(4,n=R(e,"PRIMARY_FURTHER_20"))),E>=67&&P<=33&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_21")),_(3,r=R(e,"PRIMARY_DESC_21")),_(4,n=R(e,"PRIMARY_FURTHER_21"))),E<=33&&P>=67&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_22")),_(3,r=R(e,"PRIMARY_DESC_22")),_(4,n=R(e,"PRIMARY_FURTHER_22"))),E<=33&&P<=33&&I<=33&&(_(2,i=R(e,"PRIMARY_TITLE_23")),_(3,r=R(e,"PRIMARY_DESC_23")),_(4,n=R(e,"PRIMARY_FURTHER_23"))),E>33&&E<67&&P<=33&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_24")),_(3,r=R(e,"PRIMARY_DESC_24")),_(4,n=R(e,"PRIMARY_FURTHER_24"))),E<=33&&P>33&&P<67&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_25")),_(3,r=R(e,"PRIMARY_DESC_25")),_(4,n=R(e,"PRIMARY_FURTHER_25"))),E<=33&&P<=33&&I>33&&I<67&&(_(2,i=R(e,"PRIMARY_TITLE_26")),_(3,r=R(e,"PRIMARY_DESC_26")),_(4,n=R(e,"PRIMARY_FURTHER_26"))),E<=33&&P<=33&&I>=67&&(_(2,i=R(e,"PRIMARY_TITLE_27")),_(3,r=R(e,"PRIMARY_DESC_27")),_(4,n=R(e,"PRIMARY_FURTHER_27"))),S<=33&&s>=67&&(_(5,c=R(e,"SUPPORTIVE_TITLE_1")),_(6,g=R(e,"SUPPORTIVE_DESC_1")),_(7,d=R(e,"SUPPORTIVE_FURTHER_1"))),S<=33&&s>33&&s<67&&(_(5,c=R(e,"SUPPORTIVE_TITLE_2")),_(6,g=R(e,"SUPPORTIVE_DESC_2")),_(7,d=R(e,"SUPPORTIVE_FURTHER_2"))),S<=33&&s<=33&&(_(5,c=R(e,"SUPPORTIVE_TITLE_3")),_(6,g=R(e,"SUPPORTIVE_DESC_3")),_(7,d=R(e,"SUPPORTIVE_FURTHER_3"))),S>33&&S<67&&s>=67&&(_(5,c=R(e,"SUPPORTIVE_TITLE_4")),_(6,g=R(e,"SUPPORTIVE_DESC_4")),_(7,d=R(e,"SUPPORTIVE_FURTHER_4"))),S>33&&S<67&&s>33&&s<67&&(_(5,c=R(e,"SUPPORTIVE_TITLE_5")),_(6,g=R(e,"SUPPORTIVE_DESC_5")),_(7,d=R(e,"SUPPORTIVE_FURTHER_5"))),S>33&&S<67&&s<=33&&(_(5,c=R(e,"SUPPORTIVE_TITLE_6")),_(6,g=R(e,"SUPPORTIVE_DESC_6")),_(7,d=R(e,"SUPPORTIVE_FURTHER_6"))),S>=67&&s>=67&&(_(5,c=R(e,"SUPPORTIVE_TITLE_7")),_(6,g=R(e,"SUPPORTIVE_DESC_7")),_(7,d=R(e,"SUPPORTIVE_FURTHER_7"))),S>=67&&s>33&&s<67&&(_(5,c=R(e,"SUPPORTIVE_TITLE_8")),_(6,g=R(e,"SUPPORTIVE_DESC_8")),_(7,d=R(e,"SUPPORTIVE_FURTHER_8"))),S>=67&&s<=33&&(_(5,c=R(e,"SUPPORTIVE_TITLE_9")),_(6,g=R(e,"SUPPORTIVE_DESC_9")),_(7,d=R(e,"SUPPORTIVE_FURTHER_9"))),_(8,v=!0)}),A.$$set=D=>{"service"in D&&_(9,l=D.service),"lang"in D&&_(0,e=D.lang),"branding"in D&&_(1,C=D.branding)},[e,C,i,r,n,c,g,d,v,l]}class i_ extends n_{constructor(a){super(),s_(this,a,d_,S_,a_,{service:9,lang:0,branding:1},Y_,[-1,-1])}get service(){return this.$$.ctx[9]}set service(a){this.$$set({service:a}),J()}get lang(){return this.$$.ctx[0]}set lang(a){this.$$set({lang:a}),J()}get branding(){return this.$$.ctx[1]}set branding(a){this.$$set({branding:a}),J()}}customElements.define("ga-action-steps-three",r_(i_,{service:{},lang:{},branding:{}},[],[],!0));export{i_ as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c as W,S as F,i as G,f as J,s as K,a as O,e as o,m as f,b as $,p as t,n as u,g as P,q as e,r as D,u as I,k as Q}from"./index2.js";import{s as R,j as U}from"./helpers.js";function V(l){O(l,"svelte-l960iu",".biological-age-rank.svelte-l960iu{font-family:inherit}.title.svelte-l960iu{margin:0 0 0.5rem 0;font-size:0.8rem;color:#575756;text-align:center;width:100%}.title-percentile.svelte-l960iu{font-weight:600;margin:0 0.15rem}.graph-card.svelte-l960iu{font-family:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;width:560px;height:133px;padding:52px 1.25rem 1rem;background:#f5f5f5;border-radius:8px;border:1px solid #e0e0e0;box-sizing:border-box}.bubble.svelte-l960iu{position:absolute;bottom:18px;display:inline-block;transform:translateX(-50%)}.bubble-text.svelte-l960iu{display:block;padding:0.35rem 0.75rem;background:#008f8c;color:#fff;font-weight:bold;font-size:0.875rem;border-radius:6px;white-space:nowrap;box-shadow:0 1px 3px rgba(0, 0, 0, 0.15)}.bubble-arrow.svelte-l960iu{position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #008f8c}.bar-wrap.svelte-l960iu{position:relative;width:-moz-fit-content;width:fit-content;max-width:100%;margin-bottom:8px}.slider-bar.svelte-l960iu{display:flex;gap:2px;width:-moz-fit-content;width:fit-content}.colorBox.svelte-l960iu,.colorBoxShort.svelte-l960iu{height:7px;flex-shrink:0;border-radius:24px}.colorBoxShort.svelte-l960iu{width:16px}.colorBox.svelte-l960iu{width:64px}.seg-1.svelte-l960iu{background-color:#005566}.seg-2.svelte-l960iu{background-color:#005566}.seg-3.svelte-l960iu{background-color:#119999}.seg-4.svelte-l960iu,.seg-5.svelte-l960iu{background-color:#66CCAA}.seg-6.svelte-l960iu{background-color:#EE6600}.seg-7.svelte-l960iu{background-color:#DD2222}.seg-8.svelte-l960iu{background-color:#DD2222}.median-triangle.svelte-l960iu{position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:8px solid #5dade2;pointer-events:none;z-index:0}.marker-triangle.svelte-l960iu{position:absolute;bottom:-2px;transform:translateX(-50%);width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;pointer-events:none;z-index:1}.labels.svelte-l960iu{display:flex;gap:2px;width:-moz-fit-content;width:fit-content;font-size:0.7rem;color:#9e9e9e;align-items:center}.label.svelte-l960iu{text-align:center;flex-shrink:0;box-sizing:border-box;border-left:1px solid #d0d0d0;padding:0 4px}.label-worse.svelte-l960iu{border-right:1px solid #d0d0d0}.label-better.svelte-l960iu{width:148px}.label-average.svelte-l960iu{width:130px}.label-worse.svelte-l960iu{width:148px}")}function Y(l){let i,s,h,n,c=Math.round(l[1])+"",x,m,b,B,p,d,v,w,y=Math.round(l[1])+"",X,A,j,C,E,H,z,L,k,T,g,q,M,S;return{c(){i=o("div"),s=o("p"),h=f(`Biological age ranks in the
|
|
2
|
+
`),n=o("span"),x=f(c),m=f(l[3]),b=f(`
|
|
3
|
+
percentile:`),B=$(),p=o("div"),d=o("div"),v=o("div"),w=o("span"),X=f(y),A=f(l[3]),j=f(" percentile"),C=$(),E=o("div"),H=$(),z=o("div"),z.innerHTML='<div class="colorBoxShort seg-1 svelte-l960iu"></div> <div class="colorBox seg-2 svelte-l960iu"></div> <div class="colorBox seg-3 svelte-l960iu"></div> <div class="colorBox seg-4 svelte-l960iu"></div> <div class="colorBox seg-5 svelte-l960iu"></div> <div class="colorBox seg-6 svelte-l960iu"></div> <div class="colorBox seg-7 svelte-l960iu"></div> <div class="colorBoxShort seg-8 svelte-l960iu"></div>',L=$(),k=o("div"),T=$(),g=o("div"),q=$(),M=o("div"),M.innerHTML='<span class="label label-better svelte-l960iu">Better than peers</span> <span class="label label-average svelte-l960iu">Average/Median</span> <span class="label label-worse svelte-l960iu">Worse than peers</span>',t(n,"class","title-percentile svelte-l960iu"),u(n,"color",l[2]),t(s,"class","title svelte-l960iu"),t(w,"class","bubble-text svelte-l960iu"),t(E,"class","bubble-arrow svelte-l960iu"),t(v,"class","bubble svelte-l960iu"),u(v,"left",l[0]+"%"),t(z,"class","slider-bar svelte-l960iu"),t(k,"class","median-triangle svelte-l960iu"),u(k,"left","50%"),t(k,"aria-hidden","true"),t(k,"title","50th percentile (median)"),t(g,"class","marker-triangle svelte-l960iu"),u(g,"left",l[0]+"%"),u(g,"border-bottom-color",l[2]),t(g,"aria-hidden","true"),t(d,"class","bar-wrap svelte-l960iu"),t(M,"class","labels svelte-l960iu"),t(p,"class","graph-card svelte-l960iu"),t(p,"role","img"),t(p,"aria-label",S="Biological age rank in the "+Math.round(l[1])+l[3]+" percentile, from better than peers to worse than peers"),t(i,"class","biological-age-rank svelte-l960iu")},m(r,a){P(r,i,a),e(i,s),e(s,h),e(s,n),e(n,x),e(n,m),e(s,b),e(i,B),e(i,p),e(p,d),e(d,v),e(v,w),e(w,X),e(w,A),e(w,j),e(v,C),e(v,E),e(d,H),e(d,z),e(d,L),e(d,k),e(d,T),e(d,g),e(p,q),e(p,M)},p(r,[a]){a&2&&c!==(c=Math.round(r[1])+"")&&D(x,c),a&8&&D(m,r[3]),a&4&&u(n,"color",r[2]),a&2&&y!==(y=Math.round(r[1])+"")&&D(X,y),a&8&&D(A,r[3]),a&1&&u(v,"left",r[0]+"%"),a&1&&u(g,"left",r[0]+"%"),a&4&&u(g,"border-bottom-color",r[2]),a&10&&S!==(S="Biological age rank in the "+Math.round(r[1])+r[3]+" percentile, from better than peers to worse than peers")&&t(p,"aria-label",S)},i:I,o:I,d(r){r&&Q(i)}}}function Z(l,i,s){let h,n,c,x,m,{percentile:b=50}=i;return l.$$set=B=>{"percentile"in B&&s(4,b=B.percentile)},l.$$.update=()=>{l.$$.dirty&16&&s(1,h=typeof b=="string"?parseInt(b,10):Number(b)),l.$$.dirty&2&&s(3,n=R(Math.round(h),"english")),l.$$.dirty&2&&s(0,c=U(h)),l.$$.dirty&1&&s(5,x=c<34.5?"better":c<64.5?"average":"worse"),l.$$.dirty&32&&s(2,m=x==="worse"?"#d92429":"#008f8c")},[c,h,m,n,b,x]}class N extends F{constructor(i){super(),G(this,i,Z,Y,K,{percentile:4},V)}get percentile(){return this.$$.ctx[4]}set percentile(i){this.$$set({percentile:i}),J()}}customElements.define("ga-biological-age-rank",W(N,{percentile:{}},[],[],!0));export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as H,S as L,i as T,f as q,s as A,a as E,e as d,m as k,b as f,p as o,n as b,g as N,q as s,r as S,u as X,k as O}from"./index2.js";import{s as C,j as D}from"./helpers.js";function F(e){E(e,"svelte-e93mjh",".graph-card.svelte-e93mjh{font-family:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;width:560px;height:133px;padding:52px 1.25rem 1rem;background:#f5f5f5;border-radius:8px;border:1px solid #e0e0e0;box-sizing:border-box}.bubble.svelte-e93mjh{position:absolute;bottom:18px;display:inline-block;transform:translateX(-50%)}.bubble-text.svelte-e93mjh{display:block;padding:0.35rem 0.75rem;background:#008f8c;color:#fff;font-weight:bold;font-size:0.875rem;border-radius:6px;white-space:nowrap;box-shadow:0 1px 3px rgba(0, 0, 0, 0.15)}.bubble-arrow.svelte-e93mjh{position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #008f8c}.bar-wrap.svelte-e93mjh{position:relative;width:-moz-fit-content;width:fit-content;max-width:100%;margin-bottom:8px}.slider-bar.svelte-e93mjh{display:flex;gap:2px;width:-moz-fit-content;width:fit-content}.colorBox.svelte-e93mjh,.colorBoxShort.svelte-e93mjh{height:7px;flex-shrink:0;border-radius:24px}.colorBoxShort.svelte-e93mjh{width:16px}.colorBox.svelte-e93mjh{width:64px}.seg-1.svelte-e93mjh{background-color:#b71c1c}.seg-2.svelte-e93mjh{background-color:#d92429}.seg-3.svelte-e93mjh{background-color:#f78d1e}.seg-4.svelte-e93mjh,.seg-5.svelte-e93mjh,.seg-6.svelte-e93mjh{background-color:#51c7b8}.seg-7.svelte-e93mjh{background-color:#008f8c}.seg-8.svelte-e93mjh{background-color:#005f6e}.median-triangle.svelte-e93mjh{position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:8px solid #5dade2;pointer-events:none;z-index:0}.marker-triangle.svelte-e93mjh{position:absolute;bottom:-2px;transform:translateX(-50%);width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;pointer-events:none;z-index:1}.labels.svelte-e93mjh{display:flex;gap:2px;width:-moz-fit-content;width:fit-content;font-size:0.7rem;color:#9e9e9e;align-items:center}.label.svelte-e93mjh{text-align:center;flex-shrink:0;box-sizing:border-box;border-left:1px solid #d0d0d0;padding:0 4px}.label-optimal.svelte-e93mjh{border-right:1px solid #d0d0d0}.label-suboptimal.svelte-e93mjh{width:148px}.label-average.svelte-e93mjh{width:130px}.label-optimal.svelte-e93mjh{width:148px}")}function P(e){let l,t,r,a,n=Math.round(e[1])+"",h,v,m,g,$,y,u,B,x,z,p,M,j,w;return{c(){l=d("div"),t=d("div"),r=d("div"),a=d("span"),h=k(n),v=k(e[3]),m=k(" percentile"),g=f(),$=d("div"),y=f(),u=d("div"),u.innerHTML='<div class="colorBoxShort seg-1 svelte-e93mjh"></div> <div class="colorBox seg-2 svelte-e93mjh"></div> <div class="colorBox seg-3 svelte-e93mjh"></div> <div class="colorBox seg-4 svelte-e93mjh"></div> <div class="colorBox seg-5 svelte-e93mjh"></div> <div class="colorBox seg-6 svelte-e93mjh"></div> <div class="colorBox seg-7 svelte-e93mjh"></div> <div class="colorBoxShort seg-8 svelte-e93mjh"></div>',B=f(),x=d("div"),z=f(),p=d("div"),M=f(),j=d("div"),j.innerHTML='<span class="label label-suboptimal svelte-e93mjh">Suboptimal</span> <span class="label label-average svelte-e93mjh">Average</span> <span class="label label-optimal svelte-e93mjh">Optimal</span>',o(a,"class","bubble-text svelte-e93mjh"),o($,"class","bubble-arrow svelte-e93mjh"),o(r,"class","bubble svelte-e93mjh"),b(r,"left",e[0]+"%"),o(u,"class","slider-bar svelte-e93mjh"),o(x,"class","median-triangle svelte-e93mjh"),b(x,"left","50%"),o(x,"aria-hidden","true"),o(x,"title","50th percentile (median)"),o(p,"class","marker-triangle svelte-e93mjh"),b(p,"left",e[0]+"%"),b(p,"border-bottom-color",e[2]),o(p,"aria-hidden","true"),o(t,"class","bar-wrap svelte-e93mjh"),o(j,"class","labels svelte-e93mjh"),o(l,"class","graph-card svelte-e93mjh"),o(l,"role","img"),o(l,"aria-label",w="Immune resilience index in the "+Math.round(e[1])+e[3]+" percentile, from suboptimal to optimal")},m(i,c){N(i,l,c),s(l,t),s(t,r),s(r,a),s(a,h),s(a,v),s(a,m),s(r,g),s(r,$),s(t,y),s(t,u),s(t,B),s(t,x),s(t,z),s(t,p),s(l,M),s(l,j)},p(i,[c]){c&2&&n!==(n=Math.round(i[1])+"")&&S(h,n),c&8&&S(v,i[3]),c&1&&b(r,"left",i[0]+"%"),c&1&&b(p,"left",i[0]+"%"),c&4&&b(p,"border-bottom-color",i[2]),c&10&&w!==(w="Immune resilience index in the "+Math.round(i[1])+i[3]+" percentile, from suboptimal to optimal")&&o(l,"aria-label",w)},i:X,o:X,d(i){i&&O(l)}}}function W(e,l,t){let r,a,n,h,v,{percentile:m=50}=l;return e.$$set=g=>{"percentile"in g&&t(4,m=g.percentile)},e.$$.update=()=>{e.$$.dirty&16&&t(1,r=typeof m=="string"?parseInt(m,10):Number(m)),e.$$.dirty&2&&t(3,a=C(Math.round(r),"english")),e.$$.dirty&2&&t(0,n=D(r)),e.$$.dirty&1&&t(5,h=n<34.5?"suboptimal":n<64.5?"average":"optimal"),e.$$.dirty&32&&t(2,v=h==="suboptimal"?"#d92429":"#008f8c")},[n,r,v,a,m,h]}class I extends L{constructor(l){super(),T(this,l,W,P,A,{percentile:4},F)}get percentile(){return this.$$.ctx[4]}set percentile(l){this.$$set({percentile:l}),q()}}customElements.define("ga-immune-resilience-index",H(I,{percentile:{}},[],[],!0));export{I as default};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=()=>{import("./arthritis.wc.js"),import("./colitis.wc.js"),import("./crohn.wc.js"),import("./lupus.wc.js"),import("./diabetes.wc.js"),import("./myocardial.wc.js"),import("./menopause.wc.js"),import("./hypertension.wc.js"),import("./chronic.wc.js"),import("./dyslipidemia.wc.js"),import("./atherosclerosis.wc.js"),import("./coronary.wc.js"),import("./copd.wc.js"),import("./hypertension-risk.wc.js"),import("./pre-hypertension.wc.js"),import("./language.interface.js"),import("./colorectal.wc.js"),import("./endometrial.wc.js"),import("./ovarian.wc.js"),import("./age-graph.wc.js"),import("./index-graph.wc.js"),import("./median-graph.wc.js"),import("./median-graph-japanese.wc.js"),import("./index-graph-japanese.wc.js"),import("./results-overview.wc.js"),import("./results-overview-custom.wc.js"),import("./results-overview-custom-clinical.wc.js"),import("./single-overview.wc.js"),import("./single-overview-custom.wc.js"),import("./single-overview-custom-clinical.wc.js"),import("./main-result.wc.js"),import("./main-result-custom.wc.js"),import("./main-result-custom-clinical.wc.js"),import("./main-result-three.wc.js"),import("./main-result-three-client.wc.js"),import("./results-overview-three.wc.js"),import("./results-overview-three-clp-ch.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-three-clp.wc.js"),import("./insights-overview-three-clp-ch.wc.js"),import("./insights-overview-custom.wc.js"),import("./insights-overview-custom-clinical.wc.js"),import("./insights-overview-three-client.wc.js"),import("./insights-overview-latest.wc.js"),import("./action-steps-three.wc.js"),import("./action-steps-three-clp.wc.js"),import("./action-steps-three-clp-ch.wc.js"),import("./action-steps-three-client.wc.js"),import("./arrow-graph.wc.js"),import("./arrow-graph-three.wc.js"),import("./overlap-title.wc.js"),import("./overlap-title-three.wc.js"),import("./scatter-plot.wc.js"),import("./scatter-plot-custom.wc.js"),import("./scatter-plot-custom-clinical.wc.js"),import("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./insights-overview-clp-ch.wc.js"),import("./main-result-clp.wc.js"),import("./main-result-clp-ch.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-clp-new.wc.js"),import("./single-overview-clp-new-ch.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./arrow-graph-clp-ch.wc.js"),import("./overlap-title-clp.wc.js"),import("./overlap-title-clp-ch.wc.js"),import("./scatter-plot-clp.wc.js"),import("./scatter-plot-clp-ch.wc.js"),import("./over-time.wc.js"),import("./over-time-clp.wc.js"),import("./over-time-indexes.wc.js"),import("./over-time-indexes-clp-ch.wc.js")};export{t as default};
|
|
1
|
+
const t=()=>{import("./arthritis.wc.js"),import("./colitis.wc.js"),import("./crohn.wc.js"),import("./lupus.wc.js"),import("./diabetes.wc.js"),import("./myocardial.wc.js"),import("./menopause.wc.js"),import("./hypertension.wc.js"),import("./chronic.wc.js"),import("./dyslipidemia.wc.js"),import("./atherosclerosis.wc.js"),import("./coronary.wc.js"),import("./copd.wc.js"),import("./hypertension-risk.wc.js"),import("./pre-hypertension.wc.js"),import("./language.interface.js"),import("./colorectal.wc.js"),import("./endometrial.wc.js"),import("./ovarian.wc.js"),import("./age-graph.wc.js"),import("./index-graph.wc.js"),import("./median-graph.wc.js"),import("./median-graph-japanese.wc.js"),import("./index-graph-japanese.wc.js"),import("./results-overview.wc.js"),import("./results-overview-custom.wc.js"),import("./results-overview-custom-clinical.wc.js"),import("./single-overview.wc.js"),import("./single-overview-custom.wc.js"),import("./single-overview-custom-clinical.wc.js"),import("./main-result.wc.js"),import("./main-result-custom.wc.js"),import("./main-result-custom-clinical.wc.js"),import("./main-result-three.wc.js"),import("./main-result-three-client.wc.js"),import("./results-overview-three.wc.js"),import("./results-overview-three-clp-ch.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-three-clp.wc.js"),import("./insights-overview-three-clp-ch.wc.js"),import("./insights-overview-custom.wc.js"),import("./insights-overview-custom-clinical.wc.js"),import("./insights-overview-three-client.wc.js"),import("./insights-overview-latest.wc.js"),import("./action-steps-three.wc.js"),import("./action-steps-three-clp.wc.js"),import("./action-steps-three-clp-ch.wc.js"),import("./action-steps-three-client.wc.js"),import("./arrow-graph.wc.js"),import("./arrow-graph-three.wc.js"),import("./overlap-title.wc.js"),import("./overlap-title-three.wc.js"),import("./scatter-plot.wc.js"),import("./scatter-plot-custom.wc.js"),import("./scatter-plot-custom-clinical.wc.js"),import("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./insights-overview-clp-ch.wc.js"),import("./main-result-clp.wc.js"),import("./main-result-clp-ch.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-clp-new.wc.js"),import("./single-overview-clp-new-ch.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./arrow-graph-clp-ch.wc.js"),import("./overlap-title-clp.wc.js"),import("./overlap-title-clp-ch.wc.js"),import("./scatter-plot-clp.wc.js"),import("./scatter-plot-clp-ch.wc.js"),import("./over-time.wc.js"),import("./over-time-clp.wc.js"),import("./over-time-indexes.wc.js"),import("./over-time-indexes-clp-ch.wc.js"),import("./biological-age-rank.wc.js"),import("./immune-resilience-index.wc.js")};export{t as default};
|