1"use strict";(self.webpackChunkforth_platform=self.webpackChunkforth_platform||[]).push([[3021],{88858:(e,s,a)=>{a.r(s),a.d(s,{default:()=>_s});var r=a(72791),t=a(60364),o=a(91523),l=a(64880),i=a(72426),n=a.n(i),d=a(39426),c=a(46431),m=a.n(c),h=a(9806),p=a(20508),u=a(80184);class x extends r.Component{constructor(e){super(e),this.state={whiteBg:e.whiteBg},this.chartRef=r.createRef()}componentDidMount(){setTimeout(()=>{const e=this.chartRef.current.toBase64Image();this.props.getBase64Images("formScore",e)},1e3)}render(){const e=this.props.cycleStartDate,s=this.props.formScore;var a=s-100;if(0==this.state.whiteBg||void 0==this.state.whiteBg)var r="#FFFFFF";else r="#F0F2F3";let t={labels:["Red","notRed"],datasets:[{data:[s,a],backgroundColor:["#756ECD",r],hoverBackgroundColor:["#756ECD","#FFFFFF"]}],text:s},o={responsive:!0,maintainAspectRatio:!1,elements:{center:{display:!0,text:s,color:"black",sidePadding:20,minFontSize:25,lineHeight:25}},plugins:{title:{display:!1},legend:{display:!1},tooltip:{enabled:!1}},cutoutPercentage:60},l=[{afterDraw:function(e,s,a){const r=e.ctx,t=e.width,o=e.height,l=(o/60).toFixed(2);r.font=l+"em Verdana",r.textBaseline="middle",r.fillStyle="#000000";const i=e.data.datasets[0].data[0],n=Math.round((t-r.measureText(i).width)/2),d=o/2;r.fillText(i,n,d)}}];return(0,u.jsxs)("section",{id:"formScore",children:[(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsx)("div",{className:"col-12 col-md-12",children:(0,u.jsxs)("div",{id:"latestHormonesChart",className:"card border-0",children:[(0,u.jsx)("button",{"data-bs-toggle":"modal","data-bs-target":"#about_form_score",id:"infoButton",children:(0,u.jsx)(h.G,{icon:p.sq,size:"xs"})}),(0,u.jsx)("div",{className:1==this.state.whiteBg?"card-horizontal reportWhite":"card-horizontal",children:(0,u.jsx)("div",{className:"card-body align-self-center ",children:(0,u.jsxs)("div",{className:"row align-items-center",children:[(0,u.jsxs)("div",{className:"col-6 text-center",children:[(0,u.jsx)("h4",{className:"card-title mb-0 pb-0 lead",children:(0,u.jsx)("strong",{children:"FORM SCORE"})}),(0,u.jsxs)("p",{className:"card-text font-weight-lighter",children:["Cycle starting ",(0,u.jsx)(m(),{format:"DD/MM/YYYY",children:e})]})]}),(0,u.jsx)("div",{className:"col-6",children:(0,u.jsx)("div",{className:"formScoreChart",children:(0,u.jsx)(d.$I,{id:"hormoneDoughnut",options:o,data:t,plugins:l,ref:this.chartRef})})})]})})})]})})}),(0,u.jsx)("div",{className:"modal bottom fade ",id:"about_form_score",tabIndex:"-1",role:"dialog","aria-labelledby":"about_form_score",children:(0,u.jsx)("div",{className:"modal-dialog smallCopyAmount modal-dialog-centered",role:"document",children:(0,u.jsxs)("div",{className:"modal-content",children:[(0,u.jsxs)("div",{className:"modal-header",children:[(0,u.jsx)("button",{type:"button",className:"close","data-bs-dismiss":"modal","aria-label":"Close",children:"Close"}),(0,u.jsx)("h5",{className:"modal-title text-center text-capitalize",children:"What is FORM score?"})]}),(0,u.jsx)("div",{className:"modal-body text-center",children:(0,u.jsx)("div",{className:"container-fluid",children:(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsxs)("div",{className:"text-start",children:[(0,u.jsx)("p",{children:"The Forth Ovarian Responsiveness Metric (FORM) is unique to our female mapping product and provides an innovative quantitative assessment of your menstrual cycle hormone network. It measures how effectively your ovarian hormones, progesterone and oestradiol, responded to stimulus provided by your control hormones FSH (Follicle Stimulating Hormone) and LH (Luteinising Hormone), over your current cycle."}),(0,u.jsx)("p",{children:"Whilst a single score can provide a real time assessment of a particular menstrual cycle, the real value of the FORM score comes with the progression of results over a number of cycles and can be used by woman to track changes in their ovarian responsiveness throughout their \u2018menstrual\u2019 life as they enter different lifestages."}),(0,u.jsx)("p",{children:"Your FORM score is presented as a number between 0-100% and is mathematically calculated using the results of all 8 samples you have provided. Women under the age of 40 should expect to see a FORM score over 75% reflecting a healthy interaction between the pituitary control hormones and ovarian response hormones over the menstrual cycle. A lower, mid-range score might be due to reduced production of ovarian hormones (oestradiol and progesterone), most likely due to lower levels of the control hormones (FSH and LH) over the cycle. This situation can sometimes be due to external factors and behaviours which can be both transient and reversible."}),(0,u.jsx)("p",{children:"For women over the age of 40, the FORM score can be expected to go down over time as the ovarian response declines. This reflects the normal physiological change in the control hormones FSH and LH becoming consistently higher than expected and concurrently ovarian hormones Oestradiol and Progesterone becoming consistently low, over the entire cycle. For women over 40, tracking the FORM score every three to six months, alongside any associated symptoms, can therefore help to give confirmation of the onset of the perimenopause, the speed at which you are transitioning towards menopause, as well as help in making informed decisions regarding HRT."}),(0,u.jsx)("p",{children:"Whenever a lower-than-expected FORM score is recorded, it is always advisable to gain a deeper understanding of your unique hormone profile by repeating Female Hormone Mapping. This will establish any on-going trend, or whether this FORM score was merely a variation for this particular cycle. This is in line with best clinical practice for any unexpected result, especially with regard to hormones."})]})})})})]})})})]})}}class g extends r.Component{render(){const e=this.props.cycleStartDate,
1s=this.props.formScore,a=(this.props.commentaryHeader,this.props.commentaryFormComment);return(0,u.jsx)("section",{id:"formReport",className:"box box-shadow reportWhite p-3 p-md-4",children:(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsxs)("div",{className:"col-md-12",children:[(0,u.jsx)("div",{className:"row justify-content-center align-items-center",children:(0,u.jsx)("div",{className:"col-12 col-lg-7",children:(0,u.jsx)(x,{formScore:s,cycleStartDate:e,whiteBg:0,getBase64Images:this.props.getBase64Images})})}),(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsxs)("div",{className:"col-12 col-lg-10 mt-4 text-center",children:[(0,u.jsx)("p",{dangerouslySetInnerHTML:{__html:a}}),(0,u.jsx)("a",{"data-bs-toggle":"modal","data-bs-target":"#about_form_score",children:"More about FORM score"})]})})]})})})}}class v extends r.Component{render(){const e=this.props.title,s=this.props.value;return(0,u.jsxs)("div",{className:"largeTablet my-4",children:[(0,u.jsx)("div",{className:"title align-middle",children:e}),(0,u.jsx)("div",{className:"score align-middle",children:(0,u.jsx)("div",{className:"value",children:s})})]})}}class b extends r.Component{render(){const e=this.props.cycleLength,s=this.props.commentaryCycle;var a=e+" Days";const r=this.props.warning;var t=!1;return""!=r&&"Null"!=r&&r||(t=!0),(0,u.jsx)("section",{id:"cycleLength",className:"box box-shadow reportWhite mt-4 p-3",children:(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsxs)("div",{className:"col-lg-10",children:[t&&(0,u.jsx)(v,{title:"Cycle length",value:a}),(0,u.jsx)("div",{className:"row row-eq-height align-items-center",children:(0,u.jsx)("div",{className:"col-12 text-center",children:(0,u.jsx)("p",{children:s})})})]})})})}}class y extends r.Component{render(){const e=this.props.estimatedLHSurge,s=this.props.commentaryLhSurge,a=this.props.warning;var r="Day "+e,t=!1;return""!=a&&"Null"!=a&&a||(t=!0),(0,u.jsx)("section",{id:"cycleLength",className:"box box-shadow reportWhite mt-4 p-3 pb-auto",children:(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsxs)("div",{className:"col-lg-10",children:[t&&(0,u.jsx)(v,{title:"LH Surge",value:r}),(0,u.jsx)("div",{className:"row justify-content-center row-eq-height align-items-center",children:(0,u.jsx)("div",{className:"col-12 text-center",children:(0,u.jsx)("p",{className:"h-100",dangerouslySetInnerHTML:{__html:s}})})})]})})})}}class j extends r.Component{render(){const e=this.props.sample1Day,s=this.props.sample1Result,a=this.props.sample2Day,r=this.props.sample2Result,t=this.props.day1Status,o=this.props.day2Status;return(0,u.jsxs)("div",{className:"row row-eq-height g-0 justify-content-center align-items-center",children:[(0,u.jsx)("div",{className:"d-inline-grid col-6 align-self-stretch pe-1",children:(0,u.jsx)("div",{className:"sampleResult py-2 py-md-4 px-1 px-md-5",children:(0,u.jsxs)("div",{className:"row align-items-center g-0",children:[(0,u.jsxs)("div",{className:"col-6 text-center",children:[(0,u.jsx)("div",{className:"dayText",children:"DAY"})," ",(0,u.jsx)("div",{className:"dayValueOne",children:e})]}),(0,u.jsxs)("div",{className:"col-6 text-start",children:[(0,u.jsx)("div",{className:"resultValue",children:s}),(0,u.jsx)("div",{className:"resultRange",children:t})]})]})})}),(0,u.jsx)("div",{className:"d-inline-grid col-6 align-self-stretch ps-1",children:(0,u.jsx)("div",{className:"sampleResult py-2 py-md-4 px-1 px-md-5",children:(0,u.jsxs)("div",{className:"row align-items-center g-0",children:[(0,u.jsxs)("div",{className:"col-6 text-center",children:[(0,u.jsx)("div",{className:"dayText",children:"DAY"})," ",(0,u.jsx)("div",{className:"dayValueTwo",children:(0,u.jsx)("div",{className:"dayValueTwo-inner",children:a})})]}),(0,u.jsxs)("div",{className:"col-6 text-start",children:[(0,u.jsx)("div",{className:"resultValue",children:r}),(0,u.jsx)("div",{className:"resultRange",children:o})]})]})})})]})}}a(9366);class f extends r.Component{constructor(e){super(e),this.state={screenWidth:""},this.updateScreenWidth=this.updateScreenWidth.bind(this),this.chartRef=r.createRef()}componentDidMount(){this.updateScreenWidth(),window.addEventListener("resize",this.updateScreenWidth),setTimeout(()=>{const e=this.chartRef.current.toBase64Image();this.props.getBase64Images(this.props.marker,e)},1e3)}componentWillUnmount(){window.removeEventListener("resize",this.updateScreenWidth)}updateScreenWidth(){this.setState({screenWidth:window.innerWidth})}render(){var e=this.props.bottomCurve.slice(0,-1),s=this.props.meanCurve.slice(0,-1),a=this.props.personalCurve.slice(0,-1),r=this.props.topCurve.slice(0,-1);const t=this.props.marker;var o=new Array,l=[];o=r.split(",");for(var i=0;i<o.length;
1i++)l.push(o[i]);var n=[];o=e.split(",");for(i=0;i<o.length;i++)n.push(o[i]);var c=[];o=s.split(",");for(i=0;i<o.length;i++)c.push(o[i]);var m=[];o=a.split(",");for(i=0;i<o.length;i++)m.push(o[i]);for(var h=m.length,p=[],x=[],g=[],v=0;v<h;v+=1)0!=v&&v%7&&v!=h?p.push(""):p.push(""+v),13==v?x.push(1.67):x.push(null),22==v?g.push(21):g.push(null);var b=21;"LH"==t&&(b=11),this.state.screenWidth>=992&&(b=21,"LH"==t&&(b=11)),this.state.screenWidth<992&&this.state.screenWidth>768&&(b=21,"LH"==t&&(b=11)),this.state.screenWidth<576&&(b=12,"LH"==t&&(b=9));const y={labels:p,datasets:[{label:"Average",data:c,fill:!1,backgroundColor:"#f9c19b",borderColor:"#f9c19b",borderWidth:1},{label:"Low",backgroundColor:"#EF94DD",borderColor:"#EF94DD",fill:!1,borderDash:[5,5],data:n,borderWidth:1},{label:"High",backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",fill:!1,borderDash:[5,5],data:l,borderWidth:1},{label:"Personal Curve",data:m,fill:!1,borderWidth:b,pointBorderWidth:1,borderColor:"#d8edef",backgroundColor:"#d8edef"}]};var j={responsive:!0,maintainAspectRatio:!1,animation:{onComplete:function(e){}},plugins:{legend:{display:!1},title:{display:!1}},elements:{point:{radius:0}},tension:.3,scales:{x:{display:!0,backgroundColor:"#FFFFFF",title:{display:!0,text:"DAY",font:{size:10},color:"#b3b3b3"},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{autoSkip:!1,maxRotation:0,minRotation:0,min:0,max:31,stepSize:7,z:99999}},y:{display:!0,backgroundColor:"#FFFFFF",title:{display:!0,text:this.props.measurement,font:{size:10},color:"#b3b3b3"},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{scaleBeginAtZero:!1,beginAtZero:!1,min:0,suggestedMin:0,autoSkip:!1,maxRotation:0,minRotation:0,z:99999}}}};return(0,u.jsx)("div",{className:"row mt-4",children:(0,u.jsx)("div",{className:"col-12",children:(0,u.jsx)("div",{className:"hormoneLineChart",id:`${t}Chart`,children:(0,u.jsx)(d.x1,{id:"lineChart",data:y,options:j,ref:this.chartRef})})})})}}class N extends r.Component{render(){return(0,u.jsx)("div",{className:"row",children:(0,u.jsx)("div",{className:"col-12 mt-3",children:(0,u.jsx)("div",{className:"row align-items-center",children:(0,u.jsx)("div",{className:"col-12 text-center",children:(0,u.jsxs)("div",{id:"hormoneKeys",children:[(0,u.jsxs)("div",{className:"key high",children:[(0,u.jsx)("div",{className:"line align-middle me-1",children:(0,u.jsx)("hr",{})}),(0,u.jsx)("div",{className:"keyValue",children:"High"})]}),(0,u.jsxs)("div",{className:"key average",children:[(0,u.jsx)("div",{className:"line align-middle me-1",children:(0,u.jsx)("hr",{})}),(0,u.jsx)("div",{className:"keyValue",children:"Average"})]}),(0,u.jsxs)("div",{className:"key low",children:[(0,u.jsx)("div",{className:"line align-middle me-1",children:(0,u.jsx)("hr",{})}),(0,u.jsx)("div",{className:"keyValue",children:"Low"})]}),(0,u.jsxs)("div",{className:"key personalised",children:[(0,u.jsx)("div",{className:"line align-middle me-1",children:(0,u.jsx)("hr",{})}),(0,u.jsxs)("div",{className:"keyValue text-normal",children:["Your personalised curve (",this.props.cycleLength," days)"]})]})]})})})})})}}class C extends r.Component{render(){const e=this.props.title,s=this.props.value;return(0,u.jsxs)("div",{className:"smallTablet my-1",children:[(0,u.jsx)("div",{className:"title align-middle",children:e}),(0,u.jsx)("div",{className:"score align-middle",children:(0,u.jsx)("div",{className:"value",children:s})})]})}}a(46622);class w extends r.Component{render(){const e=this.props.sample1Day,s=this.props.sample2Day,a=this.props.sample1ProgesteroneResult,r=this.props.curveProgesteroneBottomPercentile,t=this.props.curveProgesteroneMean,o=this.props.curveProgesteronePersonal,l=this.props.curveProgesteroneTopPercentile,i=this.props.progesteroneUnits,n=this.props.sample1OestradiolResult,d=this.props.curveOestradiolBottomPercentile,c=this.props.curveOestradiolMean,m=this.props.curveOestradiolPersonal,x=this.props.curveOestradiolTopPercentile,g=this.props.sample2ProgesteroneResult,v=this.props.sample2OestradiolResult,b=this.props.commentaryProgesteroneCurve,y=this.props.commentaryOestradiolCurve,w=this.props.oestradiolUnits,F=this.props.cycleLength;var k=this.props.messagesOvulation;const S=this.props.commentaryOvarianHormones,R=this.props.sample1ProgesteroneStatus,D=this.props.sample2ProgesteroneStatus,P=this.props.sample1OestradiolStatus,B=this.props.sample2OestradiolStatus;return(0,u.jsxs)("section",{id:"ovarianHormoneTabs",className:"box box-shadow reportWhite mt-4 p-3 p-md-4",children:[(0,u.jsx)("div",{className:"row justify-content-center mt-4 mb-1",children:(0,u.jsxs)("div",{className:"col-12 col-md-9 text-center mb-2",children:[(0,u.jsx)("h2",{className:"text-uppercase",children:"Ovarian Hormones"}),(0,u.jsx)("p",{children:S})]})}),(0,u.jsx)("div",{className:"row justify-content-center m-lg-4 contentBorder",children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsx)("div",{className:"col-md-9",children:(0,u.jsxs)("ul",{className:"nav nav-tabs nav-fill negative-margin",id:"myTab",role:"tablist",children:[(0,u.jsx)("li",{className:"col-6
1nav-item px-0 position-relative",children:(0,u.jsx)("a",{className:"nav-link active",id:"Progesterone-tab","data-bs-toggle":"tab",href:"#Progesterone",role:"tab","aria-controls":"Progesterone","aria-selected":"true",children:"Progesterone"})}),(0,u.jsx)("li",{className:"col-6 nav-item px-0 position-relative",children:(0,u.jsx)("a",{className:"nav-link",id:"Oestradiol-tab","data-bs-toggle":"tab",href:"#Oestradiol",role:"tab","aria-controls":"Oestradiol","aria-selected":"false",children:"Oestradiol"})})]})})}),(0,u.jsxs)("div",{className:"tab-content mt-4",id:"myTabContent",children:[(0,u.jsxs)("div",{className:"tab-pane fade active show",id:"Progesterone",role:"tabpanel","aria-labelledby":"Progesterone-tab",children:[(0,u.jsx)("div",{className:"row justify-content-center row-eq-height align-items-center",children:(0,u.jsx)("div",{className:"col-12 col-md-12",children:(0,u.jsx)(j,{day1Status:R,day2Status:D,sample1Day:e,sample1Result:a,sample2Day:s,sample2Result:g})})}),(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)(f,{marker:"Progesterone",getBase64Images:this.props.getBase64Images,measurement:i,bottomCurve:r,meanCurve:t,personalCurve:o,topCurve:l}),(0,u.jsx)("div",{className:"row justify-content-center align-items-center mb-3 mt-0 mb-md-5 mt-md-3",children:(0,u.jsx)("div",{className:"col-12",children:(0,u.jsx)(N,{cycleLength:F})})}),(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsx)("div",{className:"col-md-9 text-center",children:(0,u.jsx)("p",{children:b})})}),(0,u.jsxs)("div",{className:"row d-flex flex-nowrap justify-content-center align-items-center mb-4",children:[(0,u.jsx)("div",{className:"ovulation-tablet",children:(0,u.jsx)(C,{title:"Ovulation",value:k})}),(0,u.jsx)("div",{className:"w-auto",children:(0,u.jsx)("button",{"data-bs-toggle":"modal","data-bs-target":"#ovulation_modal",id:"infoButton",children:(0,u.jsx)(h.G,{icon:p.sq,size:"xs"})})})]})]})})]}),(0,u.jsxs)("div",{className:1==this.props.imgsCollected?"tab-pane fade":"tab-pane fade active show",id:"Oestradiol",role:"tabpanel","aria-labelledby":"Oestradiol-tab",children:[(0,u.jsx)("div",{className:"row justify-content-center row-eq-height align-items-center",children:(0,u.jsx)("div",{className:"col-12 col-md-12",children:(0,u.jsx)(j,{day1Status:P,day2Status:B,sample1Day:e,sample1Result:n,sample2Day:s,sample2Result:v})})}),(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)(f,{getBase64Images:this.props.getBase64Images,marker:"Oestradiol",measurement:w,bottomCurve:d,meanCurve:c,personalCurve:m,topCurve:x}),(0,u.jsx)("div",{className:"row justify-content-center align-items-center mb-3 mt-0 mb-md-5 mt-md-3",children:(0,u.jsx)("div",{className:"col-12",children:(0,u.jsx)(N,{cycleLength:F})})}),(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsx)("div",{className:"col-md-9 text-center",children:(0,u.jsx)("p",{children:y})})}),(0,u.jsxs)("div",{className:"row justify-content-center align-items-center mb-4",children:[(0,u.jsx)("div",{className:"col-10 col-md-6",children:(0,u.jsx)(C,{title:"Ovulation",value:k})}),(0,u.jsx)("div",{className:"col-2 col-md-1",children:(0,u.jsx)("button",{"data-bs-toggle":"modal","data-bs-target":"#ovulation_modal",id:"infoButton",children:(0,u.jsx)(h.G,{icon:p.sq,size:"xs"})})})]})]})})]})]})]})}),(0,u.jsx)("div",{className:"modal bottom fade",id:"ovulation_modal",tabIndex:"-1",role:"dialog","aria-labelledby":"bottom_modal",children:(0,u.jsx)("div",{className:"modal-dialog modal-dialog-centered",role:"document",children:(0,u.jsxs)("div",{className:"modal-content",children:[(0,u.jsxs)("div",{className:"modal-header text-center",children:[(0,u.jsx)("button",{type:"button",className:"close","data-bs-dismiss":"modal","aria-label":"Close",children:"Close"}),(0,u.jsx)("h2",{className:"modal-title text-center text-capitalize",children:"Ovulation"})]}),(0,u.jsx)("div",{className:"modal-body text-center",children:(0,u.jsx)("div",{className:"container-fluid text-start",children:(0,u.jsx)("p",{children:"Ovulation is associated with the increase in progesterone in the luteal phase (second half) of the cycle. Usually, the likelihood of ovulation is based on the level of a single sample of this hormone on day 21, assuming an average cycle length of 29 days. However, as not every women has an average length cycle, our algorithm estimates what day your peak progesterone level falls for your individual cycle based on the information you have supplied and analysis of all of your results. If your estimated peak exceeds 30 nmol/l, then, ovulation is likely to have occurred, whereas a result below that level would suggest that ovulation was less likely. Please note that this threshold does not define a precise cut-off, but the further above or below this value, the more certain you can be as to whether ovulation has or has not occurred for this cycle."})})})]})})})]})}}class F extends r.Component{render(){const e=this.props.sample1Day,s=this.props.sample2Day,a=this.props.sample1LhResult,r=this.props.curveLhBottomPercentile,t=this.props.curveLhMean,o=this.props.curveLhPer
1sonal,l=this.props.curveLhTopPercentile,i=this.props.lhUnits,n=this.props.sample1FshResult,d=this.props.curveFshBottomPercentile,c=this.props.curveFshMean,m=this.props.curveFshPersonal,h=this.props.curveFshTopPercentile,p=this.props.sample2LhResult,x=this.props.sample2FshResult,g=this.props.commentaryFshCurve,v=this.props.commentaryLhCurve,b=this.props.fshUnits,y=this.props.cycleLength,C=this.props.commentaryControlHormones,w=this.props.sample1FshStatus,F=this.props.sample1LhStatus,k=this.props.sample2FshStatus,S=this.props.sample2LhStatus;return(0,u.jsxs)("section",{id:"controlHormoneTabs",className:"box box-shadow reportWhite mt-4 p-3 p-md-4",children:[(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsxs)("div",{className:"col-12 col-md-9 text-center",children:[(0,u.jsx)("h2",{className:"text-uppercase",children:"Control Hormones"}),(0,u.jsx)("p",{children:C})]})}),(0,u.jsx)("div",{className:"row justify-content-center m-lg-4 contentBorder",children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsx)("div",{className:"col-md-9",children:(0,u.jsxs)("ul",{className:"nav nav-tabs nav-fill negative-margin",id:"myTab",role:"tablist",children:[(0,u.jsx)("li",{className:"col-6 nav-item px-0 position-relative",children:(0,u.jsx)("a",{className:"nav-link active",id:"FSH-tab","data-bs-toggle":"tab",href:"#FSH",role:"tab","aria-controls":"all","aria-selected":"true",children:"FSH"})}),(0,u.jsx)("li",{className:"col-6 nav-item px-0 position-relative",children:(0,u.jsx)("a",{className:"nav-link",id:"LH-tab","data-bs-toggle":"tab",href:"#LH",role:"tab","aria-controls":"LH","aria-selected":"false",children:"LH"})})]})})}),(0,u.jsxs)("div",{className:"tab-content mt-4",id:"myTabContent",children:[(0,u.jsxs)("div",{className:"tab-pane fade active show",id:"FSH",role:"tabpanel","aria-labelledby":"FSH-tab",children:[(0,u.jsx)("div",{className:"row justify-content-center row-eq-height align-items-center",children:(0,u.jsx)("div",{className:"col-12 col-md-12",children:(0,u.jsx)(j,{day1Status:w,day2Status:k,sample1Day:e,sample1Result:n,sample2Day:s,sample2Result:x})})}),(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)(f,{marker:"FSH",getBase64Images:this.props.getBase64Images,measurement:b,bottomCurve:d,meanCurve:c,personalCurve:m,topCurve:h}),(0,u.jsx)("div",{className:"row justify-content-center align-items-center mb-3 mt-0 mb-md-5 mt-md-3",children:(0,u.jsx)("div",{className:"col-12",children:(0,u.jsx)(N,{cycleLength:y})})}),(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsx)("div",{className:"col-md-9 text-center",children:(0,u.jsx)("p",{children:g})})})]})})]}),(0,u.jsxs)("div",{className:1==this.props.imgsCollected?"tab-pane fade":"tab-pane fade active show",id:"LH",role:"tabpanel","aria-labelledby":"LH-tab",children:[(0,u.jsx)("div",{className:"row justify-content-center row-eq-height align-items-center",children:(0,u.jsx)("div",{className:"col-12 col-md-12",children:(0,u.jsx)(j,{day1Status:F,day2Status:S,sample1Day:e,sample1Result:a,sample2Day:s,sample2Result:p})})}),(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)(f,{marker:"LH",getBase64Images:this.props.getBase64Images,measurement:i,bottomCurve:r,meanCurve:t,personalCurve:o,topCurve:l}),(0,u.jsx)("div",{className:"row justify-content-center align-items-center mb-3 mt-0 mb-md-5 mt-md-3",children:(0,u.jsx)("div",{className:"col-12",children:(0,u.jsx)(N,{cycleLength:y})})}),(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsx)("div",{className:"col-md-9 text-center",children:(0,u.jsx)("p",{children:v})})})]})})]})]})]})})]})}}class k extends r.Component{getLowRange(e){if(void 0!=e)return e.split(" ")[0]}getHighRange(e){if(void 0!=e)return e.split(" ")[2]}showPin(e){return(0,u.jsx)("div",{style:{left:e+"%"},className:"pin",children:(0,u.jsx)("svg",{viewBox:"0 0 56.569 56.569",children:(0,u.jsx)("path",{id:"Path_299","data-name":"Path 299",className:"cls-1",d:"M20.018,0A20.008,20.008,0,0,0,0,19.6v.821c0,.321.036.643.036,1A20.014,20.014,0,0,0,40,20.671h0V0Z",transform:"translate(0 28.284) rotate(-45)"})})})}render(){const e=this.props.progesteroneRanges.split(","),s=this.props.resultsBarProgesterone.split(","),a=this.props.oestradiolRanges.split(","),r=this.props.resultsBarOestradiol.split(","),t=this.props.fshRanges.split(","),o=this.props.resultsBarFsh.split(","),l=this.props.lhRanges.split(","),i=this.props.resultsBarLh.split(","),n=(this.props.progesteronePercentile,this.props.oestradiolPercentile,this.props.fshPercentile,this.props.lhPercentile,this.props.sampleProgesteroneResult),d=this.props.sampleOestradiolResult,c=this.props.sampleFshResult,m=this.props.sampleLhResult,h=(this.props.sampleFshRange,this.props.sampleFshUnits),p=(this.props.sampleLhRange,this.props.sampleLhUnits),x=(this.props.sampleOestradiolRange,this.props.sampleOestradiolUnits),g=(this.props.sampleProgesteroneRange,this.props.sampleProgesteroneUnits);return(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col-12 mt-4 pb-4",children:[(0,u.jsxs)("div",{className:"mb-5",children:[(0,u.jsxs)("div",{className:"col-12 text-center progressTitle",children:["Progesterone (",n+" "+g,")"]}),(0,u.jsxs)("div",{className:"col-12 px-md-4 px-1",children:[(0,u.jsxs)("div",{className:"hormoneRange",children:[(0,u.jsx)("div",{className:"range range-low",children:1==s[0]&&this.showPin(s[1])}),(0,u.jsx)("div",{className:"range range-moderately-low",children:2==s[0]&&this.showPin(s[1])}),(0,u.jsx)("div",{className:"range range-normal",children:3==s[0]&&this.showPin(s[1])}),(0,u.jsx)("div",{className:"range range-moderately-high",children:4==s[0]&&this.showPin(s[1])}),(0,u.jsx)("div",{className:"range range-high",children:5==s[0]&&this.showPin(s[1])})]}),(0,u.jsxs)("div",{className:"hormoneRangeKey",children:[(0,u.jsxs)("div",{className:"rangeKey range-low",children:["Low",(0,u.jsx)("br",{}),"<",e[0]]}),(0,u.jsxs)("div",{className:"rangeKey range-moderately-low",children:[(0,u.jsx)("div",{className:"d-none d-md-block",children:"Moderately Low"}),(0,u.jsx)("div",{className:"d-block d-md-none",children:"M-Low"}),e[0]," - ",e[1]]}),(0,u.jsxs)("div",{className:"rangeKey range-normal",children:["Mid Range",(0,u.jsx)("br",{}),e[1]," - ",e[2]]}),(0,u.jsxs)("div",{className:"rangeKey range-moderately-high",children:[(0,u.jsx)("div",{className:"d-none d-md-block",children:"Moderately High"}),(0,u.jsx)("div",{className:"d-block d-md-none",children:"M-High"}),e[2]," - ",e[3]]}),(0,u.jsxs)("div",{className:"rangeKey range-high",children:["High",(0,u.jsx)("br",{}),e[3],"<"]})]})]})]}),(0,u.jsxs)("div",{className:"mb-5",children:[(0,u.jsxs)("div",{className:"col-12 text-center progressTitle",children:["Oestradiol (",d+" "+x,")"]}),(0,u.jsxs)("div",{className:"col-12 px-md-4 px-1",children:[(0,u.jsxs)("div",{className:"hormoneRange",children:[(0,u.jsx)("div",{className:"range range-low",children:1==r[0]&&this.showPin(r[1])}),(0,u.jsx)("div",{className:"range range-moderately-low",children:2==r[0]&&this.showPin(r[1])}),(0,u.jsx)("div",{className:"range range-normal",children:3==r[0]&&this.showPin(r[1])}),(0,u.jsx)("div",{className:"range range-moderately-high",children:4==r[0]&&this.showPin(r[1])}),(0,u.jsx)("div",{className:"range range-high",children:5==r[0]&&this.showPin(r[1])})]}),(0,u.jsxs)("div",{className:"hormoneRangeKey",children:[(0,u.jsxs)("div",{className:"rangeKey range-low",children:["Low",(0,u.jsx)("br",{}),"<",a[0]]}),(0,u.jsxs)("div",{className:"rangeKey range-moderately-low",children:[(0,u.jsx)("div",{className:"d-none d-md-block",children:"Moderately Low"}),(0,u.jsx)("div",{className:"d-block d-md-none",children:"M-Low"}),a[0]," - ",a[1]]}),(0,u.jsxs)("div",{className:"rangeKey range-normal",children:["Mid Range",(0,u.jsx)("br",{}),a[1]," - ",a[2]]}),(0,u.jsxs)("div",{className:"rangeKey range-moderately-high",children:[(0,u.jsx)("div",{className:"d-none d-md-block",children:"Moderately High"}),(0,u.jsx)("div",{className:"d-block d-md-none",children:"M-High"}),a[2]," - ",a[3]]}),(0,u.jsxs)("div",{className:"rangeKey range-high",children:["High",(0,u.jsx)("br",{}),a[3],"<"]})]})]})]}),(0,u.jsxs)("div",{className:"mb-5",children:[(0,u.jsxs)("div",{className:"col-12 text-center progressTitle",children:["FSH (",c+" "+h,")"]}),(0,u.jsxs)("div",{className:"col-12 px-md-4 px-1",children:[(0,u.jsxs)("div",{className:"hormoneRange",children:[(0,u.jsx)("div",{className:"range range-low",children:1==o[0]&&this.showPin(o[1])}),(0,u.jsx)("div",{className:"range range-moderately-low",children:2==o[0]&&this.showPin(o[1])}),(0,u.jsx)("div",{className:"range range-normal",children:3==o[0]&&this.showPin(o[1])}),(0,u.jsx)("div",{className:"range range-moderately-high",children:4==o[0]&&this.showPin(o[1])}),(0,u.jsx)("div",{className:"range range-high",children:5==o[0]&&this.showPin(o[1])})]}),(0,u.jsxs)("div",{className:"hormoneRangeKey",children:[(0,u.jsxs)("div",{className:"rangeKey range-low",children:["Low",(0,u.jsx)("br",{}),"<",t[0]]}),(0,u.jsxs)("div",{className:"rangeKey range-moderately-low",children:[(0,u.jsx)("div",{className:"d-none d-md-block",children:"Moderately Low"}),(0,u.jsx)("div",{className:"d-block d-md-none",children:"M-Low"}),t[0]," - ",t[1]]}),(0,u.jsxs)("div",{className:"rangeKey range-normal",children:["Mid Range",(0,u.jsx)("br",{}),t[1]," - ",t[2]]}),(0,u.jsxs)("div",{className:"rangeKey range-moderately-high",children:[(0,u.jsx)("div",{className:"d-none d-md-block",children:"Moderately High"}),(0,u.jsx)("div",{className:"d-block d-md-none",children:"M-High"}),t[2]," - ",t[3]]}),(0,u.jsxs)("div",{className:"rangeKey range-high",children:["High",(0,u.jsx)("br",{}),t[3],"<"]})]})]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)("div",{className:"col-12 text-center progressTitle",children:["LH (",m+" "+p,")"]}),(0,u.jsxs)("div",{className:"col-12 px-md-4 px-1",children:[(0,u.jsxs)("div",{className:"hormoneRange",children:[(0,u.jsx)("div",{className:"range range-low",children:1==i[0]&&this.showPin(i[1])}),(0,u.jsx)("div",{className:"range range-moderately-low",children:2==i[0]&&this.showPin(i[1])}),(0,u.jsx)("div",{className:"range range-normal",children:3==i[0]&&this.showPin(i[1])}),(0,u.jsx)("div",{className:"range range-moderately-high",children:4==i[0]&&this.showPin(i[1])}),(0,u.jsx)("div",{className:"range range-high",children:5==i[0]&&this.showPin(i[1])})]}),(0,u.jsxs)("div",{className:"hormoneRangeKey",children:[(0,u.jsxs)("div",{className:"rangeKey range-low",children:["Low",(0,u.jsx)("br",{}),"<",l[0]]}),(0,u.jsxs)("div",{className:"rangeKey range-moderately-low",children:[(0,u.jsx)("div",{className:"d-none d-md-block",children:"Moderately Low"}),(0,u.jsx)("div",{className:"d-block d-md-none",children:"M-Low"}),l[0]," - ",l[1]]}),(0,u.jsxs)("div",{className:"rangeKey range-normal",children:["Mid Range",(0,u.jsx)("br",{}),l[1]," - ",l[2]]}),(0,u.jsxs)("div",{className:"rangeKey range-moderately-high",children:[(0,u.jsx)("div",{className:"d-none d-md-block",children:"Moderately High"}),(0,u.jsx)("div",{className:"d-block d-md-none",children:"M-High"}),l[2]," - ",l[3]]}),(0,u.jsxs)("div",{className:"rangeKey range-high",children:["High",(0,u.jsx)("br",{}),l[3],"<"]})]})]})]})]})})}}var S=a(95717);a(53037),a(28688);class R extends r.Component{render(){const e="Day "+this.props.day,s=this.props.commentaryFreshness,a=this.props.commentaryHunger,r=this.props.commentaryMood,t=this.props.commentaryOverview,o=this.props.commentarySleep,l=this.props.commentarySymptoms,i=this.props.freshnessScore,n=this.props.hungerScore,d=this.props.moodScore,c=this.props.sleepScore,m=this.props.symptomsScore,h=["Sleep","Mood","Freshness","Hunger","Symptoms"],p=[o,r,s,a,l],x=[c,d,i,n,m];return(0,u.jsxs)("div",{id:"personalSlider",className:"h-100",children:[h.map((e,s)=>(0,u.jsx)("div",{className:"modal bottom fade ",id:"modal"+e+this.props.day,tabIndex:"-1",role:"dialog","aria-labelledby":"modal"+e+this.props.day,children:(0,u.jsx)("div",{className:"modal-dialog smallCopyAmount modal-dialog-centered",role:"document",children:(0,u.jsxs)("div",{className:"modal-content",children:[(0,u.jsxs)("div",{className:"modal-header",children:[(0,u.jsx)("button",{type:"button",className:"close","data-bs-dismiss":"modal","aria-label":"Close",children:"Close"}),(0,u.jsxs)("h5",{className:"modal-title text-center text-capitalize",children:["Tips For ",e]})]}),(0,u.jsx)("div",{className:"modal-body text-center",children:(0,u.jsx)("div",{className:"container-fluid",children:(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsx)("div",{className:"text-start",children:"Freshness"==e?(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{children:"Freshness depends on healthy hormone networks, which are affected by your ability to maintain the right balance between rest, activity and nutrition."}),(0,u.jsxs)("ul",{children:[(0,u.jsxs)("li",{children:["Good quality sleep is essential for\xa0",(0,u.jsx)("ul",{children:(0,u.jsx)("li",{children:"Effective hormonal function, allowing you to feel refreshed in the morning"})})]}),(0,u.jsx)("li",{children:"Activity stimulates your hormones to support healthy physical and mental wellbeing"}),(0,u.jsxs)("li",{children:["Regular exercisers should vary training loads through time",(0,u.jsxs)("ul",{children:[(0,u.jsx)("li",{children:"Recovery is essential to avoid fatigue\xa0"}),(0,u.jsx)("li",{children:"Beneficial adaptations to exercise occur when you are asleep"})]})]}),(0,u.jsx)("li",{children:"Nutrition should include the full range of food groups, appropriate for your body size, age and activity levels. Try to pick fresh produce whenever possible"})]})]}):"Hunger"==e?(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{children:"Your hormones stimulate appetite when your energy levels become low."}),(0,u.jsxs)("ul",{children:[(0,u.jsx)("li",{children:"Fuel consistently throughout the day \u2013 eat meals at regular times, avoiding long gaps"}),(0,u.jsx)("li",{children:"Every meal should include a portion of protein and slow-release complex carbohydrates (cereals, rice, pasta, bread, potatoes) appropriate for your body size, age and activity levels"}),(0,u.jsx)("li",{children:"Fuel for the work required"}),(0,u.jsxs)("li",{children:["If you are exercising at moderate to high intensity for more than an hour",(0,u.jsxs)("ul",{children:[(0,u.jsx)("li",{children:"Before: take on carbohydrate before you start - avoid exercising in a fasted state\xa0"}),(0,u.jsx)("li",{children:"During: Stay hydrated and top up with carbohydrates, such as a banana or cereal bar"}),(0,u.jsx)("li",{children:"After: Within 20 minutes, refuel with protein and complex carbohydrates: make your own banana smoothie"})]})]})]})]}):"Mood"==e?(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{children:"Female hormones affect your mood, because they influence neurotransmitters in the brain. It is important to identify and address sources of stress, to avoid disruption of your hormones."}),(0,u.jsxs)("ul",{children:[(0,u.jsxs)("li",{children:["Review external sources of stress: life events, relationships, extreme situations",(0,u.jsx)("ul",{children:(0,u.jsx)("li",{children:"Maintain social contact and discuss with trusted friends"})})]}),(0,u.jsxs)("li",{children:["Assess internal sources of stress: too much or too little food, recovery, exercise",(0,u.jsxs)("ul",{children:[(0,u.jsx)("li",{children:"Try to eat more fresh produce"}),(0,u.jsx)("li",{children:"Make sure you are getting enough sleep"}),(0,u.jsx)("li",{children:"Review your activity levels: type and amount"})]})]})]})]}):"Sleep"==e?(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{children:"Consistent sleep keeps your biological clocks aligned. This is key for supporting healthy hormone networks. \xa0"}),(0,u.jsxs)("ul",{children:[(0,u.jsx)("li",{children:"Aim for 8 hours of sleep per night\xa0"}),(0,u.jsx)("li",{children:"Go to bed and get up at consistent times \u2013 set an alarm for bedtime!"}),(0,u.jsxs)("li",{children:["Establish a bedtime routine",(0,u.jsxs)("ul",{children:[(0,u.jsx)("li",{children:"Explore what helps you wind down: reading, listening to music, taking a bath"}),(0,u.jsx)("li",{children:"A milk drink at bedtime contains tryptophan to make the sleep hormone
1melatonin and the protein casein to aid muscle formation\xa0"}),(0,u.jsx)("li",{children:"Avoid electronic devices close to bedtime, as this frequency of light disrupts the production of melatonin\xa0"}),(0,u.jsx)("li",{children:"Avoid alcohol or stimulants such as caffeine, nicotine or late exercise"})]})]})]})]}):"Symptoms"==e?(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{children:"Over the menstrual cycle, your female hormones vary significantly and in close coordination. The levels, timing and your personal body response can all differ for each cycle, sometimes causing physical issues or feeling below par."}),(0,u.jsxs)("ul",{children:[(0,u.jsx)("li",{children:"Be prepared to be flexible in your routine, where possible"}),(0,u.jsx)("li",{children:"Maintaining gentle activity can help during menstruation"}),(0,u.jsx)("li",{children:"Be aware that high oestradiol prior to ovulation can affect some women"}),(0,u.jsx)("li",{children:"Premenstrual syndrome (PMS) is characterised by a range of symptoms in the two weeks before menstruation. Reviewing your nutrition, activity and sleep can help, alongside evidenced-based supplements such as calcium/vitamin D, Vitex agnus-castus (a herb known as chasteberry), saffron or Ginkgo biloba. Evening primrose oil can reduce breast tenderness"})]})]}):(0,u.jsx)("div",{})})})})})]})})},s)),(0,u.jsxs)("div",{className:"row justify-content-center h-100",children:[(0,u.jsx)("h3",{className:"mb-3 py-2 phaseTitle",children:(0,u.jsx)("b",{children:this.props.isFirstTest?"During Follicular phase":"During Luteal phase"})}),(0,u.jsxs)("div",{className:"row justify-content-center h-100",children:[(0,u.jsx)("div",{className:"col-12",children:(0,u.jsx)("p",{className:"mx-3 mb-0",children:t})}),(0,u.jsx)("div",{className:"col-12 col-md-12 p-0 px-md-2 align-self-start align-self-md-end",children:(0,u.jsx)(S.Z,{ref:e=>this.slider=e,centerMode:!1,dots:!0,arrows:!1,centerPadding:"60px",slidesToShow:1,infinite:!1,children:h.map((s,a)=>(0,u.jsxs)("div",{className:"adviceSlide p-3",children:[(0,u.jsx)("div",{className:"dayTab",children:e}),(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col-12 text-center",children:[(0,u.jsx)("h3",{children:s}),(0,u.jsx)("p",{children:p[a]}),(0,u.jsx)("div",{children:(0,u.jsxs)("a",{"data-bs-toggle":"modal","data-bs-target":"#modal"+s+this.props.day,children:["More on ",s,"..."]})})]})}),(0,u.jsxs)("div",{className:x[a]>3?"score high ":"score low",children:[(0,u.jsx)("strong",{children:x[a]}),"/5"]})]},s))})})]})]})]})}}class D extends r.Component{render(){this.props.day;const e=this.props.commentary1Freshness,s=this.props.commentary1Hunger,a=this.props.commentary1Mood,t=this.props.commentary1Overview,o=this.props.commentary1Sleep,l=this.props.commentary1Symptoms,i=this.props.commentary2Freshness,n=this.props.commentary2Hunger,d=this.props.commentary2Mood,c=this.props.commentary2Overview,m=this.props.commentary2Sleep,h=this.props.commentary2Symptoms,p=this.props.freshness1Score,x=this.props.hunger1Score,g=this.props.mood1Score,v=this.props.sleep1Score,b=this.props.symptoms1Score,y=this.props.freshness2Score,j=this.props.hunger2Score,f=this.props.mood2Score,N=this.props.sleep2Score,C=this.props.symptoms2Score,w=this.props.sample1Day,F=this.props.sample2Day;return(0,u.jsx)(r.Fragment,{children:(0,u.jsx)("div",{className:"row",id:"personalAdvice",children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsxs)("div",{className:"col-12 col-md-9 text-center",children:[(0,u.jsx)("h2",{className:"text-uppercase",children:"Personal advice"}),(0,u.jsx)("p",{children:"Take time to review your personalised advice on each of the five areas of wellbeing, for the two stages in your menstrual cycle"})]})}),(0,u.jsxs)("div",{className:"row justify-content-around text-center",children:[(0,u.jsx)("div",{className:"col-11 col-md-5 sliderBorder px-3 mt-md-3 mt-0",children:(0,u.jsx)(R,{day:w,isFirstTest:1,commentaryFreshness:e,commentaryHunger:s,commentaryMood:a,commentaryOverview:t,commentarySleep:o,commentarySymptoms:l,freshnessScore:p,hungerScore:x,moodScore:g,sleepScore:v,symptomsScore:b})}),(0,u.jsx)("div",{className:"col-11 col-md-5 sliderBorder px-3 mt-md-3 mt-5",children:(0,u.jsx)(R,{day:F,isFirstTest:0,commentaryFreshness:i,commentaryHunger:n,commentaryMood:d,commentaryOverview:c,commentarySleep:m,commentarySymptoms:h,freshnessScore:y,hungerScore:j,moodScore:f,sleepScore:N,symptomsScore:C})})]})]})})})}}class P extends r.Component{render(){const e=this.props.sample1Day,s=this.props.sample1ProgesteronePercentile,a=this.props.sample1OestradiolPercentile,r=this.props.sample1FshPercentile,t=this.props.sample1LhPercentile,o=this.props.sample2Day,l=this.props.sample2ProgesteronePercentile,i=this.props.sample2OestradiolPercentile,n=this.props.sample2FshPercentile,d=this.props.sample2LhPercentile,c=this.props.sample1ProgesteroneRanges,m=this.props.sample1ResultsBarProgesterone,h=this.props.sample1ProgesteroneResult,p=this.props.sample1OestradiolRanges,x=this.props.sample1ResultsBarOestradiol,g=this.props.sample1OestradiolResult,v=this.props.sample1FshRanges,b=this.props.sample1ResultsBarFsh,y=this.props.sample1FshResult,j=this.props.sample1LhRanges,f=this.props.sample1ResultsBarLh,N=this.props.sample1LhResult,C=this.props.sample2ProgesteroneRanges,w=this.props.sample2ResultsBarProgesterone,F=this.props.sample2ProgesteroneResult,S=this.props.sample2OestradiolRanges,R=this.props.sample2ResultsBarOestradiol,P=this.props.sample2OestradiolResult,B=this.props.sample2Fsh
1Ranges,L=this.props.sample2ResultsBarFsh,I=this.props.sample2FshResult,H=this.props.sample2LhRanges,O=this.props.sample2ResultsBarLh,_=this.props.sample2LhResult,M=this.props.sample1FshRange,T=this.props.sample1FshUnits,A=this.props.sample1LhRange,W=this.props.sample1LhUnits,E=this.props.sample1OestradiolRange,z=this.props.sample1OestradiolUnits,$=this.props.sample1ProgesteroneRange,U=this.props.sample1ProgesteroneUnits,Z=this.props.sample2FshRange,V=this.props.sample2FshUnits,Y=this.props.sample2LhRange,q=this.props.sample2LhUnits,G=this.props.sample2OestradiolRange,K=this.props.sample2OestradiolUnits,X=this.props.sample2ProgesteroneRange,J=this.props.sample2ProgesteroneUnits;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("section",{id:"linkingYourHormones",className:"box box-shadow reportWhite mt-4 p-3 p-md-4",children:[(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsxs)("div",{className:"col-md-9 text-center",children:[(0,u.jsx)("h2",{className:"text-uppercase",children:"Personalised Ranges"}),(0,u.jsx)("p",{children:this.props.commentaryRangesIntro})]})}),(0,u.jsxs)("div",{className:"contentBorder mb-4 m-lg-4",children:[(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsx)("div",{className:"col-md-9",children:(0,u.jsxs)("ul",{className:"nav nav-tabs nav-fill negative-margin",id:"myTab",role:"tablist",children:[(0,u.jsx)("li",{className:"col-6 nav-item px-0 position-relative",children:(0,u.jsxs)("a",{className:"nav-link active",id:"dayOne-tab","data-bs-toggle":"tab",href:"#dayOne",role:"tab","aria-controls":"all","aria-selected":"true",children:["Day ",e]})}),(0,u.jsx)("li",{className:"col-6 nav-item px-0 position-relative",children:(0,u.jsxs)("a",{className:"nav-link",id:"dayTwo-tab","data-bs-toggle":"tab",href:"#dayTwo",role:"tab","aria-controls":"LH","aria-selected":"false",children:["Day ",o]})})]})})}),(0,u.jsxs)("div",{className:"tab-content mt-4",id:"myTabContent",children:[(0,u.jsx)("div",{className:"tab-pane fade active show",id:"dayOne",role:"tabpanel","aria-labelledby":"dayOne-tab",children:(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsx)("div",{className:"col-md-12",children:(0,u.jsx)(k,{progesteroneRanges:c,resultsBarProgesterone:m,progesteronePercentile:s,oestradiolRanges:p,resultsBarOestradiol:x,oestradiolPercentile:a,fshRanges:v,resultsBarFsh:b,fshPercentile:r,lhRanges:j,resultsBarLh:f,lhPercentile:t,sampleFshRange:M,sampleFshUnits:T,sampleLhRange:A,sampleLhUnits:W,sampleOestradiolRange:E,sampleOestradiolUnits:z,sampleProgesteroneRange:$,sampleProgesteroneUnits:U,sampleProgesteroneResult:h,sampleOestradiolResult:g,sampleFshResult:y,sampleLhResult:N})})})}),(0,u.jsx)("div",{className:"tab-pane fade",id:"dayTwo",role:"tabpanel","aria-labelledby":"dayTwo-tab",children:(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsx)("div",{className:"col-md-12",children:(0,u.jsx)(k,{progesteroneRanges:C,resultsBarProgesterone:w,progesteronePercentile:l,oestradiolRanges:S,resultsBarOestradiol:R,oestradiolPercentile:i,fshRanges:B,resultsBarFsh:L,fshPercentile:n,lhRanges:H,resultsBarLh:O,lhPercentile:d,sampleFshRange:Z,sampleFshUnits:V,sampleLhRange:Y,sampleLhUnits:q,sampleOestradiolRange:G,sampleOestradiolUnits:K,sampleProgesteroneRange:X,sampleProgesteroneUnits:J,sampleProgesteroneResult:F,sampleOestradiolResult:P,sampleFshResult:I,sampleLhResult:_})})})})]})]})]}),(0,u.jsx)("section",{id:"personalAdvice",className:"box box-shadow reportWhite mt-4 p-3 p-md-4",children:(0,u.jsx)(D,{sample1Day:e,sample2Day:o,commentary1Freshness:this.props.commentaryDay1Freshness,commentary1Hunger:this.props.commentaryDay1Hunger,commentary1Mood:this.props.commentaryDay1Mood,commentary1Overview:this.props.commentaryDay1Overview,commentary1Sleep:this.props.commentaryDay1Sleep,commentary1Symptoms:this.props.commentaryDay1Symptoms,freshness1Score:this.props.sample1Freshness,hunger1Score:this.props.sample1Hunger,mood1Score:this.props.sample1Mood,sleep1Score:this.props.sample1Sleep,symptoms1Score:this.props.sample1Symptoms,commentary2Freshness:this.props.commentaryDay2Freshness,commentary2Hunger:this.props.commentaryDay2Hunger,commentary2Mood:this.props.commentaryDay2Mood,commentary2Overview:this.props.commentaryDay2Overview,commentary2Sleep:this.props.commentaryDay2Sleep,commentary2Symptoms:this.props.commentaryDay2Symptoms,freshness2Score:this.props.sample2Freshness,hunger2Score:this.props.sample2Hunger,mood2Score:this.props.sample2Mood,sleep2Score:this.props.sample2Sleep,symptoms2Score:this.props.sample2Symptoms})})]})}}var B=a(68297);class L extends r.Component{render(){const e=this.props.commentaryActionsStart,s=this.props.commentaryActionsEnd,a=this.props.commentaryActionsBullets;return(0,u.jsx)("section",{id:"nextSteps",className:"box box-shadow reportWhite",children:(0,u.jsx)("div",{className:"mt-4 p-3 p-md-4",children:(0,u.jsx)("div",{className:"row justify-content-center",children:(0,u.jsx)("div",{className:"col-md-9 text-start",children:(0,u.jsxs)("div",{className:"ps-3 pt-3 pb-0",children:[(0,u.jsxs)("div",{className:"row g-0 align-items-center justify-content-center",children:[(0,u.jsx)("div",{className:"col-12 text-center",children:(0,u.jsx)("h2",{className:"mb-1 text-uppercase",children:"Next Steps"})}),(0,u.jsx)("div",{className:"col-12 mt-3 mb-2",children:(0,u.jsx)("p",{children:e})})]}),a.map((e,s)=>(0,u.jsx)("div",{className:"col-12",children:(0,u.jsxs)("div",{className:"row align-items-center nextStepsItem",children:[(0,u.jsx)("div",{className:"col-2 col-md-1 text-center",children:(0,u.jsx)(h.G,{icon:B.f8})}),(0,u.jsx)("div",{className:"col-10 col-md-11 text-start p-0 px-md-3",children:(0,u.jsx)("p",{children:e})})]})},s)),(0,u.jsx)("div",{className:"row",children:(0,u.jsx)("div",{className:"col-12 mt-3",children:(0,u.jsx)("p",{className:"mb-0",children:s})})})]})})})})})}}var I=a(85353);class H extends r.Component{constructor(){super(),this.state={showBackToTop:0}}backtoTop(){var e;null===(e=document.querySelector("html, body"))||void 0===e||e.scroll({top:0,behavior:"smooth"})}render(){return document.addEventListener("scroll",()=>{0==this.state.showBackToTop&&document.documentElement.scrollTop>=501?this.setState({showBackToTop:1}):1==this.state.showBackToTop&&document.documentElement.scrollTop<500&&this.setState({showBackToTop:0})}),(0,u.jsxs)("section",{className:"row justify-content-between ms-0 ms-md-5 mt-4 pt-3",children:[(0,u.jsxs)("div",{className:"col-12 col-md-10",children:[(0,u.jsx)("h2",{children:"References"}),(0,u.jsxs)("p",{children:[(0,u.jsx)("a",{target:"_blank",href:"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/767549/Annual_report_of_the_Chief_Medical_Officer_2018_-_health_2040_-_better_health_within_reach.pdf#page=161",children:"Machine learning for individualised medicine"})," \u201dMihaela van der Schaar,Chapter 10 of the 2018 Annual Report of the Chief Medical Officer. Health 2040\u2013 Better Health Within Reach."]}),(0,u.jsxs)("p",{children:[" Van de Schoot,R., Depaoli, S., King,R.et al.Bayesian statistics and modelling. Nat Rev Methods Primers1,1 (2021). ",(0,u.jsx)("a",{href:"https://www.nature.com/articles/s43586-020-00001-2",target:"_blank",children:"https://doi.org/10.1038/s43586-020-00001-2"})]})]}),(0,u.jsx)("div",{className:"col-1 align-self-center",children:(0,u.jsx)("div",{onClick:this.backtoTop,className:0==this.state.showBackToTop?"backToTop text-center":"backToTop text-center show",children:(0,u.jsx)(h.G,{icon:I.on,className:"mt-2"})})})]})}}class O extends r.Component{render(){return(0,u.jsx)("section",{id:"YourPersonalisedCurve",className:"mt-4 pt-3",children:(0,u.jsx)("div",{className:"row align-items-center justify-content-center",children:(0,u.jsxs)("div",{className:"col-12 col-md-9 text-center",children:[(0,u.jsx)("h2",{children:"YOUR PERSONALISED CURVES"}),(0,u.jsx)("p",{dangerouslySetInnerHTML:{__html:this.props.commentaryGraphIntro}})]})})})}}class _ extends r.Component{render(){return(0,u.jsx)("section",{id:"LinkingYourHormones",className:"mt-4 pt-3",children:(0,u.jsx)("div",{className:"row align-items-center justify-content-center",children:(0,u.jsxs)("div",{className:"col-11 col-md-9 text-center",children:[(0,u.jsx)("h2",{children:"LINKING YOUR HORMONES TO HOW YOU FEEL"}),(0,u.jsx)("p",{children:this.props.commentaryLinkingIntro})]})})})}}var M=a(98152);class T extends r.Component{render(){const{loadingPDF:e,pdfReady:s,pdfUrl:a}=this.props;return(0,u.jsxs)("section",{id:"infoArea",className:"box box-shadow reportWhite mt-4 p-3",children:[(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsx)("div",{className:"col-12 text-center",children:(0,u.jsx)("p",{className:"m-0",children:(0,u.jsx)("strong",{children:"This report, including any scores, graphs and commentary, is for information purposes only. It is not intended as a substitue for medical diagnosis. If you have concerns about your health, please talk to your GP "})})})}),(0,u.jsx)("div",{className:"row justify-content-center my-4",children:(0,u.jsx)("div",{className:"col-12 text-center",children:0==s?(0,u.jsx)("div",{className:"btn btn-primary",ref:"pdfButton",style:{cursor:"pointer"},onClick:()=>{this.props.exportResults()},children:0==e?"Export report":"Loading..."}):(0,u.jsx)("a",{target:"_blank",href:a,className:"btn btn-primary text-decoration-none",ref:"pdfButton",onClick:()=>{this.setState({pdfReady:!1})},children:"PDF Ready. Click here to open"})})})]})}}var A=a(92673),W=a(69668);class E extends r.Component{constructor(e){super(e)}render(){const{doctorComment:e,doctorProfile:s,doctorName:a,displayComment:r,hideComment:t}=this.props;return(0,u.jsxs)("div",{className:"doctorComment-section",children:[(0,u.jsx)("h4",{className:"doctorComment-title text-uppercase fw-bold",children:"Doctors comments"}),(0,u.jsx)("div",{className:"doctorComment-header",children:(0,u.jsxs)("div",{className:"row align-items-center mb-3",children:[(0,u.jsx)("div",{className:"col-4",children:(0,u.jsx)("img",{src:`${s}`,alt:"Doctor picture",className:"doctorImg"})}),(0,u.jsx)("div",{className:"col",children:(0,u.jsx)("p",{className:"fw-normal",children:a})})]})}),(0,u.jsx)("div",{className:"doctorComment-body",children:(0,u.jsx)("p",{className:"text-pretty lh-base",dangerouslySetInnerHTML:{__html:e}})})]})}}var z=a(50851),$=a(3538);class U extends r.Component{constructor(e){super(e)}render(){return(0,u.jsx)(u.Fragment,{children:this.props.biomarkersFailed&&Object.values(this.props.biomarkersFailed).length>0&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("h4",{className:"text-uppercase fw-bold mt-5",children:"The lab was unable to provide a result for the following marker(s)"}),(0,u.jsxs)("p",{className:"",children:["If you would like more information please email ",(0,u.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),Object.values(this.props.biomarkersFailed).map((e,s)=>(0,u.jsxs)("div",{className:"row biomarkers-failed align-items-center",children:[(0,u.jsxs)("div",{className:"col-3 fw-bolder d-flex align-items-center",children:[(0,u.jsxs)("div",{className:"chartContainer red col-auto me-1",children:[(0,u.jsx)("div",{className:"chartValue",children:(0,u.jsx)(h.G,{icon:$.NB})}),(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56.569 56.569",children:(0,u.jsx)("path",{id:"Path_299","data-name":"Path 299",className:"cls-1",d:"M20.018,0A20.008,20.008,0,0,0,0,19.6v.821c0,.321.036.643.036,1A20.014,20.014,0,0,0,40,20.671h0V0Z",transform:"translate(0 28.284) rotate(-45)"})})]}),(0,u.jsx)("p",{className:"mb-0 fw-semibold",children:null===e||void 0===e?void 0:e.b
1iomarkerName})]}),null!==e&&void 0!==e&&e.errorStatusMessage?(0,u.jsx)("p",{className:"col-9 mb-0",children:null===e||void 0===e?void 0:e.errorStatusMessage}):(0,u.jsx)("p",{className:"col-9 mb-0",children:"Analysis failed."})]}))]})})}}var Z=a(1531),V=a(45054);function Y({hasHcReport:e=!1,healthScores:s=[]}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Z.Z,{isTrue:e&&0===s.length,children:(0,u.jsx)(V.gK,{})}),(0,u.jsx)(Z.Z,{isTrue:e&&s.length>0,children:(0,u.jsx)(V.U0,{healthScores:s})})]})}var q=a(66364),G=a.n(q);a(50583);const K="TrucheckResult_container__ZOiYX";function X({biomarker:e={},pdfUrl:s=""}){const a=Object.values(e)[0]||{};return G()(a)?(0,u.jsx)(M.default,{}):(0,u.jsx)("div",{className:K,children:(0,u.jsxs)("div",{className:"row py-3 align-items-center border-bottom",children:[(0,u.jsx)("div",{className:"col-12 col-sm-3",children:(0,u.jsx)("h4",{className:"mb-0 thickText marker-title",children:a.testName})}),(0,u.jsx)("div",{className:"col-12 col-sm-6 mt-2 mt-sm-0",children:(0,u.jsx)("p",{className:"mb-0",children:a.antibodyResultText})}),(0,u.jsx)(Z.Z,{isTrue:s,children:(0,u.jsx)("div",{className:"col-12 col-sm-3",children:(0,u.jsx)("button",{href:s,className:"btn btn-primary",children:"Download Report"})})})]})})}var J=a(78885),Q=a(68006);const ee="Introduction_infoBtn__VBeeg",se="Introduction_chartContainer__vo36-",ae="Introduction_box__iZJHj",re="Introduction_formScoreContainer__KfvOZ",te="Introduction_lhSurgeContainer__vCG0-",oe="Introduction_lhSurgeBox__ttpmx",le="Introduction_doctorPicture__FQmvV";var ie=a(9021);const ne="MyFormChartResult_myFormChartTop__m3ci4",de="MyFormChartResult_score__5NQls";function ce(e){var s,a,r;const{result:t,showGlow:o=!0,showBlob:l=!0,showScoreOnly:i=!1,useReportV2:n=!1}=e;return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(ie.Z,{score:n?Math.round(t.formScore):parseFloat(null===(s=t.reportV1)||void 0===s?void 0:s.formScore),customStyle:{colorsRequired:["purple"],circumference:320,hasGlow:o,hasBlob:l},children:[(0,u.jsx)(Z.Z,{isTrue:!i,children:(0,u.jsxs)("div",{className:`${ne}`,children:[(0,u.jsxs)("div",{className:`${de}`,children:[(0,u.jsx)("h1",{className:"mb-0",children:n?Math.round(t.formScore):null===(a=t.reportV1)||void 0===a?void 0:a.formScore}),(0,u.jsx)("span",{children:"%"})]}),(0,u.jsx)("p",{className:"mb-0",children:"MyForm Score"})]})}),(0,u.jsx)(Z.Z,{isTrue:i,children:(0,u.jsx)("h1",{className:"mb-0",children:n?Math.round(t.formScore):null===(r=t.reportV1)||void 0===r?void 0:r.formScore})})]})})}var me=a(64912);const he={fill:!1,borderWidth:7,pointBorderWidth:1,backgroundColor:"#fff",borderColor:"#fff"},pe={legend:{boxWidth:10,boxHeight:10,padding:15,fontSize:12,fontWeight:500},axis:{xDisplay:!0,yDisplay:!0},label:{xDisplay:!0,yDisplay:!0,x:"DAY",y:"nmol/L",fontSize:10,color:"#000"},colors:["#C080E1","#85E1FE","#FDB5D2","#A7C1FF"],tension:.3};function ue({id:e="lineChart",data:s=[],xLabels:a=[],customStyle:t={}}){var o,l,i,n,c;const{label:m,legend:p,tension:x,axis:g}={...pe,...t,label:{...pe.label,...null!==(o=t.label)&&void 0!==o?o:{}},legend:{...pe.legend,...null!==(l=t.legend)&&void 0!==l?l:{}},axis:{...pe.axis,...null!==(i=t.axis)&&void 0!==i?i:{}}};(0,r.useEffect)(()=>{if(!Array.isArray(s)||Array.isArray(s)&&0===s.length)throw new Error(`Data must be an array of objects with label, data and style properties, and at least one object. ${typeof s} given.`)},[s]);const v={labels:a,datasets:s.map(e=>({label:(null===e||void 0===e?void 0:e.label)||"",data:(null===e||void 0===e?void 0:e.data)||[],...he,...(null===e||void 0===e?void 0:e.style)||{}}))},b={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:null!==(n=p.position)&&void 0!==n?n:"bottom",labels:{boxWidth:p.boxWidth,boxHeight:p.boxHeight,padding:p.padding,font:{size:p.fontSize,weight:p.fontWeight},usePointStyle:!0,pointStyle:"circle"}},title:{display:!1}},elements:{point:{radius:0}},tension:x,scales:{x:{display:g.xDisplay,backgroundColor:"transparent",title:{display:m.xDisplay,text:m.x,font:{size:m.fontSize},color:m.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{autoSkip:!1,maxRotation:0,minRotation:0,min:0,max:31,stepSize:7,z:99999}},y:{display:g.yDisplay,backgroundColor:"transparent",title:{display:m.yDisplay,text:m.y,font:{size:m.fontSize},color:m.color}
1,legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{scaleBeginAtZero:!1,beginAtZero:!1,min:0,suggestedMin:0,autoSkip:!1,maxRotation:0,minRotation:0,z:99999}}}},y=(null===s||void 0===s||null===(c=s.flatMap(e=>e.data))||void 0===c?void 0:c.length)>0;return Array.isArray(s)&&y?(0,u.jsx)(d.x1,{id:e,data:v,options:b}):(0,u.jsxs)("div",{className:"alert alert-danger mx-auto my-4",showShadow:!1,children:[(0,u.jsxs)("h3",{className:"lh-base",children:[(0,u.jsx)(h.G,{icon:me.nY,className:"text-danger text-red fa-fw me-1"})," Invalid data set"]}),(0,u.jsx)("p",{className:"lh-base mb-0",children:"Something went wrong with the dataset."})]})}const xe=(0,r.memo)(function({handleNextTab:e,handleBackTab:s,result:a={}}){var t,o,l;const i=10,n=.7,d=30,c=10,m=(0,r.useMemo)(()=>{const e=Object.values(a.curves).flatMap(e=>e.personalCurve.split(",")).map(e=>parseFloat(""===e?0:e));return Math.max(...e)},[a.curves]),x=(0,r.useCallback)((e,s=1)=>m?e/m*100*s:0,[m]),g=(0,r.useMemo)(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.curves.progesterone)&&void 0!==e&&e.personalCurve?a.curves.progesterone.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?x(e,i):0).slice(0,-1):[]},[a.curves.progesterone.personalCurve]),v=(0,r.useMemo)(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.curves.oestradiol)&&void 0!==e&&e.personalCurve?a.curves.oestradiol.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?x(e,n):0).slice(0,-1):[]},[a.curves.oestradiol.personalCurve]),b=(0,r.useMemo)(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.curves.fsh)&&void 0!==e&&e.personalCurve?a.curves.fsh.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?x(e,d):0).slice(0,-1):[]},[a.curves.fsh.personalCurve]),y=(0,r.useMemo)(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.curves.lh)&&void 0!==e&&e.personalCurve?a.curves.lh.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?x(e,c):0).slice(0,-1):[]},[a.curves.lh.personalCurve]),j=[{label:"Progesterone",data:g,style:{backgroundColor:"#A7C1FF33",borderColor:"#A7C1FF",borderWidth:3,fill:!0}},{label:"Oestradiol",data:v,style:{backgroundColor:"#FDB5D233",borderColor:"#FDB5D2",borderWidth:3,fill:!0}},{label:"FSH",data:b,style:{backgroundColor:"#C080E133",borderColor:"#C080E1",borderWidth:3,fill:!0}},{label:"LH",data:y,style:{backgroundColor:"#85E1FE33",borderColor:"#85E1FE",borderWidth:3,fill:!0}}],f=(0,r.useMemo)(()=>g.map((e,s)=>0!=s&&s%7&&s!=g?"":s),[g]),N={name:null!==(t=null===a||void 0===a||null===(o=a.doctorReview)||void 0===o?void 0:o.professionalProfile.name)&&void 0!==t?t:"",picture:null!==a&&void 0!==a&&null!==(l=a.doctorReview)&&void 0!==l&&l.professionalProfile.userPhoto?`https://sys.forthwithlife.co.uk${a.doctorReview.professionalProfile.userPhoto}`:""};return(0,r.useEffect)(()=>{[...document.querySelectorAll('[data-bs-toggle="tooltip"]')||[]].map(e=>new Q.u(e))},[]),(0,u.jsxs)("div",{className:"d-flex flex-column gap-4 px-2 px-lg-0",children:[(0,u.jsxs)("div",{className:"col-12 mb-3",children:[(0,u.jsx)("p",{className:"lh-base text-center text-pretty",children:a.introductionMessage}),(0,u.jsx)(Z.Z,{isTrue:Object.values(N).some(e=>e),children:(0,u.jsxs)("div",{className:"text-center d-flex gap-2 align-items-center justify-content-center",children:[(0,u.jsx)(Z.Z,{isTrue:null===N||void 0===N?void 0:N.picture,children:(0,u.jsx)("img",{src:null===N||void 0===N?void 0:N.picture,alt:null===N||void 0===N?void 0:N.name,className:le})}),(0,u.jsx)(Z.Z,{isTrue:null===N||void 0===N?void 0:N.name,children:(0,u.jsx)("p",{className:"fw-semibold mb-0",children:null===N||void 0===N?void 0:N.name})})]})})]}),(0,u.jsx)("div",{className:`col-12 ${ae}`,children:(0,u.jsxs)("div",{className:"p-4",children:[(0,u.jsxs)("header",{className:"position-relative",children:[(0,u.jsx)("h3",{className:"fw-semibold mb-0",children:"Your FORM Score"}),(0,u.jsx)("span",{className:`p-2 position-absolute ${ee}`,"data-bs-toggle":"tooltip","data-bs-title":"FORM score relates to the timing and proportionality of the call-response mechanism of your menstrual cycle. Lower scores can mean that the network is not working in harmony and your report will help highlight these areas.","data-bs-html":!0,"data-bs-custom-class":"customTooltip",children:(0,u.jsx)(h.G,{icon:p.sq,size:"lg"})})]}),(0,u.jsxs)("div",{className:"row flex-column flex-lg-row justify-content-center align-items-center gap-3",children:[(0,u.jsx)("div",{className:"col-auto mt-4",children:(0,u.jsx)("div",{className:`px-md-2 ${re}`,children:(0,u.jsx)(ce,{result:a,showScoreOnly:!0,useReportV2:!0})})}),(0,u.jsx)("footer",{className:"col lh-base mb-0 mt-3",children:(0,u.jsx)("p",{className:"lh-base text-pretty",children:a.formScoreCommentary})})]})]})}),(0,u.jsx)("div",{className:`col-12 ${ae}`,children:(0,u.jsxs)("div",{className:"p-4",children:[(0,u.jsxs)("header",{className:"position-relative",children:[(0,u.jsx)("h3",{className:"fw-semibold mb-0",children:"Your predicted hormone curves"}),(0,u.jsx)("span",{className:`p-2 position-absolute ${ee}`,"data-bs-toggle":"tooltip","data-bs-title":"This curve is your personalised curve across your cycle. This was generated using your two blood results.","data-bs-html":!0,"data-bs-custom-class":"customTooltip",children:(0,u.jsx)(h.G,{icon:p.sq,size:"lg"})})]}),(0,u.jsx)("div",{className:`mt-3 ${se}`,children:(0,u.jsx)(ue,{data:j,xLabels:f,customStyle:{label:{xDisplay:!0,yDisplay:!1,x:"DAY",y:"",fontSize:10,
1color:"#5b5b5b"},axis:{yDisplay:!1},tension:.4}})}),(0,u.jsx)("footer",{className:"lh-base mb-0 mt-3 text-pretty",children:a.curveCommentary})]})}),(0,u.jsx)("div",{className:`col-12 ${ae}`,children:(0,u.jsxs)("div",{className:"p-4",children:[(0,u.jsxs)("header",{className:"position-relative",children:[(0,u.jsx)("h3",{className:"fw-semibold mb-0",children:"Estimated LH Surge"}),(0,u.jsx)("span",{className:`p-2 position-absolute ${ee}`,"data-bs-toggle":"tooltip","data-bs-title":"Using our MyFORM software we're able to identify your estimated LH surge, which occurs approximately 24 hours before ovulation.","data-bs-html":!0,"data-bs-custom-class":"customTooltip",children:(0,u.jsx)(h.G,{icon:p.sq,size:"lg"})})]}),(0,u.jsxs)("div",{className:"row flex-column flex-lg-row justify-content-center align-items-center gap-3 mt-4",children:[(0,u.jsx)("div",{className:`col-auto ${te}`,children:(0,u.jsxs)("div",{"data-variant":"secondary",className:`${oe} p-3 d-flex flex-grow-1 align-items-center justify-content-center flex-column gap-2 text-center`,showShadow:!1,children:[(0,u.jsx)("p",{className:"mb-0 lh-base fw-semibold",children:"Day"}),(0,u.jsx)("h1",{className:"mb-0",children:Math.round(a.estimatedLhSurge)})]})}),(0,u.jsx)("footer",{className:"col lh-base mb-0 mt-3",children:(0,u.jsxs)("p",{className:"lh-base text-pretty",children:["A surge in LH (Luteinising Hormone) triggers ovulation. Based on your blood results, your LH surge most likely occurred around day ",Math.round(a.estimatedLhSurge),". For your cycle length, this is within 24 hours of the expected time."]})})]})]})}),(0,u.jsxs)("div",{className:"col-12 d-flex justify-content-center align-items-center mt-4 mb-5 flex-column gap-3",children:[(0,u.jsx)("button",{className:"btn btn-primary px-5",onClick:e,children:"Next"}),(0,u.jsx)("small",{children:"Next in the report we will break down the 4 key hormones"})]})]})}),ge="WhatMeans_infoBtn__gz9aN",ve="WhatMeans_chartContainer__xgcxE",be="WhatMeans_box__0j6OT",ye=(0,r.memo)(function({handleNextTab:e,handleBackTab:s,result:a={}}){const t=10,o=.7,l=30,i=10,n=(0,r.useMemo)(()=>{const e=Object.values(a.curves).flatMap(e=>e.personalCurve.split(",")).map(e=>parseFloat(""===e?0:e));return Math.max(...e)},[a.curves]),d=(0,r.useCallback)((e,s=1)=>n?e/n*100*s:0,[n]),c=(0,r.useMemo)(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.curves.progesterone)&&void 0!==e&&e.personalCurve?a.curves.progesterone.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?d(e,t):0).slice(0,-1):[]},[a.curves.progesterone.personalCurve]),m=(0,r.useMemo)(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.curves.oestradiol)&&void 0!==e&&e.personalCurve?a.curves.oestradiol.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?d(e,o):0).slice(0,-1):[]},[a.curves.oestradiol.personalCurve]),x=(0,r.useMemo)(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.curves.fsh)&&void 0!==e&&e.personalCurve?a.curves.fsh.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?d(e,l):0).slice(0,-1):[]},[a.curves.fsh.personalCurve]),g=(0,r.useMemo)(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.curves.lh)&&void 0!==e&&e.personalCurve?a.curves.lh.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?d(e,i):0).slice(0,-1):[]},[a.curves.lh.personalCurve]),v=[{label:"Progesterone",data:c,style:{backgroundColor:"#A7C1FF33",borderColor:"#A7C1FF",borderWidth:3,fill:!0}},{label:"Oestradiol",data:m,style:{backgroundColor:"#FDB5D233",borderColor:"#FDB5D2",borderWidth:3,fill:!0}},{label:"FSH",data:x,style:{backgroundColor:"#C080E133",borderColor:"#C080E1",borderWidth:3,fill:!0}},{label:"LH",data:g,style:{backgroundColor:"#85E1FE33",borderColor:"#85E1FE",borderWidth:3,fill:!0}}],b=(0,r.useMemo)(()=>c.map((e,s)=>0!=s&&s%7&&s!=c?"":s),[c]);return(0,r.useEffect)(()=>{[...document.querySelectorAll('[data-bs-toggle="tooltip"]')||[]].map(e=>new Q.u(e))},[]),(0,u.jsxs)("div",{className:"row flex-column gap-4 px-2 px-lg-0",children:[(0,u.jsx)("div",{className:`${be} col-12 mt-2`,children:(0,u.jsxs)("div",{className:"p-4",children:[(0,u.jsxs)("header",{className:"position-relative",children:[(0,u.jsx)("h3",{className:"fw-semibold mb-0",children:"Your predicted hormone curves"}),(0,u.jsx)("span",{className:`p-2 position-absolute ${ge}`,"data-bs-toggle":"tooltip","data-bs-title":"This curve is your personalised curve across your cycle. This was generated using your two blood results.","data-bs-html":!0,"data-bs-custom-class":"customTooltip",children:(0,u.jsx)(h.G,{icon:p.sq,size:"lg"})})]}),(0,u.jsx)("div",{className:`mt-3 ${ve}`,children:(0,u.jsx)(ue,{data:v,xLabels:b,customStyle:{label:{xDisplay:!0,yDisplay:!1,x:"DAY",y:"",fontSize:10,
1color:"#5b5b5b"},axis:{yDisplay:!1},tension:.4}})}),(0,u.jsxs)("footer",{className:"mt-3 ",children:[(0,u.jsx)("p",{className:"lh-base text-pretty",dangerouslySetInnerHTML:{__html:a.curveCommentary}}),(0,u.jsx)("p",{className:"lh-base text-pretty mb-0",dangerouslySetInnerHTML:{__html:a.whatMeansMessage}})]})]})}),(0,u.jsxs)("div",{className:"col-12 d-flex justify-content-center align-items-center mt-4 mb-5 flex-column gap-3",children:[(0,u.jsx)("button",{className:"btn btn-primary px-5",onClick:e,children:"Next"}),(0,u.jsx)("small",{children:"Next up, we look at what you can do with this information"}),(0,u.jsx)("button",{onClick:s,className:"btn btn-simple-primary px-5 py-1",children:"Back"})]})]})}),je="HormoneBar_bar__xHXMj",fe="HormoneBar_range__8dS9H",Ne="HormoneBar_pin__WIEz9",Ce="HormoneBar_legend__a4rmj",we="HormoneBar_score__cd04k",Fe={1:10,2:20,3:40,4:20,5:10},ke={1:"Low",2:"M. Low",3:"Healthy",4:"M. High",5:"High"};function Se({data:e={}}){const s=(0,r.useMemo)(()=>{if(G()(e))return 0;const s=e.scoreBarPosition?parseInt(e.scoreBarPosition):0,a=e.score?parseFloat(e.score):0,r=Object.entries(Fe).reduce((e,[a,r])=>a<s?e+r:e,0)+Fe[s]*a/100;return r<0?0:r>100?100:r},[e,Fe]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:`mt-4 pt-2 d-flex position-relative ${je}`,"aria-label":"Progress bar",children:[(0,u.jsx)("div",{className:`${fe}`,"data-range":"low"}),(0,u.jsx)("div",{className:`${fe}`,"data-range":"moderatelyLow"}),(0,u.jsx)("div",{className:`${fe}`,"data-range":"normal"}),(0,u.jsx)("div",{className:`${fe}`,"data-range":"moderatelyHigh"}),(0,u.jsx)("div",{className:`${fe}`,"data-range":"high"}),(0,u.jsx)("div",{"aria-label":"pin",className:`${Ne}`,style:{left:s+"%"}})]}),(0,u.jsx)("div",{className:`mt-3 ${Ce}`,"aria-label":"legend",children:(0,u.jsxs)("div",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:`lh-base fw-semibold mb-0 ${we}`,children:[(0,u.jsx)("span",{className:"pe-1",children:e.resultValue}),e.units]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("div",{className:"badge bg-purple",children:ke[e.scoreBarPosition]})})]})})]})}const Re="Pill_container__L3Joe",De="Pill_label__Bks-+",Pe="Pill_inner__+zlzq";function Be({label:e="",daysCopy:s="",className:a=""}){return(0,u.jsxs)("div",{className:`${Re} ${a} row g-0 mb-3 align-items-center`,children:[(0,u.jsx)("span",{className:`${De} col text-center text-uppercase`,children:e}),(0,u.jsx)("span",{className:`${Pe} col-4 text-center`,children:s})]})}const Le="ProgesteroneContent_barContainer__TNdkh",Ie="ProgesteroneContent_chartContainer__SpxFs";function He({unit:e="",curve:s=[],dataDay1:a={},dataDay2:t={},sampleDay1:o=0,sampleDay2:l=0,handleDataInfo:i,commentary:n="",ovulation:d=""}){const c=(0,r.useMemo)(()=>{if(G()(s))return[];const e={Low:0,Average:1,High:2,Personal:3};return Object.entries(s).map(([e,s])=>({label:{bottomCurve:"Low",meanCurve:"Average",personalCurve:"Personal",topCurve:"High"}[e],data:s.split(",").map(e=>e>0?parseFloat(e):0).slice(0,-1),style:{bottomCurve:{backgroundColor:"#EF94DD",borderColor:"#EF94DD",borderDash:[5,5],borderWidth:1},meanCurve:{backgroundColor:"#44b17a",borderColor:"#44b17a",borderWidth:1},personalCurve:{backgroundColor:"#766BCF",borderColor:"#766BCF",borderWidth:7,pointBorderWidth:1},topCurve:{backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",borderDash:[5,5],borderWidth:1}}[e]})).sort((s,a)=>e[s.label]-e[a.label])},[s]),m=(0,r.useMemo)(()=>c[0].data.map((e,s)=>0!=s&&s%7?"":s),[c[0].data]);return(0,u.jsxs)("div",{className:"row gap-3 flex-column justify-content-center align-items-center",children:[(0,u.jsx)("div",{className:"col-12",children:(0,u.jsxs)("div",{className:"row gx-2",children:[(0,u.jsx)("div",{className:"col-6",children:(0,u.jsxs)("div",{className:`p-2 ${Le}`,showShadow:!1,children:[(0,u.jsxs)("header",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",o]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("span",{className:"p-0 cursor-pointer","aria-label":"Progesterone info",onClick:()=>i({...a,sampleDay:o}),children:(0,u.jsx)(h.G,{icon:p.sq,className:"fa-fw fa-xl"})})})]}),(0,u.jsx)(Se,{data:a})]})}),(0,u.jsx)("div",{className:"col-6",children:(0,u.jsxs)("div",{className:`p-2 ${Le}`,showShadow:!1,children:[(0,u.jsxs)("header",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",l]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("span",{className:"p-0 cursor-pointer","aria-label":"Progesterone info",onClick:()=>
1i({...t,sampleDay:l}),children:(0,u.jsx)(h.G,{icon:p.sq,className:"fa-fw fa-xl"})})})]}),(0,u.jsx)(Se,{data:t})]})})]})}),(0,u.jsx)("div",{className:`col-12 mt-3 ${Ie}`,children:(0,u.jsx)(ue,{data:c,xLabels:m,customStyle:{label:{y:e},legend:{position:"top",boxHeight:30}}})}),(0,u.jsx)(Z.Z,{isTrue:n,children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)("h3",{className:"mb-2",children:"Your Progesterone result"}),(0,u.jsx)("p",{className:"lh-base text-pretty",dangerouslySetInnerHTML:{__html:n}})]})}),(0,u.jsx)(Z.Z,{isTrue:d,children:(0,u.jsx)("div",{className:"col-12 col-md-6",children:(0,u.jsx)(Be,{className:"mt-2",label:"Ovulation",daysCopy:d})})})]})}const Oe="OestradiolContent_barContainer__hWEGs",_e="OestradiolContent_chartContainer__iZP35";function Me({unit:e="",curve:s=[],dataDay1:a={},dataDay2:t={},sampleDay1:o=0,sampleDay2:l=0,handleDataInfo:i,commentary:n="",ovulation:d=""}){const c=(0,r.useMemo)(()=>{if(G()(s))return[];const e={Low:0,Average:1,High:2,Personal:3};return Object.entries(s).map(([e,s])=>({label:{bottomCurve:"Low",meanCurve:"Average",personalCurve:"Personal",topCurve:"High"}[e],data:s.split(",").map(e=>e>0?parseFloat(e):0).slice(0,-1),style:{bottomCurve:{backgroundColor:"#EF94DD",borderColor:"#EF94DD",borderDash:[5,5],borderWidth:1},meanCurve:{backgroundColor:"#44b17a",borderColor:"#44b17a",borderWidth:1},personalCurve:{backgroundColor:"#766BCF",borderColor:"#766BCF",borderWidth:7,pointBorderWidth:1},topCurve:{backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",borderDash:[5,5],borderWidth:1}}[e]})).sort((s,a)=>e[s.label]-e[a.label])},[s]),m=(0,r.useMemo)(()=>c[0].data.map((e,s)=>0!=s&&s%7?"":s),[c[0].data]);return(0,u.jsxs)("div",{className:"row gap-3 flex-column justify-content-center align-items-center",children:[(0,u.jsx)("div",{className:"col-12",children:(0,u.jsxs)("div",{className:"row gx-2",children:[(0,u.jsx)("div",{className:"col-6",children:(0,u.jsxs)("div",{variant:"secondary",className:`p-2 ${Oe}`,showShadow:!1,children:[(0,u.jsxs)("header",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",o]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("span",{className:"p-0 cursor-pointer","aria-label":"Oestradiol info",onClick:()=>i({...a,sampleDay:o}),children:(0,u.jsx)(h.G,{icon:p.sq,className:"fa-fw fa-xl"})})})]}),(0,u.jsx)(Se,{data:a})]})}),(0,u.jsx)("div",{className:"col-6",children:(0,u.jsxs)("div",{variant:"secondary",className:`p-2 ${Oe}`,showShadow:!1,children:[(0,u.jsxs)("header",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",l]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("span",{className:"p-0 cursor-pointer","aria-label":"Oestradiol info",onClick:()=>i({...t,sampleDay:l}),children:(0,u.jsx)(h.G,{icon:p.sq,className:"fa-fw fa-xl"})})})]}),(0,u.jsx)(Se,{data:t})]})})]})}),(0,u.jsx)("div",{className:`col-12 ${_e}`,children:(0,u.jsx)(ue,{data:c,xLabels:m,customStyle:{label:{y:e},legend:{position:"top"}}})}),(0,u.jsx)(Z.Z,{isTrue:n,children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)("h3",{className:"mb-2",children:"Your Oestradiol result"}),(0,u.jsx)("p",{className:"lh-base text-pretty",dangerouslySetInnerHTML:{__html:n}})]})}),(0,u.jsx)(Z.Z,{isTrue:d,children:(0,u.jsx)("div",{className:"col-12 col-md-6",children:(0,u.jsx)(Be,{className:"mt-2",label:"Ovulation",daysCopy:d})})})]})}const Te="FshContent_barContainer__2o1L6",Ae="FshContent_chartContainer__8gI8g";function We({unit:e="",curve:s=[],dataDay1:a={},dataDay2:t={},sampleDay1:o=0,sampleDay2:l=0,handleDataInfo:i,commentary:n="",ovulation:d=""}){const c=(0,r.useMemo)(()=>{if(G()(s))return[];const e={Low:0,Average:1,High:2,Personal:3};return Object.entries(s).map(([e,s])=>({label:{bottomCurve:"Low",meanCurve:"Average",personalCurve:"Personal",topCurve:"High"}[e],data:s.split(",").map(e=>e>0?parseFloat(e):0).slice(0,-1),style:{bottomCurve:{backgroundColor:"#EF94DD",borderColor:"#EF94DD",borderDash:[5,5],borderWidth:1},meanCurve:{backgroundColor:"#44b17a",borderColor:"#44b17a",borderWidth:1},personalCurve:{backgroundColor:"#766BCF",borderColor:"#766BCF",borderWidth:7,pointBorderWidth:1},topCurve:{backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",borderDash:[5,5],borderWidth:1}}[e]})).sort((s,a)=>e[s.label]-e[a.label])},[s]),m=(0,r.useMemo)(()=>c[0].data.map((e,s)=>0!=s&&s%7?"":s),[c[0].data]);return(0,u.jsxs)("div",{className:"row gap-3 flex-column justify-content-center align-items-center",children:[(0,u.jsx)("div",{className:"col-12",children:(0,u.jsxs)("div",{className:"row gx-2",children:[(0,u.jsx)("div",{className:"col-6",children:(0,u.jsxs)("div",{variant:"secondary",className:`p-2 ${Te}`,showShadow:!1,children:[(0,u.jsxs)("header",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",o
1]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("span",{className:"p-0 cursor-pointer","aria-label":"FSH info",onClick:()=>i({...a,sampleDay:o}),children:(0,u.jsx)(h.G,{icon:p.sq,className:"fa-fw fa-xl"})})})]}),(0,u.jsx)(Se,{data:a})]})}),(0,u.jsx)("div",{className:"col-6",children:(0,u.jsxs)("div",{variant:"secondary",className:`p-2 ${Te}`,showShadow:!1,children:[(0,u.jsxs)("header",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",l]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("span",{className:"p-0 cursor-pointer","aria-label":"FSH info",onClick:()=>i({...t,sampleDay:l}),children:(0,u.jsx)(h.G,{icon:p.sq,className:"fa-fw fa-xl"})})})]}),(0,u.jsx)(Se,{data:t})]})})]})}),(0,u.jsx)("div",{className:`col-12 mt-3 ${Ae}`,children:(0,u.jsx)(ue,{data:c,xLabels:m,customStyle:{label:{y:e},legend:{position:"top"}}})}),(0,u.jsx)(Z.Z,{isTrue:n,children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)("h3",{className:"mb-2",children:"Your FSH result"}),(0,u.jsx)("p",{className:"lh-base text-pretty",dangerouslySetInnerHTML:{__html:n}})]})}),(0,u.jsx)(Z.Z,{isTrue:d,children:(0,u.jsx)("div",{className:"col-12 col-md-6",children:(0,u.jsx)(Be,{className:"mt-2",label:"Ovulation",daysCopy:d})})})]})}const Ee="LhContent_barContainer__4BNL4",ze="LhContent_chartContainer__ALqAR";function $e({unit:e="",curve:s=[],dataDay1:a={},dataDay2:t={},sampleDay1:o=0,sampleDay2:l=0,handleDataInfo:i,commentary:n="",ovulation:d=""}){const c=(0,r.useMemo)(()=>{if(G()(s))return[];const e={Low:0,Average:1,High:2,Personal:3};return Object.entries(s).map(([e,s])=>({label:{bottomCurve:"Low",meanCurve:"Average",personalCurve:"Personal",topCurve:"High"}[e],data:s.split(",").map(e=>e>0?parseFloat(e):0).slice(0,-1),style:{bottomCurve:{backgroundColor:"#EF94DD",borderColor:"#EF94DD",borderDash:[5,5],borderWidth:1},meanCurve:{backgroundColor:"#44b17a",borderColor:"#44b17a",borderWidth:1},personalCurve:{backgroundColor:"#766BCF",borderColor:"#766BCF",borderWidth:7,pointBorderWidth:1},topCurve:{backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",borderDash:[5,5],borderWidth:1}}[e]})).sort((s,a)=>e[s.label]-e[a.label])},[s]),m=(0,r.useMemo)(()=>c[0].data.map((e,s)=>0!=s&&s%7?"":s),[c[0].data]);return(0,u.jsxs)("div",{className:"row gap-3 flex-column justify-content-center align-items-center",children:[(0,u.jsx)("div",{className:"col-12",children:(0,u.jsxs)("div",{className:"row gx-2",children:[(0,u.jsx)("div",{className:"col-6",children:(0,u.jsxs)("div",{variant:"secondary",className:`p-2 ${Ee}`,showShadow:!1,children:[(0,u.jsxs)("header",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",o]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("span",{className:"p-0 cursor-pointer","aria-label":"LH info",onClick:()=>i({...a,sampleDay:o}),children:(0,u.jsx)(h.G,{icon:p.sq,className:"fa-fw fa-xl"})})})]}),(0,u.jsx)(Se,{data:a})]})}),(0,u.jsx)("div",{className:"col-6",children:(0,u.jsxs)("div",{variant:"secondary",className:`p-2 ${Ee}`,showShadow:!1,children:[(0,u.jsxs)("header",{className:"row",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",l]})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("span",{className:"p-0 cursor-pointer","aria-label":"LH info",onClick:()=>i({...t,sampleDay:l}),children:(0,u.jsx)(h.G,{icon:p.sq,className:"fa-fw fa-xl"})})})]}),(0,u.jsx)(Se,{data:t})]})})]})}),(0,u.jsx)("div",{className:`col-12 mt-3 ${ze}`,children:(0,u.jsx)(ue,{data:c,xLabels:m,customStyle:{label:{y:e},legend:{position:"top"}}})}),(0,u.jsx)(Z.Z,{isTrue:n,children:(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsx)("h3",{className:"mb-2",children:"Your LH result"}),(0,u.jsx)("p",{className:"lh-base text-pretty",dangerouslySetInnerHTML:{__html:n}})]})}),(0,u.jsx)(Z.Z,{isTrue:d,children:(0,u.jsx)("div",{className:"col-12 col-md-6",children:(0,u.jsx)(Be,{className:"mt-2",label:"Ovulation",daysCopy:d})})})]})}const Ue={modal:"BiomarkerInfoModal_modal__I2KUr",modalHeader:"BiomarkerInfoModal_modalHeader__N9a96",modalContent:"BiomarkerInfoModal_modalContent__znKIl",dot:"BiomarkerInfoModal_dot__NAv0q",range:"BiomarkerInfoModal_range__d23OJ",borderBottom:"BiomarkerInfoModal_borderBottom__2sZtR",modalFooter:"BiomarkerInfoModal_modalFooter__6etSG"},Ze={1:"Low",2:"Moderately Low",3:"Healthy",4:"Moderately High",5:"High"},Ve=(0,r.memo)(function({data:e}){const{markerName:s="",markerRanges:a="",sampleDay:t=0}=e||{},o=(0,r.useMemo)(()=>a?a.split(",").reduce((e,s,r)=>{let t=`${a.split(",")[r-1]}-${s}`;return 0===r&&(t=`<${s}`),r===a.split(",").length-1?[...e,{label:Ze[r+1],status:Ze[r+1].toLowerCase().replaceAll(" ","-"),range:t},{label:Ze[r+2],status:Ze[r+2].toLowerCase().replaceAll(" ","-"),range:`${s}<`}]:[...e,{label:Ze[r+1],status:Ze[r+1].toLowerCase().replaceAll(" ","-"),range:t}]},[]):[],[a]);return(0,u.jsxs)("div",{className:`${Ue.modal}`,children:[(0,u.jsxs)("header",{className:`${Ue.modalHeader} mb-3 p-3 align-items-center`,children:[(0,u.jsx)("div",{className:"col-1"}),(0,u.jsxs)("div",{className:"row g-0 align-items-center position-relative",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsx)("h2",{className:"mb-0 fw-semibold text-center py-1",children:"Your result info"})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})})]})]}),(0,u.jsx)("div",{className:`container-fluid px-0 ${Ue.modalContent}`,children:(0,u.jsxs)("div",{className:"row gx-4 mx-0 my-2",children:[(0,u.jsx)("h3",{className:`mt-4 mb-4 text-center ${["lh","fsh"].some(e=>e===s)?"text-uppercase":"text-capitalize"} `,children:s}),(0,u.jsxs)("div",{className:"col-12",children:[(0,u.jsxs)("div",{variant:"secondary",className:`p-3 mb-4 ${Ue.barC
1ontainer}`,children:[(0,u.jsx)("header",{className:"row",children:(0,u.jsx)("div",{className:"col",children:(0,u.jsxs)("p",{className:"lh-base fw-semibold mb-0",children:["Day ",t]})})}),(0,u.jsx)(Se,{data:e})]}),(0,u.jsx)("h5",{className:"mb-3",children:"Range references"}),(0,u.jsx)("div",{className:"row",children:o.map((e,s)=>(0,u.jsxs)("div",{className:"col d-flex gap-2 flex-column text-center align-items-center",children:[(0,u.jsx)("span",{className:Ue.dot,"data-status":e.status}),(0,u.jsx)("small",{className:`${Ue.range} mb-0 fw-semibold`,children:e.range}),(0,u.jsx)("small",{className:"text-pretty",children:e.label})]},s))}),(0,u.jsxs)("p",{className:"text-pretty mt-5",children:["These are person specific reference ranges and are based on various factors including what day you took your samples and your cycle length. These are ",(0,u.jsx)("strong",{children:"not"})," standard lab reference ranges. Standard lab references are based on whole populations and are not useful for understanding your personalised hormone levels."]})]})]})})]})});var Ye=a(74473),qe=a(43781),Ge=a(5170),Ke=a(5286);const Xe="YourHormones_container__V1-Sa",Je="YourHormones_box__hq-hk",Qe="YourHormones_tabHeaderContainer__mtu9A",es="YourHormones_tabContentContainer__i6oc+",ss=(0,r.memo)(function({handleNextTab:e,handleBackTab:s,result:a={}}){const[t,o]=(0,r.useState)({}),[l,i]=(0,r.useState)("progesterone-tab");(0,r.useEffect)(()=>()=>{(0,Ke.z)("biomarkerInfo")},[]);const n=e=>{o(e),(0,Ge.u)("biomarkerInfo")},d=(0,r.useMemo)(()=>G()(a.results[0])?[]:Object.entries(a.results[0]||{}).filter(([e,s])=>["progesterone","oestradiol","fsh","lh"].some(s=>s===e)).map(([e,s])=>({markerName:e,markerValue:s.barPercentage,markerRanges:s.barRanges,range:s.barRange,units:s.units,resultValue:s.resultValue,scoreBarPosition:s.scoreBarPosition,score:s.score})),[a.results[0]]),c=(0,r.useMemo)(()=>G()(a.results[1])?[]:Object.entries(a.results[1]||{}).filter(([e,s])=>["progesterone","oestradiol","fsh","lh"].some(s=>s===e)).map(([e,s])=>({markerName:e,markerValue:s.barPercentage,markerRanges:s.barRanges,range:s.barRange,units:s.units,resultValue:s.resultValue,scoreBarPosition:s.scoreBarPosition,score:s.score})),[a.results[1]]),m=(0,r.useMemo)(()=>[{id:"progesterone",header:{label:"Progesterone",isActive:"progesterone-tab"===l}
1,content:(0,u.jsx)(He,{unit:"nmol/L",curve:a.curves.progesterone,sampleDay1:a.results[0].sampleDay,sampleDay2:a.results[1].sampleDay,dataDay1:d.find(e=>"progesterone"===e.markerName),dataDay2:c.find(e=>"progesterone"===e.markerName),commentary:a.commentaries.progesterone,ovulation:a.ovulationMessage,handleDataInfo:n})},{id:"oestradiol",header:{label:"Oestradiol",isActive:"oestradiol-tab"===l},content:(0,u.jsx)(Me,{unit:"pmol/L",curve:a.curves.oestradiol,sampleDay1:a.results[0].sampleDay,sampleDay2:a.results[1].sampleDay,dataDay1:d.find(e=>"oestradiol"===e.markerName),dataDay2:c.find(e=>"oestradiol"===e.markerName),commentary:a.commentaries.oestradiol,ovulation:a.ovulationMessage,handleDataInfo:n})},{id:"fsh",header:{label:"FSH",isActive:"fsh-tab"===l},content:(0,u.jsx)(We,{unit:"IU/L",curve:a.curves.fsh,sampleDay1:a.results[0].sampleDay,sampleDay2:a.results[1].sampleDay,dataDay1:d.find(e=>"fsh"===e.markerName),dataDay2:c.find(e=>"fsh"===e.markerName),commentary:a.commentaries.fsh,ovulation:a.ovulationMessage,handleDataInfo:n})},{id:"lh",header:{label:"LH",isActive:"lh-tab"===l},content:(0,u.jsx)($e,{unit:"iu/L",curve:a.curves.lh,sampleDay1:a.results[0].sampleDay,sampleDay2:a.results[1].sampleDay,dataDay1:d.find(e=>"lh"===e.markerName),dataDay2:c.find(e=>"lh"===e.markerName),commentary:a.commentaries.lh,ovulation:a.ovulationMessage,handleDataInfo:n})}],[l,d,c,a.results[0],a.results[1]]),h=e=>{const s=e.target.id;i(s)};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"d-flex flex-column gap-4 px-2 px-lg-0",children:[(0,u.jsx)("div",{className:"col-12",children:(0,u.jsx)("p",{className:"lh-base text-pretty",children:"During your menstrual cycle, four hormones work in harmony. FSH rises early to develop eggs, peaking before ovulation. Oestradiol climbs steadily as eggs mature, thickening your womb lining and peaking pre-ovulation. LH surges dramatically mid-cycle to trigger ovulation. Progesterone stays low until after ovulation, then rises to maintain your womb lining before dropping sharply to trigger your period. This creates your monthly hormonal rhythm."})}),(0,u.jsxs)("div",{className:`col-12 ${Xe}`,children:[(0,u.jsx)(qe.G,{id:"your-hormones-tab-header",variant:"tab",className:Qe,children:m.map(e=>(0,u.jsx)(qe.G.Item,{id:e.id,className:"py-3",isActive:e.header.isActive,onClick:h,children:e.header.label},e.id))}),(0,u.jsx)("div",{className:`${Je} ${es} px-3 py-4`,children:(0,u.jsx)(qe.I,{id:"your-hormones-tab-content",children:m.map(e=>(0,u.jsx)(qe.I.Item,{id:e.id,isActive:e.header.isActive,children:e.content},e.id))})})]}),(0,u.jsxs)("div",{className:"col-12 d-flex justify-content-center align-items-center mt-4 mb-5 flex-column gap-3",children:[(0,u.jsx)("button",{className:"btn btn-primary px-5",onClick:e,children:"Next"}),(0,u.jsx)("small",{children:"Next, lets see what all this means"}),(0,u.jsx)("button",{variant:"link-default",onClick:s,className:"btn btn-simple-primary px-5 py-1",children:"Back"})]})]}),(0,u.jsx)(Ye.Z,{id:"biomarkerInfo",onClose:()=>o({}),children:(0,u.jsx)(Ve,{data:t})})]})}),as=a.p+"static/media/thom-phillips.3bf40349f48ed18a049f.webp",rs="NextSteps_box__7Y0jC",ts="NextSteps_modalContainer__ff1wa",os="NextSteps_modalHeader__dumv0",ls="NextSteps_modalContent__pPoJ9",is="NextSteps_doctorPicture__OK3Uf",ns=(0,r.memo)(function({handleNextTab:e,handleBackTab:s,advices:a={}}){const[t,o]=(0,r.useState)({}),l=(0,r.useMemo)(()=>{var e;return G()(null===a||void 0===a?void 0:a.highlightComments)?[]:null===a||void 0===a||null===(e=a.highlightComments)||void 0===e?void 0:e.map(e=>{var s;return{icon:null!==(s=e.icon)&&void 0!==s?s:"",content:e.content,title:e.title}}).slice(0,1)},[a.highlightComments]);(0,r.useMemo)(()=>{var e;return G()(null===a||void 0===a?void 0:a.moreAdvice)?[]:null===a||void 0===a||null===(e=a.moreAdvice)||void 0===e?void 0:e.map(e=>{var s;return{icon:null!==(s=e.icon)&&void 0!==s?s:"",content:e.content,title:e.title}})},[a.moreAdvice]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"row flex-column gap-4 px-2 px-lg-0",children:[l.map((e,s)=>
1(0,u.jsx)("div",{className:`col-12 ${rs}`,children:(0,u.jsx)("div",{className:"p-4 d-flex gap-3",children:(0,u.jsxs)("div",{className:"col",children:[(0,u.jsx)("h3",{className:"text-balance lh-base mb-2",children:e.title}),(0,u.jsx)("p",{className:"lh-base text-pretty mb-0",dangerouslySetInnerHTML:{__html:e.content}})]})})},s)),(0,u.jsxs)("div",{className:"row align-items-center px-4 mb-5",children:[(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("img",{src:as,alt:"Dr Thom Phillips",className:is})}),(0,u.jsxs)("div",{className:"col",children:[(0,u.jsx)("h3",{children:"Dr Thom Phillips"}),(0,u.jsx)("p",{className:"mb-0",children:"BSc. (Hons) MSc. MB BCh. MRCGP. Dip SEM. PGCert (Diabetes)"})]})]}),(0,u.jsxs)("div",{className:"col-12 d-flex justify-content-center align-items-center mt-4 mb-5 flex-column gap-3",children:[(0,u.jsx)("button",{className:"btn btn-primary px-5",onClick:e,children:"Next"}),(0,u.jsx)("small",{children:"Next up, we look at what you can do with this information"}),(0,u.jsx)("button",{onClick:s,className:"btn btn-simple-primary px-5 py-1",children:"Back"})]})]}),(0,u.jsx)(Ye.Z,{id:"adviceModal",onClose:()=>{o({})},children:(0,u.jsxs)("div",{className:`${ts} container-fluid`,children:[(0,u.jsxs)("header",{className:`${os} row p-3 align-items-center`,children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsx)("h2",{className:"mb-0 text-center fw-normal",children:null===t||void 0===t?void 0:t.title})}),(0,u.jsx)("div",{className:"col-auto",children:(0,u.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})})]}),(0,u.jsx)("section",{className:`${ls} pt-3`,children:(0,u.jsx)("div",{className:"row py-3",children:(0,u.jsx)("div",{className:"col-12",children:(0,u.jsx)("p",{className:"lh-base text-pretty",dangerouslySetInnerHTML:{__html:null===t||void 0===t?void 0:t.content}})})})})]})})]})}),ds="Insights_post__YagYs",cs="Insights_iconContainer__x0G-M",ms=(0,r.memo)(function({handleBackTab:e,data:s=[]}){const a=null===s||void 0===s?void 0:s.map(e=>{var s;return{icon:null!==(s=e.icon)&&void 0!==s?s:"",title:e.title,url:e.url}});return(0,u.jsxs)("div",{className:"row flex-column gap-4 px-2 px-lg-0",children:[(0,u.jsx)("p",{className:"lh-base text-pretty",children:"Based on your reasons for doing this test, we\u2019ve pulled together some articles you might find helpful."}),a.map(({icon:e,title:s,url:a},r)=>{let t=new URL(a);return window.config.isNativeApp&&t.searchParams.set("external","true"),(0,u.jsx)("div",{className:"col-12",children:(0,u.jsxs)("a",{href:t,target:"_blank",className:`${ds} d-flex align-items-center gap-4`,children:[(0,u.jsx)("div",{className:`text-decoration-none col-4 col-md-3 col-lg-2 ${cs}`,children:(0,u.jsx)(h.G,{icon:J.Tzf})}),(0,u.jsx)("div",{className:"col",children:(0,u.jsx)("h2",{className:"text-balance",children:s})})]})},r)}),(0,u.jsx)("div",{className:"col-12 d-flex justify-content-center align-items-center mt-4 mb-5 flex-column gap-3",children:(0,u.jsx)("button",{onClick:e,className:"btn btn-simple-primary px-5 py-1",children:"Back"})})]})}),hs="MyFormResultV2_header__f8Nkl",ps="MyFormResultV2_exportBtn__GXWhi";var us=a(36546);const xs=10,gs=.7,vs=30,bs=10,ys={fill:!1,borderWidth:7,pointBorderWidth:1,backgroundColor:"#fff",borderColor:"#fff"},js={legend:{display:!0,boxWidth:10,boxHeight:10,padding:15,fontSize:12,fontWeight:500,backgroundColor:"#FFFFFF",color:"#FFFFFF"},axis:{xDisplay:!0,yDisplay:!0},label:{xDisplay:!0,yDisplay:!0,x:"DAY",y:"nmol/L",fontSize:10,color:"#b3b3b3"},colors:["#C080E1","#85E1FE","#FDB5D2","#A7C1FF"],tension:.3},fs={borderRadius:20,backgroundChartBorderRadius:0,backgroundChartColor:"lightgrey",colorsRequired:"#756dcd",backgroundColor:"#ffffff",hasBlob:!1,hasGlow:!1,circumference:360,rotation:200,animate:!1,borderWidth:0,borderColor:"#ffffff",showBackground:!1,cutout:"85%",rootMargin:"0px 0px -50px 0px"},Ns={Low:0,Average:1,High:2,Personal:3},Cs=({type:e,data:s,width:a=794,height:r=315})=>{if(!e||G()(s)||a<1||r<1)throw new Error("Invalid parameters for chart generation"),"";if(!["lh","fsh","allHormones","progesterone","oestradiol","formScore"].some(s=>s===e))throw new Error("Invalid chart type. Supported types are: 'lh', 'fsh', 'oestradiol', 'progesterone', 'formScore', and 'allHormones'");"formScore"===e&&(a=400,r=400);const t={lh:Rs,fsh:Ss,allHormones:ws,progesterone:Fs,oestradiol:ks,formScore:Ds}[e](s,a,r);if(!t)throw new Error(`Failed to generate chart image for type: ${e}`);return t},ws=(e,s,a)=>{var r;const t=Object.values(e.curves).flatMap(e=>e.personalCurve.split(",")).map(e=>parseFloat(""===e?0:e)),o=Math.max(...t),l=(e,s=1)=>o?e/o*100*s:0,i=e.curves.progesterone.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?l(e,xs):0).slice(0,-1),n=e.curves.oestradiol.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?l(e,gs):0).slice(0,-1),d=e.curves.fsh.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?l(e,vs):0).slice(0,-1),c=e.curves.lh.personalCurve.split(",").map(e=>parseFloat(e)).map(e=>e>0?l(e,bs):0).slice(0,-1),m=[{label:"Progesterone",data:i,style:{backgroundColor:"#A7C1FF33",borderColor:"#A7C1FF",borderWidth:3,fill:!0}}
1,{label:"Oestradiol",data:n,style:{backgroundColor:"#FDB5D233",borderColor:"#FDB5D2",borderWidth:3,fill:!0}},{label:"FSH",data:d,style:{backgroundColor:"#C080E133",borderColor:"#C080E1",borderWidth:3,fill:!0}},{label:"LH",data:c,style:{backgroundColor:"#85E1FE33",borderColor:"#85E1FE",borderWidth:3,fill:!0}}],h=i.map((e,s)=>0!=s&&s%7&&s!=i?"":s),p={...js,label:{xDisplay:!0,yDisplay:!1,x:"DAY",y:"",fontSize:10,color:"#5b5b5b"},axis:{yDisplay:!1,backgroundColor:"#FFFFFF"},tension:.4,backgroundColor:"#FFFFFF"},u={labels:h,datasets:m.map(e=>{var s;return{label:(null===e||void 0===e?void 0:e.label)||"",backgroundColor:(null===e||void 0===e||null===(s=e.style)||void 0===s?void 0:s.backgroundColor)||"#FFFFFF",data:(null===e||void 0===e?void 0:e.data)||[],...ys,...(null===e||void 0===e?void 0:e.style)||{}}})},x={responsive:!0,animation:!1,maintainAspectRatio:!1,plugins:{customCanvasBackgroundColor:{color:p.backgroundColor},legend:{display:p.legend.display,position:null!==(r=p.legend.position)&&void 0!==r?r:"bottom",labels:{boxWidth:p.legend.boxWidth,boxHeight:p.legend.boxHeight,padding:p.legend.padding,font:{size:p.legend.fontSize,weight:p.legend.fontWeight},usePointStyle:!0,pointStyle:"circle"},backgroundColor:p.legend.backgroundColor,color:p.legend.color},title:{display:!1}},elements:{point:{radius:0}},tension:p.tension,scales:{x:{display:p.axis.xDisplay,backgroundColor:"#FFFFFF",title:{display:p.label.xDisplay,text:p.label.x,font:{size:p.label.fontSize},color:p.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{autoSkip:!1,maxRotation:0,minRotation:0,min:0,max:31,stepSize:7,z:99999}},y:{display:p.axis.yDisplay,backgroundColor:p.axis.backgroundColor,title:{display:p.label.yDisplay,text:p.label.y,font:{size:p.label.fontSize},color:p.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{scaleBeginAtZero:!1,beginAtZero:!1,min:0,suggestedMin:0,autoSkip:!1,maxRotation:0,minRotation:0,z:99999}}}},g=document.createElement("canvas");g.setAttribute("id","tempCanvas"),document.body.appendChild(g),document.getElementById("tempCanvas").style.maxWidth=s+"px",document.getElementById("tempCanvas").style.maxHeight=a+"px",document.getElementById("tempCanvas").style.display="none";const v=g.getContext("2d");v.canvas.width=s,v.canvas.height=a;const b=new us.Z(v,{type:"line",data:u,options:x}).toBase64Image();return g.remove(),b},Fs=(e,s,a)=>{var r,t,o,l,i,n;if(G()(null===e||void 0===e||null===(r=e.curves)||void 0===r?void 0:r.progesterone))throw new Error("No progesterone data available for chart generation");if(s<1||a<1)throw new Error("Invalid width or height for chart generation");const d=Object.entries((null===e||void 0===e||null===(t=e.curves)||void 0===t?void 0:t.progesterone)||{}).map(([e,s])=>({label:{bottomCurve:"Low",meanCurve:"Average",personalCurve:"Personal",topCurve:"High"}[e],data:s.split(",").map(e=>e>0?parseFloat(e):0).slice(0,-1),...{bottomCurve:{backgroundColor:"#EF94DD",borderColor:"#EF94DD",borderDash:[5,5],borderWidth:1},meanCurve:{backgroundColor:"#44b17a",borderColor:"#44b17a",borderWidth:1},personalCurve:{backgroundColor:"#766BCF",borderColor:"#766BCF",borderWidth:7,pointBorderWidth:1},topCurve:{backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",borderDash:[5,5],borderWidth:1}}[e]||{}})).sort((e,s)=>Ns[e.label]-Ns[s.label]),c=d[0].data.map((e,s)=>0!=s&&s%7?"":s),m={...js,label:{y:(null===(o=e.results)||void 0===o||null===(l=o[0])||void 0===l||null===(i=l.progesterone)||void 0===i?void 0:i.unit)||"nmol/L"},legend:{position:"top"}},h={labels:c,datasets:d},p={responsive:!0,animation:!1,maintainAspectRatio:!1,plugins:{customCanvasBackgroundColor:{color:m.backgroundColor},legend:{display:m.legend.display,position:null!==(n=m.legend.position)&&void 0!==n?n:"bottom",labels:{boxWidth:m.legend.boxWidth,boxHeight:m.legend.boxHeight,padding:m.legend.padding,font:{size:m.legend.fontSize,weight:m.legend.fontWeight},usePointStyle:!0,pointStyle:"circle"},backgroundColor:m.legend.backgroundColor,color:m.legend.color},title:{display:!1}},elements:{point:{radius:0}},tension:m.tension,scales:{x:{display:m.axis.xDisplay,backgroundColor:"#FFFFFF",title:{display:m.label.xDisplay,text:m.label.x,font:{size:m.label.fontSize},color:m.label.color}
1,legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{autoSkip:!1,maxRotation:0,minRotation:0,min:0,max:31,stepSize:7,z:99999}},y:{display:m.axis.yDisplay,backgroundColor:m.axis.backgroundColor,title:{display:m.label.yDisplay,text:m.label.y,font:{size:m.label.fontSize},color:m.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{scaleBeginAtZero:!1,beginAtZero:!1,min:0,suggestedMin:0,autoSkip:!1,maxRotation:0,minRotation:0,z:99999}}}},u=document.createElement("canvas");u.setAttribute("id","tempCanvas"),document.body.appendChild(u),document.getElementById("tempCanvas").style.maxWidth=s+"px",document.getElementById("tempCanvas").style.maxHeight=a+"px",document.getElementById("tempCanvas").style.display="none";const x=u.getContext("2d");x.canvas.width=s,x.canvas.height=a;const g=new us.Z(x,{type:"line",data:h,options:p}).toBase64Image();return u.remove(),g},ks=(e,s,a)=>{var r,t,o,l,i,n;if(G()(null===e||void 0===e||null===(r=e.curves)||void 0===r?void 0:r.oestradiol))throw new Error("No oestradiol data available for chart generation");if(s<1||a<1)throw new Error("Invalid width or height for chart generation");const d=Object.entries((null===e||void 0===e||null===(t=e.curves)||void 0===t?void 0:t.oestradiol)||{}).map(([e,s])=>({label:{bottomCurve:"Low",meanCurve:"Average",personalCurve:"Personal",topCurve:"High"}[e],data:s.split(",").map(e=>e>0?parseFloat(e):0).slice(0,-1),...{bottomCurve:{backgroundColor:"#EF94DD",borderColor:"#EF94DD",borderDash:[5,5],borderWidth:1},meanCurve:{backgroundColor:"#44b17a",borderColor:"#44b17a",borderWidth:1},personalCurve:{backgroundColor:"#766BCF",borderColor:"#766BCF",borderWidth:7,pointBorderWidth:1},topCurve:{backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",borderDash:[5,5],borderWidth:1}}[e]||{}})).sort((e,s)=>Ns[e.label]-Ns[s.label]),c=d[0].data.map((e,s)=>0!=s&&s%7?"":s),m={...js,label:{y:(null===(o=e.results)||void 0===o||null===(l=o[0])||void 0===l||null===(i=l.oestradiol)||void 0===i?void 0:i.unit)||"nmol/L"},legend:{position:"top"}},h={labels:c,datasets:d},p={responsive:!0,animation:!1,maintainAspectRatio:!1,plugins:{customCanvasBackgroundColor:{color:m.backgroundColor},legend:{display:m.legend.display,position:null!==(n=m.legend.position)&&void 0!==n?n:"bottom",labels:{boxWidth:m.legend.boxWidth,boxHeight:m.legend.boxHeight,padding:m.legend.padding,font:{size:m.legend.fontSize,weight:m.legend.fontWeight},usePointStyle:!0,pointStyle:"circle"},backgroundColor:m.legend.backgroundColor,color:m.legend.color},title:{display:!1}},elements:{point:{radius:0}},tension:m.tension,scales:{x:{display:m.axis.xDisplay,backgroundColor:"#FFFFFF",title:{display:m.label.xDisplay,text:m.label.x,font:{size:m.label.fontSize},color:m.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{autoSkip:!1,maxRotation:0,minRotation:0,min:0,max:31,stepSize:7,z:99999}},y:{display:m.axis.yDisplay,backgroundColor:m.axis.backgroundColor,title:{display:m.label.yDisplay,text:m.label.y,font:{size:m.label.fontSize},color:m.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{scaleBeginAtZero:!1,beginAtZero:!1,min:0,suggestedMin:0,autoSkip:!1,maxRotation:0,minRotation:0,z:99999}}}},u=document.createElement("canvas");u.setAttribute("id","tempCanvas"),document.body.appendChild(u),document.getElementById("tempCanvas").style.maxWidth=s+"px",document.getElementById("tempCanvas").style.maxHeight=a+"px",document.getElementById("tempCanvas").style.display="none";const x=u.getContext("2d");x.canvas.width=s,x.canvas.height=a;const g=new us.Z(x,{type:"line",data:h,options:p}).toBase64Image();return u.remove(),g},Ss=(e,s,a)=>{var r,t,o,l,i,n;if(G()(null===e||void 0===e||null===(r=e.curves)||void 0===r?void 0:r.fsh))throw new Error("No fsh data available for chart generation");if(s<1||a<1)throw new Error("Invalid width or height for chart generation");const d=Object.entries((null===e||void 0===e||null===(t=e.curves)||void 0===t?void 0:t.fsh)||{}).map(([e,s])=>({label:{bottomCurve:"Low",meanCurve:"Average",personalCurve:"Personal",topCurve:"High"}[e],data:s.split(",").map(e=>e>0?parseFloat(e):0).slice(0,-1),...{bottomCurve:{backgroundColor:"#EF94DD",borderColor:"#EF94DD",borderDash:[5,5],borderWidth:1},meanCurve:{backgroundColor:"#44b17a",borderColor:"#44b17a",borderWidth:1},personalCurve:{backgroundColor:"#766BCF",borderColor:"#766BCF",borderWidth:7,pointBorderWidth:1},topCurve:{backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",borderDash:[5,5],borderWidth:1}}[e]||{}})).sort((e,s)=>Ns[e.label]-Ns[s.label]),c=d[0].data.map((e,s)=>0!=s&&s%7?"":s),m={...js,label:{y:(null===(o=e.results)||void 0===o||null===(l=o[0])||void 0===l||null===(i=l.fsh)||void 0===i?void 0:i.unit)||"nmol/L"},legend:{position:"top"}},h={labels:c,datasets:d},p={responsive:!0,animation:!1,maintainAspectRatio:!1,plugins:{customCanvasBackgroun
1dColor:{color:m.backgroundColor},legend:{display:m.legend.display,position:null!==(n=m.legend.position)&&void 0!==n?n:"bottom",labels:{boxWidth:m.legend.boxWidth,boxHeight:m.legend.boxHeight,padding:m.legend.padding,font:{size:m.legend.fontSize,weight:m.legend.fontWeight},usePointStyle:!0,pointStyle:"circle"},backgroundColor:m.legend.backgroundColor,color:m.legend.color},title:{display:!1}},elements:{point:{radius:0}},tension:m.tension,scales:{x:{display:m.axis.xDisplay,backgroundColor:"#FFFFFF",title:{display:m.label.xDisplay,text:m.label.x,font:{size:m.label.fontSize},color:m.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{autoSkip:!1,maxRotation:0,minRotation:0,min:0,max:31,stepSize:7,z:99999}},y:{display:m.axis.yDisplay,backgroundColor:m.axis.backgroundColor,title:{display:m.label.yDisplay,text:m.label.y,font:{size:m.label.fontSize},color:m.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{scaleBeginAtZero:!1,beginAtZero:!1,min:0,suggestedMin:0,autoSkip:!1,maxRotation:0,minRotation:0,z:99999}}}},u=document.createElement("canvas");u.setAttribute("id","tempCanvas"),document.body.appendChild(u),document.getElementById("tempCanvas").style.maxWidth=s+"px",document.getElementById("tempCanvas").style.maxHeight=a+"px",document.getElementById("tempCanvas").style.display="none";const x=u.getContext("2d");x.canvas.width=s,x.canvas.height=a;const g=new us.Z(x,{type:"line",data:h,options:p}).toBase64Image();return u.remove(),g},Rs=(e,s,a)=>{var r,t,o,l,i,n;if(G()(null===e||void 0===e||null===(r=e.curves)||void 0===r?void 0:r.lh))throw new Error("No lh data available for chart generation");if(s<1||a<1)throw new Error("Invalid width or height for chart generation");const d=Object.entries((null===e||void 0===e||null===(t=e.curves)||void 0===t?void 0:t.lh)||{}).map(([e,s])=>({label:{bottomCurve:"Low",meanCurve:"Average",personalCurve:"Personal",topCurve:"High"}[e],data:s.split(",").map(e=>e>0?parseFloat(e):0).slice(0,-1),...{bottomCurve:{backgroundColor:"#EF94DD",borderColor:"#EF94DD",borderDash:[5,5],borderWidth:1},meanCurve:{backgroundColor:"#44b17a",borderColor:"#44b17a",borderWidth:1},personalCurve:{backgroundColor:"#766BCF",borderColor:"#766BCF",borderWidth:7,pointBorderWidth:1},topCurve:{backgroundColor:"#5BC5F2",borderColor:"#5BC5F2",borderDash:[5,5],borderWidth:1}}[e]||{}})).sort((e,s)=>Ns[e.label]-Ns[s.label]),c=d[0].data.map((e,s)=>0!=s&&s%7?"":s),m={...js,label:{y:(null===(o=e.results)||void 0===o||null===(l=o[0])||void 0===l||null===(i=l.lh)||void 0===i?void 0:i.unit)||"nmol/L"},legend:{position:"top"}},h={labels:c,datasets:d},p={responsive:!0,animation:!1,maintainAspectRatio:!1,plugins:{customCanvasBackgroundColor:{color:m.backgroundColor},legend:{display:m.legend.display,position:null!==(n=m.legend.position)&&void 0!==n?n:"bottom",labels:{boxWidth:m.legend.boxWidth,boxHeight:m.legend.boxHeight,padding:m.legend.padding,font:{size:m.legend.fontSize,weight:m.legend.fontWeight},usePointStyle:!0,pointStyle:"circle"},backgroundColor:m.legend.backgroundColor,color:m.legend.color},title:{display:!1}},elements:{point:{radius:0}},tension:m.tension,scales:{x:{display:m.axis.xDisplay,backgroundColor:"#FFFFFF",title:{display:m.label.xDisplay,text:m.label.x,font:{size:m.label.fontSize},color:m.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{autoSkip:!1,maxRotation:0,minRotation:0,min:0,max:31,stepSize:7,z:99999}},y:{display:m.axis.yDisplay,backgroundColor:m.axis.backgroundColor,title:{display:m.label.yDisplay,text:m.label.y,font:{size:m.label.fontSize},color:m.label.color},legend:{display:!1},grid:{display:!1,borderColor:"#b3b3b3",drawBorder:!0,drawTicks:!0,tickColor:"#b3b3b3",z:9999},ticks:{scaleBeginAtZero:!1,beginAtZero:!1,min:0,suggestedMin:0,autoSkip:!1,maxRotation:0,minRotation:0,z:99999}}}},u=document.createElement("canvas");u.setAttribute("id","tempCanvas"),document.body.appendChild(u),document.getElementById("tempCanvas").style.maxWidth=s+"px",document.getElementById("tempCanvas").style.maxHeight=a+"px",document.getElementById("tempCanvas").style.display="none";const x=u.getContext("2d");x.canvas.width=s,x.canvas.height=a;const g=new us.Z(x,{type:"line",data:h,options:p}).toBase64Image();return u.remove(),g},Ds=(e,s,a)=>{const r=Math.round(parseFloat(e.formScore||0)),t={...fs,circumference:320,cutout:"85%"},o=[{data:[r,100-r],backgroundColor:[t.colorsRequired,t.backgroundChartColor]}],l={circumference:t.circumference,rotation:t.rotation,animation:!1,responsive:!0,cutout:t.cutout,borderColor:t.borderColor,borderWidth:t.borderWidth,hoverOffset:0,layout:{padding:19.5}
1,plugins:{legend:!1,tooltip:!1,title:!1,customCanvasBackgroundColor:{color:"#ffffff"}}},i={id:"centerText",beforeDraw:e=>{const{ctx:s,width:a,height:t}=e;s.save();const o=a/2,l=t/2,i=Math.min(a,t)/2-5,n=l+6;s.beginPath(),s.arc(o,n,i,0,2*Math.PI),s.fillStyle="#ffffff",s.fill(),s.textAlign="center",s.textBaseline="middle",s.fillStyle="#333333",s.font="128px Poppins",s.fillText(r.toString(),o,n+20),s.restore()}},n=[i],d=document.createElement("canvas");d.setAttribute("id","tempCanvas"),document.body.appendChild(d),document.getElementById("tempCanvas").style.maxWidth=s+"px",document.getElementById("tempCanvas").style.maxHeight=a+"px",document.getElementById("tempCanvas").style.display="none";const c=d.getContext("2d");c.canvas.width=s,c.canvas.height=a;const m=new us.Z(c,{type:"doughnut",data:{datasets:o,labels:[]},options:l,plugins:n}).toBase64Image();return d.remove(),m};var Ps=a(16875);const Bs={1:"introduction",2:"your-hormones",3:"what-means",4:"next-steps",5:"insights"};function Ls({customer:e={},filteredResult:s={},order:a=[]}){var l,i;const[n,d]=(0,r.useState)(!1),[c,m]=(0,r.useState)(null),[p,x]=(0,r.useState)(null),g=new URLSearchParams(window.location.search),v=g.get("tab")||Bs[1],[b,y]=(0,r.useState)(v),j=(0,t.I0)();(0,r.useEffect)(()=>{const e=new URLSearchParams(window.location.search).get("tab");e&&y(e)},[window.location.search]);const f=e=>{g.set("tab",e),window.history.replaceState(null,null,`${window.location.pathname}?${g.toString()}`),y(e);const s=document.querySelector(`[data-testId="tab-header"] #${e}`);s&&(s.scrollIntoView({behavior:"smooth",inline:"center"}),document.documentElement.scrollTo({top:0,behavior:"instant"}))};(0,r.useEffect)(()=>{var e;g.has("tab")&&(null===(e=document.querySelector(`[data-testId="tab-header"] #${b}`))||void 0===e||e.scrollIntoView({behavior:"smooth",inline:"center"}));return()=>{(0,Ke.z)("export-results")}},[]);const N=()=>{const e=g.get("tab")?g.get("tab"):Bs[1],[s]=Object.entries(Bs).find(([s,a])=>a===e)||[];if(!s)return;const a=Bs[parseInt(s)+1];a&&f(a)},C=()=>{const e=g.get("tab"),[s]=Object.entries(Bs).find(([s,a])=>a===e)||[];if(!s)return;const a=Bs[parseInt(s)-1];a&&f(a)},w=[{id:Bs[1],label:"Introduction",isActive:b===Bs[1],show:!0,onClick:f},{id:Bs[2],label:"Your hormones",isActive:b===Bs[2],show:!0,onClick:f},{id:Bs[3],label:"Summary",isActive:b===Bs[3],show:!0,onClick:f},{id:Bs[4],label:"Insights",isActive:b===Bs[4],show:!0,onClick:f},{id:Bs[5],label:"Further Reading",isActive:b===Bs[5],show:!0,onClick:f}],F={introduction:(0,u.jsx)(xe,{handleNextTab:N,handleBackTab:C,result:s}),"your-hormones":(0,u.jsx)(ss,{handleNextTab:N,handleBackTab:C,result:s}),"what-means":(0,u.jsx)(ye,{handleNextTab:N,handleBackTab:C,result:s}),"next-steps":(0,u.jsx)(ns,{handleNextTab:N,handleBackTab:C,advices:null!==(l=null===s||void 0===s?void 0:s.advices)&&void 0!==l?l:[]}),insights:(0,u.jsx)(ms,{handleNextTab:N,handleBackTab:C,data:null!==(i=s.insights)&&void 0!==i?i:[]})},k=n?"loading":c?"success":p?"error":"idle";return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:`row mx-0 gx-0 justify-content-between align-items-center pt-4 pageHeader ${hs}`,children:[(0,u.jsxs)("div",{className:"col-12 gx-5 d-flex flex-column flex-md-row",children:[(0,u.jsxs)("div",{className:"col-12 col-md",children:[(0,u.jsx)("h4",{className:"text-uppercase m-0 pre-name-header",children:"Viewing results for"}),(0,u.jsx)("h2",{className:"text-uppercase m-0",children:e.customerFirstName+" "+e.customerLastName})]}),(0,u.jsxs)("div",{className:"col-12 col-md-auto d-flex justify-content-center mt-3 mt-md-0 gap-2 position-relative",children:[(0,u.jsxs)("button",{className:`btn btn-primary mx-0 d-flex align-items-center gap-2 text-center ${ps}`,onClick:c?()=>{if(!c)return;const e=window.open(c,"_blank");if(!e)return x("Please allow pop-ups for this site to view the PDF."),void setTimeout(()=>{x(null)},5e3);e.focus()}:async()=>{d(!0);try{const r={allHormonesChartImage:Cs({data:s,type:"allHormones"}),progesteroneChartImage:Cs({data:s,type:"progesterone"}),oestradiolChartImage:Cs({data:s,type:"oestradiol"}),fshChartImage:Cs({data:s,type:"fsh"}),lhChartImage:Cs({data:s,type:"lh"}),formScore:Cs({data:s,type:"formScore"}),customerId:e.customerId,orderId:a.orderId},t=await j((0,Ps._U)(r));if(null!==t&&void 0!==t&&t.error)throw new Error(t.error);if(!t.response.env)throw new Error("No PDF file found");m(t.response.env);const o={orderId:r.orderId,message:`Downloaded MyFORMv2 PDF Successfully - clientId: ${r.customerId}`};j((0,z.qBe)(o))}catch(p){x(p.message||"An error occurred while exporting the report."),setTimeout(()=>{x(null)},5e3),m(null);const r={orderId:a.orderId,message:`Downloaded MyFORMv2 PDF Failed - clientId: ${e.customerId} - Error: ${p.message||"An error occurred while exporting the report."}`};j((0,z.qBe)(r))}finally{d(!1)}},disabled:n,"data-status":k,"aria-label":"loading"===k?"Downloading PDF...":"success"===k?"PDF generated successfully":"error"===k?"Error generating PDF":"",children:[(0,u.jsxs)(Z.Z,{isTrue:!n&&!c&&!p,children:[(0,u.jsx)(h.G,{icon:J.ISu,className:"fa-fw fa-lg"})," Export PDF"]}),(0,u.jsxs)(Z.Z,{isTrue:!n&&!c&&p,children:[(0,u.jsx)(h.G,{icon:J.RLE,className:"fa-fw fa-lg"})," Error"]}),(0,u.jsxs)(Z.Z,{isTrue:!n&&c,children:[(0,u.jsx)(h.G,{icon:J.gSj,className:"fa-fw fa-lg"})," Open PDF"]}),(0,u.jsxs)(Z.Z,{isTrue:n,children:[(0,u.jsx)("span",{class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"}),(0,u.jsx)("span",{class:"visually-hidden",children:"Loading..."}),"Downloading..."]})]}),(0,u.jsx)(o.rU,{to:"/partner-results",className:"btn btn-primary mx-0 d-flex align-items-center gap-2 text-center",children:"Back to all results"}),(0,u.jsx)(Z.Z,{isTrue:p,children:(0,u.jsx)("div",{className:"position-absolute top-100 start-50 translate-middle-x",style:{zIndex:1e3},children:(0,u.jsxs)("div",{className:"alert alert-danger basketAlert mt-3",role:"alert",children:[(0,u.jsx)(h.G,{icon:J.RLE})," ",p]})})})]})]}),(0,u.jsx)("div",{className:"col-12 mt-1 mt-md-0",children:(0,u.jsx)("nav",{className:"nav nav-tabs pt-4",role:"tablist",children:(0,u.jsx)("div",{className:"row g-0 w-100 mx-auto","data-testId":"tab-header",children:w.map(e=>(0,u.jsx)("button",{className:"col nav-link w-auto "+(e.isActive?"active fw-bold":""),id:e.id,"data-bs-toggle":"tab","data-bs-target":`#${e.id}`,type:"button",role:"tab","aria-controls":`${e.id}-tab-pane`,"aria-selected":e.isActive,onClick:s=>e.onClick(s.target.id),children:e.label},`header-${e.id}`))})})})]}),(0,u.jsx)("div",{className:"container",children:(0,u.jsx)(qe.I,{id:"my-form-result-v2",variant:"tab",className:"flex-grow-1",children:w.map(e=>(0,u.jsx)(qe.I.Item,{id:e.id,isActive:e.isActive,className:"h-100 mt-5",children:F[e.id]},e.id))})})]})}var Is=a(9317),Hs=a(58319);class Os extends r.Component{constructor(e){super(e),this.handleTabNavigation=e=>{const{userId:s,orderId:a}=this.props,r=new URLSearchParams(window.location.search);r.set("tab",e.target.id.split("-")[0]),window.history.replaceState(null,null,`${window.location.pathname}?${r.toString()}`)},this.handleSortNavigation=e=>{const{userId:s,orderId:a}=this.props,r=new URLSearchParams(window.location.search);r.set("sort",e.target.id),window.history.replaceState(null,null,`${window.location.pathname}?${r.toString()}`),this.setState({sortFilter:e.target.id})},this.state={loading:!0,orderId:this.props.orderId,testName:"Test 1",orderReference:"FHxxxxxx",collectionDate:"",doctorComment:"",doctorProfile:"",doctorName:"",resultDate:"",displayComment:0,progesteroneBase64:"",oestradiolBase64:"",LHBase64:"",FSHBase64:"",formScore:"",imgsCollected:!1,loadingPDF:!1,pdfReady:!1,pdfUrl:"",error:!1,commentsLoaded:0,biomarkersFailed:[],hasHcReport:this.props.hasHcReport,hcReport:this.props.hcReport,reportV1:{},reportV2:{},sortFilter:new URLSearchParams(window.location.search).get("sort")||"a-z-tab"},this.hideComment=this.hideComment.bind(this),this.getBase64Images=this.getBase64Images.bind(this),this.exportResults=this.exportResults.bind(this),this.handleTabNavigation=this.handleTabNavigation.bind(this),this.exportResultReport=this.exportResultReport.bind(this)}componentDidMount(){this.props.loadFemaleHormonesResult(this.props.userId,this.props.orderId).then(e=>{var s,a;if(e.error)return this.setState({error:!0});this.setState({reportV1:(null===e||void 0===e||null===(s=e.response)||void 0===s?void 0:s.reportV1)||{},reportV2:(null===e||void 0===e||null===(a=e.response)||void 0===a?void 0:a.reportV2)||{}})}),this.props.getPartnerCustomerDetails("me",this.props.userId),this.props.getPartnerOrderDetailsV2(this.props.orderId).then(e=>{var s,a;const r=e.response.entities.partnerOrdersV2;r&&this.setState({hasHcReport:r[this.props.orderId].hasHcReport,hcReport:r[this.props.orderId].hcReport});const t=1==(null===(s=r[this.props.orderId])||void 0===s?void 0:s.appointmentRequired),o=1==(null===(a=this.props.partner[0])||void 0===a?void 0:a.showTrucheckResult);!t||t&&o?(this.props.loadAllResultsFromOrder(this.props.orderId,this.props.userId),this.props.loadHpComment(this.props.orderId,this.props.userId).then(e=>{if(e.error)this.setState({error:!0});else{const s=e.response.entities.hpComment[this.props.userId];this.setState({orderId:this.props.orderId,doctorComment:s.customerComment,orderReference:s.orderReference,doctorName:s.professionalProfile.name,testName:r[this.props.orderId].testName,doctorProfile:"https://sys.forthwithlife.co.uk"+s.professionalProfile.userPhoto,samplePostedDate:n()(r[this.props.orderId].sampleDate).format("DD/MM/YYYY"),resultDate:n()(r[this.props.orderId].resultDate).format("DD/MM/YYYY"),displayComment:r[this.props.orderId].hideCustomerComment,commentsLoaded:1})}})):this.setState({error:!0})}),this.props.partnerLoadFailedBiomarkers(this.props.orderId,this.props.userId).then(e=>{if(!e.error){const s=e.response;s&&this.setState({biomarkersFailed:s})}});const e=document.querySelector(".modal-backdrop");e&&e.remove(),this.setState({loading:!1});const s=new URLSearchParams(window.location.search);console.log(s.get("pdf"),s.has("pdf")),s.has("pdf")&&this.exportResultReport()}componentWillReceiveProps(e){e.location.pathname!==this.props.location.pathname&&(this.props.loadFemaleHormonesResult(this.props.userId,this.props.orderId).then(e=>{var s,a;if(e.error)return this.setState({error:!0});this.setState({reportV1:(null===e||void 0===e||null===(s=e.response)||void 0===s?void 0:s.reportV1)||{},reportV2:(null===e||void 0===e||null===(a=e.response)||void 0===a?void 0:a.reportV2)||{}})}),this.props.getPartnerCustomerDetails("me",this.props.userId),this.props.getPartnerOrderDetails("me",this.props.orderId).then(e=>{const s=e.response.entities.partnerOrders;this.props.loadAllResultsFromOrder(this.props.orderId,this.props.userId),this.props.loadHpComment(this.props.orderId,this.props.userId).then(e=>{if(e.error)this.setState({error:!0});else{const a=e.response.entities.hpComment[this.props.userId];this.setState({orderId:this.props.orderId,doctorComment:a.customerComment,orderReference:a.orderReference,doctorName:a.professionalProfile.name,testName:s[this.props.orderId].testName,doctorProfile:"https://sys.forthwithlife.co.uk"+a.professionalProfile.userPhoto,samplePostedDate:n()(s[this.props.orderId].sampleDate).format("DD/MM/YYYY"),resultDate:n()(s[this.props.orderId].resultDate).format("DD/MM/YYYY"),displayComment:s[this.props.orderId].hideCustomerComment})}})}))}hideComment(){const e={hideCustomerComment:this.state.displayComment,orderId:this.state.orderId};this.props.hideComment(e),this.setState({displayComment:0==this.state.displayComment?1:0})}getBase64Images(e,s){"Progesterone"==e&&this.setState({progesteroneBase64:s}),"Oestradiol"==e&&this.setState({oestradiolBase64:s}),"FSH"==e&&this.setState({FSHBase64:s}),"LH"==e&&this.setState({LHBase64:s}),"formScore"==e&&this.setState({formScore:s}),""!=this.state.progesteroneBase64&&""!=this.state.oestradiolBase64&&""!=this.state.LHBase64&&""!=this.state.FSHBase64&&this.setState({imgsCollected:!0})}exportResults(){const{progesteroneBase64:e,oestradiolBase64:s,FSHBase64:a,LHBase64:r,formScore:t}=this.state,{orderId:o}=this.props;this.setState({loadingPDF:!0});const l={userId:this.props.userId,orderId:o,progesteroneBase64:e,oestradiolBase64:s,FSHBase64:a,LHBase64:r,formScore:t};this.props.getFHMExport(l).then(e=>{if(e.error)console.error(e.error);else{const s=e.response.entities.pdfs[o].env;let a=document.createElement("a");document.body.appendChild(a),a.style="display: none",a.setAttribute("target","_blank"),a.href=s,setTimeout(()=>{this.setState({loadingPDF:!1,pdfReady:!0,pdfUrl:s})},1e3)}})}async exportResultReport(){const e=new URLSearchParams(window.location.search),s=e.get("pdf"),a=e.has("doctor"),{userId:r,orderId:t}=this.props,o=["a-z","categories"].some(e=>e===s);if(!s||!o||!t||!r)return;const l=window.open("","_blank");l&&(l.document.title="Loading PDF...",l.document.body.innerHTML='<style>\n body { \n display: flex; \n flex-direction: column;\n align-items: center; \n justify-content: center; \n height: 100vh; \n margin: 0; \n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;\n background-color: #f8f9fa;\n }\n .loader {\n border: 4px solid #f3f3f3;
1\n border-top: 4px solid #000;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n animation: spin 1s linear infinite;\n margin-bottom: 20px;\n }\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n .text {\n color: #333;\n font-size: 18px;\n font-weight: 400;\n }\n </style>\n <div class="loader"></div>\n <div class="text">Generating pdf, please wait...</div>\n ');try{var i,n,d;const e=await this.props.getPartnerPDF(r,t,2,0,s,a),o=null===(i=e.response.entities)||void 0===i||null===(n=i.pdfs)||void 0===n||null===(d=n[t])||void 0===d?void 0:d.env;if(e.error||!o)throw l&&l.close(),new Error("Error generating the kit form PDF");l?l.location.href=o:window.location.assign(o)}catch(c){l.document.body.innerHTML='\n <div style="display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #f8f9fa;">\n <div style="color: #dc3545; font-size: 18px; font-weight: 400;">Failed to generate PDF. Please try again later.</div>\n </div>\n '}}render(){var e;const{testName:s,orderReference:a,resultDate:r,samplePostedDate:t,hcReport:l,hasHcReport:i,reportV1:n,reportV2:d,sortFilter:c}=this.state,{hasFeature:m}=this.props.featureFlags,h=this.props.partnerCustomers[this.props.userId],p=(this.props.hpComment,(null===(e=this.props.partnerOrdersV2)||void 0===e?void 0:e[this.props.orderId])||{}),x=1==(null===p||void 0===p?void 0:p.appointmentRequired)||!1,v=new URLSearchParams(window.location.search).has("v2")||2==(null===p||void 0===p?void 0:p.fhmVersion),j=this.props.tests,f=new URLSearchParams(window.location.search).get("tab")||"allBiomarkers";var N,C={};return C=h&&""!=h.customerImage?h.customerImage.includes("/public/uploads/")?{backgroundImage:"url(https://api.forthwithlife.co.uk"+h.customerImage+")"}:{backgroundImage:"url(https://www.forthwithlife.co.uk"+h.customerImage+")"}:{backgroundImage:"url(/img/dpf.jpg)"},!this.state.error&&h?p&&1==p.isFemaleHormoneTest&&!v?(0,u.jsx)("div",{children:(()=>Object.keys(this.props.partnerCustomers).length>0&&Object.keys(h).length>0&&Object.keys(n).length>0&&!this.state.loading?Object.keys(n).length<=0?(0,u.jsx)(Page404,{}):(0,u.jsxs)("div",{id:"partner-results",children:[(0,u.jsxs)("div",{className:"row justify-content-between align-items-center px-3 px-md-5 py-4 pageHeader",children:[(0,u.jsxs)("div",{className:"col",children:[(0,u.jsx)("h4",{className:"text-uppercase m-0 pre-name-header",children:"Viewing results for"}),(0,u.jsx)(o.rU,{to:`/partner-clients/${this.props.userId}`,style:{textDecoration:"none"},children:(0,u.jsx)("h2",{className:"text-uppercase m-0",children:h.customerFirstName?`${h.customerFirstName} ${h.customerLastName}`:""})})]}),(0,u.jsx)("div",{className:"d-flex result-filter arrow mt-1 mt-md-0 col justify-content-end",children:(0,u.jsx)("button",{className:"btn btn-primary me-0",onClick:()=>this.props.userId?this.props.history.push(`/partner-clients/${this.props.userId}`):this.props.history.goBack(),children:"View Profile"})})]}),(0,u.jsxs)("div",{id:"hormoneReport",className:"px-3 pb-3 container",children:[41206==h.iD?(0,u.jsx)("div",{className:"row my-4 align-items-center justify-content-center",children:(0,u.jsxs)("div",{className:"col-12 col-md-7 text-center",children:[(0,u.jsx)("div",{className:"profilePicture Female",style:C}),(0,u.jsx)("h2",{children:"DEMO REPORT"}),(0,u.jsx)("h3",{children:"Sex: Female. Age: 46. Status: Perimenopause."})]})}):(0,u.jsx)("div",{className:"row my-4 align-items-center justify-content-center",children:(0,u.jsxs)("div",{className:"col-12 col-md-7 text-center",children:[(0,u.jsx)("div",{className:"profilePicture "+h.customerSex,style:C}),(0,u.jsxs)("h2",{children:["Personalised Report for ",h.customerFirstName?`${h.customerFirstName}`:""]})]})}),(0,u.jsx)(g,{commentaryFormComment:n.commentaryFormComment,commentaryHeader:n.commentaryHeader,cycleStartDate:n.cycleStart,formScore:n.formScore,getBase64Images:this.getBase64Images}),(()=>{if(""==n.warning||"Null"==n.warning||!n.warning)return(0,u.jsxs)("div",{className:"row row-eq-height",children:[(0,u.jsx)("div",{className:"d-flex col-md-6 align-self-stretch",children:(0,u.jsx)(b,{warning:n.warning,cycleLength:n.cycleLength,commentaryCycle:n.commentaryCycle})}),(0,u.jsx)("div",{className:"d- flex col-md-6 align-self-stretch",children:(0,u.jsx)(y,{warning:n.warning,estimatedLHSurge:n.estimatedLHSurge,commentaryLhSurge:n.commentaryLhSurge})})]})})(),(0,u.jsx)(O,{commentaryGraphIntro:n.commentaryGraphIntro}),(0,u.jsx)(w,{imgsCollected:this.state.imgsCollected,sample1ProgesteronePercentile:n.sample1ProgesteronePercentile,sample1OestradiolPercentile:n.sample1OestradiolPercentile,sample2ProgesteronePercentile:n.sample2ProgesteronePercentile,sample2OestradiolPercentile:n.sample2OestradiolPercentile,biomakerHistoricalInfo:n.biomakerHistoricalInfo,commentaryOvarianHormones:n.commentaryOvarianHormones,messagesOvulation:n.messagesOvulation,sample1ProgesteroneStatus:n.sample1ProgesteroneStatus,sample2ProgesteroneStatus:n.sample2ProgesteroneStatus,sample1OestradiolStatus:n.sample1OestradiolStatus,sample2OestradiolStatus:n.sample2OestradiolStatus,cycleLength:n.cycleLength,commentaryProgesteroneCurve:n.commentaryProgesteroneCurve,commentaryOestradiolCurve:n.commentaryOestradiolCurve,sample1Day:n.sample1Day,sample2Day:n.sample2Day,sample1ProgesteroneResult:n.sample1ProgesteroneResult,curveProgesteroneBottomPercentile:n.curveProgesteroneBottomPercentile,curveProgesteroneMean:n.curveProgesteroneMean,curveProgesteronePersonal:n.curveProgesteronePersonal,curveProgesteroneTopPercentile:n.curveProgesteroneTopPercentile,progesteroneUnits:n.sample1ProgesteroneUnits,sample1OestradiolResult:n.sample1OestradiolResult,curveOestradiolBottomPercentile:n.curveOestradiolBottomPercentile,curveOestradiolMean:n.curveOestradiolMean,curveOestradiolPersonal:n.curveOestradiolPersonal,curveOestradiolTopPercentile:n.curveOestradiolTopPercentile,sample2ProgesteroneResult:n.sample2ProgesteroneResult,sample2OestradiolResult:n.sample2OestradiolResult,oestradiolUnits:n.sample1OestradiolUnits,getBase64Images:this.getBase64Images}),(0,u.jsx)(F,{imgsCollected:this.state.imgsCollected,sample1FshPercentile:n.sample1FshPercentile,sample1LhPercentile:n.sample1LhPercentile,sample2FshPercentile:n.sample2FshPercentile,sample2LhPercentile:n.sample2LhPercentile,biomakerHistoricalInfo:n.biomakerHistoricalInfo,commentaryControlHormones:n.commentaryControlHormones,cycleLength:n.cycleLength,sample1FshStatus:n.sample1FshStatus,sample2FshStatus:n.sample2FshStatus,sample1LhStatus:n.sample1LhStatus,sample2LhStatus:n.sample2LhStatus,commentaryFshCurve:n.commentaryFshCurve,commentaryLhCurve:n.commentaryLhCurve,sample1Day:n.sample1Day,sample2Day:n.sample2Day,sample1FshResult:n.sample1FshResult,curveFshBottomPercentile:n.curveFshBottomPercentile,curveFshMean:n.curveFshMean,curveFshPersonal:n.curveFshPersonal,curveFshTopPercentile:n.curveFshTopPercentile,sample1LhResult:n.sample1LhResult,fshUnits:n.sample1FshUnits,curveLhBottomPercentile:n.curveLhBottomPercentile,curveLhMean:n.curveLhMean,curveLhPer
1sonal:n.curveLhPersonal,curveLhTopPercentile:n.curveLhTopPercentile,sample2FshResult:n.sample2FshResult,sample2LhResult:n.sample2LhResult,tests:j[0],lhUnits:n.sample1LhUnits,getBase64Images:this.getBase64Images}),(0,u.jsx)(_,{commentaryLinkingIntro:n.commentaryLinkingIntro}),(0,u.jsx)(P,{commentaryRangesIntro:n.commentaryRangesIntro,sample1Day:n.sample1Day,sample1ProgesteroneRanges:n.sample1ProgesteroneRanges,sample1ResultsBarProgesterone:n.sample1ResultsBarProgesterone,sample1ProgesteronePercentile:n.sample1ProgesteronePercentile,sample1OestradiolRanges:n.sample1OestradiolRanges,sample1ResultsBarOestradiol:n.sample1ResultsBarOestradiol,sample1OestradiolPercentile:n.sample1OestradiolPercentile,sample1FshRanges:n.sample1FshRanges,sample1ResultsBarFsh:n.sample1ResultsBarFsh,sample1FshPercentile:n.sample1FshPercentile,sample1LhRanges:n.sample1LhRanges,sample1ResultsBarLh:n.sample1ResultsBarLh,sample1LhPercentile:n.sample1LhPercentile,sample2Day:n.sample2Day,sample2ProgesteroneRanges:n.sample2ProgesteroneRanges,sample2ResultsBarProgesterone:n.sample2ResultsBarProgesterone,sample2ProgesteronePercentile:n.sample2ProgesteronePercentile,sample2OestradiolRanges:n.sample2OestradiolRanges,sample2ResultsBarOestradiol:n.sample2ResultsBarOestradiol,sample2OestradiolPercentile:n.sample2OestradiolPercentile,sample2FshRanges:n.sample2FshRanges,sample2ResultsBarFsh:n.sample2ResultsBarFsh,sample2FshPercentile:n.sample2FshPercentile,sample2LhRanges:n.sample2LhRanges,sample2ResultsBarLh:n.sample2ResultsBarLh,sample2LhPercentile:n.sample2LhPercentile,commentaryDay1Freshness:n.commentaryDay1Freshness,commentaryDay1Hunger:n.commentaryDay1Hunger,commentaryDay1Mood:n.commentaryDay1Mood,commentaryDay1Overview:n.commentaryDay1Overview,commentaryDay1Sleep:n.commentaryDay1Sleep,commentaryDay1Symptoms:n.commentaryDay1Symptoms,commentaryDay2Freshness:n.commentaryDay2Freshness,commentaryDay2Hunger:n.commentaryDay2Hunger,commentaryDay2Mood:n.commentaryDay2Mood,commentaryDay2Overview:n.commentaryDay2Overview,commentaryDay2Sleep:n.commentaryDay2Sleep,commentaryDay2Symptoms:n.commentaryDay2Symptoms,sample1Freshness:n.sample1Freshness,sample1Hunger:n.sample1Hunger,sample1Moo
1d:n.sample1Mood,sample1Sleep:n.sample1Sleep,sample1Symptoms:n.sample1Symptoms,sample2Freshness:n.sample2Freshness,sample2Hunger:n.sample2Hunger,sample2Mood:n.sample2Mood,sample2Sleep:n.sample2Sleep,sample2Symptoms:n.sample2Symptoms,sample1FshRange:n.sample1FshRange,sample1FshUnits:n.sample1FshUnits,sample1LhRange:n.sample1LhRange,sample1LhUnits:n.sample1LhUnits,sample1OestradiolRange:n.sample1OestradiolRange,sample1OestradiolUnits:n.sample1OestradiolUnits,sample1ProgesteroneRange:n.sample1ProgesteroneRange,sample1ProgesteroneUnits:n.sample1ProgesteroneUnits,sample2FshRange:n.sample2FshRange,sample2FshUnits:n.sample2FshUnits,sample2LhUnits:n.sample2LhUnits,sample2LhRange:n.sample2LhRange,sample2OestradiolRange:n.sample2OestradiolRange,sample2OestradiolUnits:n.sample2OestradiolUnits,sample2ProgesteroneRange:n.sample2ProgesteroneRange,sample2ProgesteroneUnits:n.sample2ProgesteroneUnits,sample1ProgesteroneResult:n.sample1ProgesteroneResult,sample1OestradiolResult:n.sample1OestradiolResult,sample1FshResult:n.sample1FshResult,sample1LhResult:n.sample1LhResult,sample2ProgesteroneResult:n.sample2ProgesteroneResult,sample2OestradiolResult:n.sample2OestradiolResult,sample2FshResult:n.sample2FshResult,sample2LhResult:n.sample2LhResult}),(0,u.jsx)(L,{commentaryActionsStart:n.commentaryActionsStart,commentaryActionsBullets:n.commentaryActionsBullets,commentaryActionsEnd:n.commentaryActionsEnd}),(0,u.jsx)(H,{}),(0,u.jsx)(T,{exportResults:this.exportResults,loadingPDF:this.state.loadingPDF,pdfReady:this.state.pdfReady,pdfUrl:this.state.pdfUrl})]})]}):(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(M.default,{})}))()}):p&&1==p.isFemaleHormoneTest&&v?Object.keys(this.props.partnerCustomers).length>0&&Object.keys(h).length>0&&Object.keys(d).length>0&&!this.state.loading?(0,u.jsx)(Ls,{customer:h,order:p,filteredResult:d}):(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(M.default,{})}):(0,u.jsx)("div",{id:"partner-results",children:1==this.state.commentsLoaded&&Object.keys(this.props.partnerOrdersV2).length>0&&Object.keys(this.props.partnerCustomers).length>0?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"row justify-content-between align-items-center px-3 px-md-5 py-4 pageHeader",children:[(0,u.jsxs)("div",{className:"col",children:[(0,u.jsx)("h4",{className:"text-uppercase m-0 pre-name-header",children:"Viewing results for"}),(0,u.jsx)(o.rU,{to:`/partner-clients/${this.props.userId}`,style:{textDecoration:"none"},children:(0,u.jsx)("h2",{className:"text-uppercase m-0",children:h.customerFirstName?`${h.customerFirstName} ${h.customerLastName}`:""})})]}),(0,u.jsx)("div",{className:"d-flex result-filter arrow mt-1 mt-md-0 col justify-content-end",children:(0,u.jsx)("button",{className:"btn btn-primary me-0",onClick:()=>this.props.userId?this.props.history.push(`/partner-clients/${this.props.userId}`):this.props.history.goBack(),children:"View Profile"})})]}),(0,u.jsx)(Z.Z,{isTrue:i&&m("hcReports"),children:(0,u.jsx)("div",{className:"resultsTabList",children:(0,u.jsxs)("ul",{className:"nav nav-tabs nav-fill justify-content-center",role:"tablist",children:[(0,u.jsx)("li",{className:"nav-item flex-grow-0 flex-shrink-0",role:"presentation",children:(0,u.jsx)("button",{className:"nav-link "+("allBiomarkers"===f?"active":""),id:"allBiomarkers-tab","data-bs-toggle":"tab","data-bs-target":"#all-biomarkers",type:"button",role:"tab","aria-controls":"home-tab-pane","aria-selected":"true",onClick:e=>this.handleTabNavigation(e),children:"All biomarkers"})}),(0,u.jsx)("li",{className:"nav-item flex-grow-0 flex-shrink-0",role:"presentation",children:(0,u.jsxs)("button",{className:"nav-link "+("healthCoach"===f?"active":""),id:"healthCoach-tab","data-bs-toggle":"tab","data-bs-target":"#healthCoach-section",type:"button",role:"tab","aria-controls":"profile-tab-pane","aria-selected":"false",onClick:e=>this.handleTabNavigation(e),children:[(0,u.jsx)("span",{className:"me-2 px-1",style:{backgroundColor:"#4e4ee7",color:"white",borderRadius:"4px"},children:"NEW"}),"HealthCoach",(0,u.jsx)("sup",{children:"BETA"})]})})]})})}),(0,u.jsxs)("div",{className:"tab-content",id:"myTabContent",children:[(0,u.jsxs)("div",{className:"tab-pane fade "+("allBiomarkers"===f?"show active":""),id:"all-biomarkers",role:"tabpanel","aria-labelledby":"allBiomarkers-tab",tabindex:"0",children:[(0,u.jsxs)("div",{className:"row partner-container bg-white px-3 px-md-5 py-4",children:[(0,u.jsxs)("div",{className:"col-12 text-center pt-2 pb-4",children:[(0,u.jsx)(o.rU,{to:`/partner-order/${this.state.orderId}`,style:{textDecoration:"none"},children:(0,u.jsxs)("h2",{className:"text-uppercase",children:[a,": ",s]})}),(0,u.jsxs)("p",{children:["Sample was collected on ",t,". Sample was analysed on ",r," "]})]}),(0,u.jsx)(Z.Z,{isTrue:!x,children:(0,u.jsxs)("div",{className:"col-12 col-md-6",children:[(0,u.jsx)("h4",{className:"mb-0 fw-semibold",children:"Sort: "}),(0,u.jsxs)(Is.Z,{variant:"pill",id:"biomarker-results-sort-tabs",children:[(0,u.jsx)(Is.Z.Item,{id:"a-z",className:"py-2",variant:"pill",isActive:"a-z-tab"===c,onClick:this.handleSortNavigation,"aria-label":"Your result biomarkers sorted A to Z","data-bs-toggle":"pill","data-bs-target":"#a-z-tab-pane",role:"tab",children:"A-Z"}),(0,u.jsx)(Z.Z,{isTrue:Object.values(null!==(N=this.props.orderBiomarkers)&&void 0!==N?N:{}).every(e=>e.biomarkerCategories),children:(0,u.jsx)(Is.Z.Item,{id:"health-category",className:"py-2 text-balance",variant:"pill",isActive:"health-category-tab"===c,onClick:this.handleSortNavigation,"aria-label":"Your result biomarkers sorted by health categories","data-bs-toggle":"pill","data-bs-target":"#health-category-tab-pane",role:"tab",children:"Health Category"})}),(0,u.jsx)(Is.Z.Item,{id:"label",className:"py-2 text-balance",variant:"pill",isActive:"label-tab"===c,onClick:this.handleSortNavigation,"aria-label":"Your result biomarkers sorted by labels","data-bs-toggle":"pill","data-bs-target":"#label-tab-pane",role:"tab",children:"Label"})]})]})})]}),(0,u.jsxs)("div",{className:"row partner-container bg-white px-3 px-md-5 py-4",children:[(0,u.jsxs)("div",{className:"col-12 col-md",children:[(0,u.jsx)("h4",{className:"text-uppercase fw-bold",children:"Biomarker results"}),x?(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(X,{biomarker:this.props.orderBiomarkers,pdfUrl:(null===p||void 0===p?void 0:p.pdfResultUrl)||""})}):(0,u.jsxs)(u.Fragment,{children:[Object.values(this.props.orderBiomarkers).length>=1&&(0,u.jsx)(W.Z,{categoryTest:[this.props.orderBiomarkers],isPartner:!0,userId:this.props.userId,sortFilter:this.state.sortFilter}),(0,u.jsx)(U,{biomarkersFailed:this.state.biomarkersFailed})]})]}),78612!=this.props.partnerOrdersV2[this.state.orderId].testId&&277803!=this.props.partnerOrdersV2[this.state.orderId].testId&&this.props.hpComment[this.props.userId]&&this.props.hpComment[this.props.userId].customerComment&&(0,u.jsx)("div",{className:"order-first order-md-3 col-12 col-md-4 mt-md-0 mt-5 mb-5 mb-md-0 doctorComment-col",children:(0,u.jsx)(E,{doctorComment:this.state.doctorComment,doctorProfile:this.state.doctorProfile,doctorName:this.state.doctorName,hideComment:this.hideComment,displayComment:this.state.displayComment})})]}),(0,u.jsx)(A.Z,{userId:this.props.userId})]}),(0,u.jsx)(Z.Z,{isTrue:i&&m("hcReports"),children:(0,u.jsx)("div",{className:"tab-pane fade "+("healthCoach"===f?"show active":""),id:"healthCoach-section",role:"tabpanel","aria-labelledby":"healthCoach-tab",tabindex:"0",children:(0,u.jsx)("div",{className:"row partner-container bg-white px-3 px-md-5 py-4",style:{maxWidth:"1000px"},children:(0,u.jsx)(Y,{hasHcReport:i,healthScores:l})})})})]})]}):(0,u.jsx)(M.default,{})}):(0,u.jsxs)("div",{id:"partner-results",children:[(0,u.jsxs)("div",{className:"row justify-content-between align-items-center px-3 px-md-5 py-4 pageHeader",children:[(0,u.jsx)("div",{className:"col",children:(0,u.jsx)("h1",{children:"Error"})}),(0,u.jsx)("div",{className:"d-flex result-filter arrow mt-1 mt-md-0 col justify-content-end",children:(0,u.jsx)("button",{className:"btn btn-primary me-0",onClick:()=>this.props.userId?this.props.history.push(`/partner-clients/${this.props.userId}`):this.props.history.goBack(),children:"View Profile"})})]}),(0,u.jsx)("div",{className:"row py-5",children:(0,u.jsx)("div",{className:"col-12 text-center py-5",children:(0,u.jsx)("h2",{children:"There was an error reading this result. Please check you have been granted access."})})})]})}}const _s=(0,l.withRouter)((0,t.$j)((e,s)=>{const a=s.match.params.clientId.toLowerCase(),r=s.match.params.orderId.toLowerCase(),{authentication:t,user:o,entities:{partner:l,partnerOrders:i,partnerOrdersV2:n,partnerCustomers:d,tests:c,orderBiomarkers:m,hpComment:h,pdfs:p,healthCoach:u}}=e,x=Object.values(n||{}).find(e=>e.orderId==r),g=(null===x||void 0===x?void 0:x.hasHcReport)||!1,v=(null===x||void 0===x?void 0:x.hcReport)||[];return{authentication:t,user:o,partner:l,partnerOrders:i,partnerOrdersV2:n,partnerCustomers:d,tests:c,userId:a,orderId:r,orderBiomarkers:m,hpComment:h,pdfs:p,healthCoach:u,hasHcReport:g,hcReport:v}},{loadPartnerDetails:z.Q$Y,getPartnerOrderDetails:z.Lf0,getPartnerOrderDetailsV2:z.fLq,getPartnerCustomerDetails:z.dcL,loadCompletedTests:z.u5u,loadAllResultsFromOrder:z.lMG,loadHpComment:z.IQi,hideComment:z.UWv,loadFemaleHormonesResult:z.bRk,getFHMExport:z.nXm,partnerLoadFailedBiomarkers:z.q3b,loadHealthCoachResults:z.a2I,getPartnerPDF:z.sF4})((0,Hs.Z)(Os)))}
1,85353:(e,s)=>{var a="angle-up",r=[8963],t="f106",o="M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z";s.DF={prefix:"fas",iconName:a,icon:[448,512,r,t,o]},s.on=s.DF},2948:(e,s)=>{Object.defineProperty(s,"__esModule",{value:!0});var a="circle-xmark",r=[61532,"times-circle","xmark-circle"],t="f057",o="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z";s.definition={prefix:"fas",iconName:a,icon:[512,512,r,t,o]},s.faCircleXmark=s.definition,s.prefix="fas",s.iconName=a,s.width=512,s.height=512,s.ligatures=r,s.unicode=t,s.svgPathData=o,s.aliases=r},64912:(e,s,a)=>{var r=a(2948);s.DF={prefix:r.prefix,iconName:r.iconName,icon:[r.width,r.height,r.aliases,r.unicode,r.svgPathData]},s.nY=s.DF,r.prefix,r.iconName,r.width,r.height,r.aliases,r.unicode,r.svgPathData,r.aliases}}]); 2//# sourceMappingURL=3021.cb70063b.chunk.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.