1"use strict";(self["webpackChunkcustomer_portal"]=self["webpackChunkcustomer_portal"]||[]).push([[3558],{1435:function(e,t,n){n.d(t,{O:function(){return l}});n(44114);var a=n(56768),i=n(90144),r=n(78626),s=n(50973),o=n(69361);function l(e,t,n){const l=(0,s.rd)(),u=(0,a.EW)((()=>e.categories)),c=(0,a.EW)((()=>e.subCategories)),d=(0,a.EW)((()=>e.patientDetails)),g=(0,a.EW)((()=>e.loading)),y=(0,i.KR)({}),h=(0,i.KR)(0),m=(0,i.KR)(0),p=(0,i.KR)(""),_=(0,i.KR)(!0);(0,a.wB)(h,(async e=>{e&&"0"!==e&&await v()})),(0,a.wB)(m,(e=>{e&&"0"!==e&&C()}));const v=async()=>{try{if(m.value=0,e.subCategories=[],0!==h.value){await e.setGeneticSubCategories(h.value);const t=u.value.find((e=>e._slug===h.value))?.category_name;t&&w("Sub Category - "+t),c.value.length>0&&(m.value=c.value[0]._slug)}}catch(t){console.error(t)}},C=()=>{if(y.value={good:[],typical:[],poor:[]},0!==m.value){const t=c.value.find((e=>e._slug===m.value));if(!t)return;if(e.selectedSubCategory={...t},d.value?.geneticTest?.result?.results)for(let e of d.value.geneticTest.result.results)if(e.subcategory_id===m.value){let n=t.geneticTraits.find((t=>t._slug===e.trait_id));if(!n)continue;"Good"===e.interpretation?y.value.good.push(n):"Typical"===e.interpretation?y.value.typical.push(n):"Poor"===e.interpretation&&y.value.poor.push(n)}const n=Math.max(y.value.good.length,y.value.typical.length,y.value.poor.length);y.value.good.length=n,y.value.typical.length=n,y.value.poor.length=n,_.value=!1}},f=async()=>{try{if(e.startLoading(),e.subCategories=[],(0,r.isEmpty)(d.value))try{const t=await(0,o.kb)();e.patientDetails=t}catch(t){console.error("Error fetching patient:",t)}u.value.length>0&&(h.value=u.value[0]._slug)}catch(t){console.error(t)}finally{e.endLoading()}},b=t=>{e.selectedTrait=t,e.componentToDisplay="all-report-genetic-trait-details",l.push({name:n,params:{category:h.value}})},w=async e=>{try{const n=await t(e);(0,r.isEmpty)(n.data?.data?.CommonModels?.items)?p.value="<p>Please select Category and Sub-category</p>":p.value=n.data.data.CommonModels.items[0].text}catch(n){console.error("Error fetching chatbox text:",n),p.value="<p>Please select Category and Sub-category</p>"}};return(0,a.sV)((()=>{w("Select Category")})),{categories:u,subCategories:c,patientDetails:d,loading:g,details:y,categoryId:h,subCategoryId:m,chatBoxText:p,showChatbox:_,getSubCategories:v,getTraitDetails:C,initializeData:f,redirectToCategory:b,getChatBoxTextByHeading:w}}},20855:function(e,t,n){n.d(t,{$d:function(){return s},n7:function(){return o},sg:function(){return r}});var a=n(94373);const{VUE_APP_PREPR_API:i}={VUE_APP_PREPR_API:"https://graphql.prepr.io/ac_e929192c75d84f995e91acc7ea2267ec9f934afa8d0b79798c0db13ea23210c2"};async function r(e){const t=await(0,a.A)({url:i,method:"post",data:{query:"\n query Genes($where: GeneWhereInput) {\n Genes(where: $where, limit: 500) {\n items {\n id\n description\n name\n }\n }\n }\n ",variables:{where:{name:e}}}});if(t.data.data?.Genes)return t.data.data.Genes.items[0];console.log("couln't find the gene")}function s(e,t){return e.map((e=>{const n=t.find((t=>t.trait_id===e._slug));return{...e,...n}}))}function o(e){return(0,a.A)({url:i,method:"post",data:{query:"\n query Items($where: CommonModelWhereInput) {\n CommonModels(where: $where) {\n items {\n title\n text\n heading\n _slug\n _id\n }\n }\n }\n ",variables:{where:{heading:e}}}})}},52331:function(e,t,n){n.d(t,{$d:function(){return u},SC:function(){return r},Wm:function(){return l},kC:function(){return o},n7:function(){return c},sg:function(){return s}});var a=n(94373);const{VUE_APP_PREPR_API:i}={VUE_APP_PREPR_API:"https://graphql.prepr.io/ac_e929192c75d84f995e91acc7ea2267ec9f934afa8d0b79798c0db13ea23210c2"};function r(e){return(0,a.A)({url:i,method:"post",data:{query:`\n {\n GeneticTraits ( where : { trait_subcategory: { _slug_any : ["${e}"] } }, limit: 500 ) {\n items {\n _slug\n header_image {\n url\n }\n trait_name\n trait_subcategory {\n name\n _id\n _slug\n category {\n category_image {\n url\n }\n thumbnail_image {\n url\n }\n _slug\n id\n category_name\n key_product {\n _id\n }\n numeric_results\n }\n }\n trait_icon {\n url\n }\n medical_review_icon {\n url\n }\n report_author {\n name\n biography\n photos {\n url\n }\n }\n what_is_header\n what_is_body\n symptoms_header\n symptoms_body\n tips_tricks\n the_science_header\n limitations_header\n limitations_body\n references {\n name\n url\n }\n }\n }\n }\n `}})}async function s(e){const t=await(0,a.A)({url:i,method:"post",data:{query:"\n query Genes($where: GeneWhereInput) {\n Genes(where: $where, limit: 500) {\n items {\n id\n description\n name\n }\n }\n }\n ",variables:{where:{name:e}}}});if(t.data.data?.Genes)return t.data.data.Genes.items[0];console.log("couln't find the gene")}async function o(e){const t=await(0,a.A)({url:i,method:"post",data:{query:"\n query Items($where: GeneticCategoryWhereInput) {\n GeneticCategories(where: $where, limit: 500) {\n items {\n _slug\n category_name\n description\n id\n category_image {\n url\n }\n thumbnail_image {\n url\n }\n key_product {\n _id\n }\n }\n }\n }\n ",variables:{where:{_slug_any:e,_publish_on_lte:(new Date).toISOString()}}}});return t.data?.data?.GeneticCategories?.items??[]}function l(e){return(0,a.A)({url:i,method:"post",data:{query:`\n {\n GeneticSubcategories ( where : { category: { _slug_any : ["${e}"] } }, limit: 500 ) {\n items {\n _id\n _slug\n name\n }\n }\n }\n `}})}function u(e,t){return e.map((e=>{const n=t.find((t=>t.trait_id===e._slug));return{...e,...n}}))}function c(e){return(0,a.A)({url:i,method:"post",data:{query:"\n query Items($where: CommonModelWhereInput) {\n CommonModels(where: $where) {\n items {\n title\n text\n heading\n _slug\n _id\n }\n }\n }\n ",variables:{where:{heading:e}}}})}},52536:function(e,t,n){n.d(t,{t:function(){return s}});n(44114);var a=n(92261),i=n(52331),r=n(78626);const s=(0,a.nY)("genetics",{state:()=>({categories:[],currentCategory:{},subCategories:[],selectedSubCategory:{},selectedTrait:{},patientDetails:{},loading:[],componentToDisplay:""}),actions:{async setGeneticCategories(){try{this.startLoading();const e=await(0,i.kC)([]);this.categories=e.filter((e=>"Dermatology"!==e.category_name)).sort(((e,t)=>"Personality Traits"===e.category_name?-1:"Personality Traits"===t.category_name?1:0))}catch(e){console.log(e)}finally{this.endLoading()}},async setGeneticSubCategories(e){try{if(this.startLoading(),this.currentCategory._slug!==e){if(this.currentCategory=this.categories.find((t=>t._slug==e)),this.currentCategory.subCategories)this.subCategories=this.currentCategory.subCategories;else{const t=await(0,i.Wm)(e);this.subCategories=t.data.data.GeneticSubcategories.items;for(let e of this.subCategories){let t=await(0,i.SC)(e._slug);e.geneticTraits=t.data.data.GeneticTraits.items}this.currentCategory.subCategories=this.subCategories}this.selectedSubCategory=this.subCategories[0]}}catch(t){console.log(t)}finally{this.endLoading()}},async setGeneticTrait(e){if(e)for(let t of this.subCategories){let n=t.geneticTraits.find((t=>t._slug===e));if(!(0,r.isEmpty)(n)){this.selectedTrait=n;break}}},async startLoading(){this.loading.push(!0)},async endLoading(){this.loading.pop()}}})},73558:function(e,t,n){n.r(t),n.d(t,{default:function(){return j}});var a=n(56768),i=n(90144),r=n(24232),s=n(45130),o=n(77519),l=n(52536),u=n(20855),c=n(1435);const d={key:0,class:"container-fluid"},g={class:"box-content bg-white rounded-4 p-0"},y={class:"row relative d-flex align-items-end"},h={class:"col-md-8 text-start"},m={class:"p-4"},p=(0,a.Lk)("h2",{class:"mb-4 mt-2"},"All Health Reports",-1),_=(0,a.Lk)("p",{class:"w-75"}," Your genetic results are categorised for easy selection, as you've ordered a part screen with medical review, once your consultation is complete you will gain access to medically reviewed traits. ",-1),v={class:"row mb-2"},C={class:"col-md-6"},f=(0,a.Lk)("label",{for:"category",class:"fs-14"},"Select Category:",-1),b=(0,a.Lk)("option",{value:"0"},"Select",-1),w=["value"],k={class:"col-md-6"},E=(0,a.Lk)("label",{for:"subcategory",class:"fs-14"},"Select Sub-Category:",-1),L=(0,a.Lk)("option",{value:"0"},"Select",-1),P=["value"],R={class:"col-md-4 hidden text-end relative"},x={class:"px-4"},T=["innerHTML"],I=(0,a.Lk)("img",{src:o,alt:"view",class:"chatbox-img"}
1,null,-1),G={key:0,class:"bg-white my-4 rounded-4 p-4"},A={class:"row"},S={class:"col-md-4 my-2"},X={class:"rounded-4 border overflow-hidden"},$=(0,a.Lk)("div",{class:"heading bg-good text-white p-3"},"Good",-1),D={key:0},q=["onClick"],W={class:"col-md-4 my-2"},K={class:"rounded-4 border overflow-hidden"},V=(0,a.Lk)("div",{class:"heading bg-typical text-white p-3"},"Typical",-1),M={key:0},U=["onClick"],B={class:"col-md-4 my-2"},F={class:"rounded-4 border overflow-hidden"},H=(0,a.Lk)("div",{class:"heading bg-poor text-white p-3"},"Poor",-1),O={key:0},Q=["onClick"];var z={__name:"EpigeneticsAllReports",setup(e){const t=(0,l.t)(),{categories:n,subCategories:o,patientDetails:z,loading:Y,details:j,categoryId:J,subCategoryId:N,chatBoxText:Z,showChatbox:ee,getTraitDetails:te,initializeData:ne,redirectToCategory:ae}=(0,c.O)(t,u.n7,"epigenetics-category");return(0,a.sV)((async()=>{await ne()})),(e,t)=>(0,i.R1)(Y).length?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("div",d,[(0,a.Lk)("div",g,[(0,a.Lk)("div",y,[(0,a.Lk)("div",h,[(0,a.Lk)("div",m,[p,_,(0,a.Lk)("div",v,[(0,a.Lk)("div",C,[f,(0,a.bo)((0,a.Lk)("select",{class:"form-control",id:"category","onUpdate:modelValue":t[0]||(t[0]=e=>(0,i.i9)(J)?J.value=e:null)},[b,((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)((0,i.R1)(n),(e=>((0,a.uX)(),(0,a.CE)("option",{value:e._slug,key:e._slug},(0,r.v_)(e.category_name),9,w)))),128))],512),[[s.u1,(0,i.R1)(J)]])]),(0,a.Lk)("div",k,[E,(0,a.bo)((0,a.Lk)("select",{class:"form-control",id:"subcategory","onUpdate:modelValue":t[1]||(t[1]=e=>(0,i.i9)(N)?N.value=e:null),onChange:t[2]||(t[2]=(...e)=>(0,i.R1)(te)&&(0,i.R1)(te)(...e))},[L,((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)((0,i.R1)(o),(e=>((0,a.uX)(),(0,a.CE)("option",{value:e._slug,key:e._slug},(0,r.v_)(e.name),9,P)))),128))],544),[[s.u1,(0,i.R1)(N)]])])])])]),(0,a.Lk)("div",R,[(0,a.Lk)("div",x,[(0,i.R1)(ee)?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"chatbox rounded-2 p-2",innerHTML:(0,i.R1)(Z)},null,8,T)):(0,a.Q3)("",!0),I])])])]),0!==(0,i.R1)(N)?((0,a.uX)(),(0,a.CE)("div",G,[(0,a.Lk)("div",A,[(0,a.Lk)("div",S,[(0,a.Lk)("div",X,[$,((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)((0,i.R1)(j).good,(e=>((0,a.uX)(),(0,a.CE)("div",{class:"p-3 border border-1",key:e},[e?((0,a.uX)(),(0,a.CE)("div",{key:1,class:"traits text-start cursor-pointer",onClick:t=>(0,i.R1)(ae)(e)},(0,r.v_)(e.trait_name),9,q)):((0,a.uX)(),(0,a.CE)("span",D,"-"))])))),128))])]),(0,a.Lk)("div",W,[(0,a.Lk)("div",K,[V,((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)((0,i.R1)(j).typical,(e=>((0,a.uX)(),(0,a.CE)("div",{class:"p-3 border border-1",key:e},[e?((0,a.uX)(),(0,a.CE)("div",{key:1,class:"traits text-start cursor-pointer",onClick:t=>(0,i.R1)(ae)(e)},(0,r.v_)(e.trait_name),9,U)):((0,a.uX)(),(0,a.CE)("span",M,"-"))])))),128))])]),(0,a.Lk)("div",B,[(0,a.Lk)("div",F,[H,((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)((0,i.R1)(j).poor,(e=>((0,a.uX)(),(0,a.CE)("div",{class:"p-3 border border-1",key:e},[e?((0,a.uX)(),(0,a.CE)("div",{key:1,class:"traits text-start cursor-pointer",onClick:t=>(0,i.R1)(ae)(e)},(0,r.v_)(e.trait_name),9,Q)):((0,a.uX)(),(0,a.CE)("span",O,"-"))])))),128))])])])])):(0,a.Q3)("",!0)]))}};const Y=z;var j=Y},77519:function(e,t,n){e.exports=n.p+"img/doctor.37657b0a.svg"}}]); 2//# sourceMappingURL=3558.8592794a.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.