@glycanage/web-components 1.192.0 → 1.194.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-clp.wc.js +1 -1
- package/dist/index.js +1 -1
- package/dist/insights-overview-custom-clinical.wc.js +1 -0
- package/dist/main-result-custom-clinical.wc.js +1 -0
- package/dist/results-overview-custom-clinical.wc.js +1 -0
- package/dist/scatter-plot-custom-clinical.wc.js +1 -0
- package/dist/single-overview-custom-clinical.wc.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,S as
|
|
1
|
+
import{c as o,S as b,i as N,f,s as $,a as w,d as O,g as v,u as V,k as m,o as x,e as p,m as u,b as C,n as D,p as d,q as A,r as L}from"./index2.js";import{a as I}from"./helpers.js";function y(r){w(r,"svelte-k2wnbv",".main.svelte-k2wnbv{height:100%;width:100%;display:flex;flex-direction:column;gap:10px}.further.svelte-k2wnbv{font-weight:700;font-size:14px;line-height:160%;letter-spacing:0.005em}")}function g(r){let T;function _(U,i){return U[1]==="primary"?G:k}let s=_(r),R=s(r);return{c(){R.c(),T=O()},m(U,i){R.m(U,i),v(U,T,i)},p(U,i){s===(s=_(U))&&R?R.p(U,i):(R.d(1),R=s(U),R&&(R.c(),R.m(T.parentNode,T)))},d(U){U&&m(T),R.d(U)}}}function k(r){let T,_,s,R,U,i,n,P,e,l,E,t=I(r[0],"FURTHER_TESTING")+"",M,Y,H,S,F;return{c(){T=p("div"),_=p("div"),s=p("b"),R=u(r[5]),U=C(),i=p("div"),n=u(r[6]),P=C(),e=p("div"),l=C(),E=p("div"),M=u(t),Y=u(":"),H=C(),S=p("div"),F=u(r[7]),D(_,"font-size","14px"),D(i,"font-size","78%"),D(e,"height","24px"),d(E,"class","further svelte-k2wnbv"),D(S,"font-size","68%"),d(T,"class","main svelte-k2wnbv")},m(c,a){v(c,T,a),A(T,_),A(_,s),A(s,R),A(T,U),A(T,i),A(i,n),A(T,P),A(T,e),A(T,l),A(T,E),A(E,M),A(E,Y),A(T,H),A(T,S),A(S,F)},p(c,a){a[0]&32&&L(R,c[5]),a[0]&64&&L(n,c[6]),a[0]&1&&t!==(t=I(c[0],"FURTHER_TESTING")+"")&&L(M,t),a[0]&128&&L(F,c[7])},d(c){c&&m(T)}}}function G(r){let T,_,s,R,U,i,n,P,e,l,E,t=I(r[0],"FURTHER_TESTING")+"",M,Y,H,S,F;return{c(){T=p("div"),_=p("div"),s=p("b"),R=u(r[2]),U=C(),i=p("div"),n=u(r[3]),P=C(),e=p("div"),l=C(),E=p("div"),M=u(t),Y=u(":"),H=C(),S=p("div"),F=u(r[4]),D(_,"font-size","14px"),D(i,"font-size","78%"),D(e,"height","24px"),d(E,"class","further svelte-k2wnbv"),D(S,"font-size","68%"),d(T,"class","main svelte-k2wnbv")},m(c,a){v(c,T,a),A(T,_),A(_,s),A(s,R),A(T,U),A(T,i),A(i,n),A(T,P),A(T,e),A(T,l),A(T,E),A(E,M),A(E,Y),A(T,H),A(T,S),A(S,F)},p(c,a){a[0]&4&&L(R,c[2]),a[0]&8&&L(n,c[3]),a[0]&1&&t!==(t=I(c[0],"FURTHER_TESTING")+"")&&L(M,t),a[0]&16&&L(F,c[4])},d(c){c&&m(T)}}}function z(r){let T,_=r[8]&&g(r);return{c(){_&&_.c(),T=O()},m(s,R){_&&_.m(s,R),v(s,T,R)},p(s,R){s[8]?_?_.p(s,R):(_=g(s),_.c(),_.m(T.parentNode,T)):_&&(_.d(1),_=null)},i:V,o:V,d(s){s&&m(T),_&&_.d(s)}}}function q(r,T,_){let{service:s=window.GaReportService}=T,{lang:R}=T,{type:U}=T,i,n=0,P=0,e=0,l=0,E=0,t="",M="",Y="",H="",S="",F="",c=!1;return x(async()=>{i=await s.getReport(),n=Number(i.Bpercentile),P=Number(i.Spercentile),e=Number(i.G0percentile),l=Number(i.G1percentile),E=Number(i.G2percentile),Number(i.P18percentile),Number(i.P22percentile),Number(i.P23percentile),Number(i.P26percentile),P>=67&&E>=67&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_1")),_(3,M=I(R,"PRIMARY_DESC_1")),_(4,Y=I(R,"PRIMARY_FURTHER_1"))),P>=67&&E>=67&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_2")),_(3,M=I(R,"PRIMARY_DESC_2")),_(4,Y=I(R,"PRIMARY_FURTHER_2"))),P>=67&&E>33&&E<67&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_3")),_(3,M=I(R,"PRIMARY_DESC_3")),_(4,Y=I(R,"PRIMARY_FURTHER_3"))),P>33&&P<67&&E>=67&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_4")),_(3,M=I(R,"PRIMARY_DESC_4")),_(4,Y=I(R,"PRIMARY_FURTHER_4"))),P>=67&&E>33&&E<67&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_5")),_(3,M=I(R,"PRIMARY_DESC_5")),_(4,Y=I(R,"PRIMARY_FURTHER_5"))),P>33&&P<67&&E>=67&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_6")),_(3,M=I(R,"PRIMARY_DESC_6")),_(4,Y=I(R,"PRIMARY_FURTHER_6"))),P>33&&P<67&&E>33&&E<67&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_7")),_(3,M=I(R,"PRIMARY_DESC_7")),_(4,Y=I(R,"PRIMARY_FURTHER_7"))),P>33&&P<67&&E>33&&E<67&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_8")),_(3,M=I(R,"PRIMARY_DESC_8")),_(4,Y=I(R,"PRIMARY_FURTHER_8"))),P>=67&&E>=67&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_9")),_(3,M=I(R,"PRIMARY_DESC_9")),_(4,Y=I(R,"PRIMARY_FURTHER_9"))),P>=67&&E<=33&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_10")),_(3,M=I(R,"PRIMARY_DESC_10")),_(4,Y=I(R,"PRIMARY_FURTHER_10"))),P<=33&&E>=67&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_11")),_(3,M=I(R,"PRIMARY_DESC_11")),_(4,Y=I(R,"PRIMARY_FURTHER_11"))),P>=67&&E>33&&E<67&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_12")),_(3,M=I(R,"PRIMARY_DESC_12")),_(4,Y=I(R,"PRIMARY_FURTHER_12"))),P>33&&P<67&&E>=67&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_13")),_(3,M=I(R,"PRIMARY_DESC_13")),_(4,Y=I(R,"PRIMARY_FURTHER_13"))),P>=67&&E<=33&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_14")),_(3,M=I(R,"PRIMARY_DESC_14")),_(4,Y=I(R,"PRIMARY_FURTHER_14"))),P>33&&P<67&&E<=33&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_15")),_(3,M=I(R,"PRIMARY_DESC_15")),_(4,Y=I(R,"PRIMARY_FURTHER_15"))),P<=33&&E>=67&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_16")),_(3,M=I(R,"PRIMARY_DESC_16")),_(4,Y=I(R,"PRIMARY_FURTHER_16"))),P<=33&&E>33&&E<67&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_17")),_(3,M=I(R,"PRIMARY_DESC_17")),_(4,Y=I(R,"PRIMARY_FURTHER_17"))),P>33&&P<67&&E>33&&E<67&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_18")),_(3,M=I(R,"PRIMARY_DESC_18")),_(4,Y=I(R,"PRIMARY_FURTHER_18"))),P>33&&P<67&&E<=33&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_19")),_(3,M=I(R,"PRIMARY_DESC_19")),_(4,Y=I(R,"PRIMARY_FURTHER_19"))),P<=33&&E>33&&E<67&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_20")),_(3,M=I(R,"PRIMARY_DESC_20")),_(4,Y=I(R,"PRIMARY_FURTHER_20"))),P>=67&&E<=33&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_21")),_(3,M=I(R,"PRIMARY_DESC_21")),_(4,Y=I(R,"PRIMARY_FURTHER_21"))),P<=33&&E>=67&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_22")),_(3,M=I(R,"PRIMARY_DESC_22")),_(4,Y=I(R,"PRIMARY_FURTHER_22"))),P<=33&&E<=33&&e<=33&&(_(2,t=I(R,"PRIMARY_TITLE_23")),_(3,M=I(R,"PRIMARY_DESC_23")),_(4,Y=I(R,"PRIMARY_FURTHER_23"))),P>33&&P<67&&E<=33&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_24")),_(3,M=I(R,"PRIMARY_DESC_24")),_(4,Y=I(R,"PRIMARY_FURTHER_24"))),P<=33&&E>33&&E<67&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_25")),_(3,M=I(R,"PRIMARY_DESC_25")),_(4,Y=I(R,"PRIMARY_FURTHER_25"))),P<=33&&E<=33&&e>33&&e<67&&(_(2,t=I(R,"PRIMARY_TITLE_26")),_(3,M=I(R,"PRIMARY_DESC_26")),_(4,Y=I(R,"PRIMARY_FURTHER_26"))),P<=33&&E<=33&&e>=67&&(_(2,t=I(R,"PRIMARY_TITLE_27")),_(3,M=I(R,"PRIMARY_DESC_27")),_(4,Y=I(R,"PRIMARY_FURTHER_27"))),l<=33&&n>=67&&(_(5,H=I(R,"SUPPORTIVE_TITLE_1")),_(6,S=I(R,"SUPPORTIVE_DESC_1")),_(7,F=I(R,"SUPPORTIVE_FURTHER_1"))),l<=33&&n>33&&n<67&&(_(5,H=I(R,"SUPPORTIVE_TITLE_2")),_(6,S=I(R,"SUPPORTIVE_DESC_2")),_(7,F=I(R,"SUPPORTIVE_FURTHER_2"))),l<=33&&n<=33&&(_(5,H=I(R,"SUPPORTIVE_TITLE_3")),_(6,S=I(R,"SUPPORTIVE_DESC_3")),_(7,F=I(R,"SUPPORTIVE_FURTHER_3"))),l>33&&l<67&&n>=67&&(_(5,H=I(R,"SUPPORTIVE_TITLE_4")),_(6,S=I(R,"SUPPORTIVE_DESC_4")),_(7,F=I(R,"SUPPORTIVE_FURTHER_4"))),l>33&&l<67&&n>33&&n<67&&(_(5,H=I(R,"SUPPORTIVE_TITLE_5")),_(6,S=I(R,"SUPPORTIVE_DESC_5")),_(7,F=I(R,"SUPPORTIVE_FURTHER_5"))),l>33&&l<67&&n<=33&&(_(5,H=I(R,"SUPPORTIVE_TITLE_6")),_(6,S=I(R,"SUPPORTIVE_DESC_6")),_(7,F=I(R,"SUPPORTIVE_FURTHER_6"))),l>=67&&n>=67&&(_(5,H=I(R,"SUPPORTIVE_TITLE_7")),_(6,S=I(R,"SUPPORTIVE_DESC_7")),_(7,F=I(R,"SUPPORTIVE_FURTHER_7"))),l>=67&&n>33&&n<67&&(_(5,H=I(R,"SUPPORTIVE_TITLE_8")),_(6,S=I(R,"SUPPORTIVE_DESC_8")),_(7,F=I(R,"SUPPORTIVE_FURTHER_8"))),l>=67&&n<=33&&(_(5,H=I(R,"SUPPORTIVE_TITLE_9")),_(6,S=I(R,"SUPPORTIVE_DESC_9")),_(7,F=I(R,"SUPPORTIVE_FURTHER_9"))),_(8,c=!0)}),r.$$set=a=>{"service"in a&&_(9,s=a.service),"lang"in a&&_(0,R=a.lang),"type"in a&&_(1,U=a.type)},[R,U,t,M,Y,H,S,F,c,s]}class h extends b{constructor(T){super(),N(this,T,q,z,$,{service:9,lang:0,type:1},y,[-1,-1])}get service(){return this.$$.ctx[9]}set service(T){this.$$set({service:T}),f()}get lang(){return this.$$.ctx[0]}set lang(T){this.$$set({lang:T}),f()}get type(){return this.$$.ctx[1]}set type(T){this.$$set({type:T}),f()}}customElements.define("ga-action-steps-three-clp",o(h,{service:{},lang:{},type:{}},[],[],!0));export{h 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("./single-overview.wc.js"),import("./single-overview-custom.wc.js"),import("./main-result.wc.js"),import("./main-result-custom.wc.js"),import("./main-result-three.wc.js"),import("./main-result-three-client.wc.js"),import("./results-overview-three.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-three-clp.wc.js"),import("./insights-overview-custom.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-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("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./main-result-clp.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-clp-new.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./overlap-title-clp.wc.js"),import("./scatter-plot-clp.wc.js"),import("./over-time.wc.js"),import("./over-time-clp.wc.js"),import("./over-time-indexes.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("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-three-clp.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-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("./main-result-clp.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-clp-new.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./overlap-title-clp.wc.js"),import("./scatter-plot-clp.wc.js"),import("./over-time.wc.js"),import("./over-time-clp.wc.js"),import("./over-time-indexes.wc.js")};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as oe,S as se,i as ce,f as B,s as re,a as ie,d as ne,g as q,u as $,k as j,o as pe,e as d,b as m,p as f,q as p,n as u,z as R,m as V}from"./index2.js";import{e as k}from"./each.js";function ue(i){ie(i,"svelte-ajvqca",".main.svelte-ajvqca.svelte-ajvqca{height:100%;width:100%;display:flex;flex-direction:column}.causes.svelte-ajvqca.svelte-ajvqca{display:flex;flex:1;gap:0.2rem;padding:0.5rem;align-items:center}.cause-chip.svelte-ajvqca.svelte-ajvqca{display:flex;align-items:center;height:1rem;gap:0.15rem;padding:0 .5rem;font-size:6px;font-weight:bold;border-radius:999px}.cause-chip-dot.svelte-ajvqca.svelte-ajvqca{width:5px;height:5px;border-radius:999px}.cause-chip.good.svelte-ajvqca.svelte-ajvqca{background-color:rgba(17,153,153,.1);color:#119999}.cause-chip.good.svelte-ajvqca .cause-chip-dot.svelte-ajvqca{background-color:#119999}.cause-chip.slightly-bad.svelte-ajvqca .cause-chip-dot.svelte-ajvqca{background-color:#FFAA00}.cause-chip.bad.svelte-ajvqca .cause-chip-dot.svelte-ajvqca{background-color:#DD2222}.cause-chip.slightly-bad.svelte-ajvqca.svelte-ajvqca{background-color:#FFAA001A;color:#FFAA00}.cause-chip.bad.svelte-ajvqca.svelte-ajvqca{background-color:rgba(221,34,34,.1);color:#DD2222}.cause-chip.good.svelte-ajvqca.svelte-ajvqca{background-color:rgba(17,153,153,.1);color:#119999}.cause-chip.slightly-bad.svelte-ajvqca.svelte-ajvqca{background-color:#FFAA001A;color:#FFAA00}.cause-chip.bad.svelte-ajvqca.svelte-ajvqca{background-color:rgba(221,34,34,.1);color:#DD2222}")}function J(i,e,o){const r=i.slice();return r[34]=e[o],r}function K(i,e,o){const r=i.slice();return r[37]=e[o],r}function Q(i,e,o){const r=i.slice();return r[40]=e[o],r}function W(i){let e,o,r,c=i[1].length&&de(i),s=i[2].length&&he(i),a=i[3].length&&ve(i);return{c(){e=d("div"),c&&c.c(),o=m(),s&&s.c(),r=m(),a&&a.c(),f(e,"class","main svelte-ajvqca")},m(l,n){q(l,e,n),c&&c.m(e,null),p(e,o),s&&s.m(e,null),p(e,r),a&&a.m(e,null)},p(l,n){l[1].length&&c.p(l,n),l[2].length&&s.p(l,n),l[3].length&&a.p(l,n)},d(l){l&&j(e),c&&c.d(),s&&s.d(),a&&a.d()}}}function de(i){let e,o,r,c,s=k(i[1]),a=[];for(let l=0;l<s.length;l+=1)a[l]=X(Q(i,s,l));return{c(){e=d("div"),o=d("span"),o.textContent="High impact",r=m(),c=d("div");for(let l=0;l<a.length;l+=1)a[l].c();u(o,"font-size","0.58rem"),u(o,"min-width","72px"),u(c,"display","flex"),u(c,"flex-wrap","wrap"),u(c,"gap","0.2rem"),f(e,"class","causes svelte-ajvqca"),u(e,"border-top","1px solid #09341F33"),u(e,"border-bottom",i[3].length||i[2].length?"none":"1px solid #09341F33")},m(l,n){q(l,e,n),p(e,o),p(e,r),p(e,c);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(c,null)},p(l,n){if(n[0]&2){s=k(l[1]);let t;for(t=0;t<s.length;t+=1){const g=Q(l,s,t);a[t]?a[t].p(g,n):(a[t]=X(g),a[t].c(),a[t].m(c,null))}for(;t<a.length;t+=1)a[t].d(1);a.length=s.length}},d(l){l&&j(e),R(a,l)}}}function X(i){let e,o,r,c=i[40].label+"",s,a;return{c(){e=d("div"),o=d("div"),r=m(),s=V(c),a=m(),f(o,"class","cause-chip-dot svelte-ajvqca"),f(e,"class","cause-chip bad svelte-ajvqca")},m(l,n){q(l,e,n),p(e,o),p(e,r),p(e,s),p(e,a)},p:$,d(l){l&&j(e)}}}function he(i){let e,o,r,c,s=k(i[2]),a=[];for(let l=0;l<s.length;l+=1)a[l]=Y(K(i,s,l));return{c(){e=d("div"),o=d("div"),o.textContent="Medium impact",r=m(),c=d("div");for(let l=0;l<a.length;l+=1)a[l].c();u(o,"font-size","0.58rem"),u(o,"min-width","72px"),u(c,"display","flex"),u(c,"flex-wrap","wrap"),u(c,"gap","0.2rem"),f(e,"class","causes svelte-ajvqca"),u(e,"border-top","1px solid #09341F33"),u(e,"border-bottom",i[3].length?"none":"1px solid #09341F33")},m(l,n){q(l,e,n),p(e,o),p(e,r),p(e,c);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(c,null)},p(l,n){if(n[0]&4){s=k(l[2]);let t;for(t=0;t<s.length;t+=1){const g=K(l,s,t);a[t]?a[t].p(g,n):(a[t]=Y(g),a[t].c(),a[t].m(c,null))}for(;t<a.length;t+=1)a[t].d(1);a.length=s.length}},d(l){l&&j(e),R(a,l)}}}function Y(i){let e,o,r,c=i[37].label+"",s,a;return{c(){e=d("div"),o=d("div"),r=m(),s=V(c),a=m(),f(o,"class","cause-chip-dot svelte-ajvqca"),f(e,"class","cause-chip slightly-bad svelte-ajvqca")},m(l,n){q(l,e,n),p(e,o),p(e,r),p(e,s),p(e,a)},p:$,d(l){l&&j(e)}}}function ve(i){let e,o,r,c,s=k(i[3]),a=[];for(let l=0;l<s.length;l+=1)a[l]=Z(J(i,s,l));return{c(){e=d("div"),o=d("span"),o.textContent="Low impact",r=m(),c=d("div");for(let l=0;l<a.length;l+=1)a[l].c();u(o,"font-size","0.58rem"),u(o,"min-width","72px"),u(c,"display","flex"),u(c,"flex-wrap","wrap"),u(c,"gap","0.2rem"),f(e,"class","causes svelte-ajvqca"),u(e,"border-top","1px solid #09341F33"),u(e,"border-bottom","1px solid #09341F33")},m(l,n){q(l,e,n),p(e,o),p(e,r),p(e,c);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(c,null)},p(l,n){if(n[0]&8){s=k(l[3]);let t;for(t=0;t<s.length;t+=1){const g=J(l,s,t);a[t]?a[t].p(g,n):(a[t]=Z(g),a[t].c(),a[t].m(c,null))}for(;t<a.length;t+=1)a[t].d(1);a.length=s.length}},d(l){l&&j(e),R(a,l)}}}function Z(i){let e,o,r,c=i[34].label+"",s,a;return{c(){e=d("div"),o=d("div"),r=m(),s=V(c),a=m(),f(o,"class","cause-chip-dot svelte-ajvqca"),f(e,"class","cause-chip good svelte-ajvqca")},m(l,n){q(l,e,n),p(e,o),p(e,r),p(e,s),p(e,a)},p:$,d(l){l&&j(e)}}}function ge(i){let e,o=i[0]&&W(i);return{c(){o&&o.c(),e=ne()},m(r,c){o&&o.m(r,c),q(r,e,c)},p(r,c){r[0]?o?o.p(r,c):(o=W(r),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:$,o:$,d(r){r&&j(e),o&&o.d(r)}}}function be(i,e,o){let{service:r=window.GaReportService}=e,{type:c}=e,s,a="",l=0,n=0,t=0,g=0,x=0,N=0,y=0,F=0,w=0,C=0,A=0,D=0,P=0,z=0,E=0,G=0,L=0,H=0,I=0,O=0,T=0,U=0,M=!1,h=[],b=[],v=[];function ee(){a==="F"?g===0?v.push({label:"MI & CVA",color:"green"}):g===1&&h.push({label:"MI & CVA",color:"red"}):t<3?v.push({label:"MI & CVA",color:"green"}):t===3?b.push({label:"MI & CVA",color:"orange"}):t===4&&h.push({label:"MI & CVA",color:"red"}),a==="F"&&(x<3?v.push({label:"Atherosclerosis",color:"green"}):x===5?h.push({label:"Atherosclerosis",color:"red"}):b.push({label:"Atherosclerosis",color:"orange"})),a==="F"&&(N===0?v.push({label:"Coronary artery disease",color:"green"}):N===1?b.push({label:"Coronary artery disease",color:"orange"}):N===2&&h.push({label:"Coronary artery disease",color:"red"})),l===0&&n<2?v.push({label:"Hypertension",color:"green"}):h.push({label:"Hypertension",color:"red"})}function le(){y<3?v.push({label:"Type 2 diabetes",color:"green"}):y===5?h.push({label:"Type 2 diabetes",color:"red"}):b.push({label:"Type 2 diabetes",color:"orange"}),F<3?v.push({label:"Dyslipidemia",color:"green"}):F===3?b.push({label:"Dyslipidemia",color:"orange"}):h.push({label:"Dyslipidemia",color:"red"})}function ae(){w<3?v.push({label:"Rheumatoid arthritis",color:"green"}):w===3?b.push({label:"Rheumatoid arthritis",color:"orange"}):h.push({label:"Rheumatoid arthritis",color:"red"}),C<3?v.push({label:"Ulcerative colitis",color:"green"}):C===3?b.push({label:"Ulcerative colitis",color:"orange"}):h.push({label:"Ulcerative colitis",color:"red"}),A<3?v.push({label:"Crohn's disease",color:"green"}):A===5?h.push({label:"Crohn's disease",color:"red"}):b.push({label:"Crohn's disease",color:"orange"}),D<3?v.push({label:"SLE",color:"green"}):D===3?b.push({label:"SLE",color:"orange"}):h.push({label:"SLE",color:"red"})}function te(){P===0?v.push({label:"COPD",color:"green"}):P===1?b.push({label:"COPD",color:"orange"}):h.push({label:"COPD",color:"red"})}return pe(async()=>{s=await r.getReport(),a=s.sex,z=Number(s.Bpercentile),E=Number(s.Spercentile),G=Number(s.G0percentile),L=Number(s.G1percentile),H=Number(s.G2percentile),O=Number(s.P18percentile),I=Number(s.P22percentile),T=Number(s.P23percentile),U=Number(s.P26percentile),z>=67&&(l++,t++,x++,y++,F++,A++,P++),z<=33&&C++,E<=33&&(t++,x++,N++,y++,F++,w++,A++),G>=67&&(n++,t++,x++,N++,y++,F++,C++,A++,w++),L<=33&&(n++,x++,y++,w++,C++,A++,P++),H<=33&&(n++,t++,x++,y++,F++,w++,C++,A++),O>=67&&D++,I<=33&&D++,T>=67&&D++,U<=33&&D++,I<=33&&a==="F"&&g++,ee(),le(),ae(),te(),o(0,M=!0)}),i.$$set=S=>{"service"in S&&o(4,r=S.service),"type"in S&&o(5,c=S.type)},[M,h,b,v,r,c]}class _ extends se{constructor(e){super(),ce(this,e,be,ge,re,{service:4,type:5},ue,[-1,-1])}get service(){return this.$$.ctx[4]}set service(e){this.$$set({service:e}),B()}get type(){return this.$$.ctx[5]}set type(e){this.$$set({type:e}),B()}}customElements.define("ga-insights-overview-custom-clinical",oe(_,{service:{},type:{}},[],[],!0));export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as $,S as k,i as S,f as h,s as D,a as z,d as M,g as b,u as C,k as y,o as j,e as f,v as w,b as q,m as N,p as r,n as F,q as o,r as H}from"./index2.js";function L(c){z(c,"svelte-qdcddn",".graph-container.svelte-qdcddn.svelte-qdcddn{width:100%;height:100%;gap:.25rem;display:flex;flex-direction:column;position:relative}.colorBox.svelte-qdcddn.svelte-qdcddn{height:3px;width:14.3%;border-radius:24px}.colorBoxShort.svelte-qdcddn.svelte-qdcddn{height:3px;width:5%;border-radius:24px}.slider-number.svelte-qdcddn.svelte-qdcddn{display:flex;flex-direction:column;align-items:center;position:absolute;color:white;top:25%;left:50%;transform:translate(-50%, -12.5%)}.slider.svelte-qdcddn.svelte-qdcddn{position:relative;display:flex;flex-direction:column;align-items:center}.slider-pin.svelte-qdcddn.svelte-qdcddn{position:absolute;transform:translate(-50%, .5rem);bottom:0}.slider-pin.svelte-qdcddn svg.svelte-qdcddn{transform:rotate(180deg)}.slider-bar.svelte-qdcddn.svelte-qdcddn{width:100%;display:flex;gap:.25rem}.texts.svelte-qdcddn.svelte-qdcddn{display:flex;gap:.25rem}.text-left.svelte-qdcddn.svelte-qdcddn{border-left:1px solid #09341F33;border-right:1px solid #09341F33;display:flex;flex:2.5 2.5 0;align-items:center;justify-content:center;font-size:0.45rem;color:#09341F80;max-height:0.6rem}.text-middle.svelte-qdcddn.svelte-qdcddn{position:relative;display:flex;align-items:center;justify-content:center;flex:2 2 0;font-size:0.45rem;color:#09341F80;max-height:0.6rem}.text-right.svelte-qdcddn.svelte-qdcddn{border-left:1px solid #09341F33;border-right:1px solid #09341F33;display:flex;flex:2.5 2.5 0;align-items:center;justify-content:center;font-size:0.45rem;color:#09341F80;max-height:0.6rem}")}function B(c){let d,t,s,l,v,n,i,e,m,g,u,a;return{c(){d=f("div"),t=f("div"),s=f("div"),l=w("svg"),v=w("path"),n=q(),i=f("b"),e=N(c[0]),m=q(),g=f("div"),g.innerHTML='<div class="colorBoxShort svelte-qdcddn" style="background-color: #015566;"></div> <div class="colorBox svelte-qdcddn" style="background-color: #015566;"></div> <div class="colorBox svelte-qdcddn" style="background-color: #13A195;"></div> <div class="colorBox svelte-qdcddn" style="background-color: #66CCAA;"></div> <div class="colorBox svelte-qdcddn" style="background-color: #66CCAA;"></div> <div class="colorBox svelte-qdcddn" style="background-color: #F2800D;"></div> <div class="colorBox svelte-qdcddn" style="background-color: #DF2120;"></div> <div class="colorBoxShort svelte-qdcddn" style="background-color: #DF2120;"></div>',u=q(),a=f("div"),a.innerHTML='<div class="text-left svelte-qdcddn">Optimal</div> <div class="text-middle svelte-qdcddn">Average</div> <div class="text-right svelte-qdcddn">Suboptimal</div>',r(v,"d","M22.0002 0.133165C22.6224 0.133165 23.2446 0.244272 23.8668 0.466494C24.4891 0.688719 25.0446 1.02205 25.5335 1.46649C28.4224 4.13316 30.9779 6.73316 33.2002 9.2665C35.4224 11.7998 37.2779 14.2554 38.7668 16.6332C40.2557 19.0109 41.3891 21.2998 42.1668 23.4998C42.9446 25.6998 43.3335 27.7998 43.3335 29.7998C43.3335 36.4665 41.1891 41.7776 36.9002 45.7332C32.6113 49.6887 27.6446 51.6665 22.0002 51.6665C16.3557 51.6665 11.3891 49.6887 7.10016 45.7332C2.81128 41.7776 0.666833 36.4665 0.666834 29.7998C0.666834 27.7998 1.05572 25.6998 1.8335 23.4998C2.61128 21.2998 3.74461 19.0109 5.2335 16.6332C6.72239 14.2554 8.57795 11.7998 10.8002 9.2665C13.0224 6.73316 15.5779 4.13316 18.4668 1.46649C18.9557 1.02205 19.5113 0.688719 20.1335 0.466493C20.7557 0.244272 21.3779 0.133165 22.0002 0.133165Z"),r(v,"fill",c[2]()),r(l,"width","20"),r(l,"height","28"),r(l,"viewBox","0 0 44 52"),r(l,"fill","none"),r(l,"xmlns","http://www.w3.org/2000/svg"),r(l,"class","svelte-qdcddn"),r(i,"class","slider-number svelte-qdcddn"),F(i,"font-size","0.46rem"),r(s,"class","slider-pin svelte-qdcddn"),F(s,"left",c[3]()+"%"),r(t,"class","slider svelte-qdcddn"),r(g,"class","slider-bar svelte-qdcddn"),r(a,"class","texts svelte-qdcddn"),r(d,"class","graph-container svelte-qdcddn")},m(x,p){b(x,d,p),o(d,t),o(t,s),o(s,l),o(l,v),o(s,n),o(s,i),o(i,e),o(d,m),o(d,g),o(d,u),o(d,a)},p(x,p){p&1&&H(e,x[0])},d(x){x&&y(d)}}}function R(c){let d,t=c[1]&&B(c);return{c(){t&&t.c(),d=M()},m(s,l){t&&t.m(s,l),b(s,d,l)},p(s,[l]){s[1]?t?t.p(s,l):(t=B(s),t.c(),t.m(d.parentNode,d)):t&&(t.d(1),t=null)},i:C,o:C,d(s){s&&y(d),t&&t.d(s)}}}function T(c,d,t){let{lang:s}=d,{service:l=window.GaReportService}=d,v,n=0,i=0,e=0;function m(){if(n===i||e<=6)return"#66CCAA";if(n<i&&e<=12)return"#13A195";if(n<i&&e>12)return"#015566";if(n>i&&e<=12)return"#F2800D";if(n>i&&e>12)return"#DF2120"}function g(){if(n===i)return 50;if(n>i)return e<=6?51+(2*e+e*.3):e<=12?52+(e+2*e*.65):e<=18?55+(2*e+e*.2):97.2;if(n<i)return e<=6?49-(2*e+e*.3):e<=12?48-(e+2*e*.65):e<=18?45-(2*e+e*.2):2.8}let u=!1;return j(async()=>{v=await l.getReport(),t(0,n=Number(v.glycanage)),i=Number(v.chronologicalage),e=Math.abs(n-i),t(1,u=!0)}),c.$$set=a=>{"lang"in a&&t(4,s=a.lang),"service"in a&&t(5,l=a.service)},[n,u,m,g,s,l]}class A extends k{constructor(d){super(),S(this,d,T,R,D,{lang:4,service:5},L)}get lang(){return this.$$.ctx[4]}set lang(d){this.$$set({lang:d}),h()}get service(){return this.$$.ctx[5]}set service(d){this.$$set({service:d}),h()}}customElements.define("ga-main-result-custom-clinical",$(A,{lang:{},service:{}},[],[],!0));export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as fe,S as ue,i as ve,f as ee,s as he,a as ge,d as pe,g as c,u as ne,k as d,o as be,e as m,m as N,b as g,v as J,n as f,p as e,q as r,r as D}from"./index2.js";import{s as ce,f as K,h as Q,j as _}from"./helpers.js";function xe(o){ge(o,"svelte-zmtfss",".main.svelte-zmtfss{height:100%;width:100%;display:flex}.label.svelte-zmtfss{width:30%;display:flex;align-items:center}.label-container.svelte-zmtfss{display:flex;flex-direction:column}.graph-container.svelte-zmtfss{width:70%;display:flex;align-items:center;justify-content:space-between;position:relative}.colorBox.svelte-zmtfss{height:3px;width:14.3%;border-radius:24px}.colorBoxShort.svelte-zmtfss{height:3px;width:5%;border-radius:24px}.slider.svelte-zmtfss{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -55%);width:24%;max-height:70px}.slider-number.svelte-zmtfss{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -150%);width:24%;font-size:0.34rem;color:white}.slider-triangle.svelte-zmtfss{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -105%);width:24%}.text-left.svelte-zmtfss{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.44rem;color:#09341F80}.text-middle.svelte-zmtfss{position:absolute;height:15%;top:62%;display:flex;align-items:center;justify-content:center;font-size:0.44rem;color:#09341F80}.text-right.svelte-zmtfss{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.44rem;color:#09341F80}")}function de(o){let a,t,n,p,x,b,y,F,w,u,z,B,h,v,C,s,l,k,P,te,G,j,U,V,q=ce(o[5],o[1])+"",W,se,le,I,$,M,H,ie,R,T=o[0]==="shield"||o[0]==="youth"||o[0]==="median"?"Suboptimal":"Optimal",X,oe,O,ae,E,Z=o[0]==="shield"||o[0]==="youth"||o[0]==="median"?"Optimal":"Suboptimal",Y;function re(i,A){if(i[0]==="mature"||i[0]==="lifestyle"||i[0]==="age")return ze;if(i[0]==="shield"||i[0]==="youth"||i[0]==="median")return ye}let L=re(o),S=L&&L(o);return{c(){a=m("div"),t=m("div"),n=m("div"),p=m("span"),x=N(o[2]),b=g(),y=m("span"),F=N(o[3]),w=g(),u=m("div"),z=m("b"),B=N(o[4]),h=g(),v=m("div"),S&&S.c(),C=g(),s=m("div"),l=J("svg"),k=J("rect"),te=g(),G=m("div"),j=m("b"),U=N(o[5]),V=m("sup"),W=N(q),se=N(" percentile"),le=g(),I=m("div"),$=J("svg"),M=J("path"),ie=g(),R=m("div"),X=N(T),oe=g(),O=m("div"),O.textContent="Average",ae=g(),E=m("div"),Y=N(Z),f(p,"font-size","0.7rem"),f(y,"font-size","0.48rem"),f(u,"font-size","0.44rem"),f(u,"color",o[4]==="Anti-inflammatory"?"#119999":"#DD2222"),e(n,"class","label-container svelte-zmtfss"),e(t,"class","label svelte-zmtfss"),e(k,"width","100"),e(k,"height","24"),e(k,"rx","4"),e(k,"fill",P=o[0]==="shield"||o[0]==="youth"||o[0]==="median"?K(o[5]):Q(o[5])),e(l,"width","55"),e(l,"height","24"),e(l,"viewBox","0 0 100 24"),e(l,"fill","none"),e(l,"xmlns","http://www.w3.org/2000/svg"),e(s,"class","slider svelte-zmtfss"),f(s,"left",_(o[5])+"%"),e(G,"class","slider-number svelte-zmtfss"),f(G,"left",_(o[5])+"%"),e(M,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),e(M,"fill",H=o[0]==="shield"||o[0]==="youth"||o[0]==="median"?K(o[5]):Q(o[5])),e($,"width","9"),e($,"height","5"),e($,"viewBox","0 0 12 8"),e($,"fill","none"),e($,"xmlns","http://www.w3.org/2000/svg"),e(I,"class","slider-triangle svelte-zmtfss"),f(I,"left",_(o[5])+"%"),e(R,"class","text-left svelte-zmtfss"),f(R,"width","34.7%"),e(O,"class","text-middle svelte-zmtfss"),f(O,"width","30%"),f(O,"left","35%"),e(E,"class","text-right svelte-zmtfss"),f(E,"width","34.7%"),e(v,"class","graph-container svelte-zmtfss"),e(a,"class","main svelte-zmtfss")},m(i,A){c(i,a,A),r(a,t),r(t,n),r(n,p),r(p,x),r(n,b),r(n,y),r(y,F),r(n,w),r(n,u),r(u,z),r(z,B),r(a,h),r(a,v),S&&S.m(v,null),r(v,C),r(v,s),r(s,l),r(l,k),r(v,te),r(v,G),r(G,j),r(j,U),r(j,V),r(V,W),r(j,se),r(v,le),r(v,I),r(I,$),r($,M),r(v,ie),r(v,R),r(R,X),r(v,oe),r(v,O),r(v,ae),r(v,E),r(E,Y)},p(i,A){A&4&&D(x,i[2]),A&8&&D(F,i[3]),A&16&&D(B,i[4]),A&16&&f(u,"color",i[4]==="Anti-inflammatory"?"#119999":"#DD2222"),L!==(L=re(i))&&(S&&S.d(1),S=L&&L(i),S&&(S.c(),S.m(v,C))),A&33&&P!==(P=i[0]==="shield"||i[0]==="youth"||i[0]==="median"?K(i[5]):Q(i[5]))&&e(k,"fill",P),A&32&&f(s,"left",_(i[5])+"%"),A&32&&D(U,i[5]),A&34&&q!==(q=ce(i[5],i[1])+"")&&D(W,q),A&32&&f(G,"left",_(i[5])+"%"),A&33&&H!==(H=i[0]==="shield"||i[0]==="youth"||i[0]==="median"?K(i[5]):Q(i[5]))&&e(M,"fill",H),A&32&&f(I,"left",_(i[5])+"%"),A&1&&T!==(T=i[0]==="shield"||i[0]==="youth"||i[0]==="median"?"Suboptimal":"Optimal")&&D(X,T),A&1&&Z!==(Z=i[0]==="shield"||i[0]==="youth"||i[0]==="median"?"Optimal":"Suboptimal")&&D(Y,Z)},d(i){i&&d(a),S&&S.d()}}}function ye(o){let a,t,n,p,x,b,y,F,w,u,z,B,h,v,C;return{c(){a=m("div"),t=g(),n=m("div"),p=g(),x=m("div"),b=g(),y=m("div"),F=g(),w=m("div"),u=g(),z=m("div"),B=g(),h=m("div"),v=g(),C=m("div"),e(a,"class","colorBoxShort svelte-zmtfss"),f(a,"background-color","#DF2120"),e(n,"class","colorBox svelte-zmtfss"),f(n,"background-color","#DF2120"),e(x,"class","colorBox svelte-zmtfss"),f(x,"background-color","#F2800D"),e(y,"class","colorBox svelte-zmtfss"),f(y,"background-color","#66CCAA"),e(w,"class","colorBox svelte-zmtfss"),f(w,"background-color","#66CCAA"),e(z,"class","colorBox svelte-zmtfss"),f(z,"background-color","#13A195"),e(h,"class","colorBox svelte-zmtfss"),f(h,"background-color","#015566"),e(C,"class","colorBoxShort svelte-zmtfss"),f(C,"background-color","#015566")},m(s,l){c(s,a,l),c(s,t,l),c(s,n,l),c(s,p,l),c(s,x,l),c(s,b,l),c(s,y,l),c(s,F,l),c(s,w,l),c(s,u,l),c(s,z,l),c(s,B,l),c(s,h,l),c(s,v,l),c(s,C,l)},d(s){s&&(d(a),d(t),d(n),d(p),d(x),d(b),d(y),d(F),d(w),d(u),d(z),d(B),d(h),d(v),d(C))}}}function ze(o){let a,t,n,p,x,b,y,F,w,u,z,B,h,v,C;return{c(){a=m("div"),t=g(),n=m("div"),p=g(),x=m("div"),b=g(),y=m("div"),F=g(),w=m("div"),u=g(),z=m("div"),B=g(),h=m("div"),v=g(),C=m("div"),e(a,"class","colorBoxShort svelte-zmtfss"),f(a,"background-color","#015566"),e(n,"class","colorBox svelte-zmtfss"),f(n,"background-color","#015566"),e(x,"class","colorBox svelte-zmtfss"),f(x,"background-color","#13A195"),e(y,"class","colorBox svelte-zmtfss"),f(y,"background-color","#66CCAA"),e(w,"class","colorBox svelte-zmtfss"),f(w,"background-color","#66CCAA"),e(z,"class","colorBox svelte-zmtfss"),f(z,"background-color","#F2800D"),e(h,"class","colorBox svelte-zmtfss"),f(h,"background-color","#DF2120"),e(C,"class","colorBoxShort svelte-zmtfss"),f(C,"background-color","#DF2120")},m(s,l){c(s,a,l),c(s,t,l),c(s,n,l),c(s,p,l),c(s,x,l),c(s,b,l),c(s,y,l),c(s,F,l),c(s,w,l),c(s,u,l),c(s,z,l),c(s,B,l),c(s,h,l),c(s,v,l),c(s,C,l)},d(s){s&&(d(a),d(t),d(n),d(p),d(x),d(b),d(y),d(F),d(w),d(u),d(z),d(B),d(h),d(v),d(C))}}}function we(o){let a,t=o[6]&&de(o);return{c(){t&&t.c(),a=pe()},m(n,p){t&&t.m(n,p),c(n,a,p)},p(n,[p]){n[6]?t?t.p(n,p):(t=de(n),t.c(),t.m(a.parentNode,a)):t&&(t.d(1),t=null)},i:ne,o:ne,d(n){n&&d(a),t&&t.d(n)}}}function Be(o,a,t){let{type:n}=a,{lang:p}=a,{service:x=window.GaReportService}=a,b,y="",F="",w="",u=0,z=!1;const B=[{name:"age",label:"BIOLOGICAL_AGE",description:"CHRONIC_INFLAMMATION"},{name:"shield",label:"S Index",subtitle:"Sialylation",description:"Anti-inflammatory"},{name:"youth",label:"G2 Index",subtitle:"Digalactosylation",description:"Anti-inflammatory"},{name:"mature",label:"G0 Index",subtitle:"Agalactosylation",description:"Pro-inflammatory"},{name:"median",label:"G1 Index",subtitle:"Monogalactosylation",description:"Anti-inflammatory"},{name:"lifestyle",label:"B Index",subtitle:"Bisecting GlcNAc",description:"Pro-inflammatory"}].find(h=>h.name===n);return be(async()=>{switch(b=await x.getReport(),Number(b.glycanage),Number(b.chronologicalage),n){case"age":t(5,u=Number(b.glycanage));break;case"shield":t(5,u=Number(b.Spercentile));break;case"youth":t(5,u=Number(b.G2percentile));break;case"mature":t(5,u=Number(b.G0percentile));break;case"median":t(5,u=Number(b.G1percentile));break;case"lifestyle":t(5,u=Number(b.Bpercentile))}(u===100||u===0)&&t(5,u=u===100?99:1),B&&(t(2,y=B.label),t(4,w=B.description),t(3,F=B.subtitle)),t(6,z=!0)}),o.$$set=h=>{"type"in h&&t(0,n=h.type),"lang"in h&&t(1,p=h.lang),"service"in h&&t(7,x=h.service)},[n,p,y,F,w,u,z,x]}class me extends ue{constructor(a){super(),ve(this,a,Be,we,he,{type:0,lang:1,service:7},xe)}get type(){return this.$$.ctx[0]}set type(a){this.$$set({type:a}),ee()}get lang(){return this.$$.ctx[1]}set lang(a){this.$$set({lang:a}),ee()}get service(){return this.$$.ctx[7]}set service(a){this.$$set({service:a}),ee()}}customElements.define("ga-results-overview-custom-clinical",fe(me,{type:{},lang:{},service:{}},[],[],!0));export{me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as W,S as B,i as I,f as b,s as M,e as L,b as H,n as A,p as G,g as k,q as V,u as P,k as F,o as Z,A as q}from"./index2.js";import{g as X}from"./globals.js";import{a as E,f as _,h as j}from"./helpers.js";const{document:J}=X;function K(m){let e,a,t;return{c(){e=L("div"),a=H(),t=L("link"),A(e,"width","100%"),A(e,"height","100%"),A(e,"position","relative"),G(t,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),G(t,"rel","stylesheet")},m(r,c){k(r,e,c),m[4](e),k(r,a,c),V(J.head,t)},p:P,i:P,o:P,d(r){r&&(F(e),F(a)),m[4](null),F(t)}}}function Q(m,e,a){let{type:t}=e,{lang:r}=e,{service:c=window.GaReportService}=e,R=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],u,$,T,f=0,p=0,i={},v="",y=0,x;const g=R.find(o=>o.name===t);function h(){if(t=="shield"||t=="youth"||t=="median")return _(f);if(t=="mature"||t=="lifestyle")return j(f)}function D(){x&&(i=echarts.init(x,null,{devicePixelRatio:4,renderer:"svg"}));const o=x.getBoundingClientRect();var d={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"transparent",grid:{top:"34px",left:"37px",right:"44px",bottom:"28px"},dataset:[{source:$.data.map(s=>[s.x,s.y])},{source:T.data.map(s=>[s.x,s.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:E(r,"AGE"),nameTextStyle:{color:"#09341F",opacity:.8,fontSize:8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",fontSize:8,opacity:.8,formatter(s){return s===0||s===100?"":s}},splitLine:{show:!0}},yAxis:{min:0,max:.6,name:E(r,"INDEX_SCORE"),nameTextStyle:{color:"#09341F",opacity:.8,fontSize:8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",fontSize:8,opacity:.8,formatter(s){return s===0||s===.6?"":s}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},itemStyle:{color:"#09341F",opacity:.1,borderWidth:1}},{name:"Result",type:"scatter",data:[{x:y,y:p}],itemStyle:{color:h()}},{name:"Average population",type:"line",smooth:!0,datasetIndex:1,symbol:"line",lineStyle:{name:"line",type:"line",color:"#09341F",opacity:.5,symbol:"none",width:5},showSymbol:!1}],graphic:[],legend:{show:!0,right:"50%",top:"1%",left:"67%",itemGap:.2,itemWidth:10,itemHeight:6,textStyle:{color:"#09341F",opacity:.8,fontSize:8},selected:{"Measured result":!0,"Population average":!0},inactiveColor:"#fff"}};i.setOption(d),d.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",y),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",y),y2:i.convertToPixel("yAxis",p)},style:{stroke:h(),lineDash:[8,8],lineWidth:1.7},z:8}),d.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",p),x2:i.convertToPixel("xAxis",y),y2:i.convertToPixel("yAxis",p)},style:{stroke:h(),lineDash:[8,8],lineWidth:1.7},z:8}),d.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",y),cy:i.convertToPixel("yAxis",p),r:4},style:{fill:h(),stroke:"#FFFFFF",lineWidth:1},z:15});const C=i.convertToPixel("xAxis",y),z=i.convertToPixel("yAxis",p),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),l=document.createElement("div");n.setAttribute("width","52"),n.setAttribute("height","18"),n.setAttribute("viewBox","0 0 71 32"),n.setAttribute("fill","none"),n.setAttribute("xmlns","http://www.w3.org/2000/svg");const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.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"),w.setAttribute("fill",h());const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),S.setAttribute("fill",h()),n.appendChild(w),n.appendChild(S),n.style.position="absolute",n.style.left=`${o.left+C-95}px`,n.style.top=`${o.top+z-10}px`,n.style.zIndex="8",l.innerText=`${Number.parseFloat(p).toFixed(3)}`,l.style.position="absolute",l.style.left=`${o.left+C-79}px`,l.style.top=`${o.top+z-7}px`,l.style.font="bold 10px sans-serif",l.style.color="white",l.style.zIndex="999",l.style.fontFamily="Sen",document.body.appendChild(l),document.body.appendChild(n),i.setOption(d)}Z(async()=>{u=await c.getReport(),v=u.sex,$=await c.getScatterData(t,v),T=await c.getLineData(t,v),y=Number(u.chronologicalage),g&&(f=Number(u[g.csvPerc]),p=Number(u[g.csvScore])),D()});function O(o){q[o?"unshift":"push"](()=>{x=o,a(0,x)})}return m.$$set=o=>{"type"in o&&a(1,t=o.type),"lang"in o&&a(2,r=o.lang),"service"in o&&a(3,c=o.service)},[x,t,r,c,O]}class N extends B{constructor(e){super(),I(this,e,Q,K,M,{type:1,lang:2,service:3})}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),b()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),b()}get service(){return this.$$.ctx[3]}set service(e){this.$$set({service:e}),b()}}customElements.define("ga-scatter-plot-custom-clinical",W(N,{type:{},lang:{},service:{}},[],[],!1));export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as ee,S as te,i as se,f as K,s as le,a as ie,d as oe,g as a,u as V,k as c,o as re,e as u,b as f,v as E,m as O,p as t,n as v,q as p,r as M}from"./index2.js";import{s as W,f as Z,h as H,j as C}from"./helpers.js";function ae(o){ie(o,"svelte-zkyqus",".graph.svelte-zkyqus{height:100%;width:100%;display:flex;align-items:center;justify-content:center;border:1px solid #09341F33;border-radius:10px}.graph-container.svelte-zkyqus{width:75%;height:100%;display:flex;align-items:center;justify-content:space-between;position:relative}.colorBox.svelte-zkyqus{height:4px;width:14.3%;border-radius:24px}.colorBoxShort.svelte-zkyqus{height:4px;width:5%;border-radius:24px}.slider.svelte-zkyqus{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -55%);width:24%;max-height:70px}.slider-number.svelte-zkyqus{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -135%);width:24%;color:white;font-weight:500;font-size:0.38rem}.text-left.svelte-zkyqus{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.5rem;color:#09341F80}.text-middle.svelte-zkyqus{position:absolute;height:15%;top:62%;left:35%;display:flex;align-items:center;justify-content:center;font-size:0.5rem;color:#09341F80}.text-right.svelte-zkyqus{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.5rem;color:#09341F80}.slider-triangle.svelte-zkyqus{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -105%);width:24%}")}function X(o){let i,e,n,y,g,m,d,z,h,q,x,S,k=W(o[2],o[1])+"",$,b,s,l,B,j,L,P,D,R=o[0]==="shield"||o[0]==="youth"||o[0]==="median"?"Suboptimal":"Optimal",I,Q,N,T,G,_=o[0]==="shield"||o[0]==="youth"||o[0]==="median"?"Optimal":"Suboptimal",J;function U(r,F){if(r[0]==="mature"||r[0]==="lifestyle")return ne;if(r[0]==="shield"||r[0]==="youth"||r[0]==="median")return ce}let A=U(o),w=A&&A(o);return{c(){i=u("div"),e=u("div"),w&&w.c(),n=f(),y=u("div"),g=E("svg"),m=E("rect"),z=f(),h=u("div"),q=u("b"),x=O(o[2]),S=u("sup"),$=O(k),b=O(" percentile"),s=f(),l=u("div"),B=E("svg"),j=E("path"),P=f(),D=u("div"),I=O(R),Q=f(),N=u("div"),N.textContent="Average",T=f(),G=u("div"),J=O(_),t(m,"width","100"),t(m,"height","24"),t(m,"rx","4"),t(m,"fill",d=o[0]==="shield"||o[0]==="youth"||o[0]==="median"?Z(o[2]):H(o[2])),t(g,"width","60"),t(g,"height","24"),t(g,"viewBox","0 0 100 24"),t(g,"fill","none"),t(g,"xmlns","http://www.w3.org/2000/svg"),t(y,"class","slider svelte-zkyqus"),v(y,"left",C(o[2])+"%"),t(h,"class","slider-number svelte-zkyqus"),v(h,"left",C(o[2])+"%"),t(j,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),t(j,"fill",L=o[0]==="shield"||o[0]==="youth"||o[0]==="median"?Z(o[2]):H(o[2])),t(B,"width","9"),t(B,"height","5"),t(B,"viewBox","0 0 12 8"),t(B,"fill","none"),t(B,"xmlns","http://www.w3.org/2000/svg"),t(l,"class","slider-triangle svelte-zkyqus"),v(l,"left",C(o[2])+"%"),t(D,"class","text-left svelte-zkyqus"),v(D,"width","34.7%"),t(N,"class","text-middle svelte-zkyqus"),v(N,"width","29.5%"),t(G,"class","text-right svelte-zkyqus"),v(G,"width","34.7%"),t(e,"class","graph-container svelte-zkyqus"),t(i,"class","graph svelte-zkyqus")},m(r,F){a(r,i,F),p(i,e),w&&w.m(e,null),p(e,n),p(e,y),p(y,g),p(g,m),p(e,z),p(e,h),p(h,q),p(q,x),p(q,S),p(S,$),p(q,b),p(e,s),p(e,l),p(l,B),p(B,j),p(e,P),p(e,D),p(D,I),p(e,Q),p(e,N),p(e,T),p(e,G),p(G,J)},p(r,F){A!==(A=U(r))&&(w&&w.d(1),w=A&&A(r),w&&(w.c(),w.m(e,n))),F&5&&d!==(d=r[0]==="shield"||r[0]==="youth"||r[0]==="median"?Z(r[2]):H(r[2]))&&t(m,"fill",d),F&4&&v(y,"left",C(r[2])+"%"),F&4&&M(x,r[2]),F&6&&k!==(k=W(r[2],r[1])+"")&&M($,k),F&4&&v(h,"left",C(r[2])+"%"),F&5&&L!==(L=r[0]==="shield"||r[0]==="youth"||r[0]==="median"?Z(r[2]):H(r[2]))&&t(j,"fill",L),F&4&&v(l,"left",C(r[2])+"%"),F&1&&R!==(R=r[0]==="shield"||r[0]==="youth"||r[0]==="median"?"Suboptimal":"Optimal")&&M(I,R),F&1&&_!==(_=r[0]==="shield"||r[0]==="youth"||r[0]==="median"?"Optimal":"Suboptimal")&&M(J,_)},d(r){r&&c(i),w&&w.d()}}}function ce(o){let i,e,n,y,g,m,d,z,h,q,x,S,k,$,b;return{c(){i=u("div"),e=f(),n=u("div"),y=f(),g=u("div"),m=f(),d=u("div"),z=f(),h=u("div"),q=f(),x=u("div"),S=f(),k=u("div"),$=f(),b=u("div"),t(i,"class","colorBoxShort svelte-zkyqus"),v(i,"background-color","#DF2120"),t(n,"class","colorBox svelte-zkyqus"),v(n,"background-color","#DF2120"),t(g,"class","colorBox svelte-zkyqus"),v(g,"background-color","#F2800D"),t(d,"class","colorBox svelte-zkyqus"),v(d,"background-color","#66CCAA"),t(h,"class","colorBox svelte-zkyqus"),v(h,"background-color","#66CCAA"),t(x,"class","colorBox svelte-zkyqus"),v(x,"background-color","#13A195"),t(k,"class","colorBox svelte-zkyqus"),v(k,"background-color","#015566"),t(b,"class","colorBoxShort svelte-zkyqus"),v(b,"background-color","#015566")},m(s,l){a(s,i,l),a(s,e,l),a(s,n,l),a(s,y,l),a(s,g,l),a(s,m,l),a(s,d,l),a(s,z,l),a(s,h,l),a(s,q,l),a(s,x,l),a(s,S,l),a(s,k,l),a(s,$,l),a(s,b,l)},d(s){s&&(c(i),c(e),c(n),c(y),c(g),c(m),c(d),c(z),c(h),c(q),c(x),c(S),c(k),c($),c(b))}}}function ne(o){let i,e,n,y,g,m,d,z,h,q,x,S,k,$,b;return{c(){i=u("div"),e=f(),n=u("div"),y=f(),g=u("div"),m=f(),d=u("div"),z=f(),h=u("div"),q=f(),x=u("div"),S=f(),k=u("div"),$=f(),b=u("div"),t(i,"class","colorBoxShort svelte-zkyqus"),v(i,"background-color","#015566"),t(n,"class","colorBox svelte-zkyqus"),v(n,"background-color","#015566"),t(g,"class","colorBox svelte-zkyqus"),v(g,"background-color","#13A195"),t(d,"class","colorBox svelte-zkyqus"),v(d,"background-color","#66CCAA"),t(h,"class","colorBox svelte-zkyqus"),v(h,"background-color","#66CCAA"),t(x,"class","colorBox svelte-zkyqus"),v(x,"background-color","#F2800D"),t(k,"class","colorBox svelte-zkyqus"),v(k,"background-color","#DF2120"),t(b,"class","colorBoxShort svelte-zkyqus"),v(b,"background-color","#DF2120")},m(s,l){a(s,i,l),a(s,e,l),a(s,n,l),a(s,y,l),a(s,g,l),a(s,m,l),a(s,d,l),a(s,z,l),a(s,h,l),a(s,q,l),a(s,x,l),a(s,S,l),a(s,k,l),a(s,$,l),a(s,b,l)},d(s){s&&(c(i),c(e),c(n),c(y),c(g),c(m),c(d),c(z),c(h),c(q),c(x),c(S),c(k),c($),c(b))}}}function de(o){let i,e=o[3]&&X(o);return{c(){e&&e.c(),i=oe()},m(n,y){e&&e.m(n,y),a(n,i,y)},p(n,[y]){n[3]?e?e.p(n,y):(e=X(n),e.c(),e.m(i.parentNode,i)):e&&(e.d(1),e=null)},i:V,o:V,d(n){n&&c(i),e&&e.d(n)}}}function ue(o,i,e){let{type:n}=i,{lang:y}=i,{service:g=window.GaReportService}=i,m,d=0,z=!1;return re(async()=>{switch(m=await g.getReport(),n){case"shield":e(2,d=Number(m.Spercentile));break;case"youth":e(2,d=Number(m.G2percentile));break;case"mature":e(2,d=Number(m.G0percentile));break;case"median":e(2,d=Number(m.G1percentile));break;case"lifestyle":e(2,d=Number(m.Bpercentile))}(d===100||d===0)&&e(2,d=d===100?99:1),e(3,z=!0)}),o.$$set=h=>{"type"in h&&e(0,n=h.type),"lang"in h&&e(1,y=h.lang),"service"in h&&e(4,g=h.service)},[n,y,d,z,g]}class Y extends te{constructor(i){super(),se(this,i,ue,de,le,{type:0,lang:1,service:4},ae)}get type(){return this.$$.ctx[0]}set type(i){this.$$set({type:i}),K()}get lang(){return this.$$.ctx[1]}set lang(i){this.$$set({lang:i}),K()}get service(){return this.$$.ctx[4]}set service(i){this.$$set({service:i}),K()}}customElements.define("ga-single-overview-custom-clinical",ee(Y,{type:{},lang:{},service:{}},[],[],!0));export{Y as default};
|