"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[137],{BDnN:function(e,t,a){a.d(t,{D:function(){return DueDateForm},a:function(){return _}});var n,r,l,o,i=a("z/kP"),s=a("q1tI"),c=a("8vDj"),m=a("iuhU"),d=a("DA0W"),u=a("SPK5"),p=a("FQtM"),g=a("Eso5"),h=a("25AQ"),C=a("Mp3Y"),f=a("r9m4"),v=a("cChf"),E=a("ZFu2"),b=a("Wgwc"),x=a.n(b),y=a("FNss"),w=a("ndOt"),P=a("/kWL"),k=a("5kis"),I=a("8PAx"),D=a("fkrl"),M=a("hePw"),S=a("mGnJ"),N=a("iBNF");(n=l||(l={}))[n.lastPeriod=0]="lastPeriod",n[n.conception=1]="conception",n[n.IVF=2]="IVF",n[n.IUI=3]="IUI",n[n.ultrasound=4]="ultrasound";let F={[String(l.lastPeriod)]:{value:String(l.lastPeriod),icon:C.L,label:"dueDatePage.lastPeriod"},[String(l.IVF)]:{value:String(l.IVF),icon:e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let r=Object.assign({width:a,height:a},n);return t?s.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),s.createElement("path",{d:"M15.804 28.278a3.16 3.16 0 0 1-3.18-3.208l.128-20.306 6.405.008-.128 20.307c-.012 1.757-1.452 3.191-3.225 3.2",fill:"#fff"}),s.createElement("path",{d:"m12.72 10.266-.116 14.788c-.011 1.757 1.423 3.197 3.18 3.208 1.774-.008 3.214-1.442 3.225-3.2V10.267",fill:"#FFEAF1"}),s.createElement("circle",{cx:"14.662",cy:"19.027",transform:"rotate(-49.83 14.662 19.027)",fill:"#3E3F58",r:"1.012"}),s.createElement("circle",{cx:"16.326",cy:"13.426",r:"1.012",transform:"rotate(-49.83 16.326 13.426)",fill:"#3E3F58"}),s.createElement("path",{d:"m14.662 19.026.087 1.022a.98.98 0 0 0 .344.667.98.98 0 0 1 .32.98l-.123.51m1.036-8.779.087 1.022a.98.98 0 0 0 .344.666.98.98 0 0 1 .32.98l-.123.511",stroke:"#3E3F58"}),s.createElement("path",{d:"M18.833 27.597a3.94 3.94 0 0 1-3.02 1.408 4 4 0 0 1-2.795-1.148 3.98 3.98 0 0 1-1.14-2.795l.108-20.553c0-.426.344-.756.753-.738.426 0 .757.345.738.754l-.108 20.553c.002.656.248 1.256.697 1.733a2.42 2.42 0 0 0 1.727.706 2.483 2.483 0 0 0 2.47-2.462l.109-20.553c0-.426.344-.757.753-.738.426 0 .757.344.738.754l-.108 20.553a3.85 3.85 0 0 1-.922 2.526",fill:"#202135"}),s.createElement("path",{d:"M20.753 4.975a.75.75 0 0 1-.58.262l-8.714-.027a.727.727 0 0 1-.738-.754c0-.425.344-.756.754-.737l8.713.026c.426 0 .756.344.738.754a.66.66 0 0 1-.173.476",fill:"#202135"})):s.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),s.createElement("path",{d:"M13.064 5.794a17.8 17.8 0 0 1 3.34-4.638l4.26 2.881a17.8 17.8 0 0 0-3.272 4.507l-1.08 2.12a.65.65 0 0 0 .124.76 7.9 7.9 0 0 1 2.296 4.81c.027.265-1.141 5.997-9.376 5.573-1.587-.082-5.724-1.269-6.12-2.86a8 8 0 0 1-.233-2.161c.124-4.165 3.718-7.648 7.884-7.647h.098a.65.65 0 0 0 .59-.36z",fill:"#BCDEFF"}),s.createElement("path",{d:"M20.75 3.234 16.696.496a.886.886 0 1 0-.992 1.469l4.056 2.738a.886.886 0 0 0 .992-1.469",fill:"#E3F2FF"}),s.createElement("path",{d:"M18.771 17.024a7.87 7.87 0 0 1-2.7 5.944A4.2 4.2 0 0 1 13.301 24H8.473a4.2 4.2 0 0 1-2.769-1.03 7.9 7.9 0 0 1-2.468-4.023c.924.468 2.191.805 3.922.805 1.142 0 2.01-.346 2.775-.834q.323-.21.629-.446c1.973-1.516 3.524-3.668 8.17-2.238q.04.39.04.79",fill:"#2D87F3"}),s.createElement("path",{d:"M11.858 15.5c-1.78.348-3.096-1.608-2.134-3.121a2.06 2.06 0 0 1 1.529-.944q.303-.03.588.025a.27.27 0 0 0 .268-.107c.282-.373.737-.573 1.2-.639.224-.031.374-.24.379-.44.021-.794.657-1.311 1.288-1.234.183.022.223.27.058.35l-.012.006a.9.9 0 0 0-.28.196c-.213.263-.187.407-.153.6.03.167.066.37-.04.715a1.45 1.45 0 0 1-.504.7c-.255.19-.445.23-.592.263-.088.019-.16.034-.223.076a.27.27 0 0 0-.07.379c.184.27.306.587.344.934a2.063 2.063 0 0 1-1.646 2.24",fill:"#fff"}),s.createElement("ellipse",{cx:"10",cy:"20.5",rx:"3",ry:"2.5",fill:"#FF6F4D"}))},label:"dueDatePage.ivf"},[String(l.conception)]:{value:String(l.conception),icon:e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let r=Object.assign({width:a,height:a},n);return t?s.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),s.createElement("path",{d:"M16.5 27.133c1.298 0 2.596-.149 3.868-.447a9.15 9.15 0 0 0 6.818-6.818 16.94 16.94 0 0 0 0-7.736 9.15 9.15 0 0 0-6.818-6.818 16.94 16.94 0 0 0-7.736 0 9.15 9.15 0 0 0-6.818 6.818A17 17 0 0 0 5.367 16a.867.867 0 1 1-1.734 0c0-1.43.165-2.862.494-4.264a10.88 10.88 0 0 1 8.109-8.11 18.7 18.7 0 0 1 8.528 0 10.88 10.88 0 0 1 8.11 8.11 18.7 18.7 0 0 1 0 8.528 10.88 10.88 0 0 1-8.11 8.11 18.7 18.7 0 0 1-4.264.493.867.867 0 0 1 0-1.734",fill:"#3E3F58"}),s.createElement("path",{d:"M11.633 16a4.867 4.867 0 1 1 9.734 0 4.867 4.867 0 0 1-9.734 0m4.867-3.133a3.133 3.133 0 1 0 0 6.266 3.133 3.133 0 0 0 0-6.266",fill:"#E85388"}),s.createElement("path",{d:"M9.834 25.333a2.667 2.667 0 1 0-2.298-1.312l-.084.084a3.25 3.25 0 0 0-.952 2.298c0 .726-.41 1.39-1.06 1.715l-1.238.619a.667.667 0 0 0 .596 1.193l1.24-.62a3.25 3.25 0 0 0 1.796-2.907c0-.508.202-.995.561-1.355l.084-.084c.397.235.86.37 1.355.37",fill:"#3E3F58"})):s.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),s.createElement("circle",{cx:"9",cy:"6.75",fill:"#91CAFF",r:"6.75"}),s.createElement("circle",{cx:"9",cy:"6.75",fill:"#2D87F3",r:"5.4"}),s.createElement("path",{d:"M1.789 12.2a.245.245 0 0 1-.02-.489c.073-.006 1.795-.167 1.761-1.605-.013-.587.15-1.057.485-1.397.524-.53 1.273-.528 1.305-.527a.245.245 0 0 1-.002.49h-.002c-.011 0-.582.004-.955.385-.236.24-.351.59-.34 1.038.018.793-.367 1.41-1.114 1.787a3.3 3.3 0 0 1-1.118.319M.75 17.774a.245.245 0 0 1 .226-.263c.073-.006 1.786-.162 1.749-1.593-.016-.586.146-1.055.48-1.392.521-.528 1.27-.524 1.3-.523a.245.245 0 0 1-.006.49c-.015 0-.58.004-.949.38q-.352.362-.335 1.033c.02.791-.362 1.406-1.106 1.78a3.3 3.3 0 0 1-1.095.313.245.245 0 0 1-.263-.225",fill:"#D2D6DC"}),s.createElement("path",{d:"M8.659 5.035c-.562-.561-1.956-.078-2.699.665-.407.407-.635.91-.665 1.373v.124l1.145 1.16.181.042c.464-.03.966-.258 1.373-.665.743-.743 1.226-2.137.665-2.699",fill:"#E3F2FF"}),s.createElement("path",{d:"m5.295 7.073-.292.75a.55.55 0 0 0 .124.589l.155.155a.55.55 0 0 0 .589.124l.75-.292z",fill:"#91CAFF"}),s.createElement("path",{d:"M8.098 11.358a.87.87 0 0 0-.233-.523c-.562-.562-1.956-.079-2.699.664-.407.408-.635.91-.665 1.373v.125l1.146 1.16.18.042c.464-.03.966-.258 1.374-.666.566-.566.98-1.51.897-2.175",fill:"#E3F2FF"}),s.createElement("path",{d:"m4.5 12.872-.29.75a.55.55 0 0 0 .123.589l.156.155a.55.55 0 0 0 .588.124l.75-.292z",fill:"#91CAFF"}))},label:"dueDatePage.conceptionDate"},[String(l.IUI)]:{value:String(l.IUI),icon:e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let r=Object.assign({width:a,height:a},n);return s.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),s.createElement("ellipse",{cx:"10",cy:"7.5",rx:"7.5",ry:"7.5",fill:"#91CAFF"}),s.createElement("ellipse",{cx:"10",cy:"7.5",rx:"6",ry:"6",fill:"#2D87F3"}),s.createElement("path",{d:"M1.98877 13.5566C1.8483 13.5566 1.72914 13.4487 1.71769 13.3062C1.7056 13.1563 1.81732 13.025 1.9672 13.013C2.04819 13.0061 3.96085 12.8267 3.92397 11.2296C3.90887 10.5766 4.09013 10.0544 4.46266 9.6775C5.04496 9.08834 5.87737 9.09055 5.91289 9.09138C6.06324 9.09309 6.18376 9.21636 6.18204 9.36675C6.18033 9.51603 6.05877 9.63593 5.90985 9.63593C5.9091 9.63593 5.90835 9.63593 5.9076 9.63593C5.8958 9.63593 5.26174 9.64041 4.84671 10.0637C4.58418 10.3314 4.4569 10.7194 4.46838 11.2171C4.48874 12.0983 4.06094 12.7846 3.23124 13.202C2.63342 13.5027 2.03606 13.5537 2.01095 13.5558C2.00351 13.5563 1.99611 13.5566 1.98877 13.5566Z",fill:"#D2D6DC"}),s.createElement("path",{d:"M0.834813 19.7487C0.823187 19.5988 0.935297 19.4678 1.08522 19.4562C1.16581 19.4496 3.06971 19.2768 3.02807 17.6868C3.011 17.0352 3.1904 16.5146 3.56121 16.1394C4.14076 15.5531 4.97192 15.5577 5.00687 15.5587C5.15722 15.5608 5.27734 15.6845 5.27516 15.8349C5.27301 15.9849 5.15117 16.106 4.99993 16.1032C4.99989 16.1032 4.99982 16.1032 4.99975 16.1032C4.98315 16.1032 4.35528 16.1074 3.9453 16.5255C3.68491 16.791 3.55946 17.177 3.57245 17.6725C3.59545 18.552 3.17051 19.2358 2.34353 19.6499C1.74807 19.948 1.15233 19.9971 1.12728 19.9991C0.976577 20.0107 0.846367 19.898 0.834813 19.7487Z",fill:"#D2D6DC"}),s.createElement("path",{d:"M9.62226 5.59508C8.99818 4.971 7.44969 5.50769 6.62421 6.33313C6.1713 6.78604 5.91828 7.34408 5.88477 7.85874V7.99721L7.15753 9.28601L7.35857 9.33258C7.87323 9.29906 8.43127 9.04605 8.88418 8.59314C9.70966 7.76766 10.2463 6.21916 9.62226 5.59508Z",fill:"#E3F2FF"}),s.createElement("path",{d:"M5.88516 7.85889L5.5611 8.69259C5.47325 8.91856 5.52723 9.17508 5.69865 9.3465L5.87139 9.51925C5.95823 9.60609 6.06693 9.66256 6.18243 9.68584C6.29486 9.70856 6.4137 9.70005 6.52509 9.65676L7.3588 9.3327L5.88516 7.85889Z",fill:"#91CAFF"}),s.createElement("path",{d:"M8.99894 12.6201C8.97018 12.3889 8.88805 12.1875 8.73945 12.0389C8.11537 11.4149 6.56687 11.9515 5.7414 12.777C5.28849 13.2299 5.03547 13.7879 5.00195 14.3026V14.4411L6.27493 15.7298L6.47597 15.7764C6.99063 15.7429 7.54867 15.4898 8.00158 15.0369C8.63034 14.4081 9.09073 13.3598 8.99894 12.6201Z",fill:"#E3F2FF"}),s.createElement("path",{d:"M5.00235 14.3027L4.67829 15.1364C4.59043 15.3624 4.64441 15.6189 4.81583 15.7904L4.98858 15.9631C5.07542 16.0499 5.18412 16.1064 5.29962 16.1297C5.41205 16.1524 5.53089 16.1439 5.64228 16.1006L6.47598 15.7766L5.00235 14.3027Z",fill:"#91CAFF"}))},label:"dueDatePage.IUI"},[String(l.ultrasound)]:{value:String(l.ultrasound),icon:e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let r=Object.assign({width:a,height:a},n);return s.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),s.createElement("g",{clipPath:"url(#clip0_5646_32454)"},s.createElement("path",{d:"M17.278 1.47119H2.7207C2.03035 1.47119 1.4707 2.03084 1.4707 2.72119V17.2785C1.4707 17.9689 2.03035 18.5285 2.7207 18.5285H17.278C17.9684 18.5285 18.528 17.9689 18.528 17.2785V2.72119C18.528 2.03084 17.9684 1.47119 17.278 1.47119Z",fill:"#65B5FF"}),s.createElement("path",{d:"M11.23 9.94794C12.1285 10.4395 11.7085 11.7187 10.9077 11.7734C10.1386 11.8261 9.79346 11.6067 9.12721 11.1589C8.74409 10.9014 8.11299 9.67872 7.93815 9.36872C7.74008 9.01332 7.58143 8.63733 7.46503 8.24747C7.31862 7.75122 7.71315 7.30122 8.03987 7.31731C8.09475 7.32086 8.14794 7.33765 8.19491 7.36625C8.24188 7.39485 8.28122 7.43441 8.30956 7.48153C8.3227 7.49619 8.33867 7.50803 8.3565 7.51636C8.37433 7.52469 8.39367 7.52933 8.41334 7.53C8.43301 7.53067 8.45261 7.52736 8.47097 7.52027C8.48933 7.51317 8.50607 7.50244 8.52018 7.48872C8.55856 7.44827 8.60864 7.42084 8.66339 7.41028C8.71814 7.39972 8.77482 7.40655 8.82549 7.42981C9.03081 7.56731 8.99503 7.80294 9.13081 8.11544C9.34088 8.4938 9.61306 8.83417 9.93596 9.12231C10.3217 9.44809 10.5785 9.59138 11.23 9.94794Z",fill:"#2B62CD"}),s.createElement("path",{d:"M19.5332 1.54781C19.5129 1.54783 19.4928 1.54386 19.4741 1.53611C19.4553 1.52836 19.4383 1.51699 19.424 1.50265C19.4096 1.48832 19.3982 1.47129 19.3904 1.45255C19.3827 1.43381 19.3787 1.41372 19.3787 1.39344V0.932812C19.3784 0.850311 19.3455 0.771271 19.2872 0.712933C19.2288 0.654596 19.1498 0.621695 19.0673 0.621406H18.6066C18.5665 0.62013 18.5285 0.603298 18.5006 0.574472C18.4726 0.545646 18.457 0.507087 18.457 0.466953C18.457 0.42682 18.4726 0.38826 18.5006 0.359434C18.5285 0.330608 18.5665 0.313776 18.6066 0.3125H19.0673C19.2317 0.312707 19.3894 0.378127 19.5057 0.494414C19.622 0.6107 19.6874 0.768359 19.6876 0.932812V1.39344C19.6876 1.43438 19.6713 1.47365 19.6424 1.5026C19.6134 1.53155 19.5742 1.54781 19.5332 1.54781Z",fill:"#2D87F3"}),s.createElement("path",{d:"M0.689531 1.54789C0.648588 1.54789 0.609323 1.53163 0.580372 1.50268C0.551421 1.47372 0.535156 1.43446 0.535156 1.39352V0.932891C0.535363 0.768356 0.600848 0.610626 0.717236 0.494326C0.833623 0.378027 0.991403 0.312661 1.15594 0.312578H1.61641C1.6371 0.31192 1.65772 0.315428 1.67703 0.322893C1.69635 0.330359 1.71397 0.34163 1.72884 0.356038C1.74371 0.370445 1.75554 0.387695 1.76361 0.406762C1.77169 0.425829 1.77585 0.446324 1.77585 0.467031C1.77585 0.487738 1.77169 0.508234 1.76361 0.527301C1.75554 0.546368 1.74371 0.563618 1.72884 0.578025C1.71397 0.592432 1.69635 0.603703 1.67703 0.611169C1.65772 0.618635 1.6371 0.622143 1.61641 0.621484H1.15594C1.07325 0.621484 0.993926 0.654258 0.935352 0.712626C0.876779 0.770995 0.843727 0.8502 0.843437 0.932891V1.39352C0.843438 1.43438 0.827238 1.47357 0.798388 1.50251C0.769538 1.53145 0.730393 1.54777 0.689531 1.54789Z",fill:"#2D87F3"}),s.createElement("path",{d:"M19.0673 19.4648H18.6066C18.5665 19.4636 18.5285 19.4467 18.5006 19.4179C18.4726 19.3891 18.457 19.3505 18.457 19.3104C18.457 19.2702 18.4726 19.2317 18.5006 19.2029C18.5285 19.174 18.5665 19.1572 18.6066 19.1559H19.0673C19.1498 19.1556 19.2288 19.1227 19.2872 19.0644C19.3455 19.0061 19.3784 18.927 19.3787 18.8445V18.3841C19.378 18.3634 19.3815 18.3427 19.389 18.3234C19.3965 18.3041 19.4077 18.2865 19.4221 18.2716C19.4365 18.2567 19.4538 18.2449 19.4729 18.2368C19.4919 18.2288 19.5124 18.2246 19.5331 18.2246C19.5538 18.2246 19.5743 18.2288 19.5934 18.2368C19.6125 18.2449 19.6297 18.2567 19.6441 18.2716C19.6585 18.2865 19.6698 18.3041 19.6773 18.3234C19.6847 18.3427 19.6882 18.3634 19.6876 18.3841V18.8441C19.6875 19.0086 19.6221 19.1664 19.5058 19.2828C19.3895 19.3991 19.2318 19.4646 19.0673 19.4648Z",fill:"#2D87F3"}),s.createElement("path",{d:"M1.40625 19.6875H0.940156C0.773755 19.6873 0.614228 19.6211 0.496565 19.5034C0.378901 19.3858 0.312707 19.2262 0.3125 19.0598V18.5938C0.3125 18.5523 0.328962 18.5126 0.358265 18.4833C0.387567 18.454 0.42731 18.4375 0.46875 18.4375C0.51019 18.4375 0.549933 18.454 0.579235 18.4833C0.608538 18.5126 0.625 18.5523 0.625 18.5938V19.0595C0.624979 19.1009 0.633115 19.1419 0.648942 19.1802C0.664769 19.2185 0.687977 19.2532 0.717242 19.2825C0.746507 19.3118 0.781256 19.3351 0.819503 19.3509C0.857751 19.3668 0.898749 19.375 0.940156 19.375H1.40625C1.44769 19.375 1.48743 19.3915 1.51674 19.4208C1.54604 19.4501 1.5625 19.4898 1.5625 19.5312C1.5625 19.5727 1.54604 19.6124 1.51674 19.6417C1.48743 19.671 1.44769 19.6875 1.40625 19.6875Z",fill:"#2D87F3"}),s.createElement("path",{d:"M3.95953 2.8125H2.65625C2.61481 2.8125 2.57507 2.79604 2.54576 2.76674C2.51646 2.73743 2.5 2.69769 2.5 2.65625C2.5 2.61481 2.51646 2.57507 2.54576 2.54576C2.57507 2.51646 2.61481 2.5 2.65625 2.5H3.95953C4.00097 2.5 4.04071 2.51646 4.07002 2.54576C4.09932 2.57507 4.11578 2.61481 4.11578 2.65625C4.11578 2.69769 4.09932 2.73743 4.07002 2.76674C4.04071 2.79604 4.00097 2.8125 3.95953 2.8125Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 14.9688H16.7285C16.6871 14.9688 16.6473 14.9523 16.618 14.923C16.5887 14.8937 16.5723 14.8539 16.5723 14.8125C16.5723 14.7711 16.5887 14.7313 16.618 14.702C16.6473 14.6727 16.6871 14.6562 16.7285 14.6562H17.3443C17.3857 14.6562 17.4255 14.6727 17.4548 14.702C17.4841 14.7313 17.5005 14.7711 17.5005 14.8125C17.5005 14.8539 17.4841 14.8937 17.4548 14.923C17.4255 14.9523 17.3857 14.9688 17.3443 14.9688Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 16.3027H16.7285C16.6871 16.3027 16.6473 16.2863 16.618 16.257C16.5887 16.2277 16.5723 16.1879 16.5723 16.1465C16.5723 16.105 16.5887 16.0653 16.618 16.036C16.6473 16.0067 16.6871 15.9902 16.7285 15.9902H17.3443C17.3857 15.9902 17.4255 16.0067 17.4548 16.036C17.4841 16.0653 17.5005 16.105 17.5005 16.1465C17.5005 16.1879 17.4841 16.2277 17.4548 16.257C17.4255 16.2863 17.3857 16.3027 17.3443 16.3027Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 13.6499H16.7285C16.6871 13.6499 16.6473 13.6334 16.618 13.6041C16.5887 13.5748 16.5723 13.5351 16.5723 13.4937C16.5723 13.4522 16.5887 13.4125 16.618 13.3832C16.6473 13.3539 16.6871 13.3374 16.7285 13.3374H17.3443C17.3857 13.3374 17.4255 13.3539 17.4548 13.3832C17.4841 13.4125 17.5005 13.4522 17.5005 13.4937C17.5005 13.5351 17.4841 13.5748 17.4548 13.6041C17.4255 13.6334 17.3857 13.6499 17.3443 13.6499Z",fill:"#2D87F3"}),s.createElement("path",{d:"M4.99063 3.84375H2.65625C2.61481 3.84375 2.57507 3.82729 2.54576 3.79799C2.51646 3.76868 2.5 3.72894 2.5 3.6875C2.5 3.64606 2.51646 3.60632 2.54576 3.57701C2.57507 3.54771 2.61481 3.53125 2.65625 3.53125H4.99063C5.03207 3.53125 5.07181 3.54771 5.10111 3.57701C5.13041 3.60632 5.14687 3.64606 5.14687 3.6875C5.14687 3.72894 5.13041 3.76868 5.10111 3.79799C5.07181 3.82729 5.03207 3.84375 4.99063 3.84375Z",fill:"#2D87F3"}),s.createElement("path",{d:"M4.99063 4.875H2.65625C2.61481 4.875 2.57507 4.85854 2.54576 4.82924C2.51646 4.79993 2.5 4.76019 2.5 4.71875C2.5 4.67731 2.51646 4.63757 2.54576 4.60826C2.57507 4.57896 2.61481 4.5625 2.65625 4.5625H4.99063C5.03207 4.5625 5.07181 4.57896 5.10111 4.60826C5.13041 4.63757 5.14687 4.67731 5.14687 4.71875C5.14687 4.76019 5.13041 4.79993 5.10111 4.82924C5.07181 4.85854 5.03207 4.875 4.99063 4.875Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 12.3843H16.7285C16.6871 12.3843 16.6473 12.3678 16.618 12.3385C16.5887 12.3092 16.5723 12.2695 16.5723 12.228C16.5723 12.1866 16.5887 12.1468 16.618 12.1175C16.6473 12.0882 16.6871 12.0718 16.7285 12.0718H17.3443C17.3857 12.0718 17.4255 12.0882 17.4548 12.1175C17.4841 12.1468 17.5005 12.1866 17.5005 12.228C17.5005 12.2695 17.4841 12.3092 17.4548 12.3385C17.4255 12.3678 17.3857 12.3843 17.3443 12.3843Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 17.6562H16.7285C16.6871 17.6562 16.6473 17.6398 16.618 17.6105C16.5887 17.5812 16.5723 17.5414 16.5723 17.5C16.5723 17.4586 16.5887 17.4188 16.618 17.3895C16.6473 17.3602 16.6871 17.3438 16.7285 17.3438H17.3443C17.3857 17.3438 17.4255 17.3602 17.4548 17.3895C17.4841 17.4188 17.5005 17.4586 17.5005 17.5C17.5005 17.5414 17.4841 17.5812 17.4548 17.6105C17.4255 17.6398 17.3857 17.6562 17.3443 17.6562Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.0352 17.6563C16.9937 17.6563 16.954 17.6398 16.9247 17.6105C16.8954 17.5812 16.8789 17.5415 16.8789 17.5001V12.228C16.8789 12.1866 16.8954 12.1468 16.9247 12.1175C16.954 12.0882 16.9937 12.0718 17.0352 12.0718C17.0766 12.0718 17.1163 12.0882 17.1456 12.1175C17.1749 12.1468 17.1914 12.1866 17.1914 12.228V17.5001C17.1914 17.5415 17.1749 17.5812 17.1456 17.6105C17.1163 17.6398 17.0766 17.6563 17.0352 17.6563Z",fill:"#2D87F3"}),s.createElement("path",{d:"M8.60596 12.3197C8.54189 12.4053 8.46174 12.4775 8.37002 12.5324C8.13096 12.6807 7.05018 13.0533 5.9919 12.0152C5.72695 11.7747 5.47994 11.5151 5.25284 11.2385C5.07471 11.0041 4.83877 10.959 4.57627 10.5683C4.34659 10.2262 4.36846 9.61991 4.57627 9.35412C4.84502 9.01194 5.32627 8.84022 5.62627 9.49631C5.76534 9.80256 6.47002 10.476 7.0294 10.6262C7.09603 10.6424 7.16404 10.6523 7.23252 10.6558C7.85752 10.6952 8.57627 11.1307 8.74659 11.6512C8.77467 11.766 8.77661 11.8857 8.75227 12.0014C8.72793 12.1172 8.67794 12.2259 8.60596 12.3197Z",fill:"#2B62CD"}),s.createElement("path",{d:"M17.8215 7.60137C17.3465 10.2436 15.2621 10.3982 14.3965 11.2482C13.9965 11.642 14.0606 11.7092 13.9965 12.7201C13.9231 13.8951 13.2621 16.1139 11.0356 16.7654C8.77777 17.4279 6.96371 16.5029 6.00121 14.6982C5.14339 13.0904 4.21527 13.6154 3.00121 13.1811C2.42152 12.9717 2.00433 12.4811 2.01996 11.9748C2.03871 11.3217 2.40902 10.8404 3.37777 11.3217C4.04964 11.6545 4.69496 11.5936 5.30433 11.5201C5.63507 11.4688 5.96971 11.4468 6.30433 11.4545C6.96796 11.5169 7.60602 11.7417 8.16214 12.1092C8.31527 12.2061 8.42621 12.2889 8.48402 12.3342C8.0626 11.9665 7.71478 11.5222 7.45902 11.0248C7.44183 10.9936 7.2848 10.655 7.25589 10.592C6.96136 9.95137 7.39027 9.35606 7.83714 9.35606C7.87141 9.35549 7.9056 9.3597 7.93871 9.36855C8.05114 9.39698 8.14976 9.46457 8.21683 9.55918C8.23545 9.57848 8.25784 9.59375 8.28261 9.60403C8.30738 9.61431 8.334 9.61939 8.36082 9.61895C8.38763 9.61851 8.41407 9.61256 8.43849 9.60147C8.46291 9.59038 8.48479 9.57439 8.50277 9.55449C8.54371 9.50394 8.60167 9.47004 8.66579 9.45911C8.72992 9.44818 8.79583 9.46098 8.85121 9.49512C9.13871 9.66699 8.98871 10.0232 9.19808 10.4342C9.42152 10.8732 10.109 11.3389 10.634 11.2389C11.0293 11.1623 11.8606 10.6811 10.634 10.167C9.94808 9.88105 9.86683 9.48418 9.93558 9.12168C9.96058 8.99356 10.1621 8.41543 10.1653 8.39356C10.1996 8.1248 9.64652 7.69668 10.1653 7.31699C10.4215 7.12949 10.459 6.88262 10.5075 6.56855C10.7934 4.6998 12.02 3.47168 13.9825 3.47168C16.5262 3.47168 18.1418 5.82793 17.8215 7.60137Z",fill:"#2D87F3"}),s.createElement("path",{d:"M11.0678 7.4316C11.006 7.43496 10.9443 7.42333 10.888 7.3977C10.8317 7.37207 10.7824 7.33321 10.7443 7.28441C10.7305 7.26814 10.7201 7.24921 10.7139 7.22877C10.7076 7.20833 10.7056 7.18683 10.708 7.16559C10.7104 7.14436 10.7171 7.12384 10.7278 7.1053C10.7384 7.08677 10.7527 7.07062 10.7699 7.05784C10.787 7.04507 10.8066 7.03594 10.8274 7.03103C10.8482 7.02613 10.8698 7.02553 10.8908 7.0293C10.9118 7.03306 10.9319 7.0411 10.9497 7.05292C10.9675 7.06474 10.9827 7.08009 10.9943 7.09801C11.0256 7.1391 11.159 7.11504 11.2378 7.0802C11.2756 7.06321 11.3186 7.06193 11.3573 7.07666C11.3961 7.09138 11.4274 7.1209 11.4444 7.15871C11.4614 7.19653 11.4627 7.23954 11.4479 7.27829C11.4332 7.31705 11.4037 7.34836 11.3659 7.36535C11.272 7.40738 11.1706 7.42991 11.0678 7.4316Z",fill:"#2B62CD"}),s.createElement("path",{d:"M11.548 13.1983C11.5518 13.2185 11.5515 13.2392 11.5471 13.2592C11.5428 13.2792 11.5345 13.2981 11.5227 13.3149C11.5109 13.3316 11.4958 13.3458 11.4785 13.3567C11.4611 13.3675 11.4417 13.3748 11.4215 13.378C11.2165 13.4117 11.0089 13.4279 10.8012 13.4265C10.5169 13.4214 10.2349 13.3757 9.96367 13.2905C9.44418 13.1038 8.96486 12.8201 8.55117 12.4546C7.77477 11.8262 7.66367 11.4171 7.45898 11.0249C7.74314 11.4988 8.12768 11.9047 8.58555 12.214C9.03605 12.5485 9.53089 12.8188 10.0559 13.0171C10.4848 13.1224 10.9305 13.141 11.3668 13.0718C11.387 13.0677 11.4079 13.0678 11.4281 13.0721C11.4483 13.0763 11.4675 13.0846 11.4844 13.0964C11.5014 13.1082 11.5157 13.1233 11.5267 13.1409C11.5376 13.1584 11.5449 13.1779 11.548 13.1983Z",fill:"#2B62CD"}),s.createElement("path",{d:"M10.5484 8.85297C10.511 8.86675 10.4712 8.87312 10.4313 8.87172C10.2958 8.86506 10.164 8.82594 10.0469 8.75766C10.0858 8.62969 10.1177 8.54703 10.1419 8.46875C10.2299 8.5323 10.3369 8.56419 10.4453 8.55922C10.464 8.55169 10.4839 8.54798 10.504 8.54833C10.5241 8.54867 10.5439 8.55306 10.5623 8.56122C10.5807 8.56939 10.5972 8.58116 10.6109 8.59585C10.6247 8.61054 10.6353 8.62784 10.6422 8.64672C10.6561 8.68656 10.6541 8.73021 10.6366 8.76862C10.6192 8.80703 10.5876 8.83724 10.5484 8.85297Z",fill:"#2B62CD"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_5646_32454"},s.createElement("rect",{width:"20",height:"20",fill:"white"}))))},label:"dueDatePage.ultrasound"}},L=[String(l.lastPeriod),String(l.IVF),String(l.conception)],_={[f.L.Cambodia]:L,[f.L.Singapore]:L,[f.L.India]:L,[f.L.Indonesia]:[String(l.lastPeriod),String(l.IUI),String(l.IVF),String(l.ultrasound)],[f.L.Malaysia]:L,[f.L.Myanmar]:L,[f.L.PhilippinesEnglish]:L,[f.L.PhilippinesTagalog]:L,[f.L.Taiwan]:L,[f.L.Thailand]:L,[f.L.Vietnam]:[String(l.lastPeriod),String(l.IVF),String(l.IUI),String(l.ultrasound)]},H="yyyy-MM-dd",getDueDateLastPeriod=(e,t)=>({otherInfo:{method:l.lastPeriod+1,first_day:(0,h.Z)(e,H),measurement_date:null,insemination_date:null,cycle_length_days:t,conception_date:null,ivf_transfer_date:null,days_transfer:null}}),getDueDateConception=e=>({otherInfo:{method:l.conception+1,conception_date:(0,h.Z)(e,H),measurement_date:null,insemination_date:null,first_day:null,cycle_length_days:null,ivf_transfer_date:null,days_transfer:null}}),getDueDateIVF=(e,t)=>({otherInfo:{method:l.IVF+1,ivf_transfer_date:(0,h.Z)(e,H),measurement_date:null,insemination_date:null,days_transfer:t,conception_date:null,first_day:null,cycle_length_days:null}}),getDueDateIUI=e=>({otherInfo:{method:l.conception+1,insemination_date:(0,h.Z)(e,H),measurement_date:null,conception_date:null,first_day:null,cycle_length_days:null,ivf_transfer_date:null,days_transfer:null}}),getDueDateUltrasound=(e,t)=>{let[a,n]=t.split("|"),[r,o]=[Number(a),Number(n)];return{otherInfo:{method:l.conception+1,measurement_date:(0,h.Z)(e,H),conception_date:null,insemination_date:null,crl_value:r,msd_value:o,first_day:null,cycle_length_days:null,ivf_transfer_date:null,days_transfer:null}}},$=(0,s.createContext)({}),B=(0,s.createContext)({}),DefaultLayout$4=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(B);return s.createElement(I.H.FormRow,null,s.createElement(w.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.lastPeriod.lastPeriodLabel"))},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date})))},InlineLayout$4=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(B);return s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{width:300,label:e("dueDatePage.lastPeriod.lastPeriodLabel")},s.createElement(w.D,Object.assign({},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date,error:null}))),t.errors.lastPeriodDate&&s.createElement(I.H.Error,null,t.errors.lastPeriodDate))},MbLayout$4=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(B);return s.createElement(I.H.BorderBoxControl,{label:e("dueDatePage.lastPeriod.lastPeriodLabel"),rightSection:s.createElement(D.Z,null)},s.createElement(w.D,Object.assign({},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},rightSection:null,maxDate:new Date})))},ConceptionForm=({})=>{let{classes:e={}}=(0,s.useContext)(M.C),{formLayout:t,onSubmit:a,currentUrl:n,submitProps:r}=(0,s.useContext)($),o=(0,c.rZ)(),{t:i}=(0,k.u)(),d=(0,v.c)({initialValues:{lastPeriodDate:new Date}}),u={onSubmit:d.onSubmit(e=>{let{lastPeriodDate:t}=e,n=`${S.Q.type}=${l.conception}&${S.Q.startDate}=${x()(t).format(S.A)}&${S.Q.additional}= `;a(getDueDateConception(t),n)})};return s.createElement(B.Provider,{value:{form:d}},s.createElement(I.H,Object.assign({formLayout:t},u),"inline"===t?s.createElement(InlineLayout$4,null):"mb"===o.other.template?s.createElement(MbLayout$4,null):s.createElement(DefaultLayout$4,null),s.createElement(I.H.FormRow,{className:e.submitWrapper},s.createElement(I.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:n,className:(0,m.default)("due-date-calculate-button",e.submitBtn),type:"submit"},r),i("dueDatePage.lastPeriod.calculate")))))},O=(0,s.createContext)({}),DefaultLayout$3=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(O);return s.createElement(I.H.FormRow,null,s.createElement(w.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.date_of_IUI_procedure"))},t.getInputProps("dateOfIUIProcedure"),{popoverProps:{withinPortal:!0},maxDate:new Date})))},InlineLayout$3=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(O);return s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{width:300,label:e("dueDatePage.date_of_IUI_procedure")},s.createElement(w.D,Object.assign({},t.getInputProps("dateOfIUIProcedure"),{popoverProps:{withinPortal:!0},maxDate:new Date,error:null}))))},MbLayout$3=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(O);return s.createElement(I.H.BorderBoxControl,{label:e("dueDatePage.date_of_IUI_procedure"),rightSection:s.createElement(D.Z,null)},s.createElement(w.D,Object.assign({},t.getInputProps("dateOfIUIProcedure"),{popoverProps:{withinPortal:!0},rightSection:null,maxDate:new Date})))},IUIForm=({})=>{let{formLayout:e,onSubmit:t,currentUrl:a,submitProps:n}=(0,s.useContext)($),{classes:r={}}=(0,s.useContext)(M.C),o=(0,c.rZ)(),{t:i}=(0,k.u)(),d=(0,v.c)({initialValues:{dateOfIUIProcedure:new Date}}),u={onSubmit:d.onSubmit(e=>{let{dateOfIUIProcedure:a}=e,n=`${S.Q.type}=${l.IUI}&${S.Q.startDate}=${x()(a).format(S.A)}&${S.Q.additional}= `;t(getDueDateIUI(a),n)})};return s.createElement(O.Provider,{value:{form:d}},s.createElement(I.H,Object.assign({formLayout:e},u),"inline"===e?s.createElement(InlineLayout$3,null):"mb"===o.other.template?s.createElement(MbLayout$3,null):s.createElement(DefaultLayout$3,null),s.createElement(I.H.FormRow,{className:r.submitWrapper},s.createElement(I.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:a,className:(0,m.default)("due-date-calculate-button",r.submitBtn),type:"submit"},n),i("dueDatePage.lastPeriod.calculate")))))},R=(0,s.createContext)({}),DefaultLayout$2=()=>{let{t:e}=(0,k.u)(),{form:t,transferDateOptions:a}=(0,s.useContext)(R);return s.createElement(s.Fragment,null,s.createElement(I.H.FormRow,null,s.createElement(w.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.ivf.transferDate"))},t.getInputProps("IVFDate"),{popoverProps:{withinPortal:!0},maxDate:new Date}))),s.createElement(I.H.FormRow,null,s.createElement(y.R.Group,Object.assign({},t.getInputProps("dayTransfer")),s.createElement(d.Z,null,a.map((e,t)=>s.createElement(y.R,{key:t,value:e.value,label:e.label}))))))},InlineLayout$2=()=>{let{t:e}=(0,k.u)(),{form:t,transferDateOptions:a}=(0,s.useContext)(R);return s.createElement(s.Fragment,null,s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{width:300,label:e("dueDatePage.ivf.transferDate")},s.createElement(w.D,Object.assign({},t.getInputProps("IVFDate"),{popoverProps:{withinPortal:!0},maxDate:new Date})))),s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{width:"none"},s.createElement(y.R.Group,Object.assign({},t.getInputProps("dayTransfer")),s.createElement(d.Z,null,a.map((e,t)=>s.createElement(y.R,{key:t,value:e.value,label:e.label})))))))},MbLayout$2=()=>{let{t:e}=(0,k.u)(),{form:t,transferDateOptions:a}=(0,s.useContext)(R);return s.createElement(s.Fragment,null,s.createElement(I.H.BorderBoxControl,{label:e("dueDatePage.ivf.transferDate"),rightSection:s.createElement(D.Z,null)},s.createElement(w.D,Object.assign({},t.getInputProps("IVFDate"),{popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null}))),s.createElement(y.R.Group,Object.assign({},t.getInputProps("dayTransfer")),s.createElement(d.Z,null,a.map((e,t)=>s.createElement(y.R,{key:t,value:e.value,label:e.label})))))},IVFForm=({})=>{var e;let{classes:t={}}=(0,s.useContext)(M.C),{formLayout:a,onSubmit:n,currentUrl:r,submitProps:o}=(0,s.useContext)($),{t:i}=(0,k.u)(),d=(0,c.rZ)(),u=[{value:"3",label:i("dueDatePage.ivf.transferDateRadio",{number:3})},{value:"5",label:i("dueDatePage.ivf.transferDateRadio",{number:5})}],p=(0,v.c)({initialValues:{IVFDate:new Date,dayTransfer:null===(e=null==u?void 0:u[0])||void 0===e?void 0:e.value}}),g={onSubmit:p.onSubmit(e=>{let{IVFDate:t}=e,a=Number(e.dayTransfer),r=`${S.Q.type}=${l.IVF}&${S.Q.startDate}=${x()(t).format(S.A)}&${S.Q.additional}=${a}`;n(getDueDateIVF(t,Number(a)),r)})};return s.createElement(R.Provider,{value:{form:p,transferDateOptions:u}},s.createElement(I.H,Object.assign({formLayout:a},g),"inline"===a?s.createElement(InlineLayout$2,null):"mb"===d.other.template?s.createElement(MbLayout$2,null):s.createElement(DefaultLayout$2,null),s.createElement(I.H.FormRow,{className:t.submitWrapper},s.createElement(I.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:r,className:(0,m.default)("due-date-calculate-button",t.submitBtn),type:"submit"},o),i("dueDatePage.lastPeriod.calculate")))))},j=(0,s.createContext)({}),DefaultLayout$1=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(j),a=(0,s.useMemo)(()=>[...Array(21)].map((t,a)=>({label:e("dueDatePage.daysText",{number:a+20}),value:`${a+20}`})),[]);return s.createElement(s.Fragment,null,s.createElement(I.H.FormRow,null,s.createElement(w.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.lastPeriod.lastPeriodLabel"))},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date}))),s.createElement(I.H.FormRow,null,s.createElement(y.I.Wrapper,{label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.lastPeriod.periodLengthLabel"))},s.createElement(y.S,Object.assign({placeholder:e("tools.inputPlaceholder",{content:e("dueDatePage.daysText",{number:30})}),data:a,withinPortal:!0},t.getInputProps("periodLength"))))))},InlineLayout$1=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(j),a=(0,s.useMemo)(()=>[...Array(21)].map((t,a)=>({label:e("dueDatePage.daysText",{number:a+20}),value:`${a+20}`})),[]);return s.createElement(s.Fragment,null,s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{label:e("dueDatePage.lastPeriod.lastPeriodLabel"),width:300},s.createElement(w.D,Object.assign({},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date})))),s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{label:e("dueDatePage.lastPeriod.periodLengthLabel"),width:300},s.createElement(y.S,Object.assign({placeholder:e("tools.inputPlaceholder",{content:e("dueDatePage.daysText",{number:30})}),data:a},t.getInputProps("periodLength"),{error:null,withinPortal:!0})))),t.errors.periodLength&&s.createElement(I.H.FormRow,null,s.createElement(I.H.Error,null,t.errors.periodLength)))},MbLayout$1=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(j);return s.createElement(s.Fragment,null,s.createElement(I.H.BorderBoxControl,{label:e("dueDatePage.lastPeriod.lastPeriodLabel"),rightSection:s.createElement(D.Z,null)},s.createElement(w.D,Object.assign({rightSection:null},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date}))),s.createElement(I.H.BorderBoxControl,{label:e("dueDatePage.lastPeriod.periodLengthLabel"),rightSection:e("ovulationPage.dayUnit")},s.createElement(y.I.Number,Object.assign({min:20,max:40,placeholder:e("tools.inputPlaceholder",{content:"30"})},t.getInputProps("periodLength")))),t.errors.periodLength&&s.createElement(I.H.Error,null,t.errors.periodLength))},LastPeriodForm=({})=>{let{formLayout:e,onSubmit:t,currentUrl:a,submitProps:n}=(0,s.useContext)($),{classes:r={}}=(0,s.useContext)(M.C),{t:o}=(0,k.u)(),i=(0,c.rZ)(),d="mb"===i.other.template,u=(0,v.c)({initialValues:{lastPeriodDate:new Date},validate:{periodLength:(0,E.U)(o("validation.error.requiredField"))}}),p={onSubmit:u.onSubmit(e=>{let{periodLength:a,lastPeriodDate:n}=e,r=`${S.Q.type}=${l.lastPeriod}&${S.Q.startDate}=${x()(n).format(S.A)}&${S.Q.additional}=${a}`;t(getDueDateLastPeriod(n,a),r)})};return s.createElement(j.Provider,{value:{form:u}},s.createElement(I.H,Object.assign({formLayout:e},p),"inline"===e?s.createElement(InlineLayout$1,null):d?s.createElement(MbLayout$1,null):s.createElement(DefaultLayout$1,null),s.createElement(I.H.FormRow,{className:r.submitWrapper},s.createElement(I.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:a,className:(0,m.default)("due-date-calculate-button",r.submitBtn),type:"submit"},n),o("dueDatePage.lastPeriod.calculate")))))},z=(0,s.createContext)({}),Info=e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let r=Object.assign({width:a,height:a},n);return s.createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00065 1.3335C4.32065 1.3335 1.33398 4.32016 1.33398 8.00016C1.33398 11.6802 4.32065 14.6668 8.00065 14.6668C11.6807 14.6668 14.6673 11.6802 14.6673 8.00016C14.6673 4.32016 11.6807 1.3335 8.00065 1.3335ZM8.00065 11.3335C7.63398 11.3335 7.33398 11.0335 7.33398 10.6668V8.00016C7.33398 7.6335 7.63398 7.3335 8.00065 7.3335C8.36732 7.3335 8.66732 7.6335 8.66732 8.00016V10.6668C8.66732 11.0335 8.36732 11.3335 8.00065 11.3335ZM7.33398 6.00016H8.66732V4.66683H7.33398V6.00016Z",fill:"#2D87F3"}))},DefaultLayout=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(z),a=s.createElement(P.T,{size:"p4",color:N.r.colors.gray400},"mm"),n=t.getInputProps("ultrasoundCRL"),r=t.getInputProps("ultrasoundMSD");return s.createElement(s.Fragment,null,s.createElement(I.H.FormRow,null,s.createElement(w.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.date_of_ultrasound"))},t.getInputProps("dateOfUltrasound"),{popoverProps:{withinPortal:!0},maxDate:new Date}))),s.createElement(I.H.FormRow,null,s.createElement(u.k,{align:"center",gap:4,mb:4},s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.validation.one_is_required")),s.createElement(p.u,{withinPortal:!0,withArrow:!0,width:300,multiline:!0,label:e("dueDatePage.ultrasound.tooltip")},s.createElement(u.k,null,s.createElement(Info,{size:16})))),s.createElement(u.k,{gap:8},s.createElement(y.I,Object.assign({placeholder:"CRL",sx:{flex:1},rightSection:a,type:"number",min:0,step:.01},n,{errorProps:{sx:{display:"none"}}})),s.createElement(y.I,Object.assign({placeholder:"MSD",sx:{flex:1},rightSection:a,type:"number",min:0,step:.01},r,{errorProps:{sx:{display:"none"}}}))),(t.errors.ultrasoundCRL||t.errors.ultrasoundMSD)&&s.createElement(P.T,{size:"p4",color:N.r.colors.red500},t.errors.ultrasoundCRL||t.errors.ultrasoundMSD)))},InlineLayout=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(z),a=s.createElement(P.T,{size:"p4",color:N.r.colors.gray400},"mm"),n=t.getInputProps("ultrasoundCRL"),r=t.getInputProps("ultrasoundMSD");return s.createElement(s.Fragment,null,s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{width:300,label:e("dueDatePage.date_of_ultrasound")},s.createElement(w.D,Object.assign({},t.getInputProps("dateOfUltrasound"),{popoverProps:{withinPortal:!0},maxDate:new Date,error:null})))),s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{width:300,label:s.createElement(u.k,{align:"center",gap:4},s.createElement("span",null,e("dueDatePage.validation.one_is_required")),s.createElement(p.u,{withinPortal:!0,withArrow:!0,width:300,multiline:!0,label:e("dueDatePage.ultrasound.tooltip")},s.createElement(u.k,null,s.createElement(Info,{size:16}))))},s.createElement(g.x,null,s.createElement(u.k,{gap:8},s.createElement(y.I,Object.assign({placeholder:"CRL",sx:{flex:1},rightSection:a,type:"number",min:0,step:.01},n,{errorProps:{sx:{display:"none"}}})),s.createElement(y.I,Object.assign({placeholder:"MSD",sx:{flex:1},rightSection:a,type:"number",min:0,step:.01},r,{errorProps:{sx:{display:"none"}}}))))),(t.errors.ultrasoundCRL||t.errors.ultrasoundMSD)&&s.createElement(I.H.Error,null,t.errors.ultrasoundCRL||t.errors.ultrasoundMSD)))},MbLayout=()=>{let{t:e}=(0,k.u)(),{form:t}=(0,s.useContext)(z);return s.createElement(I.H.BorderBoxControl,{label:e("dueDatePage.date_of_ultrasound"),rightSection:s.createElement(D.Z,null)},s.createElement(w.D,Object.assign({},t.getInputProps("dateOfUltrasound"),{popoverProps:{withinPortal:!0},rightSection:null,maxDate:new Date})))},UltrasoundForm=({})=>{let{classes:e={}}=(0,s.useContext)(M.C),{formLayout:t,onSubmit:a,currentUrl:n,submitProps:r}=(0,s.useContext)($),o=(0,c.rZ)(),{t:i}=(0,k.u)(),d=(0,v.c)({initialValues:{dateOfUltrasound:new Date},validate:e=>{let t=Number(e.ultrasoundCRL),a=Number(e.ultrasoundMSD);if(!t&&!a)return{ultrasoundCRL:i("dueDatePage.validation.record_not_valid")};let n=t>=5&&t<=101,r=a>0&&a<=13;return n||r?{}:t&&!n?{ultrasoundCRL:i("dueDatePage.validation.record_not_valid")}:a&&!r?{ultrasoundMSD:i("dueDatePage.validation.crl")}:void 0}}),u={onSubmit:d.onSubmit(e=>{let{dateOfUltrasound:t,ultrasoundCRL:n,ultrasoundMSD:r}=e,o=`${n}|${r}`,i=`${S.Q.type}=${l.ultrasound}&${S.Q.startDate}=${x()(t).format(S.A)}&${S.Q.additional}=${o}`;a(getDueDateUltrasound(t,o),i)})};return s.createElement(z.Provider,{value:{form:d}},s.createElement(I.H,Object.assign({formLayout:t},u),"inline"===t?s.createElement(InlineLayout,null):"mb"===o.other.template?s.createElement(MbLayout,null):s.createElement(DefaultLayout,null),s.createElement(I.H.FormRow,{className:e.submitWrapper},s.createElement(I.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:n,className:(0,m.default)("due-date-calculate-button",e.submitBtn),type:"submit"},r),i("dueDatePage.lastPeriod.calculate")))))},FormSwitcher=()=>{let{calculatorType:e}=(0,s.useContext)($);switch(e){case l.lastPeriod:return s.createElement(LastPeriodForm,null);case l.conception:return s.createElement(ConceptionForm,null);case l.IVF:return s.createElement(IVFForm,null);case l.IUI:return s.createElement(IUIForm,null);case l.ultrasound:return s.createElement(UltrasoundForm,null);default:return null}};(r=o||(o={}))[r.trackPeriod=0]="trackPeriod",r[r.conceive=1]="conceive",r[r.avoidPregnancy=2]="avoidPregnancy";let T=(0,s.forwardRef)((e,t)=>{var{label:a,icon:n}=e,r=(0,i._)(e,["label","icon"]);return s.createElement(g.x,Object.assign({ref:t,sx:{gap:"1rem",display:"flex",padding:"5px 6px",alignItems:"center","&[data-selected]":{backgroundColor:N.r.colors.gray100},"&[data-selected]:hover":{backgroundColor:N.r.colors.gray100},"&[data-hovered]":{backgroundColor:N.r.colors.gray100}},className:""},r),n,s.createElement(P.T,{size:"p4"},a))}),DueDateForm=e=>{var{locale:t,formLayout:a="default",submitProps:n,currentUrl:r,isMobile:o,onSubmit:c}=e,m=(0,i._)(e,["locale","formLayout","submitProps","currentUrl","isMobile","onSubmit"]);let{t:d}=(0,k.u)(),[u,p]=(0,s.useState)(l.lastPeriod),g=(0,s.useMemo)(()=>(null==_?void 0:_[t].map(e=>{let t=F[e],a=t.icon;return Object.assign(Object.assign({},t),{label:d(t.label),icon:s.createElement(a,{size:20})})}))||[],[t,d]),h=(0,s.useMemo)(()=>g.find(e=>e.value===String(u)),[u,g]);return s.createElement($.Provider,{value:{calculatingMethods:g,submitProps:n,currentUrl:r,isMobile:o,formLayout:a,onSubmit:c,calculatorType:u,setCalculatorType:p}},s.createElement(I.H,Object.assign({component:"div",formLayout:a},m),"default"===a?s.createElement(I.H.FormRow,null,s.createElement(I.H.Control,null,s.createElement(y.S,{label:s.createElement(P.T,{size:"p2",weight:"semiBold"},d("dueDatePage.calculationMethod")),value:String(u),data:g,itemComponent:T,onChange:e=>p(Number(e)),icon:null==h?void 0:h.icon}))):s.createElement(I.H.FormRow,null,s.createElement(I.H.BorderInlineControl,{label:s.createElement(P.T,{size:"p2",weight:"semiBold"},d("dueDatePage.calculationMethod")),width:300},s.createElement(y.S,{value:String(u),data:g,itemComponent:T,onChange:e=>p(Number(e))}))),s.createElement(FormSwitcher,null)))}},Qohg:function(e,t,a){a.d(t,{A:function(){return ArticleDetailCard},C:function(){return ClinicInfo},D:function(){return DoctorExpertise},E:function(){return o},H:function(){return HospitalInfo},M:function(){return Mobile},N:function(){return NavHeader},P:function(){return PopupCollectPhone},R:function(){return RequestConsultationForm},U:function(){return UserProfileNavigation},a:function(){return UserStats},b:function(){return CollectPhoneForm},c:function(){return i},d:function(){return RequestConsultationSuccess},e:function(){return s},f:function(){return ev},g:function(){return PopupRequestConsultation},h:function(){return ProductInsuranceInfo},i:function(){return Check},j:function(){return Clock},k:function(){return Comment},l:function(){return Credential},m:function(){return Education},n:function(){return Email},o:function(){return HelloZalo},p:function(){return Highlight},q:function(){return Ellipse},r:function(){return PhoneInactive}});var n,r,l,o,i,s,c=a("q1tI"),m=a("5kis"),d=a("27Mu"),u=a("owZr"),p=a("Pt5v"),g=a("iBNF"),h=a("4MaP"),C=a("lPtY"),f=a("odgB"),v=a("P/qI"),E=a("rBCA"),b=a("HMwR"),x=a("mYVa"),y=a("iuhU"),w=a("SPK5"),P=a("Eso5"),k=a("GcSG"),I=a("xXM3"),D=a.n(I),M=a("mGnJ"),S=a("6JAH"),N=a("Vitr"),F=a("jXyD"),L=a("z/kP"),_=a("Iblh"),H=a("+JOW"),$=a("1X1S"),B=a("A9bs"),O=a("FNss"),R=a("2451"),j=a("g8xC"),z=a("TfUb"),T=a("/kWL"),A=a("UFTh"),Z=a("uFLQ"),U=a("UImu"),V=a("vq0H"),W=a("wjn6");let Check=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 81 80",fill:"none"},e),c.createElement("circle",{cx:39.5,cy:40,r:36,fill:"#00B16A"}),c.createElement("path",{d:"M25.6113 40.5543L34.5002 51.6654L53.3891 28.332",stroke:"white",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})),Clock=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"none"},e),c.createElement("path",{d:"M6 11.25C8.8995 11.25 11.25 8.8995 11.25 6C11.25 3.10051 8.8995 0.75 6 0.75C3.10051 0.75 0.75 3.10051 0.75 6C0.75 8.8995 3.10051 11.25 6 11.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6 3.25V6L8 7.75",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),Comment=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"none"},e),c.createElement("path",{d:"M20.0002 3.33203C29.1902 3.33203 36.6671 10.0621 36.6672 18.332C36.6672 18.8686 36.6342 19.4005 36.5725 19.9238C35.5792 29.1272 26.1203 35.6308 24.2336 36.8408L23.3333 37.417C21.8711 38.2196 21.7181 37.0263 21.6799 36.7295C21.6746 36.6884 21.6713 36.665 21.6672 36.666V33.2539C11.7339 34.1789 3.33325 27.097 3.33325 18.332C3.3334 10.0622 10.8104 3.33209 20.0002 3.33203ZM13.3333 16.666C12.4131 16.6663 11.6674 17.4118 11.6672 18.332C11.6672 19.2524 12.413 19.9988 13.3333 19.999C14.2537 19.999 15.0002 19.2525 15.0002 18.332C15.0001 17.4117 14.2536 16.666 13.3333 16.666ZM20.0002 16.666C19.0799 16.6661 18.3334 17.4117 18.3333 18.332C18.3333 19.2525 19.0798 19.999 20.0002 19.999C20.9207 19.999 21.6672 19.2525 21.6672 18.332C21.6671 17.4117 20.9206 16.666 20.0002 16.666ZM26.6672 16.666C25.7468 16.666 25.0004 17.4117 25.0002 18.332C25.0002 19.2525 25.7468 19.999 26.6672 19.999C27.5876 19.9989 28.3333 19.2524 28.3333 18.332C28.3331 17.4117 27.5875 16.6661 26.6672 16.666Z",fill:"#2D87F3"})),Credential=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),c.createElement("path",{d:"M10.7146 13.4812L11.5779 12.7568C11.7779 12.589 12.0312 12.4968 12.2923 12.4968H13.419C13.9579 12.4968 14.4201 12.1101 14.5135 11.579L14.709 10.469C14.7546 10.2112 14.889 9.97901 15.089 9.81124L15.9523 9.08679C16.3657 8.74012 16.4701 8.14679 16.2001 7.68012L15.6368 6.70346C15.5057 6.47679 15.459 6.21235 15.5046 5.95457L15.7001 4.84457C15.7935 4.31346 15.4923 3.79235 14.9857 3.6079L13.9268 3.22235C13.6812 3.13346 13.4757 2.96012 13.3446 2.73346L12.7812 1.75679C12.5112 1.29012 11.9457 1.08346 11.439 1.2679L10.3801 1.65346C10.1346 1.74235 9.86568 1.74235 9.62012 1.65346L8.56123 1.2679C8.05457 1.08346 7.48901 1.28901 7.21901 1.75679L6.65568 2.73346C6.52457 2.96012 6.31901 3.13235 6.07346 3.22235L5.01457 3.6079C4.5079 3.79235 4.20679 4.31346 4.30012 4.84457L4.49568 5.95457C4.54123 6.21235 4.49457 6.47679 4.36346 6.70346L3.80012 7.68012C3.53012 8.14679 3.63457 8.74012 4.0479 9.08679L4.91123 9.81124C5.11123 9.97901 5.24568 10.2123 5.29123 10.469L5.48679 11.579C5.58012 12.1101 6.04234 12.4968 6.58123 12.4968H7.7079C7.96901 12.4968 8.22234 12.589 8.42234 12.7568L9.28568 13.4812C9.69901 13.8279 10.3012 13.8279 10.7146 13.4812Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M13.6114 15.2778V19.1667L10.0003 16.3889L6.38916 19.1667V15.2778",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M10.0001 9.69347C11.2274 9.69347 12.2223 8.69855 12.2223 7.47125C12.2223 6.24395 11.2274 5.24902 10.0001 5.24902C8.77275 5.24902 7.77783 6.24395 7.77783 7.47125C7.77783 8.69855 8.77275 9.69347 10.0001 9.69347Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),Education=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),c.createElement("g",{clipPath:"url(#clip0_2422_9990)"},c.createElement("path",{d:"M15.5 15.5003C14.678 15.5003 13.956 15.0983 13.5 14.4863V18.5003C13.5 18.7023 13.622 18.8853 13.809 18.9623C13.996 19.0413 14.21 18.9973 14.354 18.8543L15.5 17.7083L16.646 18.8543C16.742 18.9503 16.87 19.0003 17 19.0003C17.064 19.0003 17.13 18.9883 17.191 18.9623C17.378 18.8853 17.5 18.7023 17.5 18.5003V14.4863C17.044 15.0983 16.322 15.5003 15.5 15.5003Z",fill:"currentColor"}),c.createElement("path",{d:"M11.75 17.25H5.25C4.145 17.25 3.25 16.355 3.25 15.25V4.75C3.25 3.645 4.145 2.75 5.25 2.75H13.75C14.855 2.75 15.75 3.645 15.75 4.75V8",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.25 6.75H12.75",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.25 10H9.25",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.25 13.2505H9.25",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M15.5 15.5C16.8807 15.5 18 14.3807 18 13C18 11.6193 16.8807 10.5 15.5 10.5C14.1193 10.5 13 11.6193 13 13C13 14.3807 14.1193 15.5 15.5 15.5Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_2422_9990"},c.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(1 1)"})))),Email=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none"},e),c.createElement("path",{d:"M2 4.66668C2 4.31305 2.14048 3.97392 2.39052 3.72387C2.64057 3.47382 2.97971 3.33334 3.33333 3.33334H12.6667C13.0203 3.33334 13.3594 3.47382 13.6095 3.72387C13.8595 3.97392 14 4.31305 14 4.66668V11.3333C14 11.687 13.8595 12.0261 13.6095 12.2762C13.3594 12.5262 13.0203 12.6667 12.6667 12.6667H3.33333C2.97971 12.6667 2.64057 12.5262 2.39052 12.2762C2.14048 12.0261 2 11.687 2 11.3333V4.66668Z",stroke:"#111111",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 4.66666L8 8.66666L14 4.66666",stroke:"#111111",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),HelloZalo=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 85 49",fill:"none"},e),c.createElement("g",{clipPath:"url(#clip0_4296_167461)"},c.createElement("rect",{x:.446777,y:6.57019,width:42,height:42,rx:12,transform:"rotate(-9 0.446777 6.57019)",fill:"url(#paint0_linear_4296_167461)"})),c.createElement("g",{filter:"url(#filter0_d_4296_167461)"},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.0704 15.8758C22.0399 15.6835 21.9937 15.478 21.949 15.2821C21.8766 14.911 21.6943 14.5612 21.4056 14.242C20.7176 13.4843 19.8778 13.1977 18.9096 13.394C18.3946 13.5068 18.0388 13.811 17.8488 14.2998C17.6892 14.7096 17.7052 15.1677 17.8916 15.5559C18.0774 15.9402 18.4069 16.2218 18.8154 16.3484C19.03 16.4217 19.1016 16.5041 19.1099 16.6921L19.1108 16.6978L20.8289 27.5452C20.8334 27.5738 20.8363 27.6046 20.8395 27.6372C20.8469 27.7083 20.8568 27.7828 20.8777 27.8537C20.9096 27.9931 20.875 28.0708 20.7489 28.1493C20.1621 28.5233 19.9468 29.0863 20.112 29.8214C20.2773 30.5818 20.9404 31.0467 21.7218 30.9522C21.7563 30.9487 21.7906 30.9433 21.8249 30.9378C23.2472 30.7126 24.1124 29.3478 24.0029 28.2253C23.9862 28.021 23.9665 27.8231 23.9343 27.6194L23.0054 21.7549C22.9023 21.1037 22.801 20.4522 22.6998 19.8007C22.4943 18.5158 22.2877 17.1862 22.0704 15.8758Z",fill:"url(#paint1_radial_4296_167461)"}),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.1017 28.7679C16.8433 28.7015 16.7458 28.5783 16.7271 28.3002L14.9771 17.251C14.9662 17.1083 15.0045 17.03 15.1188 16.963C15.1867 16.923 15.258 16.8805 15.3117 16.8251C15.8063 16.374 15.9509 15.6484 15.6692 15.0158C15.3717 14.3817 14.7876 14.0585 14.1038 14.1531C14.0867 14.1558 14.0696 14.1586 14.0524 14.1613C13.2432 14.2894 12.6134 14.7249 12.1809 15.4571C11.8782 15.9734 11.7746 16.5637 11.8774 17.213L12.8469 23.3345C13.0116 24.3741 13.1798 25.4113 13.3473 26.4446C13.5146 27.4759 13.6813 28.5035 13.8444 29.5336C13.9855 30.4247 14.6791 31.4391 15.9127 31.6985C16.2352 31.7626 16.5295 31.7726 16.8018 31.7294C16.9598 31.7044 17.1091 31.6612 17.2535 31.5993C17.8075 31.3633 18.1509 30.7955 18.1257 30.1554C18.1011 29.5074 17.681 28.9377 17.1017 28.7679Z",fill:"url(#paint2_radial_4296_167461)"}),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.5518 28.5261L33.4621 28.3666L33.2972 28.4103C33.1886 28.4392 32.6966 28.5366 32.2214 28.6295C31.1557 28.8392 31.0258 28.8695 30.9791 28.8945L30.8763 28.9479L30.8966 29.0637C31.1931 30.7266 30.2735 31.9692 29.3939 32.5281C29.032 32.7572 28.6159 32.9519 28.1252 33.1194C26.8906 33.5199 25.613 33.7222 24.3304 33.7205C23.7168 33.7161 23.1571 33.633 22.6675 33.4744C21.9917 33.2496 21.4545 32.8155 21.0733 32.183C20.9885 32.0422 20.9077 31.8891 20.8296 31.7415C20.7378 31.5686 20.6533 31.4044 20.5743 31.2881C20.2226 30.7309 19.5433 30.5086 18.9603 30.7591C18.3548 31.015 18.0228 31.6297 18.1511 32.2555C18.2243 32.6186 18.3468 32.9486 18.5761 33.3983C18.8115 33.849 19.142 34.2846 19.5269 34.6569C20.2278 35.3481 21.0901 35.8264 22.1587 36.1158C23.1874 36.3998 24.2868 36.4892 25.5177 36.386C25.9642 36.3464 26.3817 36.2959 26.7778 36.2332C27.6213 36.0996 28.3625 35.912 29.0561 35.6577C30.085 35.2898 30.9185 34.8338 31.6054 34.2663C32.9455 33.1523 34.1597 31.7732 33.5518 28.5261Z",fill:"url(#paint3_radial_4296_167461)"}),c.createElement("path",{d:"M30.3378 16.8439C26.9562 17.3795 24.6466 20.6048 25.1898 24.034C25.7329 27.4632 28.9261 29.8169 32.3077 29.2813C35.6893 28.7457 37.9989 25.5205 37.4557 22.0913C36.9126 18.662 33.7194 16.3083 30.3378 16.8439ZM34.6453 22.5364C34.9397 24.3947 33.6885 26.1446 31.8568 26.4347C30.0251 26.7248 28.2948 25.4491 28.0002 23.5889C27.7058 21.7305 28.957 19.9806 30.7887 19.6905C32.6204 19.4004 34.3507 20.6761 34.6453 22.5364Z",fill:"url(#paint4_radial_4296_167461)"}),c.createElement("path",{d:"M32.7364 23.0984C32.7097 22.328 32.0636 21.7251 31.2933 21.7517C30.5229 21.7784 29.92 22.4245 29.9466 23.1948C29.9733 23.9652 30.6194 24.5681 31.3898 24.5415C32.1601 24.5148 32.763 23.8687 32.7364 23.0984Z",fill:"url(#paint5_radial_4296_167461)"})),c.createElement("path",{d:"M68.2974 17.9266C68.8728 18.0177 69.4481 18.1088 70.0248 18.2002C69.4816 21.569 68.9476 24.9406 68.4232 28.3123C67.8724 28.144 66.8779 28.3563 66.7847 27.573C67.2588 24.3542 67.8003 21.1432 68.2974 17.9266Z",fill:"#0068FF"}),c.createElement("path",{d:"M50.6775 15.2582C53.3548 15.6795 56.0318 16.0856 58.7044 16.5282C58.6025 17.0496 58.4825 17.6162 58.064 17.9844C55.874 19.9719 53.7183 21.9951 51.5296 23.9828C53.471 24.3027 55.4156 24.6024 57.3589 24.9102C57.2507 25.3591 57.3264 25.9141 56.9689 26.2617C56.7434 26.4872 56.4118 26.4113 56.1337 26.37C53.7044 25.9715 51.2689 25.6119 48.8428 25.2015C48.9308 24.6889 49.0263 24.1211 49.4505 23.769C51.6175 21.7875 53.8035 19.8254 55.9633 17.8373C54.1135 17.547 52.265 17.2391 50.4124 16.9663C50.4904 16.3958 50.5847 15.8264 50.6775 15.2582Z",fill:"#0068FF"}),c.createElement("path",{d:"M73.9347 21.2294C75.9287 21.104 77.8179 22.6996 78.0446 24.6794C78.3933 26.757 76.8148 28.9114 74.7254 29.1964C72.937 29.5249 71.0326 28.4246 70.4014 26.7243C69.8948 25.4618 70.0924 23.9451 70.9067 22.8574C71.6036 21.8941 72.7509 21.2908 73.9347 21.2294ZM73.6319 22.9329C72.3914 23.1613 71.532 24.4907 71.8077 25.718C72.0144 26.8698 73.1867 27.7401 74.3502 27.5807C75.6656 27.4784 76.6666 26.115 76.4099 24.8275C76.2252 23.5636 74.8801 22.6385 73.6319 22.9329Z",fill:"#0068FF"}),c.createElement("path",{d:"M59.4453 20.3739C60.5538 19.3727 62.2662 19.0638 63.6311 19.6992C64.0843 19.8934 64.4747 20.1972 64.8481 20.5134C64.864 20.3867 64.8943 20.1344 64.9103 20.0077C65.4512 20.0906 65.9901 20.1774 66.531 20.2603C66.129 22.7812 65.727 25.3021 65.3341 27.8258C64.9388 27.7522 64.5277 27.7352 64.1502 27.5929C63.8943 27.4383 63.8571 27.1258 63.7872 26.8646C62.1123 27.7871 59.811 27.1531 58.7952 25.546C57.6906 23.9701 57.991 21.6311 59.4453 20.3739ZM61.5751 21.0577C60.264 21.2982 59.4084 22.8028 59.8547 24.0558C60.2132 25.2647 61.6485 25.9759 62.8263 25.5273C63.9114 25.1603 64.5807 23.9286 64.3155 22.817C64.0781 21.6164 62.7719 20.7578 61.5751 21.0577Z",fill:"#0068FF"}),c.createElement("path",{d:"M50.7263 1.42608C52.1821 1.42705 53.6267 1.65448 55.0566 1.91395L54.9152 2.00841C52.8428 2.94085 51.0183 4.38272 49.5862 6.14245C46.7159 9.66507 45.1671 14.1229 44.6491 18.5996C44.2607 22.25 44.553 26.0288 45.8972 29.4683C46.1165 30.0804 46.5513 30.6594 46.451 31.3446C46.2763 32.821 45.3317 34.0887 44.1839 34.982C44.2377 35.0593 44.2901 35.1363 44.3438 35.2136C45.1036 36.3622 45.9347 37.4603 46.7113 38.5979C47.8003 40.3074 49.1014 41.8745 50.1593 43.6066C47.9922 43.2963 45.7889 43.0505 43.7164 42.3084C41.1101 41.3608 39.0181 39.1185 38.2728 36.4462C37.8103 34.8964 37.8588 33.253 38.0552 31.666C39.2081 24.378 40.3622 17.0916 41.5176 9.80546C41.9328 7.37463 42.9815 4.92865 44.9816 3.39361C46.5812 2.07834 48.6606 1.3876 50.7263 1.42608Z",fill:"#0068FF"}),c.createElement("path",{d:"M54.9152 2.00841C55.2292 1.97016 55.5473 1.99304 55.8599 2.03293C61.2199 2.9025 66.5867 3.72914 71.9484 4.58798C73.3793 4.83248 74.8363 4.96427 76.2247 5.40825C78.171 5.87049 79.9352 7.00503 81.1923 8.55554C82.7539 10.6052 83.3345 13.2927 82.9654 15.823C81.8407 22.9326 80.7098 30.0466 79.591 37.1544C79.5656 37.193 79.5158 37.2731 79.4902 37.313C77.2405 39.1481 74.4417 40.1882 71.6072 40.6988C67.792 41.3594 63.8519 41.1423 60.093 40.25C56.34 39.3201 52.6631 37.719 49.7694 35.1051C48.0036 35.5774 46.1268 35.6486 44.3438 35.2136C44.2901 35.1363 44.2377 35.0593 44.1839 34.982C45.3317 34.0887 46.2763 32.821 46.451 31.3446C46.5513 30.6594 46.1165 30.0804 45.8972 29.4683C44.553 26.0288 44.2607 22.25 44.6491 18.5996C45.1671 14.1229 46.7159 9.66507 49.5862 6.14245C51.0183 4.38272 52.8428 2.94085 54.9152 2.00841ZM68.2974 17.9266C67.8003 21.1432 67.2588 24.3542 66.7847 27.573C66.8779 28.3563 67.8724 28.144 68.4232 28.3123C68.9476 24.9406 69.4816 21.569 70.0248 18.2002C69.4481 18.1088 68.8728 18.0177 68.2974 17.9266ZM50.6775 15.2582C50.5847 15.8264 50.4904 16.3958 50.4124 16.9663C52.265 17.2391 54.1135 17.547 55.9633 17.8373C53.8035 19.8254 51.6175 21.7875 49.4505 23.769C49.0263 24.1211 48.9308 24.6889 48.8428 25.2015C51.2689 25.6119 53.7044 25.9715 56.1337 26.37C56.4118 26.4113 56.7434 26.4872 56.9689 26.2617C57.3264 25.9141 57.2507 25.3591 57.3589 24.9102C55.4156 24.6024 53.471 24.3027 51.5296 23.9828C53.7183 21.9951 55.874 19.9719 58.064 17.9844C58.4825 17.6162 58.6025 17.0496 58.7044 16.5282C56.0318 16.0856 53.3548 15.6795 50.6775 15.2582ZM73.9347 21.2294C72.7509 21.2908 71.6036 21.8941 70.9067 22.8574C70.0924 23.9451 69.8948 25.4618 70.4014 26.7243C71.0326 28.4246 72.937 29.5249 74.7254 29.1964C76.8148 28.9114 78.3933 26.757 78.0446 24.6794C77.8179 22.6996 75.9287 21.104 73.9347 21.2294ZM59.4453 20.3739C57.991 21.6311 57.6906 23.9701 58.7952 25.546C59.811 27.1531 62.1123 27.7871 63.7872 26.8646C63.8571 27.1258 63.8943 27.4383 64.1502 27.5929C64.5277 27.7352 64.9388 27.7522 65.3341 27.8258C65.727 25.3021 66.129 22.7812 66.531 20.2603C65.9901 20.1774 65.4512 20.0906 64.9103 20.0077C64.8943 20.1344 64.864 20.3867 64.8481 20.5134C64.4747 20.1972 64.0843 19.8934 63.6311 19.6992C62.2662 19.0638 60.5538 19.3727 59.4453 20.3739Z",fill:"white"}),c.createElement("path",{d:"M61.5753 21.0583C62.7721 20.7584 64.0782 21.6169 64.3156 22.8176C64.5809 23.9292 63.9115 25.1608 62.8264 25.5278C61.6487 25.9765 60.2133 25.2652 59.8549 24.0564C59.4085 22.8034 60.2641 21.2988 61.5753 21.0583Z",fill:"white"}),c.createElement("path",{d:"M73.6318 22.9336C74.88 22.6391 76.2251 23.5643 76.4099 24.8281C76.6665 26.1157 75.6656 27.479 74.3502 27.5814C73.1866 27.7408 72.0143 26.8705 71.8077 25.7187C71.5319 24.4913 72.3914 23.1619 73.6318 22.9336Z",fill:"white"}),c.createElement("path",{d:"M79.4899 37.3134L79.6141 37.2149C79.3371 39.3198 78.764 41.4713 77.4398 43.1739C75.8969 45.1731 73.4695 46.4549 70.9462 46.5887C69.5321 46.6548 68.1179 46.4954 66.7259 46.2571C62.4354 45.5789 58.1453 44.898 53.8548 44.2199C52.6242 44.0043 51.3785 43.8661 50.1589 43.607C49.1011 41.8749 47.7999 40.3078 46.711 38.5984C45.9343 37.4608 45.1033 36.3627 44.3435 35.214C46.1264 35.649 48.0033 35.5778 49.769 35.1055C52.6628 37.7194 56.3397 39.3205 60.0926 40.2504C63.8515 41.1427 67.7916 41.3598 71.6068 40.6993C74.4413 40.1886 77.2402 39.1485 79.4899 37.3134Z",fill:"#005BE0"}),c.createElement("defs",null,c.createElement("filter",{id:"filter0_d_4296_167461",x:7.83887,y:13.3341,width:33.696,height:31.0933,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:4}),c.createElement("feGaussianBlur",{stdDeviation:2}),c.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),c.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4296_167461"}),c.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4296_167461",result:"shape"})),c.createElement("linearGradient",{id:"paint0_linear_4296_167461",x1:21.4468,y1:6.57019,x2:21.4468,y2:48.5702,gradientUnits:"userSpaceOnUse"},c.createElement("stop",{stopColor:"#68B8FE"}),c.createElement("stop",{offset:1,stopColor:"#2C89F3"})),c.createElement("radialGradient",{id:"paint1_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(20.9589 22.0707) rotate(81) scale(8.89343 2.07462)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("radialGradient",{id:"paint2_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.9033 23.0283) rotate(81) scale(8.89098 2.07896)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("radialGradient",{id:"paint3_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(26.2523 32.9125) rotate(81) scale(3.36206 7.90006)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("radialGradient",{id:"paint4_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(31.3227 23.0626) rotate(81) scale(6.29618 6.20942)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("radialGradient",{id:"paint5_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(31.3415 23.1466) rotate(-1.98088) scale(1.39571 1.39571)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("clipPath",{id:"clip0_4296_167461"},c.createElement("rect",{x:.446777,y:6.57019,width:42,height:42,rx:10.5,transform:"rotate(-9 0.446777 6.57019)",fill:"white"})))),Highlight=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),c.createElement("path",{d:"M7.76093 1.94434L11.8267 4.92811L16.5893 3.27134L15.0077 8.05978L18.0553 12.0772L13.0127 12.0526L10.1339 16.1928L8.59882 11.3896L3.77148 9.93078L7.86504 6.98645L7.76093 1.94434Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2.22217 17.7777L5.5555 14.4443",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M1.94434 13.6112L2.49989 13.0557",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.38867 18.0556L6.94423 17.5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),Ellipse=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 4 4",fill:"none"},e),c.createElement("circle",{cx:2,cy:2,r:2,fill:"#BFBFBF"})),Mobile=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 17 16",fill:"none"},e),c.createElement("path",{d:"M11.3889 1.55566H5.61115C4.62931 1.55566 3.83337 2.3516 3.83337 3.33344V12.6668C3.83337 13.6486 4.62931 14.4446 5.61115 14.4446H11.3889C12.3708 14.4446 13.1667 13.6486 13.1667 12.6668V3.33344C13.1667 2.3516 12.3708 1.55566 11.3889 1.55566Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M7.38892 1.55566V2.44455H9.61114V1.55566",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M8.49997 12.4448C8.99089 12.4448 9.38886 12.0468 9.38886 11.5559C9.38886 11.065 8.99089 10.667 8.49997 10.667C8.00905 10.667 7.61108 11.065 7.61108 11.5559C7.61108 12.0468 8.00905 12.4448 8.49997 12.4448Z",fill:"currentColor"})),PhoneInactive=e=>c.createElement("svg",Object.assign({className:"callTrigger",width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"none"},e),c.createElement("path",{d:"M14.4198 11.4486L12.526 11.2306C12.0676 11.178 11.6167 11.3358 11.2935 11.659L9.9032 13.0493C8.8368 12.5082 7.8696 11.8025 7.03391 10.9661C6.19747 10.1304 5.4918 9.1632 4.95071 8.0968L6.34101 6.70649C6.66416 6.38334 6.82198 5.93243 6.76938 5.47401L6.55144 3.58018C6.46125 2.82115 5.82247 2.25 5.05592 2.25H3.75579C2.90658 2.25 2.20015 2.95643 2.25276 3.80564C2.45191 7.01386 3.83395 9.89894 5.96751 12.0325C8.10106 14.166 10.9861 15.5481 14.1944 15.7472C15.0436 15.7998 15.75 15.0934 15.75 14.2442V12.9441C15.75 12.1775 15.1788 11.5387 14.4198 11.4486Z",fill:"#8C8C8C"})),q={myBooking:"booking",mySaved:"saved",myHealth:"health",myFamily:"family",myCommunity:"my-communities",eCom:"/shop/ho-so/quan-li-don-hang/"};function NavHeader({userInfo:e,onClickMyProfileButton:t,themeName:a="helloSites"}){let{t:n}=(0,m.u)(),r=(0,c.useMemo)(()=>{let t=(null==e?void 0:e.name)||(null==e?void 0:e.username);return t&&t.length?t[0].toUpperCase():"A"},[null==e?void 0:e.username,null==e?void 0:e.name]);return c.createElement("div",{className:"uJQBNNg",onClick:()=>{t&&t()}},c.createElement(h.A,{className:"TfG3dM5",type:"rounded",size:"xl",avatarUrl:null==e?void 0:e.avatar,firstLetter:r,backgroundColor:"marryBaby"===a?g.r.mbColors.pink:g.r.colors.secondaryBase}),c.createElement("div",{className:"aMtjFNf"},c.createElement("div",{className:"cSz2RR-"},(null==e?void 0:e.name)||(null==e?void 0:e.username)),c.createElement("div",{className:"GyFm00F",style:{"--bg-hellosites":`url(${u.C.getAssetPath("userProfileNav/helloSites/icon-chevronRight.svg")})`,"--bg-marrybaby":`url(${u.C.getAssetPath("userProfileNav/marryBaby/icon-arrowRight.svg")})`}},n("userProfile.nav.header.viewProfile"))))}let G={myHealth:g.r.mbColors.toneYellow,myCommunity:g.r.mbColors.toneBlue,mySaved:g.r.mbColors.toneGreen},Q={helloSites:{myBooking:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-myBooking.svg"),myCommunity:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-myCommunity.svg"),myFamily:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-myFamily.svg"),myHealth:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-myHealth.svg"),mySaved:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-mySaved.svg"),eCom:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-eCom.svg")},marryBaby:{mySaved:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-mySaved.svg"),myCommunity:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-myCommunity.svg"),myHealth:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-myHealth.svg")}},NavigationCard=({type:e,themeName:t,className:a,onClick:n=()=>void 0})=>{let{t:r}=(0,m.u)(),l=(0,c.useMemo)(()=>{var a,n;return(null===(n=null===(a=Q[t])||void 0===a?void 0:a[e])||void 0===n?void 0:n.call(a))||""},[e,t]),o=(0,c.useMemo)(()=>"marryBaby"!==t?"transparent":G[e],[e,t]);return c.createElement("div",{onClick:function(){n(e)},className:`fVk18fq ${a}`},c.createElement("div",{className:"mx7T4V3",style:{backgroundColor:o,backgroundImage:`url("${l}")`}}),c.createElement("h3",{className:"v8TCvUb"},r(`userProfile.nav.card.${e}`)))},navMenuItemsHelloSites=()=>[{key:"userProfile.nav.menu.accountSettings",icon:u.C.getAssetPath("userProfileNav/helloSites/icon-settingsWheel.svg"),subMenu:[{key:"userProfile.nav.menu.password",link:"password"},{key:"userProfile.nav.menu.disableAccount",link:"disable-account",disableLocale:["hi-IN"]},{key:"userProfile.nav.menu.dataPrivacy",link:"data-privacy",disableLocale:["vi-VN","ms-MY","km-KH","en-PH","th-TH","my-MM","zh-TW","hi-IN","tl-PH"]}]},{key:"userProfile.nav.menu.help",icon:u.C.getAssetPath("userProfileNav/helloSites/icon-helpCircle.svg"),link:"help"}],navMenuItemsMarryBaby=()=>[{key:"userProfile.nav.menu.password",icon:u.C.getAssetPath("userProfileNav/marryBaby/icon-lock.svg"),link:"password"},{key:"userProfile.nav.menu.logout",icon:u.C.getAssetPath("userProfileNav/marryBaby/icon-logOut.svg"),link:"logout"}];var Y={navMenu:"gn6HmGG",navMenuItem:"FCx8FEM",navMenuItemContent:"zMiRxaE",navMenuItemIcon:"lZ2Z9MQ",navMenuItemDropdown:"rwm-agG",navFooterSubMenu:"qMOscoq"};let NavMenu=({themeName:e,locale:t,onClickItem:a})=>{let[n,r]=(0,c.useState)(""),l=(0,c.useMemo)(()=>"marryBaby"===e?navMenuItemsMarryBaby():navMenuItemsHelloSites(),[e]);function handleParentItemClick(e){e.subMenu?r(t=>t?"":e.key):a&&a(e)}return c.createElement("div",{className:Y.navMenu},l.map(e=>c.createElement(NavMenuItem,{key:e.key,item:e,openKey:n,onClickItem:handleParentItemClick,locale:t})))},NavMenuItem=({item:e,openKey:t,onClickItem:a,locale:n})=>{var r;let{t:l}=(0,m.u)();return(null===(r=e.disableLocale)||void 0===r?void 0:r.includes(n))?null:c.createElement("div",{className:`${Y.navMenuItem} nav-menu-item`,"data-is-open":t===e.key,key:e.key,"data-has-submenu":!!e.subMenu},c.createElement("div",{className:Y.navMenuItemContent,onClick:()=>a(e)},e.icon&&c.createElement("div",{className:Y.navMenuItemIcon,style:{backgroundImage:`url("${e.icon}")`}}),l(e.key),e.subMenu&&c.createElement("div",{className:Y.navMenuItemDropdown,style:{"--after-bg":`url(${u.C.getAssetPath("userProfileNav/helloSites/icon-chevronDown.svg")})`}})),e.subMenu&&c.createElement("div",{className:Y.navFooterSubMenu},e.subMenu.map(e=>c.createElement(NavMenuItem,{key:e.key,item:e,openKey:t,onClickItem:a,locale:n}))))};var K={userStats:"_4y-O0w3",wrapper:"kO8iNgD",header:"a1d4E10",headerIcon:"Tdguxxf",headerTitle:"-mOxsaU",headerPoints:"yPeDBNZ"};let J={helloSites:{member:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-member.svg"),ambassador:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-ambassador.svg"),doctor:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-doctor.svg"),expert:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-expert.svg"),influencer:()=>u.C.getAssetPath("userProfileNav/helloSites/icon-rank-influencer.svg")},marryBaby:{member:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-member.svg"),ambassador:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-ambassador.svg"),doctor:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-doctor.svg"),expert:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-expert.svg"),influencer:()=>u.C.getAssetPath("userProfileNav/marryBaby/icon-rank-influencer.svg")}},UserStats=({themeName:e,rank:t="member",numberOfPosts:a=0})=>{let{t:n}=(0,m.u)(),r=(0,c.useMemo)(()=>{var a,n;return(null===(n=null===(a=J[e])||void 0===a?void 0:a[t])||void 0===n?void 0:n.call(a))||""},[t,e]);return c.createElement("div",{className:K.userStats,"data-user-rank":t},c.createElement("div",{className:K.wrapper},c.createElement("div",{className:K.header},c.createElement("div",{className:K.headerIcon,style:{backgroundImage:`url("${r}")`}}),c.createElement("h3",{className:K.headerTitle},n(`userProfile.userRank.${t}`)),a>0&&c.createElement("p",{className:K.headerPoints},a," ",n("userProfile.nav.header.count.posts")))))},UserProfileNavigation=({SSO_URL:e,UP_BASEPATH:t="user",themeName:a="helloSites",cardUrls:n=q,enableCare:r,enableTogether:l,enableEcom:o,enableMySaved:i,userInfo:s,togetherApiDomain:g,userPostsNumber:h,onClickNavigationCard:v,onClickMyProfileButton:E,onClickMenuItem:b,onClickLogout:x,isUserProfileNavigatorMenuHidden:y=!1,isMyHealthEnabled:w=!1,locale:P})=>{let{t:k}=(0,m.u)(),[I,D]=(0,c.useState)(h||0),M="marryBaby"===a;(0,c.useEffect)(()=>{if(s&&void 0===h){let e=(0,d.ej)("hhg_user_token");e&&fetch((0,p.n)((0,C.g)(P,M,g)),{headers:{Authorization:`Bearer ${e}`}}).then(e=>e.json()).then(e=>{var t,a,n;(null==e?void 0:e.status)===1&&(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pagination)&&D((null===(n=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.pagination)||void 0===n?void 0:n.total_items)||0)}).catch(e=>console.error("Error fetching post number",e))}},[P,null!==s,h,g,M]);let S=(0,c.useMemo)(()=>(M?["myHealth","myCommunity","mySaved"]:["myHealth","mySaved","myBooking","myCommunity","eCom"]).filter(e=>"myBooking"===e?r:"myCommunity"===e?l:"myHealth"===e?w:"eCom"===e?o:"mySaved"!==e||i),[M,w]),N=(0,c.useMemo)(()=>"marryBaby"===a?null:c.createElement(f.B,{color:"tertiary",icon:c.createElement("img",{src:u.C.getAssetPath("userProfileNav/helloSites/icon-logOut.svg"),width:15,height:15,loading:"lazy"}),size:"md",onClick:x,className:"XIyViFs"},k("userProfile.nav.menu.logout")),[a]),push=a=>{a.startsWith("http")||a.startsWith("/")?window.location.href=(0,p.e)(a):e&&(window.location.href=(0,p.e)(`${e}${t}/${a}`))},handleClickCardItem=e=>{let t=n[e];v?v(t):push(t)};return s?c.createElement("div",{className:"-AZt1au","data-theme":a},c.createElement(NavHeader,{userInfo:s,themeName:a,onClickMyProfileButton:()=>{E?E():push("profile")}}),c.createElement(UserStats,{themeName:a,rank:"member",numberOfPosts:I}),c.createElement("div",{className:"IvSIfCI"},S.map(e=>c.createElement(NavigationCard,{className:"eahCJov",key:e,themeName:a,type:e,onClick:handleClickCardItem}))),!y&&c.createElement(c.Fragment,null,c.createElement(NavMenu,{themeName:a,locale:P,onClickItem:e=>{"logout"===e.link&&x?x():e.link&&!e.subMenu&&(b?b(e.link):push(e.link))}}),N)):null},X=E.Z.div` ${b.M.mbUp} { margin: 0; } color: ${g.r.colors.gray1000}; margin-bottom: 1rem; .txt-body-1 { font-size: 0.8125rem; line-height: 1.25rem; ${b.M.mbUp} { font-size: 0.9375rem; line-height: 1.5rem; color: ${g.r.colors.gray700}; } } .txt-body-2 { font-size: 0.9375rem; line-height: 1.5rem; padding: 0.75rem 0 0; font-weight: 500; ${b.M.mbUp} { padding: 0; font-weight: 600; } } .txt-hours { font-weight: 500; color: ${g.r.colors.gray1000}; } `,ee=E.Z.div` ${b.M.mbUp} { padding: 8px 0; gap: 4px; } display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid ${g.r.colors.neutral100}; &:last-child { border-bottom: 0; } `;function OpeningHours({workingTimes:e}){let{t}=(0,m.u)(),a=(0,c.useMemo)(()=>{let a=[],n="";return v.w.forEach(t=>{let r=e[t];if(r){let e=r.map(e=>`${e.start_at}-${e.end_at}`).join("|");n===e?a[a.length-1]=[...a[a.length-1],t]:a.push([t]),n=e}}),a.map(a=>{var n;if(!a.length)return null;let r=t(`workingDays.${a[0]}`);return a.length>1&&(r=`${r} - ${t(`workingDays.${a.at(-1)}`)}`),{day:r,value:null===(n=e[a[0]])||void 0===n?void 0:n.map(e=>`${e.start_at.slice(0,5)} - ${e.end_at.slice(0,5)}`).join(", ")}})},[e]);return c.createElement(X,null,c.createElement("div",{className:"txt-body-2"},t("detail.openHours")),c.createElement("div",{className:"opening-hours-container"},a.map((e,t)=>c.createElement(ee,{className:"txt-body-1",key:t},c.createElement("div",null,null==e?void 0:e.day),c.createElement("div",{className:"txt-hours"},null==e?void 0:e.value)))))}let getHospitalUrl=(e,t)=>{var a;return`/${null===(a=S.L[e])||void 0===a?void 0:a.HOSPITAL}/${t.slug}-${t.id}`},et=E.Z.div` position: relative; min-height: calc(var(--mapHeight) + var(--card-height)); &:not([data-has-card]) { --mapCardHeight: calc(var(--mapHeight) + 32px); height: var(--mapCardHeight); } strong { font-weight: 700; &::after { content: ' '; } } iframe { max-width: 100%; /* padding-top: calc(var(--mapHeight) / var(--mapWidth) * 100%); */ } &[data-has-floating-card='true'] { --card-height: 0; .card { position: absolute; top: 10px; left: 10px; max-width: 329px; } } .map { width: 100%; height: var(--mapHeight); border-radius: 6px 6px 0px 0px; @media (max-width: 768px) { height: auto; } } .infoList { display: flex; margin-top: 8px; svg { min-width: 24px; margin-right: 8px; } } a { text-decoration: none; } .directions { margin-top: 16px; } .directionsNo { display: inline-block; margin-top: 8px; margin-bottom: 24px; color: ${g.r.colors.primaryBase}; } `,ea=E.Z.div` padding: 16px; border: 1px solid ${g.r.colors.neutral200} background: ${g.r.colors.white} border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 0; border-top-right-radius: 0; max-width: 100%; &:not([data-is-full-width]) { @media (min-width: 768px) { width: var(--mapWidth); } } `,en=E.Z.div` margin-top: 4px; color: ${g.r.colors.gray600}; font-size: 14px; line-height: 22px; letter-spacing: -0.1px; address { display: inline; } .dots { display: inline-flex; margin: 0 0.5rem; vertical-align: middle; ~ span { color: ${g.r.colors.gray500}; } } `,er=E.Z.a` display: flex; align-items: center; span { color: ${g.r.colors.gray500}; } svg { margin: 0 8px; } `,el=(0,E.Z)(f.B)` margin-top: 12px; width: max-content; `,eo=E.Z.div` ${b.M.mbUp} { display: flex; gap: ${(0,x.h)(24)}; padding: 0 ${(0,x.h)(24)} ${(0,x.h)(24)}; } color: #111111; padding: 0 ${(0,x.h)(16)} ${(0,x.h)(16)}; .name { ${b.M.mbUp} { font-weight: 600; } font-size: 0.9375rem; line-height: 1.5rem; font-weight: 500; } address { ${b.M.mbUp} { font-size: 0.9375rem; line-height: 1.5rem; font-style: normal; } font-size: 0.8125rem; line-height: 1.25rem; font-weight: 400; } .contact-item { display: inline-flex; align-items: center; padding: 8px 12px; gap: 8px; border: ${g.r.colors.neutral100} 1px solid; border-radius: 12px; a { text-decoration: none; color: currentColor; font-size: 0.8125rem; line-height: 1.25rem; font-weight: 500; } } /* .map-card { border: none; } */ `,ei=(0,E.Z)(e=>{let{className:t,hospital:a,hasNoCard:n,isFullWidth:r,height:l=256,width:o=768,isUsingEmbedMap:i=!0,isCardFloating:s=!1,distance:d,isLoggedIn:u,locale:p,googleMapKey:C,onPhoneHospital:f,dataEventCategory:v,dataEventAction:E,dataEventLabel:b}=e,{latitude:x,longitude:y,address:w,name:P}=a,I=parseFloat(x),S=parseFloat(y),F={lng:S,lat:I},L=(0,c.useRef)(null),{t:_}=(0,m.u)(),H=c.useCallback(function(e){setTimeout(()=>{e.setZoom(14),e.setCenter(F)},100)},[]),$={"--mapHeight":l+"px","--mapWidth":o+"px","--card-height":n||s||!L.current?0:L.current.clientHeight+"px"};return c.createElement(et,{className:D()(t),style:$,"data-has-card":!n||void 0,"data-has-floating-card":s||void 0},c.createElement("div",{className:"map"},i?c.createElement("iframe",{width:o,height:l,style:{border:0},className:"aspect-ratio-map",loading:"lazy",allowFullScreen:!0,src:`https://www.google.com/maps/embed/v1/place?key=${C}&q=${a.latitude},${a.longitude}&zoom=14`}):c.createElement(k.LoadScript,{googleMapsApiKey:C||""},c.createElement(k.GoogleMap,{mapContainerClassName:"map",center:F,zoom:14,onLoad:H,options:{mapTypeControl:!1,fullscreenControl:!1}},c.createElement(k.Marker,{position:F}))),n?null:c.createElement(ea,{className:D()("map-card"),"data-is-full-width":r||void 0,ref:L},c.createElement(er,{href:`${M.b}${getHospitalUrl(p,a)}`},c.createElement(N.T,{size:"s2",type:"semiBold"},P)),c.createElement(en,null,c.createElement("address",null,w),void 0!==d&&c.createElement(c.Fragment,null,c.createElement(h.I,{iconSize:4,wrapperSize:16,svgIcon:{fill:g.r.colors.gray400},wrapperStyle:{transform:"translateY(-2px)"}},c.createElement(Ellipse,null)),c.createElement("span",null,d," km"))),a.phone&&c.createElement(el,{size:"md",color:"tertiary",isBlock:!1,onClick:f,icon:c.createElement(PhoneInactive,null),dataEventCategory:v,dataEventAction:E,dataEventLabel:b},u||"ms-MY"===p?a.phone:_("doctorInfoComponent.loginToCall")))))})` &.panel-map { --mapCardHeight: --cardHeight; } iframe { ${b.M.mbUp} { width: ${(0,x.h)(180)}; height: ${(0,x.h)(180)}; } border-radius: 12px; overflow: hidden; } `,es=(0,E.Z)(Mobile)` width: 1rem; height: 1rem; `,ec=(0,E.Z)(Email)` width: 1rem; height: 1rem; `,em=E.Z.div` ${b.M.mbUp} { padding: 0; display: flex; flex-direction: column; gap: 24px; } .clinic-content { display: flex; flex-direction: column; ${b.M.mbUp} { gap: 8px; } gap: 12px; } padding-top: 1rem; padding-bottom: 1rem; padding-left: 4.5px; padding-right: 4.5px; flex: 1; & > * + * { margin-top: 0.75rem; } `,ed=E.Z.div` display: flex; flex-wrap: nowrap; gap: 0.75rem; `,eu=(0,E.Z)(h.D)` border-radius: 0.75rem !important; `,ep=E.Z.div` display: flex; gap: 4px; flex-direction: column; ${b.M.mbUp} { flex-direction: row; } .contact-item { width: fit-content; } `;function ClinicInfo(e){let{hospitalInfo:t,distance:a,isLoggedIn:n,locale:r,googleMapKey:l,onPhoneHospital:o,dataEventCategory:i,dataEventAction:s,dataEventLabel:m}=e,d={latitude:t.latitude||"",longitude:t.longitude||"",address:t.address||"",name:t.name||"",phone:t.phone||"",email:t.email||""};return c.createElement(eo,null,c.createElement(ei,{dataEventAction:s,dataEventCategory:i,dataEventLabel:m,googleMapKey:l,hasNoCard:!0,hospital:d,locale:r,isLoggedIn:n,isFullWidth:!0,height:220,className:"panel-map",onPhoneHospital:o}),c.createElement(em,null,c.createElement("div",{className:"clinic-content"},c.createElement("div",{className:"name"},t.name),c.createElement(ed,null,c.createElement("address",null,t.address),a&&c.createElement("div",{style:{flexShrink:0}},c.createElement(eu,{value:`${a} km`}))),c.createElement(ep,null,t.phone&&c.createElement("div",{className:"contact-item"},c.createElement(es,null),c.createElement("a",{href:`tel:${t.phone}`},(0,F.f)(t.phone))),t.email&&c.createElement("div",{className:"contact-item"},c.createElement(ec,null),c.createElement("a",{href:`mailto:${null==t?void 0:t.email}`},t.email)))),t.working_times&&c.createElement(OpeningHours,{workingTimes:t.working_times})))}let eg=E.Z.div` .mantine-Input-input.custom_input { /* font-size: 16px; */ } .info { display: flex; flex-direction: column; gap: 24px; align-items: center; padding: 24px 16px; h5 { font-weight: 600; font-size: 1.25rem; line-height: 1.75rem; letter-spacing: -0.4px; text-align: center; } .description { color: ${g.r.colors.gray700}; text-align: center; font-size: 0.8125rem; font-weight: 400; line-height: 1.25rem; letter-spacing: -0.3px; } } .mb-1 { margin-bottom: 4px; } .w-full { width: 100%; } .px-3 { padding-left: 12px; padding-right: 12px; } .action { padding: 8px 16px; &.actionBox { border-top: 0.5px solid ${g.r.colors.neutral100}; } } `,eh=(0,E.Z)(j.B)` &.mantine-Button-root { border-radius: 12px; border: 1px solid; font-size: 15px; &.tertiary { border-color: ${g.r.colors.neutral200}; } } .mantine-Button-label { display: flex; align-items: center; justify-content: center; gap: 8px; } `;(0,E.Z)(H.D)``;let eC=(0,E.Z)(O.P)` --custom-primary-text: #111111; .PhoneInputCountry { pointer-events: none; --phone-select: 58px; } &.PhoneInput { .PhoneInputCountry { } .PhoneInputCountryIconCallingCode { color: var(--custom-primary-text); } .PhoneInputInput { color: var(--custom-primary-text) !important ; :focus { color: var(--custom-primary-text) !important ; } } } `,ef=(0,E.Z)(O.I.Wrapper)` --phone-input-space-x: -8px; .mantine-Text-root[data-size='c1'] { font-size: 0.75rem; } .mantine-Text-root[data-size='p3'] { font-size: 0.8125rem; } .mantine-Text-root[data-size='p2'] { font-size: 0.9375rem; } `,ev={ZALO:"Zalo",WHATS_APP:"Whatsapp"};function CollectPhoneForm({onSubmit:e,title:t,formType:a=ev.ZALO,isLoading:n,locale:r}){let{t:l}=(0,m.u)(),[o,i]=(0,c.useState)(""),[s,d]=(0,c.useState)(""),[u,p]=(0,c.useState)(!1),{classes:g}=(0,$.u)(),validatePhone=e=>{try{if(!e){d(l("collectPhoneNumber.phoneRequired"));return}let t=(0,B.parsePhoneNumber)(e,"VN");(null==t?void 0:t.isValid())?d(""):d(l("collectPhoneNumber.inputInvalid"))}catch(e){d(l("collectPhoneNumber.inputInvalid"))}},handleChange=e=>{validatePhone(e),i(e)};return c.createElement(eg,null,c.createElement("div",{className:"info"},a===ev.ZALO&&c.createElement(HelloZalo,{width:84,height:48})," ",c.createElement("h5",{className:"px-3"},t||l("collectPhoneNumber.title",{name:a})),c.createElement($.T,{shrink:!!o,className:(0,y.default)("leadgen-form_input w-full",{"leadgen-form_field_error":!!(u&&s)})},c.createElement($.T.Control,{htmlFor:"collection_phone_input"},({shrink:e})=>c.createElement(ef,{"data-invalid":!!(u&&s),labelElement:"div",label:c.createElement(T.T,{size:e?"p3":"p2",variant:"secondary",weight:"halfBold"},l("collectPhoneNumber.inputLabel")),inputWrapperOrder:["label","input","description","error"],error:u&&s&&c.createElement(w.k,{align:"center",gap:4},c.createElement(O.E,{size:12}),c.createElement(T.T,{size:"c1",variant:"error"},s))},c.createElement(P.x,{className:"mantine-Input-wrapper",sx:e=>({".PhoneInput .PhoneInputInput":Object.assign(Object.assign({},(0,R.G)(e)[R.C.LEADGEN].p2),{fontWeight:R.F.halfBold})})},c.createElement(eC,{inputId:"collection_phone_input",onChange:handleChange,className:`mantine-Input-input ${g.p2}`,name:"phoneNumber",spellCheck:!1,placeholder:" ",defaultCountry:r&&z.M[r]||"VN",type:"text",value:o,"data-control":"tel",countries:["VN"],arrowComponent:()=>c.createElement(c.Fragment,null)})))))),c.createElement("div",{className:"action actionBox"},c.createElement(eh,{variant:"primary",onClick:()=>{validatePhone(o),p(!0);let t=(0,B.parsePhoneNumber)(o,"VN");if(t&&t.isValid()){let a=t.countryCallingCode;e({phone:t.nationalNumber,countryCode:t.country,callingCode:(null==a?void 0:a.includes("+"))?a:`+${a}`})}},fullWidth:!0,size:"lg",loading:n},c.createElement("div",null,l("collectPhoneNumber.action")),c.createElement("img",{src:"data:image/svg+xml,%3csvg width='21' height='20' viewBox='0 0 21 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.04169 13.5416L12.5834 9.99998L9.04169 6.45831' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"arrow icon",width:20,height:20}))))}function CollectPhoneSuccess({onClose:e}){let{t}=(0,m.u)();return c.createElement(eg,null,c.createElement("div",{className:"info"},c.createElement(Check,{width:80,height:80}),c.createElement("div",null,c.createElement("h5",{className:"mb-1"},t("collectPhoneNumber.titleSuccess")),c.createElement("p",{className:"description"},t("collectPhoneNumber.descriptionSuccess")))),c.createElement("div",{className:"action"},c.createElement(eh,{variant:"tertiary",onClick:e,fullWidth:!0,size:"lg"},t("common.action.close"))))}function PopupCollectPhone({children:e,isMobile:t,onSubmit:a,isOpen:n,onOpenChange:r,drawerProps:l={}}){let i=(0,_.q)(n),[s,m]=(0,c.useState)(o.FORM),[d,{open:u,toggle:p,close:g}]=i,[h,C]=(0,c.useState)(!1),handleOpenChange=e=>{e?u():g(),null==r||r(e)},handleClose=()=>{handleOpenChange(!1)};return(0,c.useEffect)(()=>{d&&m(o.FORM)},[d]),(0,c.useEffect)(()=>{handleOpenChange(n)},[n]),c.createElement(c.Fragment,null,"function"==typeof e?e(i):c.createElement("div",{onClick:p},e),c.createElement(H.D,Object.assign({isOpen:d,onClose:handleClose,onOpenChange:handleOpenChange,isMobile:t,fadeFromIndex:M.Z-9e6,zIndex:M.Z,repositionInputs:!1,isLinear:s===o.SUCCESS},l),s===o.FORM&&c.createElement(CollectPhoneForm,{onSubmit:e=>(0,L.a)(this,void 0,void 0,function*(){try{C(!0),yield a(e),m(o.SUCCESS)}catch(e){console.log("\uD83D\uDE80 ~ handleSubmit ~ error:",e)}finally{C(!1)}}),isLoading:h}),s===o.SUCCESS&&c.createElement(CollectPhoneSuccess,{onClose:handleClose})))}(n=o||(o={}))[n.FORM=0]="FORM",n[n.SUCCESS=1]="SUCCESS";let eE=E.Z.div` padding-top: 16px; padding-bottom: 16px; width: 100%; & #request_consultation_name_input.mantine-Input-input { font-size: 15px; font-weight: 500; line-height: 24px; letter-spacing: -0.3px; color: ${g.r.colors.gray1000}; } & #gender-option-control-label { font-size: 13px; font-weight: 500; line-height: 20px; letter-spacing: -0.3px; color: ${g.r.colors.gray600}; } & .radio-group .gender-item .mantine-Radio-label { border-radius: 8px; } & .info { .PhoneInput .PhoneInputInput { &:focus { border-color: unset; outline: none; box-shadow: none; } &:hover { border-color: unset; outline: none; box-shadow: none; } } } ${b.M.mbUp} { width: 420px; padding-top: 32px; padding-bottom: 32px; } .mantine-Input-input.custom_input { /* font-size: 16px; */ } .formHeader { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 24px; margin-bottom: 34px; ${b.M.mbUp} { margin-bottom: 24px; } } .formHeaderIcon { width: 40px; height: 40px; flex-shrink: 0; svg { width: 40px; height: 40px; } } .formCloseButton { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: ${g.r.colors.white}; border: none; cursor: pointer; color: ${g.r.colors.gray800}; :hover { background: ${g.r.colors.gray100}; } } .formTitleBlock { margin-top: 4px; padding: 0 24px 24px; } .formTitle { font-weight: 600; font-size: 1.375rem; line-height: 2rem; letter-spacing: -0.4px; color: ${g.r.colors.gray800}; margin-bottom: 12px; } .formSubtitle { color: ${g.r.colors.gray600}; font-size: 0.875rem; font-weight: 400; line-height: 1.375rem; letter-spacing: -0.2px; margin: 0; } .info { display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding: 0 24px 16px; text-align: left; h5 { font-weight: 600; font-size: 1.25rem; line-height: 1.75rem; letter-spacing: -0.4px; text-align: center; } .description { color: ${g.r.colors.gray700}; text-align: center; font-size: 0.8125rem; font-weight: 400; line-height: 1.25rem; letter-spacing: -0.3px; } &.center { align-items: center; } } .mb-1 { margin-bottom: 4px; } .w-full { width: 100%; } .px-3 { padding-left: 12px; padding-right: 12px; } .action { padding: 0px 24px; width: 100%; &.actionBox { border-top: 0.5px solid ${g.r.colors.neutral100}; padding-top: 16px; } } &.formSuccess { display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; height: 100%; .action { padding: 0px 24px; } } `,eb=(0,E.Z)(j.B)` &.mantine-Button-root { border-radius: 8px; font-size: 16px; font-weight: 600; line-height: 24px; &:hover { background-color: ${g.r.colors.primaryBase}; } background-color: ${g.r.colors.primaryBase}; color: ${g.r.colors.white}; &.tertiary { border-color: ${g.r.colors.neutral200}; } } .mantine-Button-label { display: flex; align-items: center; justify-content: center; gap: 8px; } `,ex=(0,E.Z)(H.D)` ${b.M.mbDown} { .mantine-Modal-content { height: 100dvh; } } .mantine-Modal-body { padding: 0; height: 100%; .formSuccess { background: linear-gradient(180deg, #a5d4ff 0%, #ffffff 50%); } } `,ey=(0,E.Z)(O.P)` --custom-primary-text: #111111; .PhoneInputCountry { pointer-events: none; --phone-select: 58px; } &.PhoneInput { .PhoneInputCountry { } .PhoneInputCountryIconCallingCode { color: var(--custom-primary-text); } .PhoneInputInput { color: var(--custom-primary-text) !important ; :focus { color: var(--custom-primary-text) !important ; } } } `,ew=(0,E.Z)(O.I.Wrapper)` --phone-input-space-x: -8px; .mantine-Text-root[data-size='c1'] { font-size: 0.75rem; } .mantine-Text-root[data-size='p3'] { font-size: 0.8125rem; } .mantine-Text-root[data-size='p2'] { font-size: 0.9375rem; } `;(r=i||(i={})).Male="male",r.Female="female";let eP=["VN","MY"];function RequestConsultationForm({onSubmit:e,onClose:t,title:a,isLoading:n,locale:r}){let{t:l}=(0,m.u)(),[o,s]=(0,c.useState)(""),[d,u]=(0,c.useState)(""),[p,g]=(0,c.useState)(i.Female),[h,C]=(0,c.useState)(""),[f,v]=(0,c.useState)(""),[E,b]=(0,c.useState)(""),[x,k]=(0,c.useState)(!1),{classes:I}=(0,$.u)(),D=r&&U.M[r]||"VN",validatePhone=e=>{try{if(!e)return v(l("collectPhoneNumber.phoneRequired")),!1;let t=(0,B.parsePhoneNumber)(e,D);if(!(null==t?void 0:t.isValid()))return v(l("collectPhoneNumber.inputInvalid")),!1;return v(""),!0}catch(e){return v(l("collectPhoneNumber.inputInvalid")),!1}},handlePhoneChange=e=>{u(e),e?validatePhone(e):v("")};return c.createElement(eE,null,c.createElement("div",{className:"formHeader"},c.createElement("div",{className:"formHeaderIcon"},c.createElement(Comment,{width:24,height:24})),c.createElement("button",{type:"button",className:"formCloseButton",onClick:t,"aria-label":l("common.action.close")},c.createElement(Z.C,{width:20,height:20}))),c.createElement("div",{className:"formTitleBlock"},c.createElement("h2",{className:"formTitle"},a||l("popupRequestConsultation.title")),c.createElement("p",{className:"formSubtitle"},l("popupRequestConsultation.subtitle"))),c.createElement("div",{className:"info"},c.createElement($.T,{shrink:!!o,className:(0,y.default)("leadgen-form_input w-full",{"leadgen-form_field_error":!!(x&&h)})},c.createElement($.T.Control,{htmlFor:"request_consultation_name_input"},({shrink:e})=>c.createElement(ew,{"data-invalid":!!(x&&h),labelElement:"div",label:c.createElement(T.T,{size:e?"p3":"p2",variant:"secondary",weight:"halfBold"},l("popupRequestConsultation.yourName")),inputWrapperOrder:["label","input","description","error"],error:x&&h&&c.createElement(w.k,{align:"center",gap:4},c.createElement(O.E,{size:12}),c.createElement(T.T,{size:"c1",variant:"error"},h))},c.createElement(O.I,{id:"request_consultation_name_input",value:o,onChange:e=>{s(null!=e?e:""),x&&h&&C("")},placeholder:" ",classNames:{input:`mantine-Input-input ${I.p2}`}})))),c.createElement($.T,{shrink:!!d,className:(0,y.default)("leadgen-form_input w-full",{"leadgen-form_field_error":!!(x&&f)})},c.createElement($.T.Control,{htmlFor:"request_consultation_phone_input"},({shrink:e})=>c.createElement(ew,{"data-invalid":!!(x&&f),labelElement:"div",label:c.createElement(T.T,{size:e?"p3":"p2",variant:"secondary",weight:"halfBold"},l("popupRequestConsultation.phoneLabel")),inputWrapperOrder:["label","input","description","error"],error:x&&f&&c.createElement(w.k,{align:"center",gap:4},c.createElement(O.E,{size:12}),c.createElement(T.T,{size:"c1",variant:"error"},f))},c.createElement(P.x,{className:"mantine-Input-wrapper",sx:e=>({".PhoneInput .PhoneInputInput":Object.assign(Object.assign({},(0,R.G)(e)[R.C.LEADGEN].p2),{fontWeight:R.F.halfBold})})},c.createElement(ey,{inputId:"request_consultation_phone_input",onChange:handlePhoneChange,className:`mantine-Input-input ${I.p2}`,name:"phoneNumber",spellCheck:!1,placeholder:" ",defaultCountry:D,type:"text",value:d,"data-control":"tel",countries:eP,arrowComponent:()=>c.createElement(c.Fragment,null)}))))),c.createElement(A.G,{id:"gender-option-control-consultation",label:l("popupRequestConsultation.gender"),type:"button",value:p||void 0,onChange:e=>{g(e),x&&E&&b("")},error:x&&E?E:void 0,styles:{wrapper:{flexDirection:"row-reverse"}},labelText:{size:"title2",color:"gray800",fw:500}})),c.createElement("div",{className:"action"},c.createElement(eb,{variant:"primary",onClick:()=>{k(!0);let t=!!(null==o?void 0:o.trim());t?C(""):C(l("popupRequestConsultation.nameRequired"));let a=validatePhone(d),n=p===i.Male||p===i.Female;if(n?b(""):b(l("popupRequestConsultation.genderRequired")),!t||!a||!n)return;let r=(0,B.parsePhoneNumber)(d,D);if(!r||!r.isValid())return;let s=r.countryCallingCode;e({name:o.trim(),phone:r.nationalNumber,countryCode:r.country,callingCode:(null==s?void 0:s.includes("+"))?s:`+${s}`,gender:p})},fullWidth:!0,size:"lg",loading:n},l("popupRequestConsultation.action"))))}function RequestConsultationSuccess({onClose:e}){let{t}=(0,m.u)();return c.createElement(eE,{className:"formSuccess"},c.createElement("div",{className:"formTitleBlock"},c.createElement(Check,{width:64,height:64})),c.createElement("div",{className:"formTitleBlock"},c.createElement("h2",{className:"formTitle"},t("popupRequestConsultation.titleSuccess")),c.createElement("p",{className:"formSubtitle"},t("popupRequestConsultation.descriptionSuccess"))),c.createElement("div",{className:"action"},c.createElement(eb,{variant:"tertiary",onClick:e,fullWidth:!0,size:"lg"},t("common.action.close"))))}function PopupRequestConsultation({children:e,isMobile:t,onSubmit:a,isOpen:n,onOpenChange:r,drawerProps:l={},locale:o}){let i=(0,_.q)(n),[m,d]=(0,c.useState)(s.FORM),[u,{open:p,toggle:g,close:h}]=i,[C,f]=(0,c.useState)(!1),handleOpenChange=e=>{e?p():h(),null==r||r(e)},handleClose=()=>{handleOpenChange(!1)};return(0,c.useEffect)(()=>{u&&d(s.FORM)},[u]),(0,c.useEffect)(()=>{handleOpenChange(n)},[n]),c.createElement(c.Fragment,null,"function"==typeof e?e(i):c.createElement("div",{onClick:g},e),c.createElement(ex,Object.assign({isOpen:u,onClose:handleClose,onOpenChange:handleOpenChange,isMobile:!1,fadeFromIndex:M.Z-9e6,zIndex:M.Z,repositionInputs:!1,isLinear:!0,withCloseButton:!1,fullScreen:t},l),m===s.FORM&&c.createElement(RequestConsultationForm,{onSubmit:e=>(0,L.a)(this,void 0,void 0,function*(){try{f(!0),yield a(e),d(s.SUCCESS)}catch(e){console.log("\uD83D\uDE80 ~ handleSubmit ~ error:",e)}finally{f(!1)}}),onClose:handleClose,isLoading:C,locale:o}),m===s.SUCCESS&&c.createElement(RequestConsultationSuccess,{onClose:handleClose})))}(l=s||(s={}))[l.FORM=0]="FORM",l[l.SUCCESS=1]="SUCCESS";let ek=E.Z.div` display: flex; align-items: center; justify-content: space-between; gap: 12px; .hospitalName { color: #111111; font-size: 0.8125rem; font-weight: 500; line-height: 1.25rem; } .hospitalStatus { display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; font-size: 0.6875rem; line-height: 1rem; color: ${g.r.colors.red600}; &[data-is-opened='true'] { color: ${g.r.colors.primaryBase}; } } .distanceTag { padding: 4px 0px; } .flex-1 { flex: 1 1 0%; } `,eI=(0,E.Z)(V.I)` /* object-contain object-center aspect-square */ width: 44px; height: 44px; background-color: ${g.r.colors.neutral50}; padding: 2px; object-fit: contain; object-position: center; border-radius: 8px; flex-shrink: 0; aspect-ratio: 1; align-self: baseline; `,eD=(0,E.Z)(Clock)` width: 12px; height: 12px; `,eM=(0,E.Z)(h.S)` flex-shrink: 0; color: ${g.r.colors.gray400}; width: 12px; height: 12px; transform: rotate(90deg); & > path { stroke-width: 1.5; } `,eS=(0,E.Z)(h.D)` & > span { color: ${g.r.colors.gray800}; } & { border: none; } `,checkHospitalStatus=e=>{if(!e)return!1;let t=new Date,a=v.w.at(t.getDay()-1),n=e[a];return null==n?void 0:n.some(e=>{let[a,n]=e.start_at.split(":").map(parseInt),[r,l]=e.end_at.split(":").map(parseInt),o=t.getHours(),i=t.getMinutes();return a===r&&r==o?!(il):!(or)})};function HospitalInfo({hospitalInfo:e,distance:t,className:a}){let{t:n}=(0,m.u)(),[r,l]=(0,c.useState)(null);return(0,c.useEffect)(()=>{l(checkHospitalStatus(e.working_times))},[e.working_times]),c.createElement(ek,{className:a},c.createElement(eI,{src:e.logo,backupSrc:u.C.getAssetPath("avatar.jpg"),alt:"hospital"}),c.createElement("div",{className:"flex-1"},c.createElement("div",{className:"hospitalName"},e.name),e.working_times&&null!==r&&c.createElement("div",{className:"hospitalStatus","data-is-opened":r},c.createElement(eD,null),c.createElement(T.T,{size:"p3",weight:"regular",color:"inherit"},n(r?"hospital.status.opening":"hospital.status.closed"))),t&&c.createElement(eS,{className:D()({distanceTag:null===e.working_times}),value:`${t} km`})),c.createElement(eM,null))}let eN=E.Z.div` padding: 0 1rem 1.25rem; & > :not(:first-child) { margin-top: 1.25rem; } .txt-body-1 { font-size: 0.8125rem; line-height: 1.25rem; color: ${g.r.colors.gray700}; } .txt-body-2 { font-size: 0.9375rem; line-height: 1.5rem; color: ${g.r.colors.gray800}; font-weight: 600; } .txt-caption-1 { font-size: 0.6875rem; line-height: 1rem; color: ${g.r.colors.gray800}; } h3 { padding: 1rem 0; } `,eF=(0,E.Z)(W.I)` gap: 8px; margin-top: 1rem; & .insuranceItem > .insuranceLogo { height: 64px; border-radius: 12px; border-color: ${g.r.colors.neutral100}; & > img { height: auto; aspect-ratio: 109/64; } } `;function ProductInsuranceInfo({hospitalInfo:e,isMobile:t=!1}){let{t:a}=(0,m.u)(),n=(null==e?void 0:e.accepted_payments)&&e.accepted_payments.length>0;return c.createElement(eN,{id:"insurance-container"},c.createElement("div",null,c.createElement("h3",{className:"txt-body-2"},a("common.insurance")),c.createElement("p",{className:"txt-body-1"},a("common.insuranceIntro")),c.createElement(eF,{insurances:e.insurances,isName:!1})),n&&c.createElement("div",null,c.createElement("h3",{className:"txt-body-2"},a("common.paymentMethods")),c.createElement(W.P,{payments:e.accepted_payments,isMobile:t})))}let eL=(0,c.createContext)({id:"",name:"",specialty:"",experience:"",profileImage:"",clinics:"",educations:[],expertise:"",otherHighlights:[]}),DoctorExpertiseProvider=({children:e,value:t})=>c.createElement(eL.Provider,{value:t},e),e_=E.Z.div` display: flex; align-items: center; flex-direction: column; background-color: ${g.r.colors.blue50}; border-radius: 12px; padding: 0px 4px 4px; .body-section { width: 100%; height: 100%; } `,eH=E.Z.div` background-color: #ffffffcc; border-radius: 8px; padding: 0.75rem; display: flex; flex-direction: column; justify-content: space-between; .flex-item-doctor-info { display: flex; flex-direction: column; gap: 12px; } `,e$=E.Z.div` cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px; `,eB=E.Z.div` display: flex; justify-content: flex-end; `,eO=(0,E.Z)(W.A)` width: 0.65rem; height: 0.65rem; & > path { stroke-width: 1.25; } `,DoctorExpertise=e=>{var t,a,n,r;let{className:l,doctorInformation:o,onClickReadMore:i,children:s,isShowReadMoreButton:d,style:u,defaultProfileImage:p}=e,{t:h}=(0,m.u)(),C=(null===(t=null==o?void 0:o.clinics)||void 0===t?void 0:t.length)>0||(null===(a=null==o?void 0:o.educations)||void 0===a?void 0:a.length)>0||s||d;return c.createElement(DoctorExpertiseProvider,{value:o},c.createElement(e_,{className:l,style:u},c.createElement(W.a,{name:o.name,specialty:o.specialty,experience:o.experience,profileImage:o.profileImage||p}),C&&c.createElement(eH,{className:"body-section"},c.createElement("div",{className:"flex-item-doctor-info"},(null===(n=null==o?void 0:o.clinics)||void 0===n?void 0:n.length)>0&&c.createElement(W.D,{doctorInfo:o.clinics,Icon:W.C,title:h("common.clinicHospital")}),(null===(r=null==o?void 0:o.educations)||void 0===r?void 0:r.length)>0&&c.createElement(W.D,{doctorInfo:o.educations,Icon:Education,title:h("common.education")}),s),d&&c.createElement(eB,null,c.createElement(e$,{onClick:i},c.createElement(T.T,{size:"p2",weight:"halfBold",color:g.r.colors.primaryBase},h("common.readMore")),c.createElement(eO,null))))))};DoctorExpertise.Expertise=()=>{let{expertise:e}=(0,c.useContext)(eL),{t}=(0,m.u)();return e?c.createElement(W.D,{doctorInfo:e,Icon:Credential,title:t("common.expertiseCredentials")}):null},DoctorExpertise.OtherHighlights=()=>{let{otherHighlights:e}=(0,c.useContext)(eL),{t}=(0,m.u)();return e?c.createElement(W.D,{doctorInfo:e,Icon:Highlight,title:t("common.otherHighlights")}):null};let eR=E.Z.div` display: flex; flex-direction: column; gap: ${(0,x.h)(12)}; `,ej=E.Z.div` display: flex; flex-direction: column; gap: ${(0,x.h)(8)}; `,ez=E.Z.div` display: flex; flex-direction: column; gap: ${(0,x.h)(4)}; `,eT=E.Z.div` display: flex; gap: ${(0,x.h)(4)}; align-items: center; `,eA=E.Z.span` color: ${g.r.colors.gray600}; `,ArticleDetailCard=e=>{let{article:t,doctor:a,className:n,style:r,handleClick:l,altText:o}=e,{articleType:i,articleTitle:s,articleTypeColor:d,image:u,defaultImage:p}=t||{},{doctorName:h,doctorAvatar:C,defaultDoctorAvatar:f}=a||{},{t:v}=(0,m.u)();return c.createElement(eR,{className:n,style:r,onClick:l},c.createElement(V.I,{alt:o||s||"article-image",src:u||p,style:{width:"100%",height:(0,x.h)(143.5),objectFit:"cover",borderRadius:(0,x.h)(4)}}),c.createElement(ej,null,c.createElement(ez,null,c.createElement(T.T,{color:d||g.r.colors.green600,size:"c1",weight:"halfBold"},i),c.createElement(T.T,{size:"p2",weight:"semiBold",color:g.r.colors.gray800,lineClamp:2},s)),c.createElement(eT,null,c.createElement(V.I,{alt:`${v("common.articleCard.reviewedDoctor")} ${h}`,src:C||f,style:{width:(0,x.h)(20),height:(0,x.h)(20),borderRadius:"50%"}}),c.createElement("div",null,c.createElement(T.T,{size:"c1",weight:"regular",color:g.r.colors.gray800,lineClamp:1},c.createElement(eA,null,v("common.articleCard.reviewedDoctor"),":")," ",h)))))}},"/TVU":function(e,t,a){a.d(t,{T:function(){return Tabs}});var n=a("z/kP"),r=a("q1tI"),l=a("aKYm"),o=a("VLUI"),i=a("/npG"),s=a("mYVa"),c=a("rlLN"),m=a("vaps"),d=a("g8xC"),u=a("/kWL"),p=(0,i.k)((e,t)=>{let{variant:a}=t,n={content:"none",top:0,bottom:0,zIndex:1,width:(0,s.h)(56)};return Object.assign({},"inline"===a&&{root:{},tabsList:{gap:(0,s.h)(24),borderBottom:"none",flexWrap:"nowrap"},tab:{padding:`${(0,s.h)(8)} 0`,color:e.colors.gray[4],borderColor:"transparent",borderBottomWidth:(0,s.h)(2),marginBottom:(0,s.h)(-1),transition:"border 0.2s ease","&:hover":{backgroundColor:"initial",borderColor:"transparent"},"&[data-active='true']":{color:e.fn.primaryColor(),borderColor:e.fn.primaryColor()}},tabRightSection:{},tabLabel:{},tabIcon:{},panel:{},scrollArea:{position:"relative","&.prev-bg":{"&:before":Object.assign(Object.assign({},n),{content:'""',position:"absolute",left:0,background:"linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.00) 100%)"})},"&.next-bg":{"&:after":Object.assign(Object.assign({},n),{content:'""',position:"absolute",right:0,background:"linear-gradient(90deg, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%)"})}},list:{borderBottom:`1px solid ${e.colors.neutral[1]}`},btn:{position:"absolute",top:"50%",zIndex:2,transform:"translate(0, -50%)",width:(0,s.h)(28),height:(0,s.h)(28),padding:0,background:"white",borderRadius:"50%",cursor:"pointer",filter:"drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04)) drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04))",".mantine-Button-icon":{display:"flex",alignItems:"center",justifyContent:"center"},"&.disabled":{opacity:0,zIndex:0}},prevBtn:{left:0},nextBtn:{right:0}})});let Tabs=e=>{var t,{variant:a="inline",value:i,styles:s,children:g,dataList:h=[],tabProps:C,listProps:f,panelProps:v,TabComponentDisplay:E,startPadding:b=40,defaultValue:x}=e,y=(0,n._)(e,["variant","value","styles","children","dataList","tabProps","listProps","panelProps","TabComponentDisplay","startPadding","defaultValue"]);let{cx:w,classes:P}=p({variant:a},{name:"Tabs",styles:s}),k=(0,r.useRef)(null),I=(0,r.useRef)([]),[D,M]=(0,r.useState)(x||(null===(t=null==h?void 0:h[0])||void 0===t?void 0:t.value)),[S,N]=(0,r.useState)(0),[F,L]=(0,r.useState)(!1),[_,H]=(0,r.useState)(!0),[$,B]=(0,r.useState)({x:0,y:0}),O=(0,r.useRef)(null),R=Object.assign({defaultValue:x,classNames:P},g?{value:i}:{value:D,onTabChange:e=>M(e)});(0,r.useEffect)(()=>{M(i)},[i]),(0,r.useEffect)(()=>{var e,t,a;null===(e=O.current)||void 0===e||e.scrollTo({left:(null===(a=null===(t=null==I?void 0:I.current)||void 0===t?void 0:t[S])||void 0===a?void 0:a.offsetLeft)-b,behavior:"smooth"})},[S]),(0,r.useEffect)(()=>{N(h.findIndex(e=>e.value==D))},[D]),(0,r.useEffect)(()=>{var e,t;H(0===$.x),L((null===(e=null==O?void 0:O.current)||void 0===e?void 0:e.clientWidth)+$.x===(null===(t=null==O?void 0:O.current)||void 0===t?void 0:t.scrollWidth))},[$]);let TabTextComponent=({text:e,dataEventCategory:t,dataEventAction:a,dataEventLabel:n})=>E?r.createElement(E,null,e):r.createElement(u.T,{size:"s3",color:"inherit",weight:"semiBold","data-event-category":t,"data-event-action":a,"data-event-label":n},e);return r.createElement(c.m,Object.assign({},R,y),g||r.createElement(r.Fragment,null,r.createElement(m.x,{className:w(P.scrollArea,`${_?"":"prev-bg"} ${F?"":"next-bg"}`),scrollbarSize:0,viewportRef:O,onScrollPositionChange:B},r.createElement(c.m.List,Object.assign({className:P.list,ref:k},f),h.map((e,t)=>r.createElement(c.m.Tab,Object.assign({ref:e=>I.current[t]=e,className:P.tab,key:String(e.value),value:String(e.value)},C),r.createElement(TabTextComponent,Object.assign({},e))))),r.createElement(d.B,{className:w(P.btn,P.prevBtn,_?"disabled":""),unstyled:!0,onClick:()=>N(S-1>-1?S-1:0),leftIcon:r.createElement(l.Z,{size:16})}),r.createElement(d.B,{className:w(P.btn,P.nextBtn,F?"disabled":""),unstyled:!0,onClick:()=>N(S+1r.createElement(c.m.Panel,Object.assign({value:String(e.value),key:String(e.value)},v),e.content))))};Tabs.List=c.m.List,Tabs.Tab=c.m.Tab,Tabs.Panel=c.m.Panel},PKxV:function(e,t,a){a.d(t,{I:function(){return InputCommentBar},P:function(){return PopupDanger},S:function(){return SharePopup},a:function(){return PopupFrame},b:function(){return SubmitReportForm},c:function(){return N},d:function(){return getPostFormData},e:function(){return editPost},f:function(){return createPost},g:function(){return getDefaultFailNoti},h:function(){return deletePost},i:function(){return B},j:function(){return deleteComment},k:function(){return decodeCommentBody},l:function(){return likeUnlikeComment},m:function(){return likeUnlikePost},u:function(){return useImagePicker}});var n=a("q1tI"),r=a("odgB"),l=a("rPIz"),o=a("/kWL"),i=a("HMwR"),s=a("i8i4"),c=a("EJrp"),m=a("rBCA"),d=a("iBNF"),u=a("z/kP"),p=a("/CSP"),g=a("5kis"),h=a("OQ3V"),C=a("6JAH"),f=a("IQVP"),v=a("eaXp"),E=a("3uEO"),b=a("Zin3"),x=a("Pa9D"),y=a("Oe83"),w=a("t/pd"),P=a("fKfj"),k=a("5uo3"),I=a("s5u8"),D=a("/pFO");let useImagePicker=(e,t)=>{let[a,r]=(0,n.useState)(e||[]),l=(0,n.useMemo)(()=>(e||a).map(e=>"string"==typeof e?e:URL.createObjectURL(e)),[e,a]);return{onSelectImages:n=>{let l=n.target.files;if(l){if(t&&e){let n=e||a;t(n.concat(Array.from(l)))}else r(a=>{let n=e||a;return t&&t(n.concat(Array.from(l))),n.concat(Array.from(l))})}},onRemoveImage:a=>{t&&e?(e.splice(a,1),t(e.slice())):r(n=>{let r=e||n;return r.splice(a,1),t&&t(r.slice()),r.slice()})},onRemoveAllImages:()=>{t?t([]):r([])},imageSrcs:l,imageFiles:e||a}},getDefaultFailNoti=e=>({message:e("notification.failure"),type:"danger"}),likeUnlikePost=({id:e,locale:t})=>(0,u.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,c.e)((0,c.f)(f.yy.POST.LIKE,{id:e,_locale:t}),"GET");return a}),deletePost=({id:e,locale:t})=>(0,u.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,c.e)((0,c.f)(f.yy.POST.DELETE,{id:e,_locale:t}),"DELETE");return a}),getPostFormData=({title:e,description:t,communityId:a,imageFiles:n,previewUrl:r,topicIds:l,locale:o,sanitizeFunction:s,categoryCommunityId:c,categoryTopicIds:m,introUrl:d,bannerUrl:p,scheduleTime:g,isAnonymous:h,isAskDoctor:f})=>(0,u.a)(void 0,void 0,void 0,function*(){let u=new FormData,E=(0,v.j)(t),b=(0,v.j)(e),x=(0,v.i)(E);if(u.append("title",b),u.append("description",(0,v.k)(E,s)),c?u.append("category_community",String(c)):a&&u.append("community_id",String(a)),u.append("is_anonymous",h?"1":"0"),u.append("is_question",f?"1":"0"),(null==r?void 0:r.title)&&u.append("preview_title",r.title),(null==r?void 0:r.description)&&u.append("preview_description",r.description),(null==r?void 0:r.url)&&u.append("preview_link",(0,i.c)(r.url)),(null==r?void 0:r.image)&&u.append("preview_image",(0,i.c)(r.image)),null==l||l.forEach(e=>{u.append("topics[]",String(e||""))}),null==m||m.forEach(e=>{u.append("category_topics[]",String(e||""))}),null==n?void 0:n.length){let e=yield Promise.all(n.map((e,t)=>new Promise(a=>{setTimeout(()=>{a((0,v.u)(e,o))},2e3*t)})));null==e||e.filter(Boolean).slice(0,C.M).forEach((e,t)=>{u.append(`images[${t}]`,e)})}else u.append("images","");return null==x||x.forEach(e=>{u.append("mention_ids[]",e)}),u.append("intro_url",d||""),u.append("banner",p||""),g&&(u.append("post_type","scheduled"),u.append("schedule_datetime",g)),u}),createPost=({locale:e,formData:t,isArticleComment:a})=>(0,u.a)(void 0,void 0,void 0,function*(){let n=yield(0,c.e)((0,c.f)(a?f.yy.POST.CREATE_ARTICLE_COMMENT:f.yy.POST.CREATE,{_locale:e}),"POST",{data:t});return n}),editPost=({id:e,locale:t,formData:a})=>(0,u.a)(void 0,void 0,void 0,function*(){let n=yield(0,c.e)((0,c.f)(f.yy.POST.UPDATE,{id:e,_locale:t}),"POST",{data:a});return n}),reportPost=({id:e,reason:t,locale:a})=>{let n=new FormData;return n.append("reason",t),(0,c.e)((0,c.f)(f.yy.POST.REPORT,{_locale:a,id:e}),"POST",{data:n})},M=m.Z.div` [data-type='confirm'] { max-width: 468px; /* height: 486px; */ padding: 0; .popup-content { display: flex; flex-direction: column; padding: 0; .close-button { top: 16px; right: 16px; width: 24px; height: 24px; z-index: 5; } .header { display: flex; height: 56px; align-items: center; padding: 16px 56px 16px 32px; border-bottom: 1px solid ${d.r.colors.neutral100}; font-weight: 900; width: 100%; justify-content: space-between; } .content { overflow: auto; flex: 1; .topic-list-wrapper { padding: 1rem; } } } } > div&[data-open='true'] { z-index: 250; &:last-child { z-index: 200; } } ${e=>e.isExpand&&` & > div[data-open] { width: 100%; height: 100%; max-width: none; max-height: none; } `} ${e=>e.hasFullscreen&&` & > div[data-open] { transition: all 0.5s ease-in-out, width 0s, height 0s; } `} `,S=m.Z.div` cursor: pointer; display: flex; align-items: center; `,PopupFrame=({className:e,style:t,closeIcon:a,heading:r="",children:o,isOpen:i=!1,hasFullscreen:s=!1,disableClickOutside:c=!1,initExpand:m=!1,onExpandChange:d,onClose:u=()=>null})=>{let[p,g]=(0,n.useState)(m);return n.createElement(M,{className:e,style:t,isExpand:p,hasFullscreen:s},n.createElement(k.P,{type:"confirm",onClose:u,isOpen:i,closeIcon:a||n.createElement("img",{src:I.C,loading:"lazy"}),enableAnimation:!s,disableClickOutside:c},n.createElement("div",{className:"header"},n.createElement(l.H,{tag:"h5"},r),s&&n.createElement(S,{onClick:()=>{null==d||d(),g(!p)}},n.createElement(P.Z,{size:14,isExpand:p}))),n.createElement("div",{className:"content"},"function"==typeof o?o(p):o)))};var N="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath fill='%23262626' d='M12 22.984c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.478-10 10 4.477 10 10 10'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14.828 10.156-5.657 5.657M9.172 10.156l5.657 5.657'/%3e%3c/svg%3e";let F=m.Z.div` [data-type='confirm'] { width: min(360px, 100%); height: auto; &[data-open='false'] { top: calc(-100% - 500px); } } z-index: 600; .header { display: none !important; } .confirm-dialog { position: relative; overflow: auto; width: 100%; padding-top: 44px; background: #fff; border-radius: ${d.r.borderRadius}; .confirm-content { display: flex; flex-direction: column; align-items: center; padding: 0 16px 16px; text-align: center; .title { margin-bottom: 8px; font-size: 24px; line-height: 32px; word-break: break-word; overflow-wrap: break-word; } .desc { margin-bottom: 24px; color: ${d.r.colors.gray500}; font-size: 18px; line-height: 24px; text-align: center; word-break: break-word; overflow-wrap: break-word; } .btn-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; button { margin: 0 4px 0.5rem; } } } } .thumbnail-container { width: 80px; height: 80px; margin-bottom: 32px; .thumbnail { width: 100%; height: 100%; } &.is-icon { display: flex; align-items: center; justify-content: center; background: #e0e9fc; border-radius: 1rem; .thumbnail { width: 40px; height: 40px; } } } &[data-is-marrybaby='true'] { .popup-frame { > div:first-child { overflow: hidden; border-radius: 1rem; &[data-open='true'] { ${i.M.mbDown} { top: 100%; transform: translate(-50%, -100%); max-width: unset; width: 100%; background: unset; overflow: unset; } } } .popup-content { .close-button { ${i.M.mbDown} { display: none; } } .confirm-dialog { ${i.M.mbDown} { background: unset; position: relative; overflow-x: hidden; &::before { content: ''; width: 200%; background: #fff; position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: -1; height: 100%; border-top-left-radius: 100%; border-top-right-radius: 100%; } } .confirm-content { padding: 0 40px 40px; ${i.M.mbDown} { padding-left: 1.5rem; padding-right: 1.5rem; } .btn-group { width: 100%; justify-content: space-between; button { flex: 1; margin: 0; &:first-child { margin-right: 0.5rem; } } } } } } .thumbnail-container { ${i.M.mbDown} { display: none; } &.is-icon { background: #ffeaf1; border-radius: 24px; } &.is-mobile { position: absolute; top: 0; left: 50%; display: none; width: 48px; height: 48px; transform: translate(-50%, -50%); &.is-icon { border-radius: 1rem; .thumbnail { width: 24px; height: 24px; } } ${i.M.mbDown} { display: flex; } } } } } `,PopupDanger=({className:e,isMarryBaby:t,style:a,title:m,description:d,acceptText:u,cancelText:p,onAccept:g,onCancel:h,thumbnail:C,isThumbnailIcon:f,onClose:v,acceptBtnTracking:E,acceptBtnProps:b,cancelBtnProps:x})=>{let{data:{env:{isMarryBaby:y}}}=(0,n.useContext)(c.T),w="boolean"==typeof t?t:y,[P,k]=(0,n.useState)(!1);return((0,n.useEffect)(()=>((0,i.t)(!0),setTimeout(()=>k(!0),0),()=>(0,i.t)(!1)),[]),"undefined"==typeof window)?null:s.createPortal(n.createElement(F,{"data-is-marrybaby":w,className:e,style:a,"data-open":P},n.createElement(PopupFrame,{className:"popup-frame",isOpen:P,onClose:v},n.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},n.createElement("div",{className:"confirm-content"},C&&n.createElement("div",{className:`thumbnail-container ${f?"is-icon":""}`},n.createElement("img",{className:"thumbnail",src:C,loading:"lazy"})),n.createElement(l.H,{className:"title",tag:"h2"},m),n.createElement(o.T,{className:"desc",size:"lg"},d),n.createElement("div",{className:"btn-group"},n.createElement(r.B,Object.assign({theme:w?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==g||g(),null==v||v()}},b,E),u),n.createElement(r.B,Object.assign({theme:w?"marryBaby":"helloSites",size:"md",onClick:()=>{null==h||h(),null==v||v()}},x),p)))),w&&C&&n.createElement("div",{className:`thumbnail-container is-mobile ${f?"is-icon":""}`},n.createElement("img",{className:"thumbnail",src:C,loading:"lazy"})))),(0,i.a)())},L=m.Z.div` padding: 1rem; border-top: 1px solid #f2f2f2; &[data-is-reply='true'] { padding-right: 0; padding-left: 0; border-top: 1px solid #e4e8ec; margin-right: 1rem; margin-left: 1rem; } .error-text { padding: 1rem; color: ${d.r.colors.red700}; } .reply-to-container { display: flex; justify-content: space-between; padding-bottom: 0.75rem; margin-top: -0.25rem; .icon-close-comment { width: 16px; height: 16px; cursor: pointer; } a { text-decoration: none; } } .input-container { display: flex; align-items: center; .avatar-wrapper { display: flex; flex-shrink: 0; align-items: center; margin-right: 0.5rem; &.avatar-wrapper-reply { width: 32px; height: 32px; .avatar { width: 32px; height: 32px; } } } .input-wrapper { margin-right: 0.5rem; &[data-has-error] { .as-input { border-color: ${d.r.colors.red700}; } } .as-input { .textarea { width: 100%; max-height: 225px; min-height: 75px; .ql-toolbar { padding: 0; } .ql-editor { padding-left: 0; padding-right: 0; } .quill { height: 0; } } width: 100%; padding: 12px 16px; border: solid 1px ${d.r.colors.gray200}; border-radius: ${d.r.borderRadius}; &:active, &:focus { border-color: ${d.r.colors.primaryBase}; box-shadow: 0px 0px 2px 2px ${d.r.colors.primary200}; } &:disabled { background-color: ${d.r.colors.gray100}; cursor: not-allowed; } span { &[data-error='true'] { color: red; text-decoration: underline; } } } &[data-has-action-icon] { .as-input { padding: 12px 48px 12px 16px; } } &[data-has-display-icon] { .as-input { padding: 12px 16px 12px 48px; } } &[data-has-action-icon][data-has-display-icon] { .as-input { padding: 12px 48px; } } &[data-size='lg'] { .as-input { font-size: 16px; font-weight: ${d.r.sizes.fwRegular}; ${i.M.mbDown} { font-size: 22px; line-height: 1.2; } ${i.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { .as-input { font-weight: ${d.r.sizes.fwRegular}; line-height: 22px; ${i.M.mbDown} { font-size: 14px; line-height: 1.2; } ${i.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { .as-input { font-weight: ${d.r.sizes.fwRegular}; line-height: 20px; ${i.M.mbDown} { font-size: 13px; line-height: 1.5; } ${i.M.mbUp} { font-size: 13px; line-height: 1.5; } } } } .images-input-label { height: 100%; cursor: pointer; .icon-images-input { width: 24px; height: 24px; vertical-align: middle; } } .send-button { display: flex; width: 40px; height: 40px; flex-shrink: 0; align-items: center; justify-content: center; padding: 0; border: none; &.send-button-post { background: ${d.r.colors.neutral100}; border-radius: 50%; } .icon-enter { width: 20px; height: 20px; vertical-align: middle; } &[data-is-loading='true'] { > div { display: flex; align-items: center; justify-content: center; } } } } .preview-images-container { margin-top: 1rem; .image-src-wrapper { position: relative; width: 100%; padding-top: 66.67%; &:not(:last-child) { margin-bottom: 1rem; } .preview-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; } .icon-close-circle { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; cursor: pointer; } } } `,_=(0,n.createContext)({}),getCommentFormBody=({postId:e,message:t,photos:a,link:n,locale:r,sanitizeFunction:l,replyingUserId:o,replyingUserName:i,replyingId:s})=>(0,u.a)(void 0,void 0,void 0,function*(){let c=new FormData,m=(0,v.k)(t.replace(/(\ )+/g," "),l),d=(0,v.i)(m);if(a&&a.length>0){let e=yield Promise.all(null==a?void 0:a.map(e=>(0,v.u)(e,r)));e.filter(Boolean).slice(0,C.M).forEach(e=>{c.append("images[]",e)})}return n&&c.append("link",n),null==d||d.forEach(e=>{c.append("mention_ids[]",e)}),c.append("post_id",e),s&&c.append("parent_id",s),o&&(d.unshift(o),m=`[mention+id="${o}"+name="${(i||"").replace('"',"'")}"]${m}`,c.append("parent_user_id",String(o))),c.append("content",m),c.append("content",m),c}),submitComment=(e,t)=>(0,u.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(f.yy.COMMENT.CREATE,{_locale:t}),"POST",{data:e})}),decodeCommentBody=e=>{try{let t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"",n=e.replace(/\[@([^\]]+)\]/,"");return{text:n.trim(),replyingTo:a}}catch(e){}return{text:""}},submitReply=(e,t)=>(0,u.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(f.yy.COMMENT.REPLY,{_locale:t}),"POST",{data:e})}),likeUnlikeComment=({commentId:e,setLike:t=!1,locale:a})=>(0,u.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(t?f.yy.COMMENT.LIKE:f.yy.COMMENT.UNLIKE,{_locale:a,id:e}),"GET")}),deleteComment=({id:e,locale:t})=>(0,c.e)((0,c.f)(f.yy.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"),InputCommentBar=({isReply:e,className:t,onClose:a,replyToName:l,style:i,replyingId:s,replyingUser:m,onPostSuccess:d,post:f,isMarryBaby:v})=>{let{action:{pushNotifications:w,sanitizeFunction:P},data:{userInfo:k,locale:I,env:{isMarryBaby:D}}}=(0,n.useContext)(c.T),{t:M}=(0,g.u)(),{onSelectImages:S,onRemoveImage:F,imageSrcs:H,onRemoveAllImages:$,imageFiles:B}=useImagePicker(),[O,R]=(0,n.useState)(""),{trigger:j}=(0,n.useContext)(_),[z,T]=(0,n.useState)(!1),A=(0,n.useRef)(null),Z=(0,n.useRef)(null),U=(0,n.useRef)(null),[V,W]=(0,n.useState)([]),[q,G]=(0,n.useState)([]),[Q,Y]=(0,n.useState)(null);return(0,n.useEffect)(()=>{var e;null===(e=U.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{var e;null===(e=Z.current)||void 0===e||e.focus()},400)},[j]),n.createElement(L,{"data-is-reply":e,className:t,style:i},e&&n.createElement("div",{className:"reply-to-container"},n.createElement(o.T,{size:"p4"},n.createElement("span",{dangerouslySetInnerHTML:{__html:M("inputComment.replyTo",{name:`@${l||""}`})}})),n.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3ccircle cx='8' cy='8.5' r='6.667' fill='white' stroke='%23404040'/%3e%3cpath stroke='%23404040' stroke-linecap='round' stroke-linejoin='round' d='m10 6.5-4 4M6 6.5l4 4'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>a&&a(),loading:"lazy"})),n.createElement("div",{className:"input-container",ref:U},n.createElement(x.U,{className:`avatar-wrapper ${e?"avatar-wrapper-reply":""}`,avatar:(null==k?void 0:k.id)?k.avatar:C.D,username:(null==k?void 0:k.name)||(null==k?void 0:k.username)}),n.createElement("input",{ref:A,onChange:S,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),n.createElement(p.I,{value:O,name:"input",size:"md",className:"input-wrapper",displayIcon:n.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.754 4.854H4.492a1.79 1.79 0 0 0-1.789 1.789v12.524a1.79 1.79 0 0 0 1.79 1.789h12.523a1.79 1.79 0 0 0 1.79-1.79v-6.261'/%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M17.463 3.512a1.898 1.898 0 0 1 2.684 2.684l-8.498 8.498-3.579.895.895-3.579z'/%3e%3c/svg%3e",loading:"lazy"}),CustomInput:n.createElement("div",{className:"as-input"},n.createElement(y.R,{className:"textarea",html:O,onChange:R,onImagePickerClick:()=>{var e;return null===(e=A.current)||void 0===e?void 0:e.click()},bannedWords:q,onPreviewUrlChange:Y,onInvalidUrlsChange:W,setEditorRef:e=>Z.current=e,isReplying:e}))}),n.createElement(r.B,{theme:("boolean"==typeof v?v:D)?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>(0,u.a)(void 0,void 0,void 0,function*(){var t,n,r,l,o,i,c,u,p;if((null==f?void 0:f.id)&&!z){T(!0);try{let g=yield getCommentFormBody(Object.assign({message:O,photos:B,postId:String(f.id),link:null==Q?void 0:Q.url,sanitizeFunction:P,locale:I},e&&s?{replyingUserId:String((null==m?void 0:m.id)||(null===(t=null==f?void 0:f.author)||void 0===t?void 0:t.id)||""),replyingId:s,replyingUserName:(null==m?void 0:m.name)||(null==m?void 0:m.username)||""}:{})),C=yield e&&s?submitReply(g,I):submitComment(g,I),v=null==C?void 0:C.data;(null==v?void 0:v.id)&&!(null===(r=null===(n=null==C?void 0:C.messages)||void 0===n?void 0:n.moderation)||void 0===r?void 0:r.type)?(e=>{R(""),$(),a&&a();let t=(0,h.g)(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),d&&d(t)})(C):(null===(o=null===(l=null==C?void 0:C.messages)||void 0===l?void 0:l.moderation)||void 0===o?void 0:o.type)==="banned"?(w({title:M("notification.comment.blocked.title"),message:M("notification.comment.blocked.message"),type:"danger"}),C.messages.moderation.words&&G(C.messages.moderation.words)):(null===(c=null===(i=null==C?void 0:C.messages)||void 0===i?void 0:i.moderation)||void 0===c?void 0:c.type)==="suspect"?(w({title:M("notification.comment.suspect.title"),message:M("notification.comment.suspect.message"),type:"warning"}),R(""),$(),a&&a()):(null===(u=null==C?void 0:C.messages)||void 0===u?void 0:u.find(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))}))?(w({message:M("notification.suspend.message"),type:"warning"}),R(""),$(),a&&a()):w({title:"",message:(null===(p=null==C?void 0:C.messages)||void 0===p?void 0:p[0])||M("notification.comment.somethingWrong"),type:"danger"})}catch(e){w({title:"",message:M("notification.comment.somethingWrong"),type:"danger"})}T(!1)}}),isLoading:z,isDisabled:!!(null==V?void 0:V.length)||z||!O||(null==O?void 0:O.length)<2||!O.trim()},n.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m7.5 9.734-3.75 3.75 3.75 3.75'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M16.25 4.734v5.569c0 .843-.33 1.653-.915 2.25a3.1 3.1 0 0 1-2.21.931H3.75'/%3e%3c/svg%3e",className:"icon-enter",loading:"lazy"}))),(null==V?void 0:V.length)?n.createElement("div",{className:"error-text"},M("notification.limitUrlDomain")):null,(!H||0===H.length)&&Q&&n.createElement("div",{className:"link-preview-wrapper"},Q.isFetching?n.createElement(b.L,null):n.createElement(n.Fragment,null,n.createElement(E.C,{title:Q.title,url:Q.url||"#",image:Q.image,noRefetch:!0}),n.createElement("img",{src:N,className:"icon-close",onClick:()=>Y(null),loading:"lazy"}))),H&&H.length>0&&n.createElement("div",{className:"preview-images-container"},H.map((e,t)=>n.createElement("div",{key:t,className:"image-src-wrapper"},n.createElement("img",{className:"preview-image",src:e,loading:"lazy"}),n.createElement("img",{src:N,className:"icon-close-circle",onClick:()=>F(t),loading:"lazy"})))))},SharePopup=({trackingCategory:e,className:t,style:a,url:r,text:l,onClose:o})=>{let{data:{env:{isMarryBaby:s}}}=(0,n.useContext)(c.T),{t:m}=(0,g.u)(),[d,u]=(0,n.useState)(!1);return(0,n.useEffect)(()=>((0,i.t)(!0),setTimeout(()=>u(!0),0),()=>(0,i.t)(!1)),[]),n.createElement(w.h,null,n.createElement(H,{"data-is-marrybaby":s,className:t,style:a},n.createElement(PopupFrame,{className:"share-popup",isOpen:d,onClose:o,heading:m("bottomBar.share")},d&&n.createElement(D.r,{trackingCategory:e,shareUrl:r||("undefined"!=typeof window?window.location.href:""),title:l}))))},H=m.Z.div` .share-popup { > div:first-child { height: unset; } } .custom-share__header { display: flex; flex-wrap: no-wrap; align-items: center; padding: 1rem; border-bottom: 1px solid ${d.r.colors.neutral100}; margin-bottom: 16px; .custom-share__header-image { width: 38px; height: 38px; flex-shrink: 0; & > img { width: 100%; height: 100%; object-fit: cover; object-position: center; } } .custom-share__header-info { flex: 1; padding: 0 8px; word-break: break-word; [data-tag='h4'] { margin-bottom: 8px; font-size: 14px; font-weight: bold; line-height: 14px; } [data-size='md'] { color: #a5a5a5; font-size: 14px; line-height: 14px; } } } &[data-is-marrybaby='true'] { .share-popup { > div:first-child { overflow: hidden; border-radius: 1rem; &[data-open='true'] { ${i.M.mbDown} { max-width: unset; width: 100%; top: 100%; transform: translate(-50%, -100%); border-bottom-left-radius: 0; border-bottom-right-radius: 0; } } } .close-button { display: block; } .popup-content { .header { display: block; padding: 1rem; background-color: rgb(243, 243, 243); } .content { padding-bottom: 1rem; } } .share-mb-text { margin: 1rem 1rem 0.5rem; } } } `,$=m.Z.div` padding: 0 8px; margin-top: 18px; .report-list { margin-bottom: 18px; .report-item { display: flex; align-items: center; margin-bottom: 10px; font-weight: 600; & > img { width: 12px; height: 12px; margin-right: 8px; } .__label { font-size: 14px; } } } .report-submit { width: 100%; } &[data-is-marrybaby='true'] { padding: 0 1rem 1rem; } `;var B="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12M8 5v3M8 11h.007'/%3e%3c/svg%3e";let SubmitReportForm=({className:e,style:t,reason:a,reasonText:l,onClose:i,postId:s})=>{let{data:{locale:m,env:{isMarryBaby:p}},action:{pushNotifications:h}}=(0,n.useContext)(c.T),{t:C}=(0,g.u)(),[f,v]=(0,n.useState)(!1);return n.createElement($,{"data-is-marrybaby":p,className:e,style:t},n.createElement("ul",{className:"report-list"},n.createElement("li",{className:"report-item"},n.createElement("img",{src:B,loading:"lazy"}),n.createElement(o.T,{className:"__label",color:d.r.colors.gray800,size:"p4"},l))),n.createElement(r.B,{theme:p?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:f,onClick:()=>(0,u.a)(void 0,void 0,void 0,function*(){if(s&&!f){v(!0);try{let e=yield reportPost({id:s,reason:a,locale:m});(null==e?void 0:e.status)===1&&(h({message:"Post reported",type:"success"}),i&&i())}catch(e){}v(!1)}})},C("submit")))}},f0L1:function(e,t,a){a.d(t,{T:function(){return ThrForm}});var n=a("z/kP"),r=a("q1tI"),l=a("cChf"),o=a("ZFu2"),i=a("AFO6"),s=a("5kis"),c=a("owZr"),m=a("6JAH"),d=a("UFTh"),u=a("FNss"),p=a("ndOt"),g=a("/kWL"),h=a("hePw"),C=a("8PAx"),f=a("xrdX");let v=(0,r.createContext)({}),DefaultForm=e=>{var t,a=(0,n._)(e,[]);let{t:l,locale:o}=(0,s.u)(),{isAdult:i,activeValueNote:c,linkTool:m,form:E,submitProps:b}=(0,r.useContext)(v),{classes:x={}}=(0,r.useContext)(h.C);return r.createElement(C.H,Object.assign({formLayout:"default"},a),r.createElement(C.H.FormRow,null,r.createElement(d.G,Object.assign({},E.getInputProps("gender")))),r.createElement(C.H.FormRow,null,r.createElement(p.D,Object.assign({},E.getInputProps("age"),{placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},label:r.createElement(g.T,{size:"p2",weight:"semiBold"},l("targetHeartRate.ageInput")),maxDate:new Date}))),r.createElement(C.H.FormRow,null,r.createElement(u.I.Number,Object.assign({label:r.createElement(g.T,{size:"p2",weight:"semiBold"},l("targetHeartRate.heartRateInput")),placeholder:l("tools.inputPlaceholder",{content:"60"})},E.getInputProps("heartRate"),{min:40,max:200,styles:()=>({rightSection:{width:"auto"}})}))),i&&r.createElement(C.H.FormRow,null,r.createElement(u.S,Object.assign({label:r.createElement(g.T,{size:"p2",weight:"semiBold"},l("targetHeartRate.selectActive")),defaultValue:null===(t=null==c?void 0:c[0])||void 0===t?void 0:t.value,data:c.map(e=>({value:e.value,label:e.label})),styles:{item:{whiteSpace:"nowrap",padding:"10px 12px",fontSize:"14px"}},withinPortal:!0},E.getInputProps("activeValue")))),r.createElement(C.H.FormRow,{className:x.submitWrapper},r.createElement(C.H.Submit,Object.assign({className:x.submitBtn,type:"submit",dataEventCategory:"Health Tool",dataEventAction:"THR",dataEventLabel:`https://${f.v[o]}/${m}`},b),l("bmi.submit"))))},InlineForm=e=>{var t,a=(0,n._)(e,[]);let{t:l,locale:o}=(0,s.u)(),{isAdult:i,activeValueNote:c,linkTool:m,form:g,submitProps:E}=(0,r.useContext)(v),{classes:b={}}=(0,r.useContext)(h.C);return r.createElement(C.H,Object.assign({formLayout:"inline"},a),r.createElement(C.H.FormRow,null,r.createElement(C.H.BorderInlineControl,{label:l("tools.selectGender"),width:"none"},r.createElement(d.G,Object.assign({type:"radio",hideLabel:!0,error:null},g.getInputProps("gender")))),g.errors.gender&&r.createElement(C.H.Error,null,g.errors.gender)),r.createElement(C.H.FormRow,null,r.createElement(C.H.BorderInlineControl,{label:l("targetHeartRate.ageInput")},r.createElement(p.D,Object.assign({},g.getInputProps("age"),{placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},error:null,maxDate:new Date}))),g.errors.age&&r.createElement(C.H.Error,null,g.errors.age)),r.createElement(C.H.FormRow,null,r.createElement(C.H.BorderInlineControl,{label:l("targetHeartRate.heartRateInput")},r.createElement(u.I.Number,Object.assign({placeholder:l("tools.inputPlaceholder",{content:"60"})},g.getInputProps("heartRate"),{error:null,min:40,max:200,rightSection:r.createElement(C.H.Unit,null,"bmp"),styles:()=>({rightSection:{width:"auto"}})}))),g.errors.heartRate&&r.createElement(C.H.Error,null,g.errors.heartRate)),i&&r.createElement(C.H.FormRow,null,r.createElement(C.H.BorderInlineControl,{label:l("targetHeartRate.selectActive")},r.createElement(u.S,Object.assign({defaultValue:null===(t=null==c?void 0:c[0])||void 0===t?void 0:t.value,data:c.map(e=>({value:e.value,label:e.label})),styles:{item:{whiteSpace:"nowrap",padding:"10px 12px",fontSize:"14px"}},withinPortal:!0},g.getInputProps("activeValue"))))),r.createElement(C.H.FormRow,{className:b.submitWrapper},r.createElement(C.H.Submit,Object.assign({className:b.submitBtn,type:"submit",dataEventCategory:"Health Tool",dataEventAction:"THR",dataEventLabel:`https://${f.v[o]}/${m}`},E),l("bmi.submit"))))},ThrForm=e=>{var{formLayout:t,onSubmit:a,onError:d,submitProps:u}=e,p=(0,n._)(e,["formLayout","onSubmit","onError","submitProps"]);let{t:g,locale:h}=(0,s.u)(),C=(0,r.useRef)(40),{getHealthToolLink:f}=(0,i.u)(h),E=(0,l.c)({initialValues:{heartRate:60,activeValue:"low_intensity"},validate:{gender:(0,o.U)(g("validation.error.requiredField")),age:(0,o.U)(g("validation.error.requiredField")),heartRate:e=>Number(e)>=C.current&&200>=Number(e)?null:g("tools.heartRateRangeErr",{min:C.current,max:200})}}),b=(0,r.useMemo)(()=>f(m.H.THR),[f]),[x,y]=(0,r.useState)(!1),w=[{idAge:0,minAge:0,maxAge:18,rangeMale:40,rangeFemale:40},{idAge:1,minAge:18,maxAge:25,rangeMale:49,rangeFemale:54},{idAge:2,minAge:25,maxAge:35,rangeMale:49,rangeFemale:54},{idAge:3,minAge:35,maxAge:45,rangeMale:50,rangeFemale:54},{idAge:4,minAge:45,maxAge:55,rangeMale:50,rangeFemale:54},{idAge:5,minAge:55,maxAge:65,rangeMale:51,rangeFemale:54},{idAge:6,minAge:65,maxAge:120,rangeMale:50,rangeFemale:54}],P=[{value:"low_intensity",label:g("targetHeartRate.lowIntensity.title"),image:c.C.getAssetPath("/low.svg"),imageActive:c.C.getAssetPath("/low-active.svg"),content:g("targetHeartRate.lowIntensity.note")},{value:"moderate_intensity",label:g("targetHeartRate.moderateIntensity.title"),image:c.C.getAssetPath("/moderate.svg"),imageActive:c.C.getAssetPath("/moderate-active.svg"),content:g("targetHeartRate.moderateIntensity.note")},{value:"aerobic_zone",label:g("targetHeartRate.aerobicZone.title"),image:c.C.getAssetPath("/aerobic.svg"),imageActive:c.C.getAssetPath("/aerobic-active.svg"),content:g("targetHeartRate.aerobicZone.note")},{value:"vigorous_intensity",label:g("targetHeartRate.vigorousIntensity.title"),image:c.C.getAssetPath("/vigorous.svg"),imageActive:c.C.getAssetPath("/vigorous-active.svg"),content:g("targetHeartRate.vigorousIntensity.note")},{value:"maximum_intensity",label:g("targetHeartRate.maximumIntensity.title"),image:c.C.getAssetPath("/maximum.svg"),imageActive:c.C.getAssetPath("/maximum-active.svg"),content:g("targetHeartRate.maximumIntensity.note")}];(0,r.useEffect)(()=>{let e=E.getInputProps("age").value,t=E.getInputProps("gender").value;if(e instanceof Date){let a=(new Date().getTime()-e.getTime())/1e3;a>=567648e3?y(!0):y(!1);let n=w.find(e=>a>=31536e3*e.minAge&&a<31536e3*e.maxAge)||w[0];C.current="male"===t?n.rangeMale:n.rangeFemale}},[E]);let k=Object.assign(Object.assign({},p),{onSubmit:E.onSubmit(a,d)});return r.createElement(v.Provider,{value:{isAdult:x,activeValueNote:P,linkTool:b,form:E,submitProps:u}},"inline"===t?r.createElement(InlineForm,Object.assign({},k)):r.createElement(DefaultForm,Object.assign({},k)))}},UhdZ:function(e,t,a){a.d(t,{u:function(){return n}});var n=(0,a("/npG").k)(e=>({root:{},inner:{},content:{borderRadius:16},header:{borderBottom:`1px solid ${e.colors.neutral[1]}`,marginRight:0,marginBottom:0,padding:"12px"},overlay:{},title:{fontSize:16,fontWeight:700,lineHeight:1.5},body:{},close:{cursor:"pointer",width:"unset",height:"unset",svg:{width:"24px !important",height:"24px !important"}}}))},rxXM:function(e,t,a){a.d(t,{L:function(){return LabelSorting}});var n,r,l=a("q1tI"),o=a("/kWL"),i=a("EJrp"),s=a("BsoI");(n=r||(r={})).latest="latest",n.oldest="oldest",n.popular="popular";let LabelSorting=({onChange:e,className:t,style:a,leftLabel:n,rightLabel:r,color:c,value:m,choices:d})=>{let{data:{env:{isMarryBaby:u}}}=(0,l.useContext)(i.T);return l.createElement(s.L,{label:n,rightLabel:l.createElement(s.b,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:d.map(t=>({label:t.label,onClick:()=>e&&e(String(t.value)),selected:t.value===m,className:"bold-item"}))},toggleButtonContent:l.createElement("div",{style:{display:"flex"}},l.createElement(o.T,{style:{display:"flex",alignItems:"center",fontWeight:"normal",marginRight:12},size:"p4"},r),l.createElement("img",{src:u?"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%233E3F58' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m8 14 4 4 4-4M16 10l-4-4-4 4'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%238C8C8C' d='M4.5 7h7a.46.46 0 0 0 .351-.165.56.56 0 0 0 .149-.39q0-.226-.149-.391l-3.5-3.89a.458.458 0 0 0-.703 0l-3.5 3.89a.56.56 0 0 0-.148.39q0 .226.148.391Q4.298 7 4.5 7M11.5 9h-7a.46.46 0 0 0-.352.165.56.56 0 0 0-.148.39q0 .226.148.391l3.5 3.889a.46.46 0 0 0 .703 0l3.5-3.889a.56.56 0 0 0 .149-.39q0-.226-.149-.391A.46.46 0 0 0 11.5 9'/%3e%3c/svg%3e",style:{width:16,height:16,alignSelf:"center"},loading:"lazy"}))}),color:"gray",className:t,style:a})}},jXyD:function(e,t,a){a.d(t,{c:function(){return convertLocalizedStringToNumber},f:function(){return formatPhoneNumber},l:function(){return localizeNumberFormat}});var n=a("A9bs");let localizeNumberFormat=(e,t,a=2)=>Intl.NumberFormat(void 0,{maximumFractionDigits:a}).format(e),convertLocalizedStringToNumber=e=>Number(e.replace(/,/gi,".")),formatPhoneNumber=e=>{try{let t=(0,n.parsePhoneNumber)(e,"VN");if(!(null==t?void 0:t.number))throw Error("Invalid number");return(0,n.formatPhoneNumber)(t.number)}catch(t){return console.log("\uD83D\uDE80 ~ formatPhoneNumber ~ error:",t),e}}},HwUa:function(e,t,a){a.d(t,{L:function(){return o}});var n=a("q1tI"),r=a("owZr"),l=a("vq0H");let o=(0,n.memo)(({type:e,width:t,height:a,isLight:o})=>{let i=(0,n.useMemo)(()=>{switch(e){case"hellobacsi":return{width:t||"107px",height:a||"24px",src:r.C.getAssetPath("logo/hellobacsi.png"),srcLight:r.C.getAssetPath("logo/hellobacsi-light.png")};case"hellodoktor":return{width:t||"127px",height:a||"24px",src:r.C.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:t||"121px",height:a||"27px",src:r.C.getAssetPath("logo/hellosehat.png")};case"hellojiankang":return{width:t||"87px",height:a||"24px",src:r.C.getAssetPath("logo/hellojiankang.png")};case"hellohealth":return{width:t||"123px",height:a||"24px",src:r.C.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:t||"150px",height:a||"24px",src:r.C.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:t||"99px",height:a||"24px",src:r.C.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:t||"127px",height:a||"24px",src:r.C.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:t||"101px",height:a||"24px",src:r.C.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:t||"111px",height:a||"24px",src:r.C.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:t||"89px",height:a||"24px",src:r.C.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:t||"123px",height:a||"24px",src:r.C.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:t||"105px",height:a||"24px",src:r.C.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:t||"60px",height:a||"57px",src:r.C.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:t||"145px",height:a||"28px",src:r.C.getAssetPath("logo/marrybaby.png")};default:return null}},[e,t,a]),{src:s,width:c,height:m,srcLight:d}=i||{};return n.createElement(l.I,{alt:`${e} logo`,className:"main-logo-icon",src:o&&d||s,style:{width:c,height:m}})})}}]);