"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4447],{kAxb:function(e,t,a){a.d(t,{C:function(){return CardPost},S:function(){return SourceList},V:function(){return VerifiedTag},a:function(){return CardPostPopoverMore},b:function(){return CardReply},c:function(){return CardReplyPopover}});var l=a("usZY"),n=a("q1tI"),i=a("d53r"),o=a("6Dmq"),r=a("FQi+"),s=a("ns0B"),d=a.n(s),c=a("4Op/"),p=a("ipFv"),m=a("ORpR"),u=a("aZjv"),g=a("XAIn"),h=a("I8Ab"),v=a("rBCA"),f=a("pvoY"),b=a("iBNF"),E=a("Pfvg"),y=a("IQVP"),w=a("I+CB"),x=a("Qcqv"),C=a("6vOy"),S=a("FjXF"),P=a("NXXo"),A=a("+1Gk"),_=a("oTwY"),I=a("iZ8j"),O=a("e0pn"),D=a("LWwf"),k=a("PbOM"),T=a("bpvy"),R=a("OgrB"),F=a("srUE"),B=a("hVVU"),M=a("VkEI"),H=a("xrdX"),N="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%233E3F58' d='M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2'/%3e%3c/svg%3e",j="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='3' height='13' fill='none'%3e%3ccircle cx='1.583' cy='6.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 6.417)'/%3e%3ccircle cx='1.583' cy='1.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 1.417)'/%3e%3ccircle cx='1.583' cy='11.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 11.417)'/%3e%3c/svg%3e",L="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M2 4h12'/%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.334 1.334 0 0 1 1.334 1.334V4m2 0v9.333a1.334 1.334 0 0 1-1.334 1.334H4.667a1.334 1.334 0 0 1-1.334-1.334V4zM6.667 7.333v4M9.333 7.333v4'/%3e%3c/svg%3e";let CardPostPopoverMore=({authorEmail:e,onDeletePost:t,shareUrl:a,post:i,className:o="",popoverClassName:s="",onEditPost:d})=>{let{data:{locale:v,userInfo:f,env:{isMarryBaby:b}}}=(0,n.useContext)(g.T),{t:E}=(0,r.u)(),[y,w]=(0,n.useState)(!1),[x,C]=(0,n.useState)(!1),[S,P]=(0,n.useState)(!1),{authActionWrapper:A}=(0,u.iV)(),_=e&&(null==f?void 0:f.email)&&e===String(null==f?void 0:f.email);return n.createElement("div",{className:o,onClick:e=>{e.preventDefault(),e.stopPropagation()}},S&&n.createElement(c.S,{url:a,text:null==i?void 0:i.title,onClose:()=>P(!1)}),x&&n.createElement(c.P,{thumbnail:p.C.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:E("popup.deletePost.title"),description:E("popup.deletePost.description"),acceptText:E("popup.deletePost.accept"),cancelText:E("popup.deletePost.cancel"),onAccept:()=>(0,l.a)(void 0,void 0,void 0,function*(){if((null==i?void 0:i.id)&&!y){w(!0);try{let e=yield(0,c.h)({id:i.id,locale:v});(null==e?void 0:e.status)===1&&(null==t||t())}catch(e){}w(!1)}}),onClose:()=>C(!1)}),n.createElement(h.b,{className:s,toggleButtonContent:n.createElement("img",{src:b?N:j,loading:"lazy"}),position:"bottom",align:"end",buttonProps:{isLoading:y},data:_?{isShowheader:!1,type:"list",list:[{icon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M7.17 3.236H2.995a1.193 1.193 0 0 0-1.193 1.192v8.35a1.193 1.193 0 0 0 1.193 1.192h8.35a1.193 1.193 0 0 0 1.192-1.192V8.603'/%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M11.643 2.341a1.265 1.265 0 0 1 1.789 1.79L7.766 9.795l-2.385.596.596-2.385z'/%3e%3c/svg%3e",label:E("actionPopover.edit"),onClick:d},{icon:L,label:E("actionPopover.delete"),onClick:()=>{A(()=>C(!0))}}]}:{isShowheader:!1,type:"list",list:[{icon:c.i,label:E("morePopover.report"),subTree:{title:E("morePopover.report.title"),description:E("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(m.R).map(e=>({label:m.R[e].label,reason:m.R[e].reportReasonText,reasonValue:e})).map(e=>({label:E(e.label),subTree:{title:E("morePopover.reportSubmit.title"),description:E("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>n.createElement(c.b,{reason:e.reasonValue,reasonText:E(e.reason),postId:null==i?void 0:i.id,onClose:()=>t&&t(!1)})}}))}}]}}))},z=v.Z.div` position: relative; margin-bottom: 24px; background: white; border-radius: ${b.r.borderRadius}; a { text-decoration: none; } ${f.M.mbDown} { margin-bottom: 8px; } &.flat-top { border-top-left-radius: 0; border-top-right-radius: 0; } .post-pin { padding: 0.5rem 1rem; border-radius: ${b.r.borderRadius} 6px 0 0; } .post-author { display: flex; align-items: center; justify-content: space-between; &.comment { padding-right: 2.6rem; } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${f.M.mbDown} { width: 32px; height: 32px; font-size: 16px; } } } .post-content-link-wrapper { color: inherit; cursor: pointer; .post-content-title { padding: 1rem 1rem 0; word-break: break-word; } } .social-preview-wrapper.has-image { margin-bottom: 5px; } .social-preview-wrapper, .image-preview-wrapper, .link-preview-wrapper { width: 100%; &[data-is-reply='true'] { padding-right: 1rem; padding-left: 1rem; } } .post-topics { padding: 0 1rem; } .post-reaction { background: none; border-radius: 0 0 6px 6px; &.hide-top-border { ::before { display: none; } } } .most-engaging-wrapper { padding: 1rem; cursor: pointer; .author-avatar-wrapper { width: 2rem; height: 2rem; font-size: 1rem; } .see-more-comments { width: 100%; padding: 12px 0 0; text-align: unset; } } &[data-most-engaging='true'] { border: none; ${f.M.mbDown} { margin: 1rem; border: 1px solid #e4e8ec; } } .top-divider { border-color: #e4e8ec; } .popover { .popover-menu__btn { display: flex; width: 1.5rem; height: 1rem; align-items: center; justify-content: center; padding: 0; background: transparent; &:hover { background-color: transparent; } } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 12.5px; } } } } } &[data-is-marrybaby='true'] { border: 1px solid #f3f3f3; border-radius: 1rem; /* shadow */ box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08); .image-preview-wrapper, .link-preview-wrapper { padding-right: 1rem; padding-left: 1rem; } .popover { .popover-menu__btn { width: 24px; height: 24px; ${f.M.mbDown} { width: 18px; height: 18px; } } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 1rem; } width: 350px; ${f.M.mbDown} { max-width: calc(320px - 2rem); } } } } } .most-engaging-wrapper { position: relative; padding: 0; &::before { position: absolute; z-index: 5; top: 0; left: 50%; width: calc(100% - 2rem); height: 1px; background: #f3f3f3; content: ' '; transform: translateX(-50%); } } ${f.M.mbDown} { margin-bottom: 12px; } } `;var V="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e";let CardReplyPopover=({onDeleteComment:e,commentId:t,className:a="",popoverClassName:i=""})=>{let{data:{env:{isMarryBaby:o},locale:s},action:{pushNotifications:d}}=(0,n.useContext)(g.T),{t:p}=(0,r.u)(),[m,v]=(0,n.useState)(!1),{authActionWrapper:f}=(0,u.iV)();return n.createElement("div",{className:a,onClick:e=>{e.preventDefault(),e.stopPropagation()}},m&&n.createElement(c.P,{thumbnail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23a)'%3e%3cpath d='M2 4.008h12m-8.667 0V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008zm-6 3.334v4m2.666-4v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:p("popup.deleteComment.title"),description:p("popup.deleteComment.description"),acceptText:p("popup.deletePost.accept"),cancelText:p("popup.deletePost.cancel"),onAccept:()=>(0,l.a)(void 0,void 0,void 0,function*(){var a;if(!t)return;let l=yield(0,c.j)({id:t,locale:s});(null==l?void 0:l.status)===1?(e&&e(),d({title:"",message:p("notification.success"),type:"success"})):d({title:"",message:(null===(a=null==l?void 0:l.messages)||void 0===a?void 0:a[0])||p("notification.failure"),type:"danger"})}),onClose:()=>v(!1)}),n.createElement(h.b,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:L,label:p("actionPopover.delete"),onClick:()=>{f(()=>{v(!0)})}}]},className:i,toggleButtonContent:n.createElement("img",{src:o?N:j,loading:"lazy"}),buttonProps:{}}))},U=v.Z.div` .add-link { color: ${b.r.colors.primaryBase}; } `,$=v.Z.div` margin: 16px 0; background: ${b.r.colors.yellow50}; padding: 5px 10px; border-radius: 2px; .icon { display: inline-block; vertical-align: middle; margin-right: 6px; } `,Y=v.Z.div` display: flex; align-items: center; gap: 8px; `,G=v.Z.div` padding: 8px 16px; `,Z=v.Z.div` margin-bottom: 12px; width: 100%; `,q=v.Z.div``,W=v.Z.div` margin-bottom: 16px; `,Q=v.Z.div` display: flex; flex-wrap: wrap; row-gap: 16px; ${f.M.tdUp} { align-items: center; column-gap: 24px; } `,K=v.Z.a` display: flex; align-items: center; gap: 16px; ${f.M.mbDown} { width: 100%; justify-content: space-between; } `,X=v.Z.div` display: flex; align-items: center; gap: 16px; `,J=v.Z.div` border-radius: ${b.r.borderRadius}; overflow: hidden; width: 48px; height: 48px; img { object-fit: cover; width: 100%; height: 100%; } `,RecommentCategories=({categories:e})=>{let{t}=(0,r.u)(),{data:{locale:a,env:{isMarryBaby:l}}}=(0,n.useContext)(g.T),i=(0,M.g)(a,l);return n.createElement(q,null,n.createElement(W,null,n.createElement(o.H,{tag:"h6",as:"h5"},t("cardReply.recommentCategories.heading"))),n.createElement(Q,null,e.map(e=>n.createElement(K,{href:i+e.permalink,key:String(e.termId),target:"_blank"},n.createElement(X,null,n.createElement(J,null,n.createElement("img",{src:e.featureImage||p.C.getAssetPath(l?"mb-logo.svg":"/logo/logomark.png"),alt:e.displayName,loading:"lazy"})),n.createElement(F.T,{size:"s3",weight:"bold"},e.displayName)),n.createElement(I.Z,{size:20,color:b.r.colors.gray400})))))},ee=v.Z.a` padding: 12px 0; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid ${b.r.colors.neutral100}; text-decoration: none; &:first-child { border-top: 0; } `,SourceItem=({postTitle:e,articleReviewed:t,modifiedTime:a,href:l})=>{let{t:i}=(0,r.u)(),o=(()=>{let{expert:e,editor:a,is_author:l}=t;if(e){let t={name:e.display_name,role:"expert",avatar:e.avatar};return l?Object.assign({title:i("articleAuthor.title.written-by")},t):"expert"===e.role?Object.assign({title:i("articleAuthor.title.expert")},t):Object.assign({title:i("articleAuthor.title.medical")},t)}if(a)return{title:i("articleAuthor.title.fact-check"),name:a.display_name,avatar:a.avatar}})();return n.createElement(ee,{href:l,title:e,target:"_blank"},n.createElement(F.T,{size:"s3",as:"h5",weight:"bold"},e),n.createElement("div",null,n.createElement(x.C,{avatar:null==o?void 0:o.avatar,avatarProps:{size:32},name:null==o?void 0:o.name,role:null==o?void 0:o.role,hideBackground:!0},n.createElement(x.C.SubTextRow,null,n.createElement(x.C.SubText,null,null==o?void 0:o.title," ",n.createElement("span",{style:{color:b.r.colors.gray800}},null==o?void 0:o.name)),n.createElement(x.C.SubDivider,null),n.createElement(x.C.SubText,null,a)))))};var et={header:"F4mmgSy",chevron:"A7QrQ7A"};let SourceList=e=>{var{listUrl:t,hideSourceList:a,categorySlug:s,editMode:d,collapseSource:c,onListChange:m,isMarryBaby:u}=e,h=(0,l._)(e,["listUrl","hideSourceList","categorySlug","editMode","collapseSource","onListChange","isMarryBaby"]);let{t:v}=(0,r.u)(),[f,w]=(0,n.useState)(t||[]),[x,C]=(0,n.useState)([]),[S,P]=(0,n.useState)([]),[A,I]=(0,n.useState)(!1);(0,n.useEffect)(()=>{a||(0,l.a)(void 0,void 0,void 0,function*(){I(!0);let e=f.map(e=>{let t=new URL(e),a=String(t.pathname).split("/").filter(e=>""!=e),l=t.origin,n=-1!==l.search("marrybaby.vn");return{isMarrySite:n,path:a[a.length-1],href:e}}),t=[...e.map(e=>(0,g.c)(e.isMarrySite?(0,g.s)(y.D9.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0):(0,g.o)(y.D9.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0),"GET"))],a=yield Promise.all(t);C(a.map((t,a)=>{var l,n;return(null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.post)&&Object.assign(Object.assign({},(0,E.g)(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.post)),{href:e[a].href})}).filter(Boolean)),I(!1)})},[]),(0,n.useEffect)(()=>{!a&&(null==x?void 0:x.length)===0&&s&&(0,l.a)(void 0,void 0,void 0,function*(){var e;let t=yield(0,g.c)(u?(0,g.s)(y.D9.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:s},!0):(0,g.o)(y.D9.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:s},!0),"GET");(null==t?void 0:t.data)&&P([(0,E.h)(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.category)])})},[x]);let handleRemoveItem=e=>{w(t=>{let a=[...t];return a.splice(e,1),a}),C(t=>{let a=[...t];return a.splice(e,1),a})};return(0,n.useEffect)(()=>{null==m||m(f)},[f]),n.createElement("div",Object.assign({},h),!d&&n.createElement($,null,n.createElement("img",{className:"icon",src:p.C.getAssetPath("warning.svg"),alt:"warning",style:{marginBottom:"3px",width:"18px"},loading:"lazy"}),n.createElement(F.T,{size:"s3",as:"span",dangerouslySetInnerHTML:{__html:v("cardReply.disclaimer")}})),a?null:A?n.createElement(B.L,null):x.length>0||d?n.createElement(U,null,n.createElement(T.U,{defaultValue:!c&&"accordion",styles:{control:{borderRadius:"inherit",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,borderBottom:0,borderTop:`1px solid ${b.r.colors.neutral100}`},item:{marginBottom:"16px",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",border:`1px solid ${b.r.colors.neutral100}`,borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px","&[data-active]":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},chevron:n.createElement("div",{className:et.chevron},n.createElement(O.Z,{color:b.r.colors.gray600,size:20}))},n.createElement(T.U.Item,{value:"accordion"},n.createElement(T.U.Control,null,n.createElement("div",{className:et.header},n.createElement(o.H,{as:"h4",tag:"h6"},v("cardReply.source")))),n.createElement(T.U.Panel,null,n.createElement(G,null,(x||[]).map((e,t)=>n.createElement(Y,{key:String(t)},"object"==typeof e?n.createElement(SourceItem,Object.assign({},e)):n.createElement(Z,null,n.createElement(R.I,{style:{width:"100%"},name:"source-list",value:e||"",size:"sm",onChange:e=>{w(a=>{let l=[...a];return l[t]=e,l}),C(a=>{let l=[...a];return l[t]=e,l})}})),d&&n.createElement(i.B,{size:"md",color:"transparent",icon:n.createElement(D.Z,null),onClick:()=>handleRemoveItem(t)}))),d&&n.createElement(i.B,{className:"add-link",color:"transparent",size:"md",icon:n.createElement(_.Z,{color:b.r.colors.primaryBase,size:18}),onClick:()=>{w(e=>[...e,""]),C(e=>[...e,""])}},"Add source")))))):n.createElement(RecommentCategories,{categories:S}))},ea=v.Z.div` position: relative; margin-bottom: 0; background: white; border-radius: ${b.r.borderRadius}; .verify-tag { margin-top: 12px; } .post-author { &.with-popover { padding-right: 2.6rem; } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${f.M.mbDown} { width: 32px; height: 32px; font-size: 16px; } } } .image-preview-wrapper, .link-preview-wrapper { width: 100%; &[data-is-reply='true'] { padding-right: 1rem; padding-left: 1rem; } } .post-reaction { background: none; border-radius: 0 0 6px 6px; } &[data-is-reply='true'] { > .post-author .author-avatar-wrapper { width: 20px; height: 20px; font-size: 10px; } } &[data-is-reply='false'] { border: 1px solid #e4e8ec; } .expert-wrapper { width: 100%; } &[data-has-booking='true'] { display: grid; .post-author { background-color: ${b.r.colors.primary50}; } .btn-wrapper { padding: 0 16px; .btn-booking { width: 100%; margin: 12px 0; } } } .comment-reply-wrapper { padding: 0 1rem; .more-cmt { .chevron-right { height: 1rem; width: 1rem; vertical-align: middle; } } } .top-divider { border-color: #e4e8ec; } .popover { position: absolute; top: 1.5rem; right: 1rem; .popover-menu__btn { display: flex; width: 1rem; height: 1rem; align-items: center; justify-content: center; padding: 0; background: transparent; &:hover { background-color: transparent; } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 12.5px; } } } } } } &[data-is-marrybaby='true'] { &[data-is-reply='false'] { border: none; } .image-preview-wrapper, .link-preview-wrapper { padding-right: 1rem; padding-left: 1rem; } .popover { .popover-menu__btn { width: 24px; height: 24px; } } margin-left: 56px; ${f.M.mbDown} { margin-left: 40px; } > .post-author { margin-left: -56px; ${f.M.mbDown} { margin-left: -40px; } .author-info { align-items: center; display: flex; align-items: center; .author-info-top { width: 100%; } .author-info-text-wrapper { justify-content: space-between; } } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${f.M.mbDown} { width: 24px; height: 24px; font-size: 12px; } } } &[data-is-reply] { > .post-author { .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${f.M.mbDown} { width: 24px; height: 24px; font-size: 12px; } } } } .comment-reply-wrapper { padding-right: 0; padding-left: 0; } .post-reaction { &::after { position: absolute; bottom: 0; left: 50%; width: calc(100% - 2rem); height: 1px; background: #f3f3f3; content: ' '; transform: translateX(-50%); } } .post-content-wrapper { padding-top: 0; padding-bottom: 0; ${f.M.mbDown} { padding-left: 0.5rem; } } ${f.M.mbDown} { margin-bottom: 12px; } } `,el=(0,v.Z)(SourceList)` margin-top: 12px; padding: 0.5rem 1rem 1rem; `,VerifiedTag=({userId:e,avatar:t,name:a,role:l,title:o,className:s})=>{let{t:d}=(0,r.u)(),[c,p]=(0,n.useState)(!1);return n.createElement(n.Fragment,null,n.createElement(i.B,{className:`-dzIuHr ${s}`,color:"success",size:"xs",onClick:()=>p(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},n.createElement("span",{className:"text"},n.createElement(k.Z,{isSolid:!0,size:18,color:b.r.colors.green800,className:"icon"}),d("cardReply.verifyBy",{name:`${a||""}`}))),n.createElement(x.c,{open:c,onClose:()=>p(!1),profileModalProps:{zIndex:1e3}},n.createElement(C.a,{authorProps:{userId:e,avatar:t,name:a,role:l,title:o},hideQuestionTab:!0})))},CardReply=({className:e,style:t,comment:a,type:o="comment",level:s=0,replyingId:d,onPostCommentSuccess:p,post:m,onDeleteComment:v,refetchComment:f,hasQuickBookingEnable:b,handleMakeAppointment:E,cardAuthorProps:P,maxChars:_=600,disableShortenContent:I})=>{var O,D,k,T,R,F,B,M,N,j,L,z,V;let{data:{locale:U,userInfo:$,env:{isMarryBaby:Y}}}=(0,n.useContext)(g.T),{t:G}=(0,r.u)(),[Z,q]=(0,n.useState)(a||null),{id:W,countLikes:Q,content:K,replies:X=[],images:J=[],author:ee,liked:et,link:en,mentionedUser:ei,mentions:eo}=Z,{text:er,replyingTo:es}=(0,c.k)(K),{authActionWrapper:ed}=(0,u.iV)({_joinCommunityIds:[null===(O=null==m?void 0:m.community)||void 0===O?void 0:O.id],_joinTopicIds:null===(D=null==m?void 0:m.topics)||void 0===D?void 0:D.map(e=>e.id)}),[ec,ep]=(0,n.useState)(4),em=null!=$&&!!$.id&&(null==X?void 0:X.some(e=>e.author.id===$.id)),addNewReply=e=>{q(t=>{if(!t.replies.find(t=>t.id===e.id)){t.replies.unshift(e);let a=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return f&&f(a),a}return t})},[eu,eg]=(0,n.useState)(!1),eh=(0,n.useMemo)(()=>"comment"===o&&X&&0!=X.length?X.sort((e,t)=>{let a=new Date(e.createdAt).getTime(),l=new Date(t.createdAt).getTime();return a>l?-1:a{var e,t;(null==ee?void 0:ee.hospitalId)&&(e=ee.hospitalId,(0,l.a)(void 0,void 0,void 0,function*(){var t;let a=yield(0,g.c)((0,g.g)(y.tC.GET_HOSPITAL_INFO,{hospital_branch_id:e,website_url:H.v[U]}),"get");(null===(t=null==a?void 0:a._data)||void 0===t?void 0:t.branch)&&eS(null==a?void 0:a._data.branch)})),(null==ee?void 0:ee.doctorId)&&(t=ee.doctorId,(0,l.a)(void 0,void 0,void 0,function*(){var e;let a=yield(0,g.c)((0,g.g)(y.tC.GET_DOCTOR_INFO,{doctorId:t,website_url:H.v[U]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&eA(null==a?void 0:a._data.doctor)}))},[ee.hospitalId,ee.doctorId]);let e_=(null==eP?void 0:eP.valid_outpatient)||(null==eP?void 0:eP.valid_telemedicine),eI=((null==eC?void 0:eC.total_available_service)||(null==eC?void 0:eC.total_available_doctor))>0,eO=b&&(e_||eI),eD=(null===(T=null==Z?void 0:Z.author)||void 0===T?void 0:T.type)==="chatbot";return n.createElement(u.I_,{defaultParams:{_joinCommunityIds:[null===(R=null==m?void 0:m.community)||void 0===R?void 0:R.id],_joinTopicIds:null===(F=null==m?void 0:m.topics)||void 0===F?void 0:F.map(e=>e.id)}},n.createElement(ea,{className:e,style:t,"data-is-reply":!!s,"data-is-marrybaby":Y,"data-has-booking":eO},"reply"===o&&n.createElement(A.D,{className:"top-divider",type:"solid"}),n.createElement("div",{style:{padding:"16px 16px 0"}},n.createElement(x.C,Object.assign({avatar:ey,name:eb,username:eE,timeText:null==m?void 0:m.createdTime,community:null==m?void 0:m.community,className:`post-author ${ef?"with-popover":""}`,type:o,userId:null==ee?void 0:ee.id,role:ew,expertId:null==ee?void 0:ee.partnerId,title:null==ee?void 0:ee.title,doctorId:null==ee?void 0:ee.doctorId,hospitalId:null==ee?void 0:ee.hospitalId,hasQuickBooking:eO,handleMakeAppointment:E,isAnonymous:(null==Z?void 0:Z.isAnonymous)||!!(null==m?void 0:m.isAnonymous)&&(null===(B=null==m?void 0:m.author)||void 0===B?void 0:B.username)===(null==ee?void 0:ee.username),hideBackground:eD,userType:null==ee?void 0:ee.type},P)),!!(null==Z?void 0:Z.isVerify)&&!(null==Z?void 0:Z.isOppose)&&n.createElement(VerifiedTag,{title:null===(M=null==Z?void 0:Z.userVerify)||void 0===M?void 0:M.title,name:null===(N=null==Z?void 0:Z.userVerify)||void 0===N?void 0:N.name,userId:null===(j=null==Z?void 0:Z.userVerify)||void 0===j?void 0:j.id,role:null===(L=null==Z?void 0:Z.userVerify)||void 0===L?void 0:L.role,avatar:null===(z=null==Z?void 0:Z.userVerify)||void 0===z?void 0:z.avatar,className:"verify-tag"})),n.createElement(C.P,{className:"post-content-wrapper",replyingTo:es,mentionedUser:ei,description:er,mentions:ex,maxChars:_,disableShortenContent:I}),n.createElement("span",null),n.createElement("span",null),J&&J.length>0?n.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},n.createElement(S.a,{images:J,authorName:null==ee?void 0:ee.username})):null,(!J||0===J.length)&&en?n.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},n.createElement(w.C,{url:en})):null,"most-engaging"!==o?n.createElement(n.Fragment,null,eD&&n.createElement(el,{listUrl:null==Z?void 0:Z.source,categorySlug:null==Z?void 0:Z.categorySlug}),n.createElement(h.C,{type:h.c.reply,loveCount:Q,replyCount:ev,className:"post-reaction",liked:et,isReplied:em,hideCommentIcon:"reply"===o||eD,hasShare:!1,onCommentClick:()=>ed(()=>eg(e=>!e)),onCommentCountClick:()=>ed(()=>{eg(!0)}),onLikeClick:()=>ed(()=>(0,l.a)(void 0,void 0,void 0,function*(){if(W){let e=yield(0,c.l)({commentId:W,setLike:!et,locale:U});1===e.status&&q(e=>Object.assign(Object.assign({},e),{liked:!et,countLikes:e.countLikes+(et?-1:1)}))}}))}),eu&&n.createElement(c.I,{replyingId:d||Z.id,replyToName:eb,isReply:!0,onClose:()=>eg(!1),onPostSuccess:e=>{"reply"===o?p&&p(e):addNewReply(e)},post:m,replyingUser:ee}),"comment"===o&&X&&X.length>0?n.createElement("div",{className:"comment-reply-wrapper"},null===(V=null==eh?void 0:eh.slice(0,ec))||void 0===V?void 0:V.map(e=>n.createElement(CardReply,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:s+1,replyingId:W,onPostCommentSuccess:addNewReply,post:m,onDeleteComment:()=>{q(t=>Object.assign(Object.assign({},t),{replies:t.replies.filter(t=>t.id!==e.id),countReplies:t.countReplies-1}))},handleMakeAppointment:E,hasQuickBookingEnable:b})),ev>ec&&n.createElement(n.Fragment,null,n.createElement(A.D,{className:"top-divider",type:"solid"}),n.createElement(i.B,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>ep(e=>e+4)},G("comment.seeMoreReplies",{count:ev-ec}),n.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 12 4-4-4-4'/%3e%3c/svg%3e",loading:"lazy"})))):null):null,ef&&n.createElement(CardReplyPopover,{onDeleteComment:v,className:"popover",commentId:Z.id})))},getMostEngagingComment=(e,t)=>(0,l.a)(void 0,void 0,void 0,function*(){var a,l,n;let i=yield(0,g.t)((0,g.e)(y.yy.COMMENT.LIST,{postId:e,_locale:t,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(n=null===(l=null===(a=null==i?void 0:i.data)||void 0===a?void 0:a.comments)||void 0===l?void 0:l.map(E.e))||void 0===n?void 0:n[0]}),CardPost=({className:e,style:t,hideViewMoreComment:a,showMostEngaging:s,onCommentClick:p,onCommentCountClick:v,onMostEngagingCommentClick:f,onPostCommentSuccess:b,disableCardLink:E,disableShortenContent:A,onDeletePost:_,onEditPost:I,post:O,mostEngagingComment:D,onDeleteComment:k,showInputComment:T,InlineCommentsComponent:R,hasQuickBookingEnable:F,handleMakeAppointment:B,onSaveUnsaveSuccess:M,cardAuthorProps:H,verticalReactions:N=!1})=>{let[j,L]=(0,n.useState)(O),[U,$]=(0,n.useState)(!1),[Y,G]=(0,n.useState)(D),{community:Z,topics:q,author:W,slug:Q,isPin:K,liked:X,photos:J,mentions:ee,title:et,description:ea,previewUrl:el,likesCount:en,commentsCount:ei,id:eo,commented:er}=j,{data:{locale:es,togetherUserId:ed,userInfo:ec,env:{isMarryBaby:ep,togetherBasePath:em}},action:{pushNotifications:eu}}=(0,n.useContext)(g.T),eg=!!(null==ec?void 0:ec.id),{t:eh}=(0,r.u)(),[ev,ef]=(0,n.useState)(T),eb=`${em}/${(null==Z?void 0:Z.slug)||"_"}/${Q||""}`,eE=`${(0,g.k)(es)}${eb}`,{authActionWrapper:ey}=(0,u.iV)((null==Z?void 0:Z.slug)?{_joinCommunityIds:[Z.id],_joinTopicIds:null==q?void 0:q.map(e=>e.id)}:void 0),[ew,ex]=(0,n.useState)(!1);(0,n.useEffect)(()=>{ef(T)},[T]);let eC=(null==W?void 0:W.name)||(null==W?void 0:W.username)||"",eS=(null==W?void 0:W.username)||(null==W?void 0:W.name)||"",eP=null==W?void 0:W.avatar,eA=(null==j?void 0:j.isAnonymous)?void 0:null==W?void 0:W.role,[e_,eI]=(0,n.useState)(null),[eO,eD]=(0,n.useState)(null);(0,n.useEffect)(()=>{var e,t;(null==W?void 0:W.hospitalId)&&(e=W.hospitalId,(0,l.a)(void 0,void 0,void 0,function*(){var t;let a=yield(0,g.c)((0,g.g)(y.tC.GET_HOSPITAL_INFO,{hospital_branch_id:e,website_url:g.l[es]}),"get");(null===(t=null==a?void 0:a._data)||void 0===t?void 0:t.branch)&&eI(null==a?void 0:a._data.branch)})),(null==W?void 0:W.doctorId)&&(t=W.doctorId,(0,l.a)(void 0,void 0,void 0,function*(){var e;let a=yield(0,g.c)((0,g.g)(y.tC.GET_DOCTOR_INFO,{doctorId:t,website_url:g.l[es]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&eD(null==a?void 0:a._data.doctor)}))},[W.hospitalId,W.doctorId]);let ek=(null==eO?void 0:eO.valid_outpatient)||(null==eO?void 0:eO.valid_telemedicine),eT=((null==e_?void 0:e_.total_available_service)||(null==e_?void 0:e_.total_available_doctor))>0;(0,n.useEffect)(()=>{(0,l.a)(void 0,void 0,void 0,function*(){if(eo&&ei&&s&&!(null==D?void 0:D.id)){let e=yield getMostEngagingComment(eo,es);G(e)}})},[eo,es,ei,s,null==D?void 0:D.id]),(0,n.useEffect)(()=>{G(D)},[null==D?void 0:D.id]);let onDeleteComment=e=>(0,l.a)(void 0,void 0,void 0,function*(){if(ei>1&&(null==Y?void 0:Y.id)&&(null==Y?void 0:Y.id)===(null==e?void 0:e.id)){let e=yield getMostEngagingComment(eo,es);G(e)}L(e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1})),k&&k(e)});return n.createElement(u.I_,{defaultParams:(null==Z?void 0:Z.slug)?{_joinCommunityIds:[Z.id],_joinTopicIds:null==q?void 0:q.map(e=>e.id)}:void 0},U&&n.createElement(c.S,{url:eE,avatar:m.D,text:et,onClose:()=>$(!1)}),n.createElement(z,{className:e,style:t,"data-is-marrybaby":ep},K?n.createElement(h.a,{className:"post-pin"}):null,n.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},n.createElement(x.C,Object.assign({avatar:eP,name:eC,username:eS,url:E?void 0:eb,community:Z,timeText:null==j?void 0:j.createdTime,className:"post-author",role:eA,userId:null==W?void 0:W.id,expertId:null==W?void 0:W.partnerId,doctorId:null==W?void 0:W.doctorId,hospitalId:null==W?void 0:W.hospitalId,title:null==W?void 0:W.title,hasQuickBooking:F&&(ek||eT),handleMakeAppointment:B,"data-testid":"name",isAnonymous:!!(null==j?void 0:j.isAnonymous),extendEle:n.createElement(CardPostPopoverMore,{authorEmail:String(null==W?void 0:W.email),onDeletePost:_,shareUrl:eE,post:j,className:"popover",onEditPost:I})},H))),n.createElement("a",{href:E?void 0:eb,className:"post-content-link-wrapper"},et&&n.createElement(o.H,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},d()(et)),n.createElement(C.P,{className:"post-content-wrapper",description:ea,disableShortenContent:A,mentions:ee,"data-testid":"Content of the Post"})),n.createElement("span",null),n.createElement("span",null),n.createElement("div",{key:"tag-topic"},q&&q.length>0?n.createElement(h.T,{topics:q,className:"post-topics"}):null),n.createElement("div",{key:"social-preview"},(null==j?void 0:j.introUrl)?n.createElement("div",{className:`social-preview-wrapper ${(null==J?void 0:J.length)?"has-image":""}`},n.createElement(P.S,{url:j.introUrl,image:j.bannerImage})):null),n.createElement("div",{key:"image-preview"},(null==J?void 0:J.length)?n.createElement("div",{className:"image-preview-wrapper"},n.createElement(S.a,{images:J,authorName:null==W?void 0:W.name,isSensitive:!!(null==j?void 0:j.isSensitive)})):null),n.createElement("div",{key:"link-preview"},(null==j?void 0:j.introUrl)||(null==J?void 0:J.length)||null==el||!el.url?null:n.createElement("div",{className:"link-preview-wrapper"},n.createElement(w.C,{title:el.title,url:el.url,image:el.image}))),n.createElement(h.C,{isMarryBaby:ep,type:h.c.post,loveCount:en,replyCount:ei,className:`post-reaction ${(null==J?void 0:J.length)||(null==el?void 0:el.url)?"hide-top-border":""}`,liked:ew?!X:X,isReplied:er,isSaved:(null==j?void 0:j.bookmarked)||!1,onCommentClick:()=>ey(()=>{p?p():ef(e=>!e)}),onCommentCountClick:()=>{ey(()=>{ep?ef(!0):v?v():E||(window.location.href=eb)})},onShareClick:()=>{$(!0)},onLikeClick:()=>(0,l.a)(void 0,void 0,void 0,function*(){ey(()=>(0,l.a)(void 0,void 0,void 0,function*(){if(eo&&!ew){ex(!0);try{let e=yield(0,c.m)({id:eo,locale:es});(null==e?void 0:e.status)!==1?eu((0,c.g)(eh)):L(e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked}))}catch(e){eu((0,c.g)(eh))}ex(!1)}}))}),onSaveClick:()=>{ey(()=>(0,l.a)(void 0,void 0,void 0,function*(){if((null==ec?void 0:ec.id)&&(null==j?void 0:j.id)){if(null==j?void 0:j.bookmarked){let e=yield(0,g.b)((0,g.e)(y.yy.BOOKMARK.DELETE,{_locale:es}),"DELETE",{headers:{"Content-Type":"application/json"},data:{post_id:String(j.id)}});(null==e?void 0:e.status)===1?(eu({title:"",message:eh("post.remove.success"),type:"success",displayIcon:V}),null==M||M()):eu({title:"",message:eh("post.remove.failed"),type:"danger",displayIcon:V})}else{let e=yield(0,g.b)((0,g.e)(y.yy.BOOKMARK.CREATE,{_locale:es}),"POST",{headers:{"Content-Type":"application/json"},data:{user_id:ed||ec.id,post_id:j.id}});(null==e?void 0:e.status)===1?(eu({title:"",message:eh("post.save.success"),type:"success",displayIcon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23595959'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e"}),null==M||M()):eu({title:"",message:eh("post.save.failed"),type:"danger",displayIcon:V})}}}))},onGoToUrl:e=>{let t=e?`${eE}${e}`:eE;eg?window.location.href=t:ey(()=>window.location.href=t)},showingMostEngaging:!!(s&&(null==Y?void 0:Y.id)),isVertical:N}),ev&&n.createElement(c.I,{isMainCmt:!T,onClose:()=>ef(!1),onPostSuccess:e=>{0!==ei||(null==Y?void 0:Y.id)||G(e),L(e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0})),b&&b(e)},post:j}),s&&(null==Y?void 0:Y.id)?n.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{f?(e.stopPropagation(),f()):window.location.href=eb}},n.createElement(CardReply,{hasQuickBookingEnable:F,handleMakeAppointment:B,comment:Y,post:j,onDeleteComment:()=>{onDeleteComment&&onDeleteComment(Y)},className:"most-engaging-comment",type:"most-engaging",key:Y.id,cardAuthorProps:H}),ei>1&&!a&&n.createElement(i.B,{className:"see-more-comments",color:"ghost",size:"md"},eh("comment.seeMoreComments",{count:ei-1}))):null,R))}},"3qph":function(e,t,a){a.d(t,{B:function(){return u},F:function(){return h},G:function(){return g},S:function(){return c},c:function(){return checkUserExist},f:function(){return fetchSSOV2Api},g:function(){return getUserInfo},h:function(){return handleAuthSuccess},l:function(){return p},r:function(){return resetPassword},u:function(){return updateUserInfo},w:function(){return m}});var l=a("usZY"),n=a("GOBr"),i=a("VkEI"),o=a("EoE9"),r=a("27Mu"),s=a("e6f9"),d=a("xrdX");let c={LOGIN_BY_SOCIAL:"member/social-login",EMAIL:{REGISTER_BY_SEND_OTP:"login/login-with-email",LOGIN_BY_PASSWORD:"member/login",VERIFY_BY_OTP:"login/email-verify-code",SEND_OTP:"login/email-resend-otp-code"},PHONE:{REGISTER_BY_SEND_OTP:"login/login-with-sms",SEND_OTP:"login/sms/sent-otp",VERIFY_BY_OTP:"login/phone-verify-code",LOGIN_BY_PASSWORD:"member/login-by-phone",UPDATE_PHONE_SEND_OTP:"login/sms-social/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/phone-verify-code"},WHATSAPP:{REGISTER_BY_SEND_OTP:"login/login-with-whatsapp",SEND_OTP:"login/whatsapp/sent-otp",UPDATE_PHONE_SEND_OTP:"login/sms-social/whatsapp/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/whatsapp-verify-code",VERIFY_BY_OTP:"login/whatsapp-verify-code"},ZALO:{REGISTER_BY_SEND_OTP:"login/login-with-zalo",SEND_OTP:"login/zalo/sent-otp",VERIFY_BY_OTP:"login/zalo-verify-code",UPDATE_PHONE_SEND_OTP:"login/sms-social/zalo/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/zalo-verify-code"},RESET_PASSWORD:"login/reset-password",CHECK_USER_EXIST:"member/check-user-exist",UPDATE_USER_INFO:"login/update-first-info",SETUP_USER_INFO:"login/setup-first-info",ECOM_CARE:{SEND_OTP:"login/ecom-care/send-email-otp-code",VERIFY_OTP:"login/ecom-care/email-verify-code",RESEND_OTP:"login/ecom-care/resend-email-otp-code"}},p="vi-VN",m={[s.L.Vietnam]:"1",[s.L.Indonesia]:"2",[s.L.Malaysia]:"3"}[p];o.L[p].PHONE;let getSSOV2ApiUrl=e=>(0,i.n)(`${(0,i.a)(p)}/api/v2/${e}`),getSSOApiUrl=e=>(0,i.n)(`${(0,i.a)(p)}/api/${e}`),u="hhg_user_token",fetchSSOV2Api=(e,t={},a)=>(0,l.a)(void 0,void 0,void 0,function*(){var l;let n;let i=a?"":null===(l=document.cookie.split("; ").find(e=>e.startsWith(u)))||void 0===l?void 0:l.split("=")[1];try{t.body instanceof FormData&&(t.body.append("ga_client_id",(0,r.ej)("_ga")||""),t.body.append("referrer",window.location.href)),n=yield fetch(getSSOV2ApiUrl(e),i?Object.assign(Object.assign({},t),{headers:Object.assign({Authorization:`Bearer ${i}`},null==t?void 0:t.headers)}):t)}catch(e){return console.error(e),null}return null==n?void 0:n.json()}),fetchSSOApi=(e,t={},a)=>(0,l.a)(void 0,void 0,void 0,function*(){var l;let n;let i=a?"":null===(l=document.cookie.split("; ").find(e=>e.startsWith(u)))||void 0===l?void 0:l.split("=")[1];try{n=yield fetch(getSSOApiUrl(e),i?Object.assign(Object.assign({},t),{headers:Object.assign({Authorization:`Bearer ${i}`},null==t?void 0:t.headers)}):t)}catch(e){return console.error(e),null}return null==n?void 0:n.json()}),resetPassword=(e,t)=>(0,l.a)(void 0,void 0,void 0,function*(){let a=new FormData;return a.append("password",e),a.append("confirm-password",t),fetchSSOV2Api(c.RESET_PASSWORD,{method:"POST",body:a})}),checkUserExist=({email:e,phone:t})=>(0,l.a)(void 0,void 0,void 0,function*(){let a=new FormData;return e?a.append("email",e):a.append("phone_number",t),fetchSSOV2Api(c.CHECK_USER_EXIST,{method:"POST",body:a})}),updateUserInfo=e=>(0,l.a)(void 0,void 0,void 0,function*(){let t=new FormData;return Object.keys(e).forEach(a=>{let l=e[a];null!=l&&("string"!=typeof l||l.trim())&&t.append(a,e[a])}),fetchSSOV2Api(c.SETUP_USER_INFO,{method:"POST",body:t})}),g=n.y?"289442006438-040a42cbidr6v5d178f3iqi9q95821r3.apps.googleusercontent.com":"289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com",h="2759888574045636",getUserInfo=()=>(0,l.a)(void 0,void 0,void 0,function*(){return fetchSSOApi("user/profile",{method:"POST"})}),handleAuthSuccess=e=>{(null==e?void 0:e.token)&&(0,r.d8)(u,e.token,{domain:"localhost"===window.location.hostname?"localhost":`.${d.v[p]}`,expires:new Date(1e3*e.expire_in).toUTCString()}),(null==e?void 0:e.refresh_token)&&(0,r.d8)(o.k,e.refresh_token,{domain:"localhost"===window.location.hostname?"localhost":`.${d.v[p]}`})}},g2vb:function(e,t,a){a.d(t,{M:function(){return f},N:function(){return NotificationsHandler},a:function(){return getHeadingStyles},g:function(){return getMantineThemeOverride},s:function(){return showNotification},t:function(){return P},u:function(){return useMantineLocale}});var l=a("usZY"),n=a("q1tI"),i=a("Wgwc"),o=a.n(i),r=a("e6f9"),s=a("INKa"),d=a("0Woy"),c=a("EoE9"),p=a("mYVa"),m=a("ipFv"),u=a("iBNF"),g=a("pvoY"),h=a("COU7"),v=a("RvUM");let f={[r.L.Vietnam]:"vi",[r.L.Cambodia]:"km",[r.L.India]:"hi",[r.L.Indonesia]:"id",[r.L.Malaysia]:"ms",[r.L.Thailand]:"th",[r.L.Taiwan]:"zh-tw",[r.L.PhilippinesTagalog]:"tl-ph",[r.L.PhilippinesEnglish]:"en",[r.L.Myanmar]:"my",[r.L.Singapore]:"zh-cn"},b={[r.L.Vietnam]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"EdQk",23)),[r.L.Cambodia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"9mFM",23)),[r.L.India]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"sjup",23)),[r.L.Indonesia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"gydT",23)),[r.L.Malaysia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"KjFU",23)),[r.L.Thailand]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"axPs",23)),[r.L.Taiwan]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"UIeI",23)),[r.L.Singapore]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"pHGr",23)),[r.L.PhilippinesTagalog]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"BmsB",23)),[r.L.PhilippinesEnglish]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"njAx",23)),[r.L.Myanmar]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"5EMu",23))},useMantineLocale=e=>{let[t,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{(0,l.a)(void 0,void 0,void 0,function*(){var t;a(!1),yield null===(t=b[e])||void 0===t?void 0:t.call(b),o().locale(f[e]),a(!0)})},[e]),{isLoaded:t}},GlobalButtonStyle=()=>({Button:{defaultProps:{variant:"primary",size:"md"}}}),E={[h.C.NONE]:{hb:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],mb:["#FFE9F1","#F8CCDC","#F5B4CB","#F29CBA","#EE84AA","#EB6B99","#E85388","#D34C7C","#BE446F","#A93D63"],blue:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],gray:["#fafafa","#f2f2f2","#d9d9d9","#bfbfbf","#8c8c8c","#737373","#595959","#404040","#262626","#1a1a1a"],delftGray:["#F3F3F3","#EAEAEC","#D9DAE2","#B9BAC8","#9898A9","#7C7C8F","#5A5A72","#3E3F58","#202135","#0C0C12"],neutral:["#f7f9fc","#e4e8ec","#d2d6dc","#bfc5cc","#adb3bc","#9aa2ac","#87909c","#757f8c","#626d7c","#545E6C"],green:["#e0f8ee","#b3eed5","#7ce2b9","#2ed69e","#00CB8A","#00C076","#00B16A","#009E5C","#008C50","#006C39"],pink:["#fff1f6","#ffdce9","#fec7dc","#feb2cf","#fe9dc2","#fd87b4","#fd72a7","#fc5d9a","#fc488d","#e92d74"],violet:["#F5EDFF","#E7D2F7","#D8B7F0","#CA9CE8","#BB82E1","#AD67D9","#9E4CD1","#9031CA","#8116C2","#63059D"],yellow:["#fff8e2","#ffecb6","#ffe187","#ffd658","#ffcb37","#ffc326","#ffb521","#fea21e","#fe921d","#fc7419"],teal:["#e0f7fc","#b1ebf8","#7ddff3","#44d1ec","#00c7e6","#00bee0","#00aecd","#0099b2","#008599","#00626c"],indigol:["#CEDDF0","#ACC5E6","#95B3DA","#85A6CF","#6D91BE","#5F85B5","#4C77AC","#35639C","#284A75","#1B3250"],red:["#fae9e8","#feccbf","#FEAA96","#f44d2c","#ff6f4d","#ff5331","#f44d2c","#e64728","#d84023","#bf331b"],redViolet:["#F3EAEB","#E8D5D7","#DDC1C4","#D1ACB0","#C5979C","#BA8288","#AF6D74","#A35961","#97444D","#8C2F39"]},[h.C.LEADGEN]:{hb:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],mb:["#FFE9F1","#F8CCDC","#F5B4CB","#F29CBA","#EE84AA","#EB6B99","#E85388","#D34C7C","#BE446F","#A93D63"],blue:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],gray:["#fafafa","#f2f2f2","#d9d9d9","#bfbfbf","#8c8c8c","#737373","#595959","#404040","#262626","#111111"],delftGray:["#F3F3F3","#EAEAEC","#D9DAE2","#B9BAC8","#9898A9","#7C7C8F","#5A5A72","#3E3F58","#202135","#0C0C12"],neutral:["#f7f9fc","#e4e8ec","#d2d6dc","#bfc5cc","#adb3bc","#9aa2ac","#87909c","#757f8c","#626d7c","#545E6C"],green:["#e0f8ee","#b3eed5","#7ce2b9","#2ed69e","#00CB8A","#00C076","#00B16A","#009E5C","#008C50","#006C39"],pink:["#fff1f6","#ffdce9","#fec7dc","#feb2cf","#fe9dc2","#fd87b4","#fd72a7","#fc5d9a","#fc488d","#e92d74"],violet:["#F5EDFF","#E7D2F7","#D8B7F0","#CA9CE8","#BB82E1","#AD67D9","#9E4CD1","#9031CA","#8116C2","#63059D"],yellow:["#fff8e2","#ffecb6","#ffe187","#ffd658","#ffcb37","#ffc326","#ffb521","#fea21e","#fe921d","#fc7419"],teal:["#e0f7fc","#b1ebf8","#7ddff3","#44d1ec","#00c7e6","#00bee0","#00aecd","#0099b2","#008599","#00626c"],indigol:["#CEDDF0","#ACC5E6","#95B3DA","#85A6CF","#6D91BE","#5F85B5","#4C77AC","#35639C","#284A75","#1B3250"],red:["#fae9e8","#feccbf","#FEAA96","#f44d2c","#ff6f4d","#ff5331","#f44d2c","#e64728","#d84023","#bf331b"],redViolet:["#F3EAEB","#E8D5D7","#DDC1C4","#D1ACB0","#C5979C","#BA8288","#AF6D74","#A35961","#97444D","#8C2F39"]}};function NotificationsHandler(){return n.createElement(s.T,{position:"top-right",zIndex:c.Z+5,autoClose:5e3})}let y={success:"green",danger:"red",warning:"yellow",info:"blue",firebase:"gray"},w={success:n.createElement(()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M10 18.333a8.333 8.333 0 1 0 0-16.666 8.333 8.333 0 0 0 0 16.666",fill:"#00B16A"}),n.createElement("path",{d:"m13.833 7.5-5.5 5-2.5-2.273",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),danger:n.createElement(()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10",fill:"#262626"}),n.createElement("path",{d:"m14.829 9.172-5.657 5.656m-.001-5.656 5.657 5.656",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),warning:n.createElement(()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1.66666C5.4 1.66666 1.66667 5.39999 1.66667 9.99999C1.66667 14.6 5.4 18.3333 10 18.3333C14.6 18.3333 18.3333 14.6 18.3333 9.99999C18.3333 5.39999 14.6 1.66666 10 1.66666ZM10 10.8333C9.54167 10.8333 9.16667 10.4583 9.16667 9.99999V6.66666C9.16667 6.20832 9.54167 5.83332 10 5.83332C10.4583 5.83332 10.8333 6.20832 10.8333 6.66666V9.99999C10.8333 10.4583 10.4583 10.8333 10 10.8333ZM9.16667 12.5V14.1667H10.8333V12.5H9.16667Z",fill:"#FE921D"})),null),info:n.createElement(()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12",fill:"#2D87F3"}),n.createElement("path",{d:"M8 11V8m0-3h.01",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),firebase:""},showNotification=e=>{var{type:t,title:a}=e,i=(0,l._)(e,["type","title"]);let o=w[t];d.N9.show(Object.assign(Object.assign({title:n.createElement("b",null,a),icon:o,withCloseButton:!0,closeButtonProps:{label:"Close alert"}},i),{styles:e=>{let a=y[t]||"blue";return{root:{backgroundColor:e.colors[a][0],borderColor:e.colors[a][0],"&::before":{backgroundColor:e.white}},title:{color:e.colors[a][8]},description:{color:e.black},closeButton:{color:e.black,"&:hover":{backgroundColor:e.colors[a][0]}},icon:{backgroundColor:"transparent",padding:0}}}}))},x={Container:{defaultProps:{sizes:{lg:(0,p.em)(g.S.LG)}}}},C={none:{default:[{size:"40px",lineHeight:"52px",letterSpacing:"-1.2px"},{size:"32px",lineHeight:"42px",letterSpacing:"-1px"},{size:"26px",lineHeight:"36px",letterSpacing:"-0.8px"},{size:"22px",lineHeight:"32px",letterSpacing:"-0.6px"},{size:"18px",lineHeight:"28px",letterSpacing:"-0.2px"},{size:"16px",lineHeight:"24px",letterSpacing:0}],mbDown:[{size:"26px",lineHeight:"34px",letterSpacing:"-0.9px"},{size:"24px",lineHeight:"32px",letterSpacing:"-0.8px"},{size:"20px",lineHeight:"26px",letterSpacing:"-0.7px"},{size:"18px",lineHeight:"26px",letterSpacing:"-0.6px"},{size:"16px",lineHeight:"24px",letterSpacing:"-0.2px"},{size:"14px",lineHeight:"22px",letterSpacing:"-0.2px"}]},leadgen:{default:[{size:"40px",lineHeight:"48px",letterSpacing:"-1.2px"},{size:"32px",lineHeight:"40px",letterSpacing:"-1px"},{size:"26px",lineHeight:"32px",letterSpacing:"-0.6px"},{size:"20px",lineHeight:"28px",letterSpacing:"-0.4px"},{size:"17px",lineHeight:"24px",letterSpacing:"-0.4px"},{size:"15px",lineHeight:"24px",letterSpacing:"-0.3px"}],mbDown:[{size:"26px",lineHeight:"34px",letterSpacing:"-0.9px"},{size:"24px",lineHeight:"32px",letterSpacing:"-0.8px"},{size:"20px",lineHeight:"26px",letterSpacing:"-0.7px"},{size:"18px",lineHeight:"26px",letterSpacing:"-0.6px"},{size:"16px",lineHeight:"24px",letterSpacing:"-0.2px"},{size:"14px",lineHeight:"22px",letterSpacing:"-0.2px"}]}},getHeadingStyles=e=>{let{version:t=h.C.NONE,mbDown:a}=e||{},l=C[t]||{};return Object.fromEntries((l[a?"mbDown":"default"]||[]).map((e,t)=>[`h${t+1}`,{fontSize:e.size,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing}]))},GlobalHeadingStyle=(e=h.C.NONE)=>({Title:{styles:{root:Object.assign(Object.assign({fontWeight:h.F.bold},getHeadingStyles({version:e})),{[`&${g.M.mbDown}`]:Object.assign({},getHeadingStyles({version:e,mbDown:!0}))})}}}),GlobalInputStyle=e=>{var t;return{InputWrapper:{styles:{label:{display:"inline-flex",gap:4,marginBottom:"0.25rem",fontWeight:600,fontSize:(0,p.h)(14),lineHeight:"22px",color:u.r.colors.gray600},description:{fontWeight:400,fontSize:"12px",lineHeight:"18px",color:u.r.colors.gray600,marginBottom:"0.25rem"},error:{marginTop:"0.25rem"}}},NumberInput:{defaultProps:{decimalSeparator:null===(t=c.I[e])||void 0===t?void 0:t.separator}},Input:{styles:(e,t,{size:a})=>({input:{border:`1px solid ${u.r.colors.gray200}`,transition:`all ${v.A} ease-in-out`,"&:not(.mantine-Textarea-input)":Object.assign({},(()=>{switch(a){case"lg":return{height:48,minHeight:"unset",fontSize:16,lineHeight:"24px"};case"md":return{height:40,minHeight:"unset",fontSize:(0,p.h)(14),lineHeight:"22px"};case"sm":return{height:32,minHeight:"unset",fontSize:(0,p.h)(14),lineHeight:"22px"}}})()),"&:hover":{border:`1px solid ${e.primaryColor}`},"&:focus":{boxShadow:`0px 0px 0px 2px ${e.colors[e.primaryColor][2]}`}},'&[data-invalid="true"]':{border:`1px solid ${u.r.colors.red600}`,color:"#000"}})}}},S={Radio:{defaultProps:{size:"sm",color:"blue.6"},styles:{radio:{backgroundColor:"transparent","&:checked":{backgroundColor:"transparent"}}}}},P=E[h.C.NONE],getMantineThemeOverride=(e,t="hb",a)=>{var l;return{defaultRadius:"hb"===t?8:16,cursorType:"pointer",colors:Object.assign(Object.assign(Object.assign({},null!==(l=E[a])&&void 0!==l?l:E[h.C.NONE]),u.r.colors),{toneYellow:"#fff9eb",toneGreen:"#f2fcf7",toneBlue:"#e0e9fb",tonePink:"#ffeaf1"}),primaryColor:t,primaryShade:6,fontFamily:(e===r.L.Cambodia?"Battambang":e===r.L.Thailand?"Noto Sans Thai":"Inter")+", -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",breakpoints:{xs:(0,p.em)(g.B.BREAK_POINT_SMALL_MOBILE),sm:(0,p.em)(g.B.BREAK_POINT_MOBILE),md:(0,p.em)(g.B.BREAK_POINT_TABLET),lg:(0,p.em)(g.B.BREAK_POINT_PC),xl:(0,p.em)(g.B.BREAK_POINT_LGPC)},components:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},GlobalInputStyle(e)),S),GlobalButtonStyle()),GlobalHeadingStyle(a)),x),other:{template:t,customStyleType:a,defaultImage:m.C.getAssetPath("mb"===t?"default-image-mb.jpg":"default-image.jpg")}}}},HesN:function(e,t,a){a.d(t,{C:function(){return Container}});var l=a("q1tI");let Container=({children:e,className:t,style:a,type:n})=>l.createElement("div",{className:`d76E4SH ${t||""}`,style:a,"data-type":n},e)},ewA8:function(e,t,a){a.d(t,{O:function(){return OvulationForm}});var l,n,i=a("usZY"),o=a("q1tI"),r=a("/npG"),s=a("mYVa"),d=a("iuhU"),c=a("8vDj"),p=a("cChf"),m=a("ZFu2"),u=a("zCDQ"),g=a("MQ5V"),h=a("wvgE"),v=a("srUE"),f=a("FQi+"),b=a("68DG"),E=a("WdVV"),y=a("Zge2");let AvoidPregnancy=e=>{var{isMarryBaby:t,size:a=24}=e,l=(0,i._)(e,["isMarryBaby","size"]);let n=Object.assign({width:a,height:a},l);return t?o.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o.createElement("path",{d:"M16.5 27.133c1.298 0 2.596-.149 3.868-.447a9.15 9.15 0 0 0 6.818-6.818 16.94 16.94 0 0 0 0-7.736 9.15 9.15 0 0 0-6.818-6.818 16.94 16.94 0 0 0-7.736 0 9.15 9.15 0 0 0-6.818 6.818A17 17 0 0 0 5.367 16a.867.867 0 0 1-1.734 0c0-1.43.165-2.862.494-4.264a10.88 10.88 0 0 1 8.109-8.11 18.7 18.7 0 0 1 8.528 0 10.88 10.88 0 0 1 8.11 8.11 18.7 18.7 0 0 1 0 8.528 10.88 10.88 0 0 1-8.11 8.11 18.7 18.7 0 0 1-4.264.493.867.867 0 0 1 0-1.734",fill:"#3E3F58"}),o.createElement("path",{d:"M12.5 16a4 4 0 1 1 8 0 4 4 0 0 1-8 0",fill:"#fff"}),o.createElement("path",{d:"M11.633 16a4.867 4.867 0 1 1 9.734 0 4.867 4.867 0 0 1-9.734 0m4.867-3.133a3.133 3.133 0 1 0 0 6.266 3.133 3.133 0 0 0 0-6.266m-4 9.8a2.667 2.667 0 1 1-5.333 0 2.667 2.667 0 0 1 5.333 0",fill:"#3E3F58"}),o.createElement("path",{d:"M10.305 22.195c.26.26.26.683 0 .943l-1.91 1.91c-.36.36-.562.847-.562 1.355a3.25 3.25 0 0 1-1.796 2.907l-1.239.62a.667.667 0 1 1-.596-1.193l1.238-.62a1.92 1.92 0 0 0 1.06-1.714c0-.862.342-1.688.952-2.298l1.91-1.91c.26-.26.682-.26.943 0",fill:"#3E3F58"}),o.createElement("path",{d:"M3.874 4.788a1 1 0 0 1 1.414-1.414l23.099 23.098a1 1 0 1 1-1.415 1.415z",fill:"#E85388"})):o.createElement("svg",Object.assign({viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o.createElement("g",{clipPath:"url(#clip0_1530_7251)"},o.createElement("path",{d:"M8.983 10.87a.23.23 0 0 1 .049-.16c.08-.114.156-.229.207-.36.1-.166.168-.348.233-.528.246-.668.397-1.36.508-2.062.036-.235.076-.471.09-.71.065-.511.101-1.024.095-1.541.004-.015.011-.03.011-.044a13 13 0 0 0-.089-1.62c-.023-.196-.093-.335-.298-.406-.293-.1-.48-.316-.568-.615a2.7 2.7 0 0 0-.217-.566c-.123-.222-.29-.391-.54-.47-.057-.018-.088-.016-.106.052q-.045.165-.073.336c-.005.044 0 .058.048.058q.122.005.244.017c.127.009.21.09.202.196-.011.111-.108.179-.239.166-.065-.007-.133-.009-.198-.016-.058-.008-.077.016-.067.072q.027.165.052.332c.006.043.031.053.07.053.078 0 .147-.03.218-.057.104-.042.2-.004.242.093.04.09.004.187-.093.235-.13.063-.27.113-.411.085a.23.23 0 0 0-.235.077c-.04-.084-.106-.146-.167-.211-.46-.475-.55-1.194-.235-1.82.18-.359.45-.627.828-.776A.4.4 0 0 0 8.69.595c.33-.317.734-.477 1.172-.55.641-.11 1.25-.024 1.819.3.41.233.728.566.942.983.131.253.188.535.246.814.16.762.233 1.538.293 2.313q.108 1.411.213 2.826c.055.712.13 1.422.24 2.128.066.428.175.846.26 1.27.097.479.039.941-.24 1.358a1.2 1.2 0 0 1-.517.428c-.163.05-.327.105-.491.155-.178.052-.302-.059-.268-.239a4.6 4.6 0 0 0 .077-.72 13.6 13.6 0 0 0-.133-2.225c-.03-.196-.055-.395-.087-.591-.07-.43-.151-.857-.257-1.28l-.015-.07a16 16 0 0 0-.282-1.03c-.012-.039-.025-.079-.076-.075-.038.003-.053.034-.058.07l-.146 1.105c-.05.219-.094.437-.158.652a5.5 5.5 0 0 1-.806 1.654l-.091.113c-.308.382-.654.719-1.094.95-.122.06-.177.048-.252-.063",fill:"#1B3250"}),o.createElement("path",{d:"M12.304 9.435c.1.737.154 1.477.133 2.224a4.6 4.6 0 0 1-.077.72c-.034.182.09.293.268.239q.246-.075.491-.155c.053.226.126.448.17.675q.09.452.129.912c.025.302.043.603.032.905q-.015.483-.065.964a14 14 0 0 1-.299 1.707c-.02.086-.045.17-.065.255-.02.09-.068.12-.16.12L8.789 18H7.781c-.111 0-.117-.011-.13-.124a3 3 0 0 0-.361-1.121c-.132-.235-.297-.448-.415-.692a3.14 3.14 0 0 1-.324-1.521c.233.07.418.001.571-.184q.236-.281.477-.559c.07-.08.136-.164.244-.193.315-.087.631-.166.94-.262.665-.207 1.324-.43 1.917-.804.251-.159.475-.344.595-.63.237-.564.415-1.147.592-1.733.085-.28.184-.55.417-.742",fill:"#2D87F3"}),o.createElement("path",{d:"M12.304 9.435c-.233.194-.33.462-.413.74-.177.585-.355 1.169-.592 1.733-.12.286-.344.471-.595.63-.593.375-1.254.597-1.916.804-.312.097-.628.177-.941.262-.11.031-.177.113-.244.193q-.24.277-.477.559c-.153.184-.34.253-.571.184a.87.87 0 0 1-.44-.54.64.64 0 0 1 .045-.503 1 1 0 0 0 .094-.31.47.47 0 0 1 .392-.405c.132-.03.269-.039.404-.053a.4.4 0 0 0 .114-.024c.115-.009.21-.069.31-.12.322-.167.646-.328.966-.497q.586-.308 1.192-.571a.78.78 0 0 0 .473-.524q.09-.305.177-.608c.047-.171.113-.337.14-.514a5.5 5.5 0 0 0 .806-1.654c.064-.215.108-.433.159-.652a.63.63 0 0 1 .342-.054c.08.013.156.036.237.054.105.423.187.85.256 1.28q.039.292.082.59m-4.19-5.947a.23.23 0 0 1 .235-.076c.142.025.282-.022.411-.086.097-.047.133-.143.093-.234-.042-.095-.138-.133-.242-.093-.071.027-.14.056-.218.056-.039 0-.062-.009-.07-.053q-.024-.165-.052-.33-.017-.082.067-.074c.066.008.133.01.198.017.131.013.228-.053.239-.166.01-.105-.073-.187-.202-.196-.082-.006-.162-.015-.244-.017-.046 0-.053-.014-.047-.058.016-.115.043-.224.072-.337.017-.067.05-.069.106-.05.25.078.417.247.54.469.1.178.16.371.217.566.087.298.273.515.568.615.206.07.275.21.298.406.066.539.091 1.08.09 1.62 0 .014-.008.029-.011.043-.272-.016-.525.075-.783.133a1.4 1.4 0 0 1-.513.031.5.5 0 0 1-.433-.36 2.3 2.3 0 0 1-.091-.46c.154-.024.309-.048.451-.124.1-.055.135-.148.09-.242a.18.18 0 0 0-.24-.084 1 1 0 0 1-.376.087 1.3 1.3 0 0 0-.326-.482c-.096-.093-.096-.215-.013-.319.06-.07.126-.134.186-.202",fill:"#FCCAAF"}),o.createElement("path",{d:"M10.069 7.052c-.013.239-.053.473-.09.71-.11.7-.261 1.394-.507 2.062-.066.18-.135.362-.233.528a.46.46 0 0 0-.235-.4c-.328-.21-.544-.508-.599-.898a.86.86 0 0 1 .242-.742c.237-.244.504-.459.761-.683.188-.162.37-.327.555-.493.033-.031.064-.064.106-.084m.349 2.818c-.025.176-.093.341-.14.513-.057.204-.119.404-.177.608a.78.78 0 0 1-.473.524q-.607.261-1.192.571c-.32.17-.646.33-.966.497-.099.051-.195.111-.31.12.066-.15.177-.266.277-.387.273-.334.615-.596.932-.881q.306-.28.611-.565c.077.11.13.124.251.06.439-.229.787-.567 1.094-.95z",fill:"#2D87F3"}),o.createElement("path",{d:"M8.271 4.49a1 1 0 0 0 .377-.088.183.183 0 0 1 .239.084c.047.095.01.187-.09.242-.14.076-.296.1-.45.124z",fill:"#FF6F4D"}),o.createElement("path",{d:"M11.96 7.563c-.079-.018-.157-.041-.237-.054a.65.65 0 0 0-.342.054l.146-1.104c.005-.037.02-.068.058-.071.05-.006.063.034.076.074q.159.511.282 1.03.01.036.017.071",fill:"#2D87F3"}),o.createElement("path",{d:"M9.834 1.004a7.996 7.996 0 1 0 0 15.992 7.996 7.996 0 0 0 0-15.992M9.465 2.26c1.606-.09 3.191.4 4.467 1.378a.282.282 0 0 1 .03.424l-9.066 9.066a.283.283 0 0 1-.424-.03A6.749 6.749 0 0 1 9.465 2.26m.369 13.49a6.72 6.72 0 0 1-4.016-1.325.284.284 0 0 1-.032-.426l9.046-9.047a.283.283 0 0 1 .427.032A6.75 6.75 0 0 1 9.834 15.75",fill:"#F44D2C"}),o.createElement("path",{d:"M10.159 5.509c.005.517 2.997-1.054 2.997-1.054s-.133-1.55-.293-2.313c-.058-.279-.114-.56-.245-.814a2.35 2.35 0 0 0-.943-.983c-.568-.324-1.178-.41-1.818-.3-.44.073-.843.233-1.173.55a.4.4 0 0 1-.147.085c-.379.15-.648.417-.828.776-.315.626-.224 1.345.235 1.82.062.065.127.127.167.21a.23.23 0 0 1 .235-.076c.142.028.282-.022.411-.085.097-.048.133-.144.093-.235-.042-.097-.138-.135-.242-.093-.071.027-.14.057-.218.057-.039 0-.064-.01-.07-.053q-.024-.165-.052-.332c-.01-.056.009-.08.067-.072.066.007.133.009.198.016.131.013.228-.055.239-.166.009-.105-.075-.187-.202-.196h-.007q-.118-.013-.237-.017c-.047 0-.053-.014-.047-.058.016-.114.043-.225.072-.336.019-.068.05-.07.106-.051.25.078.417.247.54.47.099.178.16.37.217.565.087.299.275.515.568.615.206.071.275.21.298.406.066.539.091 1.078.09 1.62z",fill:"#1B3250"}),o.createElement("path",{d:"M8.107 3.488a.23.23 0 0 1 .235-.076c.142.025.282-.022.411-.086.097-.047.133-.143.093-.234-.042-.095-.138-.133-.242-.093-.07.027-.14.056-.218.056-.038 0-.062-.009-.07-.053q-.024-.165-.052-.33-.017-.082.067-.074c.066.008.133.01.199.017.13.013.227-.053.238-.166.01-.105-.073-.187-.202-.196-.082-.006-.162-.015-.244-.017-.045 0-.053-.014-.047-.058.016-.115.043-.224.073-.337.016-.067.049-.069.105-.05.25.078.417.247.54.469.1.178.16.371.217.566.088.298.273.515.568.615.206.07.275.21.298.406.066.539.091 1.08.09 1.62 0 .014-.008.029-.011.043-.271-.016-.524.075-.783.133a1.4 1.4 0 0 1-.513.031.5.5 0 0 1-.433-.36 2.3 2.3 0 0 1-.091-.46c.154-.024.31-.048.451-.124.1-.055.135-.148.09-.242a.18.18 0 0 0-.24-.084 1 1 0 0 1-.376.087 1.3 1.3 0 0 0-.326-.482c-.096-.093-.096-.215-.012-.319.06-.07.125-.134.185-.202",fill:"#FCCAAF"}),o.createElement("path",{d:"M8.265 4.49a1 1 0 0 0 .376-.088.183.183 0 0 1 .239.084c.047.095.01.187-.09.242-.14.076-.296.1-.45.124z",fill:"#FF6F4D"})),o.createElement("defs",null,o.createElement("clipPath",{id:"clip0_1530_7251"},o.createElement("path",{fill:"#fff",d:"M.834 0h18v18h-18z"}))))},TryConceive=e=>{var{isMarryBaby:t,size:a=24}=e,l=(0,i._)(e,["isMarryBaby","size"]);let n=Object.assign({width:a,height:a},l);return t?o.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o.createElement("path",{d:"M14.018 9.155c-1.422 1.066-1.777 1.777-1.067 2.843.57.853 2.133 2.488 3.2 3.554-.712 2.133-6.753 1.422-6.753 1.422l-.711 1.421-1.067 3.199c-1.066 0-3.198.142-3.198.71 0 .712 2.843 2.844 3.554 2.844.569 0 1.658-2.132 2.132-3.199 1.54 1.777 5.474 4.905 8.885 3.199 4.265-2.132 6.398-5.331 5.687-7.819-.274-.959-.284-1.495-.132-1.813a4.62 4.62 0 0 0 3.438-2.3c.715-1.108.78-2.417.397-3.652-.41-1.663-1.15-2.955-2.637-3.252-3.423-.685-6.397 1.016-6.397 4.62a4.6 4.6 0 0 0 .971 2.834c-1.184.316-2.414-.236-6.302-4.611",fill:"#fff"}),o.createElement("path",{d:"M29.3 10.825A5.235 5.235 0 0 0 24.077 5.6c-2.876 0-5.245 2.348-5.245 5.224 0 .36.275.634.634.634.36 0 .635-.275.635-.634 0-2.179 1.776-3.955 3.976-3.955s3.954 1.776 3.954 3.955a3.947 3.947 0 0 1-3.531 3.933.8.8 0 0 0-.381-.021c-.042.021-.085.021-.106.042a.64.64 0 0 0-.57.635c0 .254.147.465.359.57.105.487.148.995.148 1.502a7.175 7.175 0 0 1-7.17 7.17 7.22 7.22 0 0 1-5.773-2.898l-.02-.021c.507-.317 1.902-.17 2.41-.106a.637.637 0 0 0 .698-.57.637.637 0 0 0-.571-.699c-1.184-.148-3.384-.38-3.891 1.164-.064.19-.127.401-.19.592-.318.994-.74 2.347-1.27 2.58-.634.063-2.918-1.587-3.172-2.284.212-.275 1.248-.444 2.623 0 .169.063.36.042.507-.064s.275-.232.296-.423c.571-2.707.74-3.278.74-3.299v-.021c.212-.888.867-.973 2.538-.93 1.523.042 3.384.084 4.674-1.46a7.8 7.8 0 0 0 3.235.994h.043a.643.643 0 0 0 .634-.592c.021-.36-.232-.655-.57-.677-4.4-.36-6.028-4.652-6.091-4.842 0 0 0-.022-.022-.022-.274-.634-.063-1.036.19-1.163.17-.105.445-.105.614.17 1.248 2.008 2.432 3.32 3.574 4.018.021 0 .042.02.042.02.677.34 2.052.762 3.596-.295.296-.19.359-.592.169-.889-.19-.296-.592-.36-.889-.169-.951.635-1.776.487-2.305.233-.93-.571-1.988-1.777-3.108-3.574-.508-.783-1.48-1.036-2.284-.613-.762.401-1.312 1.438-.762 2.77.085.254.93 2.368 2.898 3.934a2.7 2.7 0 0 1-.614.486c-.02 0-.02 0-.042-.021-8.205-2.517-8.86-8.586-8.924-9.77a.61.61 0 0 0-.656-.614.63.63 0 0 0-.592.656c.042 1.226.655 7.084 7.74 10.172h-.508c-1.48-.042-3.34-.085-3.806 1.882-.021.106-.17.677-.613 2.707-1.587-.36-3.194-.127-3.574 1.036-.19.55.126 1.206.972 2.01.571.549 2.263 1.902 3.447 1.902.149 0 .297-.02.423-.063.952-.36 1.438-1.544 1.861-2.813a8.48 8.48 0 0 0 6.324 2.855c4.652 0 8.438-3.785 8.438-8.438 0-.507-.043-1.015-.148-1.522a5.264 5.264 0 0 0 4.23-5.16",fill:"#3E3F58"}),o.createElement("rect",{x:"23.005",y:"8.444",width:"1.942",height:"1.422",rx:".711",transform:"rotate(34.869 23.005 8.444)",fill:"#FB8C00"})):o.createElement("svg",Object.assign({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o.createElement("path",{d:"M13.996 8.62v3.221c1.054.035 1.682-.705 1.845-1.467.209-.977-.444-2.041-1.845-1.754",fill:"#FEAA96"}),o.createElement("path",{d:"M14.055 10.67a.21.21 0 0 1-.2-.277c.166-.508.594-.69.92-.644a.21.21 0 1 1-.059.418c-.163-.023-.37.079-.461.358a.21.21 0 0 1-.2.145",fill:"#FF886C"}),o.createElement("path",{d:"M2.16 10.374c.162.762.79 1.502 1.844 1.467V8.62c-1.4-.287-2.054.777-1.845 1.754",fill:"#FEAA96"}),o.createElement("path",{d:"M3.98 10.67a.21.21 0 0 1-.2-.145c-.093-.28-.299-.381-.462-.358a.21.21 0 0 1-.21-.102.21.21 0 0 1 .152-.316c.326-.046.753.136.92.644a.21.21 0 0 1-.2.277",fill:"#FF886C"}),o.createElement("path",{d:"M9 15.831c1.325 0 3.365-.561 4.534-2.292 1.057-1.563.436-4.144.462-5.169.053-2.079-1.447-4.78-4.996-4.78s-5.05 2.7-4.996 4.78c.026 1.025-.595 3.606.461 5.169 1.17 1.73 3.21 2.292 4.535 2.292",fill:"#FECCBF"}),o.createElement("path",{d:"M6.881 10.535a.56.56 0 1 0 0-1.121.56.56 0 0 0 0 1.121",fill:"#A35961"}),o.createElement("path",{d:"M7.114 9.777a.21.21 0 0 1-.188-.116c-.049-.097-.205-.122-.27-.129-.225-.022-.44.056-.477.104a.211.211 0 1 1-.347-.241c.149-.215.53-.306.831-.285.306.021.533.15.64.362a.21.21 0 0 1-.189.305",fill:"#8C2F39"}),o.createElement("path",{d:"M11.119 10.535a.56.56 0 1 0 0-1.121.56.56 0 0 0 0 1.121",fill:"#A35961"}),o.createElement("path",{d:"M9 13.329c.777 0 .994-.61 1.046-.92.031-.185-.132-.35-.34-.35H8.293c-.208 0-.371.165-.34.35.052.31.27.92 1.047.92",fill:"#D84023"}),o.createElement("path",{d:"M10.763 7.94a.2.2 0 0 1-.107-.03.33.33 0 0 0-.18-.029.21.21 0 1 1-.07-.416.74.74 0 0 1 .464.081.211.211 0 0 1-.107.393m-3.526 0a.21.21 0 0 1-.107-.393.74.74 0 0 1 .463-.08.211.211 0 1 1-.07.415.3.3 0 0 0-.18.029.2.2 0 0 1-.106.029",fill:"#FEAA96"}),o.createElement("path",{d:"M10.887 9.777a.21.21 0 0 1-.189-.305c.107-.212.334-.34.64-.362.3-.021.682.07.83.285a.211.211 0 0 1-.346.24c-.038-.048-.252-.125-.477-.103-.065.007-.221.032-.27.129a.21.21 0 0 1-.188.116",fill:"#8C2F39"}),o.createElement("path",{d:"M9.284 11.02a.21.21 0 0 1-.22-.15.07.07 0 0 0-.063-.05H9a.07.07 0 0 0-.064.05.21.21 0 0 1-.22.15.22.22 0 0 1-.192-.244c.018-.221.213-.379.476-.379.264 0 .458.158.476.38a.22.22 0 0 1-.192.244",fill:"#FEAA96"}),o.createElement("path",{d:"M9.55 12.06h-1.1l-.003.054a.552.552 0 1 0 1.102-.055m2.041-.774-.29.53a.1.1 0 0 1-.041.04l-.53.29a.1.1 0 0 0-.053.09.1.1 0 0 0 .053.09l.53.29q.026.015.04.04l.29.53a.103.103 0 0 0 .18 0l.29-.53a.1.1 0 0 1 .041-.04l.53-.29a.103.103 0 0 0 0-.18l-.53-.29a.1.1 0 0 1-.04-.04l-.29-.53a.1.1 0 0 0-.143-.039.1.1 0 0 0-.038.04",fill:"#fff"}),o.createElement("path",{d:"M11.055 2.193c-.147-.422-.524-.698-1.01-.738a.9.9 0 0 0-.535.154c-.206.155-.37.358-.478.592a.036.036 0 0 1-.066 0 1.55 1.55 0 0 0-.475-.592.9.9 0 0 0-.537-.154c-.485.04-.862.316-1.008.739a1.03 1.03 0 0 0 .259 1.09c.479.447 1.156.518 1.543.518h.502c.387 0 1.066-.07 1.545-.517a1.03 1.03 0 0 0 .26-1.092M8.79 3.243a.13.13 0 0 1-.134.135c-.316-.012-.821-.084-1.163-.402a.61.61 0 0 1-.148-.644.66.66 0 0 1 .438-.417c.242-.078.404-.006.456.033.446.33.539.932.551 1.295m1.718-.267c-.342.319-.847.39-1.163.402a.13.13 0 0 1-.135-.135c.013-.362.105-.964.551-1.295a.47.47 0 0 1 .25-.073c.318.027.554.193.645.457a.61.61 0 0 1-.149.644",fill:"#2D87F3"}),o.createElement("path",{d:"M8.998 3.338a.21.21 0 0 1 .122.383l-.04.028c-.16.118-.957.76-.991 1.758-.027.78.403 1.132.814 1.202.367.062.831-.096.985-.59a.415.415 0 0 0-.211-.52c-.136-.069-.32-.076-.425.064a.211.211 0 0 1-.337-.253c.215-.287.607-.363.954-.186a.836.836 0 0 1 .422 1.02 1.28 1.28 0 0 1-1.458.88c-.56-.095-1.202-.58-1.166-1.631.046-1.334 1.17-2.093 1.222-2.125a.2.2 0 0 1 .109-.03",fill:"#BA8288"}))},w=(0,o.createContext)({});var x=(0,r.k)(e=>({inputRightSection:{fontSize:(0,s.h)(13),lineHeight:(0,s.h)(24),color:e.colors.gray[4],justifyContent:"flex-end",paddingRight:8}}));let DefaultLayout=e=>{var t=(0,i._)(e,[]);let{t:a}=(0,f.u)(),{currentUrl:l,submitProps:n,form:r,calculatingMethods:s,isMobile:c}=(0,o.useContext)(w),{classes:p={}}=(0,o.useContext)(b.C),{classes:m}=x(void 0,{name:"OvulationTool__DefaultLayout"});return o.createElement(E.H,Object.assign({formLayout:"default"},t),o.createElement(E.H.FormRow,null,o.createElement(E.H.Control,null,o.createElement(E.H.ChipGroup,Object.assign({data:s,label:a("dueDatePage.calculationMethod"),isMobile:c},r.getInputProps("calculatorType"))))),o.createElement(E.H.FormRow,null,o.createElement(h.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},label:o.createElement(v.T,{size:"p2",weight:"semiBold"},` (${a("dueDatePage.lastPeriod.lastPeriodLabel")})`),maxDate:new Date},r.getInputProps("lastPeriodDate")))),o.createElement(E.H.FormRow,null,o.createElement(g.I.Number,Object.assign({label:o.createElement(v.T,{size:"p2",weight:"semiBold"},a("ovulationPage.cycleLength")),rightSection:a("ovulationPage.dayUnit"),min:21,max:45,defaultValue:1},r.getInputProps("cycleLength"),{classNames:{rightSection:m.inputRightSection}}))),o.createElement(E.H.FormRow,null,o.createElement(g.I.Number,Object.assign({label:o.createElement(v.T,{size:"p2",weight:"semiBold"},a("ovulationPage.periodDuration")),rightSection:a("ovulationPage.dayUnit"),min:1,max:15,defaultValue:1},r.getInputProps("periodLength"),{classNames:{rightSection:m.inputRightSection}}))),o.createElement(E.H.FormRow,{className:p.submitWrapper},o.createElement(E.H.Submit,Object.assign({type:"submit",className:(0,d.default)("due-date-calculate-button",p.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:l},n),a("dueDatePage.lastPeriod.calculate"))))},InlineLayout=e=>{var t=(0,i._)(e,[]);let{t:a}=(0,f.u)(),{currentUrl:l,submitProps:n,form:r,calculatingMethods:s}=(0,o.useContext)(w),{classes:c={}}=(0,o.useContext)(b.C);return o.createElement(E.H,Object.assign({formLayout:"inline"},t),o.createElement(E.H.FormRow,null,o.createElement(E.H.BorderInlineControl,{label:a("dueDatePage.calculationMethod"),direction:"column",width:"100%"},o.createElement(E.H.ChipGroup,Object.assign({data:s},r.getInputProps("calculatorType"))))),o.createElement(E.H.FormRow,null,o.createElement(E.H.BorderInlineControl,{label:a("dueDatePage.lastPeriod.lastPeriodLabel")},o.createElement(h.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},r.getInputProps("lastPeriodDate"))))),o.createElement(E.H.FormRow,null,o.createElement(E.H.BorderInlineControl,{label:a("ovulationPage.cycleLength")+" "+a("ovulationPage.dayUnit")},o.createElement(g.I.Number,Object.assign({min:21,max:45,defaultValue:1},r.getInputProps("cycleLength"),{error:null}))),r.errors.cycleLength&&o.createElement(E.H.Error,null,r.errors.cycleLength)),o.createElement(E.H.FormRow,null,o.createElement(E.H.BorderInlineControl,{label:a("ovulationPage.periodDuration")+" "+a("ovulationPage.dayUnit")},o.createElement(g.I.Number,Object.assign({min:1,max:15,defaultValue:1},r.getInputProps("periodLength"),{error:null}))),r.errors.periodLength&&o.createElement(E.H.Error,null,r.errors.periodLength)),o.createElement(E.H.FormRow,{className:c.submitWrapper},o.createElement(E.H.Submit,Object.assign({type:"submit",className:(0,d.default)("due-date-calculate-button",c.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:l},n),a("dueDatePage.lastPeriod.calculate"))))},MbLayout=e=>{var t=(0,i._)(e,[]);let{t:a}=(0,f.u)(),{currentUrl:l,submitProps:n,form:r,calculatingMethods:s}=(0,o.useContext)(w);return o.createElement(E.H,Object.assign({formLayout:"inline"},t),o.createElement(E.H.Control,null,o.createElement(g.I.Wrapper,{label:o.createElement(v.T,{size:"p4",sx:{fontWeight:"normal"}},a("dueDatePage.calculationMethod"))},o.createElement(E.H.ChipGroup,Object.assign({data:s},r.getInputProps("calculatorType"))))),o.createElement(E.H.BorderBoxControl,{label:a("dueDatePage.lastPeriod.lastPeriodLabel"),rightSection:o.createElement(y.Z,null)},o.createElement(h.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null},r.getInputProps("lastPeriodDate")))),o.createElement(E.H.BorderBoxControl,{label:a("ovulationPage.cycleLength"),rightSection:a("ovulationPage.dayUnit")},o.createElement(g.I.Number,Object.assign({min:21,max:45,defaultValue:1},r.getInputProps("cycleLength")))),r.errors.cycleLength&&o.createElement(E.H.Error,null,r.errors.cycleLength),o.createElement(E.H.BorderBoxControl,{label:a("ovulationPage.periodDuration"),rightSection:a("ovulationPage.dayUnit")},o.createElement(g.I.Number,Object.assign({min:1,max:15,defaultValue:1},r.getInputProps("periodLength")))),r.errors.periodLength&&o.createElement(E.H.Error,null,r.errors.periodLength),o.createElement(E.H.Submit,Object.assign({type:"submit",className:"due-date-calculate-button",dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:l},n),a("dueDatePage.lastPeriod.calculate")))};(l=n||(n={}))[l.trackPeriod=0]="trackPeriod",l[l.conceive=1]="conceive",l[l.avoidPregnancy=2]="avoidPregnancy";let OvulationForm=e=>{var{formLayout:t="default",submitProps:a,currentUrl:l,isMobile:r,onSubmit:s}=e,d=(0,i._)(e,["formLayout","submitProps","currentUrl","isMobile","onSubmit"]);let g=(0,c.rZ)(),{t:h}=(0,f.u)(),v="mb"===g.other.template,b=(0,p.c)({initialValues:{calculatorType:String(n.trackPeriod),periodLength:7,cycleLength:28,lastPeriodDate:new Date},validate:{periodLength:(0,m.U)(h("validation.error.requiredField")),cycleLength:(0,m.U)(h("validation.error.requiredField"))}}),E=Object.assign({onSubmit:b.onSubmit(s)},d),y=[{label:h("ovulationPage.trackPeriod"),value:n.trackPeriod,icon:o.createElement(u.L,null)},{label:h("ovulationPage.conceive"),value:n.conceive,icon:o.createElement(TryConceive,null)},{label:h("ovulationPage.avoidPregnancy"),value:n.avoidPregnancy,icon:o.createElement(AvoidPregnancy,null)}];return o.createElement(w.Provider,{value:{submitProps:a,currentUrl:l,form:b,isMobile:r,calculatingMethods:y}},"inline"===t?o.createElement(InlineLayout,Object.assign({},E)):v?o.createElement(MbLayout,Object.assign({formLayout:t},E)):o.createElement(DefaultLayout,Object.assign({},E)))}},vk9b:function(e,t,a){a.d(t,{T:function(){return Text}});var l=a("usZY"),n=a("q1tI"),i=a("srUE");let Text=e=>{var{size:t="base",type:a="regular"}=e,o=(0,l._)(e,["size","type"]);return n.createElement(i.T,Object.assign({size:t,weight:"caption"===a?"bold":a,"data-size":t,"data-type":a,"data-word-wrap":o.wordWrap,"data-is-uppercase":o.isUppercase},o))}},nlxC:function(e,t,a){a.d(t,{M:function(){return Modal}});var l=a("q1tI"),n=a("4db+"),i=a("i8i4"),o=a("rBCA"),r=a("pvoY"),s=a("gEnE"),d=a("iBNF");let c=(0,s.Z)(o.Z.div` position: relative; z-index: 200; background-color: ${d.r.colors.white}; border-radius: ${d.r.borderRadius}; box-shadow: 0px 8px 40px 0px #0000001a; &[data-site-type='marryBaby'] { border-radius: 16px; .hhg-modal__content { position: relative; z-index: 111; height: 100%; padding: 24px; } } .hhg-modal__content { position: relative; z-index: 111; height: 100%; padding: 16px; } .hhg-modal__video { position: relative; z-index: 111; height: 100%; background-color: none; box-shadow: none; } `,"hhgcomp-modal-modal"),p=o.Z.div` position: fixed; top: 0; left: 0; z-index: 201; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0; visibility: hidden; opacity: 0; background-color: rgba(0, 0, 0, 0.6); transition: opacity 0.3s ease-in-out; .hhg-modal__close { position: absolute; top: 16px; right: 16px; cursor: pointer; img { width: 100%; height: 100%; border-radius: 50%; } } &[data-type='video'] { z-index: 1001; } &[data-open='true'] { opacity: 1; visibility: visible; } ${c.classSelector} { transition: transform 0.3s ease-in-out; } &.slideTop { ${c.classSelector} { transform: translate(0, -100vh); } &[data-open='true'] { ${c.classSelector} { transform: translate(0); } } } &.scaleUp { ${c.classSelector} { transform: scale(0.9); } &[data-open='true'] { ${c.classSelector} { transform: scale(1); } } } &[data-type='tail'] { justify-content: flex-end; ${c.classSelector} { width: 420px; height: 100%; border-radius: 0; overflow: hidden auto; } } &[data-type='form'] { ${c.classSelector} { width: 496px; height: 548px; max-height: 100%; overflow-y: auto; ${r.M.mbDown} { width: 340px; } } } &[data-type='video'] { ${c.classSelector} { height: 100%; max-height: 539px; ${r.M.mbDown} { height: 192px; width: 100%; height: 100%; border-radius: ${d.r.borderRadius}; max-height: 192px; } } } &[data-type='confirm'] { ${c.classSelector} { width: 100%; max-width: 407px; ${r.M.mbDown} { width: calc(100% - 32px); max-width: calc(100% - 32px); } } } `,m=o.Z.div` position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; align-items: center; &[data-open='false'] { display: none; } &[data-type='video'] { background-color: ${d.r.colors.secondaryDark}; } `,u="hhg-modals",getModalsRoot=()=>{let e=document.getElementById(u);return e||((e=document.createElement("div")).setAttribute("id",u),document.body.append(e)),e},cleanUpModalShow=()=>{let e=document.querySelectorAll('.hhg-modal[data-open="true"]');e.length<1&&document.body.classList.remove("hhc-modal-show")},cleanUpDisabledScroll=()=>{let e=document.querySelectorAll('.hhg-modal[data-open="true"]');e.length<1&&(document.body.style.overflow="",document.body.style.paddingRight="",document.body.classList.remove("hhc-disabled-scroll"))},Modal=({type:e="lead",closeIcon:t,isOpen:a=!0,onClose:o,children:r,className:s="",animationType:d="scaleUp",isStaticBackdrop:u=!1,siteType:g})=>{let[h,v]=(0,l.useState)(!1),f=(0,l.useRef)(null),{width:b}=(0,n.u)();if(!f.current&&h&&(f.current=document.createElement("div")),(0,l.useEffect)(()=>(v(!0),()=>{v(!1),cleanUpModalShow(),cleanUpDisabledScroll()}),[]),(0,l.useEffect)(()=>{if(h){let e=getModalsRoot();return e.appendChild(f.current),()=>{e.removeChild(f.current)}}},[h]),(0,l.useEffect)(()=>{a?document.body.classList.add("hhc-modal-show"):cleanUpModalShow()},[a]),(0,l.useEffect)(()=>{a?(document.body.style.overflow="hidden",document.body.style.paddingRight=b+"px",document.body.classList.add("hhc-disabled-scroll")):cleanUpDisabledScroll()},[a,b]),!h)return null;let E=["hhg-modal__wrapper",s,d].filter(e=>e).join(" ");return(0,i.createPortal)(l.createElement(p,{className:E,"data-open":a,"data-type":e},!u&&l.createElement(m,{"data-open":a,onClick:o,"data-type":e}),!u&&"video"===e&&!!t&&l.createElement("div",{className:"hhg-modal__close",onClick:o},t),l.createElement(c,{className:"hhg-modal","data-open":a,"data-site-type":g},l.createElement("div",{className:"video"===e?"hhg-modal__video":"hhg-modal__content"},!!t&&"video"!==e&&l.createElement("div",{className:"hhg-modal__close",onClick:o},t),r))),f.current)}},"p+sK":function(e,t,a){a.d(t,{T:function(){return ThrForm}});var l=a("usZY"),n=a("q1tI"),i=a("cChf"),o=a("ZFu2"),r=a("gcJ3"),s=a("FQi+"),d=a("ipFv"),c=a("ORpR"),p=a("dOyR"),m=a("MQ5V"),u=a("wvgE"),g=a("srUE"),h=a("68DG"),v=a("WdVV"),f=a("xrdX");let b=(0,n.createContext)({}),DefaultForm=e=>{var t,a=(0,l._)(e,[]);let{t:i,locale:o}=(0,s.u)(),{isAdult:r,activeValueNote:d,linkTool:c,form:E,submitProps:y}=(0,n.useContext)(b),{classes:w={}}=(0,n.useContext)(h.C);return n.createElement(v.H,Object.assign({formLayout:"default"},a),n.createElement(v.H.FormRow,null,n.createElement(p.G,Object.assign({},E.getInputProps("gender")))),n.createElement(v.H.FormRow,null,n.createElement(u.D,Object.assign({},E.getInputProps("age"),{placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},label:n.createElement(g.T,{size:"p2",weight:"semiBold"},i("targetHeartRate.ageInput")),maxDate:new Date}))),n.createElement(v.H.FormRow,null,n.createElement(m.I.Number,Object.assign({label:n.createElement(g.T,{size:"p2",weight:"semiBold"},i("targetHeartRate.heartRateInput")),placeholder:i("tools.inputPlaceholder",{content:"60"})},E.getInputProps("heartRate"),{min:40,max:200,styles:()=>({rightSection:{width:"auto"}})}))),r&&n.createElement(v.H.FormRow,null,n.createElement(m.S,Object.assign({label:n.createElement(g.T,{size:"p2",weight:"semiBold"},i("targetHeartRate.selectActive")),defaultValue:null===(t=null==d?void 0:d[0])||void 0===t?void 0:t.value,data:d.map(e=>({value:e.value,label:e.label})),styles:{item:{whiteSpace:"nowrap",padding:"10px 12px",fontSize:"14px"}},withinPortal:!0},E.getInputProps("activeValue")))),n.createElement(v.H.FormRow,{className:w.submitWrapper},n.createElement(v.H.Submit,Object.assign({className:w.submitBtn,type:"submit",dataEventCategory:"Health Tool",dataEventAction:"THR",dataEventLabel:`https://${f.v[o]}/${c}`},y),i("bmi.submit"))))},InlineForm=e=>{var t,a=(0,l._)(e,[]);let{t:i,locale:o}=(0,s.u)(),{isAdult:r,activeValueNote:d,linkTool:c,form:g,submitProps:E}=(0,n.useContext)(b),{classes:y={}}=(0,n.useContext)(h.C);return n.createElement(v.H,Object.assign({formLayout:"inline"},a),n.createElement(v.H.FormRow,null,n.createElement(v.H.BorderInlineControl,{label:i("tools.selectGender"),width:"none"},n.createElement(p.G,Object.assign({type:"radio",hideLabel:!0,error:null},g.getInputProps("gender")))),g.errors.gender&&n.createElement(v.H.Error,null,g.errors.gender)),n.createElement(v.H.FormRow,null,n.createElement(v.H.BorderInlineControl,{label:i("targetHeartRate.ageInput")},n.createElement(u.D,Object.assign({},g.getInputProps("age"),{placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},error:null,maxDate:new Date}))),g.errors.age&&n.createElement(v.H.Error,null,g.errors.age)),n.createElement(v.H.FormRow,null,n.createElement(v.H.BorderInlineControl,{label:i("targetHeartRate.heartRateInput")},n.createElement(m.I.Number,Object.assign({placeholder:i("tools.inputPlaceholder",{content:"60"})},g.getInputProps("heartRate"),{error:null,min:40,max:200,rightSection:n.createElement(v.H.Unit,null,"bmp"),styles:()=>({rightSection:{width:"auto"}})}))),g.errors.heartRate&&n.createElement(v.H.Error,null,g.errors.heartRate)),r&&n.createElement(v.H.FormRow,null,n.createElement(v.H.BorderInlineControl,{label:i("targetHeartRate.selectActive")},n.createElement(m.S,Object.assign({defaultValue:null===(t=null==d?void 0:d[0])||void 0===t?void 0:t.value,data:d.map(e=>({value:e.value,label:e.label})),styles:{item:{whiteSpace:"nowrap",padding:"10px 12px",fontSize:"14px"}},withinPortal:!0},g.getInputProps("activeValue"))))),n.createElement(v.H.FormRow,{className:y.submitWrapper},n.createElement(v.H.Submit,Object.assign({className:y.submitBtn,type:"submit",dataEventCategory:"Health Tool",dataEventAction:"THR",dataEventLabel:`https://${f.v[o]}/${c}`},E),i("bmi.submit"))))},ThrForm=e=>{var{formLayout:t,onSubmit:a,onError:p,submitProps:m}=e,u=(0,l._)(e,["formLayout","onSubmit","onError","submitProps"]);let{t:g,locale:h}=(0,s.u)(),v=(0,n.useRef)(40),{getHealthToolLink:f}=(0,r.u)(h),E=(0,i.c)({initialValues:{heartRate:60,activeValue:"low_intensity"},validate:{gender:(0,o.U)(g("validation.error.requiredField")),age:(0,o.U)(g("validation.error.requiredField")),heartRate:e=>Number(e)>=v.current&&200>=Number(e)?null:g("tools.heartRateRangeErr",{min:v.current,max:200})}}),y=(0,n.useMemo)(()=>f(c.H.THR),[f]),[w,x]=(0,n.useState)(!1),C=[{idAge:0,minAge:0,maxAge:18,rangeMale:40,rangeFemale:40},{idAge:1,minAge:18,maxAge:25,rangeMale:49,rangeFemale:54},{idAge:2,minAge:25,maxAge:35,rangeMale:49,rangeFemale:54},{idAge:3,minAge:35,maxAge:45,rangeMale:50,rangeFemale:54},{idAge:4,minAge:45,maxAge:55,rangeMale:50,rangeFemale:54},{idAge:5,minAge:55,maxAge:65,rangeMale:51,rangeFemale:54},{idAge:6,minAge:65,maxAge:120,rangeMale:50,rangeFemale:54}],S=[{value:"low_intensity",label:g("targetHeartRate.lowIntensity.title"),image:d.C.getAssetPath("/low.svg"),imageActive:d.C.getAssetPath("/low-active.svg"),content:g("targetHeartRate.lowIntensity.note")},{value:"moderate_intensity",label:g("targetHeartRate.moderateIntensity.title"),image:d.C.getAssetPath("/moderate.svg"),imageActive:d.C.getAssetPath("/moderate-active.svg"),content:g("targetHeartRate.moderateIntensity.note")},{value:"aerobic_zone",label:g("targetHeartRate.aerobicZone.title"),image:d.C.getAssetPath("/aerobic.svg"),imageActive:d.C.getAssetPath("/aerobic-active.svg"),content:g("targetHeartRate.aerobicZone.note")},{value:"vigorous_intensity",label:g("targetHeartRate.vigorousIntensity.title"),image:d.C.getAssetPath("/vigorous.svg"),imageActive:d.C.getAssetPath("/vigorous-active.svg"),content:g("targetHeartRate.vigorousIntensity.note")},{value:"maximum_intensity",label:g("targetHeartRate.maximumIntensity.title"),image:d.C.getAssetPath("/maximum.svg"),imageActive:d.C.getAssetPath("/maximum-active.svg"),content:g("targetHeartRate.maximumIntensity.note")}];(0,n.useEffect)(()=>{let e=E.getInputProps("age").value,t=E.getInputProps("gender").value;if(e instanceof Date){let a=(new Date().getTime()-e.getTime())/1e3;a>=567648e3?x(!0):x(!1);let l=C.find(e=>a>=31536e3*e.minAge&&a<31536e3*e.maxAge)||C[0];v.current="male"===t?l.rangeMale:l.rangeFemale}},[E]);let P=Object.assign(Object.assign({},u),{onSubmit:E.onSubmit(a,p)});return n.createElement(b.Provider,{value:{isAdult:w,activeValueNote:S,linkTool:y,form:E,submitProps:m}},"inline"===t?n.createElement(InlineForm,Object.assign({},P)):n.createElement(DefaultForm,Object.assign({},P)))}}}]);