"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17],{SUvA:function(e,t,o){o.d(t,{T:function(){return EmbedCommunityWithPosts}});var n=o("BGKE"),i=o("q1tI"),a=o("Fo2T"),l=o("ft6n"),r=o("wp0n"),d=o("oTwY"),s=o("Eso5"),m=o("RZSM"),c=o("Wgwc"),u=o.n(c),p=o("dDsW"),h=o("09QT"),g=o("oQBk"),v=o("SjA+"),y=o("hXNO"),f=o("rEaw"),b=o("o0qI"),T=o("8wjV"),C=o("CJtR"),x=o("g/tz"),Z=o("P5LW");let CommunityBtn=e=>{let{community:t,isFollowing:o,joinCommunity:a,joinedLabel:l,goToLabel:r,onJoinCommunity:d,...m}=e,{formatMessage:c}=(0,p.Z)(),{state:{isLoggedIn:u}}=(0,i.useContext)(b.I),{locale:h}=(0,Z.h)(),[g,v]=(0,i.useState)(!1);return(0,n.tZ)(s.x,{component:o?"a":"div",href:"/community/".concat(null==t?void 0:t.slug,"/"),children:(0,n.tZ)(T.B,{loading:g,fullWidth:!0,"data-event-category":"Together Embedded","data-event-action":o?"Go to Community":"Join Community","data-event-label":t.name,...m,onClick:e=>{o||(e.preventDefault(),u&&(null==t?void 0:t.id)?(v(!0),null==a||a(t.id).then(e=>{(null==e?void 0:e.status)===1&&(null==d||d()),v(!1)})):(0,x.p0)("".concat((0,C.UC)(h),"/community/on-boarding/?returnUrl=/").concat(null==t?void 0:t.slug)))},children:o?r||c({id:"cardCommunity.goToCommunity"}):l||c({id:"cardCommunity.joinCommunity"})})})};var B=o("/npG"),E=o("mYVa"),k=(0,B.k)(e=>({inner:{display:"flex",flexDirection:"column",gap:(0,E.h)(16),[e.fn.largerThan("sm")]:{gap:(0,E.h)(40)}},info:{display:"flex",gap:(0,E.h)(16),alignItems:"center",justifyContent:"space-between"},infoLeft:{display:"flex",gap:(0,E.h)(16),alignItems:"center"},header:{display:"flex",flexDirection:"column",gap:(0,E.h)(4)},heading:{},thumbnail:{width:(0,E.h)(80),flexShrink:0},thumbnailImg:{borderRadius:"50%",overflow:"hidden",backgroundColor:"#fff"}})),w=o("Idd8"),I=o("voTM"),R=o("MFH/"),P=o("xNPh"),S=o("bVHi"),N=o("220y"),H=o("r+qb"),U=o("SPK5"),O=o("hui1"),L=o("iv2E"),W=o("rIrU"),_=o("rBCA"),M=o("iBNF"),F=o("uuQu"),A=o("bJUT");M.r.colors.neutral100,F.M.mbUp;let D=(0,_.Z)("div",{target:"e13fq5ae1"})("margin-bottom:12px;"),z=(0,_.Z)("div",{target:"e13fq5ae2"})("font-size:14px;"),j=(0,_.Z)("div",{target:"e13fq5ae3"})(F.M.mbUp,"{display:flex;justify-content:space-between;}"),G=(0,_.Z)("div",{target:"e13fq5ae4"})(),X=(0,_.Z)("div",{target:"e13fq5ae5"})("position:relative;&[data-has-thumb='true']{",F.M.mbUp,"{width:calc(100% - 140px);}}"),Y=(0,_.Z)("div",{target:"e13fq5ae6"})("margin-top:12px;",F.M.mbUp,"{margin-top:0;width:120px;}img{max-width:100%;}"),q=(0,_.Z)(A.C,{target:"e13fq5ae7"})(),V=(0,_.Z)("a",{target:"e13fq5ae11"})("position:absolute;top:0;left:0;right:0;bottom:0;");var J=(0,B.k)(e=>({root:{display:"flex",gap:(0,E.h)(12),flexDirection:"column",justifyContent:"space-between",background:"white",border:"1px solid ".concat(e.colors.neutral100),borderRadius:(0,E.h)(8),padding:"16px 16px",".post-author, .post-content-wrapper":{paddingLeft:0,paddingRight:0},".post-content-wrapper":{paddingBottom:0},[e.fn.largerThan("sm")]:{padding:"24px"},".cursor-pointer":{cursor:"pointer"}},customReact:{display:"flex",alignItems:"center",gap:(0,E.h)(16)},reactItem:{display:"flex",alignItems:"center",gap:(0,E.h)(4)}}));let Item=e=>{var t,o;let{post:a,jointCommunityBtn:m,joinCommunity:c,styles:u,className:p,classNames:v,...y}=e,{state:f}=(0,i.useContext)(b.I),{isLoggedIn:T}=f||{},{likesCount:B=0,liked:E,joinedCommunity:k,commentsCount:_=0}=a,[M,F]=(0,i.useState)(!1),{locale:A}=(0,Z.h)(),[K,Q]=(0,i.useState)(!1),[$,ee]=(0,i.useState)(!0),[et,eo]=(0,i.useState)(B),{classes:en,cx:ei,theme:ea}=J(void 0,{name:"CarePathCommunityWithPostsItem",styles:u,classNames:v}),el="/community/".concat((null==a?void 0:null===(t=a.community)||void 0===t?void 0:t.slug)||"_","/").concat((null==a?void 0:a.slug)||"","/"),openPost=e=>{if(null==e||e.preventDefault(),T)window.location.href=el;else{var t,o;W.Ew?S.u.getState().triggerLogin({returnUrl:"".concat((0,C.UC)(A),"/community/on-boarding/?returnUrl=/").concat(null==a?void 0:null===(t=a.community)||void 0===t?void 0:t.slug,"/").concat(null==a?void 0:a.slug)}):window.location.href=(0,C.bT)("".concat((0,C.UC)(A),"/community/on-boarding/?returnUrl=/").concat(null==a?void 0:null===(o=a.community)||void 0===o?void 0:o.slug,"/").concat(null==a?void 0:a.slug))}},er=((null==a?void 0:a.photos)||[]).length>0,ed=null==a?void 0:a.author,es=(null==ed?void 0:ed.name)||(null==ed?void 0:ed.username)||"",em=(null==ed?void 0:ed.username)||(null==ed?void 0:ed.name)||"",ec=null==ed?void 0:ed.avatar,eu={isAnonymous:null==a?void 0:a.isAnonymous,avatar:ec,name:es,username:em,email:null==ed?void 0:ed.email,role:null==ed?void 0:ed.role,timeText:null==a?void 0:a.createdTime,community:null==a?void 0:a.community,showDetailPopup:!0,userId:null==ed?void 0:ed.id,profileModalProps:{zIndex:1e3}},handleLikeClick=async()=>{if(T)await (0,h.d)(g.y.TOGETHER.POST_TOGETHER_LIKE_POST,{params:{postId:a.id}},"together"),Q(e=>!e);else{var e;(null==a?void 0:null===(e=a.community)||void 0===e?void 0:e.slug)&&(0,x.p0)("".concat((0,C.UC)(A),"/community/on-boarding/?returnUrl=/").concat(a.community.slug))}};(0,i.useEffect)(()=>{Q(!!(null==a?void 0:a.liked))},[a]),(0,i.useEffect)(()=>{$||(K?eo(E?B:B+1):eo(B?B-1:B)),ee(!1)},[K]),(0,i.useEffect)(()=>{F(!!k)},[k]);let ep={"data-event-category":"Together Embedded","data-event-action":"Click Post","data-event-label":"https://".concat(L.domainLocales[A]).concat(el)};return(0,n.BX)(s.x,{className:ei(en.root,p),...y,children:[(0,n.BX)(s.x,{children:[(0,n.tZ)(D,{children:(0,n.tZ)(q,{...eu})}),(0,n.tZ)(z,{children:(0,n.BX)(j,{children:[(0,n.BX)(X,{"data-has-thumb":er,children:[(0,n.tZ)(r.T,{as:"h4",size:"s3",children:null==a?void 0:a.title}),(0,n.BX)(G,{children:[(0,n.tZ)(w.P,{trackingCategory:"Together Embedded",url:"",className:"post-content-wrapper",description:null==a?void 0:a.description,disableShortenContent:!1,mentions:null==a?void 0:a.mentions,maxChars:er?100:150}),(0,n.tZ)(V,{href:el,...ep,onClick:e=>{openPost(e)}})]})]}),er&&(0,n.tZ)(Y,{className:"cursor-pointer",onClick:e=>{openPost(e)},children:(0,n.tZ)(I.a,{images:a.photos})})]})})]}),(0,n.tZ)(R.C,{trackingCategory:"Together Embedded",trackingLabel:"https://".concat(L.domainLocales[A]).concat(el),type:O.we.post,loveCount:et,replyCount:null==a?void 0:a.commentsCount,className:"post-reaction",liked:K,hasShare:!1,onCommentClick:()=>{openPost()},onLikeClick:handleLikeClick,children:m?(0,n.BX)(U.k,{align:"center",justify:"space-between",children:[(null==a?void 0:null===(o=a.community)||void 0===o?void 0:o.id)&&(0,n.tZ)(CommunityBtn,{isFollowing:M,community:null==a?void 0:a.community,joinCommunity:c,onJoinCommunity:()=>F(!0),variant:"white",leftIcon:M?void 0:(0,n.tZ)(d.Z,{color:"currentColor",size:18}),rightIcon:M?(0,n.tZ)(l.I.ArrowRightTail,{useCurrentColor:!0,size:16}):void 0,styles:{root:{paddingLeft:0},leftIcon:{marginRight:"4px"},rightIcon:{marginLeft:"6px"}}}),(0,n.BX)(s.x,{className:en.customReact,children:[(0,n.tZ)(R.C.LikeWrapper,{...ep,children:(0,n.BX)(s.x,{className:en.reactItem,children:[(0,n.tZ)(H.Z,{isSolid:K,color:K?ea.colors.red[8]:void 0}),(0,n.tZ)(r.T,{size:"p4",children:(0,P.a)(et)})]})}),(0,n.tZ)(R.C.CommentWrapper,{...ep,children:(0,n.BX)(s.x,{className:en.reactItem,children:[(0,n.tZ)(N.Z,{size:22}),(0,n.tZ)(r.T,{size:"p4",children:(0,P.a)(_)})]})})]})]}):void 0})]})};var K=o("kZvb");let EmbedCommunityWithPosts=e=>{let{styles:t,classNames:o,maxPosts:c=7,applyH1:T,title:C,description:x,typeEmbed:Z,community:B,postsIds:E=[],posts:w=[],wrapperProps:I,...R}=e,P=(0,y.d)(),{formatMessage:S}=(0,p.Z)(),{state:{isLoggedIn:N}}=(0,i.useContext)(b.I),[H,U]=(0,i.useState)(w),[O,L]=(0,i.useState)([]),{classes:W,theme:_}=k(void 0,{name:"EmbedCommunityWithPosts",styles:t,classNames:o}),M=Z===f.VA.COMMUNITY&&B,F=Z===f.VA.POST&&H.length>0;(0,i.useEffect)(()=>{(F&&E.length>0||M&&(null==B?void 0:B.id))&&(async()=>{var e;let t=await (0,h.d)(g.y.TOGETHER.GET_TOGETHER_POST_LIST,{method:"GET",params:(null==E?void 0:E.length)>0?{includeIds:E.join(","),pageSize:c}:{communityId:null==B?void 0:B.id,startDate:u()().subtract(2,"month").format("YYYY-MM-DD"),endDate:u()().format("YYYY-MM-DD"),pageSize:c,sortBy:"relevant",postBy:"member"}},"together");U(((null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.posts)||[]).map(a.d.formatPost))})()},[E]),(0,i.useEffect)(()=>{N&&fetchCommunityMember(M?String(null==B?void 0:B.id):w.map(e=>{var t;return null==e?void 0:null===(t=e.community)||void 0===t?void 0:t.id}).filter(Boolean).join(","))},[N]),(0,i.useEffect)(()=>{U(H.map(e=>{var t;return{...e,joinedCommunity:O.includes(String(null==e?void 0:null===(t=e.community)||void 0===t?void 0:t.id))}}))},[O]);let joinCommunity=async e=>await (0,h.d)(g.y.TOGETHER.POST_TOGETHER_JOIN_COMMUNITY,{method:"POST",data:{ids:[e]}},"together"),fetchCommunityMember=async e=>{var t;if(!e)return;let o=await (0,h.d)(g.y.TOGETHER.GET_TOGETHER_COMMUNITY,{params:{includeIds:e}},"together");L(((null==o?void 0:null===(t=o.data)||void 0===t?void 0:t.communities)||[]).filter(e=>e.joined).map(e=>String(e.id)))},A=(null==O?void 0:O[0])===String(null==B?void 0:B.id),D=M&&(null==B?void 0:B.id)?(0,n.tZ)(CommunityBtn,{isFollowing:A,leftIcon:A?void 0:(0,n.tZ)(d.Z,{color:"#fff",size:18}),rightIcon:A?(0,n.tZ)(l.I.ArrowRightTail,{color:"#fff",size:18}):void 0,community:B,joinCommunity:joinCommunity,onJoinCommunity:()=>(null==B?void 0:B.id)&&L([...O,String(B.id)]),joinedLabel:S({id:"cardCommunity.joinCommunityName"},{name:null==B?void 0:B.name}),goToLabel:S({id:"cardCommunity.goToCommunityName"},{name:null==B?void 0:B.name})}):null;return M||F?(0,n.tZ)(K.Z.Wrapper,{defaultColor:_.colors.neutral[0],...I,...R,children:(0,n.BX)(s.x,{className:W.inner,children:[(0,n.BX)(s.x,{className:W.info,children:[(0,n.BX)(s.x,{className:W.infoLeft,children:[M&&(0,n.tZ)(s.x,{className:W.thumbnail,children:(0,n.tZ)(m.o,{ratio:1,className:W.thumbnailImg,children:(0,n.tZ)("img",{src:B.thumbnail,alt:B.name,loading:"lazy"})})}),(0,n.BX)(s.x,{className:W.header,children:[C&&(0,n.tZ)(r.T,{size:"h3",as:T?"h1":"h2",className:W.heading,children:C}),x&&(0,n.tZ)(r.T,{size:"p3",children:x})]})]}),!P&&D]}),(0,n.tZ)(v.Y,{lengthToCarouselDesktop:3,children:(0,n.tZ)(v.Y.Slider,{children:H.map(e=>(0,n.tZ)(Item,{post:e,jointCommunityBtn:Z===f.VA.POST,joinCommunity:joinCommunity},e.id))})}),P&&D]})}):null}},IMlG:function(e,t,o){o.d(t,{_:function(){return EmbedPost}});var n=o("BGKE"),i=o("q1tI"),a=o("bJUT"),l=o("MFH/"),r=o("xNPh"),d=o("bVHi"),s=o("wp0n"),m=o("r+qb"),c=o("220y"),u=o("Eso5"),p=o("SPK5"),h=o("Wgwc"),g=o.n(h),v=o("09QT"),y=o("oQBk"),f=o("CJtR"),b=o("g/tz"),T=o("hui1"),C=o("iv2E"),x=o("hXNO"),Z=o("P5LW"),B=o("rIrU"),E=o("o0qI"),k=o("/npG"),w=o("mYVa"),I=(0,k.k)((e,t)=>{let{isEventExpired:o}=t;return{root:{display:"flex",flexDirection:"column",gap:(0,w.h)(16),[e.fn.largerThan("sm")]:{gap:(0,w.h)(24)}},customReact:{display:"flex",alignItems:"center",gap:(0,w.h)(16)},reactItem:{display:"flex",alignItems:"center",gap:(0,w.h)(4)},body:{borderRadius:(0,w.h)(8),border:"1px solid ".concat(e.colors.neutral[1]),backgroundColor:"#fff"},bodyHref:{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit",borderBottomLeftRadius:0,borderBottomRightRadius:0,backgroundColor:e.colors.neutral[0]},imgThumb:{width:"100%",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit",borderBottomLeftRadius:0,borderBottomRightRadius:0,...o&&{"&,img":{filter:"grayscale(1)"}}},reaction:{gap:(0,w.h)(24),padding:"".concat((0,w.h)(8)," ").concat((0,w.h)(12)),[e.fn.largerThan("sm")]:{padding:(0,w.h)(12)}},author:{svg:{[e.fn.largerThan("sm")]:{marginRight:(0,w.h)(12)}}},content:{display:"inline-block",[e.fn.largerThan("sm")]:{paddingLeft:(0,w.h)(10)}}}});let Item=e=>{var t;let{post:o,mobileBanner:h,desktopBanner:k,styles:w,className:R,classNames:P,applyH1:S,...N}=e,{state:H}=(0,i.useContext)(E.I),{isLoggedIn:U}=H||{},{likesCount:O=0,liked:L,commentsCount:W=0}=o,_=(0,x.d)(),{locale:M}=(0,Z.h)(),[F,A]=(0,i.useState)(!1),[D,z]=(0,i.useState)(!0),[j,G]=(0,i.useState)(O),X=g()(),Y=g()(null==o?void 0:o.eventEnd),q=!!((null==o?void 0:o.isMinigame)&&Y.isBefore(X,"dates")),V="/community/".concat((null==o?void 0:null===(t=o.community)||void 0===t?void 0:t.slug)||"_","/").concat((null==o?void 0:o.slug)||"","/"),{classes:J,cx:K,theme:Q}=I({isEventExpired:q},{name:"CarePathCommunityWithPostsItem",styles:w,classNames:P}),onClickPost=e=>{if(null==e||e.preventDefault(),U)window.location.href=V;else{var t,n;B.Ew?d.u.getState().triggerLogin({returnUrl:"".concat((0,f.UC)(M),"/community/on-boarding/?returnUrl=/").concat(null==o?void 0:null===(t=o.community)||void 0===t?void 0:t.slug,"/").concat(null==o?void 0:o.slug)}):window.location.href=(0,f.bT)("".concat((0,f.UC)(M),"/community/on-boarding/?returnUrl=/").concat(null==o?void 0:null===(n=o.community)||void 0===n?void 0:n.slug,"/").concat(null==o?void 0:o.slug))}},$=null==o?void 0:o.author,ee=(null==$?void 0:$.name)||(null==$?void 0:$.username)||"",et=(null==$?void 0:$.username)||(null==$?void 0:$.name)||"",eo=null==$?void 0:$.avatar,en={isAnonymous:null==o?void 0:o.isAnonymous,avatar:eo,avatarProps:{size:_?40:80},role:null==$?void 0:$.role,name:ee,username:et,email:null==$?void 0:$.email,timeText:null==o?void 0:o.createdTime,community:null==o?void 0:o.community,showDetailPopup:!0,userId:null==$?void 0:$.id,profileModalProps:{zIndex:1e3}},handleLikeClick=async()=>{if(U)await (0,v.d)(y.y.TOGETHER.POST_TOGETHER_LIKE_POST,{params:{postId:o.id}},"together"),A(e=>!e);else{var e;(null==o?void 0:null===(e=o.community)||void 0===e?void 0:e.slug)&&(0,b.p0)("".concat((0,f.UC)(M),"/community/on-boarding/?returnUrl=/").concat(o.community.slug))}};(0,i.useEffect)(()=>{A(!!(null==o?void 0:o.liked))},[o]),(0,i.useEffect)(()=>{D||(F?G(L?O:O+1):G(O?O-1:O)),z(!1)},[F]);let ei=(0,i.useMemo)(()=>{var e,t;return(0,n.tZ)("img",{className:J.imgThumb,src:(null==o?void 0:null===(e=o.photos)||void 0===e?void 0:e[0])||"/images/default-image.jpg",alt:null==o?void 0:o.title,style:(null==o?void 0:null===(t=o.photos)||void 0===t?void 0:t[0])?void 0:{maxWidth:"400px",margin:"0 auto",display:"block"},loading:"lazy"})},[o]),ea={"data-event-category":"Together Embedded","data-event-action":"Click Post","data-event-label":"https://".concat(C.domainLocales[M]).concat(V)},el={...ea,href:V,onClick:e=>{onClickPost(e)}};return(0,n.BX)(u.x,{className:K(J.root,R),...N,children:[(0,n.tZ)(a.C,{className:J.author,...en,children:(0,n.BX)(u.x,{className:J.content,component:"a",...el,children:[(0,n.tZ)(a.C.MainText,{children:(0,n.tZ)(s.T,{size:_?"h4":"h3",as:S?"h1":"h3",children:null==o?void 0:o.title})}),(0,n.tZ)(a.C.SubText,{children:(0,n.BX)(s.T,{as:"div",size:_?"p4":"p3",sx:{"> *":{display:"inline-block",verticalAlign:"middle"}},children:[(0,n.tZ)(a.C.DisplayName,{}),(0,n.tZ)(a.C.AuthorBadge,{sx:{color:Q.colors.gray[8]}}),(0,n.tZ)(a.C.SubDivider,{}),null==o?void 0:o.createdTime]})})]})}),(0,n.BX)(u.x,{className:J.body,children:[(0,n.tZ)(u.x,{component:"a",className:J.bodyHref,sx:{display:"block"},...el,children:_?h?(0,n.tZ)("img",{className:J.imgThumb,src:h,alt:null==o?void 0:o.title,loading:"lazy",onError:e=>{e.currentTarget.src="/images/default-image.jpg",e.currentTarget.style.maxHeight="400px",e.currentTarget.style.margin="0 auto",e.currentTarget.style.display="block"}}):ei:k?(0,n.tZ)("img",{className:J.imgThumb,src:k,alt:null==o?void 0:o.title,loading:"lazy",onError:e=>{e.currentTarget.src="/images/default-image.jpg",e.currentTarget.style.maxHeight="400px",e.currentTarget.style.margin="0 auto",e.currentTarget.style.display="block"}}):ei}),(0,n.tZ)(l.C,{trackingCategory:"Together Embedded",trackingLabel:"https://".concat(C.domainLocales[M]).concat(V),type:T.we.post,loveCount:j,replyCount:null==o?void 0:o.commentsCount,className:"post-reaction",liked:F,hasShare:!1,onCommentClick:()=>{onClickPost()},onLikeClick:handleLikeClick,children:(0,n.BX)(p.k,{align:"center",justify:"flex-end",className:J.reaction,children:[(0,n.tZ)(l.C.LikeWrapper,{...ea,children:(0,n.BX)(u.x,{className:J.reactItem,children:[(0,n.tZ)(m.Z,{isSolid:F,color:F?Q.colors.red[8]:void 0}),(0,n.tZ)(s.T,{size:"p4",children:(0,r.a)(j)})]})}),(0,n.tZ)(l.C.CommentWrapper,{...ea,children:(0,n.BX)(u.x,{className:J.reactItem,children:[(0,n.tZ)(c.Z,{}),(0,n.tZ)(s.T,{size:"p4",children:(0,r.a)(W)})]})})]})})]})]})};var R=o("kZvb");let EmbedPost=e=>{let{styles:t,className:o,classNames:i,applyH1:a,mobileBanner:l,desktopBanner:r,postDetail:d,wrapperProps:s,...m}=e;return d?(0,n.tZ)(R.Z.Wrapper,{defaultColor:"#fff",...s,...m,children:(0,n.tZ)(Item,{applyH1:a,post:d,mobileBanner:l,desktopBanner:r})}):null}},ADvN:function(e,t,o){o.d(t,{n:function(){return HealthToolEmbed}});var n=o("BGKE"),i=o("nGnw"),a=o("Eso5"),l=o("mYVa"),r=o("vaps"),d=o("dDsW"),s=o("3YDj"),m=o("gbeA"),c=o("kSPj"),u=o("mMoU"),p=o("72iO"),h=o("uBYR"),g=o("wfo+"),v=o("P1et"),y=o("UA7p"),f=o("Nm69"),b=o("4aBO"),T=o("hXNO"),C=o("8vdq"),x=(0,o("/npG").k)(e=>({body:{border:"1px solid ".concat(e.colors.blue[1]),backgroundColor:"#fff",[e.fn.largerThan("sm")]:{".due-date-card":{".mantine-HealthToolFormWrapper-root":{paddingTop:0,paddingBottom:0}},".mantine-HealthToolFormWrapper__FormRow-root":{paddingLeft:40,paddingRight:40},".mantine-HealthToolFormWrapper-root":{paddingTop:40,paddingBottom:24,"&.baby-growth-card":{paddingTop:0,paddingBottom:0,".mantine-HealthToolFormWrapper__FormRow-root":{paddingLeft:0,paddingRight:0}},"&.bmi-card-wrapper":{paddingBottom:0,".mantine-BmiForm-newsletterBlock":{paddingBottom:24}}},".baby-poop-card":{paddingTop:24,paddingBottom:8,button:{marginTop:8}}},[e.fn.smallerThan("sm")]:{"&:before":{content:"none"},".form-wrapper":{padding:0},"&>:not(style)":{position:"static"},".mantine-HealthToolFormWrapper-root":{paddingTop:16,paddingBottom:16,"&.baby-growth-card":{paddingTop:0,paddingBottom:0,".mantine-HealthToolFormWrapper__FormRow-root":{paddingLeft:0,paddingRight:0}}},".mantine-HealthToolFormWrapper__FormRow-root":{"&:last-child":{paddingBottom:0}},".mantine-BmiForm-newsletterBlock":{borderBottomLeftRadius:10,borderBottomRightRadius:10},".baby-poop-card":{paddingBottom:16},".due-date-card":{".mantine-HealthToolFormWrapper-root":{paddingTop:0,paddingBottom:0}}}},bodyInner:{},healthForm:{display:"flex",flexDirection:"column",gap:(0,l.h)(16),padding:(0,l.h)(16),[e.fn.largerThan("sm")]:{padding:(0,l.h)(32),gap:(0,l.h)(24)}}}));let HealthToolEmbed=e=>{var t,o,Z,B;let{data:E,styles:k,classNames:w,applyH1:I}=e,{classes:R}=x(void 0,{name:"HealthToolEmbed",styles:k,classNames:w}),{formatMessage:P}=(0,d.Z)(),S=(0,T.d)(),N=(null==E?void 0:null===(t=E.healthTool)||void 0===t?void 0:t.template)||"",embedStyles=e=>({root:{},bodyWrapper:{[e.fn.largerThan("sm")]:{paddingTop:32}}}),H=(0,n.BX)(a.x,{sx:e=>({borderRadius:"inherit",...N===C.HE.BABY_POOP&&{[e.fn.largerThan("sm")]:{display:"flex"}}}),children:[N===C.HE.BABY_POOP&&(0,n.tZ)(a.x,{sx:e=>({flexShrink:0,padding:"16px 16px 0 16px",[e.fn.largerThan("sm")]:{padding:"32px 0 0 32px"}}),children:(0,n.tZ)("img",{alt:"babyPoop",loading:"lazy",src:i.C.getAssetPath("baby-poop-embed.png"),style:{width:"120px"}})}),N===C.HE.BABY_GROWTH?(0,n.tZ)(a.x,{sx:e=>({padding:(0,l.h)(16),[e.fn.largerThan("sm")]:{padding:(0,l.h)(32),gap:(0,l.h)(24)}}),children:(0,n.tZ)(u.BabyGrowthCard,{className:"baby-growth-card",onlyUseForm:!0,styles:embedStyles})}):N===C.HE.BMI?(0,n.tZ)(a.x,{sx:e=>({borderRadius:"inherit",[e.fn.largerThan("sm")]:{".mantine-HealthToolFormWrapper-root":{paddingBottom:0}}}),children:(0,n.tZ)(p.BMICardWrapper,{onlyUseForm:!0,positionType:"article",styles:embedStyles,className:"bmi-card-wrapper"})}):N===C.HE.BMR?(0,n.tZ)(h.BMRCardWrapper,{onlyUseForm:!0,positionType:"article",styles:embedStyles}):N===C.HE.THR?(0,n.tZ)(f.THRCardWrapper,{onlyUseForm:!0,positionType:"article",styles:embedStyles}):N===C.HE.BABY_POOP?(0,n.tZ)("div",{className:"baby-poop-card",children:(0,n.tZ)(m.BabyPoopCard,{onlyUseForm:!0,styles:embedStyles})}):N===C.HE.PWG?(0,n.tZ)(y.PWGCardWrapper,{onlyUseForm:!0,styles:embedStyles}):N===C.HE.OVULATION?(0,n.tZ)(v.OvulationCardWrapper,{onlyUseForm:!0,styles:embedStyles}):N===C.HE.BABY_VACCINE?(0,n.tZ)(c.BabyVaccinationCard,{onlyUseForm:!0,styles:embedStyles}):N===C.HE.DUE_DATE?(0,n.tZ)(g.DueDateCardWrapper,{className:"due-date-card",onlyUseForm:!0,styles:embedStyles}):N===C.HE.AIR_POPULATION?(0,n.tZ)(a.x,{sx:e=>({padding:16,[e.fn.largerThan("sm")]:{padding:40}}),children:(0,n.tZ)(s.Z,{})}):null]});return(0,n.tZ)(b.B,{applyH1:I,title:null==E?void 0:E.title,icon:null==E?void 0:null===(o=E.healthTool)||void 0===o?void 0:o.icon,reviewedBy:null==E?void 0:null===(Z=E.healthTool)||void 0===Z?void 0:Z.reviewedBy,bodyRatio:"none",disclaimer:{heading:P({id:"tools.disclaimer"}),description:(null==E?void 0:null===(B=E.healthTool)||void 0===B?void 0:B.disclaimer)||""},classNames:{boxFrame:R.body,boxFrameInner:R.bodyInner},styles:k,children:S?H:(0,n.tZ)(r.x,{h:"100%",w:"100%",style:{borderRadius:"inherit"},children:H})})}}}]);