"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9301],{tTvg:function(e,t,a){a.d(t,{H:function(){return HealthToolCardWrapper},T:function(){return ToolsBannerCard}});var r=a("WFaC"),o=a("q1tI"),n=a("/npG"),l=a("mYVa"),i=a("8vDj"),s=a("Eso5"),c=a("SPK5"),d=a("vaps"),p=a("TD78"),m=a("7CRU"),u=a("qdzI"),h=a("zTM9"),g=a("Xmc7"),b=a("3wcI"),v=a("q0bE");let f=(0,n.k)((e,{isRevamp:t,isPregTool:a,bannerColor:r,isMarryBaby:o})=>({wrapper:{position:"relative",width:"100%",height:"100%",display:"flex",gap:(0,l.h)(24),alignItems:"center",justifyContent:"space-between",padding:(0,l.h)(16),[e.fn.smallerThan("sm")]:{gap:(0,l.h)(12)}},container:{width:"100%",backgroundColor:r||(o?e.colors.mb[1]:a?e.colors.pink[1]:e.colors.blue[1]),position:"relative",display:"flex",gap:24,alignItems:"center",justifyContent:"space-between",padding:(0,l.h)(16),[e.fn.smallerThan("sm")]:{padding:`${(0,l.h)(12)} ${(0,l.h)(16)}`},a:{textDecoration:"none",color:"inherit"},'&[data-site="marryBaby"]':{a:{textDecoration:"underline"},[b.M.mbDown]:{paddingBottom:0}},[b.M.tdDown]:{height:"auto",".hhgcomp-toolbanner-wrapper":{".hhgcomp-toolbanner-inner":{display:"flex",alignItems:"center",[b.M.mbDown]:{justifyContent:"space-between"},".hhgcomp-toolbanner-iconcontainer":{position:"relative",right:(0,l.h)(-50),bottom:(0,l.h)(-20),width:(0,l.h)(110),minWidth:0,height:"auto",minHeight:0,alignSelf:"flex-end",marginBottom:(0,l.h)(-20),[b.M.mbDown]:{right:"unset"}}}}},".embedded-review":{gap:(0,l.h)(12),display:"flex",alignItems:"center"},".embedded-review__avatar":{position:"relative",minWidth:(0,l.h)(32),img:{width:(0,l.h)(32),height:(0,l.h)(32),display:"block",borderRadius:"100%"},svg:{bottom:0,right:0,position:"absolute"}}},headingWrapper:{display:"flex",flexDirection:"column",gap:t?(0,l.h)(8):0,[e.fn.smallerThan("sm")]:{gap:4}},avatarWrapper:{position:"relative",img:{maxWidth:(0,l.h)(48),maxHeight:(0,l.h)(48)},".embedded-review__avatar":{position:"relative"}},reviewText:{a:{textDecoration:"underline",textUnderlineOffset:"2px"}},iconWrapper:{display:"flex",justifyContent:"center",alignItems:"center",width:(0,l.h)(80),height:(0,l.h)(80),borderRadius:"50%",backgroundColor:"#fff",flexShrink:0,img:{maxWidth:(0,l.h)(48),maxHeight:(0,l.h)(48)},[e.fn.smallerThan("sm")]:{width:(0,l.h)(64),height:(0,l.h)(64),img:{maxWidth:(0,l.h)(40),maxHeight:(0,l.h)(40)}}},heading:{},disclaimerIcon:{flexShrink:0}})),ToolsBannerCard=e=>{var{className:t,classNames:a,heading:n,bannerColor:l,medicalReview:d={link:"#",reviewer:"",date:""},icon:h,style:b,isPregTool:v,isRevamp:x,disclaimer:y,styles:w}=e,E=(0,r._)(e,["className","classNames","heading","bannerColor","medicalReview","icon","style","isPregTool","isRevamp","disclaimer","styles"]);let{t:C}=(0,g.u)(),k=(0,i.rZ)(),z="mb"===k.other.template,$=z?"marryBaby":"helloSites",{classes:N,cx:B}=f({isRevamp:x,isPregTool:v,bannerColor:l,isMarryBaby:z},{name:"ToolsBannerCard",styles:w,classNames:a}),S=(null==d?void 0:d.reviewer)?o.createElement(u.T,{size:"label2",as:"div",className:N.reviewText},d.avatar&&o.createElement("div",{className:"embedded-review__avatar"},o.createElement(s.x,{className:N.avatarWrapper},o.createElement("img",{src:d.avatar,alt:d.reviewer,loading:"lazy"}),o.createElement(m.Z,{size:14}))),o.createElement("div",{dangerouslySetInnerHTML:{__html:C("toolPage.toolReviewer",{expert_name:`${d.reviewer.trim()}`,date:d.date})}})):null;return o.createElement(s.x,Object.assign({className:B(t,N.container),style:b,"data-site":$},E),o.createElement(c.k,{className:N.headingWrapper},o.createElement(u.T,{className:B(N.heading,"heading"),size:"h4",as:"h2"},n),S&&o.createElement(u.T,{size:"n1"},S),y&&o.createElement(c.k,{gap:4},o.createElement(p.Z,{size:16,color:k.colors.yellow[8],className:N.disclaimerIcon}),o.createElement(u.T,{size:"c1",variant:"secondary"},y))),o.createElement(c.k,{className:N.iconWrapper},h))};var x=(0,n.k)(()=>({root:{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}})),y=(0,n.k)(e=>({root:{paddingTop:16,borderRadius:"inherit",[e.fn.smallerThan("sm")]:{paddingTop:8}}})),w=(0,n.k)((e,{isPregTool:t,variant:a})=>{let r="mb"===e.other.template;return{root:Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"column",borderRadius:(0,l.h)(r?16:8)},"default"===a&&{backgroundColor:"#fff",border:`1px solid ${r?e.colors.mb[2]:t?e.colors.pink[1]:e.colors.blue[2]}`}),"gray"===a&&{backgroundColor:e.colors.neutral[0]}),"violet"===a&&{backgroundColor:e.colors.violet[0]}),submitBtn:{},bodyWrapper:{},scrollAreaWrapper:{},bannerWrapper:Object.assign(Object.assign({},"gray"===a&&{backgroundColor:"transparent",padding:`${(0,l.h)(16)} ${(0,l.h)(16)} 0`}),"violet"===a&&{backgroundColor:"transparent",padding:`${(0,l.h)(16)} ${(0,l.h)(16)} 0`}),bannerHeading:Object.assign({},("gray"===a||"violet"===a)&&{fontSize:(0,l.h)(20),lineHeight:(0,l.h)(28),fontWeight:h.F.semiBold,[e.fn.smallerThan("sm")]:{fontSize:(0,l.h)(17),lineHeight:(0,l.h)(24)}}),bannerReviewText:Object.assign({},("gray"===a||"violet"===a)&&{fontSize:(0,l.h)(14),lineHeight:(0,l.h)(22),[e.fn.smallerThan("sm")]:{fontSize:(0,l.h)(12),lineHeight:(0,l.h)(18)}}),submitWrapper:Object.assign(Object.assign({[e.fn.smallerThan("sm")]:{button:{width:"100%"}},[e.fn.largerThan("sm")]:{textAlign:"right"}},"gray"===a&&{backgroundColor:e.colors.neutral[0],button:{marginTop:10}}),"violet"===a&&{backgroundColor:e.colors.violet[0],button:{marginTop:10}}),newsletterBlock:Object.assign(Object.assign({},"gray"===a&&{backgroundColor:e.colors.neutral[0]}),"violet"===a&&{backgroundColor:e.colors.violet[0]})}});let HealthToolCardWrapper=e=>{var{children:t,styles:a,classNames:n,className:l,isPregTool:i,variant:c="default",hasBodyScroll:d}=e,p=(0,r._)(e,["children","styles","classNames","className","isPregTool","variant","hasBodyScroll"]);let{classes:m,cx:u}=w({isPregTool:i,variant:c},{name:"HealthToolCardWrapper",styles:a,classNames:n});return o.createElement(h.T,{variant:h.C.LEADGEN},o.createElement(v.C.Provider,{value:{isPregTool:i,classes:m,variant:c,hasBodyScroll:d}},o.createElement(s.x,Object.assign({className:u(l,m.root)},p),t)))};HealthToolCardWrapper.Body=e=>{var{children:t,className:a,styles:n,classNames:l}=e,i=(0,r._)(e,["children","className","styles","classNames"]);let{classes:c,hasBodyScroll:p}=(0,o.useContext)(v.C),{classes:m,cx:u}=y(void 0,{name:"HealthToolCardWrapper__Body",styles:n,classNames:l});return o.createElement(s.x,Object.assign({className:u(a,m.root,c.bodyWrapper)},i),p?o.createElement(d.x,{h:"100%",type:"auto",scrollbarSize:8,className:c.scrollAreaWrapper},t):t)},HealthToolCardWrapper.Banner=e=>{var{className:t,classNames:a,styles:n}=e,l=(0,r._)(e,["className","classNames","styles"]);let{classes:i}=(0,o.useContext)(v.C),{isPregTool:s}=(0,o.useContext)(v.C),{classes:c,cx:d}=x(void 0,{name:"HealthToolCardWrapper__Banner",classNames:a,styles:n});return o.createElement(ToolsBannerCard,Object.assign({isPregTool:s,classNames:{container:i.bannerWrapper,heading:i.bannerHeading,reviewText:i.bannerReviewText},className:d(t,c.root)},l))}},ZfEQ:function(e,t,a){a.d(t,{C:function(){return h},I:function(){return ImagePreviewPopup},P:function(){return PostSingleImageViewPopup},a:function(){return PostImagePreview},b:function(){return g}});var r=a("q1tI"),o=a("qEJm"),n=a("3wcI"),l=a("Xmc7"),i=a("lLco"),s=a("t/pd"),c=a("qdzI"),d=a("rBCA"),p=a("WFaC"),m=a("iBNF"),u=a("gEnE"),h="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.05 18.06 4 12.038l6.05-6.025M4.002 12.035h15'/%3e%3c/svg%3e";let b=d.Z.div`
padding: 14px 16px 14px 17px;
background: ${e=>e.bgColor};
border-left: 3px solid ${e=>e.highlight};
${n.M.mbUp} {
padding: 12px 12px 12px 17px;
}
`,v=d.Z.div`
display: flex;
`,f=d.Z.div`
font-size: 12px;
line-height: 18px;
&[data-has-icon='true'] {
margin-left: 10px;
}
`,x=d.Z.div`
flex-shrink: 0;
`,y=d.Z.div`
display: grid;
grid-gap: 3px;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto;
.img-wrapper {
position: relative;
overflow: hidden;
width: 100%;
padding-top: 56.25%;
grid-column: auto;
& > img {
cursor: zoom-in;
}
.img-preview-blur {
position: absolute;
top: 50%;
left: 50%;
width: 110%;
height: 110%;
/* Add the blur effect */
-webkit-filter: blur(8px);
filter: blur(8px);
object-fit: cover;
object-position: center;
opacity: 0.8;
transform: translate(-50%, -50%);
}
.img-preview {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: contain;
object-position: center;
}
.img-more-overlay {
position: absolute;
top: 0;
left: 0;
display: flex;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.5);
z-index: 4;
}
}
&[data-image-count='1'] {
.img-wrapper {
/* padding-top: 100%; */
grid-column: 1/3;
}
}
&[data-image-count='2'] {
.img-wrapper {
/* padding-top: 100%; */
}
}
&[data-image-count='3'] {
.img-wrapper {
&:first-child {
grid-column: 1/3;
}
}
}
&[data-image-count='4'] {
.img-wrapper {
/* padding-top: 100%; */
}
}
&[data-image-count='5'] {
grid-template-columns: repeat(6, 1fr);
.img-wrapper {
/* padding-top: 100%; */
grid-column: auto/ span 2;
&:first-child {
padding-top: 56.25%;
grid-column: 1/4;
}
&:nth-child(2) {
padding-top: 56.25%;
grid-column: 4/7;
}
}
}
&[data-is-marrybaby='true'] {
grid-gap: 8px;
.img-wrapper {
padding-top: 66.66%;
border-radius: 1rem;
.img-preview {
object-fit: cover;
}
}
&[data-image-count='3'] {
grid-template-columns: 1fr 1fr 1fr;
.img-wrapper {
&:first-child {
padding-top: 100%;
grid-column: 1/3;
grid-row: 1/3;
}
}
}
}
`,w=d.Z.div`
position: fixed;
z-index: 999;
top: 0;
left: 0;
display: flex;
overflow: hidden;
width: 100vw;
height: 100vh;
flex-direction: column;
background: white;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s linear;
&[data-open='true'] {
opacity: 1;
pointer-events: auto;
}
.top-bar {
position: relative;
padding: 20px 40px;
.icon-arrow-left {
position: absolute;
top: 50%;
left: 20px;
height: 24px;
width: 24px;
cursor: pointer;
transform: translateY(-50%);
}
}
.container {
flex: 1;
overflow-y: auto;
.img-preview {
width: 100%;
min-width: 100%;
margin-bottom: 0.5rem;
cursor: pointer;
max-height: 100%;
object-fit: cover;
}
}
`,E=(0,d.Z)(e=>{var{icon:t,bgColor:a=m.r.colors.yellow50,highlightColor:o=m.r.colors.yellow800,message:n}=e,l=(0,p._)(e,["icon","bgColor","highlightColor","message"]);return r.createElement(b,Object.assign({bgColor:a,highlight:o},l),r.createElement(v,null,t&&r.createElement(x,null,t),r.createElement(f,{"data-has-icon":!!t},n)))})`
margin-bottom: 16px;
&.noti-bottom {
border-left: none;
margin-top: 4px;
padding: 4px 8px;
margin-left: 16px;
margin-right: 16px;
border-radius: 4px;
}
`,ImagePreviewPopup=({className:e,style:t,authorName:a,images:o,onClose:n,onOpenSingleView:i,alt:d})=>{let{t:p}=(0,l.u)(),[m,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{setTimeout(()=>{u(!0)},0)},[]),r.createElement(s.h,null,r.createElement(w,{className:e,style:t,"data-open":m},r.createElement("div",{className:"top-bar"},r.createElement("img",{className:"icon-arrow-left",src:g,onClick:n,alt:"go back",loading:"lazy"}),r.createElement(c.T,{size:"p2",weight:"bold",style:{textAlign:"center"}},p("previewPhotos.title",{name:a}))),r.createElement("div",{className:"container"},o.map((e,t)=>r.createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==i?void 0:i(t),alt:d,loading:"lazy"})))),",")},C=d.Z.div`
position: fixed;
z-index: 999;
top: 0;
left: 0;
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
background: black;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s linear;
&[data-open='true'] {
opacity: 1;
pointer-events: auto;
}
`,k=d.Z.div`
padding: 1rem;
background: white;
.icon-close {
width: 26px;
height: 26px;
cursor: pointer;
}
`,z=d.Z.div`
position: relative;
flex: 1;
overflow: hidden;
> img {
height: 100%;
width: 100%;
object-fit: contain;
object-position: center;
}
`,$=d.Z.div`
--inner-padding: max(16px, 20%);
height: 100%;
position: absolute;
left: 0;
padding: 8px;
padding-right: var(--inner-padding);
display: flex;
align-items: center;
top: 0;
cursor: pointer;
&[data-right] {
padding-right: 8px;
padding-left: var(--inner-padding);
left: unset;
right: 0;
}
&[data-disabled='true'] {
cursor: not-allowed;
}
`,N=d.Z.div`
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
> img {
width: 16px;
height: 16px;
&[data-disabled='true'] {
opacity: 0.5;
}
}
${n.M.tdUp} {
padding: 8px;
> img {
width: 30px;
height: 30px;
}
}
`;var B="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m6 12.813 4-4-4-4'/%3e%3c/svg%3e";let PostSingleImageViewPopup=({initialViewIndex:e,images:t,onClose:a,alt:o})=>{let[n,l]=(0,r.useState)(e),[i,c]=(0,r.useState)(!1);(0,r.useEffect)(()=>{setTimeout(()=>{c(!0)},0)},[]);let d=null==t?void 0:t[n],p=0===n,m=!(null==t?void 0:t.length)||n===(null==t?void 0:t.length)-1;return r.createElement(s.h,null,r.createElement(C,{"data-open":i&&!!d},r.createElement(k,null,r.createElement("img",{src:h,className:"icon-close",onClick:a,alt:"close",loading:"lazy"})),d&&n>=0&&r.createElement(r.Fragment,null,r.createElement(z,null,r.createElement("img",{className:"img-preview",src:d,alt:o,loading:"lazy"}),r.createElement($,{"data-disabled":p,onClick:()=>!p&&l(n-1)},r.createElement(N,null,r.createElement("img",{src:B,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":p,loading:"lazy"}))),r.createElement($,{"data-right":!0,"data-disabled":m,onClick:()=>!m&&l(n+1)},r.createElement(N,null,r.createElement("img",{src:B,alt:"right arrow","data-disabled":m,loading:"lazy"})))))))},S=(0,u.Z)(d.Z.div`
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
color: white;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
`,"hhgcomp-sensitivemask-inner"),T=d.Z.div``,I=d.Z.div`
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 3;
background: white;
cursor: pointer;
&,
* {
// transition: all 300ms;
transform-origin: bottom left;
}
img {
transition: none;
}
.img-preview {
width: 100%;
}
&[data-is-blurred='true'] {
.img-preview {
/* Add the blur effect */
-webkit-filter: blur(24px);
filter: blur(24px);
}
}
&[data-is-blurred='false'] {
background: transparent;
cursor: zoom-in;
${S.classSelector} {
top: auto;
right: auto;
left: 8px;
bottom: 8px;
background: rgba(0, 0, 0, 0);
align-items: flex-end;
justify-content: flex-start;
}
}
`,SensitiveMask=({image:e,showIcon:t=!0})=>{let[a,o]=(0,r.useState)(!0);return r.createElement(I,{"data-is-blurred":a,onClick:e=>a&&e.stopPropagation()},r.createElement("img",{loading:"lazy",className:"img-preview",src:e}),r.createElement(S,{onClick:e=>{e.stopPropagation(),o(!a)}},t&&r.createElement(T,null,a?r.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none"},r.createElement("path",{d:"M1.71 2.54a.996.996 0 0 1 0-1.41c.39-.39 1.03-.39 1.42 0l16.31 16.33a.996.996 0 1 1-1.41 1.41l-2.72-2.72c-1.34.52-2.79.82-4.31.82-5 0-9.27-3.11-11-7.5C.77 7.5 2.06 5.8 3.68 4.51zM16 9.47c0-2.76-2.24-5-5-5-.51 0-1 .1-1.47.24L7.36 2.54c1.15-.37 2.37-.57 3.64-.57 5 0 9.27 3.11 11 7.49-.69 1.76-1.79 3.3-3.18 4.53l-3.06-3.06c.14-.46.24-.95.24-1.46m-5 5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14L8.06 8.9c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07l1.57 1.57c-.65.32-1.37.5-2.14.5m2.97-5.33a2.97 2.97 0 0 0-2.64-2.64z",fill:"#fff"})):r.createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none"},r.createElement("path",{d:"M12 0C5.142 0 1.886 5.879 1.096 7.557c-.132.28-.132.604 0 .884C1.886 10.121 5.142 16 12 16c6.834 0 10.092-5.837 10.896-7.54a1.08 1.08 0 0 0 0-.92C22.092 5.836 18.834 0 12 0m0 3a5 5 0 1 1-.001 10.001 5 5 0 0 1 0-10.001m0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6",fill:"#2D87F3"})))))},PostImagePreview=({className:e,images:t=[],style:a,authorName:s,isSensitive:c=!1,alt:d,positionAlert:p="top"})=>{let{data:{env:{isMarryBaby:m}}}=(0,r.useContext)(i.T),{t:u}=(0,l.u)(),h=`+ ${(t.length||0)-4}`,[g,b]=(0,r.useState)(!1),[v,f]=(0,r.useState)(-1),x=t.length>5,w=(0,r.useRef)(!1);return(0,r.useEffect)(()=>()=>{w.current&&(0,n.t)(!1)},[]),(0,r.useEffect)(()=>{g||v>=0?((0,n.t)(!0),w.current=!0):((0,n.t)(!1),w.current=!1)},[g,v]),r.createElement(r.Fragment,null,c&&"top"===p&&r.createElement(E,{message:u("sensitiveMask.contentWarningDescription"),icon:r.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},r.createElement("path",{d:"M9 .667A8.336 8.336 0 0 0 .667 9c0 4.6 3.733 8.333 8.333 8.333S17.333 13.6 17.333 9 13.6.667 9 .667m0 9.166A.836.836 0 0 1 8.167 9V5.667c0-.459.375-.834.833-.834s.833.375.833.834V9A.836.836 0 0 1 9 9.833M8.167 11.5v1.667h1.666V11.5z",fill:"#FE921D"}))}),r.createElement(y,{className:e,style:a,"data-image-count":x?5:t.length||0,"data-is-marrybaby":m,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map((e,t)=>{let a=4===t&&x;return r.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&x?b(!0):f(t)}},c&&r.createElement(SensitiveMask,{image:e,showIcon:!a}),!m&&r.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e,alt:d}),r.createElement("img",{loading:"lazy",className:"img-preview",src:e,alt:d}),a&&r.createElement("div",{className:"img-more-overlay"},r.createElement(o.H,{tag:"h1",as:"h2",color:"white"},h)))})),g&&r.createElement(ImagePreviewPopup,{authorName:s||"",images:t,onClose:()=>b(!1),onOpenSingleView:f,alt:d}),v>=0&&r.createElement(PostSingleImageViewPopup,{images:t,initialViewIndex:v,onClose:()=>f(-1),alt:d}),c&&"bottom"===p&&r.createElement(E,{message:u("sensitiveMask.contentWarningDescription.community"),className:"noti-bottom",icon:r.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},r.createElement("path",{d:"M9 .667A8.336 8.336 0 0 0 .667 9c0 4.6 3.733 8.333 8.333 8.333S17.333 13.6 17.333 9 13.6.667 9 .667m0 9.166A.836.836 0 0 1 8.167 9V5.667c0-.459.375-.834.833-.834s.833.375.833.834V9A.836.836 0 0 1 9 9.833M8.167 11.5v1.667h1.666V11.5z",fill:"#FE921D"}))}))}},eNnp:function(e,t,a){a.d(t,{A:function(){return Alert},B:function(){return Badge},C:function(){return CardCollapse},D:function(){return DragFreeCarousel},F:function(){return FileDropdown},G:function(){return Grid},H:function(){return HtmlContent},I:function(){return IconHeading},R:function(){return Radio},S:function(){return StepRenderer},T:function(){return Tag},U:function(){return Upload},a:function(){return BorderHeading},b:function(){return RateStars},c:function(){return Toggle},d:function(){return Z},e:function(){return X},f:function(){return n},g:function(){return l}});var r,o,n,l,i=a("q1tI"),s=a("qdzI"),c=a("rBCA"),d=a("iBNF"),p=a("3wcI"),m=a("4JiQ"),u=a("mYVa"),h=a("iuhU"),g=a("Iblh"),b=a("XASs"),v=a("7yNo"),f=a("WFaC"),x=a("hZTu"),y=a("gEnE"),w=a("yVya"),E=a("qEJm"),C=a("hYDw"),k=a("Xmc7"),z=a("Zdfy");let Upload=e=>i.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"none"},e),i.createElement("path",{d:"M9.82324 8.7033L10.8228 9.70287C10.9267 9.80662 11.056 9.8573 11.2107 9.85493C11.3655 9.85255 11.4948 9.79943 11.5987 9.69555C11.7026 9.59168 11.7545 9.46074 11.7545 9.30274C11.7545 9.14474 11.7026 9.01462 11.5987 8.91237L9.7353 7.04899C9.59968 6.91337 9.44149 6.84555 9.26074 6.84555C9.07999 6.84555 8.9218 6.91337 8.78618 7.04899L6.91549 8.91968C6.81174 9.02355 6.75987 9.15287 6.75987 9.30762C6.75987 9.46237 6.81174 9.59168 6.91549 9.69555C7.01937 9.79943 7.1503 9.85137 7.3083 9.85137C7.4663 9.85137 7.59643 9.79943 7.69868 9.69555L8.69824 8.7033L8.69824 11.5576C8.69824 11.717 8.75218 11.8506 8.86005 11.9583C8.96793 12.0662 9.10156 12.1201 9.26093 12.1201C9.42043 12.1201 9.55399 12.0662 9.66162 11.9583C9.76937 11.8506 9.82324 11.717 9.82324 11.5576L9.82324 8.7033ZM16.3857 9.3063C16.3857 10.2918 16.1987 11.2181 15.8247 12.0852C15.4507 12.9524 14.9432 13.7066 14.3021 14.348C13.6609 14.9894 12.907 15.4972 12.0402 15.8714C11.1735 16.2456 10.2474 16.4326 9.26205 16.4326C8.27655 16.4326 7.35024 16.2456 6.48312 15.8716C5.61599 15.4976 4.86174 14.9901 4.22037 14.3489C3.57899 13.7078 3.07118 12.9539 2.69693 12.0871C2.3228 11.2204 2.13574 10.2943 2.13574 9.30893C2.13574 8.32343 2.32274 7.39712 2.69674 6.52999C3.07074 5.66287 3.5783 4.90862 4.21943 4.26724C4.86055 3.62587 5.61449 3.11805 6.48124 2.7438C7.34799 2.36968 8.27405 2.18262 9.25943 2.18262C10.2449 2.18262 11.1712 2.36962 12.0384 2.74362C12.9055 3.11762 13.6597 3.62518 14.3011 4.2663C14.9425 4.90743 15.4503 5.66137 15.8246 6.52812C16.1987 7.39487 16.3857 8.32093 16.3857 9.3063ZM15.2607 9.30762C15.2607 7.63262 14.6795 6.21387 13.517 5.05137C12.3545 3.88887 10.9357 3.30762 9.26074 3.30762C7.58574 3.30762 6.16699 3.88887 5.00449 5.05137C3.84199 6.21387 3.26074 7.63262 3.26074 9.30762C3.26074 10.9826 3.84199 12.4014 5.00449 13.5639C6.16699 14.7264 7.58574 15.3076 9.26074 15.3076C10.9357 15.3076 12.3545 14.7264 13.517 13.5639C14.6795 12.4014 15.2607 10.9826 15.2607 9.30762Z",fill:"#595959"})),Alert=({style:e,onClose:t,text:a,type:r,contentIcon:o,closeIcon:n,className:l,description:c})=>i.createElement("div",{className:`CHw-fZZ ${l||""}`,style:e,"data-alert-type":r},i.createElement("div",{className:"_03U6VRS"},i.createElement("div",{className:"icon-title"},o,i.createElement(s.T,{weight:"bold",size:"label1"},a)),i.createElement(s.T,{weight:"regular",size:"p3"},c)),i.createElement("div",{className:"EO828Vv",onClick:t},n)),renderNotificationStyles=(e,t,a,r)=>{let o,n="";if("numeric"===e)switch(t){case"medium":n=`
height: 16px;
font-size: 11px;
padding: 1px 6px;
`;case"large":n=`
height: 24px;
font-size: 13px;
padding: 1px 10px;
`}let l="";a&&(l=`
position: absolute;
top: 0;
left: 75%;
`),a&&(o=`
left: 70%;
${"large"===t?`
top: -7px;
`:"medium"===t?`
top: -2px;
width: 16px;
height: 16px;
`:""}
`);let i="";switch(r){case"primary":i=`
background: ${d.r.colors.primary50};
color: ${d.r.colors.primary600};
`;break;case"error":i=`
background: ${d.r.colors.error};
color: white;
`}switch(e){case"dot":return`
${l}
width: 8px;
height: 8px;
font-size: 0px;
border-radius: 50%;
${i}
`;case"numeric":return`
${l}
width: max-content;
border-radius: 32px;
${n}
${o}
${i}
`}},$=c.Z.div`
position: relative;
> div {
width: max-content;
position: relative;
}
span {
font-weight: ${d.r.sizes.fwBold};
display: flex;
justify-content: center;
align-items: center;
${e=>renderNotificationStyles(e.notificationType,e.notificationSize,e.hasIcon,e.notificationColor)}
}
${e=>e.hasIcon&&`
svg {
width: 40px;
height: 40px;
}
`}
`,Badge=({amount:e,type:t,size:a="medium",color:r="primary",icon:o,className:n})=>i.createElement($,{"data-notification-type":t,"data-notification-size":a,"data-notification-color":r,"data-has-icon":!!o||void 0,notificationType:t,notificationSize:a,notificationColor:r,hasIcon:!!o,className:n},i.createElement("div",null,e&&i.createElement("span",null,e)," ",o&&i.createElement("div",null,o))),N=c.Z.h4`
position: relative;
line-height: 18px;
&:after {
position: absolute;
top: 1px;
left: 0;
width: 4px;
height: 18px;
background-color: ${d.r.colors.primaryBase};
content: '';
}
&[data-size='lg'] {
font-size: 18px;
padding-left: 12px;
}
&[data-size='sm'] {
font-size: 14px;
padding-left: 8px;
&::after {
width: 2px;
height: 15px;
}
}
&[data-type='bold'] {
font-weight: ${d.r.sizes.fwBold};
}
&[data-type='semiBold'] {
font-weight: ${d.r.sizes.fwSemiBold};
}
&[data-uppercase] {
text-transform: uppercase;
}
${p.M.mbDown} {
&[data-size='lg'] {
font-size: 16px;
}
}
`,BorderHeading=({style:e,children:t,className:a,size:r="lg",type:o="bold",upperCase:n,as:l="h4",color:s})=>i.createElement(N,{style:Object.assign({color:s},e),className:a,"data-size":r,"data-type":o,"data-uppercase":n,as:l},t),B=(0,c.Z)(b.S)`
flex-shrink: 0;
color: ${d.r.colors.neutral800};
width: 16px;
height: 16px;
transition: transform 0.2s ease-in-out;
transform: rotate(-180deg);
&[data-is-collapsed='true'] {
transform: rotate(0deg);
}
`,S=c.Z.div`
background-color: white;
.icon {
width: 20px;
height: 20px;
flex-shrink: 0;
color: ${d.r.colors.neutral800};
}
.title-collapse {
color: #111111;
font-weight: var(--fwSemiBold);
font-size: 1.0625rem;
line-height: 1.5rem;
flex-grow: 1;
}
.box-collapse {
display: flex;
padding: 1.5rem 1rem 1rem 1rem;
gap: 0.75rem;
align-items: center;
}
`;function CardCollapse({children:e,title:t,icon:a,defaultOpened:r=!0,haveCollapse:o=!0,id:n,className:l,as:c="h2"}){let[d,{toggle:p}]=(0,g.q)(r);return i.createElement(S,{id:n,className:l},i.createElement("div",{className:"box-collapse",onClick:()=>{o&&p()}},o&&a,i.createElement(s.T,{as:c,className:"title-collapse"},t),o&&i.createElement(B,{"data-is-collapsed":d})),i.createElement(m.U,{in:!o||d,transitionDuration:200,transitionTimingFunction:"ease"},e))}let T=c.Z.div`
position: relative;
box-sizing: border-box;
border: 1px solid ${d.r.colors.gray200};
background: url('../../../public/bgSvg/arrow-down.svg') no-repeat;
background-position: right 16px center;
border-radius: ${d.r.borderRadius};
&[data-has-icons='true'] {
border: none;
background: ${d.r.colors.gray100};
img,
svg {
display: inline-block;
max-width: 16px;
margin-right: 6px;
}
span {
vertical-align: middle;
display: inline-block;
}
&:hover {
box-shadow: none;
}
> div {
position: relative;
width: 100%;
display: flex;
align-items: center;
box-sizing: border-box;
}
> div::after {
content: '';
right: 12px;
top: 50%;
background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
width: 10px;
height: 8px;
position: absolute;
background-repeat: no-repeat;
transform: translateY(-50%);
}
}
&:hover {
box-shadow: 0 0 2px 2px ${d.r.colors.primary200};
}
`,I=c.Z.div`
padding: 12px 18px 12px 16px;
cursor: pointer;
&[data-dropdown-open] {
padding: 11px 15px 11px 15px;
border: 1px solid ${d.r.colors.primaryBase};
border-radius: ${d.r.borderRadius};
box-shadow: 0 0 2px 2px ${d.r.colors.primary200};
}
& > svg {
height: 16px;
width: 16px;
}
`,j=c.Z.ul`
position: absolute;
top: 100%;
right: 0;
left: 0;
display: block;
margin-top: 4px;
background: ${d.r.colors.white};
border-radius: ${d.r.borderRadius};
box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),
-2px 2px 5px rgba(67, 86, 100, 0.123689);
cursor: pointer;
&[data-has-icons='true'] {
background: white;
box-shadow: none;
border: 1px solid ${d.r.colors.gray200};
filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04));
}
`,P=c.Z.li`
margin: 8px;
padding: 12px 18px 12px 16px;
border-radius: ${d.r.borderRadius};
display: flex;
&:hover,
:active {
background: ${d.r.colors.gray100};
}
`,D=c.Z.div`
display: flex;
align-items: center;
margin-right: 8px;
& > svg {
height: 16px;
width: 16px;
}
`,ShareIconPathStyle=()=>i.createElement("style",null,".file-dropdown-path{fill:none;stroke:#595959;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}"),DefaultFileIcon=()=>i.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 12.17 14.83"},i.createElement("defs",null,i.createElement("clipPath",{id:"prefix__clip-path",transform:"translate(-1.92 -1.54)"},i.createElement("path",{fill:"none",d:"M0 .96h16v16H0z"}))),i.createElement("title",null,"File"),i.createElement("g",{clipPath:"url(#prefix__clip-path)"},i.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29H4a1.33 1.33 0 00-1.33 1.33v10.67A1.33 1.33 0 004 15.62h8a1.33 1.33 0 001.33-1.33V7z",transform:"translate(-1.92 -1.54)"}),i.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29V7h4.66",transform:"translate(-1.92 -1.54)"}))),DownloadIcon=()=>i.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},i.createElement("title",null,"download"),i.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M4.67 7.62L8 11l3.33-3.34M8 11V3",transform:"translate(-1.25 -2.21)"})),UploadIcon=()=>i.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},i.createElement("title",null,"upload"),i.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M11.33 6.29L8 3 4.67 6.29M8 3v8",transform:"translate(-1.25 -2.21)"})),FileDropdown=({className:e,value:t,options:a,onUploadSelected:r,id:o,placeholderIcon:n,placeholder:l,style:s})=>{let[c,d]=(0,i.useState)(!1),showDropdown=()=>d(!c),p=(0,i.useRef)(a.map(e=>"upload"===e.type&&i.createElement("input",{id:"uploader-dropdown-input-"+o+"-"+e.value,key:"uploader-dropdown-input-"+o+"-"+e.value,accept:e.fileAcceptedType,multiple:e.multiple,type:"file",style:{display:"none"},onChange:e=>{console.log("change"),r(e.target.files)}}))),onUpload=e=>{var t;null===(t=document.querySelector(e))||void 0===t||t.click()},onDownload=e=>{e&&window.open(e,"_blank")};return i.createElement(T,{className:e,"data-dropdown-open":!!c,id:o,"data-has-icons":!0,style:s,onBlur:()=>d(!1),tabIndex:0},i.createElement(ShareIconPathStyle,null),i.createElement(I,{onClick:showDropdown},n||i.createElement(DefaultFileIcon,null)," ",i.createElement("span",null,t&&t.value?t.label:l)),c&&i.createElement(j,{onClick:showDropdown,"data-has-icons":!0},a.map(e=>i.createElement(P,{key:`${o}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>"upload"===e.type?onUpload("#uploader-dropdown-input-"+o+"-"+e.value):onDownload(e.url)},i.createElement(D,null,e.icon||"download"===e.type?i.createElement(DownloadIcon,null):i.createElement(UploadIcon,null)),e.label))),i.createElement(i.Fragment,null,p.current))},O=c.Z.div`
--columns: var(--grid-template-columns, repeat(var(--columns-count), 1fr));
--columns-desktop: var(
--grid-template-columns-desktop,
repeat(var(--columns-count-desktop), 1fr)
);
display: grid;
grid-template-columns: var(--columns);
grid-gap: var(--grid-gap);
align-items: var(--align-items);
${p.M.tdUp} {
grid-template-columns: var(--columns-desktop);
}
> * {
justify-self: var(--justify-children);
}
`,Grid=({className:e,columns:t,columnsDesktop:a,gridTemplateColumns:r,gridTemplateColumnsDesktop:o,gap:n,children:l,justifyChildren:s,style:c,alignItems:d})=>i.createElement(O,{className:e,style:Object.assign({"--columns-count":t,"--columns-count-desktop":a,"--grid-template-columns":r,"--grid-template-columns-desktop":o,"--justify-children":s,"--grid-gap":n,"--align-items":d},c)},l),Radio=({size:e="small",label:t,name:a,checked:r,value:o,className:n,isDisabled:l=!1,onChange:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>{let m=!!d&&!!c&&!!p,u=m?{"data-event-category":c,"data-event-action":d,"data-event-label":p}:{};return i.createElement(v.R,Object.assign({size:"small"===e?"md":"lg",label:t,name:a,checked:r,value:o,className:n,disabled:l,onChange:e=>null==s?void 0:s(e.target.value)},u))},M=c.Z.div`
display: inline-flex;
gap: calc(var(--gap) * 1px);
> svg {
width: calc(var(--star-size) * 1px);
height: calc(var(--star-size) * 1px);
}
&[data-selectable='true'] {
> svg {
cursor: pointer;
}
}
`,StarHalfIcon=e=>i.createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none"}),i.createElement("path",{d:"m139.287 144.772 5.17 3.12c.38.23.85-.11.75-.54l-1.37-5.88 4.56-3.95c.33-.29.16-.84-.29-.88l-6.01-.51-2.35-5.54a.498.498 0 0 0-.92 0l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#E4E8EC"}),i.createElement("path",{d:"M139.289 144.771s.013-14.488 0-14.488a.49.49 0 0 0-.46.308l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#FFC326"})),StarIcon=e=>{var{isFull:t}=e,a=(0,f._)(e,["isFull"]);return i.createElement("svg",Object.assign({},a,{viewBox:"0 0 32 32",fill:"none"}),i.createElement("path",{d:"m16 23.027 6.893 4.16c.507.306 1.134-.147 1-.72l-1.826-7.84 6.08-5.267a.67.67 0 0 0-.387-1.173l-8.013-.68-3.134-7.387a.664.664 0 0 0-1.226 0l-3.133 7.387-8.014.68a.668.668 0 0 0-.373 1.173l6.08 5.267-1.827 7.84c-.133.573.493 1.026 1 .72z",fill:t?"#FFC326":"#D2D6DC"}))},RateStars=({gap:e=2,size:t=24,star:a,totalStars:r=5,onSelect:o,hideEmptyStars:n,style:l,className:s})=>{let c=Math.floor(a),d=a-c>=.5?1:0,[p,m]=(0,i.useState)(null),u=p||c,h=p?0:d;return i.createElement(M,{"data-selectable":!!o,style:Object.assign({"--gap":e,"--star-size":t},l),className:s},Array.from({length:n?c+d:r}).map((e,t)=>{let onMouseOver=()=>!!o&&m(t+1),onMouseLeave=()=>!!o&&m(null);return t+1<=u?i.createElement(StarIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,isFull:!0}):t+1===u+h?i.createElement(StarHalfIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave}):i.createElement(StarIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave})}))},getTag=(e,t)=>{switch(e){case"yellow":{let e=t?d.r.colors.yellow50:d.r.colors.yellow600;return`
background: ${e};
p {
color: var(
--text-props-color,
${d.r.colors.gray800}
);
}
`}case"standard":return`
background: ${d.r.colors.white};
border: 1px solid ${d.r.colors.gray200};
p {
color: var(
--text-props-color,
${d.r.colors.gray800}
);
}
&:hover {
background: ${d.r.colors.gray100};
}
`;case"red":{let e=t?d.r.colors.red50:d.r.colors.red500;return`
background: ${e};
`}case"green":{let e=t?d.r.colors.green50:d.r.colors.green500;return`
background: ${e};
`}case"blue":{let e=t?d.r.colors.primary50:d.r.colors.primaryBase;return`
background: ${e};
`}case"teal":{let e=t?d.r.colors.teal100:d.r.colors.teal600;return`
background: ${e};
`}case"pink":{let e=t?d.r.colors.pink200:d.r.colors.pink800;return`
background: ${e};
`}case"violet":{let e=t?d.r.colors.violet100:d.r.colors.violet500;return`
background: ${e};
`}case"grey":{let e=t?d.r.colors.gray100:d.r.colors.gray600;return`
background: ${e};
`}}},F=c.Z.div`
--padding-horizontal: 8px;
--pading-vertical: 2px;
display: flex;
align-items: center;
justify-content: center;
padding: var(--pading-vertical) var(--padding-horizontal);
border-radius: 24px;
${e=>"sponsored"===e.tagType&&`
--offset-size: 4px;
display: flex;
align-items: center;
justify-content: center;
box-sizing: content-box;
position: relative;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.08);
border-radius: 0 4px 18px 0;
height: 24px;
width: 90px;
border-left: var(--offset-size) solid ${d.r.colors.accentLight};
padding: 0;
margin-left: calc(var(--offset-size) * -1);
p {
font-weight: ${d.r.sizes.fwBold};
color: var(
--text-props-color,
${d.r.colors.secondaryDark}
);
font-size: 11px;
margin-left: calc(var(--offset-size) * -1);
}
&::after {
width: calc(var(--offset-size) * 2);
height: var(--offset-size);
background: ${d.r.colors.accentMain};
position: absolute;
left: calc(var(--offset-size) * -1);
bottom: calc(var(--offset-size) * -1);
clip-path: polygon(0 1%, 100% 0%, 100% 100%);
content: '';
}
`}
${e=>e.isInline&&`
display: inline-block;
`}
${e=>e.tagHasMorePadding&&`
&[data-has-more-padding] {
padding: calc(var(--pading-vertical) + 5px) var(--padding-horizontal);
}
`}
p {
${e=>e.tagIsLight?`
color: var(--text-props-color, #000);
`:`
color: var(--text-props-color, ${d.r.colors.white});
`}
}
${e=>getTag(e.tagType,e.tagIsLight)}
${e=>e.tagIsSquared&&"sponsored"!==e.tagType&&`
border-radius: 4px;
`}
${e=>e.tagIsALink&&`
cursor: pointer;
`}
&[data-is-selected],
&:active {
background: ${d.r.colors.primary50};
}
`,Tag=({type:e,children:t,style:a,isInline:r,isSquared:o=!1,className:n,isLight:l,hasMorePadding:s,isLink:c,isSelected:d,textProps:p={size:"sm"}})=>{let m=p.color?{"--text-props-color":p.color}:{};return i.createElement(F,{"data-is-squared":o||void 0,"data-tag-type":e,"data-is-light":l||void 0,"data-has-more-padding":s||void 0,"data-is-inline":r||void 0,style:Object.assign(Object.assign({},a),m),className:n,"data-is-selected":d||void 0,"data-is-link":c||void 0,tagType:e,isInline:r,tagHasMorePadding:s,tagIsLight:l,tagIsSquared:o,tagIsALink:c},i.createElement(x.T,Object.assign({},p),t))},H="24px",A=(0,y.Z)(c.Z.span`
position: relative;
display: block;
width: 40px;
height: ${H};
background: #c3cbd4;
border-radius: 100px;
cursor: pointer;
&:after {
position: absolute;
top: 2px;
left: 2px;
width: 20px;
height: 20px;
background: #fff;
border-radius: 90px;
content: '';
transition: 0.3s;
}
`,"hhgcomp-toggle-icon"),L=c.Z.span`
padding-left: 15px;
`,_=c.Z.div`
height: ${H};
input[type='checkbox'] {
width: 0;
height: 0;
visibility: hidden;
}
label {
cursor: pointer;
display: inline-flex;
color: ${d.r.colors.gray600};
}
input:checked + label ${A.classSelector} {
background: ${d.r.colors.primaryBase};
&:after {
left: calc(100% - 2px);
transform: translateX(-100%);
}
}
`,Toggle=({className:e,id:t,onChange:a,checked:r,style:o,label:n})=>i.createElement(_,{className:e,style:o},i.createElement("input",{type:"checkbox",id:t,onChange:a,checked:r}),i.createElement("label",{htmlFor:t},i.createElement(A,null),n&&i.createElement(L,null,n))),Z=(0,i.createContext)({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1}),StepRenderer=({children:e,onStepChange:t})=>{let[a,r]=(0,i.useState)(0),[o,n]=(0,i.useState)(0),l=i.Children.count(e);return(0,i.useEffect)(()=>{n(l-1)},[l]),(0,i.useEffect)(()=>{null==t||t(a)},[a]),i.createElement(Z.Provider,{value:{currentStep:a,setCurrentStep:r,setMaxStep:n,nextStep:()=>a+1<=o&&r(a+1),prevStep:()=>a-1>=0&&r(a-1)}},(0,w.Z)(e).map((e,t)=>{let r=t===a;return i.createElement(i.Fragment,{key:t},i.isValidElement(e)?e.props.alwaysRender||r?i.cloneElement(e,{isActive:t===a,stepIndex:t}):null:r?e:null)}))},R=c.Z.div`
display: flex;
align-items: center;
gap: 8px;
`,V=(0,c.Z)(E.H)`
font-weight: var(--fwBold);
`,IconHeading=({icon:e,title:t,className:a,style:r})=>i.createElement(R,{className:a,style:r},e,i.createElement(V,{tag:"h6",color:"var(--secondaryDark)"},t)),sanitizeHtml=e=>{if(!e)return"";let t=e.replace(/\n$/,"").replace(/\n/g,"
");return t},HtmlContent=({htmlContent:e,className:t})=>{let a=sanitizeHtml(e);return i.createElement("div",{className:t,dangerouslySetInnerHTML:{__html:a}})};(r=n||(n={})).ONE_TO_ONE="1:1",r.THREE_TO_ONE="3:1",(o=l||(l={})).PNG=".png",o.JPG=".jpg",o.JPEG=".jpeg";let getBase64=e=>new Promise((t,a)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=a,r.readAsDataURL(e)}),handleMultipleImageFiles=e=>(0,f.a)(void 0,void 0,void 0,function*(){if(0===e.length)return[];let t=yield Promise.all(e.map(e=>getBase64(e)));return t}),G=c.Z.div`
display: flex;
flex-direction: column;
.image-upload-input-error {
margin-top: ${(0,u.h)(12)};
display: flex;
flex-direction: column;
gap: ${(0,u.h)(4)};
}
`,W=c.Z.div`
display: flex;
flex-direction: column;
gap: ${(0,u.h)(4)};
margin-top: ${(0,u.h)(4)};
span {
color: ${d.r.colors.neutral500};
}
`,U=c.Z.div`
position: relative;
width: fit-content;
padding: ${(0,u.h)(8)} ${(0,u.h)(12)};
border-radius: ${(0,u.h)(12)};
border: ${(0,u.h)(1)} solid ${d.r.colors.neutral200};
cursor: pointer;
display: flex;
align-items: center;
gap: ${(0,u.h)(8)};
margin-top: ${(0,u.h)(18)};
&.image-upload-dragover {
border-color: ${d.r.colors.primaryBase};
}
&.image-upload-error {
border-color: ${d.r.colors.error};
}
&.image-upload-disabled {
cursor: not-allowed;
background-color: ${d.r.colors.gray100};
color: ${d.r.colors.gray400};
border-color: ${d.r.colors.gray200};
}
svg {
width: ${(0,u.h)(18)};
height: ${(0,u.h)(18)};
}
input {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
z-index: -1;
}
`,q=c.Z.div`
position: relative;
width: ${(0,u.h)(90)};
height: ${(0,u.h)(90)};
border-radius: ${(0,u.h)(12)};
overflow: hidden;
background-color: ${d.r.colors.gray100};
display: flex;
align-items: center;
justify-content: center;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
svg {
width: ${(0,u.h)(14)};
height: ${(0,u.h)(14)};
color: ${d.r.colors.white};
}
.image-upload-remove-button {
cursor: pointer;
position: absolute;
top: ${(0,u.h)(6)};
right: ${(0,u.h)(6)};
background: ${d.r.colors.black};
border-radius: ${(0,u.h)(12)};
padding: ${(0,u.h)(2)};
display: flex;
&:hover {
opacity: 0.8;
}
}
`,Y=c.Z.div`
display: flex;
gap: ${(0,u.h)(8)};
margin-top: ${(0,u.h)(18)};
`,X=(0,i.forwardRef)(({label:e,name:t,error:a,acceptedTypes:r=[l.PNG,l.JPG,l.JPEG],maxSize:o=1,acceptedRatios:n,multiple:c=!1,disabled:p=!1,id:m,className:g,onChange:b,value:v,showValidationRules:x=!1,description:y,useBase64:w=!1,placeholder:E},z)=>{let{t:$}=(0,k.u)(),[N,B]=(0,i.useState)(!1),[S,T]=(0,i.useState)([]),I=(0,i.useRef)(null),j=!!a||S.length>0,P=(0,i.useMemo)(()=>v?Array.isArray(v)?v:[v]:[],[v]),D=(0,i.useCallback)(e=>{var t;let a=[],n="."+(null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase());r.includes(n)||a.push(`Unsupported file format. Please upload a ${r.join(", ")} file.`);let l=e.size/1048576;return l>o&&a.push(`File too large. Please upload an image smaller than ${o}MB.`),{file:e,isValid:0===a.length,errors:a}},[r,o]),O=(0,i.useCallback)(e=>new Promise(t=>{if(!n||!n.length||!e.type.startsWith("image/")){t([]);return}let a=new Image;a.onload=()=>{let e=a.width/a.height,r=`${e.toFixed(1)}:1`,o=n.some(t=>{let[a,r]=t.split(":"),o=parseInt(a)/parseInt(r);return .1>Math.abs(e-o)});t(o?[]:[`Image ratio ${r} is not accepted.`])},a.onerror=()=>t(["Invalid image file"]),a.src=URL.createObjectURL(e)}),[n]),M=(0,i.useMemo)(()=>P.map(e=>"string"==typeof e?e:e instanceof File?URL.createObjectURL(e):"").filter(Boolean),[P]),F=(0,i.useCallback)(e=>(0,f.a)(void 0,void 0,void 0,function*(){let a=Array.from(e),r=[],o=[];for(let e of a){let t=D(e),a=yield O(e),n=[...t.errors,...a];0===n.length?o.push(e):r.push(...n)}if(T(r),0===o.length)return;let n=w?yield handleMultipleImageFiles(o):o;b({target:{name:t,value:c?[...P,...n]:n.slice(0,1)}})}),[D,O,c,b,t,P]),removeFile=e=>{let a=P.filter((t,a)=>a!==e);T([]),b({target:{name:t,value:c?a:""}})},H=(0,i.useCallback)(e=>{I.current=e,"function"==typeof z?z(e):z&&(z.current=e)},[z]),A=(0,i.useCallback)(()=>{!p&&I.current&&I.current.click()},[p]),L=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),B(!0)},[]),_=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),B(!1)},[]),Z=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),R=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),B(!1);let t=e.dataTransfer.files;t.length>0&&F(t)},[F]);return i.createElement(G,{className:g},i.createElement("label",{htmlFor:m||t},"string"==typeof e?i.createElement(s.T,{size:"title2"},e):e,y&&i.createElement(s.T,{size:"p3",mt:(0,u.h)(4),color:d.r.colors.gray700},y)),x&&i.createElement(W,null,i.createElement(s.T,{size:"p3"},"Formats: ",r.join("/")),n&&i.createElement(s.T,{size:"p3"},"Max size: ",o,"MB - Accepted ratios:"," ",n.join("/"))),(c||0===P.length)&&i.createElement(U,{className:(0,h.default)(N&&"image-upload-dragover",j&&"image-upload-error",p&&"image-upload-disabled"),onDragEnter:L,onDragLeave:_,onDragOver:Z,onDrop:R,onClick:A},i.createElement("input",{ref:H,type:"file",id:m||t,name:t,accept:r.join(","),multiple:c,onChange:e=>{let t=e.target.files;t&&t.length>0&&F(t)},disabled:p}),i.createElement(Upload,null),i.createElement(s.T,{size:"p3",fw:500},E||$("common.btn.uploadPhoto"))),P.length>0&&i.createElement(Y,null,M.map((e,t)=>i.createElement(q,{key:t},i.createElement("img",{src:e,alt:`Uploaded file ${t+1}`,className:"image-upload-preview-image"}),i.createElement("button",{onClick:e=>{e.stopPropagation(),removeFile(t)},className:"image-upload-remove-button"},i.createElement(C.C,null))))),j&&i.createElement("div",{className:"image-upload-input-error"},[...S,a].map(e=>i.createElement(s.T,{key:e,className:"error-text",size:"c1",color:d.r.colors.red600},e))))}),J=(0,c.Z)(z.l)`
& .mantine-Carousel-control {
width: auto;
}
`,DragFreeCarousel=e=>{var{children:t,gapItem:a=8,slideSize:r="auto",withControls:o=!1,withIndicators:n=!1,dragFree:l=!0,align:s="start"}=e,c=(0,f._)(e,["children","gapItem","slideSize","withControls","withIndicators","dragFree","align"]);return i.createElement(J,Object.assign({slideSize:r,slideGap:a,withControls:o,withIndicators:n,dragFree:l,align:s,containScroll:"trimSnaps"},c),i.Children.map(t,(e,t)=>i.createElement(z.l.Slide,{key:t},e)))}},Jq7Z:function(e,t,a){a.d(t,{L:function(){return Loading}});var r=a("q1tI"),o=a("Xmc7"),n=a("Q9az");let Loading=({className:e,size:t="md"})=>{let{t:a}=(0,o.u)();return r.createElement("div",{className:`PD6nRZX ${e}`},r.createElement(n.B,{size:t,color:"transparent",isLoading:!0},a("loading")))}},VggR:function(e,t,a){a.d(t,{B:function(){return BabyGrowthForm}});var r=a("WFaC"),o=a("q1tI"),n=a("/npG"),l=a("mYVa"),i=a("8vDj"),s=a("iuhU"),c=a("cChf"),d=a("ZFu2"),p=a("7yNo"),m=a("/gBz"),u=a("qdzI"),h=a("iBNF"),g=a("Xmc7"),b=a("q0bE"),v=a("OLn4"),f=a("l7XS"),x=a("k1t0"),y=a("lsJL"),w=a("Zge2");let E=(0,o.createContext)({}),DefaultForm=e=>{let{t,locale:a}=(0,g.u)(),{classes:r={}}=(0,o.useContext)(b.C),{form:n,currentUrl:l,submitProps:i}=(0,o.useContext)(E),s={placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0}};return o.createElement(f.H,Object.assign({formLayout:"default"},e),o.createElement(f.H.FormRow,null,o.createElement(f.H.Control,null,o.createElement(x.G,Object.assign({isBaby:!0,genderValue:{male:"boy",female:"girl"}},n.getInputProps("gender"),{error:null}))),n.errors.gender&&o.createElement(f.H.Error,null,n.errors.gender)),o.createElement(f.H.FormRow,null,o.createElement(p.I.Wrapper,{label:o.createElement(u.T,{size:"p2",weight:"semiBold"},t("babyGrowth.input.birthday"))},o.createElement(m.D,Object.assign({},s,{maxDate:new Date},n.getInputProps("birthday"),{error:null,onChange:e=>{e&&n.validateField("measurementDate"),n.getInputProps("birthday").onChange(e)}}))),n.errors.birthday&&o.createElement(f.H.Error,null,n.errors.birthday)),o.createElement(f.H.FormRow,null,o.createElement(p.I.Number,Object.assign({label:o.createElement(u.T,{size:"p2",weight:"semiBold"},t("babyGrowth.height"),o.createElement(u.T,{size:"p2",weight:"semiBold",color:h.r.colors.gray300,as:"span"},` (${t("babyGrowth.cm")})`))},n.getInputProps("height"),{placeholder:t("babyGrowth.height"),min:v.I.height.min,max:v.I.height.max,onChange:e=>{n.setFieldValue("height",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),o.createElement(f.H.FormRow,null,o.createElement(p.I.Number,Object.assign({label:o.createElement(u.T,{size:"p2",weight:"semiBold"},t("babyGrowth.weight"),o.createElement(u.T,{size:"p2",weight:"semiBold",color:h.r.colors.gray300,as:"span"},` (${t("babyGrowth.kg")})`))},n.getInputProps("weight"),{placeholder:t("babyGrowth.weight"),min:v.I.weight.min,max:v.I.weight.max,onChange:e=>{n.setFieldValue("weight",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),a!==y.L.Vietnam&&o.createElement(f.H.FormRow,null,o.createElement(p.I.Number,Object.assign({label:o.createElement(u.T,{size:"p2",weight:"semiBold"},t("babyGrowth.head"),o.createElement(u.T,{size:"p2",weight:"semiBold",color:h.r.colors.gray300,as:"span"},` (${t("babyGrowth.cm")})`))},n.getInputProps("head"),{placeholder:t("babyGrowth.head"),onChange:e=>{n.setFieldValue("head",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),n.errors.checkMesureVal&&o.createElement(f.H.Error,null,n.errors.checkMesureVal),o.createElement(f.H.FormRow,null,o.createElement(p.I.Wrapper,{label:o.createElement(u.T,{size:"p2",weight:"semiBold"},t("babyGrowth.input.measurementDate"))},o.createElement(m.D,Object.assign({},s,{defaultValue:new Date},n.getInputProps("measurementDate"),{maxDate:new Date,error:null}))),n.errors.measurementDate&&o.createElement(f.H.Error,null,n.errors.measurementDate)),o.createElement(f.H.FormRow,{className:r.submitWrapper},o.createElement(f.H.Submit,Object.assign({className:r.submitBtn,type:"submit","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":l},i),t("babyGrowth.input.submit"))))};var C=(0,n.k)(e=>({root:{display:"flex",flexDirection:"column",gap:(0,l.h)(8)},bmiVal:{display:"inline-block"},unitText:{color:e.colors.gray[6]},submitBtn:{}}));let localizeNumberFormat=(e,t=2)=>Intl.NumberFormat(void 0,{maximumFractionDigits:t}).format(e),bmiCalculate=(e=0,t=0)=>{try{if(e&&t){let a=Number(t)/Math.pow(Number(e)/100,2);if(isNaN(a))return 0;return Number(localizeNumberFormat(a))}}catch(e){}return 0},InlineForm=e=>{var{styles:t,classNames:a}=e,n=(0,r._)(e,["styles","classNames"]);let{t:l,locale:c}=(0,g.u)(),{form:d,currentUrl:h,submitProps:w}=(0,o.useContext)(E),{classes:k={}}=(0,o.useContext)(b.C),z=(0,i.rZ)(),{classes:$}=C(void 0,{name:"BabyGrowthForm__InlineForm",styles:t,classNames:a}),N={placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0}};return o.createElement(f.H,Object.assign({formLayout:"inline"},n),o.createElement(f.H.FormRow,null,o.createElement(f.H.BorderInlineControl,{label:l("tools.selectBabyGender")},o.createElement(x.G,Object.assign({type:"radio",hideLabel:!0,isBaby:!0,genderValue:{male:"boy",female:"girl"}},d.getInputProps("gender")))),d.errors.gender&&o.createElement(f.H.Error,null,d.errors.gender)),o.createElement(f.H.FormRow,null,o.createElement(f.H.BorderInlineControl,{label:l("babyGrowth.input.birthday")},o.createElement(m.D,Object.assign({},N,{maxDate:new Date},d.getInputProps("birthday"),{error:null,onChange:e=>{e&&d.validateField("measurementDate"),d.getInputProps("birthday").onChange(e)}}))),d.errors.birthday&&o.createElement(f.H.Error,null,d.errors.birthday)),o.createElement(f.H.FormRow,null,o.createElement(f.H.BorderInlineControl,{label:"BMI",styles:{control:{"&:first-child":{width:"auto"}}}},o.createElement(u.T,{size:"p3"},o.createElement("span",{className:$.bmiVal},d.getInputProps("height").value&&d.getInputProps("weight").value&&bmiCalculate(Number(d.getInputProps("height").value),Number(d.getInputProps("weight").value))),"(",l("babyGrowth.kg.m2"),")"),o.createElement(p.I.Number,Object.assign({},d.getInputProps("height"),{placeholder:l("babyGrowth.height"),min:v.I.height.min,max:v.I.height.max,onChange:e=>{d.setFieldValue("height",e),d.setFieldValue("checkMesureVal",!d.values.checkMesureVal)},rightSection:o.createElement(f.H.Unit,null,l("babyGrowth.cm"))})),o.createElement(p.I.Number,Object.assign({},d.getInputProps("weight"),{placeholder:l("babyGrowth.weight"),min:v.I.weight.min,max:v.I.weight.max,onChange:e=>{d.setFieldValue("weight",e),d.setFieldValue("checkMesureVal",!d.values.checkMesureVal)},rightSection:o.createElement(f.H.Unit,null,l("babyGrowth.kg"))}))),("mb"===z.other.template||c!==y.L.Vietnam)&&o.createElement(f.H.BorderInlineControl,{label:l("babyGrowth.head")},o.createElement(p.I.Number,Object.assign({},d.getInputProps("head"),{placeholder:l("babyGrowth.head"),onChange:e=>{d.setFieldValue("head",e),d.setFieldValue("checkMesureVal",!d.values.checkMesureVal)},rightSection:o.createElement(f.H.Unit,null,l("babyGrowth.cm"))}))),d.errors.checkMesureVal&&o.createElement(f.H.Error,null,d.errors.checkMesureVal)),o.createElement(f.H.FormRow,null,o.createElement(f.H.BorderInlineControl,{label:l("babyGrowth.input.measurementDate")},o.createElement(m.D,Object.assign({},N,{maxDate:new Date},d.getInputProps("measurementDate"),{error:null}))),d.errors.measurementDate&&o.createElement(f.H.Error,null,d.errors.measurementDate)),o.createElement(f.H.FormRow,{className:k.submitWrapper},o.createElement(f.H.Submit,Object.assign({type:"submit","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":h,className:(0,s.default)($.submitBtn,k.submitBtn)},w),l("babyGrowth.input.submit"))))},MbLayout=e=>{var t=(0,r._)(e,[]);let{t:a}=(0,g.u)(),{form:n,currentUrl:l,submitProps:i}=(0,o.useContext)(E),s={placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0}};return o.createElement(f.H,Object.assign({formLayout:"default"},t),o.createElement(f.H.FormRow,null,o.createElement(f.H.Control,null,o.createElement(x.G,Object.assign({isBaby:!0,genderValue:{male:"boy",female:"girl"}},n.getInputProps("gender"),{error:null}))),n.errors.gender&&o.createElement(f.H.Error,null,n.errors.gender)),o.createElement(f.H.BorderBoxControl,{label:a("babyGrowth.input.birthday"),rightSection:o.createElement(w.Z,null)},o.createElement(m.D,Object.assign({},s,{maxDate:new Date},n.getInputProps("birthday"),{error:null,rightSection:null,onChange:e=>{e&&n.validateField("measurementDate"),n.getInputProps("birthday").onChange(e)}}))),n.errors.birthday&&o.createElement(f.H.Error,null,n.errors.birthday),o.createElement(f.H.BorderBoxControl,{label:a("babyGrowth.height"),rightSection:a("babyGrowth.cm")},o.createElement(p.I.Number,Object.assign({},n.getInputProps("height"),{placeholder:a("tools.inputPlaceholder",{content:"160"}),min:v.I.height.min,max:v.I.height.max,onChange:e=>{n.setFieldValue("height",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),n.errors.height&&o.createElement(f.H.Error,null,n.errors.height),o.createElement(f.H.BorderBoxControl,{label:a("babyGrowth.weight"),rightSection:a("babyGrowth.kg")},o.createElement(p.I.Number,Object.assign({},n.getInputProps("weight"),{placeholder:a("tools.inputPlaceholder",{content:"50"}),min:v.I.weight.min,max:v.I.weight.max,onChange:e=>{n.setFieldValue("weight",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),n.errors.weight&&o.createElement(f.H.Error,null,n.errors.weight),o.createElement(f.H.BorderBoxControl,{label:a("babyGrowth.head"),rightSection:a("babyGrowth.cm")},o.createElement(p.I.Number,Object.assign({},n.getInputProps("head"),{placeholder:a("tools.inputPlaceholder",{content:"50"}),onChange:e=>{n.setFieldValue("head",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),n.errors.checkMesureVal&&o.createElement(f.H.Error,null,n.errors.checkMesureVal),o.createElement(f.H.BorderBoxControl,{label:a("babyGrowth.input.measurementDate"),rightSection:o.createElement(w.Z,null)},o.createElement(p.I.Wrapper,null,o.createElement(m.D,Object.assign({},s,{defaultValue:new Date},n.getInputProps("measurementDate"),{maxDate:new Date,rightSection:null,error:null})))),n.errors.measurementDate&&o.createElement(f.H.Error,null,n.errors.measurementDate),o.createElement(f.H.Submit,Object.assign({type:"submit","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":l},i),a("babyGrowth.input.submit")))},BabyGrowthForm=e=>{var{onSubmit:t,formLayout:a="default",submitProps:n,currentUrl:l}=e,s=(0,r._)(e,["onSubmit","formLayout","submitProps","currentUrl"]);let{t:p}=(0,g.u)(),m=(0,i.rZ)(),u=(0,c.c)({initialValues:{measurementDate:new Date},validate:{gender:(0,d.U)(p("validation.error.requiredField")),birthday:(0,d.U)(p("validation.error.requiredField")),measurementDate:(e,t)=>t.birthday?t.birthday instanceof Date&&e instanceof Date&&t.birthday.getTime()<=e.getTime()?null:p("babyGrowth.error.measurementDateLowerThanBirthday",{name:""}):null,checkMesureVal:(e,t)=>void 0===t.head&&void 0===t.height&&void 0===t.weight||t.head||t.height||t.weight?null:p("babyGrowth.error.atLeastOneOf")},validateInputOnChange:["checkMesureVal"]}),h=Object.assign({onSubmit:u.onSubmit(e=>null==t?void 0:t(Object.assign(Object.assign({},e),{bmi:bmiCalculate(Number(u.getInputProps("height").value),Number(u.getInputProps("weight").value)).toString()})))},s);return o.createElement(E.Provider,{value:{submitProps:n,currentUrl:l,form:u}},"default"===a?"mb"===m.other.template?o.createElement(MbLayout,Object.assign({formLayout:a},h)):o.createElement(DefaultForm,Object.assign({},h)):o.createElement(InlineForm,Object.assign({},h)))}},"/QrV":function(e,t,a){a.d(t,{P:function(){return PopoverMenu},S:function(){return c}});var r=a("q1tI"),o=a("Q9az"),n=a("lLco"),l=a("rBCA"),i=a("iBNF");let s=l.Z.div`
position: relative;
display: content;
.popover-menu__btn {
/* position: relative; */
> span {
width: 100%;
height: 100%;
> img {
width: 100%;
height: 100%;
}
}
}
.popover-menu__content {
position: absolute;
z-index: 10;
width: 320px;
padding: 8px;
border: none;
background: #fff;
border-radius: 8px;
box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.1);
&::before {
position: absolute;
width: 16px;
height: 8px;
background: #fff;
content: '';
}
&.--position {
&-top {
bottom: calc(100% + 8px);
&.--align {
&-start {
left: 0;
&::before {
top: 100%;
left: 16px;
clip-path: polygon(0 0, 50% 100%, 100% 0);
}
}
&-end {
left: 100%;
transform: translateX(calc(-100% + 1rem));
&::before {
top: 100%;
right: 16px;
clip-path: polygon(0 0, 50% 100%, 100% 0);
}
}
}
}
&-right {
left: calc(100% + 8px);
&.--align {
&-start {
top: 0;
&::before {
top: 16px;
left: 0;
width: 8px;
height: 16px;
clip-path: polygon(0 50%, 100% 0%, 100% 100%);
transform: translateX(-100%);
}
}
&-end {
top: 100%;
transform: translateX(calc(-100% + 1rem));
&::before {
bottom: 16px;
left: 0;
width: 8px;
height: 16px;
clip-path: polygon(0 50%, 100% 0%, 100% 100%);
transform: translateX(-100%);
}
}
}
}
&-bottom {
top: calc(100% + 8px);
&.--align {
&-start {
left: 0;
&::before {
bottom: 100%;
left: 16px;
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
}
&-end {
left: 100%;
transform: translateX(calc(-100% + 1rem));
&::before {
right: 16px;
bottom: 100%;
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
}
}
}
&-left {
left: -8px;
transform: translateX(-100%);
&.--align {
&-start {
top: 0;
&::before {
top: 16px;
left: 100%;
width: 8px;
height: 16px;
clip-path: polygon(0 0%, 100% 50%, 0% 100%);
transform: translateX(0);
}
}
&-end {
bottom: 0;
&::before {
bottom: 16px;
left: 100%;
width: 8px;
height: 16px;
clip-path: polygon(0 0%, 100% 50%, 0% 100%);
transform: translateX(0);
}
}
}
}
}
}
&[data-is-marrybaby='true'] {
.popover-menu__content {
padding: 0;
border-radius: 12px;
/* &::before {
display: none;
} */
}
}
`,c=l.Z.div`
display: flex;
/* max-height: 300px; */
flex-direction: column;
cursor: default;
.__header {
position: relative;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem 0;
margin-bottom: 8px;
.__back-btn {
position: absolute;
top: 50%;
left: 8px;
width: 16px;
height: 16px;
cursor: pointer;
transform: translateY(-50%);
}
}
.tree-text-description {
padding-right: 8px;
padding-left: 8px;
margin-top: -8px;
margin-bottom: 8px;
font-size: 14px;
font-weight: 400;
line-height: 22px;
text-align: left;
}
.__content {
overflow: auto;
flex: 1;
}
.__list {
.__item {
position: relative;
&.bold-item {
font-weight: 700;
}
&:last-child {
.__btn {
margin-bottom: 0;
}
}
.__btn {
position: relative;
display: flex;
width: 100%;
height: 40px;
align-items: center;
padding: 0 1rem;
border: none;
margin-bottom: 8px;
color: ${i.r.colors.gray800};
cursor: pointer;
text-align: left;
transition: background 0.3s;
/* for better gtm tracking result */
* {
pointer-events: none;
}
&.--checked {
color: ${i.r.colors.gray500};
pointer-events: none;
}
&:hover {
background: ${i.r.colors.gray100};
}
.__icon {
width: 16px;
height: 16px;
margin-right: 0.4rem;
}
& > span {
position: relative;
& > img {
width: 16px;
height: 16px;
margin-right: 0.4rem;
}
}
}
.__toggle {
position: absolute;
top: 50%;
right: 16px;
width: 16px;
height: 16px;
pointer-events: none;
transform: translateY(-50%);
}
}
}
&[data-is-marrybaby='true'] {
.__header {
padding: 1rem;
}
.tree-text-description {
padding: 0 1rem;
}
.__list {
.__item {
&:first-child {
.__btn {
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
}
&:last-child {
.__btn {
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
}
}
.__btn {
height: unset;
padding: 1rem;
margin-bottom: 0;
&:hover {
background: ${i.r.mbColors.lightPink};
}
}
}
}
}
`,PopoverMenu=({className:e,style:t,toggleButtonContent:a,position:l="bottom",align:i="end",children:c,buttonProps:d})=>{let{data:{env:{isMarryBaby:p}}}=(0,r.useContext)(n.T),[m,u]=(0,r.useState)(!1),h=(0,r.useRef)(null),g=(0,r.useRef)(m);return(0,r.useEffect)(()=>{var e;g.current=m,m&&(null===(e=h.current)||void 0===e||e.focus())},[m]),(0,r.useEffect)(()=>{let clickHandler=e=>{var t;(null===(t=h.current)||void 0===t?void 0:t.contains(e.target))||!g.current||u(!1)};return window.addEventListener("click",clickHandler,{passive:!0}),()=>{window.removeEventListener("click",clickHandler)}},[]),r.createElement(s,{"data-is-marrybaby":p,className:e,style:t},r.createElement(o.B,Object.assign({theme:p?"marryBaby":"helloSites",className:"popover-menu__btn",size:"md",color:"transparent",onClick:()=>u(e=>!e)},d),a),m?r.createElement("div",{ref:h,className:`popover-menu__content --position-${l} --align-${i}`,tabIndex:0,onClick:e=>e.stopPropagation()},"function"==typeof c?c({setShow:u}):c):null)}},atBY:function(e,t,a){a.d(t,{B:function(){return BabyVaccineForm}});var r,o,n=a("WFaC"),l=a("q1tI"),i=a("iuhU"),s=a("8vDj"),c=a("cChf"),d=a("ZFu2"),p=a("/gBz"),m=a("qdzI"),u=a("Xmc7"),h=a("q0bE"),g=a("l7XS"),b=a("k1t0"),v=a("Zge2");let f=(0,l.createContext)({}),DefaultLayout=e=>{var t=(0,n._)(e,[]);let{t:a}=(0,u.u)(),{currentUrl:r,submitProps:o,form:s}=(0,l.useContext)(f),{classes:c={}}=(0,l.useContext)(h.C);return l.createElement(g.H,Object.assign({formLayout:"default"},t),l.createElement(g.H.FormRow,null,l.createElement(b.G,Object.assign({isBaby:!0},s.getInputProps("gender")))),l.createElement(g.H.FormRow,null,l.createElement(p.D,Object.assign({label:l.createElement(m.T,{size:"p2",weight:"semiBold"},a("babyGrowth.input.birthday")),placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age")))),l.createElement(g.H.FormRow,{className:c.submitWrapper},l.createElement(g.H.Submit,Object.assign({type:"submit",className:(0,i.default)("due-date-calculate-button",c.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:r},o),a("dueDatePage.lastPeriod.calculate"))))},InlineLayout=e=>{var t=(0,n._)(e,[]);let{t:a}=(0,u.u)(),{currentUrl:r,submitProps:o,form:s}=(0,l.useContext)(f),{classes:c={}}=(0,l.useContext)(h.C);return l.createElement(g.H,Object.assign({formLayout:"inline"},t),l.createElement(g.H.FormRow,null,l.createElement(g.H.BorderInlineControl,{label:a("tools.selectBabyGender"),width:"none"},l.createElement(b.G,Object.assign({isBaby:!0,hideLabel:!0,type:"radio"},s.getInputProps("gender")))),s.errors.gender&&l.createElement(g.H.Error,null,s.errors.gender)),l.createElement(g.H.FormRow,null,l.createElement(g.H.BorderInlineControl,{label:a("babyGrowth.input.birthday")},l.createElement(p.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age"),{error:null}))),s.errors.age&&l.createElement(g.H.Error,null,s.errors.age)),l.createElement(g.H.FormRow,{className:c.submitWrapper},l.createElement(g.H.Submit,Object.assign({type:"submit",className:(0,i.default)("due-date-calculate-button",c.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:r},o),a("dueDatePage.lastPeriod.calculate"))))},MbLayout=e=>{var t=(0,n._)(e,[]);let{t:a}=(0,u.u)(),{currentUrl:r,submitProps:o,form:i}=(0,l.useContext)(f);return l.createElement(g.H,Object.assign({formLayout:"default"},t),l.createElement(g.H.Control,null,l.createElement(b.G,Object.assign({isBaby:!0},i.getInputProps("gender"),{error:null}))),i.errors.gender&&l.createElement(g.H.Error,null,i.errors.gender),l.createElement(g.H.FormRow,null,l.createElement(g.H.BorderBoxControl,{label:a("babyGrowth.input.birthday"),rightSection:l.createElement(v.Z,null)},l.createElement(p.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null},i.getInputProps("age"),{error:null}))),i.errors.age&&l.createElement(g.H.Error,null,i.errors.age)),l.createElement(g.H.Submit,Object.assign({type:"submit",className:"due-date-calculate-button",dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:r},o),a("dueDatePage.lastPeriod.calculate")))};(r=o||(o={}))[r.trackPeriod=0]="trackPeriod",r[r.conceive=1]="conceive",r[r.avoidPregnancy=2]="avoidPregnancy";let BabyVaccineForm=e=>{var{formLayout:t="default",submitProps:a,currentUrl:r,onSubmit:o}=e,i=(0,n._)(e,["formLayout","submitProps","currentUrl","onSubmit"]);let{t:p}=(0,u.u)(),m=(0,s.rZ)(),h="mb"===m.other.template,g=(0,c.c)({validate:{gender:(0,d.U)(p("validation.error.requiredField")),age:(0,d.U)(p("validation.error.requiredField"))}}),b=Object.assign({onSubmit:g.onSubmit(o)},i);return l.createElement(f.Provider,{value:{submitProps:a,currentUrl:r,form:g}},"inline"===t?l.createElement(InlineLayout,Object.assign({},b)):h?l.createElement(MbLayout,Object.assign({formLayout:t},b)):l.createElement(DefaultLayout,Object.assign({},b)))}},TTVT:function(e,t,a){a.d(t,{B:function(){return BlueWhiteLogin},N:function(){return NavigationProfileButton},U:function(){return UserPlain},a:function(){return k},b:function(){return NavigationProvider},u:function(){return useCSSFocusPopupHelper}});var r=a("WFaC"),o=a("q1tI"),n=a("Eq4O"),l=a("Qgdm"),i=a("7yNo"),s=a("/bt/"),c=a("qdzI"),d=a("Xmc7"),p=a("v9p6"),m=a("iBNF"),u=a("rBCA"),h=a("3wcI"),g=a("gEnE"),b=a("xXM3"),v=a.n(b),f=a("2yqS"),x=a("lLco"),y=a("Zh+3"),w=a("xrdX"),E=a("QHxc"),C=a("hPj0");let BlueWhiteLogin=e=>o.createElement("svg",Object.assign({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),o.createElement("rect",{y:"0.5",width:"31",height:"31",rx:"15.5",fill:"white"}),o.createElement("path",{d:"M15.4999 14.3797C16.9062 14.3797 18.0462 13.2397 18.0462 11.8334C18.0462 10.4271 16.9062 9.28711 15.4999 9.28711C14.0936 9.28711 12.9536 10.4271 12.9536 11.8334C12.9536 13.2397 14.0936 14.3797 15.4999 14.3797Z",stroke:"#2743AD",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.9092 22.0335C20.7055 21.7825 21.124 20.9029 20.786 20.1399C19.8879 18.1112 17.861 16.6946 15.4999 16.6946C13.1388 16.6946 11.112 18.1112 10.2138 20.1399C9.87585 20.9038 10.2944 21.7825 11.0907 22.0335C12.2249 22.3909 13.7258 22.7131 15.4999 22.7131C17.274 22.7131 18.7749 22.3909 19.9092 22.0335Z",stroke:"#2743AD",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})),UserPlain=e=>o.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),o.createElement("path",{d:"M9.99991 8.3797C11.4062 8.3797 12.5462 7.23969 12.5462 5.83341C12.5462 4.42712 11.4062 3.28711 9.99991 3.28711C8.59363 3.28711 7.45361 4.42712 7.45361 5.83341C7.45361 7.23969 8.59363 8.3797 9.99991 8.3797Z",stroke:"white",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M14.4092 16.0335C15.2055 15.7825 15.624 14.9029 15.286 14.1399C14.3879 12.1112 12.361 10.6946 9.99992 10.6946C7.63881 10.6946 5.61196 12.1112 4.71381 14.1399C4.37585 14.9038 4.79436 15.7825 5.59066 16.0335C6.72492 16.3909 8.22584 16.7131 9.99992 16.7131C11.774 16.7131 13.2749 16.3909 14.4092 16.0335Z",stroke:"white",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})),useNavConfig=({locale:e,projectType:t,siteType:a,enableBookingBtn:r})=>{let n=(0,o.useMemo)(()=>{let o="discover"===t||"together"===t||"marryBaby"===t||"profile"===t&&"marryBaby"===a,n="marryBaby"!==a&&"marryBaby"!==t&&f.C.includes(e),l=r&&"marryBaby"!==t&&"discover"===t&&"marryBaby"!==a&&f.d.includes(e),i="marryBaby"===t||f.c.includes(e),s="marryBaby"!==a&&f.E.includes(e),c="marryBaby"!==a&&f.E.includes(e),d=f.V.includes(e),p=f.H.includes(e),m=(0,y.g)(e,"marryBaby"===a),u=m;"undefined"!=typeof window&&(u.includes("//id.")&&(u=u.replace("id.","")),u.includes("//staging-id.")&&(u=u.replace("staging-id.","discover.")));let h=(0,y.a)(e,"marryBaby"===a),g={HOME_PAGE_URL:u,CARE_URL_FE:`${u}/care`,TOGETHER_URL_FE:`${u}/community`,VIDEO_URL_FE:`${u}/videos`,SSO_URL:h,TOGETHER_API:(0,y.b)(),DISCOVER_API:(0,y.c)(e)};return{enableSearchBar:o,enableNavCare:n,enableNavCareBooking:l,enableNavTogether:i,enableNavEcom:s,enableProfileEcom:c,enableNavVideo:d,enableProfileMyHealth:!0,enableNavDiscover:!0,enableNavHealthTools:!0,enableProfileMySaved:!0,statics:g,enableNavClinityDownload:p}},[]);return n},k=o.createContext({}),NavigationProvider=e=>{var{children:t}=e,a=(0,r._)(e,["children"]);let[n,l]=o.useState(()=>a.currentUrl||`https://${"marryBaby"===a.siteType?x.d[a.locale||"en-PH"]:w.v[a.locale||"en-PH"]}${"together"===a.projectType?"/community":"ecom"===a.projectType?"/ecom":"care"===a.projectType?"/care":""}/`);(0,o.useEffect)(()=>{let update=()=>{l(window.location.href)};return window.addEventListener("popstate",update),update(),()=>{window.removeEventListener("popstate",update)}},[]);let i=useNavConfig({locale:a.locale,projectType:a.projectType,siteType:a.siteType,enableBookingBtn:a.enableBookingBtn});return o.createElement(k.Provider,{value:Object.assign(Object.assign({},a),{customClasses:a.customClasses||{},configs:Object.assign(Object.assign({},i),a.configs),currentUrl:a.currentUrl||n})},t)},useCSSFocusPopupHelper=e=>{let{allowBgScroll:t}=e||{},a=(0,o.useRef)();return{containerRef:a,onContainerFocus:()=>{t||(document.documentElement.style.overflow="hidden")},onContainerBlur:()=>{t||(document.documentElement.style.overflow="")},onButtonMouseDown:e=>{a.current&&(document.activeElement===a.current||a.current.contains(document.activeElement))&&(a.current.blur(),document.activeElement.blur(),e.preventDefault())},onClose:()=>{a.current&&(document.activeElement===a.current||a.current.contains(document.activeElement))&&(a.current.blur(),document.activeElement.blur())}}},z=(0,g.Z)(u.Z.div`
position: absolute;
right: 0;
transition: all 0.5s ease-in-out;
overflow-y: auto;
&[data-open='true'] {
z-index: 200;
top: 120%;
opacity: 1;
visibility: visible;
}
&[data-open='false'] {
display: none;
}
.popup-content {
z-index: 111;
height: 100%;
border: 1px solid #0000001a;
border-radius: 16px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
/* min-height: 415px; */
${h.M.mbUp} {
width: 320px;
}
${h.M.mbDown} {
position: fixed;
left: 0;
width: 100%;
padding-bottom: 70px;
}
`,"hhgcomp-navprofilebutton-popup"),$=(0,g.Z)(u.Z.div`
position: fixed;
z-index: 150;
top: var(--header-bottom, 56px);
left: 0;
width: 100%;
height: 100%;
align-items: center;
${h.M.mbUp} {
background-color: transparent;
&[data-type='welcome'] {
background: rgba(38, 38, 38, 0.3);
}
&[data-type='due-date'] {
background: rgba(38, 38, 38, 0.3);
}
}
${h.M.mbDown} {
background: rgba(38, 38, 38, 0.3);
}
&[data-type='welcome'] {
top: 0;
}
&[data-open='false'] {
display: none;
}
`,"hhgcomp-navprofilebutton-popupwrapper"),N=u.Z.div`
width: 36px;
height: 36px;
cursor: pointer;
img {
border-radius: 50%;
}
.avatar {
width: 36px;
height: 36px;
object-fit: cover;
}
.avatar-default {
display: flex;
align-items: center;
justify-content: center;
background-color: ${m.r.colors.secondaryBase};
border-radius: 50%;
color: white;
font-size: 20px;
font-weight: bold;
}
`,B=u.Z.div`
display: inline-flex;
position: relative;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
flex-shrink: 0;
cursor: pointer;
.user-close-icon {
display: none;
}
&:focus-within {
.user-close-icon {
display: block;
}
.user-avatar {
display: none;
}
${z.classSelector} {
z-index: 200;
top: 120%;
opacity: 1;
visibility: visible;
display: initial;
${h.M.mbDown} {
top: 100%;
}
}
${$.classSelector} {
display: initial;
}
}
`,S=u.Z.a`
display: inline-flex;
.login-btn[data-color='tertiary'][data-size='md'] {
padding-left: 12px;
padding-right: 12px;
}
.mobile-only {
${h.M.mbUp} {
display: none;
}
}
.login-btn {
display: none;
${h.M.mbUp} {
display: block;
border: 1px solid ${m.r.colors.neutral100};
}
}
&[data-win-cash-back-theme='true'] {
.login-btn {
${h.M.mbUp} {
color: ${m.r.colors.white};
}
}
}
`,ProfilePopup=({isOpen:e,userInfo:t,closePopup:a,siteType:r="helloSites",dispatchLogout:n})=>{let{customClasses:l={},configs:{enableProfileFindMyBooking:i}}=(0,o.useContext)(k);return o.createElement(z,{className:l.profilePopup,"data-open":e},o.createElement("div",{className:v()("popup-content",l.profilePopupContent)},o.createElement(E.l,{siteType:r,onLogout:()=>{n&&(n(),a())},userInfo:t,configs:{enableProfileFindMyBooking:i}})))},NavigationProfileButton=({userInfo:e,siteType:t,onLoginClick:a,currentUrl:u,isMinifyLogin:h,onLogout:g,style:b,isLoading:v,isMobile:f,className:x})=>{let{isWinCashBackTheme:y}=(0,o.useContext)(k),{t:w}=(0,d.u)(),[E,z]=(0,o.useState)(!1),$=(null==e?void 0:e.name)||(null==e?void 0:e.username),{containerRef:T,onContainerFocus:I,onContainerBlur:j,onButtonMouseDown:P,onClose:D}=useCSSFocusPopupHelper(),O=(0,o.useMemo)(()=>f&&"helloSites"===t,[f]);return v?O?o.createElement(l.S,null):o.createElement(s.B,{size:"sm",color:"transparent",loading:!0}):(null==e?void 0:e.id)?o.createElement(o.Fragment,null,o.createElement(B,{ref:T,style:b,tabIndex:0,onBlur:j,onFocus:()=>{var e;I();let t=null===(e=T.current)||void 0===e?void 0:e.querySelector("#navigation-v2 .hhgcomp-navprofilebutton-popup");if(t){let e=t.getBoundingClientRect(),a=e.top,r=`calc(100vh - ${a}px)`;t.setAttribute("style",`max-height: ${r};`)}},className:x},o.createElement("div",{onMouseDown:P},o.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"user-close-icon"},o.createElement("path",{d:"M18 6L6 18M18 18L6 6",stroke:"#3E3F58",strokeWidth:"1.3",strokeLinecap:"round"})),o.createElement(i.A,{size:32,className:"user-avatar",src:null==e?void 0:e.avatar,color:"marryBaby"===t?m.r.mbColors.pink:m.r.colors.secondaryBase,placeholderText:$&&$.length?$[0].toUpperCase():"A"})),o.createElement(ProfilePopup,{dispatchLogout:()=>{D(),z(!0)},isOpen:!1,closePopup:D,siteType:t,userInfo:e})),o.createElement(C.F,{openLogoutPopup:E,onCloseHandler:()=>{document.body.classList.toggle("noscroll",!1),z(!1)},siteType:t,onLogoutHandler:()=>(0,r.a)(void 0,void 0,void 0,function*(){z(!1),document.body.classList.toggle("noscroll",!1),yield g()})})):o.createElement(S,{style:Object.assign({textDecoration:"none"},b),"data-event-category":"Sign Up","data-event-action":"Button Click","data-event-label":u,"data-win-cash-back-theme":y,"data-site-type":t,onClick:a},h?o.createElement(N,null,o.createElement("img",{src:p.C.getAssetPath("lock.png"),className:"avatar",loading:"lazy",alt:"avatar"})):o.createElement(o.Fragment,null,"helloSites"===t&&(O?y?o.createElement(BlueWhiteLogin,{className:"mobile-only",style:{cursor:"pointer"}}):o.createElement("img",{className:"mobile-only",src:p.C.getAssetPath("login.svg"),style:{cursor:"pointer",height:24,width:24}}):o.createElement(s.B,{className:"mobile-only",size:"sm",leftIcon:o.createElement(n.Z,{color:"currentColor",isSolid:!0,size:22}),sx:{paddingLeft:"8px",paddingRight:"12px"},styles:{leftIcon:{marginRight:4}}},w("navigation.loginJoin"))),"marryBaby"===t&&o.createElement("div",{className:"mobile-only",style:{paddingLeft:16}},o.createElement(c.T,{size:"p3",color:m.r.mbColors.pink},w("navigation.loginJoin"))),"marryBaby"===t?o.createElement(s.B,{className:"login-btn",size:"md",leftIcon:o.createElement(n.Z,{color:"currentColor",isSolid:!0,size:22})},w("navigation.loginJoin")):o.createElement(s.B,{className:"login-btn",size:"md",leftIcon:y?o.createElement(UserPlain,null):o.createElement(n.Z,{color:"#595959",isSolid:!0,size:22}),variant:"ghost",color:"#262626"},w("navigation.loginJoin"))))}},riOU:function(e,t,a){a.d(t,{C:function(){return Container}});var r=a("q1tI");let Container=({children:e,className:t,style:a,type:o})=>r.createElement("div",{className:`d76E4SH ${t||""}`,style:a,"data-type":o},e)},"8Qlg":function(e,t,a){a.d(t,{C:function(){return CardAuthor},P:function(){return PopupExpert},a:function(){return PopupDoctor},b:function(){return PopupHospital},c:function(){return ProfileDetailModal},d:function(){return CardAuthor$1}});var r=a("q1tI"),o=a("rCoo"),n=a("dgD7"),l=a("/npG"),i=a("Eso5"),s=a("SPK5"),c=a("mAfZ"),d=a("mYVa"),p=a("Wgwc"),m=a.n(p),u=a("QgiU"),h=a.n(u),g=a("Xmc7"),b=a("3wcI"),v=a("b2V1"),f=a("FHwE"),x=a("WFaC"),y=a("LtSz"),w=a("Ek4F"),E=a("v9p6"),C=a("lLco"),k=a("Q9az"),z=a("qdzI"),$=a("iBNF"),N=a("rBCA"),B=a("IQVP"),S=a("Y12a"),T=a("qEJm"),I=a("2RS2"),j=a("xrdX");let MainText=({children:e,className:t=""})=>r.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>r.createElement("div",{className:`uDcqD-2 ${t}`},e);var P={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:o,className:n="",style:l,onAvatarClick:i,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>r.createElement("div",{className:`${P.container} ${n}`,style:l},r.createElement("div",{className:P.avatarWrapper,onClick:i,"data-event-category":c,"data-event-action":d,"data-event-label":p},r.createElement(y.U,Object.assign({},e)),s&&r.createElement("div",{className:P.avatarIcon},s)),r.createElement("div",{className:`${P.info} ${n}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},o||r.createElement(r.Fragment,null,t&&r.createElement(MainText,null,t),a&&r.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>r.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>r.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>r.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>r.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,o=(0,x._)(e,["children","className"]);return r.createElement("div",Object.assign({className:`pDlsows ${a}`},o),t)};var D=(0,l.k)(()=>({root:{verticalAlign:"bottom"}}));let O=(0,r.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:o,siteType:n,title:l}=(0,r.useContext)(O),{cx:i,classes:s}=D(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return o?r.createElement(v.A,{className:i(s.root,t),siteType:n,role:o,title:l}):null};var M=(0,l.k)(()=>({root:{}}));let F=N.Z.div`
position: fixed;
left: 50%;
width: 343px;
background-color: ${$.r.colors.white};
border-radius: ${$.r.borderRadius};
box-shadow: 0px 0px 4px ${$.r.colors.gray200};
transform: translate(-50%, -50%);
transition: all 0.5s ease-in-out;
${b.M.tdUp} {
width: 750px;
}
&[data-animation='true'] {
transition: all 0.5s ease-in-out;
}
&[data-open='true'] {
z-index: 400;
top: 50%;
opacity: 1;
visibility: visible;
}
&[data-open='false'] {
top: -50%;
}
.popup-content {
${b.M.mbDown} {
display: block;
}
display: flex;
position: relative;
z-index: 111;
height: 100%;
.button-see-more {
margin: 32px 0;
padding: 0;
> * {
display: inline-block;
}
}
.close-button {
position: absolute;
z-index: 100;
top: 10px;
right: 10px;
cursor: pointer;
width: unset;
height: unset;
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
}
.main-info {
padding-bottom: 32px;
background-color: ${$.r.colors.primary50};
border-radius: ${$.r.borderRadius};
.btn-booking {
display: flex;
margin: 12px auto;
}
.avatar-title {
position: relative;
width: 100%;
padding-top: 46px;
text-align: center;
}
}
`,H=N.Z.div`
position: fixed;
z-index: 110;
top: 0;
left: 0;
width: 100%;
height: 100%;
align-items: center;
background: rgba(38, 38, 38, 0.3);
&[data-open='false'] {
display: none;
}
`,A=N.Z.div`
.image-container {
.badge-avatar {
position: absolute;
right: 0;
bottom: 0;
top: 0;
}
}
display: flex;
justify-content: center;
padding-bottom: 15px;
text-align: center;
.profile-image {
width: 100px;
min-width: 100px;
height: 100px;
min-height: 100px;
border-radius: 50%;
object-fit: cover;
}
.badge-avatar {
width: 24px;
height: 24px;
}
`,L=N.Z.div`
position: relative;
z-index: 9;
.specialty {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
padding: 0px 16px;
text-align: center;
.specialty {
justify-content: center;
}
.experience {
padding: 16px 0px 32px;
text-align: left;
.btn-wrapper {
margin-top: 24px;
}
}
p {
max-width: 100%;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
`,_=N.Z.ul`
padding-left: 18px;
li {
list-style-type: disc;
}
`;var Z="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e",R="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3e%3cpath fill='white' stroke='%23E4E8EC' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16'/%3e%3cpath fill='%23FF5331' d='M10.333 7.667V5H7.667v2.667H5v2.667h2.667V13h2.666v-2.666H13V7.667z'/%3e%3c/svg%3e";let PopupDoctor=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,doctorId:o,locale:n,isMobile:l,overwriteProfileProps:i,avatarFallback:s=E.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{var d,p,m;let{t:u}=(0,g.u)(),[h,b]=(0,r.useState)(null),[v,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e&&o&&String(null==h?void 0:h.id)!==String(o)){f(!0);try{b(null),(0,C.c)((0,C.g)(B.tC.GET_DOCTOR_INFO,{doctorId:o,website_url:C.l[n]}),"get").then(e=>{b(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),i))})}catch(e){console.error(e)}f(!1)}},[e,o,null==h?void 0:h.id]);let x=(null==h?void 0:h.experiences)||[],y=(null==h?void 0:h.specialties)||[],N=y.map(e=>(null==e?void 0:e.name)||e).join(" • "),T=x.map(e=>{try{return JSON.parse(e.description)}catch(t){return e.description}}).filter(e=>e.content),renderExperienceText=e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"";return r.createElement(r.Fragment,null,r.createElement(F,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},v||!h?r.createElement(S.L,null):r.createElement("div",{className:"popup-content"},r.createElement("div",{className:"close-button",onClick:t},r.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),r.createElement("div",{className:"main-info"},r.createElement("div",{className:"border-banner"}),r.createElement("div",{className:"avatar-title"},r.createElement(A,null,r.createElement("div",{className:"image-container"},r.createElement("div",{style:{position:"relative"}},r.createElement(w.I,{src:null==h?void 0:h.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),r.createElement("img",{className:"badge-avatar",src:R,alt:"badge",loading:"lazy"})))),r.createElement(L,null,r.createElement(z.T,{size:"s3",weight:"semiBold",className:"full-name"},null==h?void 0:h.name),r.createElement("div",{className:"specialty"},N&&r.createElement(r.Fragment,null,r.createElement(z.T,{size:"p4",color:$.r.colors.gray800},N," • ")),r.createElement("a",{href:(0,C.m)({id:null===(d=null==h?void 0:h.organization)||void 0===d?void 0:d.id,name:null===(p=null==h?void 0:h.organization)||void 0===p?void 0:p.name,slug:null===(m=null==h?void 0:h.organization)||void 0===m?void 0:m.slug,locale:n}),className:"organisation",target:"_blank",rel:"noreferrer"},r.createElement(z.T,{size:"p4",className:"organisation",color:$.r.colors.gray800,style:{textDecoration:"underline"}},null==h?void 0:h.organization.name))))),!l&&r.createElement("div",{className:"btn-wrapper"},r.createElement("a",{href:(0,C.n)({name:h.name,id:h.id,locale:n})},r.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),T&&r.createElement(L,null,r.createElement("div",{className:"experience"},r.createElement(z.T,{weight:"bold",size:"s3",color:$.r.colors.gray800,style:{paddingBottom:16}},u("expert.content.description").toUpperCase()),r.createElement(_,null,T.map((e,t)=>r.createElement("li",{key:t},r.createElement(z.T,{size:"p2"},renderExperienceText(e))))),l?r.createElement("div",{className:"btn-wrapper"},r.createElement("a",{href:(0,C.n)({name:h.name,id:h.id,locale:n})},r.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):r.createElement("a",{href:(0,C.n)({name:h.name,id:h.id,locale:n})},r.createElement(z.T,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":c,"data-event-action":"See Full Doctor Profile","data-event-label":(0,C.k)(n)+(0,C.n)({name:h.name,id:h.id,locale:n})},u("home.seeExpert"))))))),r.createElement(H,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},V=N.Z.div`
position: fixed;
left: 50%;
width: 343px;
background-color: ${$.r.colors.white};
border-radius: ${$.r.borderRadius};
box-shadow: 0px 0px 4px ${$.r.colors.gray200};
transform: translate(-50%, -50%);
transition: all 0.5s ease-in-out;
${b.M.tdUp} {
width: 750px;
}
&[data-animation='true'] {
transition: all 0.5s ease-in-out;
}
&[data-open='true'] {
z-index: 400;
top: 50%;
opacity: 1;
visibility: visible;
}
&[data-open='false'] {
top: -50%;
}
.popup-content {
${b.M.mbDown} {
display: block;
}
display: flex;
position: relative;
z-index: 111;
height: 100%;
.button-see-more {
margin: 32px 0;
padding: 0;
> * {
display: inline-block;
}
}
.close-button {
position: absolute;
z-index: 100;
top: 10px;
right: 10px;
cursor: pointer;
width: unset;
height: unset;
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
}
.main-info {
padding-bottom: 32px;
background-color: ${$.r.colors.primary50};
border-radius: ${$.r.borderRadius};
.avatar-title {
position: relative;
width: 100%;
padding-top: 46px;
text-align: center;
}
}
`,G=N.Z.div`
position: fixed;
z-index: 110;
top: 0;
left: 0;
width: 100%;
height: 100%;
align-items: center;
background: rgba(38, 38, 38, 0.3);
&[data-open='false'] {
display: none;
}
`,W=N.Z.div`
.image-container {
.badge-avatar {
position: absolute;
right: 0;
bottom: 0;
top: 0;
}
}
display: flex;
justify-content: center;
padding-bottom: 15px;
text-align: center;
.profile-image {
width: 100px;
min-width: 100px;
height: 100px;
min-height: 100px;
border-radius: 50%;
object-fit: cover;
}
.badge-avatar {
width: 24px;
height: 24px;
}
`,U=N.Z.div`
position: relative;
z-index: 9;
.specialty {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
padding: 0px 16px;
text-align: center;
.specialty {
justify-content: center;
}
.experience {
padding: 16px 0px 32px;
text-align: left;
.btn-wrapper {
margin-top: 24px;
}
}
p {
max-width: 100%;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
`,q=N.Z.div`
display: flex;
margin-top: 8px;
.bullet-point {
width: 24px;
height: 24px;
}
`;var Y="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%2345A4FF' d='M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12'/%3e%3cpath fill='%232D87F3' d='M24 12a12 12 0 0 0-.128-1.758l-5.077-5.077L5.041 18.958l4.858 4.858c.682.12 1.384.184 2.1.184 6.628 0 12-5.373 12-12Z'/%3e%3cpath fill='white' d='M9.014 17.824 5.04 18.959l1.135-3.973 2.368.47z'/%3e%3cpath fill='%23F7F9FC' d='M8.544 15.456 5.041 18.96l3.972-1.135z'/%3e%3cpath fill='%23E4E8EC' d='M6.467 18.552 5.45 17.533l-.41 1.427 1.426-.407Z'/%3e%3cpath fill='%23D2D6DC' d='m5.957 18.043-.916.916 1.426-.407z'/%3e%3cpath fill='%23FFD658' d='m15.828 5.331 2.837 2.837-9.651 9.652-2.838-2.837z'/%3e%3cpath fill='%23FFC326' d='m7.594 16.404 9.651-9.651 1.419 1.418-9.652 9.652z'/%3e%3cpath fill='%23FF5331' d='m18.312 8.525-2.837-2.838 1.123-1.123c.44-.44 1.154-.44 1.595 0l1.243 1.243c.44.44.44 1.154 0 1.594z'/%3e%3cpath fill='%23F44D2C' d='m18.816 5.186-1.921 1.92 1.418 1.419 1.124-1.124c.44-.44.44-1.154 0-1.594l-.622-.621Z'/%3e%3c/svg%3e";let X={author:Y,edtior:Y,expert:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='12' fill='%23FFCB37'/%3e%3ccircle cx='12' cy='12' r='10.5' fill='%23FE921D'/%3e%3cpath fill='white' d='M11.443 5.137a.6.6 0 0 1 1.114 0l1.436 3.577a.6.6 0 0 0 .516.375l3.846.26a.6.6 0 0 1 .344 1.06l-2.958 2.471a.6.6 0 0 0-.197.607l.94 3.738a.6.6 0 0 1-.9.655l-3.265-2.05a.6.6 0 0 0-.638 0l-3.265 2.05a.6.6 0 0 1-.9-.655l.94-3.738a.6.6 0 0 0-.198-.607L5.3 10.41a.6.6 0 0 1 .344-1.06l3.846-.26a.6.6 0 0 0 .517-.375z'/%3e%3c/svg%3e","fact-check":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%2300C076' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m11.946 5.466-5.28 4.8-2.4-2.182'/%3e%3c/svg%3e",medical:R},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:o,enableAnimation:n=!0,expertId:l,overwriteProfileProps:i,avatarFallback:s=E.C.getAssetPath("avatar.jpg")})=>{let{t:c}=(0,g.u)(),[d,p]=(0,r.useState)(null),[m,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(a&&l&&String(null==d?void 0:d.user_id)!==String(l)){u(!0);try{p(null),(0,C.c)((0,C.o)(B.D9.GET_EXPERT_BY_ID,{id:l}),"get").then(e=>{p(Object.assign(Object.assign({},null==e?void 0:e.data),i))})}catch(e){console.error(e)}u(!1)}},[a,l,null==d?void 0:d.user_id]),r.createElement(r.Fragment,null,r.createElement(V,{"data-open":a,"data-animation":n,onClick:e=>e.stopPropagation()},m||!d?r.createElement(S.L,null):r.createElement("div",{className:"popup-content"},r.createElement("div",{className:"close-button",onClick:o},r.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),r.createElement("div",{className:"main-info"},r.createElement("div",{className:"border-banner"}),r.createElement("div",{className:"avatar-title"},r.createElement(W,null,r.createElement("div",{className:"image-container"},r.createElement("div",{style:{position:"relative"}},r.createElement(w.I,{src:null==d?void 0:d.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),r.createElement("img",{className:"badge-avatar",src:X[null==d?void 0:d.role],alt:"badge",loading:"lazy"})))),r.createElement(U,null,r.createElement(z.T,{size:"s3",className:"full-name",weight:"semiBold"},null==d?void 0:d.display_name),r.createElement("div",null,r.createElement(z.T,{size:"p4",color:$.r.colors.gray800},null==d?void 0:d.specialty," • "),r.createElement("a",{href:null==d?void 0:d.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},r.createElement(z.T,{size:"p4",className:"organisation",color:$.r.colors.gray800,style:{textDecoration:"underline"}},null==d?void 0:d.organisation)))))),r.createElement(U,null,r.createElement("div",{className:"experience"},r.createElement(z.T,{weight:"bold",size:"p4",color:$.r.colors.gray800,style:{paddingBottom:16}},c("expert.content.description").toUpperCase()),r.createElement("div",{className:"list-items"},null!=d&&!!d.experiences&&d.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>r.createElement(q,{key:t},r.createElement("img",{className:"bullet-point",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e",alt:"point",loading:"lazy"}),r.createElement("div",{className:"text-contain"},r.createElement(T.H,{tag:"h6",color:$.r.colors.gray800},null==e?void 0:e.title),r.createElement(z.T,{size:"p2",color:$.r.colors.gray500},null==e?void 0:e.organization))))),r.createElement("a",{href:null==d?void 0:d.profile_url,style:{display:"inline-block",paddingTop:24}},r.createElement(z.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,C.k)(t)+(null==d?void 0:d.profile_url)},c("home.seeExpert"))))))),r.createElement(G,{"data-open":a,onClick:e=>{e.stopPropagation(),o()}}))},J=N.Z.div`
position: fixed;
left: 50%;
width: 343px;
background-color: ${$.r.colors.white};
border-radius: ${$.r.borderRadius};
box-shadow: 0px 0px 4px ${$.r.colors.gray200};
transform: translate(-50%, -50%);
transition: all 0.5s ease-in-out;
${b.M.tdUp} {
width: 750px;
}
&[data-animation='true'] {
transition: all 0.5s ease-in-out;
}
&[data-open='true'] {
z-index: 400;
top: 50%;
opacity: 1;
visibility: visible;
}
&[data-open='false'] {
top: -50%;
}
.popup-content {
${b.M.mbDown} {
display: block;
}
display: flex;
position: relative;
z-index: 111;
height: 100%;
.button-see-more {
margin: 32px 0;
padding: 0;
> * {
display: inline-block;
}
}
.close-button {
position: absolute;
z-index: 100;
top: 10px;
right: 10px;
cursor: pointer;
width: unset;
height: unset;
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
}
.main-info {
padding-bottom: 32px;
background-color: ${$.r.colors.primary50};
border-radius: ${$.r.borderRadius};
.btn-booking {
display: flex;
margin: 12px auto;
}
.avatar-title {
position: relative;
width: 100%;
padding-top: 46px;
text-align: center;
}
}
`,Q=N.Z.div`
position: fixed;
z-index: 110;
top: 0;
left: 0;
width: 100%;
height: 100%;
align-items: center;
background: rgba(38, 38, 38, 0.3);
&[data-open='false'] {
display: none;
}
`,K=N.Z.div`
.image-container {
.badge-avatar {
position: absolute;
right: 0;
bottom: 0;
top: 0;
}
}
display: flex;
justify-content: center;
padding-bottom: 15px;
text-align: center;
.profile-image {
width: 100px;
min-width: 100px;
height: 100px;
min-height: 100px;
border-radius: 50%;
object-fit: cover;
}
.badge-avatar {
width: 24px;
height: 24px;
}
`,ee=N.Z.div`
position: relative;
z-index: 9;
.specialty {
display: block;
min-width: 240px;
}
padding: 0px 16px;
text-align: center;
.specialty {
justify-content: center;
}
.experience {
padding: 16px 0px 32px;
text-align: left;
.btn-wrapper {
margin-top: 24px;
}
}
p {
max-width: 100%;
}
`,PopupHospital=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,hospitalId:o,locale:n,isMobile:l,overwriteProfileProps:i,avatarFallback:s=E.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{let{t:d}=(0,g.u)(),[p,m]=(0,r.useState)(null),[u,h]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e&&o&&String(null==p?void 0:p.id)!==String(o)){h(!0);try{m(null),(0,C.c)((0,C.g)(B.tC.GET_HOSPITAL_INFO,{hospital_branch_id:o,website_url:C.l[n]}),"get").then(e=>{m(Object.assign(Object.assign({},null==e?void 0:e._data.branch),i))})}catch(e){console.error(e)}h(!1)}},[e,o,null==p?void 0:p.id]);let b=(null==p?void 0:p.specialties)||[],v=(0,r.useMemo)(()=>b.map(e=>e.name),[b]);return r.createElement(r.Fragment,null,r.createElement(J,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},u||!p?r.createElement(S.L,null):r.createElement("div",{className:"popup-content"},r.createElement("div",{className:"close-button",onClick:t},r.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),r.createElement("div",{className:"main-info"},r.createElement("div",{className:"border-banner"}),r.createElement("div",{className:"avatar-title"},r.createElement(K,null,r.createElement("div",{className:"image-container"},r.createElement("div",{style:{position:"relative"}},r.createElement(w.I,{src:null==p?void 0:p.logo,className:"profile-image",alt:"avatar",backupSrc:s}),r.createElement("img",{className:"badge-avatar",src:R,alt:"badge",loading:"lazy"})))),r.createElement(ee,null,r.createElement(z.T,{size:"s3",weight:"semiBold",className:"full-name"},null==p?void 0:p.name),r.createElement("div",{className:"specialty"},b&&r.createElement(z.T,{size:"p4",color:$.r.colors.gray800},v.join(" • "),"•"),r.createElement("a",{href:(0,C.m)({id:p.id,name:p.name,slug:p.slug,locale:n}),className:"organisation",target:"_blank",rel:"noreferrer"},r.createElement(z.T,{size:"p4",className:"organisation",color:$.r.colors.gray800,style:{textDecoration:"underline"}},null==p?void 0:p.name))))),!l&&r.createElement("a",{href:(0,C.m)({id:p.id,name:p.name,slug:p.slug,locale:n})},r.createElement("div",{className:"btn-wrapper"},r.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment"))))),r.createElement(ee,null,r.createElement("div",{className:"experience"},r.createElement(z.T,{weight:"bold",size:"s3",color:$.r.colors.gray800,style:{paddingBottom:16}},d("hospital.content.description").toUpperCase()),r.createElement(z.T,{size:"p2",color:$.r.colors.gray500},p.about),l?r.createElement("a",{href:(0,C.m)({id:p.id,name:p.name,slug:p.slug,locale:n})},r.createElement("div",{className:"btn-wrapper"},r.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment")))):r.createElement("a",{href:(0,C.m)({id:p.id,name:p.name,slug:p.slug,locale:n})},r.createElement(z.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":c,"data-event-action":"See Full Hospital Profile","data-event-label":(0,C.k)(n)+(0,C.m)({id:p.id,name:p.name,slug:p.slug,locale:n})},d("home.seeHospital"))))))),r.createElement(Q,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:o})=>{let{t:n}=(0,g.u)();return r.createElement(I.M,Object.assign({title:n("profilePanel.modal.heading"),titleProps:!0,className:"_2UKyiK1",opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",transitionProps:{transition:"slide-left"},styles:{header:{borderBottom:0},inner:{padding:0,justifyContent:"flex-end"},modal:{height:"100%",borderRadius:0},body:{maxHeight:"100%"},content:{maxHeight:"100%",height:"100%",borderRadius:0}}},o),a)};m().extend(h());let CardAuthor=e=>{let{className:t="",community:l,name:p,username:m,url:u,avatar:h,role:x,title:y,userType:k="user",expertId:z,specialty:N,organisation:B,isMarryBaby:S,doctorId:T,hospitalId:I,hasQuickBooking:P,handleMakeAppointment:D,communityTrackingAttr:F,isAnonymous:H,showDetailPopup:A,showChatbotButton:L=!1,subLine:_,authActionWrapper:Z,profileProps:R,profileModalProps:V,extendEle:G,avatarProps:W,hideInfo:U,timeText:q,onCloseFromPost:Y,onChatWithBot:X,avatarIcon:J,badgeIconSize:Q,hideBackground:K,children:ee,styles:et,dataEventCategory:ea,dataEventAction:er,dataEventLabel:eo}=e,{data:{locale:en,router:el,env:{isMarryBaby:ei,togetherBasePath:es}}}=(0,r.useContext)(C.T),{isMobile:ec}=(0,w.u)(),{t:ed}=(0,g.u)(),{classes:ep}=M(void 0,{name:"CardAuthor",styles:et}),em="boolean"==typeof S?S:ei,eu=em?"marryBaby":"helloSites",eh=H?ed("cardPost.anonymous"):p||m||"",eg=H?E.C.getAssetPath("avatar.jpg"):h,eb=H?void 0:x,[ev,ef]=(0,r.useState)(!1),{asPath:ex}=el||{},ey=`https://${j.v[en]}${ex}`,onAuthorClick=()=>{if(H)return!1;A?eE(!0):u&&(window.location.href=u)};(0,r.useEffect)(()=>{(0,b.t)(ev)},[ev]);let[ew,eE]=(0,r.useState)(!1),eC=(null==e?void 0:e.role)==="expert",ek=!!(T||I),ez=["expert"===eb&&B&&r.createElement("span",null,B),"expert"===eb&&N&&r.createElement("span",null,N),!("expert"===eb&&N&&B)&&(null==l?void 0:l.name)&&r.createElement("a",Object.assign({href:(null==l?void 0:l.slug)&&l.isActive&&!l.isHidden?`${es}/${null==l?void 0:l.slug}/`:void 0,className:"author-community-name"},F),`${null==l?void 0:l.name}`),q&&r.createElement("span",null,q)].filter(Boolean),[e$,eN]=(0,r.useState)(null);return(0,r.useEffect)(()=>{ew&&!e$&&("chatbot"===k?Promise.all([a.e(5231),a.e(7797),a.e(5454),a.e(106),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(7747),a.e(4447),a.e(2582),a.e(6509),a.e(8674),a.e(9301),a.e(7884),a.e(137),a.e(4414),a.e(7613),a.e(8098),a.e(3416),a.e(2500),a.e(1570),a.e(3506),a.e(1413)]).then(a.bind(a,"lBlf")).then(e=>{eN(()=>e.ProfileChatbot)}):Promise.all([a.e(9409),a.e(6259),a.e(1818),a.e(7519),a.e(761),a.e(2189),a.e(5231),a.e(7797),a.e(5454),a.e(106),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(7747),a.e(4447),a.e(2582),a.e(6509),a.e(8674),a.e(9301),a.e(7884),a.e(137),a.e(4414),a.e(7613),a.e(8098),a.e(3416),a.e(2500),a.e(1570),a.e(3506),a.e(1413)]).then(a.bind(a,"aUqw")).then(e=>{eN(()=>e.ProfileDetail)}))},[ew,k]),r.createElement(O.Provider,{value:{displayName:eh,title:y,role:eb,siteType:eu,handleMakeAppointment:D,doctorId:T,hospitalId:I,currentUrl:ey}},r.createElement(ProfileDetailModal,{open:ew,onClose:()=>eE(!1),profileModalProps:V},e$&&r.createElement(e$,Object.assign({currentPageUrl:eo,authActionWrapper:Z,onCloseFromPost:()=>{eE(!1),null==Y||Y()},onChatWithBot:X},R,{authorProps:Object.assign({userId:null==e?void 0:e.userId,avatar:eg,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title,doctorId:T,hospitalId:I,hasQuickBooking:P,userType:k},null==R?void 0:R.authorProps)}))),"expert"===eb&&z?r.createElement(PopupExpert,{isOpen:ev,onClose:()=>ef(!1),expertId:z}):null,"expert"===eb&&T?r.createElement(PopupDoctor,{isOpen:ev,onClose:()=>ef(!1),doctorId:T,locale:en}):null,"expert"===eb&&I?r.createElement(PopupHospital,{isOpen:ev,onClose:()=>ef(!1),hospitalId:I,locale:en}):null,r.createElement("div",{className:`hhg-card-author ${ep.root} ${t} ${eC?"expert-author":""}`,"data-background":!K&&eC,"data-is-marrybaby":em},r.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:er,dataEventLabel:eo,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:H?E.C.getAssetPath(em?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eg,username:eh},W),{style:{cursor:!H&&(u||A)?"pointer":"default"}}),avatarIcon:J||eC&&r.createElement(o.Z,{size:Q||15})},ee?r.createElement("div",{onClick:onAuthorClick},ee):!U&&r.createElement(CardAuthor$1.Row,null,r.createElement(CardAuthor$1.ColLeft,null,r.createElement(s.k,{align:"center",onClick:onAuthorClick},r.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},eh,"chatbot"===k?r.createElement(r.Fragment,null," ",r.createElement(n.Z,{color:$.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),L&&r.createElement("div",{style:{marginTop:"8px"}},r.createElement(c.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:r.createElement(f.I.App,{size:16}),onClick:()=>{null==X||X()}},ed("chatbot.with.me")))):r.createElement(AuthorBadgeItem,null))),_||r.createElement(CardAuthor$1.SubTextRow,{style:P?{position:"relative"}:{}},ez.map((e,t)=>r.createElement(r.Fragment,null,0!==t&&r.createElement(CardAuthor$1.SubDivider,null),r.createElement(CardAuthor$1.SubText,null,e))),P&&ek&&r.createElement(i.x,{sx:{marginTop:(0,d.h)(5)}},r.createElement(v.B,{bookingId:T||I,bookingType:T?"doctor":I?"hospital":void 0,size:ec?"xs":"sm"})))))),G&&G))};CardAuthor.MainText=CardAuthor$1.MainText,CardAuthor.SubText=CardAuthor$1.SubText,CardAuthor.SubTextRow=CardAuthor$1.SubTextRow,CardAuthor.SubDivider=CardAuthor$1.SubDivider,CardAuthor.AuthorBadge=AuthorBadgeItem,CardAuthor.DisplayName=()=>{let{displayName:e}=(0,r.useContext)(O);return r.createElement(i.x,null,e)}},zTM9:function(e,t,a){a.d(t,{C:function(){return n},F:function(){return l},G:function(){return GlobalTextStyleNew},T:function(){return TemplateProvider},a:function(){return c},u:function(){return useTemplateVariant}});var r,o,n,l,i=a("mYVa"),s=a("q1tI");(r=n||(n={})).LEADGEN="leadgen",r.NONE="none",(o=l||(l={}))[o.regular=400]="regular",o[o.halfBold=500]="halfBold",o[o.semiBold=600]="semiBold",o[o.bold=700]="bold";let c={[n.NONE]:{fontSize:{base:[(0,i.h)(16),(0,i.h)(16)],lg:[(0,i.h)(18),(0,i.h)(16)],md:[(0,i.h)(18),(0,i.h)(16)],sm:[(0,i.h)(16),(0,i.h)(14)],xs:[(0,i.h)(14),(0,i.h)(12)],s1:[(0,i.h)(22),(0,i.h)(18)],s2:[(0,i.h)(18),(0,i.h)(16)],s3:[(0,i.h)(16),(0,i.h)(14)],s4:[(0,i.h)(14),(0,i.h)(12)],s5:[(0,i.h)(12),(0,i.h)(12)],p1:[(0,i.h)(18),(0,i.h)(16)],p2:[(0,i.h)(16),(0,i.h)(16)],p3:[(0,i.h)(16),(0,i.h)(14)],p4:[(0,i.h)(14),(0,i.h)(12)],p5:[(0,i.h)(12),(0,i.h)(12)],c1:[(0,i.h)(16),(0,i.h)(14)],c2:[(0,i.h)(14),(0,i.h)(12)],n1:[(0,i.h)(12),(0,i.h)(12)],label1:[(0,i.h)(14),(0,i.h)(14)],label2:[(0,i.h)(12),(0,i.h)(12)],h1:[(0,i.h)(40),(0,i.h)(26)],h2:[(0,i.h)(32),(0,i.h)(24)],h3:[(0,i.h)(26),(0,i.h)(20)],h4:[(0,i.h)(22),(0,i.h)(18)],h5:[(0,i.h)(18),(0,i.h)(16)],h6:[(0,i.h)(16),(0,i.h)(14)],title1:[(0,i.h)(17),(0,i.h)(17)],title2:[(0,i.h)(15),(0,i.h)(15)]},lineHeight:{base:[(0,i.h)(24),(0,i.h)(24)],lg:[(0,i.h)(32),(0,i.h)(28)],md:[(0,i.h)(32),(0,i.h)(28)],sm:[(0,i.h)(24),(0,i.h)(22)],xs:[(0,i.h)(24),(0,i.h)(18)],s1:[(0,i.h)(32),(0,i.h)(26)],s2:[(0,i.h)(28),(0,i.h)(24)],s3:[(0,i.h)(24),(0,i.h)(24)],s4:[(0,i.h)(22),(0,i.h)(18)],s5:[(0,i.h)(18),(0,i.h)(18)],p1:[(0,i.h)(28),(0,i.h)(28)],p2:[(0,i.h)(24),(0,i.h)(24)],p3:[(0,i.h)(24),(0,i.h)(22)],p4:[(0,i.h)(22),(0,i.h)(18)],c1:[(0,i.h)(24),(0,i.h)(22)],c2:[(0,i.h)(22),(0,i.h)(18)],n1:[(0,i.h)(18),(0,i.h)(18)],label1:[(0,i.h)(22),(0,i.h)(22)],label2:[(0,i.h)(18),(0,i.h)(18)],h1:[(0,i.h)(52),(0,i.h)(34)],h2:[(0,i.h)(42),(0,i.h)(32)],h3:[(0,i.h)(36),(0,i.h)(26)],h4:[(0,i.h)(32),(0,i.h)(26)],h5:[(0,i.h)(28),(0,i.h)(24)],h6:[(0,i.h)(24),(0,i.h)(22)],title1:[(0,i.h)(24),(0,i.h)(24)],title2:[(0,i.h)(24),(0,i.h)(24)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.2,-.2],p2:[0,-.2],p3:[0,-.2],p4:[-.2,0],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.8,-.7],h4:[-.6,-.6],h5:[-.2,-.2],h6:[0,-.2],title1:[-.4,-.4],title2:[-.3,-.3]},fontWeightBySize:{s1:l.semiBold,s2:l.semiBold,s3:l.semiBold,s4:l.semiBold,h1:l.bold,h2:l.bold,h3:l.bold,h4:l.bold,h5:l.bold,h6:l.bold},fontWeight:l},[n.LEADGEN]:{fontSize:{base:[(0,i.h)(16),(0,i.h)(16)],lg:[(0,i.h)(18),(0,i.h)(16)],md:[(0,i.h)(18),(0,i.h)(16)],sm:[(0,i.h)(16),(0,i.h)(14)],xs:[(0,i.h)(14),(0,i.h)(12)],s1:[(0,i.h)(22),(0,i.h)(18)],s2:[(0,i.h)(18),(0,i.h)(16)],s3:[(0,i.h)(16),(0,i.h)(14)],s4:[(0,i.h)(14),(0,i.h)(12)],s5:[(0,i.h)(12),(0,i.h)(12)],p1:[(0,i.h)(17),(0,i.h)(17)],p2:[(0,i.h)(15),(0,i.h)(15)],p3:[(0,i.h)(13),(0,i.h)(13)],p4:[(0,i.h)(14),(0,i.h)(12)],p5:[(0,i.h)(12),(0,i.h)(12)],c1:[(0,i.h)(12),(0,i.h)(12)],c2:[(0,i.h)(11),(0,i.h)(11)],n1:[(0,i.h)(12),(0,i.h)(12)],label1:[(0,i.h)(14),(0,i.h)(14)],label2:[(0,i.h)(12),(0,i.h)(12)],h1:[(0,i.h)(40),(0,i.h)(26)],h2:[(0,i.h)(32),(0,i.h)(24)],h3:[(0,i.h)(26),(0,i.h)(22)],h4:[(0,i.h)(22),(0,i.h)(20)],h5:[(0,i.h)(18),(0,i.h)(16)],h6:[(0,i.h)(16),(0,i.h)(14)],title1:[(0,i.h)(17),(0,i.h)(17)],title2:[(0,i.h)(15),(0,i.h)(15)],overline:[(0,i.h)(11),(0,i.h)(11)],subText:[(0,i.h)(10),(0,i.h)(10)]},lineHeight:{base:[(0,i.h)(24),(0,i.h)(24)],lg:[(0,i.h)(32),(0,i.h)(28)],md:[(0,i.h)(32),(0,i.h)(28)],sm:[(0,i.h)(24),(0,i.h)(22)],xs:[(0,i.h)(24),(0,i.h)(18)],s1:[(0,i.h)(32),(0,i.h)(26)],s2:[(0,i.h)(28),(0,i.h)(24)],s3:[(0,i.h)(24),(0,i.h)(24)],s4:[(0,i.h)(22),(0,i.h)(18)],s5:[(0,i.h)(18),(0,i.h)(18)],p1:[(0,i.h)(28),(0,i.h)(28)],p2:[(0,i.h)(24),(0,i.h)(24)],p3:[(0,i.h)(20),(0,i.h)(20)],p4:[(0,i.h)(22),(0,i.h)(18)],c1:[(0,i.h)(16),(0,i.h)(16)],c2:[(0,i.h)(22),(0,i.h)(18)],n1:[(0,i.h)(18),(0,i.h)(18)],label1:[(0,i.h)(22),(0,i.h)(22)],label2:[(0,i.h)(18),(0,i.h)(18)],h1:[(0,i.h)(48),(0,i.h)(34)],h2:[(0,i.h)(40),(0,i.h)(32)],h3:[(0,i.h)(32),(0,i.h)(32)],h4:[(0,i.h)(32),(0,i.h)(28)],h5:[(0,i.h)(28),(0,i.h)(24)],h6:[(0,i.h)(24),(0,i.h)(22)],title1:[(0,i.h)(24),(0,i.h)(24)],title2:[(0,i.h)(24),(0,i.h)(24)],overline:[(0,i.h)(12),(0,i.h)(12)],subText:[(0,i.h)(12),(0,i.h)(12)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.4,-.4],p2:[-.3,-.3],p3:[-.3,-.3],p4:[-.2,0],c1:[-.2,-.2],c2:[-.2,-.2],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.6,-.6],h4:[-.6,-.4],h5:[-.2,-.2],h6:[0,-.2],n1:[-.2,-.2],title1:[-.4,-.4],title2:[-.3,-.3],overline:[-.2,-.2],subText:[-.2,-.2]},fontWeightBySize:{s1:l.semiBold,s2:l.semiBold,s3:l.semiBold,s4:l.semiBold,h1:l.bold,h2:l.bold,h3:l.bold,h4:l.bold,h5:l.bold,h6:l.bold},fontWeight:l}},GlobalTextStyleNew=e=>({[n.LEADGEN]:{h1:{fontSize:(0,i.h)(40),lineHeight:(0,i.h)(48),letterSpacing:"-1.2px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(26),lineHeight:(0,i.h)(32),letterSpacing:"-0.6px"}},h2:{fontSize:(0,i.h)(32),lineHeight:(0,i.h)(40),letterSpacing:"-1px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(20),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"}},h3:{fontSize:(0,i.h)(26),lineHeight:(0,i.h)(32),letterSpacing:"-0.6px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(20),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"}},p1:{fontSize:(0,i.h)(17),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"},p2:{fontSize:(0,i.h)(15),lineHeight:(0,i.h)(24),letterSpacing:"-0.3px"}}}),d=(0,s.createContext)(n.NONE),TemplateProvider=({variant:e=n.NONE,children:t})=>s.createElement(d.Provider,{value:e},t),useTemplateVariant=()=>(0,s.useContext)(d)},hZTu:function(e,t,a){a.d(t,{T:function(){return Text}});var r=a("WFaC"),o=a("q1tI"),n=a("qdzI");let Text=e=>{var{size:t="base",type:a="regular"}=e,l=(0,r._)(e,["size","type"]);return o.createElement(n.T,Object.assign({size:t,weight:"caption"===a?"bold":a,"data-size":t,"data-type":a,"data-word-wrap":l.wordWrap,"data-is-uppercase":l.isUppercase},l))}},Fqwe:function(e,t,a){a.d(t,{S:function(){return o}});var r=a("2wr/");let o=r.r},AKzr:function(e,t,a){a.d(t,{B:function(){return BtnChoice}});var r=a("q1tI"),o=a("/bt/"),n=a("rBCA");let l=n.Z.div`
display: flex;
align-items: center;
gap: 8px;
button[data-color='tertiary'] {
background: white;
}
`,BtnChoice=({value:e,choices:t,className:a,onChange:n})=>{let[i,s]=(0,r.useState)(e);return(0,r.useEffect)(()=>{s(e)},[e]),r.createElement(l,{className:a},t.map((e,t)=>r.createElement(o.B,{dataEventCategory:e.dataEventCategory,dataEventAction:e.dataEventAction,dataEventLabel:e.dataEventLabel,size:"sm",variant:e.value===i?"primary":"tertiary",className:e.value===i?"btn-choice-selected":"",key:t,onClick:()=>{s(e.value),null==n||n(e.value)}},e.label||"")))}},R7cM:function(e,t,a){a.d(t,{D:function(){return Dropdown}});var r=a("q1tI"),o=a("8vDj"),n=a("rBCA"),l=a("iBNF");let i=n.Z.div`
--dropdown-padding: 12px 18px 12px 16px;
position: relative;
box-sizing: border-box;
border: 1px solid ${l.r.colors.gray200};
background: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")
no-repeat;
background-position: right 16px center;
border-radius: ${l.r.borderRadius};
&[data-disabled='true'],
:disabled {
background-color: #f2f2f2;
cursor: not-allowed;
}
&[data-size='sm'] {
font-size: 13px;
line-height: 20px;
}
&[data-size='md'] {
font-size: 14px;
line-height: 21px;
}
&[data-size='lg'] {
font-size: 16px;
line-height: 24px;
}
&[data-has-icons='true'] {
border: none;
background: ${l.r.colors.gray100};
img,
svg {
display: inline-block;
max-width: 16px;
margin-right: 6px;
}
span {
display: inline-block;
vertical-align: middle;
}
&:hover {
box-shadow: none;
}
> div {
position: relative;
display: flex;
width: 100%;
box-sizing: border-box;
align-items: center;
}
> div::after {
position: absolute;
top: 50%;
right: 12px;
width: 10px;
height: 8px;
background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
background-repeat: no-repeat;
content: '';
transform: translateY(-50%);
}
}
&:hover {
box-shadow: 0 0 2px 2px ${e=>e.shadowColor};
}
&[data-is-native='true'] {
padding: var(--dropdown-padding);
line-height: 24px;
&:focus {
box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor};
}
}
`,s=n.Z.div`
padding: var(--dropdown-padding);
cursor: pointer;
&.with-label {
padding-top: 34px;
padding-bottom: 12px;
}
&[data-dropdown-open] {
padding: 11px 15px 11px 15px;
border: 1px solid ${e=>e.color};
border-radius: ${l.r.borderRadius};
box-shadow: 0 0 2px 2px ${e=>e.shadowColor};
}
`,c=n.Z.ul`
position: absolute;
top: 100%;
/* right: 0; */
min-width: 100%;
left: 0;
display: block;
margin-top: 4px;
background: ${l.r.colors.white};
border-radius: ${l.r.borderRadius};
box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),
-2px 2px 5px rgba(67, 86, 100, 0.123689);
cursor: pointer;
&[data-has-icons='true'] {
border: 1px solid ${l.r.colors.gray200};
background: white;
box-shadow: none;
filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04));
}
`,d=n.Z.li`
display: flex;
padding: 12px 18px 12px 16px;
&[data-disabled='true'] {
cursor: not-allowed;
color: #bfbfbf;
& > * {
pointer-events: none;
}
}
&:hover,
:active {
background: ${l.r.colors.gray100};
}
`,p=n.Z.div`
max-width: 16px;
margin-right: 8px;
`,m=n.Z.div`
position: absolute;
top: 12px;
left: 16px;
pointer-events: none;
`,Dropdown=({className:e,value:t,options:a,onChange:n=()=>void 0,id:l,placeholderIcon:u,placeholder:h,style:g,size:b="lg",groupedWithLabel:v,disabled:f,dropdownLabelTrackingAttributes:x={},isNativeSelect:y=!1})=>{let w=(0,o.rZ)(),[E,C]=r.useState(!1),showDropdown=()=>!f&&C(!E);if(y){let e="object"==typeof(null==t?void 0:t.value)&&t.value instanceof Date?t.value.toString():null==t?void 0:t.value;return r.createElement(i,{color:w.fn.primaryColor(),shadowColor:w.colors[w.primaryColor][2],as:"select","data-is-native":"true",value:e||void 0,disabled:f,onChange:e=>{if("string"==typeof e.target.value){let t=a.find(t=>t.value===e.target.value);t&&n(t)}}},h&&r.createElement("option",{value:h,disabled:!0,selected:!0},h),a.map(e=>r.createElement("option",{key:`${l}-${e.value}`,value:e.value,disabled:!!e.disabled&&e.disabled},e.label)))}return r.createElement(i,{color:w.fn.primaryColor(),shadowColor:w.colors[w.primaryColor][2],className:e,"data-dropdown-open":E||void 0,"data-size":b,id:l,"data-has-icons":!!u,style:g,onBlur:()=>C(!1),tabIndex:0,"data-disabled":f},!!v&&r.createElement(m,null,v),r.createElement(s,Object.assign({color:w.fn.primaryColor(),shadowColor:w.colors[w.primaryColor][2],onClick:showDropdown,className:v&&"with-label"},x),u," ",r.createElement("span",null,t&&t.value?t.label:h)),E&&r.createElement(c,{onClick:showDropdown,"data-has-icons":!!u},a.map(e=>r.createElement(d,{key:`${l}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>!e.disabled&&!f&&(null==n?void 0:n(e)),"data-disabled":!!e.disabled&&e.disabled},e.icon&&r.createElement(p,null,e.icon),e.label))))}},"/bt/":function(e,t,a){a.d(t,{B:function(){return u}});var r=a("WFaC"),o=a("q1tI"),n=a("/npG"),l=a("HC7W"),i=a("8vDj"),s=a("mAfZ"),c=a("rgQD"),d=a("zTM9"),p=(0,n.k)((e,t)=>{var a,r,o,n,i,s;let{other:p}=e,{template:m}=p,{size:u,variant:h,skipHover:g,withColorHover:b,isError:v,isSuccess:f,color:x,gradient:y,children:w,theme:E,customStylesType:C}=t,k="mb"===m||"marryBaby"===E,z=x||(E&&k?"mb":e.primaryColor),$=z.startsWith("#"),N=$?e.fn.lighten(x,.9):(null===(r=null===(a=e.colors)||void 0===a?void 0:a[z])||void 0===r?void 0:r[0])||"",B=$?z:null===(n=null===(o=e.colors)||void 0===o?void 0:o[z])||void 0===n?void 0:n[e.fn.primaryShade()],S=$?e.fn.darken(x,.05):null===(s=null===(i=e.colors)||void 0===i?void 0:i[z])||void 0===s?void 0:s[e.fn.primaryShade()+1],T=C===d.C.LEADGEN;return{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({transition:`all ${c.A} ease-in-out`},y&&Object.assign({border:0,position:"relative"},"secondary"===h&&{"&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"#fff",borderRadius:"inherit"}})),{"&:focus":{outline:"none"}}),T&&{borderRadius:12}),!w&&{paddingLeft:"10px",paddingRight:"10px",".mantine-Button-icon":{margin:0}}),(()=>{switch(u){case"xl":return Object.assign({height:56,fontWeight:T?d.F.halfBold:d.F.semiBold,fontSize:T?"15px":k?"14px":"16px",lineHeight:"24px"},T&&{letterSpacing:"-0.3px"});case"lg":return Object.assign({height:48,fontWeight:T?d.F.halfBold:d.F.semiBold,fontSize:T?"15px":k?"14px":"16px",lineHeight:"24px"},T&&{letterSpacing:"-0.3px"});case"md":return Object.assign({height:40,fontWeight:T?d.F.halfBold:d.F.semiBold,fontSize:T?"13px":"14px",lineHeight:T?"20px":"22px"},T&&{letterSpacing:"-0.3px"});case"sm":return Object.assign(Object.assign({height:32,fontWeight:T?d.F.halfBold:d.F.semiBold,fontSize:T?"11px":k?"12px":"14px",lineHeight:T?"16px":"22px"},T&&{letterSpacing:"-0.2px"}),{paddingLeft:"16px",paddingRight:"16px"});case"xs":return Object.assign({height:24,fontWeight:T?d.F.halfBold:d.F.semiBold,fontSize:T?"11px":"12px",lineHeight:T?"16px":"18px",paddingLeft:"8px",paddingRight:"8px"},T&&{letterSpacing:"-0.2px"})}})()),(()=>{switch(h){case"primary":return Object.assign(Object.assign({color:e.white},y?{backgroundImage:y,backgroundColor:"initial"}:{backgroundColor:B}),!g&&{"&:hover":{backgroundColor:y?"initial":S}});case"secondary":return Object.assign(Object.assign(Object.assign({color:B,backgroundColor:"transparent",border:`1px solid ${B}`},y&&{backgroundImage:y,borderColor:"transparent"}),!g&&!y&&{"&:hover":{backgroundColor:N,border:`1px solid ${B}`}}),b&&!y&&{"&:hover":{backgroundColor:B,border:`1px solid ${B}`,color:"#fff"}});case"white":return{color:B,backgroundColor:"transparent",border:"1px solid transparent","&:hover":{backgroundColor:"transparent",borderColor:"transparent"}};case"tertiary":return{color:e.colors.gray[8],backgroundColor:e.white,border:`1px solid ${e.colors.neutral[2]}`,"&:hover":Object.assign({},g?{backgroundColor:e.white,border:`1px solid ${e.colors.neutral[2]}`}:{backgroundColor:e.colors.neutral[0],border:`1px solid ${e.colors.neutral[0]}`})};case"light":return{color:B,backgroundColor:N,border:"1px solid transparent","&:hover":Object.assign({},g?{backgroundColor:N,border:"1px solid transparent"}:{backgroundColor:e.white,border:`1px solid ${N}`})};case"ghost":return Object.assign({color:B,backgroundColor:"transparent",border:"1px solid transparent"},!g&&{"&:hover":{backgroundColor:N,border:"1px solid transparent"}})}})()),{"&[data-disabled]":{backgroundColor:e.colors.gray[1],color:e.colors.gray[4]}}),v?Object.assign({color:e.colors.red[6],backgroundColor:e.white,border:`1px solid ${e.colors.red[6]}`},!g&&{"&:hover":{backgroundColor:e.colors.red[0],border:`1px solid ${e.colors.red[6]}`}}):{}),f?Object.assign({color:e.colors.green[8],backgroundColor:e.colors.green[0]},!g&&{"&:hover":{backgroundColor:e.colors.green[0]}}):{}),inner:Object.assign({ref:(0,l.A)("inner")},y&&{position:"relative"}),leftIcon:{marginRight:8},rightIcon:{},label:Object.assign({},y&&"secondary"===h&&{background:y,"-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"})}});let m={primary:"filled",secondary:"outline",tertiary:"default",light:"light",ghost:"subtle",error:"outline",white:"white",success:"subtle"},u=(0,o.forwardRef)((e,t)=>{var a,n;let l=(0,i.rZ)(),c=Object.assign(Object.assign({},null===(n=null===(a=l.components)||void 0===a?void 0:a.Button)||void 0===n?void 0:n.defaultProps),function(e){let t={};return Object.keys(e).filter(t=>void 0!==e[t]).forEach(a=>t[a]=e[a]),t}(e)),{variant:u,size:h,color:g,gradient:b,skipHover:v,withColorHover:f,className:x,dataEventCategory:y,dataEventAction:w,dataEventLabel:E,children:C,theme:k,component:z,styles:$,classNames:N}=c,B=(0,r._)(c,["variant","size","color","gradient","skipHover","withColorHover","className","dataEventCategory","dataEventAction","dataEventLabel","children","theme","component","styles","classNames"]),S="error"===u,T=(0,d.u)(),{classes:I,cx:j}=p({variant:u,size:h,color:g,gradient:b,skipHover:v,withColorHover:f,isError:S,isSuccess:"success"===u,children:C,theme:k,customStylesType:T},{name:"ButtonMantine",styles:$,classNames:N});return o.createElement(s.z,Object.assign({component:z,className:j(x,u),classNames:{root:I.root,inner:I.inner,leftIcon:I.leftIcon,rightIcon:I.rightIcon,label:I.label},variant:m[u],"data-variant":u,"data-event-category":y,"data-event-action":w,"data-event-label":E,ref:t,loaderProps:B.disabled?{color:"currentColor"}:void 0},B),C)})},"6Hnu":function(e,t,a){a.d(t,{i:function(){return isVideo}});let isVideo=e=>e.endsWith(".mp4")},ulUm:function(e,t,a){a.d(t,{c:function(){return s}});var r=Object.prototype.toString,o=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,n=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,l=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/;function startIndex(e,t,a){do{var r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++ta;){var r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return a}function decode(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}var s={parse:function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");var a={},r=e.length;if(r<2)return a;var o=t&&t.decode||decode,n=0,l=0,i=0;do{if(-1===(l=e.indexOf("=",n)))break;if(-1===(i=e.indexOf(";",n)))i=r;else if(l>i){n=e.lastIndexOf(";",l-1)+1;continue}var s=startIndex(e,n,l),c=endIndex(e,l,s),d=e.slice(s,c);if(!a.hasOwnProperty(d)){var p=startIndex(e,l+1,i),m=endIndex(e,i,p);34===e.charCodeAt(p)&&34===e.charCodeAt(m-1)&&(p++,m--);var u=e.slice(p,m);a[d]=function(e,t){try{return t(e)}catch(t){return e}}(u,o)}n=i+1}while(n{var{styles:t}=e,a=(0,r._)(e,["styles"]);let s=(0,i.u)(),{classes:c}=(0,l.u)({variantStyle:s},{name:"MantineTextarea",styles:t});return o.createElement(n.g,Object.assign({classNames:{input:c.input},minRows:2,maxRows:4},a))}}}]);